]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
1ef5c8b4da34af54d93b371f1dcab0094c405b78
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.651 .
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 pc-files
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   --with-gpm              use Alessandro Rubini's GPM library
741   --without-dlsym         do not use dlsym() to load GPM dynamically
742   --with-sysmouse         use sysmouse (FreeBSD console)
743   --enable-rpath          use rpath option when generating shared libraries
744   --disable-relink        relink shared libraries during install
745   --with-shlib-version=X  Specify rel or abi version for shared libs
746   --with-libtool-opts=XXX specify additional libtool options
747   --with-export-syms=XXX  limit exported symbols using libtool
748   --with-versioned-syms=X markup versioned symbols using ld
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   --with-tparm-arg=TYPE   override parameter type of tparm
787   --with-rcs-ids          compile-in RCS identifiers
788 Options to Specify How Manpages are Installed:
789   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
790                           optionally formatted/catonly, e.g., gzip,formatted
791   --with-manpage-renames  specify manpage-renaming
792   --with-manpage-aliases  specify manpage-aliases using .so
793   --with-manpage-symlinks specify manpage-aliases using symlinks
794   --with-manpage-tbl      specify manpage processing with tbl
795 Extensions:
796   --disable-ext-funcs     disable function-extensions
797   --enable-sp-funcs       enable SCREEN-extensions
798   --enable-term-driver    enable terminal-driver
799   --enable-const          compile with extra/non-standard const
800   --enable-ext-colors     compile for 256-color support
801   --enable-ext-mouse      compile for extended mouse-encoding
802   --enable-ext-putwin     compile with extended putwin/screendump
803   --enable-no-padding     compile with $NCURSES_NO_PADDING code
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --enable-sigwinch       compile with SIGWINCH handler
806   --enable-tcap-names     compile with user-definable terminal capabilities
807   --with-pthread          use POSIX thread library
808   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
809   --enable-weak-symbols   enable weak-symbols for pthreads
810   --enable-reentrant      compile with reentrant code
811   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
812   --enable-opaque-form    make form-library structures "opaque"
813   --enable-opaque-menu    make menu-library structures "opaque"
814   --enable-opaque-panel   make panel-library structures "opaque"
815   --with-wrap-prefix=XXX  override prefix used for public variables
816 Development Code:
817   --without-develop       disable development options
818   --enable-hard-tabs      compile with hard-tabs code
819   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
820 Experimental Code:
821   --disable-assumed-color do not assume anything about default-colors
822   --disable-hashmap       compile without hashmap scrolling-optimization
823   --enable-colorfgbg      compile-in experimental $COLORFGBG code
824   --enable-interop        compile-in interop bindings
825   --enable-safe-sprintf   compile with experimental safe-sprintf code
826   --disable-scroll-hints  compile without scroll-hints code
827   --enable-wgetch-events  compile with wgetch-events code
828 Testing/development Options:
829   --disable-echo          do not display "compiling" commands
830   --enable-warnings       build: turn on GCC compiler warnings
831   --enable-string-hacks   work around bogus compiler/loader warnings
832   --enable-assertions     test: turn on generation of assertion code
833   --with-dmalloc          test: use Gray Watson's dmalloc library
834   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
835   --with-valgrind         test: use valgrind
836   --disable-leaks         test: free permanent memory, analyze leaks
837   --enable-expanded       test: generate functions for certain macros
838   --disable-macros        test: use functions rather than macros
839   --with-trace            test: add trace() function to all models of ncurses
840   --disable-gnat-projects test: disable GNAT projects even if usable
841 Ada95 Binding Options:
842   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
843   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
844   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
845   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
846
847 Some influential environment variables:
848   CC          C compiler command
849   CFLAGS      C compiler flags
850   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
851               nonstandard directory <lib dir>
852   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
853               headers in a nonstandard directory <include dir>
854   CPP         C preprocessor
855   CXX         C++ compiler command
856   CXXFLAGS    C++ compiler flags
857   CXXCPP      C++ preprocessor
858
859 Use these variables to override the choices made by `configure' or to help
860 it to find libraries and programs with nonstandard names/locations.
861
862 EOF
863 fi
864
865 if test "$ac_init_help" = "recursive"; then
866   # If there are subdirs, report their specific --help.
867   ac_popdir=`pwd`
868   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
869     cd $ac_subdir
870     # A "../" for each directory in /$ac_subdir.
871     ac_dots=`echo $ac_subdir |
872              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
873
874     case $srcdir in
875     .) # No --srcdir option.  We are building in place.
876       ac_sub_srcdir=$srcdir ;;
877     [\\/]* | ?:[\\/]* ) # Absolute path.
878       ac_sub_srcdir=$srcdir/$ac_subdir ;;
879     *) # Relative path.
880       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
881     esac
882
883     # Check for guested configure; otherwise get Cygnus style configure.
884     if test -f $ac_sub_srcdir/configure.gnu; then
885       echo
886       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
887     elif test -f $ac_sub_srcdir/configure; then
888       echo
889       $SHELL $ac_sub_srcdir/configure  --help=recursive
890     elif test -f $ac_sub_srcdir/configure.ac ||
891            test -f $ac_sub_srcdir/configure.in; then
892       echo
893       $ac_configure --help
894     else
895       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
896     fi
897     cd $ac_popdir
898   done
899 fi
900
901 test -n "$ac_init_help" && exit 0
902 if $ac_init_version; then
903   cat <<\EOF
904
905 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
906 Free Software Foundation, Inc.
907 This configure script is free software; the Free Software Foundation
908 gives unlimited permission to copy, distribute and modify it.
909 EOF
910   exit 0
911 fi
912 exec 5>config.log
913 cat >&5 <<EOF
914 This file contains any messages produced by compilers while
915 running configure, to aid debugging if configure makes a mistake.
916
917 It was created by $as_me, which was
918 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
919
920   $ $0 $@
921
922 EOF
923 {
924 cat <<_ASUNAME
925 ## ---------- ##
926 ## Platform.  ##
927 ## ---------- ##
928
929 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
930 uname -m = `(uname -m) 2>/dev/null || echo unknown`
931 uname -r = `(uname -r) 2>/dev/null || echo unknown`
932 uname -s = `(uname -s) 2>/dev/null || echo unknown`
933 uname -v = `(uname -v) 2>/dev/null || echo unknown`
934
935 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
936 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
937
938 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
939 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
940 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
941 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
942 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
943 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
944 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
945
946 PATH = $PATH
947
948 _ASUNAME
949 } >&5
950
951 cat >&5 <<EOF
952 ## ------------ ##
953 ## Core tests.  ##
954 ## ------------ ##
955
956 EOF
957
958 # Keep a trace of the command line.
959 # Strip out --no-create and --no-recursion so they do not pile up.
960 # Also quote any args containing shell meta-characters.
961 ac_configure_args=
962 ac_sep=
963 for ac_arg
964 do
965   case $ac_arg in
966   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
967   | --no-cr | --no-c) ;;
968   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
969   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
970   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
971     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
972     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
973     ac_sep=" " ;;
974   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
975      ac_sep=" " ;;
976   esac
977   # Get rid of the leading space.
978 done
979
980 # When interrupted or exit'd, cleanup temporary files, and complete
981 # config.log.  We remove comments because anyway the quotes in there
982 # would cause problems or look ugly.
983 trap 'exit_status=$?
984   # Save into config.log some information that might help in debugging.
985   echo >&5
986   echo "## ----------------- ##" >&5
987   echo "## Cache variables.  ##" >&5
988   echo "## ----------------- ##" >&5
989   echo >&5
990   # The following way of writing the cache mishandles newlines in values,
991 {
992   (set) 2>&1 |
993     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
994     *ac_space=\ *)
995       sed -n \
996         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
997           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
998       ;;
999     *)
1000       sed -n \
1001         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1002       ;;
1003     esac;
1004 } >&5
1005   sed "/^$/d" confdefs.h >conftest.log
1006   if test -s conftest.log; then
1007     echo >&5
1008     echo "## ------------ ##" >&5
1009     echo "## confdefs.h.  ##" >&5
1010     echo "## ------------ ##" >&5
1011     echo >&5
1012     cat conftest.log >&5
1013   fi
1014   (echo; echo) >&5
1015   test "$ac_signal" != 0 &&
1016     echo "$as_me: caught signal $ac_signal" >&5
1017   echo "$as_me: exit $exit_status" >&5
1018   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1019     exit $exit_status
1020      ' 0
1021 for ac_signal in 1 2 13 15; do
1022   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1023 done
1024 ac_signal=0
1025
1026 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1027 rm -rf conftest* confdefs.h
1028 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1029 echo >confdefs.h
1030
1031 # Let the site file select an alternate cache file if it wants to.
1032 # Prefer explicitly selected file to automatically selected ones.
1033 if test -z "$CONFIG_SITE"; then
1034   if test "x$prefix" != xNONE; then
1035     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1036   else
1037     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1038   fi
1039 fi
1040 for ac_site_file in $CONFIG_SITE; do
1041   if test -r "$ac_site_file"; then
1042     { echo "$as_me:1042: loading site script $ac_site_file" >&5
1043 echo "$as_me: loading site script $ac_site_file" >&6;}
1044     cat "$ac_site_file" >&5
1045     . "$ac_site_file"
1046   fi
1047 done
1048
1049 if test -r "$cache_file"; then
1050   # Some versions of bash will fail to source /dev/null (special
1051   # files actually), so we avoid doing that.
1052   if test -f "$cache_file"; then
1053     { echo "$as_me:1053: loading cache $cache_file" >&5
1054 echo "$as_me: loading cache $cache_file" >&6;}
1055     case $cache_file in
1056       [\\/]* | ?:[\\/]* ) . $cache_file;;
1057       *)                      . ./$cache_file;;
1058     esac
1059   fi
1060 else
1061   { echo "$as_me:1061: creating cache $cache_file" >&5
1062 echo "$as_me: creating cache $cache_file" >&6;}
1063   >$cache_file
1064 fi
1065
1066 # Check that the precious variables saved in the cache have kept the same
1067 # value.
1068 ac_cache_corrupted=false
1069 for ac_var in `(set) 2>&1 |
1070                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1071   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1072   eval ac_new_set=\$ac_env_${ac_var}_set
1073   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1074   eval ac_new_val="\$ac_env_${ac_var}_value"
1075   case $ac_old_set,$ac_new_set in
1076     set,)
1077       { echo "$as_me:1077: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1078 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1079       ac_cache_corrupted=: ;;
1080     ,set)
1081       { echo "$as_me:1081: error: \`$ac_var' was not set in the previous run" >&5
1082 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1083       ac_cache_corrupted=: ;;
1084     ,);;
1085     *)
1086       if test "x$ac_old_val" != "x$ac_new_val"; then
1087         { echo "$as_me:1087: error: \`$ac_var' has changed since the previous run:" >&5
1088 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1089         { echo "$as_me:1089:   former value:  $ac_old_val" >&5
1090 echo "$as_me:   former value:  $ac_old_val" >&2;}
1091         { echo "$as_me:1091:   current value: $ac_new_val" >&5
1092 echo "$as_me:   current value: $ac_new_val" >&2;}
1093         ac_cache_corrupted=:
1094       fi;;
1095   esac
1096   # Pass precious variables to config.status.  It doesn't matter if
1097   # we pass some twice (in addition to the command line arguments).
1098   if test "$ac_new_set" = set; then
1099     case $ac_new_val in
1100     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1101       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1102       ac_configure_args="$ac_configure_args '$ac_arg'"
1103       ;;
1104     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1105        ;;
1106     esac
1107   fi
1108 done
1109 if $ac_cache_corrupted; then
1110   { echo "$as_me:1110: error: changes in the environment can compromise the build" >&5
1111 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1112   { { echo "$as_me:1112: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1113 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1114    { (exit 1); exit 1; }; }
1115 fi
1116
1117 ac_ext=c
1118 ac_cpp='$CPP $CPPFLAGS'
1119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1122 ac_main_return=return
1123
1124 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1125   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1126                    ECHO_T='     ' ;;
1127   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1128   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1129 esac
1130 echo "#! $SHELL" >conftest.sh
1131 echo  "exit 0"   >>conftest.sh
1132 chmod +x conftest.sh
1133 if { (echo "$as_me:1133: PATH=\".;.\"; conftest.sh") >&5
1134   (PATH=".;."; conftest.sh) 2>&5
1135   ac_status=$?
1136   echo "$as_me:1136: \$? = $ac_status" >&5
1137   (exit $ac_status); }; then
1138   ac_path_separator=';'
1139 else
1140   ac_path_separator=:
1141 fi
1142 PATH_SEPARATOR="$ac_path_separator"
1143 rm -f conftest.sh
1144
1145 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1146
1147 top_builddir=`pwd`
1148
1149 echo "$as_me:1149: checking for egrep" >&5
1150 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1151 if test "${ac_cv_prog_egrep+set}" = set; then
1152   echo $ECHO_N "(cached) $ECHO_C" >&6
1153 else
1154   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1155                 then ac_cv_prog_egrep='grep -E'
1156                 else ac_cv_prog_egrep='egrep'
1157         fi
1158 fi
1159 echo "$as_me:1159: result: $ac_cv_prog_egrep" >&5
1160 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1161         EGREP=$ac_cv_prog_egrep
1162
1163         test -z "$EGREP" && { { echo "$as_me:1163: error: No egrep program found" >&5
1164 echo "$as_me: error: No egrep program found" >&2;}
1165    { (exit 1); exit 1; }; }
1166
1167 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1168 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1169 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1170 cf_cv_abi_version=${NCURSES_MAJOR}
1171 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1172 cf_cv_timestamp=`date`
1173 echo "$as_me:1173: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1174 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1175
1176 if test -f $srcdir/VERSION ; then
1177         echo "$as_me:1177: checking for package version" >&5
1178 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1179
1180         # if there are not enough fields, cut returns the last one...
1181         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1182         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1183         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1184
1185         # this is how CF_BUNDLED_INTL uses $VERSION:
1186         VERSION="$cf_field1"
1187
1188         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1189         test -z "$VERSION_MAJOR" && { { echo "$as_me:1189: error: missing major-version" >&5
1190 echo "$as_me: error: missing major-version" >&2;}
1191    { (exit 1); exit 1; }; }
1192
1193         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1194         test -z "$VERSION_MINOR" && { { echo "$as_me:1194: error: missing minor-version" >&5
1195 echo "$as_me: error: missing minor-version" >&2;}
1196    { (exit 1); exit 1; }; }
1197
1198         echo "$as_me:1198: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1199 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1200
1201         echo "$as_me:1201: checking for package patch date" >&5
1202 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1203         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1204         case .$VERSION_PATCH in
1205         (.)
1206                 { { echo "$as_me:1206: error: missing patch-date $VERSION_PATCH" >&5
1207 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1208    { (exit 1); exit 1; }; }
1209                 ;;
1210         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1211                 ;;
1212         (*)
1213                 { { echo "$as_me:1213: error: illegal patch-date $VERSION_PATCH" >&5
1214 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1215    { (exit 1); exit 1; }; }
1216                 ;;
1217         esac
1218         echo "$as_me:1218: result: $VERSION_PATCH" >&5
1219 echo "${ECHO_T}$VERSION_PATCH" >&6
1220 else
1221         { { echo "$as_me:1221: error: did not find $srcdir/VERSION" >&5
1222 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1223    { (exit 1); exit 1; }; }
1224 fi
1225
1226 # show the actual data that we have for versions:
1227 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing ABI VERSION $VERSION ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1234
1235 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1236
1237 echo "${as_me:-configure}:1237: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1238
1239 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1240
1241 echo "${as_me:-configure}:1241: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1242
1243         cf_PACKAGE=NCURSES
1244         PACKAGE=ncurses
1245
1246 cat >>confdefs.h <<EOF
1247 #define PACKAGE "$PACKAGE"
1248 EOF
1249
1250 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1251
1252         cat >>confdefs.h <<EOF
1253 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1254 EOF
1255
1256         cat >>confdefs.h <<EOF
1257 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1258 EOF
1259
1260 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1261
1262 # Check whether --with-rel-version or --without-rel-version was given.
1263 if test "${with_rel_version+set}" = set; then
1264   withval="$with_rel_version"
1265   { echo "$as_me:1265: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1266 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1267  cf_cv_rel_version=$withval
1268 fi;
1269
1270  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1271  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1272
1273 if test -n "$NCURSES_MAJOR" ; then
1274   case $NCURSES_MAJOR in
1275   ([0-9]*)
1276         ;;
1277   (*)
1278         { { echo "$as_me:1278: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1279 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1280    { (exit 1); exit 1; }; }
1281         ;;
1282   esac
1283 else
1284   { { echo "$as_me:1284: error: Release major-version value is empty" >&5
1285 echo "$as_me: error: Release major-version value is empty" >&2;}
1286    { (exit 1); exit 1; }; }
1287 fi
1288
1289 if test -n "$NCURSES_MINOR" ; then
1290   case $NCURSES_MINOR in
1291   ([0-9]*)
1292         ;;
1293   (*)
1294         { { echo "$as_me:1294: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1295 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1296    { (exit 1); exit 1; }; }
1297         ;;
1298   esac
1299 else
1300   { { echo "$as_me:1300: error: Release minor-version value is empty" >&5
1301 echo "$as_me: error: Release minor-version value is empty" >&2;}
1302    { (exit 1); exit 1; }; }
1303 fi
1304
1305 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1306
1307 # Check whether --with-abi-version or --without-abi-version was given.
1308 if test "${with_abi_version+set}" = set; then
1309   withval="$with_abi_version"
1310
1311         if test "x$cf_cv_abi_version" != "x$withval"
1312         then
1313                 { echo "$as_me:1313: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1314 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1315                 case $cf_cv_rel_version in
1316                 (5.*)
1317                         cf_cv_rel_version=$withval.0
1318                         ;;
1319                 (6.*)
1320                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1321                         ;;
1322                 esac
1323         fi
1324         cf_cv_abi_version=$withval
1325 fi;
1326
1327 if test -n "$cf_cv_abi_version" ; then
1328   case $cf_cv_abi_version in
1329   ([0-9]*)
1330         ;;
1331   (*)
1332         { { echo "$as_me:1332: error: ABI version is not a number: $cf_cv_abi_version" >&5
1333 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1334    { (exit 1); exit 1; }; }
1335         ;;
1336   esac
1337 else
1338   { { echo "$as_me:1338: error: ABI version value is empty" >&5
1339 echo "$as_me: error: ABI version value is empty" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1344 then
1345         case $cf_cv_rel_version in
1346         (5.*)
1347                 cf_cv_rel_version=$with_abi_version.0
1348                 ;;
1349         esac
1350 fi
1351
1352 ac_aux_dir=
1353 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1354   if test -f $ac_dir/install-sh; then
1355     ac_aux_dir=$ac_dir
1356     ac_install_sh="$ac_aux_dir/install-sh -c"
1357     break
1358   elif test -f $ac_dir/install.sh; then
1359     ac_aux_dir=$ac_dir
1360     ac_install_sh="$ac_aux_dir/install.sh -c"
1361     break
1362   elif test -f $ac_dir/shtool; then
1363     ac_aux_dir=$ac_dir
1364     ac_install_sh="$ac_aux_dir/shtool install -c"
1365     break
1366   fi
1367 done
1368 if test -z "$ac_aux_dir"; then
1369   { { echo "$as_me:1369: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1370 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1371    { (exit 1); exit 1; }; }
1372 fi
1373 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1374 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1375 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1376
1377 # Make sure we can run config.sub.
1378 $ac_config_sub sun4 >/dev/null 2>&1 ||
1379   { { echo "$as_me:1379: error: cannot run $ac_config_sub" >&5
1380 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1381    { (exit 1); exit 1; }; }
1382
1383 echo "$as_me:1383: checking build system type" >&5
1384 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1385 if test "${ac_cv_build+set}" = set; then
1386   echo $ECHO_N "(cached) $ECHO_C" >&6
1387 else
1388   ac_cv_build_alias=$build_alias
1389 test -z "$ac_cv_build_alias" &&
1390   ac_cv_build_alias=`$ac_config_guess`
1391 test -z "$ac_cv_build_alias" &&
1392   { { echo "$as_me:1392: error: cannot guess build type; you must specify one" >&5
1393 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1394    { (exit 1); exit 1; }; }
1395 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1396   { { echo "$as_me:1396: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1397 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1398    { (exit 1); exit 1; }; }
1399
1400 fi
1401 echo "$as_me:1401: result: $ac_cv_build" >&5
1402 echo "${ECHO_T}$ac_cv_build" >&6
1403 build=$ac_cv_build
1404 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1405 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1406 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1407
1408 echo "$as_me:1408: checking host system type" >&5
1409 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1410 if test "${ac_cv_host+set}" = set; then
1411   echo $ECHO_N "(cached) $ECHO_C" >&6
1412 else
1413   ac_cv_host_alias=$host_alias
1414 test -z "$ac_cv_host_alias" &&
1415   ac_cv_host_alias=$ac_cv_build_alias
1416 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1417   { { echo "$as_me:1417: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1418 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1419    { (exit 1); exit 1; }; }
1420
1421 fi
1422 echo "$as_me:1422: result: $ac_cv_host" >&5
1423 echo "${ECHO_T}$ac_cv_host" >&6
1424 host=$ac_cv_host
1425 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1426 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1427 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1428
1429 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1430         echo "$as_me:1430: checking target system type" >&5
1431 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1432 if test "${ac_cv_target+set}" = set; then
1433   echo $ECHO_N "(cached) $ECHO_C" >&6
1434 else
1435   ac_cv_target_alias=$target_alias
1436 test "x$ac_cv_target_alias" = "x" &&
1437   ac_cv_target_alias=$ac_cv_host_alias
1438 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1439   { { echo "$as_me:1439: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1440 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1441    { (exit 1); exit 1; }; }
1442
1443 fi
1444 echo "$as_me:1444: result: $ac_cv_target" >&5
1445 echo "${ECHO_T}$ac_cv_target" >&6
1446 target=$ac_cv_target
1447 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1448 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1449 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1450
1451 # The aliases save the names the user supplied, while $host etc.
1452 # will get canonicalized.
1453 test -n "$target_alias" &&
1454   test "$program_prefix$program_suffix$program_transform_name" = \
1455     NONENONEs,x,x, &&
1456   program_prefix=${target_alias}-
1457         system_name="$host_os"
1458 else
1459         system_name="`(uname -s -r) 2>/dev/null`"
1460         if test -z "$system_name" ; then
1461                 system_name="`(hostname) 2>/dev/null`"
1462         fi
1463 fi
1464 test -n "$system_name" &&
1465 cat >>confdefs.h <<EOF
1466 #define SYSTEM_NAME "$system_name"
1467 EOF
1468
1469 if test "${cf_cv_system_name+set}" = set; then
1470   echo $ECHO_N "(cached) $ECHO_C" >&6
1471 else
1472   cf_cv_system_name="$system_name"
1473 fi
1474
1475 test -z "$system_name" && system_name="$cf_cv_system_name"
1476 test -n "$cf_cv_system_name" && echo "$as_me:1476: result: Configuring for $cf_cv_system_name" >&5
1477 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1478
1479 if test ".$system_name" != ".$cf_cv_system_name" ; then
1480         echo "$as_me:1480: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1481 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1482         { { echo "$as_me:1482: error: \"Please remove config.cache and try again.\"" >&5
1483 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1484    { (exit 1); exit 1; }; }
1485 fi
1486
1487 # Check whether --with-system-type or --without-system-type was given.
1488 if test "${with_system_type+set}" = set; then
1489   withval="$with_system_type"
1490   { echo "$as_me:1490: WARNING: overriding system type to $withval" >&5
1491 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1492         cf_cv_system_name=$withval
1493         host_os=$withval
1494
1495 fi;
1496
1497 ###     Save the given $CFLAGS to allow user-override.
1498 cf_user_CFLAGS="$CFLAGS"
1499
1500 ###     Default install-location
1501
1502 echo "$as_me:1502: checking for prefix" >&5
1503 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1504 if test "x$prefix" = "xNONE" ; then
1505         case "$cf_cv_system_name" in
1506                 # non-vendor systems don't have a conflict
1507         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1508                 prefix=/usr
1509                 ;;
1510         (*)     prefix=$ac_default_prefix
1511                 ;;
1512         esac
1513 fi
1514 echo "$as_me:1514: result: $prefix" >&5
1515 echo "${ECHO_T}$prefix" >&6
1516
1517 if test "x$prefix" = "xNONE" ; then
1518 echo "$as_me:1518: checking for default include-directory" >&5
1519 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1520 test -n "$verbose" && echo 1>&6
1521 for cf_symbol in \
1522         $includedir \
1523         $includedir/ncurses \
1524         $prefix/include \
1525         $prefix/include/ncurses \
1526         /usr/local/include \
1527         /usr/local/include/ncurses \
1528         /usr/include \
1529         /usr/include/ncurses
1530 do
1531         cf_dir=`eval echo $cf_symbol`
1532         if test -f $cf_dir/curses.h ; then
1533         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1534                 includedir="$cf_symbol"
1535                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1536                 break
1537         fi
1538         fi
1539         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1540 done
1541 echo "$as_me:1541: result: $includedir" >&5
1542 echo "${ECHO_T}$includedir" >&6
1543 fi
1544
1545 ### Defaults for ncurses ABI
1546
1547 case x$cf_cv_abi_version in
1548 (x[6789])
1549         cf_dft_ext_colors=yes
1550         cf_dft_ext_const=yes
1551         cf_dft_ext_mouse=yes
1552         cf_dft_ext_putwin=yes
1553         cf_dft_ext_spfuncs=yes
1554         cf_dft_filter_syms=yes
1555         cf_dft_chtype=uint32_t
1556         cf_dft_mmask_t=uint32_t
1557         cf_dft_interop=yes
1558         cf_dft_tparm_arg=intptr_t
1559         cf_dft_with_lp64=yes
1560         ;;
1561 (*)
1562         cf_dft_ext_colors=no
1563         cf_dft_ext_const=no
1564         cf_dft_ext_mouse=no
1565         cf_dft_ext_putwin=no
1566         cf_dft_ext_spfuncs=no
1567         cf_dft_filter_syms=no
1568         cf_dft_chtype=auto
1569         cf_dft_mmask_t=auto
1570         cf_dft_interop=no
1571         cf_dft_tparm_arg=long
1572         cf_dft_with_lp64=no
1573         ;;
1574 esac
1575
1576 ###     Checks for programs.
1577
1578 # Check whether --with-ada or --without-ada was given.
1579 if test "${with_ada+set}" = set; then
1580   withval="$with_ada"
1581   cf_with_ada=$withval
1582 else
1583   cf_with_ada=yes
1584 fi;
1585 if test "x$cf_with_ada" = xyes
1586 then
1587         cf_PROG_CC="gnatgcc gcc cc"
1588 else
1589         cf_PROG_CC="gcc cc"
1590 fi
1591
1592 ac_ext=c
1593 ac_cpp='$CPP $CPPFLAGS'
1594 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1595 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1596 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1597 ac_main_return=return
1598 if test -n "$ac_tool_prefix"; then
1599   for ac_prog in $cf_PROG_CC
1600   do
1601     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1602 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1603 echo "$as_me:1603: checking for $ac_word" >&5
1604 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1605 if test "${ac_cv_prog_CC+set}" = set; then
1606   echo $ECHO_N "(cached) $ECHO_C" >&6
1607 else
1608   if test -n "$CC"; then
1609   ac_cv_prog_CC="$CC" # Let the user override the test.
1610 else
1611   ac_save_IFS=$IFS; IFS=$ac_path_separator
1612 ac_dummy="$PATH"
1613 for ac_dir in $ac_dummy; do
1614   IFS=$ac_save_IFS
1615   test -z "$ac_dir" && ac_dir=.
1616   $as_executable_p "$ac_dir/$ac_word" || continue
1617 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1618 echo "$as_me:1618: found $ac_dir/$ac_word" >&5
1619 break
1620 done
1621
1622 fi
1623 fi
1624 CC=$ac_cv_prog_CC
1625 if test -n "$CC"; then
1626   echo "$as_me:1626: result: $CC" >&5
1627 echo "${ECHO_T}$CC" >&6
1628 else
1629   echo "$as_me:1629: result: no" >&5
1630 echo "${ECHO_T}no" >&6
1631 fi
1632
1633     test -n "$CC" && break
1634   done
1635 fi
1636 if test -z "$CC"; then
1637   ac_ct_CC=$CC
1638   for ac_prog in $cf_PROG_CC
1639 do
1640   # Extract the first word of "$ac_prog", so it can be a program name with args.
1641 set dummy $ac_prog; ac_word=$2
1642 echo "$as_me:1642: checking for $ac_word" >&5
1643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1644 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1645   echo $ECHO_N "(cached) $ECHO_C" >&6
1646 else
1647   if test -n "$ac_ct_CC"; then
1648   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1649 else
1650   ac_save_IFS=$IFS; IFS=$ac_path_separator
1651 ac_dummy="$PATH"
1652 for ac_dir in $ac_dummy; do
1653   IFS=$ac_save_IFS
1654   test -z "$ac_dir" && ac_dir=.
1655   $as_executable_p "$ac_dir/$ac_word" || continue
1656 ac_cv_prog_ac_ct_CC="$ac_prog"
1657 echo "$as_me:1657: found $ac_dir/$ac_word" >&5
1658 break
1659 done
1660
1661 fi
1662 fi
1663 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1664 if test -n "$ac_ct_CC"; then
1665   echo "$as_me:1665: result: $ac_ct_CC" >&5
1666 echo "${ECHO_T}$ac_ct_CC" >&6
1667 else
1668   echo "$as_me:1668: result: no" >&5
1669 echo "${ECHO_T}no" >&6
1670 fi
1671
1672   test -n "$ac_ct_CC" && break
1673 done
1674
1675   CC=$ac_ct_CC
1676 fi
1677
1678 test -z "$CC" && { { echo "$as_me:1678: error: no acceptable cc found in \$PATH" >&5
1679 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1680    { (exit 1); exit 1; }; }
1681
1682 # Provide some information about the compiler.
1683 echo "$as_me:1683:" \
1684      "checking for C compiler version" >&5
1685 ac_compiler=`set X $ac_compile; echo $2`
1686 { (eval echo "$as_me:1686: \"$ac_compiler --version </dev/null >&5\"") >&5
1687   (eval $ac_compiler --version </dev/null >&5) 2>&5
1688   ac_status=$?
1689   echo "$as_me:1689: \$? = $ac_status" >&5
1690   (exit $ac_status); }
1691 { (eval echo "$as_me:1691: \"$ac_compiler -v </dev/null >&5\"") >&5
1692   (eval $ac_compiler -v </dev/null >&5) 2>&5
1693   ac_status=$?
1694   echo "$as_me:1694: \$? = $ac_status" >&5
1695   (exit $ac_status); }
1696 { (eval echo "$as_me:1696: \"$ac_compiler -V </dev/null >&5\"") >&5
1697   (eval $ac_compiler -V </dev/null >&5) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }
1701
1702 cat >conftest.$ac_ext <<_ACEOF
1703 #line 1703 "configure"
1704 #include "confdefs.h"
1705
1706 int
1707 main (void)
1708 {
1709
1710   ;
1711   return 0;
1712 }
1713 _ACEOF
1714 ac_clean_files_save=$ac_clean_files
1715 ac_clean_files="$ac_clean_files a.out a.exe"
1716 # Try to create an executable without -o first, disregard a.out.
1717 # It will help us diagnose broken compilers, and finding out an intuition
1718 # of exeext.
1719 echo "$as_me:1719: checking for C compiler default output" >&5
1720 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1721 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1722 if { (eval echo "$as_me:1722: \"$ac_link_default\"") >&5
1723   (eval $ac_link_default) 2>&5
1724   ac_status=$?
1725   echo "$as_me:1725: \$? = $ac_status" >&5
1726   (exit $ac_status); }; then
1727   # Find the output, starting from the most likely.  This scheme is
1728 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1729 # resort.
1730 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1731                 ls a.out conftest 2>/dev/null;
1732                 ls a.* conftest.* 2>/dev/null`; do
1733   case $ac_file in
1734     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1735     a.out ) # We found the default executable, but exeext='' is most
1736             # certainly right.
1737             break;;
1738     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1739           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1740           export ac_cv_exeext
1741           break;;
1742     * ) break;;
1743   esac
1744 done
1745 else
1746   echo "$as_me: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 { { echo "$as_me:1748: error: C compiler cannot create executables" >&5
1749 echo "$as_me: error: C compiler cannot create executables" >&2;}
1750    { (exit 77); exit 77; }; }
1751 fi
1752
1753 ac_exeext=$ac_cv_exeext
1754 echo "$as_me:1754: result: $ac_file" >&5
1755 echo "${ECHO_T}$ac_file" >&6
1756
1757 # Check the compiler produces executables we can run.  If not, either
1758 # the compiler is broken, or we cross compile.
1759 echo "$as_me:1759: checking whether the C compiler works" >&5
1760 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1761 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1762 # If not cross compiling, check that we can run a simple program.
1763 if test "$cross_compiling" != yes; then
1764   if { ac_try='./$ac_file'
1765   { (eval echo "$as_me:1765: \"$ac_try\"") >&5
1766   (eval $ac_try) 2>&5
1767   ac_status=$?
1768   echo "$as_me:1768: \$? = $ac_status" >&5
1769   (exit $ac_status); }; }; then
1770     cross_compiling=no
1771   else
1772     if test "$cross_compiling" = maybe; then
1773         cross_compiling=yes
1774     else
1775         { { echo "$as_me:1775: error: cannot run C compiled programs.
1776 If you meant to cross compile, use \`--host'." >&5
1777 echo "$as_me: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&2;}
1779    { (exit 1); exit 1; }; }
1780     fi
1781   fi
1782 fi
1783 echo "$as_me:1783: result: yes" >&5
1784 echo "${ECHO_T}yes" >&6
1785
1786 rm -f a.out a.exe conftest$ac_cv_exeext
1787 ac_clean_files=$ac_clean_files_save
1788 # Check the compiler produces executables we can run.  If not, either
1789 # the compiler is broken, or we cross compile.
1790 echo "$as_me:1790: checking whether we are cross compiling" >&5
1791 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1792 echo "$as_me:1792: result: $cross_compiling" >&5
1793 echo "${ECHO_T}$cross_compiling" >&6
1794
1795 echo "$as_me:1795: checking for executable suffix" >&5
1796 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1797 if { (eval echo "$as_me:1797: \"$ac_link\"") >&5
1798   (eval $ac_link) 2>&5
1799   ac_status=$?
1800   echo "$as_me:1800: \$? = $ac_status" >&5
1801   (exit $ac_status); }; then
1802   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1803 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1804 # work properly (i.e., refer to `conftest.exe'), while it won't with
1805 # `rm'.
1806 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1807   case $ac_file in
1808     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1809     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1810           export ac_cv_exeext
1811           break;;
1812     * ) break;;
1813   esac
1814 done
1815 else
1816   { { echo "$as_me:1816: error: cannot compute EXEEXT: cannot compile and link" >&5
1817 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1818    { (exit 1); exit 1; }; }
1819 fi
1820
1821 rm -f conftest$ac_cv_exeext
1822 echo "$as_me:1822: result: $ac_cv_exeext" >&5
1823 echo "${ECHO_T}$ac_cv_exeext" >&6
1824
1825 rm -f conftest.$ac_ext
1826 EXEEXT=$ac_cv_exeext
1827 ac_exeext=$EXEEXT
1828 echo "$as_me:1828: checking for object suffix" >&5
1829 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1830 if test "${ac_cv_objext+set}" = set; then
1831   echo $ECHO_N "(cached) $ECHO_C" >&6
1832 else
1833   cat >conftest.$ac_ext <<_ACEOF
1834 #line 1834 "configure"
1835 #include "confdefs.h"
1836
1837 int
1838 main (void)
1839 {
1840
1841   ;
1842   return 0;
1843 }
1844 _ACEOF
1845 rm -f conftest.o conftest.obj
1846 if { (eval echo "$as_me:1846: \"$ac_compile\"") >&5
1847   (eval $ac_compile) 2>&5
1848   ac_status=$?
1849   echo "$as_me:1849: \$? = $ac_status" >&5
1850   (exit $ac_status); }; then
1851   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1852   case $ac_file in
1853     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1854     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1855        break;;
1856   esac
1857 done
1858 else
1859   echo "$as_me: failed program was:" >&5
1860 cat conftest.$ac_ext >&5
1861 { { echo "$as_me:1861: error: cannot compute OBJEXT: cannot compile" >&5
1862 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1863    { (exit 1); exit 1; }; }
1864 fi
1865
1866 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1867 fi
1868 echo "$as_me:1868: result: $ac_cv_objext" >&5
1869 echo "${ECHO_T}$ac_cv_objext" >&6
1870 OBJEXT=$ac_cv_objext
1871 ac_objext=$OBJEXT
1872 echo "$as_me:1872: checking whether we are using the GNU C compiler" >&5
1873 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1874 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   cat >conftest.$ac_ext <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880
1881 int
1882 main (void)
1883 {
1884 #ifndef __GNUC__
1885        choke me
1886 #endif
1887
1888   ;
1889   return 0;
1890 }
1891 _ACEOF
1892 rm -f conftest.$ac_objext
1893 if { (eval echo "$as_me:1893: \"$ac_compile\"") >&5
1894   (eval $ac_compile) 2>&5
1895   ac_status=$?
1896   echo "$as_me:1896: \$? = $ac_status" >&5
1897   (exit $ac_status); } &&
1898          { ac_try='test -s conftest.$ac_objext'
1899   { (eval echo "$as_me:1899: \"$ac_try\"") >&5
1900   (eval $ac_try) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); }; }; then
1904   ac_compiler_gnu=yes
1905 else
1906   echo "$as_me: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 ac_compiler_gnu=no
1909 fi
1910 rm -f conftest.$ac_objext conftest.$ac_ext
1911 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1912
1913 fi
1914 echo "$as_me:1914: result: $ac_cv_c_compiler_gnu" >&5
1915 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1916 GCC=`test $ac_compiler_gnu = yes && echo yes`
1917 ac_test_CFLAGS=${CFLAGS+set}
1918 ac_save_CFLAGS=$CFLAGS
1919 CFLAGS="-g"
1920 echo "$as_me:1920: checking whether $CC accepts -g" >&5
1921 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1922 if test "${ac_cv_prog_cc_g+set}" = set; then
1923   echo $ECHO_N "(cached) $ECHO_C" >&6
1924 else
1925   cat >conftest.$ac_ext <<_ACEOF
1926 #line 1926 "configure"
1927 #include "confdefs.h"
1928
1929 int
1930 main (void)
1931 {
1932
1933   ;
1934   return 0;
1935 }
1936 _ACEOF
1937 rm -f conftest.$ac_objext
1938 if { (eval echo "$as_me:1938: \"$ac_compile\"") >&5
1939   (eval $ac_compile) 2>&5
1940   ac_status=$?
1941   echo "$as_me:1941: \$? = $ac_status" >&5
1942   (exit $ac_status); } &&
1943          { ac_try='test -s conftest.$ac_objext'
1944   { (eval echo "$as_me:1944: \"$ac_try\"") >&5
1945   (eval $ac_try) 2>&5
1946   ac_status=$?
1947   echo "$as_me:1947: \$? = $ac_status" >&5
1948   (exit $ac_status); }; }; then
1949   ac_cv_prog_cc_g=yes
1950 else
1951   echo "$as_me: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1953 ac_cv_prog_cc_g=no
1954 fi
1955 rm -f conftest.$ac_objext conftest.$ac_ext
1956 fi
1957 echo "$as_me:1957: result: $ac_cv_prog_cc_g" >&5
1958 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1959 if test "$ac_test_CFLAGS" = set; then
1960   CFLAGS=$ac_save_CFLAGS
1961 elif test $ac_cv_prog_cc_g = yes; then
1962   if test "$GCC" = yes; then
1963     CFLAGS="-g -O2"
1964   else
1965     CFLAGS="-g"
1966   fi
1967 else
1968   if test "$GCC" = yes; then
1969     CFLAGS="-O2"
1970   else
1971     CFLAGS=
1972   fi
1973 fi
1974 # Some people use a C++ compiler to compile C.  Since we use `exit',
1975 # in C++ we need to declare it.  In case someone uses the same compiler
1976 # for both compiling C and C++ we need to have the C++ compiler decide
1977 # the declaration of exit, since it's the most demanding environment.
1978 cat >conftest.$ac_ext <<_ACEOF
1979 #ifndef __cplusplus
1980   choke me
1981 #endif
1982 _ACEOF
1983 rm -f conftest.$ac_objext
1984 if { (eval echo "$as_me:1984: \"$ac_compile\"") >&5
1985   (eval $ac_compile) 2>&5
1986   ac_status=$?
1987   echo "$as_me:1987: \$? = $ac_status" >&5
1988   (exit $ac_status); } &&
1989          { ac_try='test -s conftest.$ac_objext'
1990   { (eval echo "$as_me:1990: \"$ac_try\"") >&5
1991   (eval $ac_try) 2>&5
1992   ac_status=$?
1993   echo "$as_me:1993: \$? = $ac_status" >&5
1994   (exit $ac_status); }; }; then
1995   for ac_declaration in \
1996    ''\
1997    '#include <stdlib.h>' \
1998    'extern "C" void std::exit (int) throw (); using std::exit;' \
1999    'extern "C" void std::exit (int); using std::exit;' \
2000    'extern "C" void exit (int) throw ();' \
2001    'extern "C" void exit (int);' \
2002    'void exit (int);'
2003 do
2004   cat >conftest.$ac_ext <<_ACEOF
2005 #line 2005 "configure"
2006 #include "confdefs.h"
2007 #include <stdlib.h>
2008 $ac_declaration
2009 int
2010 main (void)
2011 {
2012 exit (42);
2013   ;
2014   return 0;
2015 }
2016 _ACEOF
2017 rm -f conftest.$ac_objext
2018 if { (eval echo "$as_me:2018: \"$ac_compile\"") >&5
2019   (eval $ac_compile) 2>&5
2020   ac_status=$?
2021   echo "$as_me:2021: \$? = $ac_status" >&5
2022   (exit $ac_status); } &&
2023          { ac_try='test -s conftest.$ac_objext'
2024   { (eval echo "$as_me:2024: \"$ac_try\"") >&5
2025   (eval $ac_try) 2>&5
2026   ac_status=$?
2027   echo "$as_me:2027: \$? = $ac_status" >&5
2028   (exit $ac_status); }; }; then
2029   :
2030 else
2031   echo "$as_me: failed program was:" >&5
2032 cat conftest.$ac_ext >&5
2033 continue
2034 fi
2035 rm -f conftest.$ac_objext conftest.$ac_ext
2036   cat >conftest.$ac_ext <<_ACEOF
2037 #line 2037 "configure"
2038 #include "confdefs.h"
2039 $ac_declaration
2040 int
2041 main (void)
2042 {
2043 exit (42);
2044   ;
2045   return 0;
2046 }
2047 _ACEOF
2048 rm -f conftest.$ac_objext
2049 if { (eval echo "$as_me:2049: \"$ac_compile\"") >&5
2050   (eval $ac_compile) 2>&5
2051   ac_status=$?
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); } &&
2054          { ac_try='test -s conftest.$ac_objext'
2055   { (eval echo "$as_me:2055: \"$ac_try\"") >&5
2056   (eval $ac_try) 2>&5
2057   ac_status=$?
2058   echo "$as_me:2058: \$? = $ac_status" >&5
2059   (exit $ac_status); }; }; then
2060   break
2061 else
2062   echo "$as_me: failed program was:" >&5
2063 cat conftest.$ac_ext >&5
2064 fi
2065 rm -f conftest.$ac_objext conftest.$ac_ext
2066 done
2067 rm -rf conftest*
2068 if test -n "$ac_declaration"; then
2069   echo '#ifdef __cplusplus' >>confdefs.h
2070   echo $ac_declaration      >>confdefs.h
2071   echo '#endif'             >>confdefs.h
2072 fi
2073
2074 else
2075   echo "$as_me: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 fi
2078 rm -f conftest.$ac_objext conftest.$ac_ext
2079 ac_ext=c
2080 ac_cpp='$CPP $CPPFLAGS'
2081 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2082 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2083 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2084 ac_main_return=return
2085
2086 GCC_VERSION=none
2087 if test "$GCC" = yes ; then
2088         echo "$as_me:2088: checking version of $CC" >&5
2089 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2090         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.].*//'`"
2091         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2092         echo "$as_me:2092: result: $GCC_VERSION" >&5
2093 echo "${ECHO_T}$GCC_VERSION" >&6
2094 fi
2095
2096 echo "$as_me:2096: checking for $CC option to accept ANSI C" >&5
2097 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2098 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2099   echo $ECHO_N "(cached) $ECHO_C" >&6
2100 else
2101   ac_cv_prog_cc_stdc=no
2102 ac_save_CC=$CC
2103 cat >conftest.$ac_ext <<_ACEOF
2104 #line 2104 "configure"
2105 #include "confdefs.h"
2106 #include <stdarg.h>
2107 #include <stdio.h>
2108 #include <sys/types.h>
2109 #include <sys/stat.h>
2110 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2111 struct buf { int x; };
2112 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2113 static char *e (p, i)
2114      char **p;
2115      int i;
2116 {
2117   return p[i];
2118 }
2119 static char *f (char * (*g) (char **, int), char **p, ...)
2120 {
2121   char *s;
2122   va_list v;
2123   va_start (v,p);
2124   s = g (p, va_arg (v,int));
2125   va_end (v);
2126   return s;
2127 }
2128 int test (int i, double x);
2129 struct s1 {int (*f) (int a);};
2130 struct s2 {int (*f) (double a);};
2131 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2132 int argc;
2133 char **argv;
2134 int
2135 main (void)
2136 {
2137 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2138   ;
2139   return 0;
2140 }
2141 _ACEOF
2142 # Don't try gcc -ansi; that turns off useful extensions and
2143 # breaks some systems' header files.
2144 # AIX                   -qlanglvl=ansi
2145 # Ultrix and OSF/1      -std1
2146 # HP-UX 10.20 and later -Ae
2147 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2148 # SVR4                  -Xc -D__EXTENSIONS__
2149 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2150 do
2151   CC="$ac_save_CC $ac_arg"
2152   rm -f conftest.$ac_objext
2153 if { (eval echo "$as_me:2153: \"$ac_compile\"") >&5
2154   (eval $ac_compile) 2>&5
2155   ac_status=$?
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); } &&
2158          { ac_try='test -s conftest.$ac_objext'
2159   { (eval echo "$as_me:2159: \"$ac_try\"") >&5
2160   (eval $ac_try) 2>&5
2161   ac_status=$?
2162   echo "$as_me:2162: \$? = $ac_status" >&5
2163   (exit $ac_status); }; }; then
2164   ac_cv_prog_cc_stdc=$ac_arg
2165 break
2166 else
2167   echo "$as_me: failed program was:" >&5
2168 cat conftest.$ac_ext >&5
2169 fi
2170 rm -f conftest.$ac_objext
2171 done
2172 rm -f conftest.$ac_ext conftest.$ac_objext
2173 CC=$ac_save_CC
2174
2175 fi
2176
2177 case "x$ac_cv_prog_cc_stdc" in
2178   x|xno)
2179     echo "$as_me:2179: result: none needed" >&5
2180 echo "${ECHO_T}none needed" >&6 ;;
2181   *)
2182     echo "$as_me:2182: result: $ac_cv_prog_cc_stdc" >&5
2183 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2184     CC="$CC $ac_cv_prog_cc_stdc" ;;
2185 esac
2186
2187 # This should have been defined by AC_PROG_CC
2188 : ${CC:=cc}
2189
2190 echo "$as_me:2190: checking \$CC variable" >&5
2191 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2192 case "$CC" in
2193 (*[\ \  ]-*)
2194         echo "$as_me:2194: result: broken" >&5
2195 echo "${ECHO_T}broken" >&6
2196         { echo "$as_me:2196: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2197 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2198         # humor him...
2199         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2200         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2201         CC="$cf_prog"
2202         for cf_arg in $cf_flags
2203         do
2204                 case "x$cf_arg" in
2205                 (x-[IUDfgOW]*)
2206
2207 cf_fix_cppflags=no
2208 cf_new_cflags=
2209 cf_new_cppflags=
2210 cf_new_extra_cppflags=
2211
2212 for cf_add_cflags in $cf_arg
2213 do
2214 case $cf_fix_cppflags in
2215 (no)
2216         case $cf_add_cflags in
2217         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2218                 case $cf_add_cflags in
2219                 (-D*)
2220                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2221
2222                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2223                                 && test -z "${cf_tst_cflags}" \
2224                                 && cf_fix_cppflags=yes
2225
2226                         if test $cf_fix_cppflags = yes ; then
2227
2228         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2229         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2230
2231                                 continue
2232                         elif test "${cf_tst_cflags}" = "\"'" ; then
2233
2234         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2235         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2236
2237                                 continue
2238                         fi
2239                         ;;
2240                 esac
2241                 case "$CPPFLAGS" in
2242                 (*$cf_add_cflags)
2243                         ;;
2244                 (*)
2245                         case $cf_add_cflags in
2246                         (-D*)
2247                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2248
2249 CPPFLAGS=`echo "$CPPFLAGS" | \
2250         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2251                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2252
2253                                 ;;
2254                         esac
2255
2256         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2257         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2258
2259                         ;;
2260                 esac
2261                 ;;
2262         (*)
2263
2264         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2265         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2266
2267                 ;;
2268         esac
2269         ;;
2270 (yes)
2271
2272         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2273         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2274
2275         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2276
2277         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2278                 && test -z "${cf_tst_cflags}" \
2279                 && cf_fix_cppflags=no
2280         ;;
2281 esac
2282 done
2283
2284 if test -n "$cf_new_cflags" ; then
2285
2286         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2287         CFLAGS="${CFLAGS}$cf_new_cflags"
2288
2289 fi
2290
2291 if test -n "$cf_new_cppflags" ; then
2292
2293         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2294         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2295
2296 fi
2297
2298 if test -n "$cf_new_extra_cppflags" ; then
2299
2300         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2301         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2302
2303 fi
2304
2305                         ;;
2306                 (*)
2307                         CC="$CC $cf_arg"
2308                         ;;
2309                 esac
2310         done
2311         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2312
2313 echo "${as_me:-configure}:2313: testing resulting CC: '$CC' ..." 1>&5
2314
2315         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2316
2317 echo "${as_me:-configure}:2317: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2318
2319         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2320
2321 echo "${as_me:-configure}:2321: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2322
2323         ;;
2324 (*)
2325         echo "$as_me:2325: result: ok" >&5
2326 echo "${ECHO_T}ok" >&6
2327         ;;
2328 esac
2329
2330 ac_ext=c
2331 ac_cpp='$CPP $CPPFLAGS'
2332 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2333 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2334 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2335 ac_main_return=return
2336 echo "$as_me:2336: checking how to run the C preprocessor" >&5
2337 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2338 # On Suns, sometimes $CPP names a directory.
2339 if test -n "$CPP" && test -d "$CPP"; then
2340   CPP=
2341 fi
2342 if test -z "$CPP"; then
2343   if test "${ac_cv_prog_CPP+set}" = set; then
2344   echo $ECHO_N "(cached) $ECHO_C" >&6
2345 else
2346       # Double quotes because CPP needs to be expanded
2347     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2348     do
2349       ac_preproc_ok=false
2350 for ac_c_preproc_warn_flag in '' yes
2351 do
2352   # Use a header file that comes with gcc, so configuring glibc
2353   # with a fresh cross-compiler works.
2354   # On the NeXT, cc -E runs the code through the compiler's parser,
2355   # not just through cpp. "Syntax error" is here to catch this case.
2356   cat >conftest.$ac_ext <<_ACEOF
2357 #line 2357 "configure"
2358 #include "confdefs.h"
2359 #include <assert.h>
2360                      Syntax error
2361 _ACEOF
2362 if { (eval echo "$as_me:2362: \"$ac_cpp conftest.$ac_ext\"") >&5
2363   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2364   ac_status=$?
2365   egrep -v '^ *\+' conftest.er1 >conftest.err
2366   rm -f conftest.er1
2367   cat conftest.err >&5
2368   echo "$as_me:2368: \$? = $ac_status" >&5
2369   (exit $ac_status); } >/dev/null; then
2370   if test -s conftest.err; then
2371     ac_cpp_err=$ac_c_preproc_warn_flag
2372   else
2373     ac_cpp_err=
2374   fi
2375 else
2376   ac_cpp_err=yes
2377 fi
2378 if test -z "$ac_cpp_err"; then
2379   :
2380 else
2381   echo "$as_me: failed program was:" >&5
2382   cat conftest.$ac_ext >&5
2383   # Broken: fails on valid input.
2384 continue
2385 fi
2386 rm -f conftest.err conftest.$ac_ext
2387
2388   # OK, works on sane cases.  Now check whether non-existent headers
2389   # can be detected and how.
2390   cat >conftest.$ac_ext <<_ACEOF
2391 #line 2391 "configure"
2392 #include "confdefs.h"
2393 #include <ac_nonexistent.h>
2394 _ACEOF
2395 if { (eval echo "$as_me:2395: \"$ac_cpp conftest.$ac_ext\"") >&5
2396   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2397   ac_status=$?
2398   egrep -v '^ *\+' conftest.er1 >conftest.err
2399   rm -f conftest.er1
2400   cat conftest.err >&5
2401   echo "$as_me:2401: \$? = $ac_status" >&5
2402   (exit $ac_status); } >/dev/null; then
2403   if test -s conftest.err; then
2404     ac_cpp_err=$ac_c_preproc_warn_flag
2405   else
2406     ac_cpp_err=
2407   fi
2408 else
2409   ac_cpp_err=yes
2410 fi
2411 if test -z "$ac_cpp_err"; then
2412   # Broken: success on invalid input.
2413 continue
2414 else
2415   echo "$as_me: failed program was:" >&5
2416   cat conftest.$ac_ext >&5
2417   # Passes both tests.
2418 ac_preproc_ok=:
2419 break
2420 fi
2421 rm -f conftest.err conftest.$ac_ext
2422
2423 done
2424 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2425 rm -f conftest.err conftest.$ac_ext
2426 if $ac_preproc_ok; then
2427   break
2428 fi
2429
2430     done
2431     ac_cv_prog_CPP=$CPP
2432
2433 fi
2434   CPP=$ac_cv_prog_CPP
2435 else
2436   ac_cv_prog_CPP=$CPP
2437 fi
2438 echo "$as_me:2438: result: $CPP" >&5
2439 echo "${ECHO_T}$CPP" >&6
2440 ac_preproc_ok=false
2441 for ac_c_preproc_warn_flag in '' yes
2442 do
2443   # Use a header file that comes with gcc, so configuring glibc
2444   # with a fresh cross-compiler works.
2445   # On the NeXT, cc -E runs the code through the compiler's parser,
2446   # not just through cpp. "Syntax error" is here to catch this case.
2447   cat >conftest.$ac_ext <<_ACEOF
2448 #line 2448 "configure"
2449 #include "confdefs.h"
2450 #include <assert.h>
2451                      Syntax error
2452 _ACEOF
2453 if { (eval echo "$as_me:2453: \"$ac_cpp conftest.$ac_ext\"") >&5
2454   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2455   ac_status=$?
2456   egrep -v '^ *\+' conftest.er1 >conftest.err
2457   rm -f conftest.er1
2458   cat conftest.err >&5
2459   echo "$as_me:2459: \$? = $ac_status" >&5
2460   (exit $ac_status); } >/dev/null; then
2461   if test -s conftest.err; then
2462     ac_cpp_err=$ac_c_preproc_warn_flag
2463   else
2464     ac_cpp_err=
2465   fi
2466 else
2467   ac_cpp_err=yes
2468 fi
2469 if test -z "$ac_cpp_err"; then
2470   :
2471 else
2472   echo "$as_me: failed program was:" >&5
2473   cat conftest.$ac_ext >&5
2474   # Broken: fails on valid input.
2475 continue
2476 fi
2477 rm -f conftest.err conftest.$ac_ext
2478
2479   # OK, works on sane cases.  Now check whether non-existent headers
2480   # can be detected and how.
2481   cat >conftest.$ac_ext <<_ACEOF
2482 #line 2482 "configure"
2483 #include "confdefs.h"
2484 #include <ac_nonexistent.h>
2485 _ACEOF
2486 if { (eval echo "$as_me:2486: \"$ac_cpp conftest.$ac_ext\"") >&5
2487   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2488   ac_status=$?
2489   egrep -v '^ *\+' conftest.er1 >conftest.err
2490   rm -f conftest.er1
2491   cat conftest.err >&5
2492   echo "$as_me:2492: \$? = $ac_status" >&5
2493   (exit $ac_status); } >/dev/null; then
2494   if test -s conftest.err; then
2495     ac_cpp_err=$ac_c_preproc_warn_flag
2496   else
2497     ac_cpp_err=
2498   fi
2499 else
2500   ac_cpp_err=yes
2501 fi
2502 if test -z "$ac_cpp_err"; then
2503   # Broken: success on invalid input.
2504 continue
2505 else
2506   echo "$as_me: failed program was:" >&5
2507   cat conftest.$ac_ext >&5
2508   # Passes both tests.
2509 ac_preproc_ok=:
2510 break
2511 fi
2512 rm -f conftest.err conftest.$ac_ext
2513
2514 done
2515 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2516 rm -f conftest.err conftest.$ac_ext
2517 if $ac_preproc_ok; then
2518   :
2519 else
2520   { { echo "$as_me:2520: error: C preprocessor \"$CPP\" fails sanity check" >&5
2521 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2522    { (exit 1); exit 1; }; }
2523 fi
2524
2525 ac_ext=c
2526 ac_cpp='$CPP $CPPFLAGS'
2527 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2528 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2529 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2530 ac_main_return=return
2531
2532 if test $ac_cv_c_compiler_gnu = yes; then
2533     echo "$as_me:2533: checking whether $CC needs -traditional" >&5
2534 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2535 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2536   echo $ECHO_N "(cached) $ECHO_C" >&6
2537 else
2538     ac_pattern="Autoconf.*'x'"
2539   cat >conftest.$ac_ext <<_ACEOF
2540 #line 2540 "configure"
2541 #include "confdefs.h"
2542 #include <sgtty.h>
2543 int Autoconf = TIOCGETP;
2544 _ACEOF
2545 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2546   egrep "$ac_pattern" >/dev/null 2>&1; then
2547   ac_cv_prog_gcc_traditional=yes
2548 else
2549   ac_cv_prog_gcc_traditional=no
2550 fi
2551 rm -rf conftest*
2552
2553   if test $ac_cv_prog_gcc_traditional = no; then
2554     cat >conftest.$ac_ext <<_ACEOF
2555 #line 2555 "configure"
2556 #include "confdefs.h"
2557 #include <termio.h>
2558 int Autoconf = TCGETA;
2559 _ACEOF
2560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2561   egrep "$ac_pattern" >/dev/null 2>&1; then
2562   ac_cv_prog_gcc_traditional=yes
2563 fi
2564 rm -rf conftest*
2565
2566   fi
2567 fi
2568 echo "$as_me:2568: result: $ac_cv_prog_gcc_traditional" >&5
2569 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2570   if test $ac_cv_prog_gcc_traditional = yes; then
2571     CC="$CC -traditional"
2572   fi
2573 fi
2574
2575 echo "$as_me:2575: checking whether $CC understands -c and -o together" >&5
2576 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2577 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2578   echo $ECHO_N "(cached) $ECHO_C" >&6
2579 else
2580
2581 cat > conftest.$ac_ext <<CF_EOF
2582 int main(void)
2583 {
2584         ${cf_cv_main_return:-return}(0);
2585 }
2586 CF_EOF
2587 # We do the test twice because some compilers refuse to overwrite an
2588 # existing .o file with -o, though they will create one.
2589 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2590 if { (eval echo "$as_me:2590: \"$ac_try\"") >&5
2591   (eval $ac_try) 2>&5
2592   ac_status=$?
2593   echo "$as_me:2593: \$? = $ac_status" >&5
2594   (exit $ac_status); } &&
2595   test -f conftest2.$ac_objext && { (eval echo "$as_me:2595: \"$ac_try\"") >&5
2596   (eval $ac_try) 2>&5
2597   ac_status=$?
2598   echo "$as_me:2598: \$? = $ac_status" >&5
2599   (exit $ac_status); };
2600 then
2601   eval cf_cv_prog_CC_c_o=yes
2602 else
2603   eval cf_cv_prog_CC_c_o=no
2604 fi
2605 rm -rf conftest*
2606
2607 fi
2608 if test $cf_cv_prog_CC_c_o = yes; then
2609   echo "$as_me:2609: result: yes" >&5
2610 echo "${ECHO_T}yes" >&6
2611 else
2612   echo "$as_me:2612: result: no" >&5
2613 echo "${ECHO_T}no" >&6
2614 fi
2615
2616 if test "$cross_compiling" = yes ; then
2617         LDCONFIG=:
2618 else
2619         case "$cf_cv_system_name" in
2620         (dragonfly*|mirbsd*|freebsd*)
2621                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2622                 ;;
2623         (*) LDPATH=$PATH:/sbin:/usr/sbin
2624                 # Extract the first word of "ldconfig", so it can be a program name with args.
2625 set dummy ldconfig; ac_word=$2
2626 echo "$as_me:2626: checking for $ac_word" >&5
2627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2628 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2629   echo $ECHO_N "(cached) $ECHO_C" >&6
2630 else
2631   case $LDCONFIG in
2632   [\\/]* | ?:[\\/]*)
2633   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2634   ;;
2635   *)
2636   ac_save_IFS=$IFS; IFS=$ac_path_separator
2637 ac_dummy="$LDPATH"
2638 for ac_dir in $ac_dummy; do
2639   IFS=$ac_save_IFS
2640   test -z "$ac_dir" && ac_dir=.
2641   if $as_executable_p "$ac_dir/$ac_word"; then
2642    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2643    echo "$as_me:2643: found $ac_dir/$ac_word" >&5
2644    break
2645 fi
2646 done
2647
2648   ;;
2649 esac
2650 fi
2651 LDCONFIG=$ac_cv_path_LDCONFIG
2652
2653 if test -n "$LDCONFIG"; then
2654   echo "$as_me:2654: result: $LDCONFIG" >&5
2655 echo "${ECHO_T}$LDCONFIG" >&6
2656 else
2657   echo "$as_me:2657: result: no" >&5
2658 echo "${ECHO_T}no" >&6
2659 fi
2660
2661                 ;;
2662         esac
2663 fi
2664
2665 echo "$as_me:2665: checking if you want to ensure bool is consistent with C++" >&5
2666 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2667
2668 # Check whether --with-cxx or --without-cxx was given.
2669 if test "${with_cxx+set}" = set; then
2670   withval="$with_cxx"
2671   cf_with_cxx=$withval
2672 else
2673   cf_with_cxx=yes
2674 fi;
2675 echo "$as_me:2675: result: $cf_with_cxx" >&5
2676 echo "${ECHO_T}$cf_with_cxx" >&6
2677 if test "X$cf_with_cxx" = Xno ; then
2678         CXX=""
2679         GXX=""
2680 else
2681         # with autoconf 2.13, we can change the error to a warning:
2682                 ac_ext=cc
2683 ac_cpp='$CXXCPP $CPPFLAGS'
2684 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2687 ac_main_return=return
2688 if test -n "$ac_tool_prefix"; then
2689   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2690   do
2691     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2692 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2693 echo "$as_me:2693: checking for $ac_word" >&5
2694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2695 if test "${ac_cv_prog_CXX+set}" = set; then
2696   echo $ECHO_N "(cached) $ECHO_C" >&6
2697 else
2698   if test -n "$CXX"; then
2699   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2700 else
2701   ac_save_IFS=$IFS; IFS=$ac_path_separator
2702 ac_dummy="$PATH"
2703 for ac_dir in $ac_dummy; do
2704   IFS=$ac_save_IFS
2705   test -z "$ac_dir" && ac_dir=.
2706   $as_executable_p "$ac_dir/$ac_word" || continue
2707 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2708 echo "$as_me:2708: found $ac_dir/$ac_word" >&5
2709 break
2710 done
2711
2712 fi
2713 fi
2714 CXX=$ac_cv_prog_CXX
2715 if test -n "$CXX"; then
2716   echo "$as_me:2716: result: $CXX" >&5
2717 echo "${ECHO_T}$CXX" >&6
2718 else
2719   echo "$as_me:2719: result: no" >&5
2720 echo "${ECHO_T}no" >&6
2721 fi
2722
2723     test -n "$CXX" && break
2724   done
2725 fi
2726 if test -z "$CXX"; then
2727   ac_ct_CXX=$CXX
2728   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2729 do
2730   # Extract the first word of "$ac_prog", so it can be a program name with args.
2731 set dummy $ac_prog; ac_word=$2
2732 echo "$as_me:2732: checking for $ac_word" >&5
2733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2734 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2735   echo $ECHO_N "(cached) $ECHO_C" >&6
2736 else
2737   if test -n "$ac_ct_CXX"; then
2738   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2739 else
2740   ac_save_IFS=$IFS; IFS=$ac_path_separator
2741 ac_dummy="$PATH"
2742 for ac_dir in $ac_dummy; do
2743   IFS=$ac_save_IFS
2744   test -z "$ac_dir" && ac_dir=.
2745   $as_executable_p "$ac_dir/$ac_word" || continue
2746 ac_cv_prog_ac_ct_CXX="$ac_prog"
2747 echo "$as_me:2747: found $ac_dir/$ac_word" >&5
2748 break
2749 done
2750
2751 fi
2752 fi
2753 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2754 if test -n "$ac_ct_CXX"; then
2755   echo "$as_me:2755: result: $ac_ct_CXX" >&5
2756 echo "${ECHO_T}$ac_ct_CXX" >&6
2757 else
2758   echo "$as_me:2758: result: no" >&5
2759 echo "${ECHO_T}no" >&6
2760 fi
2761
2762   test -n "$ac_ct_CXX" && break
2763 done
2764 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2765
2766   CXX=$ac_ct_CXX
2767 fi
2768
2769 # Provide some information about the compiler.
2770 echo "$as_me:2770:" \
2771      "checking for C++ compiler version" >&5
2772 ac_compiler=`set X $ac_compile; echo $2`
2773 { (eval echo "$as_me:2773: \"$ac_compiler --version </dev/null >&5\"") >&5
2774   (eval $ac_compiler --version </dev/null >&5) 2>&5
2775   ac_status=$?
2776   echo "$as_me:2776: \$? = $ac_status" >&5
2777   (exit $ac_status); }
2778 { (eval echo "$as_me:2778: \"$ac_compiler -v </dev/null >&5\"") >&5
2779   (eval $ac_compiler -v </dev/null >&5) 2>&5
2780   ac_status=$?
2781   echo "$as_me:2781: \$? = $ac_status" >&5
2782   (exit $ac_status); }
2783 { (eval echo "$as_me:2783: \"$ac_compiler -V </dev/null >&5\"") >&5
2784   (eval $ac_compiler -V </dev/null >&5) 2>&5
2785   ac_status=$?
2786   echo "$as_me:2786: \$? = $ac_status" >&5
2787   (exit $ac_status); }
2788
2789 echo "$as_me:2789: checking whether we are using the GNU C++ compiler" >&5
2790 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2791 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2792   echo $ECHO_N "(cached) $ECHO_C" >&6
2793 else
2794   cat >conftest.$ac_ext <<_ACEOF
2795 #line 2795 "configure"
2796 #include "confdefs.h"
2797
2798 int
2799 main (void)
2800 {
2801 #ifndef __GNUC__
2802        choke me
2803 #endif
2804
2805   ;
2806   return 0;
2807 }
2808 _ACEOF
2809 rm -f conftest.$ac_objext
2810 if { (eval echo "$as_me:2810: \"$ac_compile\"") >&5
2811   (eval $ac_compile) 2>&5
2812   ac_status=$?
2813   echo "$as_me:2813: \$? = $ac_status" >&5
2814   (exit $ac_status); } &&
2815          { ac_try='test -s conftest.$ac_objext'
2816   { (eval echo "$as_me:2816: \"$ac_try\"") >&5
2817   (eval $ac_try) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); }; }; then
2821   ac_compiler_gnu=yes
2822 else
2823   echo "$as_me: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2825 ac_compiler_gnu=no
2826 fi
2827 rm -f conftest.$ac_objext conftest.$ac_ext
2828 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2829
2830 fi
2831 echo "$as_me:2831: result: $ac_cv_cxx_compiler_gnu" >&5
2832 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2833 GXX=`test $ac_compiler_gnu = yes && echo yes`
2834 ac_test_CXXFLAGS=${CXXFLAGS+set}
2835 ac_save_CXXFLAGS=$CXXFLAGS
2836 CXXFLAGS="-g"
2837 echo "$as_me:2837: checking whether $CXX accepts -g" >&5
2838 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2839 if test "${ac_cv_prog_cxx_g+set}" = set; then
2840   echo $ECHO_N "(cached) $ECHO_C" >&6
2841 else
2842   cat >conftest.$ac_ext <<_ACEOF
2843 #line 2843 "configure"
2844 #include "confdefs.h"
2845
2846 int
2847 main (void)
2848 {
2849
2850   ;
2851   return 0;
2852 }
2853 _ACEOF
2854 rm -f conftest.$ac_objext
2855 if { (eval echo "$as_me:2855: \"$ac_compile\"") >&5
2856   (eval $ac_compile) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); } &&
2860          { ac_try='test -s conftest.$ac_objext'
2861   { (eval echo "$as_me:2861: \"$ac_try\"") >&5
2862   (eval $ac_try) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); }; }; then
2866   ac_cv_prog_cxx_g=yes
2867 else
2868   echo "$as_me: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2870 ac_cv_prog_cxx_g=no
2871 fi
2872 rm -f conftest.$ac_objext conftest.$ac_ext
2873 fi
2874 echo "$as_me:2874: result: $ac_cv_prog_cxx_g" >&5
2875 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2876 if test "$ac_test_CXXFLAGS" = set; then
2877   CXXFLAGS=$ac_save_CXXFLAGS
2878 elif test $ac_cv_prog_cxx_g = yes; then
2879   if test "$GXX" = yes; then
2880     CXXFLAGS="-g -O2"
2881   else
2882     CXXFLAGS="-g"
2883   fi
2884 else
2885   if test "$GXX" = yes; then
2886     CXXFLAGS="-O2"
2887   else
2888     CXXFLAGS=
2889   fi
2890 fi
2891 for ac_declaration in \
2892    ''\
2893    '#include <stdlib.h>' \
2894    'extern "C" void std::exit (int) throw (); using std::exit;' \
2895    'extern "C" void std::exit (int); using std::exit;' \
2896    'extern "C" void exit (int) throw ();' \
2897    'extern "C" void exit (int);' \
2898    'void exit (int);'
2899 do
2900   cat >conftest.$ac_ext <<_ACEOF
2901 #line 2901 "configure"
2902 #include "confdefs.h"
2903 #include <stdlib.h>
2904 $ac_declaration
2905 int
2906 main (void)
2907 {
2908 exit (42);
2909   ;
2910   return 0;
2911 }
2912 _ACEOF
2913 rm -f conftest.$ac_objext
2914 if { (eval echo "$as_me:2914: \"$ac_compile\"") >&5
2915   (eval $ac_compile) 2>&5
2916   ac_status=$?
2917   echo "$as_me:2917: \$? = $ac_status" >&5
2918   (exit $ac_status); } &&
2919          { ac_try='test -s conftest.$ac_objext'
2920   { (eval echo "$as_me:2920: \"$ac_try\"") >&5
2921   (eval $ac_try) 2>&5
2922   ac_status=$?
2923   echo "$as_me:2923: \$? = $ac_status" >&5
2924   (exit $ac_status); }; }; then
2925   :
2926 else
2927   echo "$as_me: failed program was:" >&5
2928 cat conftest.$ac_ext >&5
2929 continue
2930 fi
2931 rm -f conftest.$ac_objext conftest.$ac_ext
2932   cat >conftest.$ac_ext <<_ACEOF
2933 #line 2933 "configure"
2934 #include "confdefs.h"
2935 $ac_declaration
2936 int
2937 main (void)
2938 {
2939 exit (42);
2940   ;
2941   return 0;
2942 }
2943 _ACEOF
2944 rm -f conftest.$ac_objext
2945 if { (eval echo "$as_me:2945: \"$ac_compile\"") >&5
2946   (eval $ac_compile) 2>&5
2947   ac_status=$?
2948   echo "$as_me:2948: \$? = $ac_status" >&5
2949   (exit $ac_status); } &&
2950          { ac_try='test -s conftest.$ac_objext'
2951   { (eval echo "$as_me:2951: \"$ac_try\"") >&5
2952   (eval $ac_try) 2>&5
2953   ac_status=$?
2954   echo "$as_me:2954: \$? = $ac_status" >&5
2955   (exit $ac_status); }; }; then
2956   break
2957 else
2958   echo "$as_me: failed program was:" >&5
2959 cat conftest.$ac_ext >&5
2960 fi
2961 rm -f conftest.$ac_objext conftest.$ac_ext
2962 done
2963 rm -rf conftest*
2964 if test -n "$ac_declaration"; then
2965   echo '#ifdef __cplusplus' >>confdefs.h
2966   echo $ac_declaration      >>confdefs.h
2967   echo '#endif'             >>confdefs.h
2968 fi
2969
2970 ac_ext=c
2971 ac_cpp='$CPP $CPPFLAGS'
2972 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2973 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2974 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2975 ac_main_return=return
2976
2977         ac_ext=cc
2978 ac_cpp='$CXXCPP $CPPFLAGS'
2979 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2980 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2981 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2982 ac_main_return=return
2983
2984         if test "x$cf_with_cxx" != xno
2985         then
2986                 # Several of the C++ configurations do not work, particularly when
2987                 # cross-compiling (20140913 -TD)
2988                 echo "$as_me:2988: checking if $CXX works" >&5
2989 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2990
2991                 save_CPPFLAGS="$CPPFLAGS"
2992                 eval cf_includedir=${includedir}
2993                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2994
2995 cat >conftest.$ac_ext <<_ACEOF
2996 #line 2996 "configure"
2997 #include "confdefs.h"
2998
2999 #include <stdlib.h>
3000 #include <stdio.h>
3001
3002 int
3003 main (void)
3004 {
3005
3006                 printf("Hello world!\n")
3007
3008   ;
3009   return 0;
3010 }
3011 _ACEOF
3012 rm -f conftest.$ac_objext
3013 if { (eval echo "$as_me:3013: \"$ac_compile\"") >&5
3014   (eval $ac_compile) 2>&5
3015   ac_status=$?
3016   echo "$as_me:3016: \$? = $ac_status" >&5
3017   (exit $ac_status); } &&
3018          { ac_try='test -s conftest.$ac_objext'
3019   { (eval echo "$as_me:3019: \"$ac_try\"") >&5
3020   (eval $ac_try) 2>&5
3021   ac_status=$?
3022   echo "$as_me:3022: \$? = $ac_status" >&5
3023   (exit $ac_status); }; }; then
3024   cf_cxx_works=yes
3025 else
3026   echo "$as_me: failed program was:" >&5
3027 cat conftest.$ac_ext >&5
3028 cf_cxx_works=no
3029 fi
3030 rm -f conftest.$ac_objext conftest.$ac_ext
3031                 CPPFLAGS="$save_CPPFLAGS"
3032
3033                 echo "$as_me:3033: result: $cf_cxx_works" >&5
3034 echo "${ECHO_T}$cf_cxx_works" >&6
3035                 if test "x$cf_cxx_works" = xno
3036                 then
3037                         { echo "$as_me:3037: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3038 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3039                         cf_with_cxx=no; CXX=""; GXX="";
3040                 fi
3041         fi
3042         ac_ext=c
3043 ac_cpp='$CPP $CPPFLAGS'
3044 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3045 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3046 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3047 ac_main_return=return
3048
3049         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3050         if test "$CXX" = "g++" ; then
3051                 # Extract the first word of "g++", so it can be a program name with args.
3052 set dummy g++; ac_word=$2
3053 echo "$as_me:3053: checking for $ac_word" >&5
3054 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3055 if test "${ac_cv_path_CXX+set}" = set; then
3056   echo $ECHO_N "(cached) $ECHO_C" >&6
3057 else
3058   case $CXX in
3059   [\\/]* | ?:[\\/]*)
3060   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3061   ;;
3062   *)
3063   ac_save_IFS=$IFS; IFS=$ac_path_separator
3064 ac_dummy="$PATH"
3065 for ac_dir in $ac_dummy; do
3066   IFS=$ac_save_IFS
3067   test -z "$ac_dir" && ac_dir=.
3068   if $as_executable_p "$ac_dir/$ac_word"; then
3069    ac_cv_path_CXX="$ac_dir/$ac_word"
3070    echo "$as_me:3070: found $ac_dir/$ac_word" >&5
3071    break
3072 fi
3073 done
3074
3075   ;;
3076 esac
3077 fi
3078 CXX=$ac_cv_path_CXX
3079
3080 if test -n "$CXX"; then
3081   echo "$as_me:3081: result: $CXX" >&5
3082 echo "${ECHO_T}$CXX" >&6
3083 else
3084   echo "$as_me:3084: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3086 fi
3087
3088         fi
3089         case "x$CXX" in
3090         (x|xg++)
3091                 { echo "$as_me:3091: WARNING: You don't have any C++ compiler, too bad" >&5
3092 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3093                 cf_with_cxx=no; CXX=""; GXX="";
3094                 ;;
3095         esac
3096 fi
3097
3098 GXX_VERSION=none
3099 if test "$GXX" = yes; then
3100         echo "$as_me:3100: checking version of ${CXX:-g++}" >&5
3101 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3102         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3103         if test -z "$GXX_VERSION"
3104         then
3105                 GXX_VERSION=unknown
3106                 GXX=no
3107         fi
3108         echo "$as_me:3108: result: $GXX_VERSION" >&5
3109 echo "${ECHO_T}$GXX_VERSION" >&6
3110 fi
3111
3112 case $GXX_VERSION in
3113 (1*|2.[0-6]*)
3114         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3115         # cf_cxx_library=no
3116         { echo "$as_me:3116: WARNING: templates do not work" >&5
3117 echo "$as_me: WARNING: templates do not work" >&2;}
3118         ;;
3119 esac
3120
3121 echo "$as_me:3121: checking if you want to build C++ binding and demo" >&5
3122 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3123
3124 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3125 if test "${with_cxx_binding+set}" = set; then
3126   withval="$with_cxx_binding"
3127   cf_with_cxx_binding=$withval
3128 else
3129   cf_with_cxx_binding=$cf_with_cxx
3130 fi;
3131 echo "$as_me:3131: result: $cf_with_cxx_binding" >&5
3132 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3133
3134 echo "$as_me:3134: checking if you want to build with Ada95" >&5
3135 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3136 echo "$as_me:3136: result: $cf_with_ada" >&5
3137 echo "${ECHO_T}$cf_with_ada" >&6
3138
3139 echo "$as_me:3139: checking if you want to install terminal database" >&5
3140 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3141
3142 # Check whether --enable-db-install or --disable-db-install was given.
3143 if test "${enable_db_install+set}" = set; then
3144   enableval="$enable_db_install"
3145   cf_with_db_install=$enableval
3146 else
3147   cf_with_db_install=yes
3148 fi;
3149 echo "$as_me:3149: result: $cf_with_db_install" >&5
3150 echo "${ECHO_T}$cf_with_db_install" >&6
3151
3152 echo "$as_me:3152: checking if you want to install manpages" >&5
3153 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3154
3155 # Check whether --with-manpages or --without-manpages was given.
3156 if test "${with_manpages+set}" = set; then
3157   withval="$with_manpages"
3158   cf_with_manpages=$withval
3159 else
3160   cf_with_manpages=yes
3161 fi;
3162 echo "$as_me:3162: result: $cf_with_manpages" >&5
3163 echo "${ECHO_T}$cf_with_manpages" >&6
3164
3165 echo "$as_me:3165: checking if you want to build programs such as tic" >&5
3166 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3167
3168 # Check whether --with-progs or --without-progs was given.
3169 if test "${with_progs+set}" = set; then
3170   withval="$with_progs"
3171   cf_with_progs=$withval
3172 else
3173   cf_with_progs=yes
3174 fi;
3175 echo "$as_me:3175: result: $cf_with_progs" >&5
3176 echo "${ECHO_T}$cf_with_progs" >&6
3177
3178 if test -f $srcdir/tack/tack.h; then
3179         if test "x$cross_compiling" = xyes ; then
3180                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3181
3182 echo "${as_me:-configure}:3182: testing ignoring tack because we are cross-compiling ..." 1>&5
3183
3184                 cf_with_tack=no
3185         else
3186                 echo "$as_me:3186: checking if you want to build the tack program" >&5
3187 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3188
3189 # Check whether --with-tack or --without-tack was given.
3190 if test "${with_tack+set}" = set; then
3191   withval="$with_tack"
3192   cf_with_tack=$withval
3193 else
3194   cf_with_tack=$cf_with_progs
3195 fi;
3196                 echo "$as_me:3196: result: $cf_with_tack" >&5
3197 echo "${ECHO_T}$cf_with_tack" >&6
3198         fi
3199 else
3200         cf_with_tack=no
3201 fi
3202
3203 echo "$as_me:3203: checking if you want to build test-programs" >&5
3204 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3205
3206 # Check whether --with-tests or --without-tests was given.
3207 if test "${with_tests+set}" = set; then
3208   withval="$with_tests"
3209   cf_with_tests=$withval
3210 else
3211   cf_with_tests=yes
3212 fi;
3213 echo "$as_me:3213: result: $cf_with_tests" >&5
3214 echo "${ECHO_T}$cf_with_tests" >&6
3215
3216 echo "$as_me:3216: checking if you wish to install curses.h" >&5
3217 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3218
3219 # Check whether --with-curses-h or --without-curses-h was given.
3220 if test "${with_curses_h+set}" = set; then
3221   withval="$with_curses_h"
3222   with_curses_h=$withval
3223 else
3224   with_curses_h=yes
3225 fi;
3226 echo "$as_me:3226: result: $with_curses_h" >&5
3227 echo "${ECHO_T}$with_curses_h" >&6
3228
3229 modules_to_build="ncurses"
3230 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3231 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3232 modules_to_build="$modules_to_build panel menu form"
3233
3234 test "$program_prefix" != NONE &&
3235   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3236 # Use a double $ so make ignores it.
3237 test "$program_suffix" != NONE &&
3238   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3239 # Double any \ or $.  echo might interpret backslashes.
3240 # By default was `s,x,x', remove it if useless.
3241 cat <<\_ACEOF >conftest.sed
3242 s/[\\$]/&&/g;s/;s,x,x,$//
3243 _ACEOF
3244 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3245 rm conftest.sed
3246
3247 for ac_prog in mawk gawk nawk awk
3248 do
3249   # Extract the first word of "$ac_prog", so it can be a program name with args.
3250 set dummy $ac_prog; ac_word=$2
3251 echo "$as_me:3251: checking for $ac_word" >&5
3252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3253 if test "${ac_cv_prog_AWK+set}" = set; then
3254   echo $ECHO_N "(cached) $ECHO_C" >&6
3255 else
3256   if test -n "$AWK"; then
3257   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3258 else
3259   ac_save_IFS=$IFS; IFS=$ac_path_separator
3260 ac_dummy="$PATH"
3261 for ac_dir in $ac_dummy; do
3262   IFS=$ac_save_IFS
3263   test -z "$ac_dir" && ac_dir=.
3264   $as_executable_p "$ac_dir/$ac_word" || continue
3265 ac_cv_prog_AWK="$ac_prog"
3266 echo "$as_me:3266: found $ac_dir/$ac_word" >&5
3267 break
3268 done
3269
3270 fi
3271 fi
3272 AWK=$ac_cv_prog_AWK
3273 if test -n "$AWK"; then
3274   echo "$as_me:3274: result: $AWK" >&5
3275 echo "${ECHO_T}$AWK" >&6
3276 else
3277   echo "$as_me:3277: result: no" >&5
3278 echo "${ECHO_T}no" >&6
3279 fi
3280
3281   test -n "$AWK" && break
3282 done
3283
3284 test -z "$AWK" && { { echo "$as_me:3284: error: No awk program found" >&5
3285 echo "$as_me: error: No awk program found" >&2;}
3286    { (exit 1); exit 1; }; }
3287
3288 echo "$as_me:3288: checking for egrep" >&5
3289 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3290 if test "${ac_cv_prog_egrep+set}" = set; then
3291   echo $ECHO_N "(cached) $ECHO_C" >&6
3292 else
3293   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3294                 then ac_cv_prog_egrep='grep -E'
3295                 else ac_cv_prog_egrep='egrep'
3296         fi
3297 fi
3298 echo "$as_me:3298: result: $ac_cv_prog_egrep" >&5
3299 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3300         EGREP=$ac_cv_prog_egrep
3301
3302         test -z "$EGREP" && { { echo "$as_me:3302: error: No egrep program found" >&5
3303 echo "$as_me: error: No egrep program found" >&2;}
3304    { (exit 1); exit 1; }; }
3305
3306 # Find a good install program.  We prefer a C program (faster),
3307 # so one script is as good as another.  But avoid the broken or
3308 # incompatible versions:
3309 # SysV /etc/install, /usr/sbin/install
3310 # SunOS /usr/etc/install
3311 # IRIX /sbin/install
3312 # AIX /bin/install
3313 # AmigaOS /C/install, which installs bootblocks on floppy discs
3314 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3315 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3316 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3317 # ./install, which can be erroneously created by make from ./install.sh.
3318 echo "$as_me:3318: checking for a BSD compatible install" >&5
3319 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3320 if test -z "$INSTALL"; then
3321 if test "${ac_cv_path_install+set}" = set; then
3322   echo $ECHO_N "(cached) $ECHO_C" >&6
3323 else
3324     ac_save_IFS=$IFS; IFS=$ac_path_separator
3325   for ac_dir in $PATH; do
3326     IFS=$ac_save_IFS
3327     # Account for people who put trailing slashes in PATH elements.
3328     case $ac_dir/ in
3329     / | ./ | .// | /cC/* \
3330     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3331     | /usr/ucb/* ) ;;
3332     *)
3333       # OSF1 and SCO ODT 3.0 have their own names for install.
3334       # Don't use installbsd from OSF since it installs stuff as root
3335       # by default.
3336       for ac_prog in ginstall scoinst install; do
3337         if $as_executable_p "$ac_dir/$ac_prog"; then
3338           if test $ac_prog = install &&
3339             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3340             # AIX install.  It has an incompatible calling convention.
3341             :
3342           elif test $ac_prog = install &&
3343             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3344             # program-specific install script used by HP pwplus--don't use.
3345             :
3346           else
3347             ac_cv_path_install="$ac_dir/$ac_prog -c"
3348             break 2
3349           fi
3350         fi
3351       done
3352       ;;
3353     esac
3354   done
3355
3356 fi
3357   if test "${ac_cv_path_install+set}" = set; then
3358     INSTALL=$ac_cv_path_install
3359   else
3360     # As a last resort, use the slow shell script.  We don't cache a
3361     # path for INSTALL within a source directory, because that will
3362     # break other packages using the cache if that directory is
3363     # removed, or if the path is relative.
3364     INSTALL=$ac_install_sh
3365   fi
3366 fi
3367 echo "$as_me:3367: result: $INSTALL" >&5
3368 echo "${ECHO_T}$INSTALL" >&6
3369
3370 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3371 # It thinks the first close brace ends the variable substitution.
3372 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3373
3374 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3375
3376 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3377
3378 case $INSTALL in
3379 (/*)
3380         ;;
3381 (*)
3382         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3383         test -z "$cf_dir" && cf_dir=.
3384         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3385         ;;
3386 esac
3387
3388 for ac_prog in lint cppcheck splint
3389 do
3390   # Extract the first word of "$ac_prog", so it can be a program name with args.
3391 set dummy $ac_prog; ac_word=$2
3392 echo "$as_me:3392: checking for $ac_word" >&5
3393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3394 if test "${ac_cv_prog_LINT+set}" = set; then
3395   echo $ECHO_N "(cached) $ECHO_C" >&6
3396 else
3397   if test -n "$LINT"; then
3398   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3399 else
3400   ac_save_IFS=$IFS; IFS=$ac_path_separator
3401 ac_dummy="$PATH"
3402 for ac_dir in $ac_dummy; do
3403   IFS=$ac_save_IFS
3404   test -z "$ac_dir" && ac_dir=.
3405   $as_executable_p "$ac_dir/$ac_word" || continue
3406 ac_cv_prog_LINT="$ac_prog"
3407 echo "$as_me:3407: found $ac_dir/$ac_word" >&5
3408 break
3409 done
3410
3411 fi
3412 fi
3413 LINT=$ac_cv_prog_LINT
3414 if test -n "$LINT"; then
3415   echo "$as_me:3415: result: $LINT" >&5
3416 echo "${ECHO_T}$LINT" >&6
3417 else
3418   echo "$as_me:3418: result: no" >&5
3419 echo "${ECHO_T}no" >&6
3420 fi
3421
3422   test -n "$LINT" && break
3423 done
3424
3425 echo "$as_me:3425: checking whether ln -s works" >&5
3426 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3427 LN_S=$as_ln_s
3428 if test "$LN_S" = "ln -s"; then
3429   echo "$as_me:3429: result: yes" >&5
3430 echo "${ECHO_T}yes" >&6
3431 else
3432   echo "$as_me:3432: result: no, using $LN_S" >&5
3433 echo "${ECHO_T}no, using $LN_S" >&6
3434 fi
3435
3436 echo "$as_me:3436: checking if $LN_S -f options work" >&5
3437 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3438
3439 rm -f conf$$.src conf$$dst
3440 echo >conf$$.dst
3441 echo first >conf$$.src
3442 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3443         cf_prog_ln_sf=yes
3444 else
3445         cf_prog_ln_sf=no
3446 fi
3447 rm -f conf$$.dst conf$$src
3448 echo "$as_me:3448: result: $cf_prog_ln_sf" >&5
3449 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3450
3451 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3452
3453 echo "$as_me:3453: checking for long file names" >&5
3454 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3455 if test "${ac_cv_sys_long_file_names+set}" = set; then
3456   echo $ECHO_N "(cached) $ECHO_C" >&6
3457 else
3458   ac_cv_sys_long_file_names=yes
3459 # Test for long file names in all the places we know might matter:
3460 #      .                the current directory, where building will happen
3461 #      $prefix/lib      where we will be installing things
3462 #      $exec_prefix/lib likewise
3463 # eval it to expand exec_prefix.
3464 #      $TMPDIR          if set, where it might want to write temporary files
3465 # if $TMPDIR is not set:
3466 #      /tmp             where it might want to write temporary files
3467 #      /var/tmp         likewise
3468 #      /usr/tmp         likewise
3469 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3470   ac_tmpdirs=$TMPDIR
3471 else
3472   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3473 fi
3474 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3475   test -d $ac_dir || continue
3476   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3477   ac_xdir=$ac_dir/cf$$
3478   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3479   ac_tf1=$ac_xdir/conftest9012345
3480   ac_tf2=$ac_xdir/conftest9012346
3481   (echo 1 >$ac_tf1) 2>/dev/null
3482   (echo 2 >$ac_tf2) 2>/dev/null
3483   ac_val=`cat $ac_tf1 2>/dev/null`
3484   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3485     ac_cv_sys_long_file_names=no
3486     rm -rf $ac_xdir 2>/dev/null
3487     break
3488   fi
3489   rm -rf $ac_xdir 2>/dev/null
3490 done
3491 fi
3492 echo "$as_me:3492: result: $ac_cv_sys_long_file_names" >&5
3493 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3494 if test $ac_cv_sys_long_file_names = yes; then
3495
3496 cat >>confdefs.h <<\EOF
3497 #define HAVE_LONG_FILE_NAMES 1
3498 EOF
3499
3500 fi
3501
3502 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3503 # of package conflict.
3504 cf_config_suffix=
3505
3506 # Check whether --with-config-suffix or --without-config-suffix was given.
3507 if test "${with_config_suffix+set}" = set; then
3508   withval="$with_config_suffix"
3509   case "x$withval" in
3510         (xyes|xno)
3511                 { echo "$as_me:3511: WARNING: expected a value for config-suffix option" >&5
3512 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3513                 ;;
3514         (*)     cf_config_suffix="$withval"
3515                 ;;
3516         esac
3517 fi;
3518
3519 # If we find pkg-config, check if we should install the ".pc" files.
3520
3521 echo "$as_me:3521: checking if you want to use pkg-config" >&5
3522 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3523
3524 # Check whether --with-pkg-config or --without-pkg-config was given.
3525 if test "${with_pkg_config+set}" = set; then
3526   withval="$with_pkg_config"
3527   cf_pkg_config=$withval
3528 else
3529   cf_pkg_config=yes
3530 fi;
3531 echo "$as_me:3531: result: $cf_pkg_config" >&5
3532 echo "${ECHO_T}$cf_pkg_config" >&6
3533
3534 case $cf_pkg_config in
3535 (no)
3536         PKG_CONFIG=none
3537         ;;
3538 (yes)
3539
3540 if test -n "$ac_tool_prefix"; then
3541   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3542 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3543 echo "$as_me:3543: checking for $ac_word" >&5
3544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3545 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3546   echo $ECHO_N "(cached) $ECHO_C" >&6
3547 else
3548   case $PKG_CONFIG in
3549   [\\/]* | ?:[\\/]*)
3550   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3551   ;;
3552   *)
3553   ac_save_IFS=$IFS; IFS=$ac_path_separator
3554 ac_dummy="$PATH"
3555 for ac_dir in $ac_dummy; do
3556   IFS=$ac_save_IFS
3557   test -z "$ac_dir" && ac_dir=.
3558   if $as_executable_p "$ac_dir/$ac_word"; then
3559    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3560    echo "$as_me:3560: found $ac_dir/$ac_word" >&5
3561    break
3562 fi
3563 done
3564
3565   ;;
3566 esac
3567 fi
3568 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3569
3570 if test -n "$PKG_CONFIG"; then
3571   echo "$as_me:3571: result: $PKG_CONFIG" >&5
3572 echo "${ECHO_T}$PKG_CONFIG" >&6
3573 else
3574   echo "$as_me:3574: result: no" >&5
3575 echo "${ECHO_T}no" >&6
3576 fi
3577
3578 fi
3579 if test -z "$ac_cv_path_PKG_CONFIG"; then
3580   ac_pt_PKG_CONFIG=$PKG_CONFIG
3581   # Extract the first word of "pkg-config", so it can be a program name with args.
3582 set dummy pkg-config; ac_word=$2
3583 echo "$as_me:3583: checking for $ac_word" >&5
3584 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3585 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3586   echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588   case $ac_pt_PKG_CONFIG in
3589   [\\/]* | ?:[\\/]*)
3590   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3591   ;;
3592   *)
3593   ac_save_IFS=$IFS; IFS=$ac_path_separator
3594 ac_dummy="$PATH"
3595 for ac_dir in $ac_dummy; do
3596   IFS=$ac_save_IFS
3597   test -z "$ac_dir" && ac_dir=.
3598   if $as_executable_p "$ac_dir/$ac_word"; then
3599    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3600    echo "$as_me:3600: found $ac_dir/$ac_word" >&5
3601    break
3602 fi
3603 done
3604
3605   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3606   ;;
3607 esac
3608 fi
3609 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3610
3611 if test -n "$ac_pt_PKG_CONFIG"; then
3612   echo "$as_me:3612: result: $ac_pt_PKG_CONFIG" >&5
3613 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3614 else
3615   echo "$as_me:3615: result: no" >&5
3616 echo "${ECHO_T}no" >&6
3617 fi
3618
3619   PKG_CONFIG=$ac_pt_PKG_CONFIG
3620 else
3621   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3622 fi
3623
3624         ;;
3625 (*)
3626         PKG_CONFIG=$withval
3627         ;;
3628 esac
3629
3630 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3631 if test "$PKG_CONFIG" != none ; then
3632
3633 if test "x$prefix" != xNONE; then
3634         cf_path_syntax="$prefix"
3635 else
3636         cf_path_syntax="$ac_default_prefix"
3637 fi
3638
3639 case ".$PKG_CONFIG" in
3640 (.\$\(*\)*|.\'*\'*)
3641         ;;
3642 (..|./*|.\\*)
3643         ;;
3644 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3645         ;;
3646 (.\${*prefix}*|.\${*dir}*)
3647         eval PKG_CONFIG="$PKG_CONFIG"
3648         case ".$PKG_CONFIG" in
3649         (.NONE/*)
3650                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3651                 ;;
3652         esac
3653         ;;
3654 (.no|.NONE/*)
3655         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3656         ;;
3657 (*)
3658         { { echo "$as_me:3658: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3659 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3660    { (exit 1); exit 1; }; }
3661         ;;
3662 esac
3663
3664 elif test "x$cf_pkg_config" != xno ; then
3665         { echo "$as_me:3665: WARNING: pkg-config is not installed" >&5
3666 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3667 fi
3668
3669 case $PKG_CONFIG in
3670 (no|none|yes)
3671         echo "$as_me:3671: checking for pkg-config library directory" >&5
3672 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3673         ;;
3674 (*)
3675         echo "$as_me:3675: checking for $PKG_CONFIG library directory" >&5
3676 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3677         ;;
3678 esac
3679
3680 PKG_CONFIG_LIBDIR=no
3681
3682 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3683 if test "${with_pkg_config_libdir+set}" = set; then
3684   withval="$with_pkg_config_libdir"
3685   PKG_CONFIG_LIBDIR=$withval
3686 else
3687   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3688 fi;
3689
3690 case x$PKG_CONFIG_LIBDIR in
3691 (x/*)
3692         ;;
3693 (xyes)
3694         # Look for the library directory using the same prefix as the executable
3695         if test "x$PKG_CONFIG" = xnone
3696         then
3697                 cf_path=$prefix
3698         else
3699                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3700         fi
3701
3702         # If you don't like using the default architecture, you have to specify the
3703         # intended library directory and corresponding compiler/linker options.
3704         #
3705         # This case allows for Debian's 2014-flavor of multiarch, along with the
3706         # most common variations before that point.  Some other variants spell the
3707         # directory differently, e.g., "pkg-config", and put it in unusual places.
3708         # pkg-config has always been poorly standardized, which is ironic...
3709         case x`(arch) 2>/dev/null` in
3710         (*64)
3711                 cf_search_path="\
3712                         $cf_path/lib/*64-linux-gnu \
3713                         $cf_path/share \
3714                         $cf_path/lib64 \
3715                         $cf_path/lib32 \
3716                         $cf_path/lib"
3717                 ;;
3718         (*)
3719                 cf_search_path="\
3720                         $cf_path/lib/*-linux-gnu \
3721                         $cf_path/share \
3722                         $cf_path/lib32 \
3723                         $cf_path/lib \
3724                         $cf_path/libdata"
3725                 ;;
3726         esac
3727
3728         test -n "$verbose" && echo "    list..." 1>&6
3729
3730 echo "${as_me:-configure}:3730: testing list... ..." 1>&5
3731
3732         for cf_config in $cf_search_path
3733         do
3734                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3735
3736 echo "${as_me:-configure}:3736: testing checking $cf_config/pkgconfig ..." 1>&5
3737
3738                 if test -d $cf_config/pkgconfig
3739                 then
3740                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3741                         echo "$as_me:3741: checking done" >&5
3742 echo $ECHO_N "checking done... $ECHO_C" >&6
3743                         break
3744                 fi
3745         done
3746         ;;
3747 (*)
3748         ;;
3749 esac
3750
3751 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3752         echo "$as_me:3752: result: $PKG_CONFIG_LIBDIR" >&5
3753 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3754 fi
3755
3756 if test "x$PKG_CONFIG" != xnone
3757 then
3758         echo "$as_me:3758: checking if we should install .pc files for $PKG_CONFIG" >&5
3759 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3760 else
3761         echo "$as_me:3761: checking if we should install .pc files" >&5
3762 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3763 fi
3764
3765 # Check whether --enable-pc-files or --disable-pc-files was given.
3766 if test "${enable_pc_files+set}" = set; then
3767   enableval="$enable_pc_files"
3768   enable_pc_files=$enableval
3769 else
3770   enable_pc_files=no
3771 fi;
3772 echo "$as_me:3772: result: $enable_pc_files" >&5
3773 echo "${ECHO_T}$enable_pc_files" >&6
3774
3775 if test "x$enable_pc_files" != xno
3776 then
3777         MAKE_PC_FILES=
3778         case "x$PKG_CONFIG_LIBDIR" in
3779         (xno|xyes)
3780                 { echo "$as_me:3780: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3781 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3782                 ;;
3783         (*)
3784
3785 if test "x$prefix" != xNONE; then
3786         cf_path_syntax="$prefix"
3787 else
3788         cf_path_syntax="$ac_default_prefix"
3789 fi
3790
3791 case ".$PKG_CONFIG_LIBDIR" in
3792 (.\$\(*\)*|.\'*\'*)
3793         ;;
3794 (..|./*|.\\*)
3795         ;;
3796 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3797         ;;
3798 (.\${*prefix}*|.\${*dir}*)
3799         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3800         case ".$PKG_CONFIG_LIBDIR" in
3801         (.NONE/*)
3802                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3803                 ;;
3804         esac
3805         ;;
3806 (.no|.NONE/*)
3807         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3808         ;;
3809 (*)
3810         { { echo "$as_me:3810: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3811 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3812    { (exit 1); exit 1; }; }
3813         ;;
3814 esac
3815
3816                 ;;
3817         esac
3818 else
3819         MAKE_PC_FILES="#"
3820 fi
3821
3822 if test -z "$MAKE_PC_FILES"
3823 then
3824         echo "$as_me:3824: checking for suffix to add to pc-files" >&5
3825 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3826
3827 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3828 if test "${with_pc_suffix+set}" = set; then
3829   withval="$with_pc_suffix"
3830   case "x$withval" in
3831         (xyes|xno)
3832                 PC_MODULE_SUFFIX=
3833                 ;;
3834         (*)     PC_MODULE_SUFFIX="$withval"
3835                 ;;
3836         esac
3837 fi;
3838         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3839         echo "$as_me:3839: result: $PC_MODULE_SUFFIX" >&5
3840 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3841         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3842
3843 fi
3844
3845 echo "$as_me:3845: checking if we should assume mixed-case filenames" >&5
3846 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3847
3848 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3849 if test "${enable_mixed_case+set}" = set; then
3850   enableval="$enable_mixed_case"
3851   enable_mixedcase=$enableval
3852 else
3853   enable_mixedcase=auto
3854 fi;
3855 echo "$as_me:3855: result: $enable_mixedcase" >&5
3856 echo "${ECHO_T}$enable_mixedcase" >&6
3857 if test "$enable_mixedcase" = "auto" ; then
3858
3859 echo "$as_me:3859: checking if filesystem supports mixed-case filenames" >&5
3860 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3861 if test "${cf_cv_mixedcase+set}" = set; then
3862   echo $ECHO_N "(cached) $ECHO_C" >&6
3863 else
3864
3865 if test "$cross_compiling" = yes ; then
3866         case $target_alias in
3867         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3868                 cf_cv_mixedcase=no
3869                 ;;
3870         (*)
3871                 cf_cv_mixedcase=yes
3872                 ;;
3873         esac
3874 else
3875         rm -f conftest CONFTEST
3876         echo test >conftest
3877         if test -f CONFTEST ; then
3878                 cf_cv_mixedcase=no
3879         else
3880                 cf_cv_mixedcase=yes
3881         fi
3882         rm -f conftest CONFTEST
3883 fi
3884
3885 fi
3886 echo "$as_me:3886: result: $cf_cv_mixedcase" >&5
3887 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3888 test "$cf_cv_mixedcase" = yes &&
3889 cat >>confdefs.h <<\EOF
3890 #define MIXEDCASE_FILENAMES 1
3891 EOF
3892
3893 else
3894         cf_cv_mixedcase=$enable_mixedcase
3895         if test "x$enable_mixedcase" = "xyes" ; then
3896
3897 cat >>confdefs.h <<\EOF
3898 #define MIXEDCASE_FILENAMES 1
3899 EOF
3900
3901         fi
3902 fi
3903
3904 # do this after mixed-case option (tags/TAGS is not as important as tic).
3905 echo "$as_me:3905: checking whether ${MAKE-make} sets \${MAKE}" >&5
3906 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3907 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3908 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3909   echo $ECHO_N "(cached) $ECHO_C" >&6
3910 else
3911   cat >conftest.make <<\EOF
3912 all:
3913         @echo 'ac_maketemp="${MAKE}"'
3914 EOF
3915 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3916 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3917 if test -n "$ac_maketemp"; then
3918   eval ac_cv_prog_make_${ac_make}_set=yes
3919 else
3920   eval ac_cv_prog_make_${ac_make}_set=no
3921 fi
3922 rm -f conftest.make
3923 fi
3924 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3925   echo "$as_me:3925: result: yes" >&5
3926 echo "${ECHO_T}yes" >&6
3927   SET_MAKE=
3928 else
3929   echo "$as_me:3929: result: no" >&5
3930 echo "${ECHO_T}no" >&6
3931   SET_MAKE="MAKE=${MAKE-make}"
3932 fi
3933
3934 for ac_prog in exctags ctags
3935 do
3936   # Extract the first word of "$ac_prog", so it can be a program name with args.
3937 set dummy $ac_prog; ac_word=$2
3938 echo "$as_me:3938: checking for $ac_word" >&5
3939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3940 if test "${ac_cv_prog_CTAGS+set}" = set; then
3941   echo $ECHO_N "(cached) $ECHO_C" >&6
3942 else
3943   if test -n "$CTAGS"; then
3944   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3945 else
3946   ac_save_IFS=$IFS; IFS=$ac_path_separator
3947 ac_dummy="$PATH"
3948 for ac_dir in $ac_dummy; do
3949   IFS=$ac_save_IFS
3950   test -z "$ac_dir" && ac_dir=.
3951   $as_executable_p "$ac_dir/$ac_word" || continue
3952 ac_cv_prog_CTAGS="$ac_prog"
3953 echo "$as_me:3953: found $ac_dir/$ac_word" >&5
3954 break
3955 done
3956
3957 fi
3958 fi
3959 CTAGS=$ac_cv_prog_CTAGS
3960 if test -n "$CTAGS"; then
3961   echo "$as_me:3961: result: $CTAGS" >&5
3962 echo "${ECHO_T}$CTAGS" >&6
3963 else
3964   echo "$as_me:3964: result: no" >&5
3965 echo "${ECHO_T}no" >&6
3966 fi
3967
3968   test -n "$CTAGS" && break
3969 done
3970
3971 for ac_prog in exetags etags
3972 do
3973   # Extract the first word of "$ac_prog", so it can be a program name with args.
3974 set dummy $ac_prog; ac_word=$2
3975 echo "$as_me:3975: checking for $ac_word" >&5
3976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3977 if test "${ac_cv_prog_ETAGS+set}" = set; then
3978   echo $ECHO_N "(cached) $ECHO_C" >&6
3979 else
3980   if test -n "$ETAGS"; then
3981   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3982 else
3983   ac_save_IFS=$IFS; IFS=$ac_path_separator
3984 ac_dummy="$PATH"
3985 for ac_dir in $ac_dummy; do
3986   IFS=$ac_save_IFS
3987   test -z "$ac_dir" && ac_dir=.
3988   $as_executable_p "$ac_dir/$ac_word" || continue
3989 ac_cv_prog_ETAGS="$ac_prog"
3990 echo "$as_me:3990: found $ac_dir/$ac_word" >&5
3991 break
3992 done
3993
3994 fi
3995 fi
3996 ETAGS=$ac_cv_prog_ETAGS
3997 if test -n "$ETAGS"; then
3998   echo "$as_me:3998: result: $ETAGS" >&5
3999 echo "${ECHO_T}$ETAGS" >&6
4000 else
4001   echo "$as_me:4001: result: no" >&5
4002 echo "${ECHO_T}no" >&6
4003 fi
4004
4005   test -n "$ETAGS" && break
4006 done
4007
4008 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4009 set dummy ${CTAGS:-ctags}; ac_word=$2
4010 echo "$as_me:4010: checking for $ac_word" >&5
4011 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4012 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4013   echo $ECHO_N "(cached) $ECHO_C" >&6
4014 else
4015   if test -n "$MAKE_LOWER_TAGS"; then
4016   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4017 else
4018   ac_save_IFS=$IFS; IFS=$ac_path_separator
4019 ac_dummy="$PATH"
4020 for ac_dir in $ac_dummy; do
4021   IFS=$ac_save_IFS
4022   test -z "$ac_dir" && ac_dir=.
4023   $as_executable_p "$ac_dir/$ac_word" || continue
4024 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4025 echo "$as_me:4025: found $ac_dir/$ac_word" >&5
4026 break
4027 done
4028
4029   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4030 fi
4031 fi
4032 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4033 if test -n "$MAKE_LOWER_TAGS"; then
4034   echo "$as_me:4034: result: $MAKE_LOWER_TAGS" >&5
4035 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4036 else
4037   echo "$as_me:4037: result: no" >&5
4038 echo "${ECHO_T}no" >&6
4039 fi
4040
4041 if test "$cf_cv_mixedcase" = yes ; then
4042         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4043 set dummy ${ETAGS:-etags}; ac_word=$2
4044 echo "$as_me:4044: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   if test -n "$MAKE_UPPER_TAGS"; then
4050   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4051 else
4052   ac_save_IFS=$IFS; IFS=$ac_path_separator
4053 ac_dummy="$PATH"
4054 for ac_dir in $ac_dummy; do
4055   IFS=$ac_save_IFS
4056   test -z "$ac_dir" && ac_dir=.
4057   $as_executable_p "$ac_dir/$ac_word" || continue
4058 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4059 echo "$as_me:4059: found $ac_dir/$ac_word" >&5
4060 break
4061 done
4062
4063   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4064 fi
4065 fi
4066 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4067 if test -n "$MAKE_UPPER_TAGS"; then
4068   echo "$as_me:4068: result: $MAKE_UPPER_TAGS" >&5
4069 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4070 else
4071   echo "$as_me:4071: result: no" >&5
4072 echo "${ECHO_T}no" >&6
4073 fi
4074
4075 else
4076         MAKE_UPPER_TAGS=no
4077 fi
4078
4079 if test "$MAKE_UPPER_TAGS" = yes ; then
4080         MAKE_UPPER_TAGS=
4081 else
4082         MAKE_UPPER_TAGS="#"
4083 fi
4084
4085 if test "$MAKE_LOWER_TAGS" = yes ; then
4086         MAKE_LOWER_TAGS=
4087 else
4088         MAKE_LOWER_TAGS="#"
4089 fi
4090
4091 echo "$as_me:4091: checking for makeflags variable" >&5
4092 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4093 if test "${cf_cv_makeflags+set}" = set; then
4094   echo $ECHO_N "(cached) $ECHO_C" >&6
4095 else
4096
4097         cf_cv_makeflags=''
4098         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4099         do
4100                 cat >cf_makeflags.tmp <<CF_EOF
4101 SHELL = $SHELL
4102 all :
4103         @ echo '.$cf_option'
4104 CF_EOF
4105                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4106                 case "$cf_result" in
4107                 (.*k|.*kw)
4108                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4109                         case "$cf_result" in
4110                         (.*CC=*)        cf_cv_makeflags=
4111                                 ;;
4112                         (*)     cf_cv_makeflags=$cf_option
4113                                 ;;
4114                         esac
4115                         break
4116                         ;;
4117                 (.-)    ;;
4118                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4119                         ;;
4120                 esac
4121         done
4122         rm -f cf_makeflags.tmp
4123
4124 fi
4125 echo "$as_me:4125: result: $cf_cv_makeflags" >&5
4126 echo "${ECHO_T}$cf_cv_makeflags" >&6
4127
4128 if test -n "$ac_tool_prefix"; then
4129   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4130 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4131 echo "$as_me:4131: checking for $ac_word" >&5
4132 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4133 if test "${ac_cv_prog_RANLIB+set}" = set; then
4134   echo $ECHO_N "(cached) $ECHO_C" >&6
4135 else
4136   if test -n "$RANLIB"; then
4137   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4138 else
4139   ac_save_IFS=$IFS; IFS=$ac_path_separator
4140 ac_dummy="$PATH"
4141 for ac_dir in $ac_dummy; do
4142   IFS=$ac_save_IFS
4143   test -z "$ac_dir" && ac_dir=.
4144   $as_executable_p "$ac_dir/$ac_word" || continue
4145 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4146 echo "$as_me:4146: found $ac_dir/$ac_word" >&5
4147 break
4148 done
4149
4150 fi
4151 fi
4152 RANLIB=$ac_cv_prog_RANLIB
4153 if test -n "$RANLIB"; then
4154   echo "$as_me:4154: result: $RANLIB" >&5
4155 echo "${ECHO_T}$RANLIB" >&6
4156 else
4157   echo "$as_me:4157: result: no" >&5
4158 echo "${ECHO_T}no" >&6
4159 fi
4160
4161 fi
4162 if test -z "$ac_cv_prog_RANLIB"; then
4163   ac_ct_RANLIB=$RANLIB
4164   # Extract the first word of "ranlib", so it can be a program name with args.
4165 set dummy ranlib; ac_word=$2
4166 echo "$as_me:4166: checking for $ac_word" >&5
4167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4168 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4169   echo $ECHO_N "(cached) $ECHO_C" >&6
4170 else
4171   if test -n "$ac_ct_RANLIB"; then
4172   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4173 else
4174   ac_save_IFS=$IFS; IFS=$ac_path_separator
4175 ac_dummy="$PATH"
4176 for ac_dir in $ac_dummy; do
4177   IFS=$ac_save_IFS
4178   test -z "$ac_dir" && ac_dir=.
4179   $as_executable_p "$ac_dir/$ac_word" || continue
4180 ac_cv_prog_ac_ct_RANLIB="ranlib"
4181 echo "$as_me:4181: found $ac_dir/$ac_word" >&5
4182 break
4183 done
4184
4185   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4186 fi
4187 fi
4188 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4189 if test -n "$ac_ct_RANLIB"; then
4190   echo "$as_me:4190: result: $ac_ct_RANLIB" >&5
4191 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4192 else
4193   echo "$as_me:4193: result: no" >&5
4194 echo "${ECHO_T}no" >&6
4195 fi
4196
4197   RANLIB=$ac_ct_RANLIB
4198 else
4199   RANLIB="$ac_cv_prog_RANLIB"
4200 fi
4201
4202 if test -n "$ac_tool_prefix"; then
4203   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4204 set dummy ${ac_tool_prefix}ld; ac_word=$2
4205 echo "$as_me:4205: checking for $ac_word" >&5
4206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4207 if test "${ac_cv_prog_LD+set}" = set; then
4208   echo $ECHO_N "(cached) $ECHO_C" >&6
4209 else
4210   if test -n "$LD"; then
4211   ac_cv_prog_LD="$LD" # Let the user override the test.
4212 else
4213   ac_save_IFS=$IFS; IFS=$ac_path_separator
4214 ac_dummy="$PATH"
4215 for ac_dir in $ac_dummy; do
4216   IFS=$ac_save_IFS
4217   test -z "$ac_dir" && ac_dir=.
4218   $as_executable_p "$ac_dir/$ac_word" || continue
4219 ac_cv_prog_LD="${ac_tool_prefix}ld"
4220 echo "$as_me:4220: found $ac_dir/$ac_word" >&5
4221 break
4222 done
4223
4224 fi
4225 fi
4226 LD=$ac_cv_prog_LD
4227 if test -n "$LD"; then
4228   echo "$as_me:4228: result: $LD" >&5
4229 echo "${ECHO_T}$LD" >&6
4230 else
4231   echo "$as_me:4231: result: no" >&5
4232 echo "${ECHO_T}no" >&6
4233 fi
4234
4235 fi
4236 if test -z "$ac_cv_prog_LD"; then
4237   ac_ct_LD=$LD
4238   # Extract the first word of "ld", so it can be a program name with args.
4239 set dummy ld; ac_word=$2
4240 echo "$as_me:4240: checking for $ac_word" >&5
4241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4242 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4243   echo $ECHO_N "(cached) $ECHO_C" >&6
4244 else
4245   if test -n "$ac_ct_LD"; then
4246   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4247 else
4248   ac_save_IFS=$IFS; IFS=$ac_path_separator
4249 ac_dummy="$PATH"
4250 for ac_dir in $ac_dummy; do
4251   IFS=$ac_save_IFS
4252   test -z "$ac_dir" && ac_dir=.
4253   $as_executable_p "$ac_dir/$ac_word" || continue
4254 ac_cv_prog_ac_ct_LD="ld"
4255 echo "$as_me:4255: found $ac_dir/$ac_word" >&5
4256 break
4257 done
4258
4259   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4260 fi
4261 fi
4262 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4263 if test -n "$ac_ct_LD"; then
4264   echo "$as_me:4264: result: $ac_ct_LD" >&5
4265 echo "${ECHO_T}$ac_ct_LD" >&6
4266 else
4267   echo "$as_me:4267: result: no" >&5
4268 echo "${ECHO_T}no" >&6
4269 fi
4270
4271   LD=$ac_ct_LD
4272 else
4273   LD="$ac_cv_prog_LD"
4274 fi
4275
4276 if test -n "$ac_tool_prefix"; then
4277   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4278 set dummy ${ac_tool_prefix}ar; ac_word=$2
4279 echo "$as_me:4279: checking for $ac_word" >&5
4280 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4281 if test "${ac_cv_prog_AR+set}" = set; then
4282   echo $ECHO_N "(cached) $ECHO_C" >&6
4283 else
4284   if test -n "$AR"; then
4285   ac_cv_prog_AR="$AR" # Let the user override the test.
4286 else
4287   ac_save_IFS=$IFS; IFS=$ac_path_separator
4288 ac_dummy="$PATH"
4289 for ac_dir in $ac_dummy; do
4290   IFS=$ac_save_IFS
4291   test -z "$ac_dir" && ac_dir=.
4292   $as_executable_p "$ac_dir/$ac_word" || continue
4293 ac_cv_prog_AR="${ac_tool_prefix}ar"
4294 echo "$as_me:4294: found $ac_dir/$ac_word" >&5
4295 break
4296 done
4297
4298 fi
4299 fi
4300 AR=$ac_cv_prog_AR
4301 if test -n "$AR"; then
4302   echo "$as_me:4302: result: $AR" >&5
4303 echo "${ECHO_T}$AR" >&6
4304 else
4305   echo "$as_me:4305: result: no" >&5
4306 echo "${ECHO_T}no" >&6
4307 fi
4308
4309 fi
4310 if test -z "$ac_cv_prog_AR"; then
4311   ac_ct_AR=$AR
4312   # Extract the first word of "ar", so it can be a program name with args.
4313 set dummy ar; ac_word=$2
4314 echo "$as_me:4314: checking for $ac_word" >&5
4315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4316 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4317   echo $ECHO_N "(cached) $ECHO_C" >&6
4318 else
4319   if test -n "$ac_ct_AR"; then
4320   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4321 else
4322   ac_save_IFS=$IFS; IFS=$ac_path_separator
4323 ac_dummy="$PATH"
4324 for ac_dir in $ac_dummy; do
4325   IFS=$ac_save_IFS
4326   test -z "$ac_dir" && ac_dir=.
4327   $as_executable_p "$ac_dir/$ac_word" || continue
4328 ac_cv_prog_ac_ct_AR="ar"
4329 echo "$as_me:4329: found $ac_dir/$ac_word" >&5
4330 break
4331 done
4332
4333   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4334 fi
4335 fi
4336 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4337 if test -n "$ac_ct_AR"; then
4338   echo "$as_me:4338: result: $ac_ct_AR" >&5
4339 echo "${ECHO_T}$ac_ct_AR" >&6
4340 else
4341   echo "$as_me:4341: result: no" >&5
4342 echo "${ECHO_T}no" >&6
4343 fi
4344
4345   AR=$ac_ct_AR
4346 else
4347   AR="$ac_cv_prog_AR"
4348 fi
4349
4350 if test -n "$ac_tool_prefix"; then
4351   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4352 set dummy ${ac_tool_prefix}nm; ac_word=$2
4353 echo "$as_me:4353: checking for $ac_word" >&5
4354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4355 if test "${ac_cv_prog_NM+set}" = set; then
4356   echo $ECHO_N "(cached) $ECHO_C" >&6
4357 else
4358   if test -n "$NM"; then
4359   ac_cv_prog_NM="$NM" # Let the user override the test.
4360 else
4361   ac_save_IFS=$IFS; IFS=$ac_path_separator
4362 ac_dummy="$PATH"
4363 for ac_dir in $ac_dummy; do
4364   IFS=$ac_save_IFS
4365   test -z "$ac_dir" && ac_dir=.
4366   $as_executable_p "$ac_dir/$ac_word" || continue
4367 ac_cv_prog_NM="${ac_tool_prefix}nm"
4368 echo "$as_me:4368: found $ac_dir/$ac_word" >&5
4369 break
4370 done
4371
4372 fi
4373 fi
4374 NM=$ac_cv_prog_NM
4375 if test -n "$NM"; then
4376   echo "$as_me:4376: result: $NM" >&5
4377 echo "${ECHO_T}$NM" >&6
4378 else
4379   echo "$as_me:4379: result: no" >&5
4380 echo "${ECHO_T}no" >&6
4381 fi
4382
4383 fi
4384 if test -z "$ac_cv_prog_NM"; then
4385   ac_ct_NM=$NM
4386   # Extract the first word of "nm", so it can be a program name with args.
4387 set dummy nm; ac_word=$2
4388 echo "$as_me:4388: checking for $ac_word" >&5
4389 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4390 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4391   echo $ECHO_N "(cached) $ECHO_C" >&6
4392 else
4393   if test -n "$ac_ct_NM"; then
4394   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4395 else
4396   ac_save_IFS=$IFS; IFS=$ac_path_separator
4397 ac_dummy="$PATH"
4398 for ac_dir in $ac_dummy; do
4399   IFS=$ac_save_IFS
4400   test -z "$ac_dir" && ac_dir=.
4401   $as_executable_p "$ac_dir/$ac_word" || continue
4402 ac_cv_prog_ac_ct_NM="nm"
4403 echo "$as_me:4403: found $ac_dir/$ac_word" >&5
4404 break
4405 done
4406
4407   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4408 fi
4409 fi
4410 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4411 if test -n "$ac_ct_NM"; then
4412   echo "$as_me:4412: result: $ac_ct_NM" >&5
4413 echo "${ECHO_T}$ac_ct_NM" >&6
4414 else
4415   echo "$as_me:4415: result: no" >&5
4416 echo "${ECHO_T}no" >&6
4417 fi
4418
4419   NM=$ac_ct_NM
4420 else
4421   NM="$ac_cv_prog_NM"
4422 fi
4423
4424 if test -n "$ac_tool_prefix"; then
4425   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4426 set dummy ${ac_tool_prefix}ar; ac_word=$2
4427 echo "$as_me:4427: checking for $ac_word" >&5
4428 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4429 if test "${ac_cv_prog_AR+set}" = set; then
4430   echo $ECHO_N "(cached) $ECHO_C" >&6
4431 else
4432   if test -n "$AR"; then
4433   ac_cv_prog_AR="$AR" # Let the user override the test.
4434 else
4435   ac_save_IFS=$IFS; IFS=$ac_path_separator
4436 ac_dummy="$PATH"
4437 for ac_dir in $ac_dummy; do
4438   IFS=$ac_save_IFS
4439   test -z "$ac_dir" && ac_dir=.
4440   $as_executable_p "$ac_dir/$ac_word" || continue
4441 ac_cv_prog_AR="${ac_tool_prefix}ar"
4442 echo "$as_me:4442: found $ac_dir/$ac_word" >&5
4443 break
4444 done
4445
4446 fi
4447 fi
4448 AR=$ac_cv_prog_AR
4449 if test -n "$AR"; then
4450   echo "$as_me:4450: result: $AR" >&5
4451 echo "${ECHO_T}$AR" >&6
4452 else
4453   echo "$as_me:4453: result: no" >&5
4454 echo "${ECHO_T}no" >&6
4455 fi
4456
4457 fi
4458 if test -z "$ac_cv_prog_AR"; then
4459   ac_ct_AR=$AR
4460   # Extract the first word of "ar", so it can be a program name with args.
4461 set dummy ar; ac_word=$2
4462 echo "$as_me:4462: checking for $ac_word" >&5
4463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4464 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4465   echo $ECHO_N "(cached) $ECHO_C" >&6
4466 else
4467   if test -n "$ac_ct_AR"; then
4468   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4469 else
4470   ac_save_IFS=$IFS; IFS=$ac_path_separator
4471 ac_dummy="$PATH"
4472 for ac_dir in $ac_dummy; do
4473   IFS=$ac_save_IFS
4474   test -z "$ac_dir" && ac_dir=.
4475   $as_executable_p "$ac_dir/$ac_word" || continue
4476 ac_cv_prog_ac_ct_AR="ar"
4477 echo "$as_me:4477: found $ac_dir/$ac_word" >&5
4478 break
4479 done
4480
4481   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4482 fi
4483 fi
4484 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4485 if test -n "$ac_ct_AR"; then
4486   echo "$as_me:4486: result: $ac_ct_AR" >&5
4487 echo "${ECHO_T}$ac_ct_AR" >&6
4488 else
4489   echo "$as_me:4489: result: no" >&5
4490 echo "${ECHO_T}no" >&6
4491 fi
4492
4493   AR=$ac_ct_AR
4494 else
4495   AR="$ac_cv_prog_AR"
4496 fi
4497
4498 echo "$as_me:4498: checking for options to update archives" >&5
4499 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4500 if test "${cf_cv_ar_flags+set}" = set; then
4501   echo $ECHO_N "(cached) $ECHO_C" >&6
4502 else
4503
4504         cf_cv_ar_flags=unknown
4505         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4506         do
4507
4508                 # check if $ARFLAGS already contains this choice
4509                 if test "x$ARFLAGS" != "x" ; then
4510                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4511                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4512                                 cf_cv_ar_flags=
4513                                 break
4514                         fi
4515                 fi
4516
4517                 rm -f conftest.$ac_cv_objext
4518                 rm -f conftest.a
4519
4520                 cat >conftest.$ac_ext <<EOF
4521 #line 4521 "configure"
4522 int     testdata[3] = { 123, 456, 789 };
4523 EOF
4524                 if { (eval echo "$as_me:4524: \"$ac_compile\"") >&5
4525   (eval $ac_compile) 2>&5
4526   ac_status=$?
4527   echo "$as_me:4527: \$? = $ac_status" >&5
4528   (exit $ac_status); } ; then
4529                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4530                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4531                         if test -f conftest.a ; then
4532                                 cf_cv_ar_flags=$cf_ar_flags
4533                                 break
4534                         fi
4535                 else
4536                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4537
4538 echo "${as_me:-configure}:4538: testing cannot compile test-program ..." 1>&5
4539
4540                         break
4541                 fi
4542         done
4543         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4544
4545 fi
4546 echo "$as_me:4546: result: $cf_cv_ar_flags" >&5
4547 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4548
4549 if test -n "$ARFLAGS" ; then
4550         if test -n "$cf_cv_ar_flags" ; then
4551                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4552         fi
4553 else
4554         ARFLAGS=$cf_cv_ar_flags
4555 fi
4556
4557 echo "$as_me:4557: checking if you have specified an install-prefix" >&5
4558 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4559
4560 # Check whether --with-install-prefix or --without-install-prefix was given.
4561 if test "${with_install_prefix+set}" = set; then
4562   withval="$with_install_prefix"
4563   case "x$withval" in
4564         (xyes|xno)
4565                 ;;
4566         (*)     DESTDIR="$withval"
4567                 ;;
4568         esac
4569 fi;
4570 echo "$as_me:4570: result: $DESTDIR" >&5
4571 echo "${ECHO_T}$DESTDIR" >&6
4572
4573 ###############################################################################
4574
4575 # If we're cross-compiling, allow the user to override the tools and their
4576 # options.  The configure script is oriented toward identifying the host
4577 # compiler, etc., but we need a build compiler to generate parts of the source.
4578
4579 if test "$cross_compiling" = yes ; then
4580
4581         # defaults that we might want to override
4582         : ${BUILD_CFLAGS:=''}
4583         : ${BUILD_CPPFLAGS:=''}
4584         : ${BUILD_LDFLAGS:=''}
4585         : ${BUILD_LIBS:=''}
4586         : ${BUILD_EXEEXT:='$x'}
4587         : ${BUILD_OBJEXT:='o'}
4588
4589 # Check whether --with-build-cc or --without-build-cc was given.
4590 if test "${with_build_cc+set}" = set; then
4591   withval="$with_build_cc"
4592   BUILD_CC="$withval"
4593 else
4594   for ac_prog in gcc clang cc c89 c99 cl
4595 do
4596   # Extract the first word of "$ac_prog", so it can be a program name with args.
4597 set dummy $ac_prog; ac_word=$2
4598 echo "$as_me:4598: checking for $ac_word" >&5
4599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4600 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4601   echo $ECHO_N "(cached) $ECHO_C" >&6
4602 else
4603   if test -n "$BUILD_CC"; then
4604   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4605 else
4606   ac_save_IFS=$IFS; IFS=$ac_path_separator
4607 ac_dummy="$PATH"
4608 for ac_dir in $ac_dummy; do
4609   IFS=$ac_save_IFS
4610   test -z "$ac_dir" && ac_dir=.
4611   $as_executable_p "$ac_dir/$ac_word" || continue
4612 ac_cv_prog_BUILD_CC="$ac_prog"
4613 echo "$as_me:4613: found $ac_dir/$ac_word" >&5
4614 break
4615 done
4616
4617 fi
4618 fi
4619 BUILD_CC=$ac_cv_prog_BUILD_CC
4620 if test -n "$BUILD_CC"; then
4621   echo "$as_me:4621: result: $BUILD_CC" >&5
4622 echo "${ECHO_T}$BUILD_CC" >&6
4623 else
4624   echo "$as_me:4624: result: no" >&5
4625 echo "${ECHO_T}no" >&6
4626 fi
4627
4628   test -n "$BUILD_CC" && break
4629 done
4630 test -n "$BUILD_CC" || BUILD_CC="none"
4631
4632 fi;
4633         echo "$as_me:4633: checking for native build C compiler" >&5
4634 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4635         echo "$as_me:4635: result: $BUILD_CC" >&5
4636 echo "${ECHO_T}$BUILD_CC" >&6
4637
4638         echo "$as_me:4638: checking for native build C preprocessor" >&5
4639 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4640
4641 # Check whether --with-build-cpp or --without-build-cpp was given.
4642 if test "${with_build_cpp+set}" = set; then
4643   withval="$with_build_cpp"
4644   BUILD_CPP="$withval"
4645 else
4646   BUILD_CPP='${BUILD_CC} -E'
4647 fi;
4648         echo "$as_me:4648: result: $BUILD_CPP" >&5
4649 echo "${ECHO_T}$BUILD_CPP" >&6
4650
4651         echo "$as_me:4651: checking for native build C flags" >&5
4652 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4653
4654 # Check whether --with-build-cflags or --without-build-cflags was given.
4655 if test "${with_build_cflags+set}" = set; then
4656   withval="$with_build_cflags"
4657   BUILD_CFLAGS="$withval"
4658 fi;
4659         echo "$as_me:4659: result: $BUILD_CFLAGS" >&5
4660 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4661
4662         echo "$as_me:4662: checking for native build C preprocessor-flags" >&5
4663 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4664
4665 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4666 if test "${with_build_cppflags+set}" = set; then
4667   withval="$with_build_cppflags"
4668   BUILD_CPPFLAGS="$withval"
4669 fi;
4670         echo "$as_me:4670: result: $BUILD_CPPFLAGS" >&5
4671 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4672
4673         echo "$as_me:4673: checking for native build linker-flags" >&5
4674 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4675
4676 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4677 if test "${with_build_ldflags+set}" = set; then
4678   withval="$with_build_ldflags"
4679   BUILD_LDFLAGS="$withval"
4680 fi;
4681         echo "$as_me:4681: result: $BUILD_LDFLAGS" >&5
4682 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4683
4684         echo "$as_me:4684: checking for native build linker-libraries" >&5
4685 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4686
4687 # Check whether --with-build-libs or --without-build-libs was given.
4688 if test "${with_build_libs+set}" = set; then
4689   withval="$with_build_libs"
4690   BUILD_LIBS="$withval"
4691 fi;
4692         echo "$as_me:4692: result: $BUILD_LIBS" >&5
4693 echo "${ECHO_T}$BUILD_LIBS" >&6
4694
4695         # this assumes we're on Unix.
4696         BUILD_EXEEXT=
4697         BUILD_OBJEXT=o
4698
4699         : ${BUILD_CC:='${CC}'}
4700
4701         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4702                 { { echo "$as_me:4702: error: Cross-build requires two compilers.
4703 Use --with-build-cc to specify the native compiler." >&5
4704 echo "$as_me: error: Cross-build requires two compilers.
4705 Use --with-build-cc to specify the native compiler." >&2;}
4706    { (exit 1); exit 1; }; }
4707         fi
4708
4709 else
4710         : ${BUILD_CC:='${CC}'}
4711         : ${BUILD_CPP:='${CPP}'}
4712         : ${BUILD_CFLAGS:='${CFLAGS}'}
4713         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4714         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4715         : ${BUILD_LIBS:='${LIBS}'}
4716         : ${BUILD_EXEEXT:='$x'}
4717         : ${BUILD_OBJEXT:='o'}
4718 fi
4719
4720 ###############################################################################
4721
4722 ### Options to allow the user to specify the set of libraries which are used.
4723 ### Use "--without-normal --with-shared" to allow the default model to be
4724 ### shared, for example.
4725 cf_list_models=""
4726
4727 echo "$as_me:4727: checking if libtool -version-number should be used" >&5
4728 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4729
4730 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4731 if test "${enable_libtool_version+set}" = set; then
4732   enableval="$enable_libtool_version"
4733   test "$enableval" != no && enableval=yes
4734         if test "$enableval" != "yes" ; then
4735     cf_libtool_version=no
4736         else
4737                 cf_libtool_version=yes
4738         fi
4739 else
4740   enableval=yes
4741         cf_libtool_version=yes
4742
4743 fi;
4744 echo "$as_me:4744: result: $cf_libtool_version" >&5
4745 echo "${ECHO_T}$cf_libtool_version" >&6
4746
4747 if test "$cf_libtool_version" = yes ; then
4748         LIBTOOL_VERSION="-version-number"
4749 else
4750         LIBTOOL_VERSION="-version-info"
4751         case "x$VERSION" in
4752         (x)
4753                 { echo "$as_me:4753: WARNING: VERSION was not set" >&5
4754 echo "$as_me: WARNING: VERSION was not set" >&2;}
4755                 ;;
4756         (x*.*.*)
4757                 ABI_VERSION="$VERSION"
4758                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4759
4760 echo "${as_me:-configure}:4760: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4761
4762                 ;;
4763         (x*:*:*)
4764                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4765                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4766
4767 echo "${as_me:-configure}:4767: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4768
4769                 ;;
4770         (*)
4771                 { echo "$as_me:4771: WARNING: unexpected VERSION value: $VERSION" >&5
4772 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4773                 ;;
4774         esac
4775 fi
4776
4777 LIBTOOL=
4778
4779 # common library maintenance symbols that are convenient for libtool scripts:
4780 LIB_CREATE='${AR} -cr'
4781 LIB_OBJECT='${OBJECTS}'
4782 LIB_SUFFIX=.a
4783 LIB_PREP="$RANLIB"
4784
4785 # symbols used to prop libtool up to enable it to determine what it should be
4786 # doing:
4787 LIB_CLEAN=
4788 LIB_COMPILE=
4789 LIB_LINK='${CC}'
4790 LIB_INSTALL=
4791 LIB_UNINSTALL=
4792
4793 echo "$as_me:4793: checking if you want to build libraries with libtool" >&5
4794 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4795
4796 # Check whether --with-libtool or --without-libtool was given.
4797 if test "${with_libtool+set}" = set; then
4798   withval="$with_libtool"
4799   with_libtool=$withval
4800 else
4801   with_libtool=no
4802 fi;
4803 echo "$as_me:4803: result: $with_libtool" >&5
4804 echo "${ECHO_T}$with_libtool" >&6
4805 if test "$with_libtool" != "no"; then
4806
4807         if test "$with_libtool" != "yes" ; then
4808
4809 if test "x$prefix" != xNONE; then
4810         cf_path_syntax="$prefix"
4811 else
4812         cf_path_syntax="$ac_default_prefix"
4813 fi
4814
4815 case ".$with_libtool" in
4816 (.\$\(*\)*|.\'*\'*)
4817         ;;
4818 (..|./*|.\\*)
4819         ;;
4820 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4821         ;;
4822 (.\${*prefix}*|.\${*dir}*)
4823         eval with_libtool="$with_libtool"
4824         case ".$with_libtool" in
4825         (.NONE/*)
4826                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4827                 ;;
4828         esac
4829         ;;
4830 (.no|.NONE/*)
4831         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4832         ;;
4833 (*)
4834         { { echo "$as_me:4834: error: expected a pathname, not \"$with_libtool\"" >&5
4835 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4836    { (exit 1); exit 1; }; }
4837         ;;
4838 esac
4839
4840                 LIBTOOL=$with_libtool
4841         else
4842                 if test -n "$ac_tool_prefix"; then
4843   for ac_prog in libtool glibtool
4844   do
4845     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4846 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4847 echo "$as_me:4847: checking for $ac_word" >&5
4848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4849 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4850   echo $ECHO_N "(cached) $ECHO_C" >&6
4851 else
4852   if test -n "$LIBTOOL"; then
4853   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4854 else
4855   ac_save_IFS=$IFS; IFS=$ac_path_separator
4856 ac_dummy="$PATH"
4857 for ac_dir in $ac_dummy; do
4858   IFS=$ac_save_IFS
4859   test -z "$ac_dir" && ac_dir=.
4860   $as_executable_p "$ac_dir/$ac_word" || continue
4861 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4862 echo "$as_me:4862: found $ac_dir/$ac_word" >&5
4863 break
4864 done
4865
4866 fi
4867 fi
4868 LIBTOOL=$ac_cv_prog_LIBTOOL
4869 if test -n "$LIBTOOL"; then
4870   echo "$as_me:4870: result: $LIBTOOL" >&5
4871 echo "${ECHO_T}$LIBTOOL" >&6
4872 else
4873   echo "$as_me:4873: result: no" >&5
4874 echo "${ECHO_T}no" >&6
4875 fi
4876
4877     test -n "$LIBTOOL" && break
4878   done
4879 fi
4880 if test -z "$LIBTOOL"; then
4881   ac_ct_LIBTOOL=$LIBTOOL
4882   for ac_prog in libtool glibtool
4883 do
4884   # Extract the first word of "$ac_prog", so it can be a program name with args.
4885 set dummy $ac_prog; ac_word=$2
4886 echo "$as_me:4886: checking for $ac_word" >&5
4887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4888 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4889   echo $ECHO_N "(cached) $ECHO_C" >&6
4890 else
4891   if test -n "$ac_ct_LIBTOOL"; then
4892   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4893 else
4894   ac_save_IFS=$IFS; IFS=$ac_path_separator
4895 ac_dummy="$PATH"
4896 for ac_dir in $ac_dummy; do
4897   IFS=$ac_save_IFS
4898   test -z "$ac_dir" && ac_dir=.
4899   $as_executable_p "$ac_dir/$ac_word" || continue
4900 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4901 echo "$as_me:4901: found $ac_dir/$ac_word" >&5
4902 break
4903 done
4904
4905 fi
4906 fi
4907 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4908 if test -n "$ac_ct_LIBTOOL"; then
4909   echo "$as_me:4909: result: $ac_ct_LIBTOOL" >&5
4910 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4911 else
4912   echo "$as_me:4912: result: no" >&5
4913 echo "${ECHO_T}no" >&6
4914 fi
4915
4916   test -n "$ac_ct_LIBTOOL" && break
4917 done
4918 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4919
4920   LIBTOOL=$ac_ct_LIBTOOL
4921 fi
4922
4923 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4924 then
4925         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.].*//'`
4926 else
4927         cf_cv_libtool_version=
4928 fi
4929 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4930
4931                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4932                 then
4933
4934 unset ac_cv_prog_ac_ct_LIBTOOL
4935 unset ac_ct_LIBTOOL
4936 unset LIBTOOL
4937
4938                         if test -n "$ac_tool_prefix"; then
4939   for ac_prog in glibtool
4940   do
4941     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4942 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4943 echo "$as_me:4943: checking for $ac_word" >&5
4944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4945 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4946   echo $ECHO_N "(cached) $ECHO_C" >&6
4947 else
4948   if test -n "$LIBTOOL"; then
4949   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4950 else
4951   ac_save_IFS=$IFS; IFS=$ac_path_separator
4952 ac_dummy="$PATH"
4953 for ac_dir in $ac_dummy; do
4954   IFS=$ac_save_IFS
4955   test -z "$ac_dir" && ac_dir=.
4956   $as_executable_p "$ac_dir/$ac_word" || continue
4957 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4958 echo "$as_me:4958: found $ac_dir/$ac_word" >&5
4959 break
4960 done
4961
4962 fi
4963 fi
4964 LIBTOOL=$ac_cv_prog_LIBTOOL
4965 if test -n "$LIBTOOL"; then
4966   echo "$as_me:4966: result: $LIBTOOL" >&5
4967 echo "${ECHO_T}$LIBTOOL" >&6
4968 else
4969   echo "$as_me:4969: result: no" >&5
4970 echo "${ECHO_T}no" >&6
4971 fi
4972
4973     test -n "$LIBTOOL" && break
4974   done
4975 fi
4976 if test -z "$LIBTOOL"; then
4977   ac_ct_LIBTOOL=$LIBTOOL
4978   for ac_prog in glibtool
4979 do
4980   # Extract the first word of "$ac_prog", so it can be a program name with args.
4981 set dummy $ac_prog; ac_word=$2
4982 echo "$as_me:4982: checking for $ac_word" >&5
4983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4984 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4985   echo $ECHO_N "(cached) $ECHO_C" >&6
4986 else
4987   if test -n "$ac_ct_LIBTOOL"; then
4988   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4989 else
4990   ac_save_IFS=$IFS; IFS=$ac_path_separator
4991 ac_dummy="$PATH"
4992 for ac_dir in $ac_dummy; do
4993   IFS=$ac_save_IFS
4994   test -z "$ac_dir" && ac_dir=.
4995   $as_executable_p "$ac_dir/$ac_word" || continue
4996 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4997 echo "$as_me:4997: found $ac_dir/$ac_word" >&5
4998 break
4999 done
5000
5001 fi
5002 fi
5003 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5004 if test -n "$ac_ct_LIBTOOL"; then
5005   echo "$as_me:5005: result: $ac_ct_LIBTOOL" >&5
5006 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5007 else
5008   echo "$as_me:5008: result: no" >&5
5009 echo "${ECHO_T}no" >&6
5010 fi
5011
5012   test -n "$ac_ct_LIBTOOL" && break
5013 done
5014 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5015
5016   LIBTOOL=$ac_ct_LIBTOOL
5017 fi
5018
5019 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5020 then
5021         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.].*//'`
5022 else
5023         cf_cv_libtool_version=
5024 fi
5025 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5026
5027                 fi
5028         fi
5029         if test -z "$LIBTOOL" ; then
5030                 { { echo "$as_me:5030: error: Cannot find libtool" >&5
5031 echo "$as_me: error: Cannot find libtool" >&2;}
5032    { (exit 1); exit 1; }; }
5033         fi
5034         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5035         LIB_OBJECT='${OBJECTS:.o=.lo}'
5036         LIB_SUFFIX=.la
5037         LIB_CLEAN='${LIBTOOL} --mode=clean'
5038         LIB_COMPILE='${LIBTOOL} --mode=compile'
5039         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5040         LIB_INSTALL='${LIBTOOL} --mode=install'
5041         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5042         LIB_PREP=:
5043
5044 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5045 then
5046         echo "$as_me:5046: checking version of $LIBTOOL" >&5
5047 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5048
5049 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5050 then
5051         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.].*//'`
5052 else
5053         cf_cv_libtool_version=
5054 fi
5055 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5056
5057         echo "$as_me:5057: result: $cf_cv_libtool_version" >&5
5058 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5059         if test -z "$cf_cv_libtool_version" ; then
5060                 { { echo "$as_me:5060: error: This is not GNU libtool" >&5
5061 echo "$as_me: error: This is not GNU libtool" >&2;}
5062    { (exit 1); exit 1; }; }
5063         fi
5064 else
5065         { { echo "$as_me:5065: error: GNU libtool has not been found" >&5
5066 echo "$as_me: error: GNU libtool has not been found" >&2;}
5067    { (exit 1); exit 1; }; }
5068 fi
5069
5070         # special hack to add -no-undefined (which libtool should do for itself)
5071         LT_UNDEF=
5072         case "$cf_cv_system_name" in
5073         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5074                 LT_UNDEF=-no-undefined
5075                 ;;
5076         esac
5077
5078         # special hack to add --tag option for C++ compiler
5079         case $cf_cv_libtool_version in
5080         (1.[5-9]*|[2-9].[0-9.a-z]*)
5081                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5082                 LIBTOOL="$LIBTOOL --tag=CC"
5083                 ;;
5084         (*)
5085                 LIBTOOL_CXX="$LIBTOOL"
5086                 ;;
5087         esac
5088 else
5089         LIBTOOL=""
5090         LIBTOOL_CXX=""
5091 fi
5092
5093 test -z "$LIBTOOL" && ECHO_LT=
5094
5095 if test "$with_libtool" != "no" ; then
5096
5097 cf_list_models="$cf_list_models libtool"
5098
5099 else
5100
5101 echo "$as_me:5101: checking if you want to build shared libraries" >&5
5102 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5103
5104 # Check whether --with-shared or --without-shared was given.
5105 if test "${with_shared+set}" = set; then
5106   withval="$with_shared"
5107   with_shared=$withval
5108 else
5109   with_shared=no
5110 fi;
5111 echo "$as_me:5111: result: $with_shared" >&5
5112 echo "${ECHO_T}$with_shared" >&6
5113 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5114
5115 echo "$as_me:5115: checking if you want to build static libraries" >&5
5116 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5117
5118 # Check whether --with-normal or --without-normal was given.
5119 if test "${with_normal+set}" = set; then
5120   withval="$with_normal"
5121   with_normal=$withval
5122 else
5123   with_normal=yes
5124 fi;
5125 echo "$as_me:5125: result: $with_normal" >&5
5126 echo "${ECHO_T}$with_normal" >&6
5127 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5128
5129 echo "$as_me:5129: checking if you want to build debug libraries" >&5
5130 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5131
5132 # Check whether --with-debug or --without-debug was given.
5133 if test "${with_debug+set}" = set; then
5134   withval="$with_debug"
5135   with_debug=$withval
5136 else
5137   with_debug=yes
5138 fi;
5139 echo "$as_me:5139: result: $with_debug" >&5
5140 echo "${ECHO_T}$with_debug" >&6
5141 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5142
5143 echo "$as_me:5143: checking if you want to build profiling libraries" >&5
5144 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5145
5146 # Check whether --with-profile or --without-profile was given.
5147 if test "${with_profile+set}" = set; then
5148   withval="$with_profile"
5149   with_profile=$withval
5150 else
5151   with_profile=no
5152 fi;
5153 echo "$as_me:5153: result: $with_profile" >&5
5154 echo "${ECHO_T}$with_profile" >&6
5155 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5156
5157 fi
5158
5159 if test "X$cf_with_cxx_binding" != Xno; then
5160 if test "x$with_shared" = "xyes"; then
5161 echo "$as_me:5161: checking if you want to build C++ shared libraries" >&5
5162 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5163
5164 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5165 if test "${with_cxx_shared+set}" = set; then
5166   withval="$with_cxx_shared"
5167   with_shared_cxx=$withval
5168 else
5169   with_shared_cxx=no
5170 fi;
5171 echo "$as_me:5171: result: $with_shared_cxx" >&5
5172 echo "${ECHO_T}$with_shared_cxx" >&6
5173 fi
5174 fi
5175
5176 ###############################################################################
5177
5178 echo "$as_me:5178: checking for specified models" >&5
5179 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5180 test -z "$cf_list_models" && cf_list_models=normal
5181 test "$with_libtool" != "no" && cf_list_models=libtool
5182 echo "$as_me:5182: result: $cf_list_models" >&5
5183 echo "${ECHO_T}$cf_list_models" >&6
5184
5185 ### Use the first model as the default, and save its suffix for use in building
5186 ### up test-applications.
5187 echo "$as_me:5187: checking for default model" >&5
5188 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5189 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5190 echo "$as_me:5190: result: $DFT_LWR_MODEL" >&5
5191 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5192
5193 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5194
5195 TICS_NAME=tic
5196
5197 TINFO_NAME=tinfo
5198
5199 LIB_NAME=ncurses
5200
5201 LIB_DIR=../lib
5202 LIB_2ND=../../lib
5203
5204 echo "$as_me:5204: checking if you want to have a library-prefix" >&5
5205 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5206
5207 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5208 if test "${with_lib_prefix+set}" = set; then
5209   withval="$with_lib_prefix"
5210   with_lib_prefix=$withval
5211 else
5212   with_lib_prefix=auto
5213 fi;
5214 echo "$as_me:5214: result: $with_lib_prefix" >&5
5215 echo "${ECHO_T}$with_lib_prefix" >&6
5216
5217 if test $with_lib_prefix = auto
5218 then
5219
5220         case $cf_cv_system_name in
5221         (OS/2*|os2*)
5222                 if test "$DFT_LWR_MODEL" = libtool; then
5223                         LIB_PREFIX='lib'
5224                 else
5225                         LIB_PREFIX=''
5226                 fi
5227                 ;;
5228         (*)     LIB_PREFIX='lib'
5229                 ;;
5230         esac
5231 cf_prefix=$LIB_PREFIX
5232
5233 elif test $with_lib_prefix = no
5234 then
5235         LIB_PREFIX=
5236 else
5237         LIB_PREFIX=$with_lib_prefix
5238 fi
5239
5240 LIB_SUFFIX=
5241
5242         echo "$as_me:5242: checking for PATH separator" >&5
5243 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5244         case $cf_cv_system_name in
5245         (os2*)  PATH_SEPARATOR=';'  ;;
5246         (*)     ${PATH_SEPARATOR:=':'}  ;;
5247         esac
5248
5249         echo "$as_me:5249: result: $PATH_SEPARATOR" >&5
5250 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5251
5252 ###############################################################################
5253
5254 echo "$as_me:5254: checking if you want to build a separate terminfo library" >&5
5255 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5256
5257 # Check whether --with-termlib or --without-termlib was given.
5258 if test "${with_termlib+set}" = set; then
5259   withval="$with_termlib"
5260   with_termlib=$withval
5261 else
5262   with_termlib=no
5263 fi;
5264 echo "$as_me:5264: result: $with_termlib" >&5
5265 echo "${ECHO_T}$with_termlib" >&6
5266
5267 echo "$as_me:5267: checking if you want to build a separate tic library" >&5
5268 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5269
5270 # Check whether --with-ticlib or --without-ticlib was given.
5271 if test "${with_ticlib+set}" = set; then
5272   withval="$with_ticlib"
5273   with_ticlib=$withval
5274 else
5275   with_ticlib=no
5276 fi;
5277 echo "$as_me:5277: result: $with_ticlib" >&5
5278 echo "${ECHO_T}$with_ticlib" >&6
5279
5280 ### Checks for special libraries, must be done up-front.
5281 SHLIB_LIST=""
5282
5283 echo "$as_me:5283: checking if you want to link with the GPM mouse library" >&5
5284 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5285
5286 # Check whether --with-gpm or --without-gpm was given.
5287 if test "${with_gpm+set}" = set; then
5288   withval="$with_gpm"
5289   with_gpm=$withval
5290 else
5291   with_gpm=maybe
5292 fi;
5293 echo "$as_me:5293: result: $with_gpm" >&5
5294 echo "${ECHO_T}$with_gpm" >&6
5295
5296 if test "$with_gpm" != no ; then
5297         echo "$as_me:5297: checking for gpm.h" >&5
5298 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5299 if test "${ac_cv_header_gpm_h+set}" = set; then
5300   echo $ECHO_N "(cached) $ECHO_C" >&6
5301 else
5302   cat >conftest.$ac_ext <<_ACEOF
5303 #line 5303 "configure"
5304 #include "confdefs.h"
5305 #include <gpm.h>
5306 _ACEOF
5307 if { (eval echo "$as_me:5307: \"$ac_cpp conftest.$ac_ext\"") >&5
5308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5309   ac_status=$?
5310   egrep -v '^ *\+' conftest.er1 >conftest.err
5311   rm -f conftest.er1
5312   cat conftest.err >&5
5313   echo "$as_me:5313: \$? = $ac_status" >&5
5314   (exit $ac_status); } >/dev/null; then
5315   if test -s conftest.err; then
5316     ac_cpp_err=$ac_c_preproc_warn_flag
5317   else
5318     ac_cpp_err=
5319   fi
5320 else
5321   ac_cpp_err=yes
5322 fi
5323 if test -z "$ac_cpp_err"; then
5324   ac_cv_header_gpm_h=yes
5325 else
5326   echo "$as_me: failed program was:" >&5
5327   cat conftest.$ac_ext >&5
5328   ac_cv_header_gpm_h=no
5329 fi
5330 rm -f conftest.err conftest.$ac_ext
5331 fi
5332 echo "$as_me:5332: result: $ac_cv_header_gpm_h" >&5
5333 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5334 if test $ac_cv_header_gpm_h = yes; then
5335
5336 cat >>confdefs.h <<\EOF
5337 #define HAVE_GPM_H 1
5338 EOF
5339
5340                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5341                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5342
5343 echo "${as_me:-configure}:5343: testing assuming we really have GPM library ..." 1>&5
5344
5345 cat >>confdefs.h <<\EOF
5346 #define HAVE_LIBGPM 1
5347 EOF
5348
5349                         with_gpm=yes
5350                 else
5351                         echo "$as_me:5351: checking for Gpm_Open in -lgpm" >&5
5352 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5353 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5354   echo $ECHO_N "(cached) $ECHO_C" >&6
5355 else
5356   ac_check_lib_save_LIBS=$LIBS
5357 LIBS="-lgpm  $LIBS"
5358 cat >conftest.$ac_ext <<_ACEOF
5359 #line 5359 "configure"
5360 #include "confdefs.h"
5361
5362 /* Override any gcc2 internal prototype to avoid an error.  */
5363 #ifdef __cplusplus
5364 extern "C"
5365 #endif
5366 /* We use char because int might match the return type of a gcc2
5367    builtin and then its argument prototype would still apply.  */
5368 char Gpm_Open ();
5369 int
5370 main (void)
5371 {
5372 Gpm_Open ();
5373   ;
5374   return 0;
5375 }
5376 _ACEOF
5377 rm -f conftest.$ac_objext conftest$ac_exeext
5378 if { (eval echo "$as_me:5378: \"$ac_link\"") >&5
5379   (eval $ac_link) 2>&5
5380   ac_status=$?
5381   echo "$as_me:5381: \$? = $ac_status" >&5
5382   (exit $ac_status); } &&
5383          { ac_try='test -s conftest$ac_exeext'
5384   { (eval echo "$as_me:5384: \"$ac_try\"") >&5
5385   (eval $ac_try) 2>&5
5386   ac_status=$?
5387   echo "$as_me:5387: \$? = $ac_status" >&5
5388   (exit $ac_status); }; }; then
5389   ac_cv_lib_gpm_Gpm_Open=yes
5390 else
5391   echo "$as_me: failed program was:" >&5
5392 cat conftest.$ac_ext >&5
5393 ac_cv_lib_gpm_Gpm_Open=no
5394 fi
5395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5396 LIBS=$ac_check_lib_save_LIBS
5397 fi
5398 echo "$as_me:5398: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5399 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5400 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5401   with_gpm=yes
5402 else
5403
5404                                 if test "$with_gpm" = maybe; then
5405                                         { echo "$as_me:5405: WARNING: Cannot link with GPM library" >&5
5406 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5407                                         with_gpm=no
5408                                 else
5409                                         { { echo "$as_me:5409: error: Cannot link with GPM library" >&5
5410 echo "$as_me: error: Cannot link with GPM library" >&2;}
5411    { (exit 1); exit 1; }; }
5412                                 fi
5413
5414 fi
5415
5416                 fi
5417
5418 else
5419
5420                 test "$with_gpm" != maybe && { echo "$as_me:5420: WARNING: Cannot find GPM header" >&5
5421 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5422                 with_gpm=no
5423
5424 fi
5425
5426 fi
5427
5428 if test "$with_gpm" != no ; then
5429         echo "$as_me:5429: checking if you want to load GPM dynamically" >&5
5430 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5431
5432 # Check whether --with-dlsym or --without-dlsym was given.
5433 if test "${with_dlsym+set}" = set; then
5434   withval="$with_dlsym"
5435   with_dlsym=$withval
5436 else
5437   with_dlsym=yes
5438 fi;
5439         echo "$as_me:5439: result: $with_dlsym" >&5
5440 echo "${ECHO_T}$with_dlsym" >&6
5441         if test "x$with_dlsym" = xyes ; then
5442
5443 cf_have_dlsym=no
5444 echo "$as_me:5444: checking for dlsym" >&5
5445 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5446 if test "${ac_cv_func_dlsym+set}" = set; then
5447   echo $ECHO_N "(cached) $ECHO_C" >&6
5448 else
5449   cat >conftest.$ac_ext <<_ACEOF
5450 #line 5450 "configure"
5451 #include "confdefs.h"
5452 /* System header to define __stub macros and hopefully few prototypes,
5453     which can conflict with char dlsym (); below.  */
5454 #include <assert.h>
5455 /* Override any gcc2 internal prototype to avoid an error.  */
5456 #ifdef __cplusplus
5457 extern "C"
5458 #endif
5459 /* We use char because int might match the return type of a gcc2
5460    builtin and then its argument prototype would still apply.  */
5461 char dlsym ();
5462 char (*f) ();
5463
5464 int
5465 main (void)
5466 {
5467 /* The GNU C library defines this for functions which it implements
5468     to always fail with ENOSYS.  Some functions are actually named
5469     something starting with __ and the normal name is an alias.  */
5470 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5471 choke me
5472 #else
5473 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5474 #endif
5475
5476   ;
5477   return 0;
5478 }
5479 _ACEOF
5480 rm -f conftest.$ac_objext conftest$ac_exeext
5481 if { (eval echo "$as_me:5481: \"$ac_link\"") >&5
5482   (eval $ac_link) 2>&5
5483   ac_status=$?
5484   echo "$as_me:5484: \$? = $ac_status" >&5
5485   (exit $ac_status); } &&
5486          { ac_try='test -s conftest$ac_exeext'
5487   { (eval echo "$as_me:5487: \"$ac_try\"") >&5
5488   (eval $ac_try) 2>&5
5489   ac_status=$?
5490   echo "$as_me:5490: \$? = $ac_status" >&5
5491   (exit $ac_status); }; }; then
5492   ac_cv_func_dlsym=yes
5493 else
5494   echo "$as_me: failed program was:" >&5
5495 cat conftest.$ac_ext >&5
5496 ac_cv_func_dlsym=no
5497 fi
5498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5499 fi
5500 echo "$as_me:5500: result: $ac_cv_func_dlsym" >&5
5501 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5502 if test $ac_cv_func_dlsym = yes; then
5503   cf_have_dlsym=yes
5504 else
5505
5506 cf_have_libdl=no
5507 echo "$as_me:5507: checking for dlsym in -ldl" >&5
5508 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5509 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5510   echo $ECHO_N "(cached) $ECHO_C" >&6
5511 else
5512   ac_check_lib_save_LIBS=$LIBS
5513 LIBS="-ldl  $LIBS"
5514 cat >conftest.$ac_ext <<_ACEOF
5515 #line 5515 "configure"
5516 #include "confdefs.h"
5517
5518 /* Override any gcc2 internal prototype to avoid an error.  */
5519 #ifdef __cplusplus
5520 extern "C"
5521 #endif
5522 /* We use char because int might match the return type of a gcc2
5523    builtin and then its argument prototype would still apply.  */
5524 char dlsym ();
5525 int
5526 main (void)
5527 {
5528 dlsym ();
5529   ;
5530   return 0;
5531 }
5532 _ACEOF
5533 rm -f conftest.$ac_objext conftest$ac_exeext
5534 if { (eval echo "$as_me:5534: \"$ac_link\"") >&5
5535   (eval $ac_link) 2>&5
5536   ac_status=$?
5537   echo "$as_me:5537: \$? = $ac_status" >&5
5538   (exit $ac_status); } &&
5539          { ac_try='test -s conftest$ac_exeext'
5540   { (eval echo "$as_me:5540: \"$ac_try\"") >&5
5541   (eval $ac_try) 2>&5
5542   ac_status=$?
5543   echo "$as_me:5543: \$? = $ac_status" >&5
5544   (exit $ac_status); }; }; then
5545   ac_cv_lib_dl_dlsym=yes
5546 else
5547   echo "$as_me: failed program was:" >&5
5548 cat conftest.$ac_ext >&5
5549 ac_cv_lib_dl_dlsym=no
5550 fi
5551 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5552 LIBS=$ac_check_lib_save_LIBS
5553 fi
5554 echo "$as_me:5554: result: $ac_cv_lib_dl_dlsym" >&5
5555 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5556 if test $ac_cv_lib_dl_dlsym = yes; then
5557
5558         cf_have_dlsym=yes
5559         cf_have_libdl=yes
5560 fi
5561
5562 fi
5563
5564 if test "$cf_have_dlsym" = yes ; then
5565         test "$cf_have_libdl" = yes && {
5566 cf_add_libs="-ldl"
5567 # Filter out duplicates - this happens with badly-designed ".pc" files...
5568 for cf_add_1lib in $LIBS
5569 do
5570         for cf_add_2lib in $cf_add_libs
5571         do
5572                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5573                 then
5574                         cf_add_1lib=
5575                         break
5576                 fi
5577         done
5578         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5579 done
5580 LIBS="$cf_add_libs"
5581  }
5582
5583         echo "$as_me:5583: checking whether able to link to dl*() functions" >&5
5584 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5585         cat >conftest.$ac_ext <<_ACEOF
5586 #line 5586 "configure"
5587 #include "confdefs.h"
5588 #include <dlfcn.h>
5589 int
5590 main (void)
5591 {
5592
5593                 void *obj;
5594                 if ((obj = dlopen("filename", 0)) != 0) {
5595                         if (dlsym(obj, "symbolname") == 0) {
5596                         dlclose(obj);
5597                         }
5598                 }
5599   ;
5600   return 0;
5601 }
5602 _ACEOF
5603 rm -f conftest.$ac_objext conftest$ac_exeext
5604 if { (eval echo "$as_me:5604: \"$ac_link\"") >&5
5605   (eval $ac_link) 2>&5
5606   ac_status=$?
5607   echo "$as_me:5607: \$? = $ac_status" >&5
5608   (exit $ac_status); } &&
5609          { ac_try='test -s conftest$ac_exeext'
5610   { (eval echo "$as_me:5610: \"$ac_try\"") >&5
5611   (eval $ac_try) 2>&5
5612   ac_status=$?
5613   echo "$as_me:5613: \$? = $ac_status" >&5
5614   (exit $ac_status); }; }; then
5615
5616 cat >>confdefs.h <<\EOF
5617 #define HAVE_LIBDL 1
5618 EOF
5619
5620 else
5621   echo "$as_me: failed program was:" >&5
5622 cat conftest.$ac_ext >&5
5623
5624                 { { echo "$as_me:5624: error: Cannot link test program for libdl" >&5
5625 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5626    { (exit 1); exit 1; }; }
5627 fi
5628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5629         echo "$as_me:5629: result: ok" >&5
5630 echo "${ECHO_T}ok" >&6
5631 else
5632         { { echo "$as_me:5632: error: Cannot find dlsym function" >&5
5633 echo "$as_me: error: Cannot find dlsym function" >&2;}
5634    { (exit 1); exit 1; }; }
5635 fi
5636
5637                 if test "x$with_gpm" != xyes ; then
5638                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5639
5640 echo "${as_me:-configure}:5640: testing assuming soname for gpm is $with_gpm ..." 1>&5
5641
5642                         cf_cv_gpm_soname="$with_gpm"
5643                 else
5644
5645 echo "$as_me:5645: checking for soname of gpm library" >&5
5646 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5647 if test "${cf_cv_gpm_soname+set}" = set; then
5648   echo $ECHO_N "(cached) $ECHO_C" >&6
5649 else
5650
5651 cf_cv_gpm_soname=unknown
5652 if test "$cross_compiling" != yes ; then
5653 cat >conftest.$ac_ext <<CF_EOF
5654 #include <gpm.h>
5655 int main(void)
5656 {
5657 if (Gpm_Open(0,0)) Gpm_Close();
5658         ${cf_cv_main_return:-return}(0);
5659 }
5660 CF_EOF
5661 cf_save_LIBS="$LIBS"
5662
5663 cf_add_libs="-lgpm"
5664 # Filter out duplicates - this happens with badly-designed ".pc" files...
5665 for cf_add_1lib in $LIBS
5666 do
5667         for cf_add_2lib in $cf_add_libs
5668         do
5669                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5670                 then
5671                         cf_add_1lib=
5672                         break
5673                 fi
5674         done
5675         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5676 done
5677 LIBS="$cf_add_libs"
5678
5679         if { (eval echo "$as_me:5679: \"$ac_compile\"") >&5
5680   (eval $ac_compile) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); } ; then
5684                 if { (eval echo "$as_me:5684: \"$ac_link\"") >&5
5685   (eval $ac_link) 2>&5
5686   ac_status=$?
5687   echo "$as_me:5687: \$? = $ac_status" >&5
5688   (exit $ac_status); } ; then
5689                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5690                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5691                 fi
5692         fi
5693 rm -rf conftest*
5694 LIBS="$cf_save_LIBS"
5695 fi
5696
5697 fi
5698 echo "$as_me:5698: result: $cf_cv_gpm_soname" >&5
5699 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5700
5701                 fi
5702                 test "$cf_cv_gpm_soname" != "unknown" &&
5703 cat >>confdefs.h <<EOF
5704 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5705 EOF
5706
5707                 SHLIB_LIST="-ldl $SHLIB_LIST"
5708         else
5709                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5710
5711 cf_add_libs="-lgpm"
5712 # Filter out duplicates - this happens with badly-designed ".pc" files...
5713 for cf_add_1lib in $TEST_LIBS
5714 do
5715         for cf_add_2lib in $cf_add_libs
5716         do
5717                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5718                 then
5719                         cf_add_1lib=
5720                         break
5721                 fi
5722         done
5723         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5724 done
5725 TEST_LIBS="$cf_add_libs"
5726
5727         fi
5728
5729 cat >>confdefs.h <<\EOF
5730 #define HAVE_LIBGPM 1
5731 EOF
5732
5733 echo "$as_me:5733: checking for Gpm_Wgetch in -lgpm" >&5
5734 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5735 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5736   echo $ECHO_N "(cached) $ECHO_C" >&6
5737 else
5738   ac_check_lib_save_LIBS=$LIBS
5739 LIBS="-lgpm  $LIBS"
5740 cat >conftest.$ac_ext <<_ACEOF
5741 #line 5741 "configure"
5742 #include "confdefs.h"
5743
5744 /* Override any gcc2 internal prototype to avoid an error.  */
5745 #ifdef __cplusplus
5746 extern "C"
5747 #endif
5748 /* We use char because int might match the return type of a gcc2
5749    builtin and then its argument prototype would still apply.  */
5750 char Gpm_Wgetch ();
5751 int
5752 main (void)
5753 {
5754 Gpm_Wgetch ();
5755   ;
5756   return 0;
5757 }
5758 _ACEOF
5759 rm -f conftest.$ac_objext conftest$ac_exeext
5760 if { (eval echo "$as_me:5760: \"$ac_link\"") >&5
5761   (eval $ac_link) 2>&5
5762   ac_status=$?
5763   echo "$as_me:5763: \$? = $ac_status" >&5
5764   (exit $ac_status); } &&
5765          { ac_try='test -s conftest$ac_exeext'
5766   { (eval echo "$as_me:5766: \"$ac_try\"") >&5
5767   (eval $ac_try) 2>&5
5768   ac_status=$?
5769   echo "$as_me:5769: \$? = $ac_status" >&5
5770   (exit $ac_status); }; }; then
5771   ac_cv_lib_gpm_Gpm_Wgetch=yes
5772 else
5773   echo "$as_me: failed program was:" >&5
5774 cat conftest.$ac_ext >&5
5775 ac_cv_lib_gpm_Gpm_Wgetch=no
5776 fi
5777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5778 LIBS=$ac_check_lib_save_LIBS
5779 fi
5780 echo "$as_me:5780: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5781 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5782 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5783
5784 echo "$as_me:5784: checking if GPM is weakly bound to curses library" >&5
5785 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5786 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5787   echo $ECHO_N "(cached) $ECHO_C" >&6
5788 else
5789
5790 cf_cv_check_gpm_wgetch=unknown
5791 if test "$cross_compiling" != yes ; then
5792
5793 cat >conftest.$ac_ext <<CF_EOF
5794 #include <gpm.h>
5795 int main(void)
5796 {
5797         Gpm_Wgetch();
5798         ${cf_cv_main_return:-return}(0);
5799 }
5800 CF_EOF
5801
5802         cf_save_LIBS="$LIBS"
5803         # This only works if we can look at the symbol table.  If a shared
5804         # library is stripped for install, we cannot use that.  So we're forced
5805         # to rely on the static library, noting that some packagers may not
5806         # include it.
5807         LIBS="-static -lgpm -dynamic $LIBS"
5808         if { (eval echo "$as_me:5808: \"$ac_compile\"") >&5
5809   (eval $ac_compile) 2>&5
5810   ac_status=$?
5811   echo "$as_me:5811: \$? = $ac_status" >&5
5812   (exit $ac_status); } ; then
5813                 if { (eval echo "$as_me:5813: \"$ac_link\"") >&5
5814   (eval $ac_link) 2>&5
5815   ac_status=$?
5816   echo "$as_me:5816: \$? = $ac_status" >&5
5817   (exit $ac_status); } ; then
5818                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5819                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5820                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5821                 fi
5822         fi
5823         rm -rf conftest*
5824         LIBS="$cf_save_LIBS"
5825 fi
5826
5827 fi
5828 echo "$as_me:5828: result: $cf_cv_check_gpm_wgetch" >&5
5829 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5830
5831 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5832         { echo "$as_me:5832: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5833 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5834 fi
5835
5836 fi
5837
5838 fi
5839
5840 # not everyone has "test -c"
5841 if test -c /dev/sysmouse 2>/dev/null ; then
5842 echo "$as_me:5842: checking if you want to use sysmouse" >&5
5843 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5844
5845 # Check whether --with-sysmouse or --without-sysmouse was given.
5846 if test "${with_sysmouse+set}" = set; then
5847   withval="$with_sysmouse"
5848   cf_with_sysmouse=$withval
5849 else
5850   cf_with_sysmouse=maybe
5851 fi;
5852         if test "$cf_with_sysmouse" != no ; then
5853         cat >conftest.$ac_ext <<_ACEOF
5854 #line 5854 "configure"
5855 #include "confdefs.h"
5856
5857 #include <osreldate.h>
5858 #if (__FreeBSD_version >= 400017)
5859 #include <sys/consio.h>
5860 #include <sys/fbio.h>
5861 #else
5862 #include <machine/console.h>
5863 #endif
5864
5865 int
5866 main (void)
5867 {
5868
5869         struct mouse_info the_mouse;
5870         ioctl(0, CONS_MOUSECTL, &the_mouse);
5871
5872   ;
5873   return 0;
5874 }
5875 _ACEOF
5876 rm -f conftest.$ac_objext
5877 if { (eval echo "$as_me:5877: \"$ac_compile\"") >&5
5878   (eval $ac_compile) 2>&5
5879   ac_status=$?
5880   echo "$as_me:5880: \$? = $ac_status" >&5
5881   (exit $ac_status); } &&
5882          { ac_try='test -s conftest.$ac_objext'
5883   { (eval echo "$as_me:5883: \"$ac_try\"") >&5
5884   (eval $ac_try) 2>&5
5885   ac_status=$?
5886   echo "$as_me:5886: \$? = $ac_status" >&5
5887   (exit $ac_status); }; }; then
5888   cf_with_sysmouse=yes
5889 else
5890   echo "$as_me: failed program was:" >&5
5891 cat conftest.$ac_ext >&5
5892 cf_with_sysmouse=no
5893 fi
5894 rm -f conftest.$ac_objext conftest.$ac_ext
5895         fi
5896 echo "$as_me:5896: result: $cf_with_sysmouse" >&5
5897 echo "${ECHO_T}$cf_with_sysmouse" >&6
5898 test "$cf_with_sysmouse" = yes &&
5899 cat >>confdefs.h <<\EOF
5900 #define USE_SYSMOUSE 1
5901 EOF
5902
5903 fi
5904
5905 if test X"$CC_G_OPT" = X"" ; then
5906         CC_G_OPT='-g'
5907         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5908 fi
5909
5910 if test X"$CXX_G_OPT" = X"" ; then
5911         CXX_G_OPT='-g'
5912         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5913 fi
5914
5915 echo "$as_me:5915: checking for default loader flags" >&5
5916 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5917 case $DFT_LWR_MODEL in
5918 (libtool) LD_MODEL=''   ;;
5919 (normal)  LD_MODEL=''   ;;
5920 (debug)   LD_MODEL=$CC_G_OPT ;;
5921 (profile) LD_MODEL='-pg';;
5922 (shared)  LD_MODEL=''   ;;
5923 esac
5924 echo "$as_me:5924: result: $LD_MODEL" >&5
5925 echo "${ECHO_T}$LD_MODEL" >&6
5926
5927 case $DFT_LWR_MODEL in
5928 (shared)
5929
5930 echo "$as_me:5930: checking if rpath option should be used" >&5
5931 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5932
5933 # Check whether --enable-rpath or --disable-rpath was given.
5934 if test "${enable_rpath+set}" = set; then
5935   enableval="$enable_rpath"
5936   cf_cv_enable_rpath=$enableval
5937 else
5938   cf_cv_enable_rpath=no
5939 fi;
5940 echo "$as_me:5940: result: $cf_cv_enable_rpath" >&5
5941 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5942
5943 echo "$as_me:5943: checking if shared libraries should be relinked during install" >&5
5944 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5945
5946 # Check whether --enable-relink or --disable-relink was given.
5947 if test "${enable_relink+set}" = set; then
5948   enableval="$enable_relink"
5949   cf_cv_do_relink=$enableval
5950 else
5951   cf_cv_do_relink=yes
5952 fi;
5953 echo "$as_me:5953: result: $cf_cv_do_relink" >&5
5954 echo "${ECHO_T}$cf_cv_do_relink" >&6
5955         ;;
5956 esac
5957
5958 # we will build libraries one-level down.
5959 rel_builddir=..
5960
5961 LD_RPATH_OPT=
5962 echo "$as_me:5962: checking for an rpath option" >&5
5963 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5964 case $cf_cv_system_name in
5965 (irix*)
5966         if test "$GCC" = yes; then
5967                 LD_RPATH_OPT="-Wl,-rpath,"
5968         else
5969                 LD_RPATH_OPT="-rpath "
5970         fi
5971         ;;
5972 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5973         LD_RPATH_OPT="-Wl,-rpath,"
5974         ;;
5975 (openbsd[2-9].*|mirbsd*)
5976         LD_RPATH_OPT="-Wl,-rpath,"
5977         ;;
5978 (dragonfly*)
5979         LD_RPATH_OPT="-rpath "
5980         ;;
5981 (netbsd*)
5982         LD_RPATH_OPT="-Wl,-rpath,"
5983         ;;
5984 (osf*|mls+*)
5985         LD_RPATH_OPT="-rpath "
5986         ;;
5987 (solaris2*)
5988         LD_RPATH_OPT="-R"
5989         ;;
5990 (*)
5991         ;;
5992 esac
5993 echo "$as_me:5993: result: $LD_RPATH_OPT" >&5
5994 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5995
5996 case "x$LD_RPATH_OPT" in
5997 (x-R*)
5998         echo "$as_me:5998: checking if we need a space after rpath option" >&5
5999 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6000         cf_save_LIBS="$LIBS"
6001
6002 cf_add_libs="${LD_RPATH_OPT}$libdir"
6003 # Filter out duplicates - this happens with badly-designed ".pc" files...
6004 for cf_add_1lib in $LIBS
6005 do
6006         for cf_add_2lib in $cf_add_libs
6007         do
6008                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6009                 then
6010                         cf_add_1lib=
6011                         break
6012                 fi
6013         done
6014         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6015 done
6016 LIBS="$cf_add_libs"
6017
6018         cat >conftest.$ac_ext <<_ACEOF
6019 #line 6019 "configure"
6020 #include "confdefs.h"
6021
6022 int
6023 main (void)
6024 {
6025
6026   ;
6027   return 0;
6028 }
6029 _ACEOF
6030 rm -f conftest.$ac_objext conftest$ac_exeext
6031 if { (eval echo "$as_me:6031: \"$ac_link\"") >&5
6032   (eval $ac_link) 2>&5
6033   ac_status=$?
6034   echo "$as_me:6034: \$? = $ac_status" >&5
6035   (exit $ac_status); } &&
6036          { ac_try='test -s conftest$ac_exeext'
6037   { (eval echo "$as_me:6037: \"$ac_try\"") >&5
6038   (eval $ac_try) 2>&5
6039   ac_status=$?
6040   echo "$as_me:6040: \$? = $ac_status" >&5
6041   (exit $ac_status); }; }; then
6042   cf_rpath_space=no
6043 else
6044   echo "$as_me: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6046 cf_rpath_space=yes
6047 fi
6048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6049         LIBS="$cf_save_LIBS"
6050         echo "$as_me:6050: result: $cf_rpath_space" >&5
6051 echo "${ECHO_T}$cf_rpath_space" >&6
6052         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6053         ;;
6054 esac
6055
6056         RM_SHARED_OPTS=
6057         LOCAL_LDFLAGS=
6058         LOCAL_LDFLAGS2=
6059         LD_SHARED_OPTS=
6060         INSTALL_LIB="-m 644"
6061         : ${rel_builddir:=.}
6062
6063         shlibdir=$libdir
6064
6065         MAKE_DLLS="#"
6066
6067         cf_cv_do_symlinks=no
6068         cf_ld_rpath_opt=
6069         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6070
6071         echo "$as_me:6071: checking if release/abi version should be used for shared libs" >&5
6072 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6073
6074 # Check whether --with-shlib-version or --without-shlib-version was given.
6075 if test "${with_shlib_version+set}" = set; then
6076   withval="$with_shlib_version"
6077   test -z "$withval" && withval=auto
6078         case $withval in
6079         (yes)
6080                 cf_cv_shlib_version=auto
6081                 ;;
6082         (rel|abi|auto)
6083                 cf_cv_shlib_version=$withval
6084                 ;;
6085         (*)
6086                 echo "$as_me:6086: result: $withval" >&5
6087 echo "${ECHO_T}$withval" >&6
6088                 { { echo "$as_me:6088: error: option value must be one of: rel, abi, or auto" >&5
6089 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6090    { (exit 1); exit 1; }; }
6091                 ;;
6092         esac
6093
6094 else
6095   cf_cv_shlib_version=auto
6096 fi;
6097         echo "$as_me:6097: result: $cf_cv_shlib_version" >&5
6098 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6099
6100         cf_cv_rm_so_locs=no
6101         cf_try_cflags=
6102
6103         # Some less-capable ports of gcc support only -fpic
6104         CC_SHARED_OPTS=
6105
6106         cf_try_fPIC=no
6107         if test "$GCC" = yes
6108         then
6109                 cf_try_fPIC=yes
6110         else
6111                 case $cf_cv_system_name in
6112                 (*linux*)       # e.g., PGI compiler
6113                         cf_try_fPIC=yes
6114                         ;;
6115                 esac
6116         fi
6117
6118         if test "$cf_try_fPIC" = yes
6119         then
6120                 echo "$as_me:6120: checking which $CC option to use" >&5
6121 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6122                 cf_save_CFLAGS="$CFLAGS"
6123                 for CC_SHARED_OPTS in -fPIC -fpic ''
6124                 do
6125                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6126                         cat >conftest.$ac_ext <<_ACEOF
6127 #line 6127 "configure"
6128 #include "confdefs.h"
6129 #include <stdio.h>
6130 int
6131 main (void)
6132 {
6133 int x = 1
6134   ;
6135   return 0;
6136 }
6137 _ACEOF
6138 rm -f conftest.$ac_objext
6139 if { (eval echo "$as_me:6139: \"$ac_compile\"") >&5
6140   (eval $ac_compile) 2>&5
6141   ac_status=$?
6142   echo "$as_me:6142: \$? = $ac_status" >&5
6143   (exit $ac_status); } &&
6144          { ac_try='test -s conftest.$ac_objext'
6145   { (eval echo "$as_me:6145: \"$ac_try\"") >&5
6146   (eval $ac_try) 2>&5
6147   ac_status=$?
6148   echo "$as_me:6148: \$? = $ac_status" >&5
6149   (exit $ac_status); }; }; then
6150   break
6151 else
6152   echo "$as_me: failed program was:" >&5
6153 cat conftest.$ac_ext >&5
6154 fi
6155 rm -f conftest.$ac_objext conftest.$ac_ext
6156                 done
6157                 echo "$as_me:6157: result: $CC_SHARED_OPTS" >&5
6158 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6159                 CFLAGS="$cf_save_CFLAGS"
6160         fi
6161
6162         cf_cv_shlib_version_infix=no
6163
6164         case $cf_cv_system_name in
6165         (aix4.3-9*|aix[5-7]*)
6166                 if test "$GCC" = yes; then
6167                         CC_SHARED_OPTS='-Wl,-brtl'
6168                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6169                 else
6170                         CC_SHARED_OPTS='-brtl'
6171                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6172                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6173                 fi
6174                 ;;
6175         (beos*)
6176                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6177                 ;;
6178         (cygwin*)
6179                 CC_SHARED_OPTS=
6180                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6181                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6182                 cf_cv_shlib_version=cygdll
6183                 cf_cv_shlib_version_infix=cygdll
6184                 shlibdir=$bindir
6185                 MAKE_DLLS=
6186                 cat >mk_shared_lib.sh <<-CF_EOF
6187                 #!$SHELL
6188                 SHARED_LIB=\$1
6189                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6190                 shift
6191                 cat <<-EOF
6192                 Linking shared library
6193                 ** SHARED_LIB \$SHARED_LIB
6194                 ** IMPORT_LIB \$IMPORT_LIB
6195 EOF
6196                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6197 CF_EOF
6198                 chmod +x mk_shared_lib.sh
6199                 ;;
6200         (msys*)
6201                 CC_SHARED_OPTS=
6202                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6203                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6204                 cf_cv_shlib_version=msysdll
6205                 cf_cv_shlib_version_infix=msysdll
6206                 shlibdir=$bindir
6207                 MAKE_DLLS=
6208                 cat >mk_shared_lib.sh <<-CF_EOF
6209                 #!$SHELL
6210                 SHARED_LIB=\$1
6211                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6212                 shift
6213                 cat <<-EOF
6214                 Linking shared library
6215                 ** SHARED_LIB \$SHARED_LIB
6216                 ** IMPORT_LIB \$IMPORT_LIB
6217 EOF
6218                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6219 CF_EOF
6220                 chmod +x mk_shared_lib.sh
6221                 ;;
6222         (darwin*)
6223                 cf_try_cflags="no-cpp-precomp"
6224                 CC_SHARED_OPTS="-dynamic"
6225                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6226                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6227                 cf_cv_shlib_version_infix=yes
6228                 echo "$as_me:6228: checking if ld -search_paths_first works" >&5
6229 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6230 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6231   echo $ECHO_N "(cached) $ECHO_C" >&6
6232 else
6233
6234                         cf_save_LDFLAGS=$LDFLAGS
6235                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6236                         cat >conftest.$ac_ext <<_ACEOF
6237 #line 6237 "configure"
6238 #include "confdefs.h"
6239
6240 int
6241 main (void)
6242 {
6243 int i;
6244   ;
6245   return 0;
6246 }
6247 _ACEOF
6248 rm -f conftest.$ac_objext conftest$ac_exeext
6249 if { (eval echo "$as_me:6249: \"$ac_link\"") >&5
6250   (eval $ac_link) 2>&5
6251   ac_status=$?
6252   echo "$as_me:6252: \$? = $ac_status" >&5
6253   (exit $ac_status); } &&
6254          { ac_try='test -s conftest$ac_exeext'
6255   { (eval echo "$as_me:6255: \"$ac_try\"") >&5
6256   (eval $ac_try) 2>&5
6257   ac_status=$?
6258   echo "$as_me:6258: \$? = $ac_status" >&5
6259   (exit $ac_status); }; }; then
6260   cf_cv_ldflags_search_paths_first=yes
6261 else
6262   echo "$as_me: failed program was:" >&5
6263 cat conftest.$ac_ext >&5
6264 cf_cv_ldflags_search_paths_first=no
6265 fi
6266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6267                                 LDFLAGS=$cf_save_LDFLAGS
6268 fi
6269 echo "$as_me:6269: result: $cf_cv_ldflags_search_paths_first" >&5
6270 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6271                 if test $cf_cv_ldflags_search_paths_first = yes; then
6272                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6273                 fi
6274                 ;;
6275         (hpux[7-8]*)
6276                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6277                 if test "$GCC" != yes; then
6278                         CC_SHARED_OPTS='+Z'
6279                 fi
6280                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6281                 INSTALL_LIB="-m 555"
6282                 ;;
6283         (hpux*)
6284                 # (tested with gcc 2.7.2 -- I don't have c89)
6285                 if test "$GCC" = yes; then
6286                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6287                 else
6288                         CC_SHARED_OPTS='+Z'
6289                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6290                 fi
6291                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6292                 # HP-UX shared libraries must be executable, and should be
6293                 # readonly to exploit a quirk in the memory manager.
6294                 INSTALL_LIB="-m 555"
6295                 ;;
6296         (interix*)
6297                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6298                 if test "$cf_cv_shlib_version" = rel; then
6299                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6300                 else
6301                         cf_shared_soname='`basename $@`'
6302                 fi
6303                 CC_SHARED_OPTS=
6304                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6305                 ;;
6306         (irix*)
6307                 if test "$cf_cv_enable_rpath" = yes ; then
6308                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6309                 fi
6310                 # tested with IRIX 5.2 and 'cc'.
6311                 if test "$GCC" != yes; then
6312                         CC_SHARED_OPTS='-KPIC'
6313                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6314                 else
6315                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6316                 fi
6317                 cf_cv_rm_so_locs=yes
6318                 ;;
6319         (linux*|gnu*|k*bsd*-gnu)
6320                 if test "$DFT_LWR_MODEL" = "shared" ; then
6321                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                 fi
6324                 if test "$cf_cv_enable_rpath" = yes ; then
6325                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6326                 fi
6327
6328         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6329         if test "$cf_cv_shlib_version" = rel; then
6330                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6331         else
6332                 cf_cv_shared_soname='`basename $@`'
6333         fi
6334
6335                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6336                 ;;
6337         (mingw*)
6338                 cf_cv_shlib_version=mingw
6339                 cf_cv_shlib_version_infix=mingw
6340                 shlibdir=$bindir
6341                 MAKE_DLLS=
6342                 if test "$DFT_LWR_MODEL" = "shared" ; then
6343                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6344                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6345                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6346                 fi
6347                 CC_SHARED_OPTS=
6348                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6349                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6350                 cat >mk_shared_lib.sh <<-CF_EOF
6351                 #!$SHELL
6352                 SHARED_LIB=\$1
6353                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6354                 shift
6355                 cat <<-EOF
6356                 Linking shared library
6357                 ** SHARED_LIB \$SHARED_LIB
6358                 ** IMPORT_LIB \$IMPORT_LIB
6359 EOF
6360                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6361 CF_EOF
6362                 chmod +x mk_shared_lib.sh
6363                 ;;
6364         (openbsd[2-9].*|mirbsd*)
6365                 if test "$DFT_LWR_MODEL" = "shared" ; then
6366                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6367                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6368                 fi
6369                 if test "$cf_cv_enable_rpath" = yes ; then
6370                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6371                 fi
6372                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6373
6374         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6375         if test "$cf_cv_shlib_version" = rel; then
6376                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6377         else
6378                 cf_cv_shared_soname='`basename $@`'
6379         fi
6380
6381                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6382                 ;;
6383         (nto-qnx*|openbsd*|freebsd[12].*)
6384                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6385                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6386                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6387                 ;;
6388         (dragonfly*|freebsd*)
6389                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6390                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6391                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6392                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6393                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6394                 fi
6395
6396         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6397         if test "$cf_cv_shlib_version" = rel; then
6398                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6399         else
6400                 cf_cv_shared_soname='`basename $@`'
6401         fi
6402
6403                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6404                 ;;
6405         (netbsd*)
6406                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6407                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6408                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6409                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6410                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6411                         if test "$cf_cv_shlib_version" = auto; then
6412                         if test -f /usr/libexec/ld.elf_so; then
6413                                 cf_cv_shlib_version=abi
6414                         else
6415                                 cf_cv_shlib_version=rel
6416                         fi
6417                         fi
6418
6419         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6420         if test "$cf_cv_shlib_version" = rel; then
6421                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6422         else
6423                 cf_cv_shared_soname='`basename $@`'
6424         fi
6425
6426                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6427                 else
6428                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6429                 fi
6430                 ;;
6431         (osf*|mls+*)
6432                 # tested with OSF/1 V3.2 and 'cc'
6433                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6434                 # link with shared libs).
6435                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6436                 case $host_os in
6437                 (osf4*)
6438                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6439                         ;;
6440                 esac
6441                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6442                 if test "$DFT_LWR_MODEL" = "shared" ; then
6443                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6444                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6445                 fi
6446                 cf_cv_rm_so_locs=yes
6447                 ;;
6448         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6449                 # tested with osr5.0.5
6450                 if test "$GCC" != yes; then
6451                         CC_SHARED_OPTS='-belf -KPIC'
6452                 fi
6453                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6454                 if test "$cf_cv_enable_rpath" = yes ; then
6455                         # only way is to set LD_RUN_PATH but no switch for it
6456                         RUN_PATH=$libdir
6457                 fi
6458                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6459                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6460                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6461                 ;;
6462         (sunos4*)
6463                 # tested with SunOS 4.1.1 and gcc 2.7.0
6464                 if test "$GCC" != yes; then
6465                         CC_SHARED_OPTS='-KPIC'
6466                 fi
6467                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6468                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6469                 ;;
6470         (solaris2*)
6471                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6472                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6473                 if test "$DFT_LWR_MODEL" = "shared" ; then
6474                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6475                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6476                 fi
6477                 if test "$cf_cv_enable_rpath" = yes ; then
6478                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6479                 fi
6480
6481         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6482         if test "$cf_cv_shlib_version" = rel; then
6483                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6484         else
6485                 cf_cv_shared_soname='`basename $@`'
6486         fi
6487
6488                 if test "$GCC" != yes; then
6489                         cf_save_CFLAGS="$CFLAGS"
6490                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6491                         do
6492                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6493                                 cat >conftest.$ac_ext <<_ACEOF
6494 #line 6494 "configure"
6495 #include "confdefs.h"
6496 #include <stdio.h>
6497 int
6498 main (void)
6499 {
6500 printf("Hello\n");
6501   ;
6502   return 0;
6503 }
6504 _ACEOF
6505 rm -f conftest.$ac_objext
6506 if { (eval echo "$as_me:6506: \"$ac_compile\"") >&5
6507   (eval $ac_compile) 2>&5
6508   ac_status=$?
6509   echo "$as_me:6509: \$? = $ac_status" >&5
6510   (exit $ac_status); } &&
6511          { ac_try='test -s conftest.$ac_objext'
6512   { (eval echo "$as_me:6512: \"$ac_try\"") >&5
6513   (eval $ac_try) 2>&5
6514   ac_status=$?
6515   echo "$as_me:6515: \$? = $ac_status" >&5
6516   (exit $ac_status); }; }; then
6517   break
6518 else
6519   echo "$as_me: failed program was:" >&5
6520 cat conftest.$ac_ext >&5
6521 fi
6522 rm -f conftest.$ac_objext conftest.$ac_ext
6523                         done
6524                         CFLAGS="$cf_save_CFLAGS"
6525                         CC_SHARED_OPTS=$cf_shared_opts
6526                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6527                 else
6528                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6529                 fi
6530                 ;;
6531         (sysv5uw7*|unix_sv*)
6532                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6533                 if test "$GCC" != yes; then
6534                         CC_SHARED_OPTS='-KPIC'
6535                 fi
6536                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6537                 ;;
6538         (*)
6539                 CC_SHARED_OPTS='unknown'
6540                 MK_SHARED_LIB='echo unknown'
6541                 ;;
6542         esac
6543
6544         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6545         case "$cf_cv_shlib_version" in
6546         (rel|abi)
6547                 case "$MK_SHARED_LIB" in
6548                 (*'-o $@')
6549                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6550                         ;;
6551                 (*)
6552                         { echo "$as_me:6552: WARNING: ignored --with-shlib-version" >&5
6553 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6554                         ;;
6555                 esac
6556                 ;;
6557         esac
6558
6559         if test -n "$cf_try_cflags"
6560         then
6561 cat > conftest.$ac_ext <<EOF
6562 #line 6562 "${as_me:-configure}"
6563 #include <stdio.h>
6564 int main(int argc, char *argv[])
6565 {
6566         printf("hello\n");
6567         return (argv[argc-1] == 0) ;
6568 }
6569 EOF
6570                 cf_save_CFLAGS="$CFLAGS"
6571                 for cf_opt in $cf_try_cflags
6572                 do
6573                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6574                         echo "$as_me:6574: checking if CFLAGS option -$cf_opt works" >&5
6575 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6576                         if { (eval echo "$as_me:6576: \"$ac_compile\"") >&5
6577   (eval $ac_compile) 2>&5
6578   ac_status=$?
6579   echo "$as_me:6579: \$? = $ac_status" >&5
6580   (exit $ac_status); }; then
6581                                 echo "$as_me:6581: result: yes" >&5
6582 echo "${ECHO_T}yes" >&6
6583                                 cf_save_CFLAGS="$CFLAGS"
6584                         else
6585                                 echo "$as_me:6585: result: no" >&5
6586 echo "${ECHO_T}no" >&6
6587                         fi
6588                 done
6589                 CFLAGS="$cf_save_CFLAGS"
6590         fi
6591
6592         # RPATH_LIST is a colon-separated list of directories
6593         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6594         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6595
6596         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6597
6598         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6599
6600 echo "${as_me:-configure}:6600: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6601
6602         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6603
6604 echo "${as_me:-configure}:6604: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6605
6606 for model in $cf_list_models; do
6607         case $model in
6608         (libtool)
6609
6610 echo "$as_me:6610: checking for additional libtool options" >&5
6611 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6612
6613 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6614 if test "${with_libtool_opts+set}" = set; then
6615   withval="$with_libtool_opts"
6616   with_libtool_opts=$withval
6617 else
6618   with_libtool_opts=no
6619 fi;
6620 echo "$as_me:6620: result: $with_libtool_opts" >&5
6621 echo "${ECHO_T}$with_libtool_opts" >&6
6622
6623 case .$with_libtool_opts in
6624 (.yes|.no|.)
6625         ;;
6626 (*)
6627         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6628         ;;
6629 esac
6630
6631 echo "$as_me:6631: checking if exported-symbols file should be used" >&5
6632 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6633
6634 # Check whether --with-export-syms or --without-export-syms was given.
6635 if test "${with_export_syms+set}" = set; then
6636   withval="$with_export_syms"
6637   with_export_syms=$withval
6638 else
6639   with_export_syms=no
6640 fi;
6641 if test "x$with_export_syms" = xyes
6642 then
6643         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6644
6645 fi
6646 echo "$as_me:6646: result: $with_export_syms" >&5
6647 echo "${ECHO_T}$with_export_syms" >&6
6648 if test "x$with_export_syms" != xno
6649 then
6650         EXPORT_SYMS="-export-symbols $with_export_syms"
6651
6652 fi
6653
6654                 ;;
6655         (shared)
6656                 if test "$CC_SHARED_OPTS" = "unknown"; then
6657                         { { echo "$as_me:6657: error: Shared libraries are not supported in this version" >&5
6658 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6659    { (exit 1); exit 1; }; }
6660                 fi
6661                 # workaround for inept transition to PIE vs PIC...
6662                 echo "$as_me:6662: checking if current CFLAGS link properly" >&5
6663 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6664                 cat >conftest.$ac_ext <<_ACEOF
6665 #line 6665 "configure"
6666 #include "confdefs.h"
6667 #include <stdio.h>
6668 int
6669 main (void)
6670 {
6671 printf("Hello work\n");
6672   ;
6673   return 0;
6674 }
6675 _ACEOF
6676 rm -f conftest.$ac_objext conftest$ac_exeext
6677 if { (eval echo "$as_me:6677: \"$ac_link\"") >&5
6678   (eval $ac_link) 2>&5
6679   ac_status=$?
6680   echo "$as_me:6680: \$? = $ac_status" >&5
6681   (exit $ac_status); } &&
6682          { ac_try='test -s conftest$ac_exeext'
6683   { (eval echo "$as_me:6683: \"$ac_try\"") >&5
6684   (eval $ac_try) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); }; }; then
6688   cf_cflags_work=yes
6689 else
6690   echo "$as_me: failed program was:" >&5
6691 cat conftest.$ac_ext >&5
6692 cf_cflags_work=no
6693 fi
6694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6695                 echo "$as_me:6695: result: $cf_cflags_work" >&5
6696 echo "${ECHO_T}$cf_cflags_work" >&6
6697                 if test "$cf_cflags_work" = no
6698                 then
6699                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6700
6701 echo "${as_me:-configure}:6701: testing try to work around by appending shared-options ..." 1>&5
6702
6703                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6704                 fi
6705
6706 echo "$as_me:6706: checking if versioned-symbols file should be used" >&5
6707 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6708
6709 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6710 if test "${with_versioned_syms+set}" = set; then
6711   withval="$with_versioned_syms"
6712   with_versioned_syms=$withval
6713 else
6714   with_versioned_syms=no
6715 fi;
6716 if test "x$with_versioned_syms" = xyes
6717 then
6718         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6719
6720 fi
6721 echo "$as_me:6721: result: $with_versioned_syms" >&5
6722 echo "${ECHO_T}$with_versioned_syms" >&6
6723
6724 RESULTING_SYMS=
6725 VERSIONED_SYMS=
6726 WILDCARD_SYMS=
6727
6728 if test "x$with_versioned_syms" != xno
6729 then
6730         RESULTING_SYMS=$with_versioned_syms
6731         case "x$MK_SHARED_LIB" in
6732         (*-Wl,*)
6733                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6734                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6735                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6736
6737 echo "${as_me:-configure}:6737: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6738
6739                 ;;
6740         (*-dy\ *)
6741                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6742                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6743                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6744
6745 echo "${as_me:-configure}:6745: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6746
6747                 ;;
6748         (*)
6749                 { echo "$as_me:6749: WARNING: this system does not support versioned-symbols" >&5
6750 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6751                 ;;
6752         esac
6753
6754         # Linux ld can selectively override scope, e.g., of symbols beginning with
6755         # "_" by first declaring some as global, and then using a wildcard to
6756         # declare the others as local.  Some other loaders cannot do this.  Check
6757         # by constructing a (very) simple shared library and inspecting its
6758         # symbols.
6759         if test "x$VERSIONED_SYMS" != "x"
6760         then
6761                 echo "$as_me:6761: checking if wildcards can be used to selectively omit symbols" >&5
6762 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6763                 WILDCARD_SYMS=no
6764
6765                 # make sources
6766                 rm -f conftest.*
6767
6768                 cat >conftest.ver <<EOF
6769 module_1.0 {
6770 global:
6771         globalf1;
6772 local:
6773         localf1;
6774 };
6775 module_2.0 {
6776 global:
6777         globalf2;
6778 local:
6779         localf2;
6780         _*;
6781 } module_1.0;
6782 submodule_1.0 {
6783 global:
6784         subglobalf1;
6785         _ismissing;
6786 local:
6787         sublocalf1;
6788 };
6789 submodule_2.0 {
6790 global:
6791         subglobalf2;
6792 local:
6793         sublocalf2;
6794         _*;
6795 } submodule_1.0;
6796 EOF
6797                 cat >conftest.$ac_ext <<EOF
6798 #line 6798 "configure"
6799 int     _ismissing(void) { return 1; }
6800 int     _localf1(void) { return 1; }
6801 int     _localf2(void) { return 2; }
6802 int     globalf1(void) { return 1; }
6803 int     globalf2(void) { return 2; }
6804 int     _sublocalf1(void) { return 1; }
6805 int     _sublocalf2(void) { return 2; }
6806 int     subglobalf1(void) { return 1; }
6807 int     subglobalf2(void) { return 2; }
6808 EOF
6809                 cat >conftest.mk <<EOF
6810 CC=${CC}
6811 CFLAGS=${CFLAGS}
6812 CPPFLAGS=${CPPFLAGS}
6813 LDFLAGS=${LDFLAGS}
6814 LIBS=${LIBS}
6815 VERSIONED_SYMS=${VERSIONED_SYMS}
6816 RESULTING_SYMS=conftest.ver
6817 MK_SHARED_LIB=${MK_SHARED_LIB}
6818 conftest.so: conftest.$ac_cv_objext
6819                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6820 EOF
6821
6822                 # compile source, make library
6823                 if make -f conftest.mk 2>&5 >/dev/null
6824                 then
6825                         # test for missing symbol in either Data or Text section
6826                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6827                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6828                 fi
6829                 echo "$as_me:6829: result: $WILDCARD_SYMS" >&5
6830 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6831                 rm -f conftest.*
6832         fi
6833 fi
6834
6835                 ;;
6836         esac
6837 done
6838
6839 # pretend that ncurses==ncursesw==ncursest
6840 echo "$as_me:6840: checking if you want to disable library suffixes" >&5
6841 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6842
6843 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6844 if test "${enable_lib_suffixes+set}" = set; then
6845   enableval="$enable_lib_suffixes"
6846   test "$enableval" != no && enableval=yes
6847         if test "$enableval" != "yes" ; then
6848     disable_lib_suffixes=yes
6849         else
6850                 disable_lib_suffixes=no
6851         fi
6852 else
6853   enableval=yes
6854         disable_lib_suffixes=no
6855
6856 fi;
6857 echo "$as_me:6857: result: $disable_lib_suffixes" >&5
6858 echo "${ECHO_T}$disable_lib_suffixes" >&6
6859
6860 ### If we're building with rpath, try to link non-standard libs that way too.
6861 if test "$DFT_LWR_MODEL" = "shared"; then
6862
6863 echo "$as_me:6863: checking if rpath-hack should be disabled" >&5
6864 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6865
6866 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6867 if test "${enable_rpath_hack+set}" = set; then
6868   enableval="$enable_rpath_hack"
6869   test "$enableval" != no && enableval=yes
6870         if test "$enableval" != "yes" ; then
6871     cf_disable_rpath_hack=yes
6872         else
6873                 cf_disable_rpath_hack=no
6874         fi
6875 else
6876   enableval=yes
6877         cf_disable_rpath_hack=no
6878
6879 fi;
6880 echo "$as_me:6880: result: $cf_disable_rpath_hack" >&5
6881 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6882 if test "$cf_disable_rpath_hack" = no ; then
6883
6884 echo "$as_me:6884: checking for updated LDFLAGS" >&5
6885 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6886 if test -n "$LD_RPATH_OPT" ; then
6887         echo "$as_me:6887: result: maybe" >&5
6888 echo "${ECHO_T}maybe" >&6
6889
6890         for ac_prog in ldd
6891 do
6892   # Extract the first word of "$ac_prog", so it can be a program name with args.
6893 set dummy $ac_prog; ac_word=$2
6894 echo "$as_me:6894: checking for $ac_word" >&5
6895 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6896 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6897   echo $ECHO_N "(cached) $ECHO_C" >&6
6898 else
6899   if test -n "$cf_ldd_prog"; then
6900   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6901 else
6902   ac_save_IFS=$IFS; IFS=$ac_path_separator
6903 ac_dummy="$PATH"
6904 for ac_dir in $ac_dummy; do
6905   IFS=$ac_save_IFS
6906   test -z "$ac_dir" && ac_dir=.
6907   $as_executable_p "$ac_dir/$ac_word" || continue
6908 ac_cv_prog_cf_ldd_prog="$ac_prog"
6909 echo "$as_me:6909: found $ac_dir/$ac_word" >&5
6910 break
6911 done
6912
6913 fi
6914 fi
6915 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6916 if test -n "$cf_ldd_prog"; then
6917   echo "$as_me:6917: result: $cf_ldd_prog" >&5
6918 echo "${ECHO_T}$cf_ldd_prog" >&6
6919 else
6920   echo "$as_me:6920: result: no" >&5
6921 echo "${ECHO_T}no" >&6
6922 fi
6923
6924   test -n "$cf_ldd_prog" && break
6925 done
6926 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6927
6928         cf_rpath_list="/usr/lib /lib"
6929         if test "$cf_ldd_prog" != no
6930         then
6931                 cf_rpath_oops=
6932
6933 cat >conftest.$ac_ext <<_ACEOF
6934 #line 6934 "configure"
6935 #include "confdefs.h"
6936 #include <stdio.h>
6937 int
6938 main (void)
6939 {
6940 printf("Hello");
6941   ;
6942   return 0;
6943 }
6944 _ACEOF
6945 rm -f conftest.$ac_objext conftest$ac_exeext
6946 if { (eval echo "$as_me:6946: \"$ac_link\"") >&5
6947   (eval $ac_link) 2>&5
6948   ac_status=$?
6949   echo "$as_me:6949: \$? = $ac_status" >&5
6950   (exit $ac_status); } &&
6951          { ac_try='test -s conftest$ac_exeext'
6952   { (eval echo "$as_me:6952: \"$ac_try\"") >&5
6953   (eval $ac_try) 2>&5
6954   ac_status=$?
6955   echo "$as_me:6955: \$? = $ac_status" >&5
6956   (exit $ac_status); }; }; then
6957   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6958                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6959 else
6960   echo "$as_me: failed program was:" >&5
6961 cat conftest.$ac_ext >&5
6962 fi
6963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6964
6965                 # If we passed the link-test, but get a "not found" on a given library,
6966                 # this could be due to inept reconfiguration of gcc to make it only
6967                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6968                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6969                 # /usr/local libraries.
6970                 if test -n "$cf_rpath_oops"
6971                 then
6972                         for cf_rpath_src in $cf_rpath_oops
6973                         do
6974                                 for cf_rpath_dir in \
6975                                         /usr/local \
6976                                         /usr/pkg \
6977                                         /opt/sfw
6978                                 do
6979                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6980                                         then
6981                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6982
6983 echo "${as_me:-configure}:6983: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6984
6985                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6986                                                 break
6987                                         fi
6988                                 done
6989                         done
6990                 fi
6991         fi
6992
6993         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6994
6995 echo "${as_me:-configure}:6995: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6996
6997 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6998
6999 echo "${as_me:-configure}:6999: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7000
7001 cf_rpath_dst=
7002 for cf_rpath_src in $LDFLAGS
7003 do
7004         case $cf_rpath_src in
7005         (-L*)
7006
7007                 # check if this refers to a directory which we will ignore
7008                 cf_rpath_skip=no
7009                 if test -n "$cf_rpath_list"
7010                 then
7011                         for cf_rpath_item in $cf_rpath_list
7012                         do
7013                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7014                                 then
7015                                         cf_rpath_skip=yes
7016                                         break
7017                                 fi
7018                         done
7019                 fi
7020
7021                 if test "$cf_rpath_skip" = no
7022                 then
7023                         # transform the option
7024                         if test "$LD_RPATH_OPT" = "-R " ; then
7025                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7026                         else
7027                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7028                         fi
7029
7030                         # if we have not already added this, add it now
7031                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7032                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7033                         then
7034                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7035
7036 echo "${as_me:-configure}:7036: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7037
7038                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7039                         fi
7040                 fi
7041                 ;;
7042         esac
7043         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7044 done
7045 LDFLAGS=$cf_rpath_dst
7046
7047 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7048
7049 echo "${as_me:-configure}:7049: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7050
7051 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7052
7053 echo "${as_me:-configure}:7053: testing ...checking LIBS $LIBS ..." 1>&5
7054
7055 cf_rpath_dst=
7056 for cf_rpath_src in $LIBS
7057 do
7058         case $cf_rpath_src in
7059         (-L*)
7060
7061                 # check if this refers to a directory which we will ignore
7062                 cf_rpath_skip=no
7063                 if test -n "$cf_rpath_list"
7064                 then
7065                         for cf_rpath_item in $cf_rpath_list
7066                         do
7067                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7068                                 then
7069                                         cf_rpath_skip=yes
7070                                         break
7071                                 fi
7072                         done
7073                 fi
7074
7075                 if test "$cf_rpath_skip" = no
7076                 then
7077                         # transform the option
7078                         if test "$LD_RPATH_OPT" = "-R " ; then
7079                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7080                         else
7081                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7082                         fi
7083
7084                         # if we have not already added this, add it now
7085                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7086                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7087                         then
7088                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7089
7090 echo "${as_me:-configure}:7090: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7091
7092                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7093                         fi
7094                 fi
7095                 ;;
7096         esac
7097         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7098 done
7099 LIBS=$cf_rpath_dst
7100
7101 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7102
7103 echo "${as_me:-configure}:7103: testing ...checked LIBS $LIBS ..." 1>&5
7104
7105         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7106
7107 echo "${as_me:-configure}:7107: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7108
7109 else
7110         echo "$as_me:7110: result: no" >&5
7111 echo "${ECHO_T}no" >&6
7112 fi
7113
7114 fi
7115
7116 fi
7117
7118 ###############################################################################
7119
7120 ###     use option --with-extra-suffix to append suffix to headers and libraries
7121 echo "$as_me:7121: checking if you wish to append extra suffix to header/library paths" >&5
7122 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7123 EXTRA_SUFFIX=
7124
7125 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7126 if test "${with_extra_suffix+set}" = set; then
7127   withval="$with_extra_suffix"
7128   case x$withval in
7129         (no)
7130                 ;;
7131         (xyes|x)
7132                 EXTRA_SUFFIX=$cf_cv_abi_version
7133                 ;;
7134         (*)
7135                 EXTRA_SUFFIX=$withval
7136                 ;;
7137         esac
7138
7139 fi;
7140 echo "$as_me:7140: result: $EXTRA_SUFFIX" >&5
7141 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7142
7143 ###     use option --disable-overwrite to leave out the link to -lcurses
7144 echo "$as_me:7144: checking if you wish to install ncurses overwriting curses" >&5
7145 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7146
7147 # Check whether --enable-overwrite or --disable-overwrite was given.
7148 if test "${enable_overwrite+set}" = set; then
7149   enableval="$enable_overwrite"
7150   with_overwrite=$enableval
7151 else
7152   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7153 fi;
7154 echo "$as_me:7154: result: $with_overwrite" >&5
7155 echo "${ECHO_T}$with_overwrite" >&6
7156
7157 echo "$as_me:7157: checking if external terminfo-database is used" >&5
7158 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7159
7160 # Check whether --enable-database or --disable-database was given.
7161 if test "${enable_database+set}" = set; then
7162   enableval="$enable_database"
7163   use_database=$enableval
7164 else
7165   use_database=yes
7166 fi;
7167 echo "$as_me:7167: result: $use_database" >&5
7168 echo "${ECHO_T}$use_database" >&6
7169
7170 case $host_os in
7171 (os2*)
7172         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7173         ;;
7174 (*)
7175         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7176         ;;
7177 esac
7178
7179 NCURSES_USE_DATABASE=0
7180 if test "$use_database" != no ; then
7181         NCURSES_USE_DATABASE=1
7182
7183         echo "$as_me:7183: checking which terminfo source-file will be installed" >&5
7184 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7185
7186 # Check whether --with-database or --without-database was given.
7187 if test "${with_database+set}" = set; then
7188   withval="$with_database"
7189   TERMINFO_SRC=$withval
7190 fi;
7191         echo "$as_me:7191: result: $TERMINFO_SRC" >&5
7192 echo "${ECHO_T}$TERMINFO_SRC" >&6
7193
7194         echo "$as_me:7194: checking whether to use hashed database instead of directory/tree" >&5
7195 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7196
7197 # Check whether --with-hashed-db or --without-hashed-db was given.
7198 if test "${with_hashed_db+set}" = set; then
7199   withval="$with_hashed_db"
7200
7201 else
7202   with_hashed_db=no
7203 fi;
7204         echo "$as_me:7204: result: $with_hashed_db" >&5
7205 echo "${ECHO_T}$with_hashed_db" >&6
7206 else
7207         with_hashed_db=no
7208 fi
7209
7210 echo "$as_me:7210: checking for list of fallback descriptions" >&5
7211 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7212
7213 # Check whether --with-fallbacks or --without-fallbacks was given.
7214 if test "${with_fallbacks+set}" = set; then
7215   withval="$with_fallbacks"
7216   with_fallback=$withval
7217 else
7218   with_fallback=
7219 fi;
7220 echo "$as_me:7220: result: $with_fallback" >&5
7221 echo "${ECHO_T}$with_fallback" >&6
7222 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7223
7224 echo "$as_me:7224: checking if you want modern xterm or antique" >&5
7225 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7226
7227 # Check whether --with-xterm-new or --without-xterm-new was given.
7228 if test "${with_xterm_new+set}" = set; then
7229   withval="$with_xterm_new"
7230   with_xterm_new=$withval
7231 else
7232   with_xterm_new=yes
7233 fi;
7234 case $with_xterm_new in
7235 (no) with_xterm_new=xterm-old;;
7236 (*)      with_xterm_new=xterm-new;;
7237 esac
7238 echo "$as_me:7238: result: $with_xterm_new" >&5
7239 echo "${ECHO_T}$with_xterm_new" >&6
7240 WHICH_XTERM=$with_xterm_new
7241
7242 echo "$as_me:7242: checking if xterm backspace sends BS or DEL" >&5
7243 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7244
7245 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7246 if test "${with_xterm_kbs+set}" = set; then
7247   withval="$with_xterm_kbs"
7248   with_xterm_kbs=$withval
7249 else
7250   with_xterm_kbs=BS
7251 fi;
7252 case x$with_xterm_kbs in
7253 (xyes|xno|xBS|xbs|x8)
7254         with_xterm_kbs=BS
7255         ;;
7256 (xDEL|xdel|x127)
7257         with_xterm_kbs=DEL
7258         ;;
7259 (*)
7260         with_xterm_kbs=$withval
7261         ;;
7262 esac
7263 echo "$as_me:7263: result: $with_xterm_kbs" >&5
7264 echo "${ECHO_T}$with_xterm_kbs" >&6
7265 XTERM_KBS=$with_xterm_kbs
7266
7267 MAKE_TERMINFO=
7268 if test "$use_database" = no ; then
7269         TERMINFO="${datadir}/terminfo"
7270         MAKE_TERMINFO="#"
7271 else
7272
7273 echo "$as_me:7273: checking for list of terminfo directories" >&5
7274 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7275
7276 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7277 if test "${with_terminfo_dirs+set}" = set; then
7278   withval="$with_terminfo_dirs"
7279
7280 else
7281   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7282 fi;
7283 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7284 cf_dst_path=
7285 for cf_src_path in $withval
7286 do
7287
7288 if test "x$prefix" != xNONE; then
7289         cf_path_syntax="$prefix"
7290 else
7291         cf_path_syntax="$ac_default_prefix"
7292 fi
7293
7294 case ".$cf_src_path" in
7295 (.\$\(*\)*|.\'*\'*)
7296         ;;
7297 (..|./*|.\\*)
7298         ;;
7299 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7300         ;;
7301 (.\${*prefix}*|.\${*dir}*)
7302         eval cf_src_path="$cf_src_path"
7303         case ".$cf_src_path" in
7304         (.NONE/*)
7305                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7306                 ;;
7307         esac
7308         ;;
7309 (.no|.NONE/*)
7310         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7311         ;;
7312 (*)
7313         { { echo "$as_me:7313: error: expected a pathname, not \"$cf_src_path\"" >&5
7314 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7315    { (exit 1); exit 1; }; }
7316         ;;
7317 esac
7318
7319   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7320   cf_dst_path="${cf_dst_path}${cf_src_path}"
7321 done
7322 IFS="$ac_save_ifs"
7323
7324 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7325 # so we have to check/work around.  We do prefer the result of "eval"...
7326 eval cf_dst_eval="$cf_dst_path"
7327 case "x$cf_dst_eval" in
7328 (xNONE*)
7329         TERMINFO_DIRS=$cf_dst_path
7330         ;;
7331 (*)
7332         TERMINFO_DIRS="$cf_dst_eval"
7333         ;;
7334 esac
7335
7336 echo "$as_me:7336: result: $TERMINFO_DIRS" >&5
7337 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7338 test -n "$TERMINFO_DIRS" &&
7339 cat >>confdefs.h <<EOF
7340 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7341 EOF
7342
7343 echo "$as_me:7343: checking for default terminfo directory" >&5
7344 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7345
7346 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7347 if test "${with_default_terminfo_dir+set}" = set; then
7348   withval="$with_default_terminfo_dir"
7349
7350 else
7351   withval="${TERMINFO:-${datadir}/terminfo}"
7352 fi; if test -n "${datadir}/terminfo" ; then
7353
7354 if test "x$prefix" != xNONE; then
7355         cf_path_syntax="$prefix"
7356 else
7357         cf_path_syntax="$ac_default_prefix"
7358 fi
7359
7360 case ".$withval" in
7361 (.\$\(*\)*|.\'*\'*)
7362         ;;
7363 (..|./*|.\\*)
7364         ;;
7365 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7366         ;;
7367 (.\${*prefix}*|.\${*dir}*)
7368         eval withval="$withval"
7369         case ".$withval" in
7370         (.NONE/*)
7371                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7372                 ;;
7373         esac
7374         ;;
7375 (.no|.NONE/*)
7376         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7377         ;;
7378 (*)
7379         { { echo "$as_me:7379: error: expected a pathname, not \"$withval\"" >&5
7380 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7381    { (exit 1); exit 1; }; }
7382         ;;
7383 esac
7384
7385 fi
7386 eval TERMINFO="$withval"
7387
7388 echo "$as_me:7388: result: $TERMINFO" >&5
7389 echo "${ECHO_T}$TERMINFO" >&6
7390
7391 cat >>confdefs.h <<EOF
7392 #define TERMINFO "$TERMINFO"
7393 EOF
7394
7395 fi
7396
7397 ###     use option --disable-big-core to make tic run on small machines
7398 ###     We need 4Mb, check if we can allocate 50% more than that.
7399 echo "$as_me:7399: checking if big-core option selected" >&5
7400 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7401
7402 # Check whether --enable-big-core or --disable-big-core was given.
7403 if test "${enable_big_core+set}" = set; then
7404   enableval="$enable_big_core"
7405   with_big_core=$enableval
7406 else
7407   if test "$cross_compiling" = yes; then
7408   with_big_core=no
7409 else
7410   cat >conftest.$ac_ext <<_ACEOF
7411 #line 7411 "configure"
7412 #include "confdefs.h"
7413
7414 #include <stdlib.h>
7415 #include <string.h>
7416 int main() {
7417         unsigned long n = 6000000L;
7418         char *s = malloc(n);
7419         if (s != 0)
7420                 s[0] = s[n-1] = 0;
7421         ${cf_cv_main_return:-return}(s == 0);
7422 }
7423 _ACEOF
7424 rm -f conftest$ac_exeext
7425 if { (eval echo "$as_me:7425: \"$ac_link\"") >&5
7426   (eval $ac_link) 2>&5
7427   ac_status=$?
7428   echo "$as_me:7428: \$? = $ac_status" >&5
7429   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7430   { (eval echo "$as_me:7430: \"$ac_try\"") >&5
7431   (eval $ac_try) 2>&5
7432   ac_status=$?
7433   echo "$as_me:7433: \$? = $ac_status" >&5
7434   (exit $ac_status); }; }; then
7435   with_big_core=yes
7436 else
7437   echo "$as_me: program exited with status $ac_status" >&5
7438 echo "$as_me: failed program was:" >&5
7439 cat conftest.$ac_ext >&5
7440 with_big_core=no
7441 fi
7442 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7443 fi
7444 fi;
7445 echo "$as_me:7445: result: $with_big_core" >&5
7446 echo "${ECHO_T}$with_big_core" >&6
7447 test "x$with_big_core" = "xyes" &&
7448 cat >>confdefs.h <<\EOF
7449 #define HAVE_BIG_CORE 1
7450 EOF
7451
7452 ### ISO C only guarantees 512-char strings, we have tables which load faster
7453 ### when constructed using "big" strings.  More than the C compiler, the awk
7454 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7455 echo "$as_me:7455: checking if big-strings option selected" >&5
7456 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7457
7458 # Check whether --enable-big-strings or --disable-big-strings was given.
7459 if test "${enable_big_strings+set}" = set; then
7460   enableval="$enable_big_strings"
7461   with_big_strings=$enableval
7462 else
7463
7464         case x$AWK in
7465         (x)
7466                 eval with_big_strings=no
7467                 ;;
7468         (*)
7469                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7470                         | $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
7471                         eval with_big_strings=yes
7472                 else
7473                         eval with_big_strings=no
7474                 fi
7475                 ;;
7476         esac
7477
7478 fi;
7479 echo "$as_me:7479: result: $with_big_strings" >&5
7480 echo "${ECHO_T}$with_big_strings" >&6
7481
7482 USE_BIG_STRINGS=0
7483 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7484
7485 ###     use option --enable-termcap to compile in the termcap fallback support
7486 echo "$as_me:7486: checking if you want termcap-fallback support" >&5
7487 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7488
7489 # Check whether --enable-termcap or --disable-termcap was given.
7490 if test "${enable_termcap+set}" = set; then
7491   enableval="$enable_termcap"
7492   with_termcap=$enableval
7493 else
7494   with_termcap=no
7495 fi;
7496 echo "$as_me:7496: result: $with_termcap" >&5
7497 echo "${ECHO_T}$with_termcap" >&6
7498
7499 NCURSES_USE_TERMCAP=0
7500 if test "x$with_termcap" != "xyes" ; then
7501         if test "$use_database" = no ; then
7502                 if test -z "$with_fallback" ; then
7503                         { { echo "$as_me:7503: error: You have disabled the database w/o specifying fallbacks" >&5
7504 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7505    { (exit 1); exit 1; }; }
7506                 fi
7507         fi
7508
7509 cat >>confdefs.h <<\EOF
7510 #define PURE_TERMINFO 1
7511 EOF
7512
7513 else
7514
7515         if test "$with_ticlib" != no ; then
7516                 { { echo "$as_me:7516: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7517 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7518    { (exit 1); exit 1; }; }
7519         fi
7520
7521         NCURSES_USE_TERMCAP=1
7522         echo "$as_me:7522: checking for list of termcap files" >&5
7523 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7524
7525 # Check whether --with-termpath or --without-termpath was given.
7526 if test "${with_termpath+set}" = set; then
7527   withval="$with_termpath"
7528
7529 else
7530   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7531 fi;
7532 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7533 cf_dst_path=
7534 for cf_src_path in $withval
7535 do
7536
7537 if test "x$prefix" != xNONE; then
7538         cf_path_syntax="$prefix"
7539 else
7540         cf_path_syntax="$ac_default_prefix"
7541 fi
7542
7543 case ".$cf_src_path" in
7544 (.\$\(*\)*|.\'*\'*)
7545         ;;
7546 (..|./*|.\\*)
7547         ;;
7548 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7549         ;;
7550 (.\${*prefix}*|.\${*dir}*)
7551         eval cf_src_path="$cf_src_path"
7552         case ".$cf_src_path" in
7553         (.NONE/*)
7554                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7555                 ;;
7556         esac
7557         ;;
7558 (.no|.NONE/*)
7559         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7560         ;;
7561 (*)
7562         { { echo "$as_me:7562: error: expected a pathname, not \"$cf_src_path\"" >&5
7563 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7564    { (exit 1); exit 1; }; }
7565         ;;
7566 esac
7567
7568   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7569   cf_dst_path="${cf_dst_path}${cf_src_path}"
7570 done
7571 IFS="$ac_save_ifs"
7572
7573 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7574 # so we have to check/work around.  We do prefer the result of "eval"...
7575 eval cf_dst_eval="$cf_dst_path"
7576 case "x$cf_dst_eval" in
7577 (xNONE*)
7578         TERMPATH=$cf_dst_path
7579         ;;
7580 (*)
7581         TERMPATH="$cf_dst_eval"
7582         ;;
7583 esac
7584
7585         echo "$as_me:7585: result: $TERMPATH" >&5
7586 echo "${ECHO_T}$TERMPATH" >&6
7587         test -n "$TERMPATH" &&
7588 cat >>confdefs.h <<EOF
7589 #define TERMPATH "$TERMPATH"
7590 EOF
7591
7592         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7593         echo "$as_me:7593: checking if fast termcap-loader is needed" >&5
7594 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7595
7596 # Check whether --enable-getcap or --disable-getcap was given.
7597 if test "${enable_getcap+set}" = set; then
7598   enableval="$enable_getcap"
7599   with_getcap=$enableval
7600 else
7601   with_getcap=no
7602 fi;
7603         echo "$as_me:7603: result: $with_getcap" >&5
7604 echo "${ECHO_T}$with_getcap" >&6
7605         test "x$with_getcap" = "xyes" &&
7606 cat >>confdefs.h <<\EOF
7607 #define USE_GETCAP 1
7608 EOF
7609
7610         echo "$as_me:7610: checking if translated termcaps will be cached in ~/.terminfo" >&5
7611 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7612
7613 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7614 if test "${enable_getcap_cache+set}" = set; then
7615   enableval="$enable_getcap_cache"
7616   with_getcap_cache=$enableval
7617 else
7618   with_getcap_cache=no
7619 fi;
7620         echo "$as_me:7620: result: $with_getcap_cache" >&5
7621 echo "${ECHO_T}$with_getcap_cache" >&6
7622         test "x$with_getcap_cache" = "xyes" &&
7623 cat >>confdefs.h <<\EOF
7624 #define USE_GETCAP_CACHE 1
7625 EOF
7626
7627 fi
7628
7629 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7630 echo "$as_me:7630: checking if ~/.terminfo is wanted" >&5
7631 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7632
7633 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7634 if test "${enable_home_terminfo+set}" = set; then
7635   enableval="$enable_home_terminfo"
7636   with_home_terminfo=$enableval
7637 else
7638   with_home_terminfo=yes
7639 fi;
7640 echo "$as_me:7640: result: $with_home_terminfo" >&5
7641 echo "${ECHO_T}$with_home_terminfo" >&6
7642 test "x$with_home_terminfo" = "xyes" &&
7643 cat >>confdefs.h <<\EOF
7644 #define USE_HOME_TERMINFO 1
7645 EOF
7646
7647 echo "$as_me:7647: checking if you want to use restricted environment when running as root" >&5
7648 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7649
7650 # Check whether --enable-root-environ or --disable-root-environ was given.
7651 if test "${enable_root_environ+set}" = set; then
7652   enableval="$enable_root_environ"
7653   with_root_environ=$enableval
7654 else
7655   with_root_environ=yes
7656 fi;
7657 echo "$as_me:7657: result: $with_root_environ" >&5
7658 echo "${ECHO_T}$with_root_environ" >&6
7659 test "x$with_root_environ" = xyes &&
7660 cat >>confdefs.h <<\EOF
7661 #define USE_ROOT_ENVIRON 1
7662 EOF
7663
7664 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7665 ###   to reduce storage requirements for the terminfo database.
7666
7667 for ac_header in \
7668 unistd.h \
7669
7670 do
7671 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7672 echo "$as_me:7672: checking for $ac_header" >&5
7673 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7674 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7675   echo $ECHO_N "(cached) $ECHO_C" >&6
7676 else
7677   cat >conftest.$ac_ext <<_ACEOF
7678 #line 7678 "configure"
7679 #include "confdefs.h"
7680 #include <$ac_header>
7681 _ACEOF
7682 if { (eval echo "$as_me:7682: \"$ac_cpp conftest.$ac_ext\"") >&5
7683   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7684   ac_status=$?
7685   egrep -v '^ *\+' conftest.er1 >conftest.err
7686   rm -f conftest.er1
7687   cat conftest.err >&5
7688   echo "$as_me:7688: \$? = $ac_status" >&5
7689   (exit $ac_status); } >/dev/null; then
7690   if test -s conftest.err; then
7691     ac_cpp_err=$ac_c_preproc_warn_flag
7692   else
7693     ac_cpp_err=
7694   fi
7695 else
7696   ac_cpp_err=yes
7697 fi
7698 if test -z "$ac_cpp_err"; then
7699   eval "$as_ac_Header=yes"
7700 else
7701   echo "$as_me: failed program was:" >&5
7702   cat conftest.$ac_ext >&5
7703   eval "$as_ac_Header=no"
7704 fi
7705 rm -f conftest.err conftest.$ac_ext
7706 fi
7707 echo "$as_me:7707: result: `eval echo '${'$as_ac_Header'}'`" >&5
7708 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7709 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7710   cat >>confdefs.h <<EOF
7711 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7712 EOF
7713
7714 fi
7715 done
7716
7717 for ac_func in \
7718         remove \
7719         unlink
7720 do
7721 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7722 echo "$as_me:7722: checking for $ac_func" >&5
7723 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7724 if eval "test \"\${$as_ac_var+set}\" = set"; then
7725   echo $ECHO_N "(cached) $ECHO_C" >&6
7726 else
7727   cat >conftest.$ac_ext <<_ACEOF
7728 #line 7728 "configure"
7729 #include "confdefs.h"
7730 /* System header to define __stub macros and hopefully few prototypes,
7731     which can conflict with char $ac_func (); below.  */
7732 #include <assert.h>
7733 /* Override any gcc2 internal prototype to avoid an error.  */
7734 #ifdef __cplusplus
7735 extern "C"
7736 #endif
7737 /* We use char because int might match the return type of a gcc2
7738    builtin and then its argument prototype would still apply.  */
7739 char $ac_func ();
7740 char (*f) ();
7741
7742 int
7743 main (void)
7744 {
7745 /* The GNU C library defines this for functions which it implements
7746     to always fail with ENOSYS.  Some functions are actually named
7747     something starting with __ and the normal name is an alias.  */
7748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7749 choke me
7750 #else
7751 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7752 #endif
7753
7754   ;
7755   return 0;
7756 }
7757 _ACEOF
7758 rm -f conftest.$ac_objext conftest$ac_exeext
7759 if { (eval echo "$as_me:7759: \"$ac_link\"") >&5
7760   (eval $ac_link) 2>&5
7761   ac_status=$?
7762   echo "$as_me:7762: \$? = $ac_status" >&5
7763   (exit $ac_status); } &&
7764          { ac_try='test -s conftest$ac_exeext'
7765   { (eval echo "$as_me:7765: \"$ac_try\"") >&5
7766   (eval $ac_try) 2>&5
7767   ac_status=$?
7768   echo "$as_me:7768: \$? = $ac_status" >&5
7769   (exit $ac_status); }; }; then
7770   eval "$as_ac_var=yes"
7771 else
7772   echo "$as_me: failed program was:" >&5
7773 cat conftest.$ac_ext >&5
7774 eval "$as_ac_var=no"
7775 fi
7776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7777 fi
7778 echo "$as_me:7778: result: `eval echo '${'$as_ac_var'}'`" >&5
7779 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7780 if test `eval echo '${'$as_ac_var'}'` = yes; then
7781   cat >>confdefs.h <<EOF
7782 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7783 EOF
7784
7785 fi
7786 done
7787
7788 if test "$cross_compiling" = yes ; then
7789
7790 for ac_func in \
7791                 link \
7792                 symlink
7793 do
7794 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7795 echo "$as_me:7795: checking for $ac_func" >&5
7796 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7797 if eval "test \"\${$as_ac_var+set}\" = set"; then
7798   echo $ECHO_N "(cached) $ECHO_C" >&6
7799 else
7800   cat >conftest.$ac_ext <<_ACEOF
7801 #line 7801 "configure"
7802 #include "confdefs.h"
7803 /* System header to define __stub macros and hopefully few prototypes,
7804     which can conflict with char $ac_func (); below.  */
7805 #include <assert.h>
7806 /* Override any gcc2 internal prototype to avoid an error.  */
7807 #ifdef __cplusplus
7808 extern "C"
7809 #endif
7810 /* We use char because int might match the return type of a gcc2
7811    builtin and then its argument prototype would still apply.  */
7812 char $ac_func ();
7813 char (*f) ();
7814
7815 int
7816 main (void)
7817 {
7818 /* The GNU C library defines this for functions which it implements
7819     to always fail with ENOSYS.  Some functions are actually named
7820     something starting with __ and the normal name is an alias.  */
7821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7822 choke me
7823 #else
7824 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7825 #endif
7826
7827   ;
7828   return 0;
7829 }
7830 _ACEOF
7831 rm -f conftest.$ac_objext conftest$ac_exeext
7832 if { (eval echo "$as_me:7832: \"$ac_link\"") >&5
7833   (eval $ac_link) 2>&5
7834   ac_status=$?
7835   echo "$as_me:7835: \$? = $ac_status" >&5
7836   (exit $ac_status); } &&
7837          { ac_try='test -s conftest$ac_exeext'
7838   { (eval echo "$as_me:7838: \"$ac_try\"") >&5
7839   (eval $ac_try) 2>&5
7840   ac_status=$?
7841   echo "$as_me:7841: \$? = $ac_status" >&5
7842   (exit $ac_status); }; }; then
7843   eval "$as_ac_var=yes"
7844 else
7845   echo "$as_me: failed program was:" >&5
7846 cat conftest.$ac_ext >&5
7847 eval "$as_ac_var=no"
7848 fi
7849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7850 fi
7851 echo "$as_me:7851: result: `eval echo '${'$as_ac_var'}'`" >&5
7852 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7853 if test `eval echo '${'$as_ac_var'}'` = yes; then
7854   cat >>confdefs.h <<EOF
7855 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7856 EOF
7857
7858 fi
7859 done
7860
7861 else
7862         echo "$as_me:7862: checking if link/symlink functions work" >&5
7863 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7864 if test "${cf_cv_link_funcs+set}" = set; then
7865   echo $ECHO_N "(cached) $ECHO_C" >&6
7866 else
7867
7868                 cf_cv_link_funcs=
7869                 for cf_func in link symlink ; do
7870                         if test "$cross_compiling" = yes; then
7871
7872                         eval 'ac_cv_func_'$cf_func'=error'
7873 else
7874   cat >conftest.$ac_ext <<_ACEOF
7875 #line 7875 "configure"
7876 #include "confdefs.h"
7877
7878 #include <sys/types.h>
7879 #include <sys/stat.h>
7880 #ifdef HAVE_UNISTD_H
7881 #include <unistd.h>
7882 #endif
7883 int main(void)
7884 {
7885         int fail = 0;
7886         char *src = "config.log";
7887         char *dst = "conftest.chk";
7888         struct stat src_sb;
7889         struct stat dst_sb;
7890
7891         stat(src, &src_sb);
7892         fail = ($cf_func("config.log", "conftest.chk") < 0)
7893             || (stat(dst, &dst_sb) < 0)
7894             || (dst_sb.st_mtime != src_sb.st_mtime);
7895 #ifdef HAVE_UNLINK
7896         unlink(dst);
7897 #else
7898         remove(dst);
7899 #endif
7900         ${cf_cv_main_return:-return} (fail);
7901 }
7902
7903 _ACEOF
7904 rm -f conftest$ac_exeext
7905 if { (eval echo "$as_me:7905: \"$ac_link\"") >&5
7906   (eval $ac_link) 2>&5
7907   ac_status=$?
7908   echo "$as_me:7908: \$? = $ac_status" >&5
7909   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7910   { (eval echo "$as_me:7910: \"$ac_try\"") >&5
7911   (eval $ac_try) 2>&5
7912   ac_status=$?
7913   echo "$as_me:7913: \$? = $ac_status" >&5
7914   (exit $ac_status); }; }; then
7915
7916                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7917                         eval 'ac_cv_func_'$cf_func'=yes'
7918 else
7919   echo "$as_me: program exited with status $ac_status" >&5
7920 echo "$as_me: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7922
7923                         eval 'ac_cv_func_'$cf_func'=no'
7924 fi
7925 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7926 fi
7927                 done
7928                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7929
7930 fi
7931 echo "$as_me:7931: result: $cf_cv_link_funcs" >&5
7932 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7933         test "$ac_cv_func_link"    = yes &&
7934 cat >>confdefs.h <<\EOF
7935 #define HAVE_LINK 1
7936 EOF
7937
7938         test "$ac_cv_func_symlink" = yes &&
7939 cat >>confdefs.h <<\EOF
7940 #define HAVE_SYMLINK 1
7941 EOF
7942
7943 fi
7944
7945 with_links=no
7946 with_symlinks=no
7947
7948 # soft links (symbolic links) are useful for some systems where hard links do
7949 # not work, or to make it simpler to copy terminfo trees around.
7950 if test "x$ac_cv_func_symlink" = xyes ; then
7951         echo "$as_me:7951: checking if tic should use symbolic links" >&5
7952 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7953
7954 # Check whether --enable-symlinks or --disable-symlinks was given.
7955 if test "${enable_symlinks+set}" = set; then
7956   enableval="$enable_symlinks"
7957   with_symlinks=$enableval
7958 else
7959   with_symlinks=no
7960 fi;
7961         echo "$as_me:7961: result: $with_symlinks" >&5
7962 echo "${ECHO_T}$with_symlinks" >&6
7963 fi
7964
7965 # If we have hard links and did not choose to use soft links instead, there is
7966 # no reason to make this choice optional - use the hard links.
7967 if test "$with_symlinks" = no ; then
7968         echo "$as_me:7968: checking if tic should use hard links" >&5
7969 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7970         if test "x$ac_cv_func_link" = xyes ; then
7971                 with_links=yes
7972         else
7973                 with_links=no
7974         fi
7975         echo "$as_me:7975: result: $with_links" >&5
7976 echo "${ECHO_T}$with_links" >&6
7977 fi
7978
7979 test "x$with_links" = xyes &&
7980 cat >>confdefs.h <<\EOF
7981 #define USE_LINKS 1
7982 EOF
7983
7984 test "x$with_symlinks" = xyes &&
7985 cat >>confdefs.h <<\EOF
7986 #define USE_SYMLINKS 1
7987 EOF
7988
7989 ###   use option --enable-broken-linker to force on use of broken-linker support
7990 echo "$as_me:7990: checking if you want broken-linker support code" >&5
7991 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7992
7993 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7994 if test "${enable_broken_linker+set}" = set; then
7995   enableval="$enable_broken_linker"
7996   with_broken_linker=$enableval
7997 else
7998   with_broken_linker=${BROKEN_LINKER:-no}
7999 fi;
8000 echo "$as_me:8000: result: $with_broken_linker" >&5
8001 echo "${ECHO_T}$with_broken_linker" >&6
8002
8003 BROKEN_LINKER=0
8004 if test "x$with_broken_linker" = xyes ; then
8005
8006 cat >>confdefs.h <<\EOF
8007 #define BROKEN_LINKER 1
8008 EOF
8009
8010         BROKEN_LINKER=1
8011 elif test "$DFT_LWR_MODEL" = shared ; then
8012         case $cf_cv_system_name in
8013         (cygwin*)
8014
8015 cat >>confdefs.h <<\EOF
8016 #define BROKEN_LINKER 1
8017 EOF
8018
8019                 BROKEN_LINKER=1
8020                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8021
8022 echo "${as_me:-configure}:8022: testing cygwin linker is broken anyway ..." 1>&5
8023
8024                 ;;
8025         esac
8026 fi
8027
8028 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8029 echo "$as_me:8029: checking if tputs should process BSD-style prefix padding" >&5
8030 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8031
8032 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8033 if test "${enable_bsdpad+set}" = set; then
8034   enableval="$enable_bsdpad"
8035   with_bsdpad=$enableval
8036 else
8037   with_bsdpad=no
8038 fi;
8039 echo "$as_me:8039: result: $with_bsdpad" >&5
8040 echo "${ECHO_T}$with_bsdpad" >&6
8041 test "x$with_bsdpad" = xyes &&
8042 cat >>confdefs.h <<\EOF
8043 #define BSD_TPUTS 1
8044 EOF
8045
8046 ###   use option --enable-widec to turn on use of wide-character support
8047 NCURSES_CH_T=chtype
8048 NCURSES_LIBUTF8=0
8049
8050 NEED_WCHAR_H=0
8051 NCURSES_MBSTATE_T=0
8052 NCURSES_WCHAR_T=0
8053 NCURSES_WINT_T=0
8054
8055 # Check to define _XOPEN_SOURCE "automatically"
8056 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8057
8058 cf_XOPEN_SOURCE=500
8059 cf_POSIX_C_SOURCE=199506L
8060 cf_xopen_source=
8061
8062 case $host_os in
8063 (aix[4-7]*)
8064         cf_xopen_source="-D_ALL_SOURCE"
8065         ;;
8066 (msys)
8067         cf_XOPEN_SOURCE=600
8068         ;;
8069 (darwin[0-8].*)
8070         cf_xopen_source="-D_APPLE_C_SOURCE"
8071         ;;
8072 (darwin*)
8073         cf_xopen_source="-D_DARWIN_C_SOURCE"
8074         cf_XOPEN_SOURCE=
8075         ;;
8076 (freebsd*|dragonfly*)
8077         # 5.x headers associate
8078         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8079         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8080         cf_POSIX_C_SOURCE=200112L
8081         cf_XOPEN_SOURCE=600
8082         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8083         ;;
8084 (hpux11*)
8085         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8086         ;;
8087 (hpux*)
8088         cf_xopen_source="-D_HPUX_SOURCE"
8089         ;;
8090 (irix[56].*)
8091         cf_xopen_source="-D_SGI_SOURCE"
8092         cf_XOPEN_SOURCE=
8093         ;;
8094 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8095
8096 echo "$as_me:8096: checking if we must define _GNU_SOURCE" >&5
8097 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8098 if test "${cf_cv_gnu_source+set}" = set; then
8099   echo $ECHO_N "(cached) $ECHO_C" >&6
8100 else
8101
8102 cat >conftest.$ac_ext <<_ACEOF
8103 #line 8103 "configure"
8104 #include "confdefs.h"
8105 #include <sys/types.h>
8106 int
8107 main (void)
8108 {
8109
8110 #ifndef _XOPEN_SOURCE
8111 make an error
8112 #endif
8113   ;
8114   return 0;
8115 }
8116 _ACEOF
8117 rm -f conftest.$ac_objext
8118 if { (eval echo "$as_me:8118: \"$ac_compile\"") >&5
8119   (eval $ac_compile) 2>&5
8120   ac_status=$?
8121   echo "$as_me:8121: \$? = $ac_status" >&5
8122   (exit $ac_status); } &&
8123          { ac_try='test -s conftest.$ac_objext'
8124   { (eval echo "$as_me:8124: \"$ac_try\"") >&5
8125   (eval $ac_try) 2>&5
8126   ac_status=$?
8127   echo "$as_me:8127: \$? = $ac_status" >&5
8128   (exit $ac_status); }; }; then
8129   cf_cv_gnu_source=no
8130 else
8131   echo "$as_me: failed program was:" >&5
8132 cat conftest.$ac_ext >&5
8133 cf_save="$CPPFLAGS"
8134          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8135          cat >conftest.$ac_ext <<_ACEOF
8136 #line 8136 "configure"
8137 #include "confdefs.h"
8138 #include <sys/types.h>
8139 int
8140 main (void)
8141 {
8142
8143 #ifdef _XOPEN_SOURCE
8144 make an error
8145 #endif
8146   ;
8147   return 0;
8148 }
8149 _ACEOF
8150 rm -f conftest.$ac_objext
8151 if { (eval echo "$as_me:8151: \"$ac_compile\"") >&5
8152   (eval $ac_compile) 2>&5
8153   ac_status=$?
8154   echo "$as_me:8154: \$? = $ac_status" >&5
8155   (exit $ac_status); } &&
8156          { ac_try='test -s conftest.$ac_objext'
8157   { (eval echo "$as_me:8157: \"$ac_try\"") >&5
8158   (eval $ac_try) 2>&5
8159   ac_status=$?
8160   echo "$as_me:8160: \$? = $ac_status" >&5
8161   (exit $ac_status); }; }; then
8162   cf_cv_gnu_source=no
8163 else
8164   echo "$as_me: failed program was:" >&5
8165 cat conftest.$ac_ext >&5
8166 cf_cv_gnu_source=yes
8167 fi
8168 rm -f conftest.$ac_objext conftest.$ac_ext
8169         CPPFLAGS="$cf_save"
8170
8171 fi
8172 rm -f conftest.$ac_objext conftest.$ac_ext
8173
8174 fi
8175 echo "$as_me:8175: result: $cf_cv_gnu_source" >&5
8176 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8177
8178 if test "$cf_cv_gnu_source" = yes
8179 then
8180 echo "$as_me:8180: checking if we should also define _DEFAULT_SOURCE" >&5
8181 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8182 if test "${cf_cv_default_source+set}" = set; then
8183   echo $ECHO_N "(cached) $ECHO_C" >&6
8184 else
8185
8186 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8187         cat >conftest.$ac_ext <<_ACEOF
8188 #line 8188 "configure"
8189 #include "confdefs.h"
8190 #include <sys/types.h>
8191 int
8192 main (void)
8193 {
8194
8195 #ifdef _DEFAULT_SOURCE
8196 make an error
8197 #endif
8198   ;
8199   return 0;
8200 }
8201 _ACEOF
8202 rm -f conftest.$ac_objext
8203 if { (eval echo "$as_me:8203: \"$ac_compile\"") >&5
8204   (eval $ac_compile) 2>&5
8205   ac_status=$?
8206   echo "$as_me:8206: \$? = $ac_status" >&5
8207   (exit $ac_status); } &&
8208          { ac_try='test -s conftest.$ac_objext'
8209   { (eval echo "$as_me:8209: \"$ac_try\"") >&5
8210   (eval $ac_try) 2>&5
8211   ac_status=$?
8212   echo "$as_me:8212: \$? = $ac_status" >&5
8213   (exit $ac_status); }; }; then
8214   cf_cv_default_source=no
8215 else
8216   echo "$as_me: failed program was:" >&5
8217 cat conftest.$ac_ext >&5
8218 cf_cv_default_source=yes
8219 fi
8220 rm -f conftest.$ac_objext conftest.$ac_ext
8221
8222 fi
8223 echo "$as_me:8223: result: $cf_cv_default_source" >&5
8224 echo "${ECHO_T}$cf_cv_default_source" >&6
8225 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8226 fi
8227
8228         ;;
8229 (minix*)
8230         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8231         ;;
8232 (mirbsd*)
8233         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8234         cf_XOPEN_SOURCE=
8235
8236 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8237
8238 cf_save_CFLAGS="$CFLAGS"
8239 cf_save_CPPFLAGS="$CPPFLAGS"
8240
8241 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8242         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8243                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8244
8245 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8246         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8247                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8248
8249 echo "$as_me:8249: checking if we should define _POSIX_C_SOURCE" >&5
8250 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8251 if test "${cf_cv_posix_c_source+set}" = set; then
8252   echo $ECHO_N "(cached) $ECHO_C" >&6
8253 else
8254
8255 echo "${as_me:-configure}:8255: testing if the symbol is already defined go no further ..." 1>&5
8256
8257         cat >conftest.$ac_ext <<_ACEOF
8258 #line 8258 "configure"
8259 #include "confdefs.h"
8260 #include <sys/types.h>
8261 int
8262 main (void)
8263 {
8264
8265 #ifndef _POSIX_C_SOURCE
8266 make an error
8267 #endif
8268   ;
8269   return 0;
8270 }
8271 _ACEOF
8272 rm -f conftest.$ac_objext
8273 if { (eval echo "$as_me:8273: \"$ac_compile\"") >&5
8274   (eval $ac_compile) 2>&5
8275   ac_status=$?
8276   echo "$as_me:8276: \$? = $ac_status" >&5
8277   (exit $ac_status); } &&
8278          { ac_try='test -s conftest.$ac_objext'
8279   { (eval echo "$as_me:8279: \"$ac_try\"") >&5
8280   (eval $ac_try) 2>&5
8281   ac_status=$?
8282   echo "$as_me:8282: \$? = $ac_status" >&5
8283   (exit $ac_status); }; }; then
8284   cf_cv_posix_c_source=no
8285 else
8286   echo "$as_me: failed program was:" >&5
8287 cat conftest.$ac_ext >&5
8288 cf_want_posix_source=no
8289          case .$cf_POSIX_C_SOURCE in
8290          (.[12]??*)
8291                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8292                 ;;
8293          (.2)
8294                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8295                 cf_want_posix_source=yes
8296                 ;;
8297          (.*)
8298                 cf_want_posix_source=yes
8299                 ;;
8300          esac
8301          if test "$cf_want_posix_source" = yes ; then
8302                 cat >conftest.$ac_ext <<_ACEOF
8303 #line 8303 "configure"
8304 #include "confdefs.h"
8305 #include <sys/types.h>
8306 int
8307 main (void)
8308 {
8309
8310 #ifdef _POSIX_SOURCE
8311 make an error
8312 #endif
8313   ;
8314   return 0;
8315 }
8316 _ACEOF
8317 rm -f conftest.$ac_objext
8318 if { (eval echo "$as_me:8318: \"$ac_compile\"") >&5
8319   (eval $ac_compile) 2>&5
8320   ac_status=$?
8321   echo "$as_me:8321: \$? = $ac_status" >&5
8322   (exit $ac_status); } &&
8323          { ac_try='test -s conftest.$ac_objext'
8324   { (eval echo "$as_me:8324: \"$ac_try\"") >&5
8325   (eval $ac_try) 2>&5
8326   ac_status=$?
8327   echo "$as_me:8327: \$? = $ac_status" >&5
8328   (exit $ac_status); }; }; then
8329   :
8330 else
8331   echo "$as_me: failed program was:" >&5
8332 cat conftest.$ac_ext >&5
8333 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8334 fi
8335 rm -f conftest.$ac_objext conftest.$ac_ext
8336          fi
8337
8338 echo "${as_me:-configure}:8338: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8339
8340          CFLAGS="$cf_trim_CFLAGS"
8341          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8342
8343 echo "${as_me:-configure}:8343: testing if the second compile does not leave our definition intact error ..." 1>&5
8344
8345          cat >conftest.$ac_ext <<_ACEOF
8346 #line 8346 "configure"
8347 #include "confdefs.h"
8348 #include <sys/types.h>
8349 int
8350 main (void)
8351 {
8352
8353 #ifndef _POSIX_C_SOURCE
8354 make an error
8355 #endif
8356   ;
8357   return 0;
8358 }
8359 _ACEOF
8360 rm -f conftest.$ac_objext
8361 if { (eval echo "$as_me:8361: \"$ac_compile\"") >&5
8362   (eval $ac_compile) 2>&5
8363   ac_status=$?
8364   echo "$as_me:8364: \$? = $ac_status" >&5
8365   (exit $ac_status); } &&
8366          { ac_try='test -s conftest.$ac_objext'
8367   { (eval echo "$as_me:8367: \"$ac_try\"") >&5
8368   (eval $ac_try) 2>&5
8369   ac_status=$?
8370   echo "$as_me:8370: \$? = $ac_status" >&5
8371   (exit $ac_status); }; }; then
8372   :
8373 else
8374   echo "$as_me: failed program was:" >&5
8375 cat conftest.$ac_ext >&5
8376 cf_cv_posix_c_source=no
8377 fi
8378 rm -f conftest.$ac_objext conftest.$ac_ext
8379          CFLAGS="$cf_save_CFLAGS"
8380          CPPFLAGS="$cf_save_CPPFLAGS"
8381
8382 fi
8383 rm -f conftest.$ac_objext conftest.$ac_ext
8384
8385 fi
8386 echo "$as_me:8386: result: $cf_cv_posix_c_source" >&5
8387 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8388
8389 if test "$cf_cv_posix_c_source" != no ; then
8390         CFLAGS="$cf_trim_CFLAGS"
8391         CPPFLAGS="$cf_trim_CPPFLAGS"
8392
8393 cf_fix_cppflags=no
8394 cf_new_cflags=
8395 cf_new_cppflags=
8396 cf_new_extra_cppflags=
8397
8398 for cf_add_cflags in $cf_cv_posix_c_source
8399 do
8400 case $cf_fix_cppflags in
8401 (no)
8402         case $cf_add_cflags in
8403         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8404                 case $cf_add_cflags in
8405                 (-D*)
8406                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8407
8408                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8409                                 && test -z "${cf_tst_cflags}" \
8410                                 && cf_fix_cppflags=yes
8411
8412                         if test $cf_fix_cppflags = yes ; then
8413
8414         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8415         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8416
8417                                 continue
8418                         elif test "${cf_tst_cflags}" = "\"'" ; then
8419
8420         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8421         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8422
8423                                 continue
8424                         fi
8425                         ;;
8426                 esac
8427                 case "$CPPFLAGS" in
8428                 (*$cf_add_cflags)
8429                         ;;
8430                 (*)
8431                         case $cf_add_cflags in
8432                         (-D*)
8433                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8434
8435 CPPFLAGS=`echo "$CPPFLAGS" | \
8436         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8437                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8438
8439                                 ;;
8440                         esac
8441
8442         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8443         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8444
8445                         ;;
8446                 esac
8447                 ;;
8448         (*)
8449
8450         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8451         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8452
8453                 ;;
8454         esac
8455         ;;
8456 (yes)
8457
8458         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8459         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8460
8461         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8462
8463         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8464                 && test -z "${cf_tst_cflags}" \
8465                 && cf_fix_cppflags=no
8466         ;;
8467 esac
8468 done
8469
8470 if test -n "$cf_new_cflags" ; then
8471
8472         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8473         CFLAGS="${CFLAGS}$cf_new_cflags"
8474
8475 fi
8476
8477 if test -n "$cf_new_cppflags" ; then
8478
8479         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8480         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8481
8482 fi
8483
8484 if test -n "$cf_new_extra_cppflags" ; then
8485
8486         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8487         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8488
8489 fi
8490
8491 fi
8492
8493         ;;
8494 (netbsd*)
8495         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8496         ;;
8497 (openbsd[4-9]*)
8498         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8499         cf_xopen_source="-D_BSD_SOURCE"
8500         cf_XOPEN_SOURCE=600
8501         ;;
8502 (openbsd*)
8503         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8504         ;;
8505 (osf[45]*)
8506         cf_xopen_source="-D_OSF_SOURCE"
8507         ;;
8508 (nto-qnx*)
8509         cf_xopen_source="-D_QNX_SOURCE"
8510         ;;
8511 (sco*)
8512         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8513         ;;
8514 (solaris2.*)
8515         cf_xopen_source="-D__EXTENSIONS__"
8516         cf_cv_xopen_source=broken
8517         ;;
8518 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8519         cf_XOPEN_SOURCE=
8520         cf_POSIX_C_SOURCE=
8521         ;;
8522 (*)
8523
8524 echo "$as_me:8524: checking if we should define _XOPEN_SOURCE" >&5
8525 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8526 if test "${cf_cv_xopen_source+set}" = set; then
8527   echo $ECHO_N "(cached) $ECHO_C" >&6
8528 else
8529
8530         cat >conftest.$ac_ext <<_ACEOF
8531 #line 8531 "configure"
8532 #include "confdefs.h"
8533
8534 #include <stdlib.h>
8535 #include <string.h>
8536 #include <sys/types.h>
8537
8538 int
8539 main (void)
8540 {
8541
8542 #ifndef _XOPEN_SOURCE
8543 make an error
8544 #endif
8545   ;
8546   return 0;
8547 }
8548 _ACEOF
8549 rm -f conftest.$ac_objext
8550 if { (eval echo "$as_me:8550: \"$ac_compile\"") >&5
8551   (eval $ac_compile) 2>&5
8552   ac_status=$?
8553   echo "$as_me:8553: \$? = $ac_status" >&5
8554   (exit $ac_status); } &&
8555          { ac_try='test -s conftest.$ac_objext'
8556   { (eval echo "$as_me:8556: \"$ac_try\"") >&5
8557   (eval $ac_try) 2>&5
8558   ac_status=$?
8559   echo "$as_me:8559: \$? = $ac_status" >&5
8560   (exit $ac_status); }; }; then
8561   cf_cv_xopen_source=no
8562 else
8563   echo "$as_me: failed program was:" >&5
8564 cat conftest.$ac_ext >&5
8565 cf_save="$CPPFLAGS"
8566          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8567          cat >conftest.$ac_ext <<_ACEOF
8568 #line 8568 "configure"
8569 #include "confdefs.h"
8570
8571 #include <stdlib.h>
8572 #include <string.h>
8573 #include <sys/types.h>
8574
8575 int
8576 main (void)
8577 {
8578
8579 #ifdef _XOPEN_SOURCE
8580 make an error
8581 #endif
8582   ;
8583   return 0;
8584 }
8585 _ACEOF
8586 rm -f conftest.$ac_objext
8587 if { (eval echo "$as_me:8587: \"$ac_compile\"") >&5
8588   (eval $ac_compile) 2>&5
8589   ac_status=$?
8590   echo "$as_me:8590: \$? = $ac_status" >&5
8591   (exit $ac_status); } &&
8592          { ac_try='test -s conftest.$ac_objext'
8593   { (eval echo "$as_me:8593: \"$ac_try\"") >&5
8594   (eval $ac_try) 2>&5
8595   ac_status=$?
8596   echo "$as_me:8596: \$? = $ac_status" >&5
8597   (exit $ac_status); }; }; then
8598   cf_cv_xopen_source=no
8599 else
8600   echo "$as_me: failed program was:" >&5
8601 cat conftest.$ac_ext >&5
8602 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8603 fi
8604 rm -f conftest.$ac_objext conftest.$ac_ext
8605         CPPFLAGS="$cf_save"
8606
8607 fi
8608 rm -f conftest.$ac_objext conftest.$ac_ext
8609
8610 fi
8611 echo "$as_me:8611: result: $cf_cv_xopen_source" >&5
8612 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8613
8614 if test "$cf_cv_xopen_source" != no ; then
8615
8616 CFLAGS=`echo "$CFLAGS" | \
8617         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8618                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8619
8620 CPPFLAGS=`echo "$CPPFLAGS" | \
8621         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8622                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8623
8624         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8625
8626 cf_fix_cppflags=no
8627 cf_new_cflags=
8628 cf_new_cppflags=
8629 cf_new_extra_cppflags=
8630
8631 for cf_add_cflags in $cf_temp_xopen_source
8632 do
8633 case $cf_fix_cppflags in
8634 (no)
8635         case $cf_add_cflags in
8636         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8637                 case $cf_add_cflags in
8638                 (-D*)
8639                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8640
8641                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8642                                 && test -z "${cf_tst_cflags}" \
8643                                 && cf_fix_cppflags=yes
8644
8645                         if test $cf_fix_cppflags = yes ; then
8646
8647         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8648         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8649
8650                                 continue
8651                         elif test "${cf_tst_cflags}" = "\"'" ; then
8652
8653         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8654         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8655
8656                                 continue
8657                         fi
8658                         ;;
8659                 esac
8660                 case "$CPPFLAGS" in
8661                 (*$cf_add_cflags)
8662                         ;;
8663                 (*)
8664                         case $cf_add_cflags in
8665                         (-D*)
8666                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8667
8668 CPPFLAGS=`echo "$CPPFLAGS" | \
8669         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8670                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8671
8672                                 ;;
8673                         esac
8674
8675         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8676         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8677
8678                         ;;
8679                 esac
8680                 ;;
8681         (*)
8682
8683         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8684         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8685
8686                 ;;
8687         esac
8688         ;;
8689 (yes)
8690
8691         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8692         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8693
8694         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8695
8696         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8697                 && test -z "${cf_tst_cflags}" \
8698                 && cf_fix_cppflags=no
8699         ;;
8700 esac
8701 done
8702
8703 if test -n "$cf_new_cflags" ; then
8704
8705         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8706         CFLAGS="${CFLAGS}$cf_new_cflags"
8707
8708 fi
8709
8710 if test -n "$cf_new_cppflags" ; then
8711
8712         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8713         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8714
8715 fi
8716
8717 if test -n "$cf_new_extra_cppflags" ; then
8718
8719         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8720         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8721
8722 fi
8723
8724 fi
8725
8726 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8727
8728 cf_save_CFLAGS="$CFLAGS"
8729 cf_save_CPPFLAGS="$CPPFLAGS"
8730
8731 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8732         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8733                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8734
8735 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8736         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8737                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8738
8739 echo "$as_me:8739: checking if we should define _POSIX_C_SOURCE" >&5
8740 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8741 if test "${cf_cv_posix_c_source+set}" = set; then
8742   echo $ECHO_N "(cached) $ECHO_C" >&6
8743 else
8744
8745 echo "${as_me:-configure}:8745: testing if the symbol is already defined go no further ..." 1>&5
8746
8747         cat >conftest.$ac_ext <<_ACEOF
8748 #line 8748 "configure"
8749 #include "confdefs.h"
8750 #include <sys/types.h>
8751 int
8752 main (void)
8753 {
8754
8755 #ifndef _POSIX_C_SOURCE
8756 make an error
8757 #endif
8758   ;
8759   return 0;
8760 }
8761 _ACEOF
8762 rm -f conftest.$ac_objext
8763 if { (eval echo "$as_me:8763: \"$ac_compile\"") >&5
8764   (eval $ac_compile) 2>&5
8765   ac_status=$?
8766   echo "$as_me:8766: \$? = $ac_status" >&5
8767   (exit $ac_status); } &&
8768          { ac_try='test -s conftest.$ac_objext'
8769   { (eval echo "$as_me:8769: \"$ac_try\"") >&5
8770   (eval $ac_try) 2>&5
8771   ac_status=$?
8772   echo "$as_me:8772: \$? = $ac_status" >&5
8773   (exit $ac_status); }; }; then
8774   cf_cv_posix_c_source=no
8775 else
8776   echo "$as_me: failed program was:" >&5
8777 cat conftest.$ac_ext >&5
8778 cf_want_posix_source=no
8779          case .$cf_POSIX_C_SOURCE in
8780          (.[12]??*)
8781                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8782                 ;;
8783          (.2)
8784                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8785                 cf_want_posix_source=yes
8786                 ;;
8787          (.*)
8788                 cf_want_posix_source=yes
8789                 ;;
8790          esac
8791          if test "$cf_want_posix_source" = yes ; then
8792                 cat >conftest.$ac_ext <<_ACEOF
8793 #line 8793 "configure"
8794 #include "confdefs.h"
8795 #include <sys/types.h>
8796 int
8797 main (void)
8798 {
8799
8800 #ifdef _POSIX_SOURCE
8801 make an error
8802 #endif
8803   ;
8804   return 0;
8805 }
8806 _ACEOF
8807 rm -f conftest.$ac_objext
8808 if { (eval echo "$as_me:8808: \"$ac_compile\"") >&5
8809   (eval $ac_compile) 2>&5
8810   ac_status=$?
8811   echo "$as_me:8811: \$? = $ac_status" >&5
8812   (exit $ac_status); } &&
8813          { ac_try='test -s conftest.$ac_objext'
8814   { (eval echo "$as_me:8814: \"$ac_try\"") >&5
8815   (eval $ac_try) 2>&5
8816   ac_status=$?
8817   echo "$as_me:8817: \$? = $ac_status" >&5
8818   (exit $ac_status); }; }; then
8819   :
8820 else
8821   echo "$as_me: failed program was:" >&5
8822 cat conftest.$ac_ext >&5
8823 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8824 fi
8825 rm -f conftest.$ac_objext conftest.$ac_ext
8826          fi
8827
8828 echo "${as_me:-configure}:8828: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8829
8830          CFLAGS="$cf_trim_CFLAGS"
8831          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8832
8833 echo "${as_me:-configure}:8833: testing if the second compile does not leave our definition intact error ..." 1>&5
8834
8835          cat >conftest.$ac_ext <<_ACEOF
8836 #line 8836 "configure"
8837 #include "confdefs.h"
8838 #include <sys/types.h>
8839 int
8840 main (void)
8841 {
8842
8843 #ifndef _POSIX_C_SOURCE
8844 make an error
8845 #endif
8846   ;
8847   return 0;
8848 }
8849 _ACEOF
8850 rm -f conftest.$ac_objext
8851 if { (eval echo "$as_me:8851: \"$ac_compile\"") >&5
8852   (eval $ac_compile) 2>&5
8853   ac_status=$?
8854   echo "$as_me:8854: \$? = $ac_status" >&5
8855   (exit $ac_status); } &&
8856          { ac_try='test -s conftest.$ac_objext'
8857   { (eval echo "$as_me:8857: \"$ac_try\"") >&5
8858   (eval $ac_try) 2>&5
8859   ac_status=$?
8860   echo "$as_me:8860: \$? = $ac_status" >&5
8861   (exit $ac_status); }; }; then
8862   :
8863 else
8864   echo "$as_me: failed program was:" >&5
8865 cat conftest.$ac_ext >&5
8866 cf_cv_posix_c_source=no
8867 fi
8868 rm -f conftest.$ac_objext conftest.$ac_ext
8869          CFLAGS="$cf_save_CFLAGS"
8870          CPPFLAGS="$cf_save_CPPFLAGS"
8871
8872 fi
8873 rm -f conftest.$ac_objext conftest.$ac_ext
8874
8875 fi
8876 echo "$as_me:8876: result: $cf_cv_posix_c_source" >&5
8877 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8878
8879 if test "$cf_cv_posix_c_source" != no ; then
8880         CFLAGS="$cf_trim_CFLAGS"
8881         CPPFLAGS="$cf_trim_CPPFLAGS"
8882
8883 cf_fix_cppflags=no
8884 cf_new_cflags=
8885 cf_new_cppflags=
8886 cf_new_extra_cppflags=
8887
8888 for cf_add_cflags in $cf_cv_posix_c_source
8889 do
8890 case $cf_fix_cppflags in
8891 (no)
8892         case $cf_add_cflags in
8893         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8894                 case $cf_add_cflags in
8895                 (-D*)
8896                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8897
8898                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8899                                 && test -z "${cf_tst_cflags}" \
8900                                 && cf_fix_cppflags=yes
8901
8902                         if test $cf_fix_cppflags = yes ; then
8903
8904         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8905         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8906
8907                                 continue
8908                         elif test "${cf_tst_cflags}" = "\"'" ; then
8909
8910         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8911         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8912
8913                                 continue
8914                         fi
8915                         ;;
8916                 esac
8917                 case "$CPPFLAGS" in
8918                 (*$cf_add_cflags)
8919                         ;;
8920                 (*)
8921                         case $cf_add_cflags in
8922                         (-D*)
8923                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8924
8925 CPPFLAGS=`echo "$CPPFLAGS" | \
8926         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8927                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8928
8929                                 ;;
8930                         esac
8931
8932         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8933         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8934
8935                         ;;
8936                 esac
8937                 ;;
8938         (*)
8939
8940         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8941         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8942
8943                 ;;
8944         esac
8945         ;;
8946 (yes)
8947
8948         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8949         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8950
8951         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8952
8953         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8954                 && test -z "${cf_tst_cflags}" \
8955                 && cf_fix_cppflags=no
8956         ;;
8957 esac
8958 done
8959
8960 if test -n "$cf_new_cflags" ; then
8961
8962         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8963         CFLAGS="${CFLAGS}$cf_new_cflags"
8964
8965 fi
8966
8967 if test -n "$cf_new_cppflags" ; then
8968
8969         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8970         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8971
8972 fi
8973
8974 if test -n "$cf_new_extra_cppflags" ; then
8975
8976         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8977         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8978
8979 fi
8980
8981 fi
8982
8983         ;;
8984 esac
8985
8986 if test -n "$cf_xopen_source" ; then
8987
8988 cf_fix_cppflags=no
8989 cf_new_cflags=
8990 cf_new_cppflags=
8991 cf_new_extra_cppflags=
8992
8993 for cf_add_cflags in $cf_xopen_source
8994 do
8995 case $cf_fix_cppflags in
8996 (no)
8997         case $cf_add_cflags in
8998         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8999                 case $cf_add_cflags in
9000                 (-D*)
9001                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9002
9003                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9004                                 && test -z "${cf_tst_cflags}" \
9005                                 && cf_fix_cppflags=yes
9006
9007                         if test $cf_fix_cppflags = yes ; then
9008
9009         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9010         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9011
9012                                 continue
9013                         elif test "${cf_tst_cflags}" = "\"'" ; then
9014
9015         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9016         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9017
9018                                 continue
9019                         fi
9020                         ;;
9021                 esac
9022                 case "$CPPFLAGS" in
9023                 (*$cf_add_cflags)
9024                         ;;
9025                 (*)
9026                         case $cf_add_cflags in
9027                         (-D*)
9028                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9029
9030 CPPFLAGS=`echo "$CPPFLAGS" | \
9031         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9032                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9033
9034                                 ;;
9035                         esac
9036
9037         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9038         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9039
9040                         ;;
9041                 esac
9042                 ;;
9043         (*)
9044
9045         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9046         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9047
9048                 ;;
9049         esac
9050         ;;
9051 (yes)
9052
9053         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9054         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9055
9056         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9057
9058         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9059                 && test -z "${cf_tst_cflags}" \
9060                 && cf_fix_cppflags=no
9061         ;;
9062 esac
9063 done
9064
9065 if test -n "$cf_new_cflags" ; then
9066         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9067
9068 echo "${as_me:-configure}:9068: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9069
9070         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9071         CFLAGS="${CFLAGS}$cf_new_cflags"
9072
9073 fi
9074
9075 if test -n "$cf_new_cppflags" ; then
9076         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9077
9078 echo "${as_me:-configure}:9078: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9079
9080         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9081         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9082
9083 fi
9084
9085 if test -n "$cf_new_extra_cppflags" ; then
9086         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9087
9088 echo "${as_me:-configure}:9088: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9089
9090         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9091         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9092
9093 fi
9094
9095 fi
9096
9097 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9098         echo "$as_me:9098: checking if _XOPEN_SOURCE really is set" >&5
9099 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9100         cat >conftest.$ac_ext <<_ACEOF
9101 #line 9101 "configure"
9102 #include "confdefs.h"
9103 #include <stdlib.h>
9104 int
9105 main (void)
9106 {
9107
9108 #ifndef _XOPEN_SOURCE
9109 make an error
9110 #endif
9111   ;
9112   return 0;
9113 }
9114 _ACEOF
9115 rm -f conftest.$ac_objext
9116 if { (eval echo "$as_me:9116: \"$ac_compile\"") >&5
9117   (eval $ac_compile) 2>&5
9118   ac_status=$?
9119   echo "$as_me:9119: \$? = $ac_status" >&5
9120   (exit $ac_status); } &&
9121          { ac_try='test -s conftest.$ac_objext'
9122   { (eval echo "$as_me:9122: \"$ac_try\"") >&5
9123   (eval $ac_try) 2>&5
9124   ac_status=$?
9125   echo "$as_me:9125: \$? = $ac_status" >&5
9126   (exit $ac_status); }; }; then
9127   cf_XOPEN_SOURCE_set=yes
9128 else
9129   echo "$as_me: failed program was:" >&5
9130 cat conftest.$ac_ext >&5
9131 cf_XOPEN_SOURCE_set=no
9132 fi
9133 rm -f conftest.$ac_objext conftest.$ac_ext
9134         echo "$as_me:9134: result: $cf_XOPEN_SOURCE_set" >&5
9135 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9136         if test $cf_XOPEN_SOURCE_set = yes
9137         then
9138                 cat >conftest.$ac_ext <<_ACEOF
9139 #line 9139 "configure"
9140 #include "confdefs.h"
9141 #include <stdlib.h>
9142 int
9143 main (void)
9144 {
9145
9146 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9147 make an error
9148 #endif
9149   ;
9150   return 0;
9151 }
9152 _ACEOF
9153 rm -f conftest.$ac_objext
9154 if { (eval echo "$as_me:9154: \"$ac_compile\"") >&5
9155   (eval $ac_compile) 2>&5
9156   ac_status=$?
9157   echo "$as_me:9157: \$? = $ac_status" >&5
9158   (exit $ac_status); } &&
9159          { ac_try='test -s conftest.$ac_objext'
9160   { (eval echo "$as_me:9160: \"$ac_try\"") >&5
9161   (eval $ac_try) 2>&5
9162   ac_status=$?
9163   echo "$as_me:9163: \$? = $ac_status" >&5
9164   (exit $ac_status); }; }; then
9165   cf_XOPEN_SOURCE_set_ok=yes
9166 else
9167   echo "$as_me: failed program was:" >&5
9168 cat conftest.$ac_ext >&5
9169 cf_XOPEN_SOURCE_set_ok=no
9170 fi
9171 rm -f conftest.$ac_objext conftest.$ac_ext
9172                 if test $cf_XOPEN_SOURCE_set_ok = no
9173                 then
9174                         { echo "$as_me:9174: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9175 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9176                 fi
9177         else
9178
9179 echo "$as_me:9179: checking if we should define _XOPEN_SOURCE" >&5
9180 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9181 if test "${cf_cv_xopen_source+set}" = set; then
9182   echo $ECHO_N "(cached) $ECHO_C" >&6
9183 else
9184
9185         cat >conftest.$ac_ext <<_ACEOF
9186 #line 9186 "configure"
9187 #include "confdefs.h"
9188
9189 #include <stdlib.h>
9190 #include <string.h>
9191 #include <sys/types.h>
9192
9193 int
9194 main (void)
9195 {
9196
9197 #ifndef _XOPEN_SOURCE
9198 make an error
9199 #endif
9200   ;
9201   return 0;
9202 }
9203 _ACEOF
9204 rm -f conftest.$ac_objext
9205 if { (eval echo "$as_me:9205: \"$ac_compile\"") >&5
9206   (eval $ac_compile) 2>&5
9207   ac_status=$?
9208   echo "$as_me:9208: \$? = $ac_status" >&5
9209   (exit $ac_status); } &&
9210          { ac_try='test -s conftest.$ac_objext'
9211   { (eval echo "$as_me:9211: \"$ac_try\"") >&5
9212   (eval $ac_try) 2>&5
9213   ac_status=$?
9214   echo "$as_me:9214: \$? = $ac_status" >&5
9215   (exit $ac_status); }; }; then
9216   cf_cv_xopen_source=no
9217 else
9218   echo "$as_me: failed program was:" >&5
9219 cat conftest.$ac_ext >&5
9220 cf_save="$CPPFLAGS"
9221          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9222          cat >conftest.$ac_ext <<_ACEOF
9223 #line 9223 "configure"
9224 #include "confdefs.h"
9225
9226 #include <stdlib.h>
9227 #include <string.h>
9228 #include <sys/types.h>
9229
9230 int
9231 main (void)
9232 {
9233
9234 #ifdef _XOPEN_SOURCE
9235 make an error
9236 #endif
9237   ;
9238   return 0;
9239 }
9240 _ACEOF
9241 rm -f conftest.$ac_objext
9242 if { (eval echo "$as_me:9242: \"$ac_compile\"") >&5
9243   (eval $ac_compile) 2>&5
9244   ac_status=$?
9245   echo "$as_me:9245: \$? = $ac_status" >&5
9246   (exit $ac_status); } &&
9247          { ac_try='test -s conftest.$ac_objext'
9248   { (eval echo "$as_me:9248: \"$ac_try\"") >&5
9249   (eval $ac_try) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); }; }; then
9253   cf_cv_xopen_source=no
9254 else
9255   echo "$as_me: failed program was:" >&5
9256 cat conftest.$ac_ext >&5
9257 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9258 fi
9259 rm -f conftest.$ac_objext conftest.$ac_ext
9260         CPPFLAGS="$cf_save"
9261
9262 fi
9263 rm -f conftest.$ac_objext conftest.$ac_ext
9264
9265 fi
9266 echo "$as_me:9266: result: $cf_cv_xopen_source" >&5
9267 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9268
9269 if test "$cf_cv_xopen_source" != no ; then
9270
9271 CFLAGS=`echo "$CFLAGS" | \
9272         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9273                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9274
9275 CPPFLAGS=`echo "$CPPFLAGS" | \
9276         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9277                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9278
9279         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9280
9281 cf_fix_cppflags=no
9282 cf_new_cflags=
9283 cf_new_cppflags=
9284 cf_new_extra_cppflags=
9285
9286 for cf_add_cflags in $cf_temp_xopen_source
9287 do
9288 case $cf_fix_cppflags in
9289 (no)
9290         case $cf_add_cflags in
9291         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9292                 case $cf_add_cflags in
9293                 (-D*)
9294                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9295
9296                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9297                                 && test -z "${cf_tst_cflags}" \
9298                                 && cf_fix_cppflags=yes
9299
9300                         if test $cf_fix_cppflags = yes ; then
9301
9302         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9303         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9304
9305                                 continue
9306                         elif test "${cf_tst_cflags}" = "\"'" ; then
9307
9308         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9309         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9310
9311                                 continue
9312                         fi
9313                         ;;
9314                 esac
9315                 case "$CPPFLAGS" in
9316                 (*$cf_add_cflags)
9317                         ;;
9318                 (*)
9319                         case $cf_add_cflags in
9320                         (-D*)
9321                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9322
9323 CPPFLAGS=`echo "$CPPFLAGS" | \
9324         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9325                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9326
9327                                 ;;
9328                         esac
9329
9330         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9331         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9332
9333                         ;;
9334                 esac
9335                 ;;
9336         (*)
9337
9338         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9339         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9340
9341                 ;;
9342         esac
9343         ;;
9344 (yes)
9345
9346         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9347         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9348
9349         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9350
9351         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9352                 && test -z "${cf_tst_cflags}" \
9353                 && cf_fix_cppflags=no
9354         ;;
9355 esac
9356 done
9357
9358 if test -n "$cf_new_cflags" ; then
9359
9360         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9361         CFLAGS="${CFLAGS}$cf_new_cflags"
9362
9363 fi
9364
9365 if test -n "$cf_new_cppflags" ; then
9366
9367         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9368         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9369
9370 fi
9371
9372 if test -n "$cf_new_extra_cppflags" ; then
9373
9374         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9375         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9376
9377 fi
9378
9379 fi
9380
9381         fi
9382 fi
9383
9384 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9385
9386 # Work around breakage on OS X
9387
9388 echo "$as_me:9388: checking if SIGWINCH is defined" >&5
9389 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9390 if test "${cf_cv_define_sigwinch+set}" = set; then
9391   echo $ECHO_N "(cached) $ECHO_C" >&6
9392 else
9393
9394         cat >conftest.$ac_ext <<_ACEOF
9395 #line 9395 "configure"
9396 #include "confdefs.h"
9397
9398 #include <sys/types.h>
9399 #include <sys/signal.h>
9400
9401 int
9402 main (void)
9403 {
9404 int x = SIGWINCH
9405   ;
9406   return 0;
9407 }
9408 _ACEOF
9409 rm -f conftest.$ac_objext
9410 if { (eval echo "$as_me:9410: \"$ac_compile\"") >&5
9411   (eval $ac_compile) 2>&5
9412   ac_status=$?
9413   echo "$as_me:9413: \$? = $ac_status" >&5
9414   (exit $ac_status); } &&
9415          { ac_try='test -s conftest.$ac_objext'
9416   { (eval echo "$as_me:9416: \"$ac_try\"") >&5
9417   (eval $ac_try) 2>&5
9418   ac_status=$?
9419   echo "$as_me:9419: \$? = $ac_status" >&5
9420   (exit $ac_status); }; }; then
9421   cf_cv_define_sigwinch=yes
9422 else
9423   echo "$as_me: failed program was:" >&5
9424 cat conftest.$ac_ext >&5
9425 cat >conftest.$ac_ext <<_ACEOF
9426 #line 9426 "configure"
9427 #include "confdefs.h"
9428
9429 #undef _XOPEN_SOURCE
9430 #undef _POSIX_SOURCE
9431 #undef _POSIX_C_SOURCE
9432 #include <sys/types.h>
9433 #include <sys/signal.h>
9434
9435 int
9436 main (void)
9437 {
9438 int x = SIGWINCH
9439   ;
9440   return 0;
9441 }
9442 _ACEOF
9443 rm -f conftest.$ac_objext
9444 if { (eval echo "$as_me:9444: \"$ac_compile\"") >&5
9445   (eval $ac_compile) 2>&5
9446   ac_status=$?
9447   echo "$as_me:9447: \$? = $ac_status" >&5
9448   (exit $ac_status); } &&
9449          { ac_try='test -s conftest.$ac_objext'
9450   { (eval echo "$as_me:9450: \"$ac_try\"") >&5
9451   (eval $ac_try) 2>&5
9452   ac_status=$?
9453   echo "$as_me:9453: \$? = $ac_status" >&5
9454   (exit $ac_status); }; }; then
9455   cf_cv_define_sigwinch=maybe
9456 else
9457   echo "$as_me: failed program was:" >&5
9458 cat conftest.$ac_ext >&5
9459 cf_cv_define_sigwinch=no
9460 fi
9461 rm -f conftest.$ac_objext conftest.$ac_ext
9462
9463 fi
9464 rm -f conftest.$ac_objext conftest.$ac_ext
9465
9466 fi
9467 echo "$as_me:9467: result: $cf_cv_define_sigwinch" >&5
9468 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9469
9470 if test "$cf_cv_define_sigwinch" = maybe ; then
9471 echo "$as_me:9471: checking for actual SIGWINCH definition" >&5
9472 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9473 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9474   echo $ECHO_N "(cached) $ECHO_C" >&6
9475 else
9476
9477 cf_cv_fixup_sigwinch=unknown
9478 cf_sigwinch=32
9479 while test $cf_sigwinch != 1
9480 do
9481         cat >conftest.$ac_ext <<_ACEOF
9482 #line 9482 "configure"
9483 #include "confdefs.h"
9484
9485 #undef _XOPEN_SOURCE
9486 #undef _POSIX_SOURCE
9487 #undef _POSIX_C_SOURCE
9488 #include <sys/types.h>
9489 #include <sys/signal.h>
9490
9491 int
9492 main (void)
9493 {
9494
9495 #if SIGWINCH != $cf_sigwinch
9496 make an error
9497 #endif
9498 int x = SIGWINCH
9499   ;
9500   return 0;
9501 }
9502 _ACEOF
9503 rm -f conftest.$ac_objext
9504 if { (eval echo "$as_me:9504: \"$ac_compile\"") >&5
9505   (eval $ac_compile) 2>&5
9506   ac_status=$?
9507   echo "$as_me:9507: \$? = $ac_status" >&5
9508   (exit $ac_status); } &&
9509          { ac_try='test -s conftest.$ac_objext'
9510   { (eval echo "$as_me:9510: \"$ac_try\"") >&5
9511   (eval $ac_try) 2>&5
9512   ac_status=$?
9513   echo "$as_me:9513: \$? = $ac_status" >&5
9514   (exit $ac_status); }; }; then
9515   cf_cv_fixup_sigwinch=$cf_sigwinch
9516          break
9517 else
9518   echo "$as_me: failed program was:" >&5
9519 cat conftest.$ac_ext >&5
9520 fi
9521 rm -f conftest.$ac_objext conftest.$ac_ext
9522
9523 cf_sigwinch=`expr $cf_sigwinch - 1`
9524 done
9525
9526 fi
9527 echo "$as_me:9527: result: $cf_cv_fixup_sigwinch" >&5
9528 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9529
9530         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9531                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9532         fi
9533 fi
9534
9535 # Checks for CODESET support.
9536
9537 echo "$as_me:9537: checking for nl_langinfo and CODESET" >&5
9538 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9539 if test "${am_cv_langinfo_codeset+set}" = set; then
9540   echo $ECHO_N "(cached) $ECHO_C" >&6
9541 else
9542   cat >conftest.$ac_ext <<_ACEOF
9543 #line 9543 "configure"
9544 #include "confdefs.h"
9545 #include <langinfo.h>
9546 int
9547 main (void)
9548 {
9549 char* cs = nl_langinfo(CODESET);
9550   ;
9551   return 0;
9552 }
9553 _ACEOF
9554 rm -f conftest.$ac_objext conftest$ac_exeext
9555 if { (eval echo "$as_me:9555: \"$ac_link\"") >&5
9556   (eval $ac_link) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit $ac_status); } &&
9560          { ac_try='test -s conftest$ac_exeext'
9561   { (eval echo "$as_me:9561: \"$ac_try\"") >&5
9562   (eval $ac_try) 2>&5
9563   ac_status=$?
9564   echo "$as_me:9564: \$? = $ac_status" >&5
9565   (exit $ac_status); }; }; then
9566   am_cv_langinfo_codeset=yes
9567 else
9568   echo "$as_me: failed program was:" >&5
9569 cat conftest.$ac_ext >&5
9570 am_cv_langinfo_codeset=no
9571 fi
9572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9573
9574 fi
9575 echo "$as_me:9575: result: $am_cv_langinfo_codeset" >&5
9576 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9577         if test $am_cv_langinfo_codeset = yes; then
9578
9579 cat >>confdefs.h <<\EOF
9580 #define HAVE_LANGINFO_CODESET 1
9581 EOF
9582
9583         fi
9584
9585 # use these variables to work around a defect in gcc's fixincludes.
9586 NCURSES_OK_WCHAR_T=
9587 NCURSES_OK_WINT_T=
9588
9589 echo "$as_me:9589: checking if you want wide-character code" >&5
9590 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9591
9592 # Check whether --enable-widec or --disable-widec was given.
9593 if test "${enable_widec+set}" = set; then
9594   enableval="$enable_widec"
9595   with_widec=$enableval
9596 else
9597   with_widec=no
9598 fi;
9599 echo "$as_me:9599: result: $with_widec" >&5
9600 echo "${ECHO_T}$with_widec" >&6
9601
9602 NCURSES_WCWIDTH_GRAPHICS=1
9603
9604 if test "x$with_widec" = xyes ; then
9605         if test "x$disable_lib_suffixes" = xno ; then
9606                 LIB_SUFFIX="w${LIB_SUFFIX}"
9607         fi
9608
9609 cat >>confdefs.h <<\EOF
9610 #define USE_WIDEC_SUPPORT 1
9611 EOF
9612
9613 cat >>confdefs.h <<\EOF
9614 #define NCURSES_WIDECHAR 1
9615 EOF
9616
9617 for ac_header in \
9618 wchar.h \
9619 wctype.h \
9620
9621 do
9622 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9623 echo "$as_me:9623: checking for $ac_header" >&5
9624 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9625 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9626   echo $ECHO_N "(cached) $ECHO_C" >&6
9627 else
9628   cat >conftest.$ac_ext <<_ACEOF
9629 #line 9629 "configure"
9630 #include "confdefs.h"
9631 #include <$ac_header>
9632 _ACEOF
9633 if { (eval echo "$as_me:9633: \"$ac_cpp conftest.$ac_ext\"") >&5
9634   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9635   ac_status=$?
9636   egrep -v '^ *\+' conftest.er1 >conftest.err
9637   rm -f conftest.er1
9638   cat conftest.err >&5
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit $ac_status); } >/dev/null; then
9641   if test -s conftest.err; then
9642     ac_cpp_err=$ac_c_preproc_warn_flag
9643   else
9644     ac_cpp_err=
9645   fi
9646 else
9647   ac_cpp_err=yes
9648 fi
9649 if test -z "$ac_cpp_err"; then
9650   eval "$as_ac_Header=yes"
9651 else
9652   echo "$as_me: failed program was:" >&5
9653   cat conftest.$ac_ext >&5
9654   eval "$as_ac_Header=no"
9655 fi
9656 rm -f conftest.err conftest.$ac_ext
9657 fi
9658 echo "$as_me:9658: result: `eval echo '${'$as_ac_Header'}'`" >&5
9659 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9660 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9661   cat >>confdefs.h <<EOF
9662 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9663 EOF
9664
9665 fi
9666 done
9667
9668 echo "$as_me:9668: checking if wchar.h can be used as is" >&5
9669 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9670 if test "${cf_cv_wchar_h_okay+set}" = set; then
9671   echo $ECHO_N "(cached) $ECHO_C" >&6
9672 else
9673
9674 cat >conftest.$ac_ext <<_ACEOF
9675 #line 9675 "configure"
9676 #include "confdefs.h"
9677
9678 #include <stdlib.h>
9679 #ifdef HAVE_WCHAR_H
9680 #include <wchar.h>
9681 #endif
9682 #ifdef HAVE_WCTYPE_H
9683 #include <wctype.h>
9684 #endif
9685
9686 int
9687 main (void)
9688 {
9689
9690         wint_t foo = 0;
9691         int bar = iswpunct(foo)
9692   ;
9693   return 0;
9694 }
9695 _ACEOF
9696 rm -f conftest.$ac_objext
9697 if { (eval echo "$as_me:9697: \"$ac_compile\"") >&5
9698   (eval $ac_compile) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); } &&
9702          { ac_try='test -s conftest.$ac_objext'
9703   { (eval echo "$as_me:9703: \"$ac_try\"") >&5
9704   (eval $ac_try) 2>&5
9705   ac_status=$?
9706   echo "$as_me:9706: \$? = $ac_status" >&5
9707   (exit $ac_status); }; }; then
9708   cf_cv_wchar_h_okay=yes
9709 else
9710   echo "$as_me: failed program was:" >&5
9711 cat conftest.$ac_ext >&5
9712 cf_cv_wchar_h_okay=no
9713 fi
9714 rm -f conftest.$ac_objext conftest.$ac_ext
9715 fi
9716 echo "$as_me:9716: result: $cf_cv_wchar_h_okay" >&5
9717 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9718
9719 if test $cf_cv_wchar_h_okay = no
9720 then
9721
9722 echo "$as_me:9722: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9723 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9724 cat >conftest.$ac_ext <<_ACEOF
9725 #line 9725 "configure"
9726 #include "confdefs.h"
9727 #include <sys/types.h>
9728
9729 int
9730 main (void)
9731 {
9732
9733 #ifndef _XOPEN_SOURCE_EXTENDED
9734 make an error
9735 #endif
9736   ;
9737   return 0;
9738 }
9739 _ACEOF
9740 rm -f conftest.$ac_objext
9741 if { (eval echo "$as_me:9741: \"$ac_compile\"") >&5
9742   (eval $ac_compile) 2>&5
9743   ac_status=$?
9744   echo "$as_me:9744: \$? = $ac_status" >&5
9745   (exit $ac_status); } &&
9746          { ac_try='test -s conftest.$ac_objext'
9747   { (eval echo "$as_me:9747: \"$ac_try\"") >&5
9748   (eval $ac_try) 2>&5
9749   ac_status=$?
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); }; }; then
9752   cf_result=no
9753 else
9754   echo "$as_me: failed program was:" >&5
9755 cat conftest.$ac_ext >&5
9756 cf_result=yes
9757 fi
9758 rm -f conftest.$ac_objext conftest.$ac_ext
9759 echo "$as_me:9759: result: $cf_result" >&5
9760 echo "${ECHO_T}$cf_result" >&6
9761
9762 if test "$cf_result" = yes ; then
9763         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9764 elif test "x" != "x" ; then
9765         echo "$as_me:9765: checking checking for compatible value versus " >&5
9766 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9767         cat >conftest.$ac_ext <<_ACEOF
9768 #line 9768 "configure"
9769 #include "confdefs.h"
9770 #include <sys/types.h>
9771
9772 int
9773 main (void)
9774 {
9775
9776 #if _XOPEN_SOURCE_EXTENDED- < 0
9777 make an error
9778 #endif
9779   ;
9780   return 0;
9781 }
9782 _ACEOF
9783 rm -f conftest.$ac_objext
9784 if { (eval echo "$as_me:9784: \"$ac_compile\"") >&5
9785   (eval $ac_compile) 2>&5
9786   ac_status=$?
9787   echo "$as_me:9787: \$? = $ac_status" >&5
9788   (exit $ac_status); } &&
9789          { ac_try='test -s conftest.$ac_objext'
9790   { (eval echo "$as_me:9790: \"$ac_try\"") >&5
9791   (eval $ac_try) 2>&5
9792   ac_status=$?
9793   echo "$as_me:9793: \$? = $ac_status" >&5
9794   (exit $ac_status); }; }; then
9795   cf_result=yes
9796 else
9797   echo "$as_me: failed program was:" >&5
9798 cat conftest.$ac_ext >&5
9799 cf_result=no
9800 fi
9801 rm -f conftest.$ac_objext conftest.$ac_ext
9802         echo "$as_me:9802: result: $cf_result" >&5
9803 echo "${ECHO_T}$cf_result" >&6
9804         if test "$cf_result" = no ; then
9805                 # perhaps we can override it - try...
9806                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9807         fi
9808 fi
9809
9810 fi
9811
9812 echo "$as_me:9812: checking if wcwidth agrees graphics are single-width" >&5
9813 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9814 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9815   echo $ECHO_N "(cached) $ECHO_C" >&6
9816 else
9817
9818 cat >conftest.in <<CF_EOF
9819 -       VT100 symbols
9820 0x250c  upper left corner
9821 0x2514  lower left corner
9822 0x2510  upper right corner
9823 0x2518  lower right corner
9824 0x251c  tee pointing left
9825 0x2524  tee pointing right
9826 0x2534  tee pointing up
9827 0x252c  tee pointing down
9828 0x2500  horizontal line
9829 0x2502  vertical line
9830 0x253c  large plus or crossover
9831 0x23ba  scan line 1
9832 0x23bd  scan line 9
9833 0x25c6  diamond
9834 0x2592  checker board (stipple)
9835 0x00b0  degree symbol
9836 0x00b1  plus/minus
9837 0x00b7  bullet
9838 -       Teletype 5410v1 symbols
9839 0x2190  arrow pointing left
9840 0x2192  arrow pointing right
9841 0x2193  arrow pointing down
9842 0x2191  arrow pointing up
9843 0x2592  board of squares
9844 0x2603  lantern symbol
9845 0x25ae  solid square block
9846 -       these defaults were invented for ncurses
9847 0x23bb  scan line 3
9848 0x23bc  scan line 7
9849 0x2264  less-than-or-equal-to
9850 0x2265  greater-than-or-equal-to
9851 0x03c0  greek pi
9852 0x2260  not-equal
9853 0x00a3  pound-sterling symbol
9854 -       thick-line-drawing
9855 0x250f  upper left corner
9856 0x2517  lower left corner
9857 0x2513  upper right corner
9858 0x251b  lower right corner
9859 0x2523  tee pointing left
9860 0x252b  tee pointing right
9861 0x253b  tee pointing up
9862 0x2533  tee pointing down
9863 0x2501  horizontal line
9864 0x2503  vertical line
9865 0x254b  large plus or crossover
9866 -       double-line-drawing
9867 0x2554  upper left corner
9868 0x255a  lower left corner
9869 0x2557  upper right corner
9870 0x255d  lower right corner
9871 0x2563  tee pointing left
9872 0x2560  tee pointing right
9873 0x2569  tee pointing up
9874 0x2566  tee pointing down
9875 0x2550  horizontal line
9876 0x2551  vertical line
9877 0x256c  large plus or crossover
9878 CF_EOF
9879 if test "$cross_compiling" = yes; then
9880   cf_cv_wcwidth_graphics=unknown
9881 else
9882   cat >conftest.$ac_ext <<_ACEOF
9883 #line 9883 "configure"
9884 #include "confdefs.h"
9885
9886 #include <locale.h>
9887 #include <stdio.h>
9888 #include <wchar.h>
9889
9890 #define MY_LEN 80
9891
9892 int
9893 main(void)
9894 {
9895         FILE *fp;
9896         int value;
9897         char buffer[MY_LEN + 1];
9898         char notes[MY_LEN + 1];
9899         int totals = 0;
9900         int passed = 0;
9901
9902         if (setlocale(LC_ALL, "en_US.UTF8") ||
9903                 setlocale(LC_ALL, "en_US.UTF-8") ||
9904                 setlocale(LC_ALL, "en_US.utf8") ||
9905                 setlocale(LC_ALL, "en_US.utf-8")) {
9906                 if ((fp = fopen("conftest.in", "r")) != 0) {
9907                         while (fgets(buffer, MY_LEN, fp) != 0) {
9908                                 if (*buffer == '-') {
9909                                         fprintf(stderr, "\t%s", buffer);
9910                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9911                                         ++totals;
9912                                         if (wcwidth(value) == 1)
9913                                                 ++passed;
9914                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9915                                 } else {
9916                                         fprintf(stderr, "?\t%s", buffer);
9917                                 }
9918                         }
9919                 }
9920         }
9921         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9922         return (totals == passed) ? 0 : 1;
9923 }
9924
9925 _ACEOF
9926 rm -f conftest$ac_exeext
9927 if { (eval echo "$as_me:9927: \"$ac_link\"") >&5
9928   (eval $ac_link) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9932   { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9933   (eval $ac_try) 2>&5
9934   ac_status=$?
9935   echo "$as_me:9935: \$? = $ac_status" >&5
9936   (exit $ac_status); }; }; then
9937   cf_cv_wcwidth_graphics=yes
9938 else
9939   echo "$as_me: program exited with status $ac_status" >&5
9940 echo "$as_me: failed program was:" >&5
9941 cat conftest.$ac_ext >&5
9942 cf_cv_wcwidth_graphics=no
9943 fi
9944 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9945 fi
9946
9947 fi
9948 echo "$as_me:9948: result: $cf_cv_wcwidth_graphics" >&5
9949 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9950
9951         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9952
9953         # with_overwrite=no
9954         NCURSES_CH_T=cchar_t
9955
9956 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9957 do
9958 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9959 echo "$as_me:9959: checking for $ac_func" >&5
9960 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9961 if eval "test \"\${$as_ac_var+set}\" = set"; then
9962   echo $ECHO_N "(cached) $ECHO_C" >&6
9963 else
9964   cat >conftest.$ac_ext <<_ACEOF
9965 #line 9965 "configure"
9966 #include "confdefs.h"
9967 /* System header to define __stub macros and hopefully few prototypes,
9968     which can conflict with char $ac_func (); below.  */
9969 #include <assert.h>
9970 /* Override any gcc2 internal prototype to avoid an error.  */
9971 #ifdef __cplusplus
9972 extern "C"
9973 #endif
9974 /* We use char because int might match the return type of a gcc2
9975    builtin and then its argument prototype would still apply.  */
9976 char $ac_func ();
9977 char (*f) ();
9978
9979 int
9980 main (void)
9981 {
9982 /* The GNU C library defines this for functions which it implements
9983     to always fail with ENOSYS.  Some functions are actually named
9984     something starting with __ and the normal name is an alias.  */
9985 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9986 choke me
9987 #else
9988 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9989 #endif
9990
9991   ;
9992   return 0;
9993 }
9994 _ACEOF
9995 rm -f conftest.$ac_objext conftest$ac_exeext
9996 if { (eval echo "$as_me:9996: \"$ac_link\"") >&5
9997   (eval $ac_link) 2>&5
9998   ac_status=$?
9999   echo "$as_me:9999: \$? = $ac_status" >&5
10000   (exit $ac_status); } &&
10001          { ac_try='test -s conftest$ac_exeext'
10002   { (eval echo "$as_me:10002: \"$ac_try\"") >&5
10003   (eval $ac_try) 2>&5
10004   ac_status=$?
10005   echo "$as_me:10005: \$? = $ac_status" >&5
10006   (exit $ac_status); }; }; then
10007   eval "$as_ac_var=yes"
10008 else
10009   echo "$as_me: failed program was:" >&5
10010 cat conftest.$ac_ext >&5
10011 eval "$as_ac_var=no"
10012 fi
10013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10014 fi
10015 echo "$as_me:10015: result: `eval echo '${'$as_ac_var'}'`" >&5
10016 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10017 if test `eval echo '${'$as_ac_var'}'` = yes; then
10018   cat >>confdefs.h <<EOF
10019 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10020 EOF
10021
10022 fi
10023 done
10024
10025         if test "x$ac_cv_func_putwc" != xyes ; then
10026
10027 echo "$as_me:10027: checking for multibyte character support" >&5
10028 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10029 if test "${cf_cv_utf8_lib+set}" = set; then
10030   echo $ECHO_N "(cached) $ECHO_C" >&6
10031 else
10032
10033         cf_save_LIBS="$LIBS"
10034         cat >conftest.$ac_ext <<_ACEOF
10035 #line 10035 "configure"
10036 #include "confdefs.h"
10037
10038 #include <stdlib.h>
10039 int
10040 main (void)
10041 {
10042 putwc(0,0);
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 rm -f conftest.$ac_objext conftest$ac_exeext
10048 if { (eval echo "$as_me:10048: \"$ac_link\"") >&5
10049   (eval $ac_link) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit $ac_status); } &&
10053          { ac_try='test -s conftest$ac_exeext'
10054   { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055   (eval $ac_try) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit $ac_status); }; }; then
10059   cf_cv_utf8_lib=yes
10060 else
10061   echo "$as_me: failed program was:" >&5
10062 cat conftest.$ac_ext >&5
10063
10064 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10065 # will be set on completion of the AC_TRY_LINK below.
10066 cf_cv_header_path_utf8=
10067 cf_cv_library_path_utf8=
10068
10069 echo "${as_me:-configure}:10069: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10070
10071 cf_save_LIBS="$LIBS"
10072
10073 cat >conftest.$ac_ext <<_ACEOF
10074 #line 10074 "configure"
10075 #include "confdefs.h"
10076
10077 #include <libutf8.h>
10078 int
10079 main (void)
10080 {
10081 putwc(0,0);
10082   ;
10083   return 0;
10084 }
10085 _ACEOF
10086 rm -f conftest.$ac_objext conftest$ac_exeext
10087 if { (eval echo "$as_me:10087: \"$ac_link\"") >&5
10088   (eval $ac_link) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); } &&
10092          { ac_try='test -s conftest$ac_exeext'
10093   { (eval echo "$as_me:10093: \"$ac_try\"") >&5
10094   (eval $ac_try) 2>&5
10095   ac_status=$?
10096   echo "$as_me:10096: \$? = $ac_status" >&5
10097   (exit $ac_status); }; }; then
10098
10099         cf_cv_find_linkage_utf8=yes
10100         cf_cv_header_path_utf8=/usr/include
10101         cf_cv_library_path_utf8=/usr/lib
10102
10103 else
10104   echo "$as_me: failed program was:" >&5
10105 cat conftest.$ac_ext >&5
10106
10107 LIBS="-lutf8  $cf_save_LIBS"
10108
10109 cat >conftest.$ac_ext <<_ACEOF
10110 #line 10110 "configure"
10111 #include "confdefs.h"
10112
10113 #include <libutf8.h>
10114 int
10115 main (void)
10116 {
10117 putwc(0,0);
10118   ;
10119   return 0;
10120 }
10121 _ACEOF
10122 rm -f conftest.$ac_objext conftest$ac_exeext
10123 if { (eval echo "$as_me:10123: \"$ac_link\"") >&5
10124   (eval $ac_link) 2>&5
10125   ac_status=$?
10126   echo "$as_me:10126: \$? = $ac_status" >&5
10127   (exit $ac_status); } &&
10128          { ac_try='test -s conftest$ac_exeext'
10129   { (eval echo "$as_me:10129: \"$ac_try\"") >&5
10130   (eval $ac_try) 2>&5
10131   ac_status=$?
10132   echo "$as_me:10132: \$? = $ac_status" >&5
10133   (exit $ac_status); }; }; then
10134
10135         cf_cv_find_linkage_utf8=yes
10136         cf_cv_header_path_utf8=/usr/include
10137         cf_cv_library_path_utf8=/usr/lib
10138         cf_cv_library_file_utf8="-lutf8"
10139
10140 else
10141   echo "$as_me: failed program was:" >&5
10142 cat conftest.$ac_ext >&5
10143
10144         cf_cv_find_linkage_utf8=no
10145         LIBS="$cf_save_LIBS"
10146
10147         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10148
10149 echo "${as_me:-configure}:10149: testing find linkage for utf8 library ..." 1>&5
10150
10151 echo "${as_me:-configure}:10151: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10152
10153         cf_save_CPPFLAGS="$CPPFLAGS"
10154         cf_test_CPPFLAGS="$CPPFLAGS"
10155
10156 cf_search=
10157
10158 # collect the current set of include-directories from compiler flags
10159 cf_header_path_list=""
10160 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10161         for cf_header_path in $CPPFLAGS $CFLAGS
10162         do
10163                 case $cf_header_path in
10164                 (-I*)
10165                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10166
10167 test "x$cf_header_path" != "xNONE" && \
10168 test -d "$cf_header_path" && \
10169  {
10170         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10171         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10172         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10173         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10174         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10175         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10176 }
10177
10178                         cf_header_path_list="$cf_header_path_list $cf_search"
10179                         ;;
10180                 esac
10181         done
10182 fi
10183
10184 # add the variations for the package we are looking for
10185
10186 cf_search=
10187
10188 test "x$prefix" != "xNONE" && \
10189 test -d "$prefix" && \
10190  {
10191         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10192         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10193         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10194         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10195         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10196         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10197 }
10198
10199 for cf_subdir_prefix in \
10200         /usr \
10201         /usr/local \
10202         /usr/pkg \
10203         /opt \
10204         /opt/local \
10205         $HOME
10206 do
10207
10208 test "x$cf_subdir_prefix" != "x$prefix" && \
10209 test -d "$cf_subdir_prefix" && \
10210 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10211         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10212         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10213         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10214         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10215         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10216         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10217 }
10218
10219 done
10220
10221 test "$includedir" != NONE && \
10222 test "$includedir" != "/usr/include" && \
10223 test -d "$includedir" && {
10224         test -d $includedir &&    cf_search="$cf_search $includedir"
10225         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10226 }
10227
10228 test "$oldincludedir" != NONE && \
10229 test "$oldincludedir" != "/usr/include" && \
10230 test -d "$oldincludedir" && {
10231         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10232         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10233 }
10234
10235 cf_search="$cf_search $cf_header_path_list"
10236
10237         for cf_cv_header_path_utf8 in $cf_search
10238         do
10239                 if test -d $cf_cv_header_path_utf8 ; then
10240                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10241
10242 echo "${as_me:-configure}:10242: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10243
10244                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10245                         cat >conftest.$ac_ext <<_ACEOF
10246 #line 10246 "configure"
10247 #include "confdefs.h"
10248
10249 #include <libutf8.h>
10250 int
10251 main (void)
10252 {
10253 putwc(0,0);
10254   ;
10255   return 0;
10256 }
10257 _ACEOF
10258 rm -f conftest.$ac_objext
10259 if { (eval echo "$as_me:10259: \"$ac_compile\"") >&5
10260   (eval $ac_compile) 2>&5
10261   ac_status=$?
10262   echo "$as_me:10262: \$? = $ac_status" >&5
10263   (exit $ac_status); } &&
10264          { ac_try='test -s conftest.$ac_objext'
10265   { (eval echo "$as_me:10265: \"$ac_try\"") >&5
10266   (eval $ac_try) 2>&5
10267   ac_status=$?
10268   echo "$as_me:10268: \$? = $ac_status" >&5
10269   (exit $ac_status); }; }; then
10270
10271                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10272
10273 echo "${as_me:-configure}:10273: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10274
10275                                 cf_cv_find_linkage_utf8=maybe
10276                                 cf_test_CPPFLAGS="$CPPFLAGS"
10277                                 break
10278 else
10279   echo "$as_me: failed program was:" >&5
10280 cat conftest.$ac_ext >&5
10281
10282                                 CPPFLAGS="$cf_save_CPPFLAGS"
10283
10284 fi
10285 rm -f conftest.$ac_objext conftest.$ac_ext
10286                 fi
10287         done
10288
10289         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10290
10291 echo "${as_me:-configure}:10291: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10292
10293                 cf_save_LIBS="$LIBS"
10294                 cf_save_LDFLAGS="$LDFLAGS"
10295
10296                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10297
10298 cf_search=
10299 cf_library_path_list=""
10300 if test -n "${LDFLAGS}${LIBS}" ; then
10301         for cf_library_path in $LDFLAGS $LIBS
10302         do
10303                 case $cf_library_path in
10304                 (-L*)
10305                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10306
10307 test "x$cf_library_path" != "xNONE" && \
10308 test -d "$cf_library_path" && \
10309  {
10310         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10311         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10312         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10313         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10314         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10315         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10316 }
10317
10318                         cf_library_path_list="$cf_library_path_list $cf_search"
10319                         ;;
10320                 esac
10321         done
10322 fi
10323
10324 cf_search=
10325
10326 test "x$prefix" != "xNONE" && \
10327 test -d "$prefix" && \
10328  {
10329         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10330         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10331         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10332         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10333         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10334         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10335 }
10336
10337 for cf_subdir_prefix in \
10338         /usr \
10339         /usr/local \
10340         /usr/pkg \
10341         /opt \
10342         /opt/local \
10343         $HOME
10344 do
10345
10346 test "x$cf_subdir_prefix" != "x$prefix" && \
10347 test -d "$cf_subdir_prefix" && \
10348 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10349         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10350         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10351         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10352         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10353         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10354         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10355 }
10356
10357 done
10358
10359 cf_search="$cf_library_path_list $cf_search"
10360
10361                         for cf_cv_library_path_utf8 in $cf_search
10362                         do
10363                                 if test -d $cf_cv_library_path_utf8 ; then
10364                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10365
10366 echo "${as_me:-configure}:10366: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10367
10368                                         CPPFLAGS="$cf_test_CPPFLAGS"
10369                                         LIBS="-lutf8  $cf_save_LIBS"
10370                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10371                                         cat >conftest.$ac_ext <<_ACEOF
10372 #line 10372 "configure"
10373 #include "confdefs.h"
10374
10375 #include <libutf8.h>
10376 int
10377 main (void)
10378 {
10379 putwc(0,0);
10380   ;
10381   return 0;
10382 }
10383 _ACEOF
10384 rm -f conftest.$ac_objext conftest$ac_exeext
10385 if { (eval echo "$as_me:10385: \"$ac_link\"") >&5
10386   (eval $ac_link) 2>&5
10387   ac_status=$?
10388   echo "$as_me:10388: \$? = $ac_status" >&5
10389   (exit $ac_status); } &&
10390          { ac_try='test -s conftest$ac_exeext'
10391   { (eval echo "$as_me:10391: \"$ac_try\"") >&5
10392   (eval $ac_try) 2>&5
10393   ac_status=$?
10394   echo "$as_me:10394: \$? = $ac_status" >&5
10395   (exit $ac_status); }; }; then
10396
10397                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10398
10399 echo "${as_me:-configure}:10399: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10400
10401                                         cf_cv_find_linkage_utf8=yes
10402                                         cf_cv_library_file_utf8="-lutf8"
10403                                         break
10404 else
10405   echo "$as_me: failed program was:" >&5
10406 cat conftest.$ac_ext >&5
10407
10408                                         CPPFLAGS="$cf_save_CPPFLAGS"
10409                                         LIBS="$cf_save_LIBS"
10410                                         LDFLAGS="$cf_save_LDFLAGS"
10411
10412 fi
10413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10414                                 fi
10415                         done
10416                         CPPFLAGS="$cf_save_CPPFLAGS"
10417                         LDFLAGS="$cf_save_LDFLAGS"
10418                 fi
10419
10420         else
10421                 cf_cv_find_linkage_utf8=no
10422         fi
10423
10424 fi
10425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10426
10427 fi
10428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10429
10430 LIBS="$cf_save_LIBS"
10431
10432 if test "$cf_cv_find_linkage_utf8" = yes ; then
10433 cf_cv_utf8_lib=add-on
10434 else
10435 cf_cv_utf8_lib=no
10436 fi
10437
10438 fi
10439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10440 fi
10441 echo "$as_me:10441: result: $cf_cv_utf8_lib" >&5
10442 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10443
10444 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10445 # ncurses/ncursesw:
10446 if test "$cf_cv_utf8_lib" = "add-on" ; then
10447
10448 cat >>confdefs.h <<\EOF
10449 #define HAVE_LIBUTF8_H 1
10450 EOF
10451
10452 if test -n "$cf_cv_header_path_utf8" ; then
10453   for cf_add_incdir in $cf_cv_header_path_utf8
10454   do
10455         while test $cf_add_incdir != /usr/include
10456         do
10457           if test -d $cf_add_incdir
10458           then
10459                 cf_have_incdir=no
10460                 if test -n "$CFLAGS$CPPFLAGS" ; then
10461                   # a loop is needed to ensure we can add subdirs of existing dirs
10462                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10463                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10464                           cf_have_incdir=yes; break
10465                         fi
10466                   done
10467                 fi
10468
10469                 if test "$cf_have_incdir" = no ; then
10470                   if test "$cf_add_incdir" = /usr/local/include ; then
10471                         if test "$GCC" = yes
10472                         then
10473                           cf_save_CPPFLAGS=$CPPFLAGS
10474                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10475                           cat >conftest.$ac_ext <<_ACEOF
10476 #line 10476 "configure"
10477 #include "confdefs.h"
10478 #include <stdio.h>
10479 int
10480 main (void)
10481 {
10482 printf("Hello")
10483   ;
10484   return 0;
10485 }
10486 _ACEOF
10487 rm -f conftest.$ac_objext
10488 if { (eval echo "$as_me:10488: \"$ac_compile\"") >&5
10489   (eval $ac_compile) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); } &&
10493          { ac_try='test -s conftest.$ac_objext'
10494   { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495   (eval $ac_try) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit $ac_status); }; }; then
10499   :
10500 else
10501   echo "$as_me: failed program was:" >&5
10502 cat conftest.$ac_ext >&5
10503 cf_have_incdir=yes
10504 fi
10505 rm -f conftest.$ac_objext conftest.$ac_ext
10506                           CPPFLAGS=$cf_save_CPPFLAGS
10507                         fi
10508                   fi
10509                 fi
10510
10511                 if test "$cf_have_incdir" = no ; then
10512                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10513
10514 echo "${as_me:-configure}:10514: testing adding $cf_add_incdir to include-path ..." 1>&5
10515
10516                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10517
10518                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10519                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10520                   cf_add_incdir="$cf_top_incdir"
10521                 else
10522                   break
10523                 fi
10524           else
10525                 break
10526           fi
10527         done
10528   done
10529 fi
10530
10531 if test -n "$cf_cv_library_path_utf8" ; then
10532         for cf_add_libdir in $cf_cv_library_path_utf8
10533         do
10534                 if test $cf_add_libdir = /usr/lib ; then
10535                         :
10536                 elif test -d $cf_add_libdir
10537                 then
10538                         cf_have_libdir=no
10539                         if test -n "$LDFLAGS$LIBS" ; then
10540                                 # a loop is needed to ensure we can add subdirs of existing dirs
10541                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10542                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10543                                                 cf_have_libdir=yes; break
10544                                         fi
10545                                 done
10546                         fi
10547                         if test "$cf_have_libdir" = no ; then
10548                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10549
10550 echo "${as_me:-configure}:10550: testing adding $cf_add_libdir to library-path ..." 1>&5
10551
10552                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10553                         fi
10554                 fi
10555         done
10556 fi
10557
10558 cf_add_libs="$cf_cv_library_file_utf8"
10559 # Filter out duplicates - this happens with badly-designed ".pc" files...
10560 for cf_add_1lib in $LIBS
10561 do
10562         for cf_add_2lib in $cf_add_libs
10563         do
10564                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10565                 then
10566                         cf_add_1lib=
10567                         break
10568                 fi
10569         done
10570         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10571 done
10572 LIBS="$cf_add_libs"
10573
10574 fi
10575
10576                 if test "$cf_cv_utf8_lib" != no ; then
10577                         NCURSES_LIBUTF8=1
10578                 fi
10579         fi
10580
10581 # This is needed on Tru64 5.0 to declare mbstate_t
10582 echo "$as_me:10582: checking if we must include wchar.h to declare mbstate_t" >&5
10583 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10584 if test "${cf_cv_mbstate_t+set}" = set; then
10585   echo $ECHO_N "(cached) $ECHO_C" >&6
10586 else
10587
10588 cat >conftest.$ac_ext <<_ACEOF
10589 #line 10589 "configure"
10590 #include "confdefs.h"
10591
10592 #include <stdlib.h>
10593 #include <stdarg.h>
10594 #include <stdio.h>
10595 #ifdef HAVE_LIBUTF8_H
10596 #include <libutf8.h>
10597 #endif
10598 int
10599 main (void)
10600 {
10601 mbstate_t state
10602   ;
10603   return 0;
10604 }
10605 _ACEOF
10606 rm -f conftest.$ac_objext
10607 if { (eval echo "$as_me:10607: \"$ac_compile\"") >&5
10608   (eval $ac_compile) 2>&5
10609   ac_status=$?
10610   echo "$as_me:10610: \$? = $ac_status" >&5
10611   (exit $ac_status); } &&
10612          { ac_try='test -s conftest.$ac_objext'
10613   { (eval echo "$as_me:10613: \"$ac_try\"") >&5
10614   (eval $ac_try) 2>&5
10615   ac_status=$?
10616   echo "$as_me:10616: \$? = $ac_status" >&5
10617   (exit $ac_status); }; }; then
10618   cf_cv_mbstate_t=no
10619 else
10620   echo "$as_me: failed program was:" >&5
10621 cat conftest.$ac_ext >&5
10622 cat >conftest.$ac_ext <<_ACEOF
10623 #line 10623 "configure"
10624 #include "confdefs.h"
10625
10626 #include <stdlib.h>
10627 #include <stdarg.h>
10628 #include <stdio.h>
10629 #include <wchar.h>
10630 #ifdef HAVE_LIBUTF8_H
10631 #include <libutf8.h>
10632 #endif
10633 int
10634 main (void)
10635 {
10636 mbstate_t value
10637   ;
10638   return 0;
10639 }
10640 _ACEOF
10641 rm -f conftest.$ac_objext
10642 if { (eval echo "$as_me:10642: \"$ac_compile\"") >&5
10643   (eval $ac_compile) 2>&5
10644   ac_status=$?
10645   echo "$as_me:10645: \$? = $ac_status" >&5
10646   (exit $ac_status); } &&
10647          { ac_try='test -s conftest.$ac_objext'
10648   { (eval echo "$as_me:10648: \"$ac_try\"") >&5
10649   (eval $ac_try) 2>&5
10650   ac_status=$?
10651   echo "$as_me:10651: \$? = $ac_status" >&5
10652   (exit $ac_status); }; }; then
10653   cf_cv_mbstate_t=yes
10654 else
10655   echo "$as_me: failed program was:" >&5
10656 cat conftest.$ac_ext >&5
10657 cf_cv_mbstate_t=unknown
10658 fi
10659 rm -f conftest.$ac_objext conftest.$ac_ext
10660 fi
10661 rm -f conftest.$ac_objext conftest.$ac_ext
10662 fi
10663 echo "$as_me:10663: result: $cf_cv_mbstate_t" >&5
10664 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10665
10666 if test "$cf_cv_mbstate_t" = yes ; then
10667
10668 cat >>confdefs.h <<\EOF
10669 #define NEED_WCHAR_H 1
10670 EOF
10671
10672         NEED_WCHAR_H=1
10673 fi
10674
10675 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10676 if test "$cf_cv_mbstate_t" = unknown ; then
10677         NCURSES_MBSTATE_T=1
10678 fi
10679
10680 # This is needed on Tru64 5.0 to declare wchar_t
10681 echo "$as_me:10681: checking if we must include wchar.h to declare wchar_t" >&5
10682 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10683 if test "${cf_cv_wchar_t+set}" = set; then
10684   echo $ECHO_N "(cached) $ECHO_C" >&6
10685 else
10686
10687 cat >conftest.$ac_ext <<_ACEOF
10688 #line 10688 "configure"
10689 #include "confdefs.h"
10690
10691 #include <stdlib.h>
10692 #include <stdarg.h>
10693 #include <stdio.h>
10694 #ifdef HAVE_LIBUTF8_H
10695 #include <libutf8.h>
10696 #endif
10697 int
10698 main (void)
10699 {
10700 wchar_t state
10701   ;
10702   return 0;
10703 }
10704 _ACEOF
10705 rm -f conftest.$ac_objext
10706 if { (eval echo "$as_me:10706: \"$ac_compile\"") >&5
10707   (eval $ac_compile) 2>&5
10708   ac_status=$?
10709   echo "$as_me:10709: \$? = $ac_status" >&5
10710   (exit $ac_status); } &&
10711          { ac_try='test -s conftest.$ac_objext'
10712   { (eval echo "$as_me:10712: \"$ac_try\"") >&5
10713   (eval $ac_try) 2>&5
10714   ac_status=$?
10715   echo "$as_me:10715: \$? = $ac_status" >&5
10716   (exit $ac_status); }; }; then
10717   cf_cv_wchar_t=no
10718 else
10719   echo "$as_me: failed program was:" >&5
10720 cat conftest.$ac_ext >&5
10721 cat >conftest.$ac_ext <<_ACEOF
10722 #line 10722 "configure"
10723 #include "confdefs.h"
10724
10725 #include <stdlib.h>
10726 #include <stdarg.h>
10727 #include <stdio.h>
10728 #include <wchar.h>
10729 #ifdef HAVE_LIBUTF8_H
10730 #include <libutf8.h>
10731 #endif
10732 int
10733 main (void)
10734 {
10735 wchar_t value
10736   ;
10737   return 0;
10738 }
10739 _ACEOF
10740 rm -f conftest.$ac_objext
10741 if { (eval echo "$as_me:10741: \"$ac_compile\"") >&5
10742   (eval $ac_compile) 2>&5
10743   ac_status=$?
10744   echo "$as_me:10744: \$? = $ac_status" >&5
10745   (exit $ac_status); } &&
10746          { ac_try='test -s conftest.$ac_objext'
10747   { (eval echo "$as_me:10747: \"$ac_try\"") >&5
10748   (eval $ac_try) 2>&5
10749   ac_status=$?
10750   echo "$as_me:10750: \$? = $ac_status" >&5
10751   (exit $ac_status); }; }; then
10752   cf_cv_wchar_t=yes
10753 else
10754   echo "$as_me: failed program was:" >&5
10755 cat conftest.$ac_ext >&5
10756 cf_cv_wchar_t=unknown
10757 fi
10758 rm -f conftest.$ac_objext conftest.$ac_ext
10759 fi
10760 rm -f conftest.$ac_objext conftest.$ac_ext
10761 fi
10762 echo "$as_me:10762: result: $cf_cv_wchar_t" >&5
10763 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10764
10765 if test "$cf_cv_wchar_t" = yes ; then
10766
10767 cat >>confdefs.h <<\EOF
10768 #define NEED_WCHAR_H 1
10769 EOF
10770
10771         NEED_WCHAR_H=1
10772 fi
10773
10774 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10775 if test "$cf_cv_wchar_t" = unknown ; then
10776         NCURSES_WCHAR_T=1
10777 fi
10778
10779 # if we find wchar_t in either place, use substitution to provide a fallback.
10780 if test "$cf_cv_wchar_t" != unknown ; then
10781         NCURSES_OK_WCHAR_T=1
10782 fi
10783
10784 # This is needed on Tru64 5.0 to declare wint_t
10785 echo "$as_me:10785: checking if we must include wchar.h to declare wint_t" >&5
10786 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10787 if test "${cf_cv_wint_t+set}" = set; then
10788   echo $ECHO_N "(cached) $ECHO_C" >&6
10789 else
10790
10791 cat >conftest.$ac_ext <<_ACEOF
10792 #line 10792 "configure"
10793 #include "confdefs.h"
10794
10795 #include <stdlib.h>
10796 #include <stdarg.h>
10797 #include <stdio.h>
10798 #ifdef HAVE_LIBUTF8_H
10799 #include <libutf8.h>
10800 #endif
10801 int
10802 main (void)
10803 {
10804 wint_t state
10805   ;
10806   return 0;
10807 }
10808 _ACEOF
10809 rm -f conftest.$ac_objext
10810 if { (eval echo "$as_me:10810: \"$ac_compile\"") >&5
10811   (eval $ac_compile) 2>&5
10812   ac_status=$?
10813   echo "$as_me:10813: \$? = $ac_status" >&5
10814   (exit $ac_status); } &&
10815          { ac_try='test -s conftest.$ac_objext'
10816   { (eval echo "$as_me:10816: \"$ac_try\"") >&5
10817   (eval $ac_try) 2>&5
10818   ac_status=$?
10819   echo "$as_me:10819: \$? = $ac_status" >&5
10820   (exit $ac_status); }; }; then
10821   cf_cv_wint_t=no
10822 else
10823   echo "$as_me: failed program was:" >&5
10824 cat conftest.$ac_ext >&5
10825 cat >conftest.$ac_ext <<_ACEOF
10826 #line 10826 "configure"
10827 #include "confdefs.h"
10828
10829 #include <stdlib.h>
10830 #include <stdarg.h>
10831 #include <stdio.h>
10832 #include <wchar.h>
10833 #ifdef HAVE_LIBUTF8_H
10834 #include <libutf8.h>
10835 #endif
10836 int
10837 main (void)
10838 {
10839 wint_t value
10840   ;
10841   return 0;
10842 }
10843 _ACEOF
10844 rm -f conftest.$ac_objext
10845 if { (eval echo "$as_me:10845: \"$ac_compile\"") >&5
10846   (eval $ac_compile) 2>&5
10847   ac_status=$?
10848   echo "$as_me:10848: \$? = $ac_status" >&5
10849   (exit $ac_status); } &&
10850          { ac_try='test -s conftest.$ac_objext'
10851   { (eval echo "$as_me:10851: \"$ac_try\"") >&5
10852   (eval $ac_try) 2>&5
10853   ac_status=$?
10854   echo "$as_me:10854: \$? = $ac_status" >&5
10855   (exit $ac_status); }; }; then
10856   cf_cv_wint_t=yes
10857 else
10858   echo "$as_me: failed program was:" >&5
10859 cat conftest.$ac_ext >&5
10860 cf_cv_wint_t=unknown
10861 fi
10862 rm -f conftest.$ac_objext conftest.$ac_ext
10863 fi
10864 rm -f conftest.$ac_objext conftest.$ac_ext
10865 fi
10866 echo "$as_me:10866: result: $cf_cv_wint_t" >&5
10867 echo "${ECHO_T}$cf_cv_wint_t" >&6
10868
10869 if test "$cf_cv_wint_t" = yes ; then
10870
10871 cat >>confdefs.h <<\EOF
10872 #define NEED_WCHAR_H 1
10873 EOF
10874
10875         NEED_WCHAR_H=1
10876 fi
10877
10878 # if we do not find wint_t in either place, use substitution to provide a fallback.
10879 if test "$cf_cv_wint_t" = unknown ; then
10880         NCURSES_WINT_T=1
10881 fi
10882
10883 # if we find wint_t in either place, use substitution to provide a fallback.
10884 if test "$cf_cv_wint_t" != unknown ; then
10885         NCURSES_OK_WINT_T=1
10886 fi
10887
10888         if test "$NCURSES_MBSTATE_T" != 0; then
10889
10890 cat >>confdefs.h <<\EOF
10891 #define NEED_MBSTATE_T_DEF 1
10892 EOF
10893
10894         fi
10895 fi
10896
10897 ###   use option --disable-lp64 to allow long chtype
10898 echo "$as_me:10898: checking whether to enable _LP64 definition in curses.h" >&5
10899 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10900
10901 # Check whether --enable-lp64 or --disable-lp64 was given.
10902 if test "${enable_lp64+set}" = set; then
10903   enableval="$enable_lp64"
10904   with_lp64=$enableval
10905 else
10906   with_lp64=$cf_dft_with_lp64
10907 fi;
10908 echo "$as_me:10908: result: $with_lp64" >&5
10909 echo "${ECHO_T}$with_lp64" >&6
10910
10911 if test "x$with_lp64" = xyes ; then
10912         cf_cv_enable_lp64=1
10913 else
10914         cf_cv_enable_lp64=0
10915 fi
10916
10917 # Check whether --enable-largefile or --disable-largefile was given.
10918 if test "${enable_largefile+set}" = set; then
10919   enableval="$enable_largefile"
10920
10921 fi;
10922 if test "$enable_largefile" != no; then
10923
10924   echo "$as_me:10924: checking for special C compiler options needed for large files" >&5
10925 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10926 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10927   echo $ECHO_N "(cached) $ECHO_C" >&6
10928 else
10929   ac_cv_sys_largefile_CC=no
10930      if test "$GCC" != yes; then
10931        ac_save_CC=$CC
10932        while :; do
10933          # IRIX 6.2 and later do not support large files by default,
10934          # so use the C compiler's -n32 option if that helps.
10935          cat >conftest.$ac_ext <<_ACEOF
10936 #line 10936 "configure"
10937 #include "confdefs.h"
10938 #include <sys/types.h>
10939  /* Check that off_t can represent 2**63 - 1 correctly.
10940     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10941     since some C++ compilers masquerading as C compilers
10942     incorrectly reject 9223372036854775807.  */
10943 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10944   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10945                        && LARGE_OFF_T % 2147483647 == 1)
10946                       ? 1 : -1];
10947 int
10948 main (void)
10949 {
10950
10951   ;
10952   return 0;
10953 }
10954 _ACEOF
10955          rm -f conftest.$ac_objext
10956 if { (eval echo "$as_me:10956: \"$ac_compile\"") >&5
10957   (eval $ac_compile) 2>&5
10958   ac_status=$?
10959   echo "$as_me:10959: \$? = $ac_status" >&5
10960   (exit $ac_status); } &&
10961          { ac_try='test -s conftest.$ac_objext'
10962   { (eval echo "$as_me:10962: \"$ac_try\"") >&5
10963   (eval $ac_try) 2>&5
10964   ac_status=$?
10965   echo "$as_me:10965: \$? = $ac_status" >&5
10966   (exit $ac_status); }; }; then
10967   break
10968 else
10969   echo "$as_me: failed program was:" >&5
10970 cat conftest.$ac_ext >&5
10971 fi
10972 rm -f conftest.$ac_objext
10973          CC="$CC -n32"
10974          rm -f conftest.$ac_objext
10975 if { (eval echo "$as_me:10975: \"$ac_compile\"") >&5
10976   (eval $ac_compile) 2>&5
10977   ac_status=$?
10978   echo "$as_me:10978: \$? = $ac_status" >&5
10979   (exit $ac_status); } &&
10980          { ac_try='test -s conftest.$ac_objext'
10981   { (eval echo "$as_me:10981: \"$ac_try\"") >&5
10982   (eval $ac_try) 2>&5
10983   ac_status=$?
10984   echo "$as_me:10984: \$? = $ac_status" >&5
10985   (exit $ac_status); }; }; then
10986   ac_cv_sys_largefile_CC=' -n32'; break
10987 else
10988   echo "$as_me: failed program was:" >&5
10989 cat conftest.$ac_ext >&5
10990 fi
10991 rm -f conftest.$ac_objext
10992          break
10993        done
10994        CC=$ac_save_CC
10995        rm -f conftest.$ac_ext
10996     fi
10997 fi
10998 echo "$as_me:10998: result: $ac_cv_sys_largefile_CC" >&5
10999 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11000   if test "$ac_cv_sys_largefile_CC" != no; then
11001     CC=$CC$ac_cv_sys_largefile_CC
11002   fi
11003
11004   echo "$as_me:11004: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11005 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11006 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11007   echo $ECHO_N "(cached) $ECHO_C" >&6
11008 else
11009   while :; do
11010   ac_cv_sys_file_offset_bits=no
11011   cat >conftest.$ac_ext <<_ACEOF
11012 #line 11012 "configure"
11013 #include "confdefs.h"
11014 #include <sys/types.h>
11015  /* Check that off_t can represent 2**63 - 1 correctly.
11016     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11017     since some C++ compilers masquerading as C compilers
11018     incorrectly reject 9223372036854775807.  */
11019 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11020   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11021                        && LARGE_OFF_T % 2147483647 == 1)
11022                       ? 1 : -1];
11023 int
11024 main (void)
11025 {
11026
11027   ;
11028   return 0;
11029 }
11030 _ACEOF
11031 rm -f conftest.$ac_objext
11032 if { (eval echo "$as_me:11032: \"$ac_compile\"") >&5
11033   (eval $ac_compile) 2>&5
11034   ac_status=$?
11035   echo "$as_me:11035: \$? = $ac_status" >&5
11036   (exit $ac_status); } &&
11037          { ac_try='test -s conftest.$ac_objext'
11038   { (eval echo "$as_me:11038: \"$ac_try\"") >&5
11039   (eval $ac_try) 2>&5
11040   ac_status=$?
11041   echo "$as_me:11041: \$? = $ac_status" >&5
11042   (exit $ac_status); }; }; then
11043   break
11044 else
11045   echo "$as_me: failed program was:" >&5
11046 cat conftest.$ac_ext >&5
11047 fi
11048 rm -f conftest.$ac_objext conftest.$ac_ext
11049   cat >conftest.$ac_ext <<_ACEOF
11050 #line 11050 "configure"
11051 #include "confdefs.h"
11052 #define _FILE_OFFSET_BITS 64
11053 #include <sys/types.h>
11054  /* Check that off_t can represent 2**63 - 1 correctly.
11055     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11056     since some C++ compilers masquerading as C compilers
11057     incorrectly reject 9223372036854775807.  */
11058 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11059   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11060                        && LARGE_OFF_T % 2147483647 == 1)
11061                       ? 1 : -1];
11062 int
11063 main (void)
11064 {
11065
11066   ;
11067   return 0;
11068 }
11069 _ACEOF
11070 rm -f conftest.$ac_objext
11071 if { (eval echo "$as_me:11071: \"$ac_compile\"") >&5
11072   (eval $ac_compile) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit $ac_status); } &&
11076          { ac_try='test -s conftest.$ac_objext'
11077   { (eval echo "$as_me:11077: \"$ac_try\"") >&5
11078   (eval $ac_try) 2>&5
11079   ac_status=$?
11080   echo "$as_me:11080: \$? = $ac_status" >&5
11081   (exit $ac_status); }; }; then
11082   ac_cv_sys_file_offset_bits=64; break
11083 else
11084   echo "$as_me: failed program was:" >&5
11085 cat conftest.$ac_ext >&5
11086 fi
11087 rm -f conftest.$ac_objext conftest.$ac_ext
11088   break
11089 done
11090 fi
11091 echo "$as_me:11091: result: $ac_cv_sys_file_offset_bits" >&5
11092 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11093 if test "$ac_cv_sys_file_offset_bits" != no; then
11094
11095 cat >>confdefs.h <<EOF
11096 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11097 EOF
11098
11099 fi
11100 rm -rf conftest*
11101   echo "$as_me:11101: checking for _LARGE_FILES value needed for large files" >&5
11102 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11103 if test "${ac_cv_sys_large_files+set}" = set; then
11104   echo $ECHO_N "(cached) $ECHO_C" >&6
11105 else
11106   while :; do
11107   ac_cv_sys_large_files=no
11108   cat >conftest.$ac_ext <<_ACEOF
11109 #line 11109 "configure"
11110 #include "confdefs.h"
11111 #include <sys/types.h>
11112  /* Check that off_t can represent 2**63 - 1 correctly.
11113     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11114     since some C++ compilers masquerading as C compilers
11115     incorrectly reject 9223372036854775807.  */
11116 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11117   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11118                        && LARGE_OFF_T % 2147483647 == 1)
11119                       ? 1 : -1];
11120 int
11121 main (void)
11122 {
11123
11124   ;
11125   return 0;
11126 }
11127 _ACEOF
11128 rm -f conftest.$ac_objext
11129 if { (eval echo "$as_me:11129: \"$ac_compile\"") >&5
11130   (eval $ac_compile) 2>&5
11131   ac_status=$?
11132   echo "$as_me:11132: \$? = $ac_status" >&5
11133   (exit $ac_status); } &&
11134          { ac_try='test -s conftest.$ac_objext'
11135   { (eval echo "$as_me:11135: \"$ac_try\"") >&5
11136   (eval $ac_try) 2>&5
11137   ac_status=$?
11138   echo "$as_me:11138: \$? = $ac_status" >&5
11139   (exit $ac_status); }; }; then
11140   break
11141 else
11142   echo "$as_me: failed program was:" >&5
11143 cat conftest.$ac_ext >&5
11144 fi
11145 rm -f conftest.$ac_objext conftest.$ac_ext
11146   cat >conftest.$ac_ext <<_ACEOF
11147 #line 11147 "configure"
11148 #include "confdefs.h"
11149 #define _LARGE_FILES 1
11150 #include <sys/types.h>
11151  /* Check that off_t can represent 2**63 - 1 correctly.
11152     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11153     since some C++ compilers masquerading as C compilers
11154     incorrectly reject 9223372036854775807.  */
11155 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11156   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11157                        && LARGE_OFF_T % 2147483647 == 1)
11158                       ? 1 : -1];
11159 int
11160 main (void)
11161 {
11162
11163   ;
11164   return 0;
11165 }
11166 _ACEOF
11167 rm -f conftest.$ac_objext
11168 if { (eval echo "$as_me:11168: \"$ac_compile\"") >&5
11169   (eval $ac_compile) 2>&5
11170   ac_status=$?
11171   echo "$as_me:11171: \$? = $ac_status" >&5
11172   (exit $ac_status); } &&
11173          { ac_try='test -s conftest.$ac_objext'
11174   { (eval echo "$as_me:11174: \"$ac_try\"") >&5
11175   (eval $ac_try) 2>&5
11176   ac_status=$?
11177   echo "$as_me:11177: \$? = $ac_status" >&5
11178   (exit $ac_status); }; }; then
11179   ac_cv_sys_large_files=1; break
11180 else
11181   echo "$as_me: failed program was:" >&5
11182 cat conftest.$ac_ext >&5
11183 fi
11184 rm -f conftest.$ac_objext conftest.$ac_ext
11185   break
11186 done
11187 fi
11188 echo "$as_me:11188: result: $ac_cv_sys_large_files" >&5
11189 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11190 if test "$ac_cv_sys_large_files" != no; then
11191
11192 cat >>confdefs.h <<EOF
11193 #define _LARGE_FILES $ac_cv_sys_large_files
11194 EOF
11195
11196 fi
11197 rm -rf conftest*
11198 fi
11199
11200         if test "$enable_largefile" != no ; then
11201         echo "$as_me:11201: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11202 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11203 if test "${ac_cv_sys_largefile_source+set}" = set; then
11204   echo $ECHO_N "(cached) $ECHO_C" >&6
11205 else
11206   while :; do
11207   ac_cv_sys_largefile_source=no
11208   cat >conftest.$ac_ext <<_ACEOF
11209 #line 11209 "configure"
11210 #include "confdefs.h"
11211 #include <stdio.h>
11212 int
11213 main (void)
11214 {
11215 return !fseeko;
11216   ;
11217   return 0;
11218 }
11219 _ACEOF
11220 rm -f conftest.$ac_objext
11221 if { (eval echo "$as_me:11221: \"$ac_compile\"") >&5
11222   (eval $ac_compile) 2>&5
11223   ac_status=$?
11224   echo "$as_me:11224: \$? = $ac_status" >&5
11225   (exit $ac_status); } &&
11226          { ac_try='test -s conftest.$ac_objext'
11227   { (eval echo "$as_me:11227: \"$ac_try\"") >&5
11228   (eval $ac_try) 2>&5
11229   ac_status=$?
11230   echo "$as_me:11230: \$? = $ac_status" >&5
11231   (exit $ac_status); }; }; then
11232   break
11233 else
11234   echo "$as_me: failed program was:" >&5
11235 cat conftest.$ac_ext >&5
11236 fi
11237 rm -f conftest.$ac_objext conftest.$ac_ext
11238   cat >conftest.$ac_ext <<_ACEOF
11239 #line 11239 "configure"
11240 #include "confdefs.h"
11241 #define _LARGEFILE_SOURCE 1
11242 #include <stdio.h>
11243 int
11244 main (void)
11245 {
11246 return !fseeko;
11247   ;
11248   return 0;
11249 }
11250 _ACEOF
11251 rm -f conftest.$ac_objext
11252 if { (eval echo "$as_me:11252: \"$ac_compile\"") >&5
11253   (eval $ac_compile) 2>&5
11254   ac_status=$?
11255   echo "$as_me:11255: \$? = $ac_status" >&5
11256   (exit $ac_status); } &&
11257          { ac_try='test -s conftest.$ac_objext'
11258   { (eval echo "$as_me:11258: \"$ac_try\"") >&5
11259   (eval $ac_try) 2>&5
11260   ac_status=$?
11261   echo "$as_me:11261: \$? = $ac_status" >&5
11262   (exit $ac_status); }; }; then
11263   ac_cv_sys_largefile_source=1; break
11264 else
11265   echo "$as_me: failed program was:" >&5
11266 cat conftest.$ac_ext >&5
11267 fi
11268 rm -f conftest.$ac_objext conftest.$ac_ext
11269   break
11270 done
11271 fi
11272 echo "$as_me:11272: result: $ac_cv_sys_largefile_source" >&5
11273 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11274 if test "$ac_cv_sys_largefile_source" != no; then
11275
11276 cat >>confdefs.h <<EOF
11277 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11278 EOF
11279
11280 fi
11281 rm -rf conftest*
11282
11283 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11284 # in glibc 2.1.3, but that breaks too many other things.
11285 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11286 echo "$as_me:11286: checking for fseeko" >&5
11287 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11288 if test "${ac_cv_func_fseeko+set}" = set; then
11289   echo $ECHO_N "(cached) $ECHO_C" >&6
11290 else
11291   cat >conftest.$ac_ext <<_ACEOF
11292 #line 11292 "configure"
11293 #include "confdefs.h"
11294 #include <stdio.h>
11295 int
11296 main (void)
11297 {
11298 return fseeko && fseeko (stdin, 0, 0);
11299   ;
11300   return 0;
11301 }
11302 _ACEOF
11303 rm -f conftest.$ac_objext conftest$ac_exeext
11304 if { (eval echo "$as_me:11304: \"$ac_link\"") >&5
11305   (eval $ac_link) 2>&5
11306   ac_status=$?
11307   echo "$as_me:11307: \$? = $ac_status" >&5
11308   (exit $ac_status); } &&
11309          { ac_try='test -s conftest$ac_exeext'
11310   { (eval echo "$as_me:11310: \"$ac_try\"") >&5
11311   (eval $ac_try) 2>&5
11312   ac_status=$?
11313   echo "$as_me:11313: \$? = $ac_status" >&5
11314   (exit $ac_status); }; }; then
11315   ac_cv_func_fseeko=yes
11316 else
11317   echo "$as_me: failed program was:" >&5
11318 cat conftest.$ac_ext >&5
11319 ac_cv_func_fseeko=no
11320 fi
11321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11322 fi
11323 echo "$as_me:11323: result: $ac_cv_func_fseeko" >&5
11324 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11325 if test $ac_cv_func_fseeko = yes; then
11326
11327 cat >>confdefs.h <<\EOF
11328 #define HAVE_FSEEKO 1
11329 EOF
11330
11331 fi
11332
11333         # Normally we would collect these definitions in the config.h,
11334         # but (like _XOPEN_SOURCE), some environments rely on having these
11335         # defined before any of the system headers are included.  Another
11336         # case comes up with C++, e.g., on AIX the compiler compiles the
11337         # header files by themselves before looking at the body files it is
11338         # told to compile.  For ncurses, those header files do not include
11339         # the config.h
11340         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11341         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11342         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11343
11344         echo "$as_me:11344: checking whether to use struct dirent64" >&5
11345 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11346 if test "${cf_cv_struct_dirent64+set}" = set; then
11347   echo $ECHO_N "(cached) $ECHO_C" >&6
11348 else
11349
11350                 cat >conftest.$ac_ext <<_ACEOF
11351 #line 11351 "configure"
11352 #include "confdefs.h"
11353
11354 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11355 #include <sys/types.h>
11356 #include <dirent.h>
11357
11358 int
11359 main (void)
11360 {
11361
11362                 /* if transitional largefile support is setup, this is true */
11363                 extern struct dirent64 * readdir(DIR *);
11364                 struct dirent64 *x = readdir((DIR *)0);
11365                 struct dirent *y = readdir((DIR *)0);
11366                 int z = x - y;
11367
11368   ;
11369   return 0;
11370 }
11371 _ACEOF
11372 rm -f conftest.$ac_objext
11373 if { (eval echo "$as_me:11373: \"$ac_compile\"") >&5
11374   (eval $ac_compile) 2>&5
11375   ac_status=$?
11376   echo "$as_me:11376: \$? = $ac_status" >&5
11377   (exit $ac_status); } &&
11378          { ac_try='test -s conftest.$ac_objext'
11379   { (eval echo "$as_me:11379: \"$ac_try\"") >&5
11380   (eval $ac_try) 2>&5
11381   ac_status=$?
11382   echo "$as_me:11382: \$? = $ac_status" >&5
11383   (exit $ac_status); }; }; then
11384   cf_cv_struct_dirent64=yes
11385 else
11386   echo "$as_me: failed program was:" >&5
11387 cat conftest.$ac_ext >&5
11388 cf_cv_struct_dirent64=no
11389 fi
11390 rm -f conftest.$ac_objext conftest.$ac_ext
11391
11392 fi
11393 echo "$as_me:11393: result: $cf_cv_struct_dirent64" >&5
11394 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11395         test "$cf_cv_struct_dirent64" = yes &&
11396 cat >>confdefs.h <<\EOF
11397 #define HAVE_STRUCT_DIRENT64 1
11398 EOF
11399
11400         fi
11401
11402 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11403 echo "$as_me:11403: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11404 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11405
11406 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11407 if test "${enable_tparm_varargs+set}" = set; then
11408   enableval="$enable_tparm_varargs"
11409   with_tparm_varargs=$enableval
11410 else
11411   with_tparm_varargs=yes
11412 fi;
11413 echo "$as_me:11413: result: $with_tparm_varargs" >&5
11414 echo "${ECHO_T}$with_tparm_varargs" >&6
11415 NCURSES_TPARM_VARARGS=0
11416 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11417
11418 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11419 if test "$with_ticlib" != no ; then
11420 echo "$as_me:11420: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11421 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11422
11423 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11424 if test "${enable_tic_depends+set}" = set; then
11425   enableval="$enable_tic_depends"
11426   with_tic_depends=$enableval
11427 else
11428   with_tic_depends=yes
11429 fi;
11430 echo "$as_me:11430: result: $with_tic_depends" >&5
11431 echo "${ECHO_T}$with_tic_depends" >&6
11432 else
11433         with_tic_depends=no
11434 fi
11435
11436 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11437 echo "$as_me:11437: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11438 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11439
11440 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11441 if test "${enable_wattr_macros+set}" = set; then
11442   enableval="$enable_wattr_macros"
11443   with_wattr_macros=$enableval
11444 else
11445   with_wattr_macros=yes
11446 fi;
11447 if [ "x$with_wattr_macros" != xyes ]; then
11448         NCURSES_WATTR_MACROS=0
11449         echo "$as_me:11449: result: yes" >&5
11450 echo "${ECHO_T}yes" >&6
11451 else
11452         NCURSES_WATTR_MACROS=1
11453         echo "$as_me:11453: result: no" >&5
11454 echo "${ECHO_T}no" >&6
11455 fi
11456
11457 echo "$as_me:11457: checking for X11 rgb file" >&5
11458 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
11459
11460 # Check whether --with-x11-rgb or --without-x11-rgb was given.
11461 if test "${with_x11_rgb+set}" = set; then
11462   withval="$with_x11_rgb"
11463   RGB_PATH=$withval
11464 else
11465   RGB_PATH=auto
11466 fi;
11467
11468 if test "x$RGB_PATH" = xauto
11469 then
11470         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
11471         for cf_path in \
11472                 /opt/local/share/X11/rgb.txt \
11473                 /opt/X11/share/X11/rgb.txt \
11474                 /usr/share/X11/rgb.txt \
11475                 /usr/X11/share/X11/rgb.txt \
11476                 /usr/X11/lib/X11/rgb.txt \
11477                 /usr/lib/X11/rgb.txt \
11478                 /etc/X11/rgb.txt \
11479                 /usr/pkg/lib/X11/rgb.txt \
11480                 /usr/X11R7/lib/X11/rgb.txt \
11481                 /usr/X11R6/lib/X11/rgb.txt \
11482                 /usr/X11R5/lib/X11/rgb.txt \
11483                 /usr/X11R4/lib/X11/rgb.txt \
11484                 /usr/local/lib/X11/rgb.txt \
11485                 /usr/local/share/X11/rgb.txt \
11486                 /usr/lib64/X11/rgb.txt
11487         do
11488                 if test -f "$cf_path" ; then
11489                         RGB_PATH="$cf_path"
11490                         break
11491                 fi
11492         done
11493 else
11494         cf_path=$RGB_PATH
11495
11496 if test "x$prefix" != xNONE; then
11497         cf_path_syntax="$prefix"
11498 else
11499         cf_path_syntax="$ac_default_prefix"
11500 fi
11501
11502 case ".$cf_path" in
11503 (.\$\(*\)*|.\'*\'*)
11504         ;;
11505 (..|./*|.\\*)
11506         ;;
11507 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11508         ;;
11509 (.\${*prefix}*|.\${*dir}*)
11510         eval cf_path="$cf_path"
11511         case ".$cf_path" in
11512         (.NONE/*)
11513                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11514                 ;;
11515         esac
11516         ;;
11517 (.no|.NONE/*)
11518         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11519         ;;
11520 (*)
11521         { { echo "$as_me:11521: error: expected a pathname, not \"$cf_path\"" >&5
11522 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
11523    { (exit 1); exit 1; }; }
11524         ;;
11525 esac
11526
11527 fi
11528
11529 echo "$as_me:11529: result: $RGB_PATH" >&5
11530 echo "${ECHO_T}$RGB_PATH" >&6
11531
11532 cat >>confdefs.h <<EOF
11533 #define RGB_PATH "$cf_path"
11534 EOF
11535
11536 no_x11_rgb=
11537 if test "$RGB_PATH" = no
11538 then
11539         no_x11_rgb="#"
11540 fi
11541
11542 ###   use option --with-bool to override bool's type
11543 echo "$as_me:11543: checking for type of bool" >&5
11544 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11545
11546 # Check whether --with-bool or --without-bool was given.
11547 if test "${with_bool+set}" = set; then
11548   withval="$with_bool"
11549   NCURSES_BOOL="$withval"
11550 else
11551   NCURSES_BOOL=auto
11552 fi;
11553 echo "$as_me:11553: result: $NCURSES_BOOL" >&5
11554 echo "${ECHO_T}$NCURSES_BOOL" >&6
11555
11556 echo "$as_me:11556: checking for alternate terminal capabilities file" >&5
11557 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11558
11559 # Check whether --with-caps or --without-caps was given.
11560 if test "${with_caps+set}" = set; then
11561   withval="$with_caps"
11562   TERMINFO_CAPS=Caps.$withval
11563 else
11564   TERMINFO_CAPS=Caps
11565 fi;
11566 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11567 echo "$as_me:11567: result: $TERMINFO_CAPS" >&5
11568 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11569
11570 ###   use option --with-chtype to override chtype's type
11571 echo "$as_me:11571: checking for type of chtype" >&5
11572 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11573
11574 # Check whether --with-chtype or --without-chtype was given.
11575 if test "${with_chtype+set}" = set; then
11576   withval="$with_chtype"
11577   NCURSES_CHTYPE="$withval"
11578 else
11579   NCURSES_CHTYPE=$cf_dft_chtype
11580 fi;
11581 echo "$as_me:11581: result: $NCURSES_CHTYPE" >&5
11582 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11583
11584 ###   use option --with-ospeed to override ospeed's type
11585 echo "$as_me:11585: checking for type of ospeed" >&5
11586 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11587
11588 # Check whether --with-ospeed or --without-ospeed was given.
11589 if test "${with_ospeed+set}" = set; then
11590   withval="$with_ospeed"
11591   NCURSES_OSPEED="$withval"
11592 else
11593   NCURSES_OSPEED=short
11594 fi;
11595 echo "$as_me:11595: result: $NCURSES_OSPEED" >&5
11596 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11597
11598 ###   use option --with-mmask-t to override mmask_t's type
11599 echo "$as_me:11599: checking for type of mmask_t" >&5
11600 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11601
11602 # Check whether --with-mmask-t or --without-mmask-t was given.
11603 if test "${with_mmask_t+set}" = set; then
11604   withval="$with_mmask_t"
11605   NCURSES_MMASK_T="$withval"
11606 else
11607   NCURSES_MMASK_T=$cf_dft_mmask_t
11608 fi;
11609 echo "$as_me:11609: result: $NCURSES_MMASK_T" >&5
11610 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11611
11612 ###   use option --with-ccharw-max to override CCHARW_MAX size
11613 echo "$as_me:11613: checking for size CCHARW_MAX" >&5
11614 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11615
11616 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11617 if test "${with_ccharw_max+set}" = set; then
11618   withval="$with_ccharw_max"
11619   NCURSES_CCHARW_MAX="$withval"
11620 else
11621   NCURSES_CCHARW_MAX=5
11622 fi;
11623 echo "$as_me:11623: result: $NCURSES_CCHARW_MAX" >&5
11624 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11625
11626 ###   use option --with-tparm-arg to override tparm's argument type
11627 echo "$as_me:11627: checking for type of tparm args" >&5
11628 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11629
11630 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11631 if test "${with_tparm_arg+set}" = set; then
11632   withval="$with_tparm_arg"
11633   NCURSES_TPARM_ARG="$withval"
11634 else
11635   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11636 fi;
11637 echo "$as_me:11637: result: $NCURSES_TPARM_ARG" >&5
11638 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11639
11640 ### Enable compiling-in rcs id's
11641 echo "$as_me:11641: checking if RCS identifiers should be compiled-in" >&5
11642 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11643
11644 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11645 if test "${with_rcs_ids+set}" = set; then
11646   withval="$with_rcs_ids"
11647   with_rcs_ids=$withval
11648 else
11649   with_rcs_ids=no
11650 fi;
11651 echo "$as_me:11651: result: $with_rcs_ids" >&5
11652 echo "${ECHO_T}$with_rcs_ids" >&6
11653 test "x$with_rcs_ids" = xyes &&
11654 cat >>confdefs.h <<\EOF
11655 #define USE_RCS_IDS 1
11656 EOF
11657
11658 ###############################################################################
11659
11660 echo "$as_me:11660: checking format of man-pages" >&5
11661 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11662
11663 # Check whether --with-manpage-format or --without-manpage-format was given.
11664 if test "${with_manpage_format+set}" = set; then
11665   withval="$with_manpage_format"
11666   MANPAGE_FORMAT=$withval
11667 else
11668   MANPAGE_FORMAT=unknown
11669 fi;
11670
11671 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11672 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11673
11674 cf_unknown=
11675
11676 case $MANPAGE_FORMAT in
11677 (unknown)
11678         if test -z "$MANPATH" ; then
11679                 MANPATH="/usr/man:/usr/share/man"
11680         fi
11681
11682         # look for the 'date' man-page (it's most likely to be installed!)
11683         MANPAGE_FORMAT=
11684         cf_preform=no
11685         cf_catonly=yes
11686         cf_example=date
11687
11688         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11689         for cf_dir in $MANPATH; do
11690                 test -z "$cf_dir" && cf_dir=/usr/man
11691                 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
11692                 do
11693                         cf_test=`echo $cf_name | sed -e 's/*//'`
11694                         if test "x$cf_test" = "x$cf_name" ; then
11695
11696                                 case "$cf_name" in
11697                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11698                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11699                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11700                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11701                                 esac
11702
11703                                 case "$cf_name" in
11704                                 ($cf_dir/man*)
11705                                         cf_catonly=no
11706                                         ;;
11707                                 ($cf_dir/cat*)
11708                                         cf_preform=yes
11709                                         ;;
11710                                 esac
11711                                 break
11712                         fi
11713
11714                         # if we found a match in either man* or cat*, stop looking
11715                         if test -n "$MANPAGE_FORMAT" ; then
11716                                 cf_found=no
11717                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11718                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11719                                 case "$cf_name" in
11720                                 ($cf_dir/cat*)
11721                                         cf_found=yes
11722                                         ;;
11723                                 esac
11724                                 test $cf_found=yes && break
11725                         fi
11726                 done
11727                 # only check the first directory in $MANPATH where we find manpages
11728                 if test -n "$MANPAGE_FORMAT" ; then
11729                         break
11730                 fi
11731         done
11732         # if we did not find the example, just assume it is normal
11733         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11734         IFS="$ac_save_ifs"
11735         ;;
11736 (*)
11737         for cf_option in $MANPAGE_FORMAT; do
11738         case $cf_option in
11739         (gzip|compress|BSDI|normal|formatted|catonly)
11740                 ;;
11741         (*)
11742                 cf_unknown="$cf_unknown $cf_option"
11743                 ;;
11744         esac
11745         done
11746         ;;
11747 esac
11748
11749 echo "$as_me:11749: result: $MANPAGE_FORMAT" >&5
11750 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11751 if test -n "$cf_unknown" ; then
11752         { echo "$as_me:11752: WARNING: Unexpected manpage-format $cf_unknown" >&5
11753 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11754 fi
11755
11756 echo "$as_me:11756: checking for manpage renaming" >&5
11757 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11758
11759 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11760 if test "${with_manpage_renames+set}" = set; then
11761   withval="$with_manpage_renames"
11762   MANPAGE_RENAMES=$withval
11763 else
11764   MANPAGE_RENAMES=yes
11765 fi;
11766
11767 case ".$MANPAGE_RENAMES" in
11768 (.no)
11769         ;;
11770 (.|.yes)
11771         # Debian 'man' program?
11772         if test -f /etc/debian_version ; then
11773                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11774         else
11775                 MANPAGE_RENAMES=no
11776         fi
11777         ;;
11778 esac
11779
11780 if test "$MANPAGE_RENAMES" != no ; then
11781         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11782                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11783         elif test ! -f $MANPAGE_RENAMES ; then
11784                 { { echo "$as_me:11784: error: not a filename: $MANPAGE_RENAMES" >&5
11785 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11786    { (exit 1); exit 1; }; }
11787         fi
11788
11789         test ! -d man && mkdir man
11790
11791         # Construct a sed-script to perform renaming within man-pages
11792         if test -n "$MANPAGE_RENAMES" ; then
11793                 test ! -d man && mkdir man
11794                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11795         fi
11796 fi
11797
11798 echo "$as_me:11798: result: $MANPAGE_RENAMES" >&5
11799 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11800
11801 echo "$as_me:11801: checking if manpage aliases will be installed" >&5
11802 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11803
11804 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11805 if test "${with_manpage_aliases+set}" = set; then
11806   withval="$with_manpage_aliases"
11807   MANPAGE_ALIASES=$withval
11808 else
11809   MANPAGE_ALIASES=yes
11810 fi;
11811
11812 echo "$as_me:11812: result: $MANPAGE_ALIASES" >&5
11813 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11814
11815 case "x$LN_S" in
11816 (xln*)
11817         cf_use_symlinks=yes
11818         ;;
11819 (*)
11820         cf_use_symlinks=no
11821         ;;
11822 esac
11823
11824 MANPAGE_SYMLINKS=no
11825 if test "$MANPAGE_ALIASES" = yes ; then
11826 echo "$as_me:11826: checking if manpage symlinks should be used" >&5
11827 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11828
11829 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11830 if test "${with_manpage_symlinks+set}" = set; then
11831   withval="$with_manpage_symlinks"
11832   MANPAGE_SYMLINKS=$withval
11833 else
11834   MANPAGE_SYMLINKS=$cf_use_symlinks
11835 fi;
11836
11837 if test "$$cf_use_symlinks" = no; then
11838 if test "$MANPAGE_SYMLINKS" = yes ; then
11839         { echo "$as_me:11839: WARNING: cannot make symlinks" >&5
11840 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11841         MANPAGE_SYMLINKS=no
11842 fi
11843 fi
11844
11845 echo "$as_me:11845: result: $MANPAGE_SYMLINKS" >&5
11846 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11847 fi
11848
11849 echo "$as_me:11849: checking for manpage tbl" >&5
11850 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11851
11852 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11853 if test "${with_manpage_tbl+set}" = set; then
11854   withval="$with_manpage_tbl"
11855   MANPAGE_TBL=$withval
11856 else
11857   MANPAGE_TBL=no
11858 fi;
11859
11860 echo "$as_me:11860: result: $MANPAGE_TBL" >&5
11861 echo "${ECHO_T}$MANPAGE_TBL" >&6
11862
11863 if test "$prefix" = "NONE" ; then
11864         cf_prefix="$ac_default_prefix"
11865 else
11866         cf_prefix="$prefix"
11867 fi
11868
11869 case "$MANPAGE_FORMAT" in
11870 (*catonly*)
11871         cf_format=yes
11872         cf_inboth=no
11873         ;;
11874 (*formatted*)
11875         cf_format=yes
11876         cf_inboth=yes
11877         ;;
11878 (*)
11879         cf_format=no
11880         cf_inboth=no
11881         ;;
11882 esac
11883
11884 test ! -d man && mkdir man
11885
11886 cf_so_strip=
11887 cf_compress=
11888 case "$MANPAGE_FORMAT" in
11889 (*compress*)
11890         cf_so_strip="Z"
11891         cf_compress=compress
11892         ;;
11893 (*gzip*)
11894         cf_so_strip="gz"
11895         cf_compress=gzip
11896         ;;
11897 esac
11898
11899 cf_edit_man=./edit_man.sh
11900 cf_man_alias=`pwd`/man_alias.sed
11901
11902 cat >$cf_edit_man <<CF_EOF
11903 #! $SHELL
11904 # this script is generated by the configure-script CF_MAN_PAGES macro.
11905
11906 prefix="$cf_prefix"
11907 datarootdir="$datarootdir"
11908 datadir="$datadir"
11909
11910 NCURSES_MAJOR="$NCURSES_MAJOR"
11911 NCURSES_MINOR="$NCURSES_MINOR"
11912 NCURSES_PATCH="$NCURSES_PATCH"
11913
11914 NCURSES_OSPEED="$NCURSES_OSPEED"
11915 TERMINFO="$TERMINFO"
11916
11917 INSTALL="$INSTALL"
11918 INSTALL_DATA="$INSTALL_DATA"
11919
11920 transform="$program_transform_name"
11921
11922 TMP=\${TMPDIR:=/tmp}/man\$\$
11923 trap "rm -f \$TMP" 0 1 2 3 15
11924
11925 form=\$1
11926 shift || exit 1
11927
11928 verb=\$1
11929 shift || exit 1
11930
11931 mandir=\$1
11932 shift || exit 1
11933
11934 srcdir=\$1
11935 top_srcdir=\$srcdir/..
11936 shift || exit 1
11937
11938 if test "\$form" = normal ; then
11939         if test "$cf_format" = yes ; then
11940         if test "$cf_inboth" = no ; then
11941                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11942                 exit $?
11943         fi
11944         fi
11945         cf_subdir=\$mandir/man
11946         cf_tables=$MANPAGE_TBL
11947 else
11948         cf_subdir=\$mandir/cat
11949         cf_tables=yes
11950 fi
11951
11952 # process the list of source-files
11953 for i in \$* ; do
11954 case \$i in
11955 (*.orig|*.rej) ;;
11956 (*.[0-9]*)
11957         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11958         if test \$verb = installing ; then
11959         if test ! -d \$cf_subdir\${section} ; then
11960                 mkdir -p \$cf_subdir\$section
11961         fi
11962         fi
11963
11964         # replace variables in man page
11965         if test ! -f $cf_man_alias ; then
11966 cat >>$cf_man_alias <<-CF_EOF2
11967                 s,@DATADIR@,\$datadir,g
11968                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11969                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11970                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11971                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11972                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11973                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11974 CF_EOF
11975
11976         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11977         do
11978                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11979                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11980 cat >>$cf_edit_man <<-CF_EOF
11981                 s,@$cf_NAME@,$cf_name,g
11982 CF_EOF
11983         done
11984
11985 cat >>$cf_edit_man <<CF_EOF
11986 CF_EOF2
11987                 echo "...made $cf_man_alias"
11988         fi
11989
11990         aliases=
11991         cf_source=\`basename \$i\`
11992         inalias=\$cf_source
11993         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11994         if test ! -f \$inalias ; then
11995                 echo .. skipped \$cf_source
11996                 continue
11997         fi
11998 CF_EOF
11999
12000 if test "$MANPAGE_ALIASES" != no ; then
12001 cat >>$cf_edit_man <<CF_EOF
12002         nCurses=ignore.3x
12003         test $with_curses_h = yes && nCurses=ncurses.3x
12004         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
12005 CF_EOF
12006 fi
12007
12008 if test "$MANPAGE_RENAMES" = no ; then
12009 cat >>$cf_edit_man <<CF_EOF
12010         # perform program transformations for section 1 man pages
12011         if test \$section = 1 ; then
12012                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
12013         else
12014                 cf_target=\$cf_subdir\${section}/\$cf_source
12015         fi
12016 CF_EOF
12017 else
12018 cat >>$cf_edit_man <<CF_EOF
12019         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
12020         if test -z "\$cf_target" ; then
12021                 echo '? missing rename for '\$cf_source
12022                 cf_target="\$cf_source"
12023         fi
12024         cf_target="\$cf_subdir\${section}/\${cf_target}"
12025
12026 CF_EOF
12027 fi
12028
12029 cat >>$cf_edit_man <<CF_EOF
12030         sed     -f $cf_man_alias \\
12031 CF_EOF
12032
12033 if test -f $MANPAGE_RENAMES ; then
12034 cat >>$cf_edit_man <<CF_EOF
12035                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
12036 CF_EOF
12037 else
12038 cat >>$cf_edit_man <<CF_EOF
12039                 < \$i >\$TMP
12040 CF_EOF
12041 fi
12042
12043 cat >>$cf_edit_man <<CF_EOF
12044 if test \$cf_tables = yes ; then
12045         tbl \$TMP >\$TMP.out
12046         mv \$TMP.out \$TMP
12047 fi
12048 CF_EOF
12049
12050 if test $with_overwrite != yes ; then
12051 cat >>$cf_edit_man <<CF_EOF
12052         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
12053         mv \$TMP.out \$TMP
12054 CF_EOF
12055 fi
12056
12057 if test $with_curses_h != yes ; then
12058 cat >>$cf_edit_man <<CF_EOF
12059         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
12060         mv \$TMP.out \$TMP
12061 CF_EOF
12062 fi
12063
12064 cat >>$cf_edit_man <<CF_EOF
12065         if test \$form = format ; then
12066                 nroff -man \$TMP >\$TMP.out
12067                 mv \$TMP.out \$TMP
12068         fi
12069 CF_EOF
12070
12071 if test -n "$cf_compress" ; then
12072 cat >>$cf_edit_man <<CF_EOF
12073         if test \$verb = installing ; then
12074         if ( $cf_compress -f \$TMP )
12075         then
12076                 mv \$TMP.$cf_so_strip \$TMP
12077         fi
12078         fi
12079         cf_target="\$cf_target.$cf_so_strip"
12080 CF_EOF
12081 fi
12082
12083 case "$MANPAGE_FORMAT" in
12084 (*BSDI*)
12085 cat >>$cf_edit_man <<CF_EOF
12086         if test \$form = format ; then
12087                 # BSDI installs only .0 suffixes in the cat directories
12088                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
12089         fi
12090 CF_EOF
12091   ;;
12092 esac
12093
12094 cat >>$cf_edit_man <<CF_EOF
12095         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
12096         if test \$verb = installing ; then
12097                 echo \$verb \$cf_target
12098                 \$INSTALL_DATA \$TMP \$cf_target
12099                 test -d \$cf_subdir\${section} &&
12100                 test -n "\$aliases" && (
12101                         cd \$cf_subdir\${section} && (
12102                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
12103                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
12104                                 cf_target=\`basename \$cf_target\`
12105                                 for cf_alias in \$aliases
12106                                 do
12107                                         if test \$section = 1 ; then
12108                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12109                                         fi
12110
12111                                         if test "$MANPAGE_SYMLINKS" = yes ; then
12112                                                 if test -f \$cf_alias\${suffix} ; then
12113                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
12114                                                         then
12115                                                                 continue
12116                                                         fi
12117                                                 fi
12118                                                 echo .. \$verb alias \$cf_alias\${suffix}
12119 CF_EOF
12120 case "x$LN_S" in
12121 (*-f)
12122 cat >>$cf_edit_man <<CF_EOF
12123                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12124 CF_EOF
12125         ;;
12126 (*)
12127 cat >>$cf_edit_man <<CF_EOF
12128                                                 rm -f \$cf_alias\${suffix}
12129                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12130 CF_EOF
12131         ;;
12132 esac
12133 cat >>$cf_edit_man <<CF_EOF
12134                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12135                                                 echo ".so \$cf_source" >\$TMP
12136 CF_EOF
12137 if test -n "$cf_compress" ; then
12138 cat >>$cf_edit_man <<CF_EOF
12139                                                 if test -n "$cf_so_strip" ; then
12140                                                         $cf_compress -f \$TMP
12141                                                         mv \$TMP.$cf_so_strip \$TMP
12142                                                 fi
12143 CF_EOF
12144 fi
12145 cat >>$cf_edit_man <<CF_EOF
12146                                                 echo .. \$verb alias \$cf_alias\${suffix}
12147                                                 rm -f \$cf_alias\${suffix}
12148                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12149                                         fi
12150                                 done
12151                         )
12152                 )
12153         elif test \$verb = removing ; then
12154                 test -f \$cf_target && (
12155                         echo \$verb \$cf_target
12156                         rm -f \$cf_target
12157                 )
12158                 test -d \$cf_subdir\${section} &&
12159                 test -n "\$aliases" && (
12160                         cd \$cf_subdir\${section} && (
12161                                 for cf_alias in \$aliases
12162                                 do
12163                                         if test \$section = 1 ; then
12164                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12165                                         fi
12166
12167                                         echo .. \$verb alias \$cf_alias\${suffix}
12168                                         rm -f \$cf_alias\${suffix}
12169                                 done
12170                         )
12171                 )
12172         else
12173 #               echo ".hy 0"
12174                 cat \$TMP
12175         fi
12176         ;;
12177 esac
12178 done
12179
12180 if test $cf_inboth = yes ; then
12181 if test \$form != format ; then
12182         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12183 fi
12184 fi
12185
12186 exit 0
12187 CF_EOF
12188 chmod 755 $cf_edit_man
12189
12190 ###############################################################################
12191
12192 ### Note that some functions (such as const) are normally disabled anyway.
12193 echo "$as_me:12193: checking if you want to build with function extensions" >&5
12194 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12195
12196 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12197 if test "${enable_ext_funcs+set}" = set; then
12198   enableval="$enable_ext_funcs"
12199   with_ext_funcs=$enableval
12200 else
12201   with_ext_funcs=yes
12202 fi;
12203 echo "$as_me:12203: result: $with_ext_funcs" >&5
12204 echo "${ECHO_T}$with_ext_funcs" >&6
12205 if test "x$with_ext_funcs" = xyes ; then
12206         NCURSES_EXT_FUNCS=1
12207
12208 cat >>confdefs.h <<\EOF
12209 #define NCURSES_EXT_FUNCS 1
12210 EOF
12211
12212 cat >>confdefs.h <<\EOF
12213 #define HAVE_ASSUME_DEFAULT_COLORS 1
12214 EOF
12215
12216 cat >>confdefs.h <<\EOF
12217 #define HAVE_CURSES_VERSION 1
12218 EOF
12219
12220 cat >>confdefs.h <<\EOF
12221 #define HAVE_HAS_KEY 1
12222 EOF
12223
12224 cat >>confdefs.h <<\EOF
12225 #define HAVE_RESIZETERM 1
12226 EOF
12227
12228 cat >>confdefs.h <<\EOF
12229 #define HAVE_RESIZE_TERM 1
12230 EOF
12231
12232 cat >>confdefs.h <<\EOF
12233 #define HAVE_TERM_ENTRY_H 1
12234 EOF
12235
12236 cat >>confdefs.h <<\EOF
12237 #define HAVE_USE_DEFAULT_COLORS 1
12238 EOF
12239
12240 cat >>confdefs.h <<\EOF
12241 #define HAVE_USE_EXTENDED_NAMES 1
12242 EOF
12243
12244 cat >>confdefs.h <<\EOF
12245 #define HAVE_USE_SCREEN 1
12246 EOF
12247
12248 cat >>confdefs.h <<\EOF
12249 #define HAVE_USE_WINDOW 1
12250 EOF
12251
12252 cat >>confdefs.h <<\EOF
12253 #define HAVE_WRESIZE 1
12254 EOF
12255
12256         GENERATED_EXT_FUNCS=generated
12257         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12258 else
12259         NCURSES_EXT_FUNCS=0
12260         GENERATED_EXT_FUNCS=
12261 fi
12262
12263 echo "$as_me:12263: checking if you want to build with SCREEN extensions" >&5
12264 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12265
12266 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12267 if test "${enable_sp_funcs+set}" = set; then
12268   enableval="$enable_sp_funcs"
12269   with_sp_funcs=$enableval
12270 else
12271   with_sp_funcs=$cf_dft_ext_spfuncs
12272 fi;
12273 echo "$as_me:12273: result: $with_sp_funcs" >&5
12274 echo "${ECHO_T}$with_sp_funcs" >&6
12275 if test "x$with_sp_funcs" = xyes ; then
12276         NCURSES_SP_FUNCS=1
12277
12278 cat >>confdefs.h <<\EOF
12279 #define NCURSES_SP_FUNCS 1
12280 EOF
12281
12282 cat >>confdefs.h <<\EOF
12283 #define HAVE_TPUTS_SP 1
12284 EOF
12285
12286         GENERATED_SP_FUNCS=generated
12287 else
12288         NCURSES_SP_FUNCS=0
12289         GENERATED_SP_FUNCS=
12290 fi
12291
12292 echo "$as_me:12292: checking if you want to build with terminal-driver" >&5
12293 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12294
12295 # Check whether --enable-term-driver or --disable-term-driver was given.
12296 if test "${enable_term_driver+set}" = set; then
12297   enableval="$enable_term_driver"
12298   with_term_driver=$enableval
12299 else
12300   with_term_driver=no
12301 fi;
12302 echo "$as_me:12302: result: $with_term_driver" >&5
12303 echo "${ECHO_T}$with_term_driver" >&6
12304 if test "x$with_term_driver" = xyes ; then
12305
12306 cat >>confdefs.h <<\EOF
12307 #define USE_TERM_DRIVER 1
12308 EOF
12309
12310         if test "x$with_termlib" != xno ; then
12311                 { { echo "$as_me:12311: error: The term-driver option conflicts with the termlib option" >&5
12312 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12313    { (exit 1); exit 1; }; }
12314         fi
12315         if test "x$with_sp_funcs" != xyes ; then
12316                 { { echo "$as_me:12316: error: The term-driver option relies upon sp-funcs" >&5
12317 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12318    { (exit 1); exit 1; }; }
12319         fi
12320 fi
12321
12322 ###   use option --enable-const to turn on use of const beyond that in XSI.
12323 echo "$as_me:12323: checking for extended use of const keyword" >&5
12324 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12325
12326 # Check whether --enable-const or --disable-const was given.
12327 if test "${enable_const+set}" = set; then
12328   enableval="$enable_const"
12329   with_ext_const=$enableval
12330 else
12331   with_ext_const=$cf_dft_ext_const
12332 fi;
12333 echo "$as_me:12333: result: $with_ext_const" >&5
12334 echo "${ECHO_T}$with_ext_const" >&6
12335 NCURSES_CONST='/*nothing*/'
12336 if test "x$with_ext_const" = xyes ; then
12337         NCURSES_CONST=const
12338 fi
12339
12340 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12341 echo "$as_me:12341: checking if you want to use extended colors" >&5
12342 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12343
12344 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12345 if test "${enable_ext_colors+set}" = set; then
12346   enableval="$enable_ext_colors"
12347   with_ext_colors=$enableval
12348 else
12349   with_ext_colors=$cf_dft_ext_colors
12350 fi;
12351 echo "$as_me:12351: result: $with_ext_colors" >&5
12352 echo "${ECHO_T}$with_ext_colors" >&6
12353 NCURSES_EXT_COLORS=0
12354 if test "x$with_ext_colors" = xyes ; then
12355         if test "x$with_widec" != xyes ; then
12356                 { echo "$as_me:12356: WARNING: This option applies only to wide-character library" >&5
12357 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12358         else
12359                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12360
12361 if test "${with_abi_version+set}" != set; then
12362         case $cf_cv_rel_version in
12363         (5.*)
12364                 cf_cv_rel_version=6.0
12365                 cf_cv_abi_version=6
12366                 { echo "$as_me:12366: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12367 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12368                 ;;
12369         esac
12370 fi
12371
12372                 NCURSES_EXT_COLORS=1
12373
12374 cat >>confdefs.h <<\EOF
12375 #define NCURSES_EXT_COLORS 1
12376 EOF
12377
12378 cat >>confdefs.h <<\EOF
12379 #define HAVE_ALLOC_PAIR 1
12380 EOF
12381
12382 cat >>confdefs.h <<\EOF
12383 #define HAVE_INIT_EXTENDED_COLOR 1
12384 EOF
12385
12386 cat >>confdefs.h <<\EOF
12387 #define HAVE_RESET_COLOR_PAIRS 1
12388 EOF
12389
12390         fi
12391 fi
12392
12393 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12394 echo "$as_me:12394: checking if you want to use extended mouse encoding" >&5
12395 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12396
12397 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12398 if test "${enable_ext_mouse+set}" = set; then
12399   enableval="$enable_ext_mouse"
12400   with_ext_mouse=$enableval
12401 else
12402   with_ext_mouse=$cf_dft_ext_mouse
12403 fi;
12404 echo "$as_me:12404: result: $with_ext_mouse" >&5
12405 echo "${ECHO_T}$with_ext_mouse" >&6
12406 NCURSES_MOUSE_VERSION=1
12407 if test "x$with_ext_mouse" = xyes ; then
12408         NCURSES_MOUSE_VERSION=2
12409
12410 if test "${with_abi_version+set}" != set; then
12411         case $cf_cv_rel_version in
12412         (5.*)
12413                 cf_cv_rel_version=6.0
12414                 cf_cv_abi_version=6
12415                 { echo "$as_me:12415: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12416 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12417                 ;;
12418         esac
12419 fi
12420
12421 fi
12422
12423 ###   use option --enable-ext-putwin to turn on extended screendumps
12424 echo "$as_me:12424: checking if you want to use extended putwin/screendump" >&5
12425 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12426
12427 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12428 if test "${enable_ext_putwin+set}" = set; then
12429   enableval="$enable_ext_putwin"
12430   with_ext_putwin=$enableval
12431 else
12432   with_ext_putwin=$cf_dft_ext_putwin
12433 fi;
12434 echo "$as_me:12434: result: $with_ext_putwin" >&5
12435 echo "${ECHO_T}$with_ext_putwin" >&6
12436 if test "x$with_ext_putwin" = xyes ; then
12437
12438 cat >>confdefs.h <<\EOF
12439 #define NCURSES_EXT_PUTWIN 1
12440 EOF
12441
12442 fi
12443
12444 echo "$as_me:12444: checking if you want \$NCURSES_NO_PADDING code" >&5
12445 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12446
12447 # Check whether --enable-no-padding or --disable-no-padding was given.
12448 if test "${enable_no_padding+set}" = set; then
12449   enableval="$enable_no_padding"
12450   with_no_padding=$enableval
12451 else
12452   with_no_padding=$with_ext_funcs
12453 fi;
12454 echo "$as_me:12454: result: $with_no_padding" >&5
12455 echo "${ECHO_T}$with_no_padding" >&6
12456 test "x$with_no_padding" = xyes &&
12457 cat >>confdefs.h <<\EOF
12458 #define NCURSES_NO_PADDING 1
12459 EOF
12460
12461 echo "$as_me:12461: checking for ANSI C header files" >&5
12462 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12463 if test "${ac_cv_header_stdc+set}" = set; then
12464   echo $ECHO_N "(cached) $ECHO_C" >&6
12465 else
12466   cat >conftest.$ac_ext <<_ACEOF
12467 #line 12467 "configure"
12468 #include "confdefs.h"
12469 #include <stdlib.h>
12470 #include <stdarg.h>
12471 #include <string.h>
12472 #include <float.h>
12473
12474 _ACEOF
12475 if { (eval echo "$as_me:12475: \"$ac_cpp conftest.$ac_ext\"") >&5
12476   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12477   ac_status=$?
12478   egrep -v '^ *\+' conftest.er1 >conftest.err
12479   rm -f conftest.er1
12480   cat conftest.err >&5
12481   echo "$as_me:12481: \$? = $ac_status" >&5
12482   (exit $ac_status); } >/dev/null; then
12483   if test -s conftest.err; then
12484     ac_cpp_err=$ac_c_preproc_warn_flag
12485   else
12486     ac_cpp_err=
12487   fi
12488 else
12489   ac_cpp_err=yes
12490 fi
12491 if test -z "$ac_cpp_err"; then
12492   ac_cv_header_stdc=yes
12493 else
12494   echo "$as_me: failed program was:" >&5
12495   cat conftest.$ac_ext >&5
12496   ac_cv_header_stdc=no
12497 fi
12498 rm -f conftest.err conftest.$ac_ext
12499
12500 if test $ac_cv_header_stdc = yes; then
12501   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12502   cat >conftest.$ac_ext <<_ACEOF
12503 #line 12503 "configure"
12504 #include "confdefs.h"
12505 #include <string.h>
12506
12507 _ACEOF
12508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12509   egrep "memchr" >/dev/null 2>&1; then
12510   :
12511 else
12512   ac_cv_header_stdc=no
12513 fi
12514 rm -rf conftest*
12515
12516 fi
12517
12518 if test $ac_cv_header_stdc = yes; then
12519   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12520   cat >conftest.$ac_ext <<_ACEOF
12521 #line 12521 "configure"
12522 #include "confdefs.h"
12523 #include <stdlib.h>
12524
12525 _ACEOF
12526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12527   egrep "free" >/dev/null 2>&1; then
12528   :
12529 else
12530   ac_cv_header_stdc=no
12531 fi
12532 rm -rf conftest*
12533
12534 fi
12535
12536 if test $ac_cv_header_stdc = yes; then
12537   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12538   if test "$cross_compiling" = yes; then
12539   :
12540 else
12541   cat >conftest.$ac_ext <<_ACEOF
12542 #line 12542 "configure"
12543 #include "confdefs.h"
12544 #include <ctype.h>
12545 #if ((' ' & 0x0FF) == 0x020)
12546 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12547 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12548 #else
12549 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12550                      || ('j' <= (c) && (c) <= 'r') \
12551                      || ('s' <= (c) && (c) <= 'z'))
12552 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12553 #endif
12554
12555 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12556 int
12557 main (void)
12558 {
12559   int i;
12560   for (i = 0; i < 256; i++)
12561     if (XOR (islower (i), ISLOWER (i))
12562         || toupper (i) != TOUPPER (i))
12563       $ac_main_return(2);
12564   $ac_main_return (0);
12565 }
12566 _ACEOF
12567 rm -f conftest$ac_exeext
12568 if { (eval echo "$as_me:12568: \"$ac_link\"") >&5
12569   (eval $ac_link) 2>&5
12570   ac_status=$?
12571   echo "$as_me:12571: \$? = $ac_status" >&5
12572   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12573   { (eval echo "$as_me:12573: \"$ac_try\"") >&5
12574   (eval $ac_try) 2>&5
12575   ac_status=$?
12576   echo "$as_me:12576: \$? = $ac_status" >&5
12577   (exit $ac_status); }; }; then
12578   :
12579 else
12580   echo "$as_me: program exited with status $ac_status" >&5
12581 echo "$as_me: failed program was:" >&5
12582 cat conftest.$ac_ext >&5
12583 ac_cv_header_stdc=no
12584 fi
12585 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12586 fi
12587 fi
12588 fi
12589 echo "$as_me:12589: result: $ac_cv_header_stdc" >&5
12590 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12591 if test $ac_cv_header_stdc = yes; then
12592
12593 cat >>confdefs.h <<\EOF
12594 #define STDC_HEADERS 1
12595 EOF
12596
12597 fi
12598
12599 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12600
12601 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12602                   inttypes.h stdint.h unistd.h
12603 do
12604 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12605 echo "$as_me:12605: checking for $ac_header" >&5
12606 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12607 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12608   echo $ECHO_N "(cached) $ECHO_C" >&6
12609 else
12610   cat >conftest.$ac_ext <<_ACEOF
12611 #line 12611 "configure"
12612 #include "confdefs.h"
12613 $ac_includes_default
12614 #include <$ac_header>
12615 _ACEOF
12616 rm -f conftest.$ac_objext
12617 if { (eval echo "$as_me:12617: \"$ac_compile\"") >&5
12618   (eval $ac_compile) 2>&5
12619   ac_status=$?
12620   echo "$as_me:12620: \$? = $ac_status" >&5
12621   (exit $ac_status); } &&
12622          { ac_try='test -s conftest.$ac_objext'
12623   { (eval echo "$as_me:12623: \"$ac_try\"") >&5
12624   (eval $ac_try) 2>&5
12625   ac_status=$?
12626   echo "$as_me:12626: \$? = $ac_status" >&5
12627   (exit $ac_status); }; }; then
12628   eval "$as_ac_Header=yes"
12629 else
12630   echo "$as_me: failed program was:" >&5
12631 cat conftest.$ac_ext >&5
12632 eval "$as_ac_Header=no"
12633 fi
12634 rm -f conftest.$ac_objext conftest.$ac_ext
12635 fi
12636 echo "$as_me:12636: result: `eval echo '${'$as_ac_Header'}'`" >&5
12637 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12638 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12639   cat >>confdefs.h <<EOF
12640 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12641 EOF
12642
12643 fi
12644 done
12645
12646 echo "$as_me:12646: checking for signed char" >&5
12647 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12648 if test "${ac_cv_type_signed_char+set}" = set; then
12649   echo $ECHO_N "(cached) $ECHO_C" >&6
12650 else
12651   cat >conftest.$ac_ext <<_ACEOF
12652 #line 12652 "configure"
12653 #include "confdefs.h"
12654 $ac_includes_default
12655 int
12656 main (void)
12657 {
12658 if ((signed char *) 0)
12659   return 0;
12660 if (sizeof (signed char))
12661   return 0;
12662   ;
12663   return 0;
12664 }
12665 _ACEOF
12666 rm -f conftest.$ac_objext
12667 if { (eval echo "$as_me:12667: \"$ac_compile\"") >&5
12668   (eval $ac_compile) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit $ac_status); } &&
12672          { ac_try='test -s conftest.$ac_objext'
12673   { (eval echo "$as_me:12673: \"$ac_try\"") >&5
12674   (eval $ac_try) 2>&5
12675   ac_status=$?
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); }; }; then
12678   ac_cv_type_signed_char=yes
12679 else
12680   echo "$as_me: failed program was:" >&5
12681 cat conftest.$ac_ext >&5
12682 ac_cv_type_signed_char=no
12683 fi
12684 rm -f conftest.$ac_objext conftest.$ac_ext
12685 fi
12686 echo "$as_me:12686: result: $ac_cv_type_signed_char" >&5
12687 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12688
12689 echo "$as_me:12689: checking size of signed char" >&5
12690 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12691 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12692   echo $ECHO_N "(cached) $ECHO_C" >&6
12693 else
12694   if test "$ac_cv_type_signed_char" = yes; then
12695   if test "$cross_compiling" = yes; then
12696   # Depending upon the size, compute the lo and hi bounds.
12697 cat >conftest.$ac_ext <<_ACEOF
12698 #line 12698 "configure"
12699 #include "confdefs.h"
12700 $ac_includes_default
12701 int
12702 main (void)
12703 {
12704 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12705   ;
12706   return 0;
12707 }
12708 _ACEOF
12709 rm -f conftest.$ac_objext
12710 if { (eval echo "$as_me:12710: \"$ac_compile\"") >&5
12711   (eval $ac_compile) 2>&5
12712   ac_status=$?
12713   echo "$as_me:12713: \$? = $ac_status" >&5
12714   (exit $ac_status); } &&
12715          { ac_try='test -s conftest.$ac_objext'
12716   { (eval echo "$as_me:12716: \"$ac_try\"") >&5
12717   (eval $ac_try) 2>&5
12718   ac_status=$?
12719   echo "$as_me:12719: \$? = $ac_status" >&5
12720   (exit $ac_status); }; }; then
12721   ac_lo=0 ac_mid=0
12722   while :; do
12723     cat >conftest.$ac_ext <<_ACEOF
12724 #line 12724 "configure"
12725 #include "confdefs.h"
12726 $ac_includes_default
12727 int
12728 main (void)
12729 {
12730 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12731   ;
12732   return 0;
12733 }
12734 _ACEOF
12735 rm -f conftest.$ac_objext
12736 if { (eval echo "$as_me:12736: \"$ac_compile\"") >&5
12737   (eval $ac_compile) 2>&5
12738   ac_status=$?
12739   echo "$as_me:12739: \$? = $ac_status" >&5
12740   (exit $ac_status); } &&
12741          { ac_try='test -s conftest.$ac_objext'
12742   { (eval echo "$as_me:12742: \"$ac_try\"") >&5
12743   (eval $ac_try) 2>&5
12744   ac_status=$?
12745   echo "$as_me:12745: \$? = $ac_status" >&5
12746   (exit $ac_status); }; }; then
12747   ac_hi=$ac_mid; break
12748 else
12749   echo "$as_me: failed program was:" >&5
12750 cat conftest.$ac_ext >&5
12751 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12752 fi
12753 rm -f conftest.$ac_objext conftest.$ac_ext
12754   done
12755 else
12756   echo "$as_me: failed program was:" >&5
12757 cat conftest.$ac_ext >&5
12758 ac_hi=-1 ac_mid=-1
12759   while :; do
12760     cat >conftest.$ac_ext <<_ACEOF
12761 #line 12761 "configure"
12762 #include "confdefs.h"
12763 $ac_includes_default
12764 int
12765 main (void)
12766 {
12767 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12768   ;
12769   return 0;
12770 }
12771 _ACEOF
12772 rm -f conftest.$ac_objext
12773 if { (eval echo "$as_me:12773: \"$ac_compile\"") >&5
12774   (eval $ac_compile) 2>&5
12775   ac_status=$?
12776   echo "$as_me:12776: \$? = $ac_status" >&5
12777   (exit $ac_status); } &&
12778          { ac_try='test -s conftest.$ac_objext'
12779   { (eval echo "$as_me:12779: \"$ac_try\"") >&5
12780   (eval $ac_try) 2>&5
12781   ac_status=$?
12782   echo "$as_me:12782: \$? = $ac_status" >&5
12783   (exit $ac_status); }; }; then
12784   ac_lo=$ac_mid; break
12785 else
12786   echo "$as_me: failed program was:" >&5
12787 cat conftest.$ac_ext >&5
12788 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12789 fi
12790 rm -f conftest.$ac_objext conftest.$ac_ext
12791   done
12792 fi
12793 rm -f conftest.$ac_objext conftest.$ac_ext
12794 # Binary search between lo and hi bounds.
12795 while test "x$ac_lo" != "x$ac_hi"; do
12796   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12797   cat >conftest.$ac_ext <<_ACEOF
12798 #line 12798 "configure"
12799 #include "confdefs.h"
12800 $ac_includes_default
12801 int
12802 main (void)
12803 {
12804 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12805   ;
12806   return 0;
12807 }
12808 _ACEOF
12809 rm -f conftest.$ac_objext
12810 if { (eval echo "$as_me:12810: \"$ac_compile\"") >&5
12811   (eval $ac_compile) 2>&5
12812   ac_status=$?
12813   echo "$as_me:12813: \$? = $ac_status" >&5
12814   (exit $ac_status); } &&
12815          { ac_try='test -s conftest.$ac_objext'
12816   { (eval echo "$as_me:12816: \"$ac_try\"") >&5
12817   (eval $ac_try) 2>&5
12818   ac_status=$?
12819   echo "$as_me:12819: \$? = $ac_status" >&5
12820   (exit $ac_status); }; }; then
12821   ac_hi=$ac_mid
12822 else
12823   echo "$as_me: failed program was:" >&5
12824 cat conftest.$ac_ext >&5
12825 ac_lo=`expr $ac_mid + 1`
12826 fi
12827 rm -f conftest.$ac_objext conftest.$ac_ext
12828 done
12829 ac_cv_sizeof_signed_char=$ac_lo
12830 else
12831   if test "$cross_compiling" = yes; then
12832   { { echo "$as_me:12832: error: cannot run test program while cross compiling" >&5
12833 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12834    { (exit 1); exit 1; }; }
12835 else
12836   cat >conftest.$ac_ext <<_ACEOF
12837 #line 12837 "configure"
12838 #include "confdefs.h"
12839 $ac_includes_default
12840 int
12841 main (void)
12842 {
12843 FILE *f = fopen ("conftest.val", "w");
12844 if (!f)
12845   $ac_main_return (1);
12846 fprintf (f, "%d", (sizeof (signed char)));
12847 fclose (f);
12848   ;
12849   return 0;
12850 }
12851 _ACEOF
12852 rm -f conftest$ac_exeext
12853 if { (eval echo "$as_me:12853: \"$ac_link\"") >&5
12854   (eval $ac_link) 2>&5
12855   ac_status=$?
12856   echo "$as_me:12856: \$? = $ac_status" >&5
12857   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12858   { (eval echo "$as_me:12858: \"$ac_try\"") >&5
12859   (eval $ac_try) 2>&5
12860   ac_status=$?
12861   echo "$as_me:12861: \$? = $ac_status" >&5
12862   (exit $ac_status); }; }; then
12863   ac_cv_sizeof_signed_char=`cat conftest.val`
12864 else
12865   echo "$as_me: program exited with status $ac_status" >&5
12866 echo "$as_me: failed program was:" >&5
12867 cat conftest.$ac_ext >&5
12868 fi
12869 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12870 fi
12871 fi
12872 rm -f conftest.val
12873 else
12874   ac_cv_sizeof_signed_char=0
12875 fi
12876 fi
12877 echo "$as_me:12877: result: $ac_cv_sizeof_signed_char" >&5
12878 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12879 cat >>confdefs.h <<EOF
12880 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12881 EOF
12882
12883 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12884         NCURSES_SBOOL="signed char"
12885 else
12886         NCURSES_SBOOL="char"
12887 fi
12888 echo "$as_me:12888: checking if you want to use signed Boolean array in term.h" >&5
12889 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12890
12891 # Check whether --enable-signed-char or --disable-signed-char was given.
12892 if test "${enable_signed_char+set}" = set; then
12893   enableval="$enable_signed_char"
12894   with_signed_char=$enableval
12895 else
12896   with_signed_char=no
12897 fi;
12898 echo "$as_me:12898: result: $with_signed_char" >&5
12899 echo "${ECHO_T}$with_signed_char" >&6
12900 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12901
12902 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12903 echo "$as_me:12903: checking if you want SIGWINCH handler" >&5
12904 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12905
12906 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12907 if test "${enable_sigwinch+set}" = set; then
12908   enableval="$enable_sigwinch"
12909   with_sigwinch=$enableval
12910 else
12911   with_sigwinch=$with_ext_funcs
12912 fi;
12913 echo "$as_me:12913: result: $with_sigwinch" >&5
12914 echo "${ECHO_T}$with_sigwinch" >&6
12915 test "x$with_sigwinch" = xyes &&
12916 cat >>confdefs.h <<\EOF
12917 #define USE_SIGWINCH 1
12918 EOF
12919
12920 ###   use option --enable-tcap-names to allow user to define new capabilities
12921 echo "$as_me:12921: checking if you want user-definable terminal capabilities like termcap" >&5
12922 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12923
12924 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12925 if test "${enable_tcap_names+set}" = set; then
12926   enableval="$enable_tcap_names"
12927   with_tcap_names=$enableval
12928 else
12929   with_tcap_names=$with_ext_funcs
12930 fi;
12931 echo "$as_me:12931: result: $with_tcap_names" >&5
12932 echo "${ECHO_T}$with_tcap_names" >&6
12933 NCURSES_XNAMES=0
12934 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12935
12936 ##############################################################################
12937
12938 echo "$as_me:12938: checking if you want to link with the pthread library" >&5
12939 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12940
12941 # Check whether --with-pthread or --without-pthread was given.
12942 if test "${with_pthread+set}" = set; then
12943   withval="$with_pthread"
12944   with_pthread=$withval
12945 else
12946   with_pthread=no
12947 fi;
12948 echo "$as_me:12948: result: $with_pthread" >&5
12949 echo "${ECHO_T}$with_pthread" >&6
12950
12951 if test "$with_pthread" != no ; then
12952         echo "$as_me:12952: checking for pthread.h" >&5
12953 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12954 if test "${ac_cv_header_pthread_h+set}" = set; then
12955   echo $ECHO_N "(cached) $ECHO_C" >&6
12956 else
12957   cat >conftest.$ac_ext <<_ACEOF
12958 #line 12958 "configure"
12959 #include "confdefs.h"
12960 #include <pthread.h>
12961 _ACEOF
12962 if { (eval echo "$as_me:12962: \"$ac_cpp conftest.$ac_ext\"") >&5
12963   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12964   ac_status=$?
12965   egrep -v '^ *\+' conftest.er1 >conftest.err
12966   rm -f conftest.er1
12967   cat conftest.err >&5
12968   echo "$as_me:12968: \$? = $ac_status" >&5
12969   (exit $ac_status); } >/dev/null; then
12970   if test -s conftest.err; then
12971     ac_cpp_err=$ac_c_preproc_warn_flag
12972   else
12973     ac_cpp_err=
12974   fi
12975 else
12976   ac_cpp_err=yes
12977 fi
12978 if test -z "$ac_cpp_err"; then
12979   ac_cv_header_pthread_h=yes
12980 else
12981   echo "$as_me: failed program was:" >&5
12982   cat conftest.$ac_ext >&5
12983   ac_cv_header_pthread_h=no
12984 fi
12985 rm -f conftest.err conftest.$ac_ext
12986 fi
12987 echo "$as_me:12987: result: $ac_cv_header_pthread_h" >&5
12988 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12989 if test $ac_cv_header_pthread_h = yes; then
12990
12991 cat >>confdefs.h <<\EOF
12992 #define HAVE_PTHREADS_H 1
12993 EOF
12994
12995         for cf_lib_pthread in pthread c_r
12996         do
12997             echo "$as_me:12997: checking if we can link with the $cf_lib_pthread library" >&5
12998 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12999             cf_save_LIBS="$LIBS"
13000
13001 cf_add_libs="-l$cf_lib_pthread"
13002 # Filter out duplicates - this happens with badly-designed ".pc" files...
13003 for cf_add_1lib in $LIBS
13004 do
13005         for cf_add_2lib in $cf_add_libs
13006         do
13007                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13008                 then
13009                         cf_add_1lib=
13010                         break
13011                 fi
13012         done
13013         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13014 done
13015 LIBS="$cf_add_libs"
13016
13017             cat >conftest.$ac_ext <<_ACEOF
13018 #line 13018 "configure"
13019 #include "confdefs.h"
13020
13021 #include <pthread.h>
13022
13023 int
13024 main (void)
13025 {
13026
13027                 int rc = pthread_create(0,0,0,0);
13028                 int r2 = pthread_mutexattr_settype(0, 0);
13029
13030   ;
13031   return 0;
13032 }
13033 _ACEOF
13034 rm -f conftest.$ac_objext conftest$ac_exeext
13035 if { (eval echo "$as_me:13035: \"$ac_link\"") >&5
13036   (eval $ac_link) 2>&5
13037   ac_status=$?
13038   echo "$as_me:13038: \$? = $ac_status" >&5
13039   (exit $ac_status); } &&
13040          { ac_try='test -s conftest$ac_exeext'
13041   { (eval echo "$as_me:13041: \"$ac_try\"") >&5
13042   (eval $ac_try) 2>&5
13043   ac_status=$?
13044   echo "$as_me:13044: \$? = $ac_status" >&5
13045   (exit $ac_status); }; }; then
13046   with_pthread=yes
13047 else
13048   echo "$as_me: failed program was:" >&5
13049 cat conftest.$ac_ext >&5
13050 with_pthread=no
13051 fi
13052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13053             LIBS="$cf_save_LIBS"
13054             echo "$as_me:13054: result: $with_pthread" >&5
13055 echo "${ECHO_T}$with_pthread" >&6
13056             test "$with_pthread" = yes && break
13057         done
13058
13059         if test "$with_pthread" = yes ; then
13060
13061 cf_add_libs="-l$cf_lib_pthread"
13062 # Filter out duplicates - this happens with badly-designed ".pc" files...
13063 for cf_add_1lib in $LIBS
13064 do
13065         for cf_add_2lib in $cf_add_libs
13066         do
13067                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13068                 then
13069                         cf_add_1lib=
13070                         break
13071                 fi
13072         done
13073         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13074 done
13075 LIBS="$cf_add_libs"
13076
13077 cat >>confdefs.h <<\EOF
13078 #define HAVE_LIBPTHREADS 1
13079 EOF
13080
13081         else
13082             { { echo "$as_me:13082: error: Cannot link with pthread library" >&5
13083 echo "$as_me: error: Cannot link with pthread library" >&2;}
13084    { (exit 1); exit 1; }; }
13085         fi
13086
13087 fi
13088
13089 fi
13090
13091 if test "x$with_pthread" != xno; then
13092         echo "$as_me:13092: checking for pthread_kill" >&5
13093 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
13094 if test "${ac_cv_func_pthread_kill+set}" = set; then
13095   echo $ECHO_N "(cached) $ECHO_C" >&6
13096 else
13097   cat >conftest.$ac_ext <<_ACEOF
13098 #line 13098 "configure"
13099 #include "confdefs.h"
13100 /* System header to define __stub macros and hopefully few prototypes,
13101     which can conflict with char pthread_kill (); below.  */
13102 #include <assert.h>
13103 /* Override any gcc2 internal prototype to avoid an error.  */
13104 #ifdef __cplusplus
13105 extern "C"
13106 #endif
13107 /* We use char because int might match the return type of a gcc2
13108    builtin and then its argument prototype would still apply.  */
13109 char pthread_kill ();
13110 char (*f) ();
13111
13112 int
13113 main (void)
13114 {
13115 /* The GNU C library defines this for functions which it implements
13116     to always fail with ENOSYS.  Some functions are actually named
13117     something starting with __ and the normal name is an alias.  */
13118 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13119 choke me
13120 #else
13121 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13122 #endif
13123
13124   ;
13125   return 0;
13126 }
13127 _ACEOF
13128 rm -f conftest.$ac_objext conftest$ac_exeext
13129 if { (eval echo "$as_me:13129: \"$ac_link\"") >&5
13130   (eval $ac_link) 2>&5
13131   ac_status=$?
13132   echo "$as_me:13132: \$? = $ac_status" >&5
13133   (exit $ac_status); } &&
13134          { ac_try='test -s conftest$ac_exeext'
13135   { (eval echo "$as_me:13135: \"$ac_try\"") >&5
13136   (eval $ac_try) 2>&5
13137   ac_status=$?
13138   echo "$as_me:13138: \$? = $ac_status" >&5
13139   (exit $ac_status); }; }; then
13140   ac_cv_func_pthread_kill=yes
13141 else
13142   echo "$as_me: failed program was:" >&5
13143 cat conftest.$ac_ext >&5
13144 ac_cv_func_pthread_kill=no
13145 fi
13146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13147 fi
13148 echo "$as_me:13148: result: $ac_cv_func_pthread_kill" >&5
13149 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13150 if test $ac_cv_func_pthread_kill = yes; then
13151
13152                 echo "$as_me:13152: checking if you want to allow EINTR in wgetch with pthreads" >&5
13153 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13154
13155 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13156 if test "${enable_pthreads_eintr+set}" = set; then
13157   enableval="$enable_pthreads_eintr"
13158   use_pthreads_eintr=$enableval
13159 else
13160   use_pthreads_eintr=no
13161 fi;
13162                 echo "$as_me:13162: result: $use_pthreads_eintr" >&5
13163 echo "${ECHO_T}$use_pthreads_eintr" >&6
13164                 if test "x$use_pthreads_eintr" = xyes ; then
13165
13166 cat >>confdefs.h <<\EOF
13167 #define USE_PTHREADS_EINTR 1
13168 EOF
13169
13170                 fi
13171 fi
13172
13173         echo "$as_me:13173: checking if you want to use weak-symbols for pthreads" >&5
13174 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13175
13176 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13177 if test "${enable_weak_symbols+set}" = set; then
13178   enableval="$enable_weak_symbols"
13179   use_weak_symbols=$enableval
13180 else
13181   use_weak_symbols=no
13182 fi;
13183         echo "$as_me:13183: result: $use_weak_symbols" >&5
13184 echo "${ECHO_T}$use_weak_symbols" >&6
13185         if test "x$use_weak_symbols" = xyes ; then
13186
13187 echo "$as_me:13187: checking if $CC supports weak symbols" >&5
13188 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13189 if test "${cf_cv_weak_symbols+set}" = set; then
13190   echo $ECHO_N "(cached) $ECHO_C" >&6
13191 else
13192
13193 cat >conftest.$ac_ext <<_ACEOF
13194 #line 13194 "configure"
13195 #include "confdefs.h"
13196
13197 #include <stdio.h>
13198 int
13199 main (void)
13200 {
13201
13202 #if defined(__GNUC__)
13203 #  if defined __USE_ISOC99
13204 #    define _cat_pragma(exp)    _Pragma(#exp)
13205 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13206 #  else
13207 #    define _weak_pragma(exp)
13208 #  endif
13209 #  define _declare(name)        __extension__ extern __typeof__(name) name
13210 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13211 #endif
13212
13213 weak_symbol(fopen);
13214
13215   ;
13216   return 0;
13217 }
13218 _ACEOF
13219 rm -f conftest.$ac_objext
13220 if { (eval echo "$as_me:13220: \"$ac_compile\"") >&5
13221   (eval $ac_compile) 2>&5
13222   ac_status=$?
13223   echo "$as_me:13223: \$? = $ac_status" >&5
13224   (exit $ac_status); } &&
13225          { ac_try='test -s conftest.$ac_objext'
13226   { (eval echo "$as_me:13226: \"$ac_try\"") >&5
13227   (eval $ac_try) 2>&5
13228   ac_status=$?
13229   echo "$as_me:13229: \$? = $ac_status" >&5
13230   (exit $ac_status); }; }; then
13231   cf_cv_weak_symbols=yes
13232 else
13233   echo "$as_me: failed program was:" >&5
13234 cat conftest.$ac_ext >&5
13235 cf_cv_weak_symbols=no
13236 fi
13237 rm -f conftest.$ac_objext conftest.$ac_ext
13238
13239 fi
13240 echo "$as_me:13240: result: $cf_cv_weak_symbols" >&5
13241 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13242
13243         else
13244                 cf_cv_weak_symbols=no
13245         fi
13246
13247         if test "x$cf_cv_weak_symbols" = xyes ; then
13248
13249 cat >>confdefs.h <<\EOF
13250 #define USE_WEAK_SYMBOLS 1
13251 EOF
13252
13253         fi
13254 fi
13255
13256 PTHREAD=
13257 if test "x$with_pthread" = "xyes" ; then
13258
13259 cat >>confdefs.h <<\EOF
13260 #define USE_PTHREADS 1
13261 EOF
13262
13263         enable_reentrant=yes
13264         if test "x$cf_cv_weak_symbols" = xyes ; then
13265                 PTHREAD=-lpthread
13266         fi
13267 fi
13268
13269 # Reentrant code has to be opaque; there's little advantage to making ncurses
13270 # opaque outside of that, so there is no --enable-opaque option.  We can use
13271 # this option without --with-pthreads, but this will be always set for
13272 # pthreads.
13273 echo "$as_me:13273: checking if you want reentrant code" >&5
13274 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13275
13276 # Check whether --enable-reentrant or --disable-reentrant was given.
13277 if test "${enable_reentrant+set}" = set; then
13278   enableval="$enable_reentrant"
13279   with_reentrant=$enableval
13280 else
13281   with_reentrant=no
13282 fi;
13283 echo "$as_me:13283: result: $with_reentrant" >&5
13284 echo "${ECHO_T}$with_reentrant" >&6
13285 if test "x$with_reentrant" = xyes ; then
13286         cf_cv_enable_reentrant=1
13287         cf_cv_enable_opaque="NCURSES_INTERNALS"
13288         NCURSES_SIZE_T=int
13289         if test "x$cf_cv_weak_symbols" = xyes ; then
13290
13291 # remove pthread library from $LIBS
13292 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13293
13294 cf_add_libs="-lpthread"
13295 # Filter out duplicates - this happens with badly-designed ".pc" files...
13296 for cf_add_1lib in $TEST_LIBS
13297 do
13298         for cf_add_2lib in $cf_add_libs
13299         do
13300                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13301                 then
13302                         cf_add_1lib=
13303                         break
13304                 fi
13305         done
13306         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13307 done
13308 TEST_LIBS="$cf_add_libs"
13309
13310 cf_add_libs="-lpthread"
13311 # Filter out duplicates - this happens with badly-designed ".pc" files...
13312 for cf_add_1lib in $TEST_LIBS2
13313 do
13314         for cf_add_2lib in $cf_add_libs
13315         do
13316                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13317                 then
13318                         cf_add_1lib=
13319                         break
13320                 fi
13321         done
13322         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13323 done
13324 TEST_LIBS2="$cf_add_libs"
13325
13326         else
13327                 # when not using weak symbols but with_reentrant,
13328                 # add 't' to the library suffix on all platforms
13329                 # except cygwin, where we only do that if ALSO
13330                 # compiling with full thread support.
13331                 case "$host" in
13332                 (*cygwin* | *msys*)
13333                         if test "$with_pthread" = "yes" ; then
13334                                 if test "x$disable_lib_suffixes" = "xno" ; then
13335                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13336                                 fi
13337                         fi ;;
13338                 (*)
13339                         if test "x$disable_lib_suffixes" = "xno" ; then
13340                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13341                         fi
13342                         ;;
13343                 esac
13344         fi
13345
13346 cat >>confdefs.h <<\EOF
13347 #define USE_REENTRANT 1
13348 EOF
13349
13350 if test "${with_abi_version+set}" != set; then
13351         case $cf_cv_rel_version in
13352         (5.*)
13353                 cf_cv_rel_version=6.0
13354                 cf_cv_abi_version=6
13355                 { echo "$as_me:13355: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13356 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13357                 ;;
13358         esac
13359 fi
13360
13361 else
13362         cf_cv_enable_reentrant=0
13363         cf_cv_enable_opaque="NCURSES_OPAQUE"
13364         NCURSES_SIZE_T=short
13365 fi
13366
13367 echo "$as_me:13367: checking if you want opaque curses-library structures" >&5
13368 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13369
13370 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13371 if test "${enable_opaque_curses+set}" = set; then
13372   enableval="$enable_opaque_curses"
13373   test "$enableval" != yes && enableval=no
13374         if test "$enableval" != "no" ; then
13375     enable_opaque_curses=yes
13376         else
13377
13378          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13379          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13380
13381         fi
13382 else
13383   enableval=no
13384
13385          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13386          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13387
13388 fi;
13389 echo "$as_me:13389: result: $enable_opaque_curses" >&5
13390 echo "${ECHO_T}$enable_opaque_curses" >&6
13391
13392 test "$cf_cv_enable_reentrant" = 1 && \
13393 test "$enable_opaque_curses" = no && \
13394 { { echo "$as_me:13394: error: reentrant configuration requires opaque library" >&5
13395 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13396    { (exit 1); exit 1; }; }
13397
13398 echo "$as_me:13398: checking if you want opaque form-library structures" >&5
13399 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13400
13401 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13402 if test "${enable_opaque_form+set}" = set; then
13403   enableval="$enable_opaque_form"
13404   enable_opaque_form=yes
13405 else
13406   enable_opaque_form=no
13407 fi;
13408 echo "$as_me:13408: result: $enable_opaque_form" >&5
13409 echo "${ECHO_T}$enable_opaque_form" >&6
13410
13411 echo "$as_me:13411: checking if you want opaque menu-library structures" >&5
13412 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13413
13414 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13415 if test "${enable_opaque_menu+set}" = set; then
13416   enableval="$enable_opaque_menu"
13417   enable_opaque_menu=yes
13418 else
13419   enable_opaque_menu=no
13420 fi;
13421 echo "$as_me:13421: result: $enable_opaque_menu" >&5
13422 echo "${ECHO_T}$enable_opaque_menu" >&6
13423
13424 echo "$as_me:13424: checking if you want opaque panel-library structures" >&5
13425 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13426
13427 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13428 if test "${enable_opaque_panel+set}" = set; then
13429   enableval="$enable_opaque_panel"
13430   enable_opaque_panel=yes
13431 else
13432   enable_opaque_panel=no
13433 fi;
13434 echo "$as_me:13434: result: $enable_opaque_panel" >&5
13435 echo "${ECHO_T}$enable_opaque_panel" >&6
13436
13437 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13438 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13439 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13440 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13441
13442 ### Allow using a different wrap-prefix
13443 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13444         echo "$as_me:13444: checking for prefix used to wrap public variables" >&5
13445 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13446
13447 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13448 if test "${with_wrap_prefix+set}" = set; then
13449   withval="$with_wrap_prefix"
13450   NCURSES_WRAP_PREFIX=$withval
13451 else
13452   NCURSES_WRAP_PREFIX=_nc_
13453 fi;
13454         echo "$as_me:13454: result: $NCURSES_WRAP_PREFIX" >&5
13455 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13456 else
13457         NCURSES_WRAP_PREFIX=_nc_
13458 fi
13459
13460 cat >>confdefs.h <<EOF
13461 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13462 EOF
13463
13464 ###############################################################################
13465 # These options are relatively safe to experiment with.
13466
13467 echo "$as_me:13467: checking if you want all development code" >&5
13468 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13469
13470 # Check whether --with-develop or --without-develop was given.
13471 if test "${with_develop+set}" = set; then
13472   withval="$with_develop"
13473   with_develop=$withval
13474 else
13475   with_develop=no
13476 fi;
13477 echo "$as_me:13477: result: $with_develop" >&5
13478 echo "${ECHO_T}$with_develop" >&6
13479
13480 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13481 echo "$as_me:13481: checking if you want hard-tabs code" >&5
13482 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13483
13484 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13485 if test "${enable_hard_tabs+set}" = set; then
13486   enableval="$enable_hard_tabs"
13487
13488 else
13489   enable_hard_tabs=$with_develop
13490 fi;
13491 echo "$as_me:13491: result: $enable_hard_tabs" >&5
13492 echo "${ECHO_T}$enable_hard_tabs" >&6
13493 test "x$enable_hard_tabs" = xyes &&
13494 cat >>confdefs.h <<\EOF
13495 #define USE_HARD_TABS 1
13496 EOF
13497
13498 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13499 echo "$as_me:13499: checking if you want limited support for xmc" >&5
13500 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13501
13502 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13503 if test "${enable_xmc_glitch+set}" = set; then
13504   enableval="$enable_xmc_glitch"
13505
13506 else
13507   enable_xmc_glitch=$with_develop
13508 fi;
13509 echo "$as_me:13509: result: $enable_xmc_glitch" >&5
13510 echo "${ECHO_T}$enable_xmc_glitch" >&6
13511 test "x$enable_xmc_glitch" = xyes &&
13512 cat >>confdefs.h <<\EOF
13513 #define USE_XMC_SUPPORT 1
13514 EOF
13515
13516 ###############################################################################
13517 # These are just experimental, probably should not be in a package:
13518
13519 echo "$as_me:13519: checking if you do not want to assume colors are white-on-black" >&5
13520 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13521
13522 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13523 if test "${enable_assumed_color+set}" = set; then
13524   enableval="$enable_assumed_color"
13525   with_assumed_color=$enableval
13526 else
13527   with_assumed_color=yes
13528 fi;
13529 echo "$as_me:13529: result: $with_assumed_color" >&5
13530 echo "${ECHO_T}$with_assumed_color" >&6
13531 test "x$with_assumed_color" = xyes &&
13532 cat >>confdefs.h <<\EOF
13533 #define USE_ASSUMED_COLOR 1
13534 EOF
13535
13536 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13537 echo "$as_me:13537: checking if you want hashmap scrolling-optimization code" >&5
13538 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13539
13540 # Check whether --enable-hashmap or --disable-hashmap was given.
13541 if test "${enable_hashmap+set}" = set; then
13542   enableval="$enable_hashmap"
13543   with_hashmap=$enableval
13544 else
13545   with_hashmap=yes
13546 fi;
13547 echo "$as_me:13547: result: $with_hashmap" >&5
13548 echo "${ECHO_T}$with_hashmap" >&6
13549 test "x$with_hashmap" = xyes &&
13550 cat >>confdefs.h <<\EOF
13551 #define USE_HASHMAP 1
13552 EOF
13553
13554 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13555 echo "$as_me:13555: checking if you want colorfgbg code" >&5
13556 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13557
13558 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13559 if test "${enable_colorfgbg+set}" = set; then
13560   enableval="$enable_colorfgbg"
13561   with_colorfgbg=$enableval
13562 else
13563   with_colorfgbg=no
13564 fi;
13565 echo "$as_me:13565: result: $with_colorfgbg" >&5
13566 echo "${ECHO_T}$with_colorfgbg" >&6
13567 test "x$with_colorfgbg" = xyes &&
13568 cat >>confdefs.h <<\EOF
13569 #define USE_COLORFGBG 1
13570 EOF
13571
13572 ###   use option --enable-interop to turn on use of bindings used for interop
13573 echo "$as_me:13573: checking if you want interop bindings" >&5
13574 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13575
13576 # Check whether --enable-interop or --disable-interop was given.
13577 if test "${enable_interop+set}" = set; then
13578   enableval="$enable_interop"
13579   with_exp_interop=$enableval
13580 else
13581   with_exp_interop=$cf_dft_interop
13582 fi;
13583 echo "$as_me:13583: result: $with_exp_interop" >&5
13584 echo "${ECHO_T}$with_exp_interop" >&6
13585
13586 NCURSES_INTEROP_FUNCS=0
13587 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13588
13589 echo "$as_me:13589: checking if you want experimental safe-sprintf code" >&5
13590 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13591
13592 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13593 if test "${enable_safe_sprintf+set}" = set; then
13594   enableval="$enable_safe_sprintf"
13595   with_safe_sprintf=$enableval
13596 else
13597   with_safe_sprintf=no
13598 fi;
13599 echo "$as_me:13599: result: $with_safe_sprintf" >&5
13600 echo "${ECHO_T}$with_safe_sprintf" >&6
13601 test "x$with_safe_sprintf" = xyes &&
13602 cat >>confdefs.h <<\EOF
13603 #define USE_SAFE_SPRINTF 1
13604 EOF
13605
13606 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13607 # when hashmap is used scroll hints are useless
13608 if test "$with_hashmap" = no ; then
13609 echo "$as_me:13609: checking if you want to experiment without scrolling-hints code" >&5
13610 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13611
13612 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13613 if test "${enable_scroll_hints+set}" = set; then
13614   enableval="$enable_scroll_hints"
13615   with_scroll_hints=$enableval
13616 else
13617   with_scroll_hints=yes
13618 fi;
13619 echo "$as_me:13619: result: $with_scroll_hints" >&5
13620 echo "${ECHO_T}$with_scroll_hints" >&6
13621 test "x$with_scroll_hints" = xyes &&
13622 cat >>confdefs.h <<\EOF
13623 #define USE_SCROLL_HINTS 1
13624 EOF
13625
13626 fi
13627
13628 echo "$as_me:13628: checking if you want wgetch-events code" >&5
13629 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13630
13631 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13632 if test "${enable_wgetch_events+set}" = set; then
13633   enableval="$enable_wgetch_events"
13634   with_wgetch_events=$enableval
13635 else
13636   with_wgetch_events=no
13637 fi;
13638 echo "$as_me:13638: result: $with_wgetch_events" >&5
13639 echo "${ECHO_T}$with_wgetch_events" >&6
13640 test "x$with_wgetch_events" = xyes &&
13641 cat >>confdefs.h <<\EOF
13642 #define NCURSES_WGETCH_EVENTS 1
13643 EOF
13644
13645 ###############################################################################
13646
13647 ###     use option --disable-echo to suppress full display compiling commands
13648
13649 echo "$as_me:13649: checking if you want to see long compiling messages" >&5
13650 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13651
13652 # Check whether --enable-echo or --disable-echo was given.
13653 if test "${enable_echo+set}" = set; then
13654   enableval="$enable_echo"
13655   test "$enableval" != no && enableval=yes
13656         if test "$enableval" != "yes" ; then
13657
13658         ECHO_LT='--silent'
13659         ECHO_LD='@echo linking $@;'
13660         RULE_CC='@echo compiling $<'
13661         SHOW_CC='@echo compiling $@'
13662         ECHO_CC='@'
13663
13664         else
13665
13666         ECHO_LT=''
13667         ECHO_LD=''
13668         RULE_CC=''
13669         SHOW_CC=''
13670         ECHO_CC=''
13671
13672         fi
13673 else
13674   enableval=yes
13675
13676         ECHO_LT=''
13677         ECHO_LD=''
13678         RULE_CC=''
13679         SHOW_CC=''
13680         ECHO_CC=''
13681
13682 fi;
13683 echo "$as_me:13683: result: $enableval" >&5
13684 echo "${ECHO_T}$enableval" >&6
13685
13686 if test "x$enable_echo" = xyes; then
13687         ECHO_LINK=
13688 else
13689         ECHO_LINK='@ echo linking $@ ... ;'
13690         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13691         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13692 fi
13693
13694 ###     use option --enable-warnings to turn on all gcc warnings
13695 echo "$as_me:13695: checking if you want to see compiler warnings" >&5
13696 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13697
13698 # Check whether --enable-warnings or --disable-warnings was given.
13699 if test "${enable_warnings+set}" = set; then
13700   enableval="$enable_warnings"
13701   with_warnings=$enableval
13702 fi;
13703 echo "$as_me:13703: result: $with_warnings" >&5
13704 echo "${ECHO_T}$with_warnings" >&6
13705
13706 if test "x$with_warnings" = "xyes"; then
13707
13708         ADAFLAGS="$ADAFLAGS -gnatg"
13709
13710 INTEL_COMPILER=no
13711
13712 if test "$GCC" = yes ; then
13713         case $host_os in
13714         (linux*|gnu*)
13715                 echo "$as_me:13715: checking if this is really Intel C compiler" >&5
13716 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13717                 cf_save_CFLAGS="$CFLAGS"
13718                 CFLAGS="$CFLAGS -no-gcc"
13719                 cat >conftest.$ac_ext <<_ACEOF
13720 #line 13720 "configure"
13721 #include "confdefs.h"
13722
13723 int
13724 main (void)
13725 {
13726
13727 #ifdef __INTEL_COMPILER
13728 #else
13729 make an error
13730 #endif
13731
13732   ;
13733   return 0;
13734 }
13735 _ACEOF
13736 rm -f conftest.$ac_objext
13737 if { (eval echo "$as_me:13737: \"$ac_compile\"") >&5
13738   (eval $ac_compile) 2>&5
13739   ac_status=$?
13740   echo "$as_me:13740: \$? = $ac_status" >&5
13741   (exit $ac_status); } &&
13742          { ac_try='test -s conftest.$ac_objext'
13743   { (eval echo "$as_me:13743: \"$ac_try\"") >&5
13744   (eval $ac_try) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit $ac_status); }; }; then
13748   INTEL_COMPILER=yes
13749 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13750
13751 else
13752   echo "$as_me: failed program was:" >&5
13753 cat conftest.$ac_ext >&5
13754 fi
13755 rm -f conftest.$ac_objext conftest.$ac_ext
13756                 CFLAGS="$cf_save_CFLAGS"
13757                 echo "$as_me:13757: result: $INTEL_COMPILER" >&5
13758 echo "${ECHO_T}$INTEL_COMPILER" >&6
13759                 ;;
13760         esac
13761 fi
13762
13763 CLANG_COMPILER=no
13764
13765 if test "$GCC" = yes ; then
13766         echo "$as_me:13766: checking if this is really Clang C compiler" >&5
13767 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13768         cf_save_CFLAGS="$CFLAGS"
13769         CFLAGS="$CFLAGS -Qunused-arguments"
13770         cat >conftest.$ac_ext <<_ACEOF
13771 #line 13771 "configure"
13772 #include "confdefs.h"
13773
13774 int
13775 main (void)
13776 {
13777
13778 #ifdef __clang__
13779 #else
13780 make an error
13781 #endif
13782
13783   ;
13784   return 0;
13785 }
13786 _ACEOF
13787 rm -f conftest.$ac_objext
13788 if { (eval echo "$as_me:13788: \"$ac_compile\"") >&5
13789   (eval $ac_compile) 2>&5
13790   ac_status=$?
13791   echo "$as_me:13791: \$? = $ac_status" >&5
13792   (exit $ac_status); } &&
13793          { ac_try='test -s conftest.$ac_objext'
13794   { (eval echo "$as_me:13794: \"$ac_try\"") >&5
13795   (eval $ac_try) 2>&5
13796   ac_status=$?
13797   echo "$as_me:13797: \$? = $ac_status" >&5
13798   (exit $ac_status); }; }; then
13799   CLANG_COMPILER=yes
13800 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13801
13802 else
13803   echo "$as_me: failed program was:" >&5
13804 cat conftest.$ac_ext >&5
13805 fi
13806 rm -f conftest.$ac_objext conftest.$ac_ext
13807         CFLAGS="$cf_save_CFLAGS"
13808         echo "$as_me:13808: result: $CLANG_COMPILER" >&5
13809 echo "${ECHO_T}$CLANG_COMPILER" >&6
13810 fi
13811
13812 cat > conftest.$ac_ext <<EOF
13813 #line 13813 "${as_me:-configure}"
13814 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13815 EOF
13816
13817 if test "$INTEL_COMPILER" = yes
13818 then
13819 # The "-wdXXX" options suppress warnings:
13820 # remark #1419: external declaration in primary source file
13821 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13822 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13823 # remark #193: zero used for undefined preprocessing identifier
13824 # remark #593: variable "curs_sb_left_arrow" was set but never used
13825 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13826 # remark #869: parameter "tw" was never referenced
13827 # remark #981: operands are evaluated in unspecified order
13828 # warning #279: controlling expression is constant
13829
13830         { echo "$as_me:13830: checking for $CC warning options..." >&5
13831 echo "$as_me: checking for $CC warning options..." >&6;}
13832         cf_save_CFLAGS="$CFLAGS"
13833         EXTRA_CFLAGS="-Wall"
13834         for cf_opt in \
13835                 wd1419 \
13836                 wd1683 \
13837                 wd1684 \
13838                 wd193 \
13839                 wd593 \
13840                 wd279 \
13841                 wd810 \
13842                 wd869 \
13843                 wd981
13844         do
13845                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13846                 if { (eval echo "$as_me:13846: \"$ac_compile\"") >&5
13847   (eval $ac_compile) 2>&5
13848   ac_status=$?
13849   echo "$as_me:13849: \$? = $ac_status" >&5
13850   (exit $ac_status); }; then
13851                         test -n "$verbose" && echo "$as_me:13851: result: ... -$cf_opt" >&5
13852 echo "${ECHO_T}... -$cf_opt" >&6
13853                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13854                 fi
13855         done
13856         CFLAGS="$cf_save_CFLAGS"
13857
13858 elif test "$GCC" = yes
13859 then
13860         { echo "$as_me:13860: checking for $CC warning options..." >&5
13861 echo "$as_me: checking for $CC warning options..." >&6;}
13862         cf_save_CFLAGS="$CFLAGS"
13863         EXTRA_CFLAGS=
13864         cf_warn_CONST=""
13865         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13866         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13867         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13868         for cf_opt in W Wall \
13869                 Wbad-function-cast \
13870                 Wcast-align \
13871                 Wcast-qual \
13872                 Wdeclaration-after-statement \
13873                 Wextra \
13874                 Winline \
13875                 Wmissing-declarations \
13876                 Wmissing-prototypes \
13877                 Wnested-externs \
13878                 Wpointer-arith \
13879                 Wshadow \
13880                 Wstrict-prototypes \
13881                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13882         do
13883                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13884                 if { (eval echo "$as_me:13884: \"$ac_compile\"") >&5
13885   (eval $ac_compile) 2>&5
13886   ac_status=$?
13887   echo "$as_me:13887: \$? = $ac_status" >&5
13888   (exit $ac_status); }; then
13889                         test -n "$verbose" && echo "$as_me:13889: result: ... -$cf_opt" >&5
13890 echo "${ECHO_T}... -$cf_opt" >&6
13891                         case $cf_opt in
13892                         (Wcast-qual)
13893                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13894                                 ;;
13895                         (Winline)
13896                                 case $GCC_VERSION in
13897                                 ([34].*)
13898                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13899
13900 echo "${as_me:-configure}:13900: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13901
13902                                         continue;;
13903                                 esac
13904                                 ;;
13905                         (Wpointer-arith)
13906                                 case $GCC_VERSION in
13907                                 ([12].*)
13908                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13909
13910 echo "${as_me:-configure}:13910: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13911
13912                                         continue;;
13913                                 esac
13914                                 ;;
13915                         esac
13916                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13917                 fi
13918         done
13919         CFLAGS="$cf_save_CFLAGS"
13920 fi
13921 rm -rf conftest*
13922
13923         if test "x$cf_with_cxx" = xyes ; then
13924
13925 INTEL_CPLUSPLUS=no
13926
13927 if test "$GCC" = yes ; then
13928         case $host_os in
13929         (linux*|gnu*)
13930                 echo "$as_me:13930: checking if this is really Intel C++ compiler" >&5
13931 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13932                 cf_save_CFLAGS="$CXXFLAGS"
13933                 CXXFLAGS="$CXXFLAGS -no-gcc"
13934                 cat >conftest.$ac_ext <<_ACEOF
13935 #line 13935 "configure"
13936 #include "confdefs.h"
13937
13938 int
13939 main (void)
13940 {
13941
13942 #ifdef __INTEL_COMPILER
13943 #else
13944 make an error
13945 #endif
13946
13947   ;
13948   return 0;
13949 }
13950 _ACEOF
13951 rm -f conftest.$ac_objext
13952 if { (eval echo "$as_me:13952: \"$ac_compile\"") >&5
13953   (eval $ac_compile) 2>&5
13954   ac_status=$?
13955   echo "$as_me:13955: \$? = $ac_status" >&5
13956   (exit $ac_status); } &&
13957          { ac_try='test -s conftest.$ac_objext'
13958   { (eval echo "$as_me:13958: \"$ac_try\"") >&5
13959   (eval $ac_try) 2>&5
13960   ac_status=$?
13961   echo "$as_me:13961: \$? = $ac_status" >&5
13962   (exit $ac_status); }; }; then
13963   INTEL_CPLUSPLUS=yes
13964 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13965
13966 else
13967   echo "$as_me: failed program was:" >&5
13968 cat conftest.$ac_ext >&5
13969 fi
13970 rm -f conftest.$ac_objext conftest.$ac_ext
13971                 CXXFLAGS="$cf_save_CFLAGS"
13972                 echo "$as_me:13972: result: $INTEL_CPLUSPLUS" >&5
13973 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13974                 ;;
13975         esac
13976 fi
13977
13978 CLANG_CPLUSPLUS=no
13979
13980 if test "$GCC" = yes ; then
13981         echo "$as_me:13981: checking if this is really Clang C++ compiler" >&5
13982 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13983         cf_save_CFLAGS="$CXXFLAGS"
13984         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13985         cat >conftest.$ac_ext <<_ACEOF
13986 #line 13986 "configure"
13987 #include "confdefs.h"
13988
13989 int
13990 main (void)
13991 {
13992
13993 #ifdef __clang__
13994 #else
13995 make an error
13996 #endif
13997
13998   ;
13999   return 0;
14000 }
14001 _ACEOF
14002 rm -f conftest.$ac_objext
14003 if { (eval echo "$as_me:14003: \"$ac_compile\"") >&5
14004   (eval $ac_compile) 2>&5
14005   ac_status=$?
14006   echo "$as_me:14006: \$? = $ac_status" >&5
14007   (exit $ac_status); } &&
14008          { ac_try='test -s conftest.$ac_objext'
14009   { (eval echo "$as_me:14009: \"$ac_try\"") >&5
14010   (eval $ac_try) 2>&5
14011   ac_status=$?
14012   echo "$as_me:14012: \$? = $ac_status" >&5
14013   (exit $ac_status); }; }; then
14014   CLANG_CPLUSPLUS=yes
14015 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14016
14017 else
14018   echo "$as_me: failed program was:" >&5
14019 cat conftest.$ac_ext >&5
14020 fi
14021 rm -f conftest.$ac_objext conftest.$ac_ext
14022         CXXFLAGS="$cf_save_CFLAGS"
14023         echo "$as_me:14023: result: $CLANG_CPLUSPLUS" >&5
14024 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
14025 fi
14026
14027 ac_ext=cc
14028 ac_cpp='$CXXCPP $CPPFLAGS'
14029 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14030 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14031 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14032 ac_main_return=return
14033
14034 cat > conftest.$ac_ext <<EOF
14035 #line 14035 "configure"
14036 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14037 EOF
14038
14039 if test "$INTEL_CPLUSPLUS" = yes
14040 then
14041 # The "-wdXXX" options suppress warnings:
14042 # remark #1419: external declaration in primary source file
14043 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14044 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14045 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14046 # remark #193: zero used for undefined preprocessing identifier
14047 # remark #593: variable "curs_sb_left_arrow" was set but never used
14048 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14049 # remark #869: parameter "tw" was never referenced
14050 # remark #981: operands are evaluated in unspecified order
14051 # warning #269: invalid format string conversion
14052
14053         { echo "$as_me:14053: checking for $CC warning options..." >&5
14054 echo "$as_me: checking for $CC warning options..." >&6;}
14055         cf_save_CXXFLAGS="$CXXFLAGS"
14056         EXTRA_CXXFLAGS="-Wall"
14057         for cf_opt in \
14058                 wd1419 \
14059                 wd1682 \
14060                 wd1683 \
14061                 wd1684 \
14062                 wd193 \
14063                 wd279 \
14064                 wd593 \
14065                 wd810 \
14066                 wd869 \
14067                 wd981
14068         do
14069                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
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); }; then
14075                         test -n "$verbose" && echo "$as_me:14075: result: ... -$cf_opt" >&5
14076 echo "${ECHO_T}... -$cf_opt" >&6
14077                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14078                 fi
14079         done
14080         CXXFLAGS="$cf_save_CXXFLAGS"
14081
14082 elif test "$GXX" = yes
14083 then
14084         { echo "$as_me:14084: checking for $CXX warning options..." >&5
14085 echo "$as_me: checking for $CXX warning options..." >&6;}
14086         cf_save_CXXFLAGS="$CXXFLAGS"
14087         EXTRA_CXXFLAGS="-W -Wall"
14088         cf_gxx_extra_warnings=""
14089         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
14090         case "$GCC_VERSION" in
14091         ([1-2].*)
14092                 ;;
14093         (*)
14094                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
14095                 ;;
14096         esac
14097         for cf_opt in \
14098                 Wabi \
14099                 fabi-version=0 \
14100                 Wextra \
14101                 Wignored-qualifiers \
14102                 Wlogical-op \
14103                 Woverloaded-virtual \
14104                 Wsign-promo \
14105                 Wsynth \
14106                 Wold-style-cast \
14107                 Wcast-align \
14108                 Wcast-qual \
14109                 Wpointer-arith \
14110                 Wshadow \
14111                 Wundef $cf_gxx_extra_warnings Wno-unused
14112         do
14113                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14114                 if { (eval echo "$as_me:14114: \"$ac_compile\"") >&5
14115   (eval $ac_compile) 2>&5
14116   ac_status=$?
14117   echo "$as_me:14117: \$? = $ac_status" >&5
14118   (exit $ac_status); }; then
14119                         test -n "$verbose" && echo "$as_me:14119: result: ... -$cf_opt" >&5
14120 echo "${ECHO_T}... -$cf_opt" >&6
14121                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14122                 else
14123                         test -n "$verbose" && echo "$as_me:14123: result: ... no -$cf_opt" >&5
14124 echo "${ECHO_T}... no -$cf_opt" >&6
14125                 fi
14126         done
14127         CXXFLAGS="$cf_save_CXXFLAGS"
14128 fi
14129
14130 rm -rf conftest*
14131 ac_ext=c
14132 ac_cpp='$CPP $CPPFLAGS'
14133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14136 ac_main_return=return
14137
14138         fi
14139 fi
14140
14141 if test "$GCC" = yes
14142 then
14143 cat > conftest.i <<EOF
14144 #ifndef GCC_PRINTF
14145 #define GCC_PRINTF 0
14146 #endif
14147 #ifndef GCC_SCANF
14148 #define GCC_SCANF 0
14149 #endif
14150 #ifndef GCC_NORETURN
14151 #define GCC_NORETURN /* nothing */
14152 #endif
14153 #ifndef GCC_UNUSED
14154 #define GCC_UNUSED /* nothing */
14155 #endif
14156 EOF
14157 if test "$GCC" = yes
14158 then
14159         { echo "$as_me:14159: checking for $CC __attribute__ directives..." >&5
14160 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14161 cat > conftest.$ac_ext <<EOF
14162 #line 14162 "${as_me:-configure}"
14163 #include "confdefs.h"
14164 #include "conftest.h"
14165 #include "conftest.i"
14166 #if     GCC_PRINTF
14167 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14168 #else
14169 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14170 #endif
14171 #if     GCC_SCANF
14172 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14173 #else
14174 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14175 #endif
14176 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14177 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14178 extern void foo(void) GCC_NORETURN;
14179 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14180 EOF
14181         cf_printf_attribute=no
14182         cf_scanf_attribute=no
14183         for cf_attribute in scanf printf unused noreturn
14184         do
14185
14186 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14187
14188                 cf_directive="__attribute__(($cf_attribute))"
14189                 echo "checking for $CC $cf_directive" 1>&5
14190
14191                 case $cf_attribute in
14192                 (printf)
14193                         cf_printf_attribute=yes
14194                         cat >conftest.h <<EOF
14195 #define GCC_$cf_ATTRIBUTE 1
14196 EOF
14197                         ;;
14198                 (scanf)
14199                         cf_scanf_attribute=yes
14200                         cat >conftest.h <<EOF
14201 #define GCC_$cf_ATTRIBUTE 1
14202 EOF
14203                         ;;
14204                 (*)
14205                         cat >conftest.h <<EOF
14206 #define GCC_$cf_ATTRIBUTE $cf_directive
14207 EOF
14208                         ;;
14209                 esac
14210
14211                 if { (eval echo "$as_me:14211: \"$ac_compile\"") >&5
14212   (eval $ac_compile) 2>&5
14213   ac_status=$?
14214   echo "$as_me:14214: \$? = $ac_status" >&5
14215   (exit $ac_status); }; then
14216                         test -n "$verbose" && echo "$as_me:14216: result: ... $cf_attribute" >&5
14217 echo "${ECHO_T}... $cf_attribute" >&6
14218                         cat conftest.h >>confdefs.h
14219                         case $cf_attribute in
14220                         (noreturn)
14221
14222 cat >>confdefs.h <<EOF
14223 #define GCC_NORETURN $cf_directive
14224 EOF
14225
14226                                 ;;
14227                         (printf)
14228                                 cf_value='/* nothing */'
14229                                 if test "$cf_printf_attribute" != no ; then
14230                                         cf_value='__attribute__((format(printf,fmt,var)))'
14231
14232 cat >>confdefs.h <<\EOF
14233 #define GCC_PRINTF 1
14234 EOF
14235
14236                                 fi
14237
14238 cat >>confdefs.h <<EOF
14239 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14240 EOF
14241
14242                                 ;;
14243                         (scanf)
14244                                 cf_value='/* nothing */'
14245                                 if test "$cf_scanf_attribute" != no ; then
14246                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14247
14248 cat >>confdefs.h <<\EOF
14249 #define GCC_SCANF 1
14250 EOF
14251
14252                                 fi
14253
14254 cat >>confdefs.h <<EOF
14255 #define GCC_SCANFLIKE(fmt,var) $cf_value
14256 EOF
14257
14258                                 ;;
14259                         (unused)
14260
14261 cat >>confdefs.h <<EOF
14262 #define GCC_UNUSED $cf_directive
14263 EOF
14264
14265                                 ;;
14266                         esac
14267                 fi
14268         done
14269 else
14270         fgrep define conftest.i >>confdefs.h
14271 fi
14272 rm -rf conftest*
14273 fi
14274
14275 echo "$as_me:14275: checking if you want to work around bogus compiler/loader warnings" >&5
14276 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14277
14278 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14279 if test "${enable_string_hacks+set}" = set; then
14280   enableval="$enable_string_hacks"
14281   with_string_hacks=$enableval
14282 else
14283   with_string_hacks=no
14284 fi;
14285 echo "$as_me:14285: result: $with_string_hacks" >&5
14286 echo "${ECHO_T}$with_string_hacks" >&6
14287
14288 if test "x$with_string_hacks" = "xyes"; then
14289
14290 cat >>confdefs.h <<\EOF
14291 #define USE_STRING_HACKS 1
14292 EOF
14293
14294         { echo "$as_me:14294: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14295 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14296         echo "$as_me:14296: checking for strlcat" >&5
14297 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14298 if test "${ac_cv_func_strlcat+set}" = set; then
14299   echo $ECHO_N "(cached) $ECHO_C" >&6
14300 else
14301   cat >conftest.$ac_ext <<_ACEOF
14302 #line 14302 "configure"
14303 #include "confdefs.h"
14304 /* System header to define __stub macros and hopefully few prototypes,
14305     which can conflict with char strlcat (); below.  */
14306 #include <assert.h>
14307 /* Override any gcc2 internal prototype to avoid an error.  */
14308 #ifdef __cplusplus
14309 extern "C"
14310 #endif
14311 /* We use char because int might match the return type of a gcc2
14312    builtin and then its argument prototype would still apply.  */
14313 char strlcat ();
14314 char (*f) ();
14315
14316 int
14317 main (void)
14318 {
14319 /* The GNU C library defines this for functions which it implements
14320     to always fail with ENOSYS.  Some functions are actually named
14321     something starting with __ and the normal name is an alias.  */
14322 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14323 choke me
14324 #else
14325 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14326 #endif
14327
14328   ;
14329   return 0;
14330 }
14331 _ACEOF
14332 rm -f conftest.$ac_objext conftest$ac_exeext
14333 if { (eval echo "$as_me:14333: \"$ac_link\"") >&5
14334   (eval $ac_link) 2>&5
14335   ac_status=$?
14336   echo "$as_me:14336: \$? = $ac_status" >&5
14337   (exit $ac_status); } &&
14338          { ac_try='test -s conftest$ac_exeext'
14339   { (eval echo "$as_me:14339: \"$ac_try\"") >&5
14340   (eval $ac_try) 2>&5
14341   ac_status=$?
14342   echo "$as_me:14342: \$? = $ac_status" >&5
14343   (exit $ac_status); }; }; then
14344   ac_cv_func_strlcat=yes
14345 else
14346   echo "$as_me: failed program was:" >&5
14347 cat conftest.$ac_ext >&5
14348 ac_cv_func_strlcat=no
14349 fi
14350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14351 fi
14352 echo "$as_me:14352: result: $ac_cv_func_strlcat" >&5
14353 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14354 if test $ac_cv_func_strlcat = yes; then
14355
14356 cat >>confdefs.h <<\EOF
14357 #define HAVE_STRLCAT 1
14358 EOF
14359
14360 else
14361
14362                 echo "$as_me:14362: checking for strlcat in -lbsd" >&5
14363 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14364 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14365   echo $ECHO_N "(cached) $ECHO_C" >&6
14366 else
14367   ac_check_lib_save_LIBS=$LIBS
14368 LIBS="-lbsd  $LIBS"
14369 cat >conftest.$ac_ext <<_ACEOF
14370 #line 14370 "configure"
14371 #include "confdefs.h"
14372
14373 /* Override any gcc2 internal prototype to avoid an error.  */
14374 #ifdef __cplusplus
14375 extern "C"
14376 #endif
14377 /* We use char because int might match the return type of a gcc2
14378    builtin and then its argument prototype would still apply.  */
14379 char strlcat ();
14380 int
14381 main (void)
14382 {
14383 strlcat ();
14384   ;
14385   return 0;
14386 }
14387 _ACEOF
14388 rm -f conftest.$ac_objext conftest$ac_exeext
14389 if { (eval echo "$as_me:14389: \"$ac_link\"") >&5
14390   (eval $ac_link) 2>&5
14391   ac_status=$?
14392   echo "$as_me:14392: \$? = $ac_status" >&5
14393   (exit $ac_status); } &&
14394          { ac_try='test -s conftest$ac_exeext'
14395   { (eval echo "$as_me:14395: \"$ac_try\"") >&5
14396   (eval $ac_try) 2>&5
14397   ac_status=$?
14398   echo "$as_me:14398: \$? = $ac_status" >&5
14399   (exit $ac_status); }; }; then
14400   ac_cv_lib_bsd_strlcat=yes
14401 else
14402   echo "$as_me: failed program was:" >&5
14403 cat conftest.$ac_ext >&5
14404 ac_cv_lib_bsd_strlcat=no
14405 fi
14406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14407 LIBS=$ac_check_lib_save_LIBS
14408 fi
14409 echo "$as_me:14409: result: $ac_cv_lib_bsd_strlcat" >&5
14410 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14411 if test $ac_cv_lib_bsd_strlcat = yes; then
14412
14413 cf_add_libs="-lbsd"
14414 # Filter out duplicates - this happens with badly-designed ".pc" files...
14415 for cf_add_1lib in $LIBS
14416 do
14417         for cf_add_2lib in $cf_add_libs
14418         do
14419                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14420                 then
14421                         cf_add_1lib=
14422                         break
14423                 fi
14424         done
14425         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14426 done
14427 LIBS="$cf_add_libs"
14428
14429 for ac_header in bsd/string.h
14430 do
14431 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14432 echo "$as_me:14432: checking for $ac_header" >&5
14433 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14434 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14435   echo $ECHO_N "(cached) $ECHO_C" >&6
14436 else
14437   cat >conftest.$ac_ext <<_ACEOF
14438 #line 14438 "configure"
14439 #include "confdefs.h"
14440 #include <$ac_header>
14441 _ACEOF
14442 if { (eval echo "$as_me:14442: \"$ac_cpp conftest.$ac_ext\"") >&5
14443   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14444   ac_status=$?
14445   egrep -v '^ *\+' conftest.er1 >conftest.err
14446   rm -f conftest.er1
14447   cat conftest.err >&5
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); } >/dev/null; then
14450   if test -s conftest.err; then
14451     ac_cpp_err=$ac_c_preproc_warn_flag
14452   else
14453     ac_cpp_err=
14454   fi
14455 else
14456   ac_cpp_err=yes
14457 fi
14458 if test -z "$ac_cpp_err"; then
14459   eval "$as_ac_Header=yes"
14460 else
14461   echo "$as_me: failed program was:" >&5
14462   cat conftest.$ac_ext >&5
14463   eval "$as_ac_Header=no"
14464 fi
14465 rm -f conftest.err conftest.$ac_ext
14466 fi
14467 echo "$as_me:14467: result: `eval echo '${'$as_ac_Header'}'`" >&5
14468 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14469 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14470   cat >>confdefs.h <<EOF
14471 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14472 EOF
14473
14474 fi
14475 done
14476
14477 cat >>confdefs.h <<\EOF
14478 #define HAVE_STRLCAT 1
14479 EOF
14480
14481 fi
14482
14483 fi
14484
14485 for ac_func in strlcpy snprintf
14486 do
14487 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14488 echo "$as_me:14488: checking for $ac_func" >&5
14489 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14490 if eval "test \"\${$as_ac_var+set}\" = set"; then
14491   echo $ECHO_N "(cached) $ECHO_C" >&6
14492 else
14493   cat >conftest.$ac_ext <<_ACEOF
14494 #line 14494 "configure"
14495 #include "confdefs.h"
14496 /* System header to define __stub macros and hopefully few prototypes,
14497     which can conflict with char $ac_func (); below.  */
14498 #include <assert.h>
14499 /* Override any gcc2 internal prototype to avoid an error.  */
14500 #ifdef __cplusplus
14501 extern "C"
14502 #endif
14503 /* We use char because int might match the return type of a gcc2
14504    builtin and then its argument prototype would still apply.  */
14505 char $ac_func ();
14506 char (*f) ();
14507
14508 int
14509 main (void)
14510 {
14511 /* The GNU C library defines this for functions which it implements
14512     to always fail with ENOSYS.  Some functions are actually named
14513     something starting with __ and the normal name is an alias.  */
14514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14515 choke me
14516 #else
14517 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14518 #endif
14519
14520   ;
14521   return 0;
14522 }
14523 _ACEOF
14524 rm -f conftest.$ac_objext conftest$ac_exeext
14525 if { (eval echo "$as_me:14525: \"$ac_link\"") >&5
14526   (eval $ac_link) 2>&5
14527   ac_status=$?
14528   echo "$as_me:14528: \$? = $ac_status" >&5
14529   (exit $ac_status); } &&
14530          { ac_try='test -s conftest$ac_exeext'
14531   { (eval echo "$as_me:14531: \"$ac_try\"") >&5
14532   (eval $ac_try) 2>&5
14533   ac_status=$?
14534   echo "$as_me:14534: \$? = $ac_status" >&5
14535   (exit $ac_status); }; }; then
14536   eval "$as_ac_var=yes"
14537 else
14538   echo "$as_me: failed program was:" >&5
14539 cat conftest.$ac_ext >&5
14540 eval "$as_ac_var=no"
14541 fi
14542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14543 fi
14544 echo "$as_me:14544: result: `eval echo '${'$as_ac_var'}'`" >&5
14545 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14546 if test `eval echo '${'$as_ac_var'}'` = yes; then
14547   cat >>confdefs.h <<EOF
14548 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14549 EOF
14550
14551 fi
14552 done
14553
14554 fi
14555
14556 ###     use option --enable-assertions to turn on generation of assertion code
14557 echo "$as_me:14557: checking if you want to enable runtime assertions" >&5
14558 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14559
14560 # Check whether --enable-assertions or --disable-assertions was given.
14561 if test "${enable_assertions+set}" = set; then
14562   enableval="$enable_assertions"
14563   with_assertions=$enableval
14564 else
14565   with_assertions=no
14566 fi;
14567 echo "$as_me:14567: result: $with_assertions" >&5
14568 echo "${ECHO_T}$with_assertions" >&6
14569 if test -n "$GCC"
14570 then
14571         if test "$with_assertions" = no
14572         then
14573                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14574         else
14575
14576         ADAFLAGS="$ADAFLAGS -gnata"
14577
14578         fi
14579 fi
14580
14581 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14582
14583 echo "$as_me:14583: checking if you want to use dmalloc for testing" >&5
14584 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14585
14586 # Check whether --with-dmalloc or --without-dmalloc was given.
14587 if test "${with_dmalloc+set}" = set; then
14588   withval="$with_dmalloc"
14589
14590 cat >>confdefs.h <<EOF
14591 #define USE_DMALLOC 1
14592 EOF
14593
14594         : ${with_cflags:=-g}
14595         : ${with_no_leaks:=yes}
14596          with_dmalloc=yes
14597 else
14598   with_dmalloc=
14599 fi;
14600 echo "$as_me:14600: result: ${with_dmalloc:-no}" >&5
14601 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14602
14603 case .$with_cflags in
14604 (.*-g*)
14605         case .$CFLAGS in
14606         (.*-g*)
14607                 ;;
14608         (*)
14609
14610 cf_fix_cppflags=no
14611 cf_new_cflags=
14612 cf_new_cppflags=
14613 cf_new_extra_cppflags=
14614
14615 for cf_add_cflags in -g
14616 do
14617 case $cf_fix_cppflags in
14618 (no)
14619         case $cf_add_cflags in
14620         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14621                 case $cf_add_cflags in
14622                 (-D*)
14623                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14624
14625                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14626                                 && test -z "${cf_tst_cflags}" \
14627                                 && cf_fix_cppflags=yes
14628
14629                         if test $cf_fix_cppflags = yes ; then
14630
14631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14633
14634                                 continue
14635                         elif test "${cf_tst_cflags}" = "\"'" ; then
14636
14637         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14638         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14639
14640                                 continue
14641                         fi
14642                         ;;
14643                 esac
14644                 case "$CPPFLAGS" in
14645                 (*$cf_add_cflags)
14646                         ;;
14647                 (*)
14648                         case $cf_add_cflags in
14649                         (-D*)
14650                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14651
14652 CPPFLAGS=`echo "$CPPFLAGS" | \
14653         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14654                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14655
14656                                 ;;
14657                         esac
14658
14659         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14660         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14661
14662                         ;;
14663                 esac
14664                 ;;
14665         (*)
14666
14667         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14668         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14669
14670                 ;;
14671         esac
14672         ;;
14673 (yes)
14674
14675         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14676         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14677
14678         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14679
14680         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14681                 && test -z "${cf_tst_cflags}" \
14682                 && cf_fix_cppflags=no
14683         ;;
14684 esac
14685 done
14686
14687 if test -n "$cf_new_cflags" ; then
14688
14689         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14690         CFLAGS="${CFLAGS}$cf_new_cflags"
14691
14692 fi
14693
14694 if test -n "$cf_new_cppflags" ; then
14695
14696         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14697         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14698
14699 fi
14700
14701 if test -n "$cf_new_extra_cppflags" ; then
14702
14703         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14704         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14705
14706 fi
14707
14708                 ;;
14709         esac
14710         ;;
14711 esac
14712
14713 if test "$with_dmalloc" = yes ; then
14714         echo "$as_me:14714: checking for dmalloc.h" >&5
14715 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14716 if test "${ac_cv_header_dmalloc_h+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 <dmalloc.h>
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   ac_cv_header_dmalloc_h=yes
14742 else
14743   echo "$as_me: failed program was:" >&5
14744   cat conftest.$ac_ext >&5
14745   ac_cv_header_dmalloc_h=no
14746 fi
14747 rm -f conftest.err conftest.$ac_ext
14748 fi
14749 echo "$as_me:14749: result: $ac_cv_header_dmalloc_h" >&5
14750 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14751 if test $ac_cv_header_dmalloc_h = yes; then
14752
14753 echo "$as_me:14753: checking for dmalloc_debug in -ldmalloc" >&5
14754 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14755 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14756   echo $ECHO_N "(cached) $ECHO_C" >&6
14757 else
14758   ac_check_lib_save_LIBS=$LIBS
14759 LIBS="-ldmalloc  $LIBS"
14760 cat >conftest.$ac_ext <<_ACEOF
14761 #line 14761 "configure"
14762 #include "confdefs.h"
14763
14764 /* Override any gcc2 internal prototype to avoid an error.  */
14765 #ifdef __cplusplus
14766 extern "C"
14767 #endif
14768 /* We use char because int might match the return type of a gcc2
14769    builtin and then its argument prototype would still apply.  */
14770 char dmalloc_debug ();
14771 int
14772 main (void)
14773 {
14774 dmalloc_debug ();
14775   ;
14776   return 0;
14777 }
14778 _ACEOF
14779 rm -f conftest.$ac_objext conftest$ac_exeext
14780 if { (eval echo "$as_me:14780: \"$ac_link\"") >&5
14781   (eval $ac_link) 2>&5
14782   ac_status=$?
14783   echo "$as_me:14783: \$? = $ac_status" >&5
14784   (exit $ac_status); } &&
14785          { ac_try='test -s conftest$ac_exeext'
14786   { (eval echo "$as_me:14786: \"$ac_try\"") >&5
14787   (eval $ac_try) 2>&5
14788   ac_status=$?
14789   echo "$as_me:14789: \$? = $ac_status" >&5
14790   (exit $ac_status); }; }; then
14791   ac_cv_lib_dmalloc_dmalloc_debug=yes
14792 else
14793   echo "$as_me: failed program was:" >&5
14794 cat conftest.$ac_ext >&5
14795 ac_cv_lib_dmalloc_dmalloc_debug=no
14796 fi
14797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14798 LIBS=$ac_check_lib_save_LIBS
14799 fi
14800 echo "$as_me:14800: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14801 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14802 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14803   cat >>confdefs.h <<EOF
14804 #define HAVE_LIBDMALLOC 1
14805 EOF
14806
14807   LIBS="-ldmalloc $LIBS"
14808
14809 fi
14810
14811 fi
14812
14813 fi
14814
14815 echo "$as_me:14815: checking if you want to use dbmalloc for testing" >&5
14816 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14817
14818 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14819 if test "${with_dbmalloc+set}" = set; then
14820   withval="$with_dbmalloc"
14821
14822 cat >>confdefs.h <<EOF
14823 #define USE_DBMALLOC 1
14824 EOF
14825
14826         : ${with_cflags:=-g}
14827         : ${with_no_leaks:=yes}
14828          with_dbmalloc=yes
14829 else
14830   with_dbmalloc=
14831 fi;
14832 echo "$as_me:14832: result: ${with_dbmalloc:-no}" >&5
14833 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14834
14835 case .$with_cflags in
14836 (.*-g*)
14837         case .$CFLAGS in
14838         (.*-g*)
14839                 ;;
14840         (*)
14841
14842 cf_fix_cppflags=no
14843 cf_new_cflags=
14844 cf_new_cppflags=
14845 cf_new_extra_cppflags=
14846
14847 for cf_add_cflags in -g
14848 do
14849 case $cf_fix_cppflags in
14850 (no)
14851         case $cf_add_cflags in
14852         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14853                 case $cf_add_cflags in
14854                 (-D*)
14855                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14856
14857                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14858                                 && test -z "${cf_tst_cflags}" \
14859                                 && cf_fix_cppflags=yes
14860
14861                         if test $cf_fix_cppflags = yes ; then
14862
14863         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14864         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14865
14866                                 continue
14867                         elif test "${cf_tst_cflags}" = "\"'" ; then
14868
14869         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14870         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14871
14872                                 continue
14873                         fi
14874                         ;;
14875                 esac
14876                 case "$CPPFLAGS" in
14877                 (*$cf_add_cflags)
14878                         ;;
14879                 (*)
14880                         case $cf_add_cflags in
14881                         (-D*)
14882                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14883
14884 CPPFLAGS=`echo "$CPPFLAGS" | \
14885         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14886                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14887
14888                                 ;;
14889                         esac
14890
14891         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14892         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14893
14894                         ;;
14895                 esac
14896                 ;;
14897         (*)
14898
14899         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14900         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14901
14902                 ;;
14903         esac
14904         ;;
14905 (yes)
14906
14907         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14908         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14909
14910         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14911
14912         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14913                 && test -z "${cf_tst_cflags}" \
14914                 && cf_fix_cppflags=no
14915         ;;
14916 esac
14917 done
14918
14919 if test -n "$cf_new_cflags" ; then
14920
14921         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14922         CFLAGS="${CFLAGS}$cf_new_cflags"
14923
14924 fi
14925
14926 if test -n "$cf_new_cppflags" ; then
14927
14928         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14929         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14930
14931 fi
14932
14933 if test -n "$cf_new_extra_cppflags" ; then
14934
14935         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14936         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14937
14938 fi
14939
14940                 ;;
14941         esac
14942         ;;
14943 esac
14944
14945 if test "$with_dbmalloc" = yes ; then
14946         echo "$as_me:14946: checking for dbmalloc.h" >&5
14947 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14948 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14949   echo $ECHO_N "(cached) $ECHO_C" >&6
14950 else
14951   cat >conftest.$ac_ext <<_ACEOF
14952 #line 14952 "configure"
14953 #include "confdefs.h"
14954 #include <dbmalloc.h>
14955 _ACEOF
14956 if { (eval echo "$as_me:14956: \"$ac_cpp conftest.$ac_ext\"") >&5
14957   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14958   ac_status=$?
14959   egrep -v '^ *\+' conftest.er1 >conftest.err
14960   rm -f conftest.er1
14961   cat conftest.err >&5
14962   echo "$as_me:14962: \$? = $ac_status" >&5
14963   (exit $ac_status); } >/dev/null; then
14964   if test -s conftest.err; then
14965     ac_cpp_err=$ac_c_preproc_warn_flag
14966   else
14967     ac_cpp_err=
14968   fi
14969 else
14970   ac_cpp_err=yes
14971 fi
14972 if test -z "$ac_cpp_err"; then
14973   ac_cv_header_dbmalloc_h=yes
14974 else
14975   echo "$as_me: failed program was:" >&5
14976   cat conftest.$ac_ext >&5
14977   ac_cv_header_dbmalloc_h=no
14978 fi
14979 rm -f conftest.err conftest.$ac_ext
14980 fi
14981 echo "$as_me:14981: result: $ac_cv_header_dbmalloc_h" >&5
14982 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14983 if test $ac_cv_header_dbmalloc_h = yes; then
14984
14985 echo "$as_me:14985: checking for debug_malloc in -ldbmalloc" >&5
14986 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14987 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14988   echo $ECHO_N "(cached) $ECHO_C" >&6
14989 else
14990   ac_check_lib_save_LIBS=$LIBS
14991 LIBS="-ldbmalloc  $LIBS"
14992 cat >conftest.$ac_ext <<_ACEOF
14993 #line 14993 "configure"
14994 #include "confdefs.h"
14995
14996 /* Override any gcc2 internal prototype to avoid an error.  */
14997 #ifdef __cplusplus
14998 extern "C"
14999 #endif
15000 /* We use char because int might match the return type of a gcc2
15001    builtin and then its argument prototype would still apply.  */
15002 char debug_malloc ();
15003 int
15004 main (void)
15005 {
15006 debug_malloc ();
15007   ;
15008   return 0;
15009 }
15010 _ACEOF
15011 rm -f conftest.$ac_objext conftest$ac_exeext
15012 if { (eval echo "$as_me:15012: \"$ac_link\"") >&5
15013   (eval $ac_link) 2>&5
15014   ac_status=$?
15015   echo "$as_me:15015: \$? = $ac_status" >&5
15016   (exit $ac_status); } &&
15017          { ac_try='test -s conftest$ac_exeext'
15018   { (eval echo "$as_me:15018: \"$ac_try\"") >&5
15019   (eval $ac_try) 2>&5
15020   ac_status=$?
15021   echo "$as_me:15021: \$? = $ac_status" >&5
15022   (exit $ac_status); }; }; then
15023   ac_cv_lib_dbmalloc_debug_malloc=yes
15024 else
15025   echo "$as_me: failed program was:" >&5
15026 cat conftest.$ac_ext >&5
15027 ac_cv_lib_dbmalloc_debug_malloc=no
15028 fi
15029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15030 LIBS=$ac_check_lib_save_LIBS
15031 fi
15032 echo "$as_me:15032: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
15033 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
15034 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
15035   cat >>confdefs.h <<EOF
15036 #define HAVE_LIBDBMALLOC 1
15037 EOF
15038
15039   LIBS="-ldbmalloc $LIBS"
15040
15041 fi
15042
15043 fi
15044
15045 fi
15046
15047 echo "$as_me:15047: checking if you want to use valgrind for testing" >&5
15048 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
15049
15050 # Check whether --with-valgrind or --without-valgrind was given.
15051 if test "${with_valgrind+set}" = set; then
15052   withval="$with_valgrind"
15053
15054 cat >>confdefs.h <<EOF
15055 #define USE_VALGRIND 1
15056 EOF
15057
15058         : ${with_cflags:=-g}
15059         : ${with_no_leaks:=yes}
15060          with_valgrind=yes
15061 else
15062   with_valgrind=
15063 fi;
15064 echo "$as_me:15064: result: ${with_valgrind:-no}" >&5
15065 echo "${ECHO_T}${with_valgrind:-no}" >&6
15066
15067 case .$with_cflags in
15068 (.*-g*)
15069         case .$CFLAGS in
15070         (.*-g*)
15071                 ;;
15072         (*)
15073
15074 cf_fix_cppflags=no
15075 cf_new_cflags=
15076 cf_new_cppflags=
15077 cf_new_extra_cppflags=
15078
15079 for cf_add_cflags in -g
15080 do
15081 case $cf_fix_cppflags in
15082 (no)
15083         case $cf_add_cflags in
15084         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15085                 case $cf_add_cflags in
15086                 (-D*)
15087                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15088
15089                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15090                                 && test -z "${cf_tst_cflags}" \
15091                                 && cf_fix_cppflags=yes
15092
15093                         if test $cf_fix_cppflags = yes ; then
15094
15095         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15096         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15097
15098                                 continue
15099                         elif test "${cf_tst_cflags}" = "\"'" ; then
15100
15101         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15102         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15103
15104                                 continue
15105                         fi
15106                         ;;
15107                 esac
15108                 case "$CPPFLAGS" in
15109                 (*$cf_add_cflags)
15110                         ;;
15111                 (*)
15112                         case $cf_add_cflags in
15113                         (-D*)
15114                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15115
15116 CPPFLAGS=`echo "$CPPFLAGS" | \
15117         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15118                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15119
15120                                 ;;
15121                         esac
15122
15123         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15124         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15125
15126                         ;;
15127                 esac
15128                 ;;
15129         (*)
15130
15131         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15132         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15133
15134                 ;;
15135         esac
15136         ;;
15137 (yes)
15138
15139         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15140         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15141
15142         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15143
15144         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15145                 && test -z "${cf_tst_cflags}" \
15146                 && cf_fix_cppflags=no
15147         ;;
15148 esac
15149 done
15150
15151 if test -n "$cf_new_cflags" ; then
15152
15153         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15154         CFLAGS="${CFLAGS}$cf_new_cflags"
15155
15156 fi
15157
15158 if test -n "$cf_new_cppflags" ; then
15159
15160         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15161         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15162
15163 fi
15164
15165 if test -n "$cf_new_extra_cppflags" ; then
15166
15167         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15168         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15169
15170 fi
15171
15172                 ;;
15173         esac
15174         ;;
15175 esac
15176
15177 echo "$as_me:15177: checking if you want to perform memory-leak testing" >&5
15178 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15179
15180 # Check whether --enable-leaks or --disable-leaks was given.
15181 if test "${enable_leaks+set}" = set; then
15182   enableval="$enable_leaks"
15183   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15184 else
15185   : ${with_no_leaks:=no}
15186 fi;
15187 echo "$as_me:15187: result: $with_no_leaks" >&5
15188 echo "${ECHO_T}$with_no_leaks" >&6
15189
15190 if test "$with_no_leaks" = yes ; then
15191
15192 cat >>confdefs.h <<\EOF
15193 #define NO_LEAKS 1
15194 EOF
15195
15196 cat >>confdefs.h <<\EOF
15197 #define YY_NO_LEAKS 1
15198 EOF
15199
15200 fi
15201
15202 cat >>confdefs.h <<\EOF
15203 #define HAVE_NC_ALLOC_H 1
15204 EOF
15205
15206 ###     use option --enable-expanded to generate certain macros as functions
15207
15208 # Check whether --enable-expanded or --disable-expanded was given.
15209 if test "${enable_expanded+set}" = set; then
15210   enableval="$enable_expanded"
15211   test "x$enableval" = xyes &&
15212 cat >>confdefs.h <<\EOF
15213 #define NCURSES_EXPANDED 1
15214 EOF
15215
15216 fi;
15217
15218 ###     use option --disable-macros to suppress macros in favor of functions
15219
15220 # Check whether --enable-macros or --disable-macros was given.
15221 if test "${enable_macros+set}" = set; then
15222   enableval="$enable_macros"
15223   test "$enableval" = no &&
15224 cat >>confdefs.h <<\EOF
15225 #define NCURSES_NOMACROS 1
15226 EOF
15227
15228 fi;
15229
15230 # Normally we only add trace() to the debug-library.  Allow this to be
15231 # extended to all models of the ncurses library:
15232 cf_all_traces=no
15233 case "$CFLAGS $CPPFLAGS" in
15234 (*-DTRACE*)
15235         cf_all_traces=yes
15236         ;;
15237 esac
15238
15239 echo "$as_me:15239: checking whether to add trace feature to all models" >&5
15240 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15241
15242 # Check whether --with-trace or --without-trace was given.
15243 if test "${with_trace+set}" = set; then
15244   withval="$with_trace"
15245   cf_with_trace=$withval
15246 else
15247   cf_with_trace=$cf_all_traces
15248 fi;
15249 echo "$as_me:15249: result: $cf_with_trace" >&5
15250 echo "${ECHO_T}$cf_with_trace" >&6
15251
15252 if test "x$cf_with_trace" = xyes ; then
15253         LIB_TRACING=all
15254         ADA_TRACE=TRUE
15255
15256 cf_fix_cppflags=no
15257 cf_new_cflags=
15258 cf_new_cppflags=
15259 cf_new_extra_cppflags=
15260
15261 for cf_add_cflags in -DTRACE
15262 do
15263 case $cf_fix_cppflags in
15264 (no)
15265         case $cf_add_cflags in
15266         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15267                 case $cf_add_cflags in
15268                 (-D*)
15269                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15270
15271                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15272                                 && test -z "${cf_tst_cflags}" \
15273                                 && cf_fix_cppflags=yes
15274
15275                         if test $cf_fix_cppflags = yes ; then
15276
15277         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15278         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15279
15280                                 continue
15281                         elif test "${cf_tst_cflags}" = "\"'" ; then
15282
15283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15285
15286                                 continue
15287                         fi
15288                         ;;
15289                 esac
15290                 case "$CPPFLAGS" in
15291                 (*$cf_add_cflags)
15292                         ;;
15293                 (*)
15294                         case $cf_add_cflags in
15295                         (-D*)
15296                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15297
15298 CPPFLAGS=`echo "$CPPFLAGS" | \
15299         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15300                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15301
15302                                 ;;
15303                         esac
15304
15305         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15306         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15307
15308                         ;;
15309                 esac
15310                 ;;
15311         (*)
15312
15313         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15314         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15315
15316                 ;;
15317         esac
15318         ;;
15319 (yes)
15320
15321         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15322         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15323
15324         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15325
15326         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15327                 && test -z "${cf_tst_cflags}" \
15328                 && cf_fix_cppflags=no
15329         ;;
15330 esac
15331 done
15332
15333 if test -n "$cf_new_cflags" ; then
15334
15335         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15336         CFLAGS="${CFLAGS}$cf_new_cflags"
15337
15338 fi
15339
15340 if test -n "$cf_new_cppflags" ; then
15341
15342         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15343         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15344
15345 fi
15346
15347 if test -n "$cf_new_extra_cppflags" ; then
15348
15349         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15350         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15351
15352 fi
15353
15354 cat >>confdefs.h <<\EOF
15355 #define HAVE__TRACEF 1
15356 EOF
15357
15358 else
15359         LIB_TRACING=DEBUG
15360         ADA_TRACE=FALSE
15361 fi
15362
15363 echo "$as_me:15363: checking if we want to use GNAT projects" >&5
15364 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15365
15366 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15367 if test "${enable_gnat_projects+set}" = set; then
15368   enableval="$enable_gnat_projects"
15369   test "$enableval" != no && enableval=yes
15370         if test "$enableval" != "yes" ; then
15371     enable_gnat_projects=no
15372         else
15373                 enable_gnat_projects=yes
15374         fi
15375 else
15376   enableval=yes
15377         enable_gnat_projects=yes
15378
15379 fi;
15380 echo "$as_me:15380: result: $enable_gnat_projects" >&5
15381 echo "${ECHO_T}$enable_gnat_projects" >&6
15382
15383 ###     Checks for libraries.
15384 case $cf_cv_system_name in
15385 (*mingw32*|*mingw64*)
15386         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15387         LIBS=" -lpsapi $LIBS"
15388         ;;
15389 (*)
15390 echo "$as_me:15390: checking for gettimeofday" >&5
15391 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15392 if test "${ac_cv_func_gettimeofday+set}" = set; then
15393   echo $ECHO_N "(cached) $ECHO_C" >&6
15394 else
15395   cat >conftest.$ac_ext <<_ACEOF
15396 #line 15396 "configure"
15397 #include "confdefs.h"
15398 /* System header to define __stub macros and hopefully few prototypes,
15399     which can conflict with char gettimeofday (); below.  */
15400 #include <assert.h>
15401 /* Override any gcc2 internal prototype to avoid an error.  */
15402 #ifdef __cplusplus
15403 extern "C"
15404 #endif
15405 /* We use char because int might match the return type of a gcc2
15406    builtin and then its argument prototype would still apply.  */
15407 char gettimeofday ();
15408 char (*f) ();
15409
15410 int
15411 main (void)
15412 {
15413 /* The GNU C library defines this for functions which it implements
15414     to always fail with ENOSYS.  Some functions are actually named
15415     something starting with __ and the normal name is an alias.  */
15416 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15417 choke me
15418 #else
15419 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15420 #endif
15421
15422   ;
15423   return 0;
15424 }
15425 _ACEOF
15426 rm -f conftest.$ac_objext conftest$ac_exeext
15427 if { (eval echo "$as_me:15427: \"$ac_link\"") >&5
15428   (eval $ac_link) 2>&5
15429   ac_status=$?
15430   echo "$as_me:15430: \$? = $ac_status" >&5
15431   (exit $ac_status); } &&
15432          { ac_try='test -s conftest$ac_exeext'
15433   { (eval echo "$as_me:15433: \"$ac_try\"") >&5
15434   (eval $ac_try) 2>&5
15435   ac_status=$?
15436   echo "$as_me:15436: \$? = $ac_status" >&5
15437   (exit $ac_status); }; }; then
15438   ac_cv_func_gettimeofday=yes
15439 else
15440   echo "$as_me: failed program was:" >&5
15441 cat conftest.$ac_ext >&5
15442 ac_cv_func_gettimeofday=no
15443 fi
15444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15445 fi
15446 echo "$as_me:15446: result: $ac_cv_func_gettimeofday" >&5
15447 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15448 if test $ac_cv_func_gettimeofday = yes; then
15449
15450 cat >>confdefs.h <<\EOF
15451 #define HAVE_GETTIMEOFDAY 1
15452 EOF
15453
15454 else
15455
15456 echo "$as_me:15456: checking for gettimeofday in -lbsd" >&5
15457 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15458 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15459   echo $ECHO_N "(cached) $ECHO_C" >&6
15460 else
15461   ac_check_lib_save_LIBS=$LIBS
15462 LIBS="-lbsd  $LIBS"
15463 cat >conftest.$ac_ext <<_ACEOF
15464 #line 15464 "configure"
15465 #include "confdefs.h"
15466
15467 /* Override any gcc2 internal prototype to avoid an error.  */
15468 #ifdef __cplusplus
15469 extern "C"
15470 #endif
15471 /* We use char because int might match the return type of a gcc2
15472    builtin and then its argument prototype would still apply.  */
15473 char gettimeofday ();
15474 int
15475 main (void)
15476 {
15477 gettimeofday ();
15478   ;
15479   return 0;
15480 }
15481 _ACEOF
15482 rm -f conftest.$ac_objext conftest$ac_exeext
15483 if { (eval echo "$as_me:15483: \"$ac_link\"") >&5
15484   (eval $ac_link) 2>&5
15485   ac_status=$?
15486   echo "$as_me:15486: \$? = $ac_status" >&5
15487   (exit $ac_status); } &&
15488          { ac_try='test -s conftest$ac_exeext'
15489   { (eval echo "$as_me:15489: \"$ac_try\"") >&5
15490   (eval $ac_try) 2>&5
15491   ac_status=$?
15492   echo "$as_me:15492: \$? = $ac_status" >&5
15493   (exit $ac_status); }; }; then
15494   ac_cv_lib_bsd_gettimeofday=yes
15495 else
15496   echo "$as_me: failed program was:" >&5
15497 cat conftest.$ac_ext >&5
15498 ac_cv_lib_bsd_gettimeofday=no
15499 fi
15500 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15501 LIBS=$ac_check_lib_save_LIBS
15502 fi
15503 echo "$as_me:15503: result: $ac_cv_lib_bsd_gettimeofday" >&5
15504 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15505 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15506
15507 cat >>confdefs.h <<\EOF
15508 #define HAVE_GETTIMEOFDAY 1
15509 EOF
15510
15511 cf_add_libs="-lbsd"
15512 # Filter out duplicates - this happens with badly-designed ".pc" files...
15513 for cf_add_1lib in $LIBS
15514 do
15515         for cf_add_2lib in $cf_add_libs
15516         do
15517                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15518                 then
15519                         cf_add_1lib=
15520                         break
15521                 fi
15522         done
15523         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15524 done
15525 LIBS="$cf_add_libs"
15526
15527 fi
15528
15529 fi
15530         ;;
15531 esac
15532
15533 echo "$as_me:15533: checking if -lm needed for math functions" >&5
15534 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15535 if test "${cf_cv_need_libm+set}" = set; then
15536   echo $ECHO_N "(cached) $ECHO_C" >&6
15537 else
15538
15539         cat >conftest.$ac_ext <<_ACEOF
15540 #line 15540 "configure"
15541 #include "confdefs.h"
15542
15543         #include <stdio.h>
15544         #include <stdlib.h>
15545         #include <math.h>
15546
15547 int
15548 main (void)
15549 {
15550 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15551   ;
15552   return 0;
15553 }
15554 _ACEOF
15555 rm -f conftest.$ac_objext conftest$ac_exeext
15556 if { (eval echo "$as_me:15556: \"$ac_link\"") >&5
15557   (eval $ac_link) 2>&5
15558   ac_status=$?
15559   echo "$as_me:15559: \$? = $ac_status" >&5
15560   (exit $ac_status); } &&
15561          { ac_try='test -s conftest$ac_exeext'
15562   { (eval echo "$as_me:15562: \"$ac_try\"") >&5
15563   (eval $ac_try) 2>&5
15564   ac_status=$?
15565   echo "$as_me:15565: \$? = $ac_status" >&5
15566   (exit $ac_status); }; }; then
15567   cf_cv_need_libm=no
15568 else
15569   echo "$as_me: failed program was:" >&5
15570 cat conftest.$ac_ext >&5
15571 cf_cv_need_libm=yes
15572 fi
15573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15574 fi
15575 echo "$as_me:15575: result: $cf_cv_need_libm" >&5
15576 echo "${ECHO_T}$cf_cv_need_libm" >&6
15577 if test "$cf_cv_need_libm" = yes
15578 then
15579 MATH_LIB=-lm
15580 fi
15581
15582 ###     Checks for header files.
15583 echo "$as_me:15583: checking for ANSI C header files" >&5
15584 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15585 if test "${ac_cv_header_stdc+set}" = set; then
15586   echo $ECHO_N "(cached) $ECHO_C" >&6
15587 else
15588   cat >conftest.$ac_ext <<_ACEOF
15589 #line 15589 "configure"
15590 #include "confdefs.h"
15591 #include <stdlib.h>
15592 #include <stdarg.h>
15593 #include <string.h>
15594 #include <float.h>
15595
15596 _ACEOF
15597 if { (eval echo "$as_me:15597: \"$ac_cpp conftest.$ac_ext\"") >&5
15598   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15599   ac_status=$?
15600   egrep -v '^ *\+' conftest.er1 >conftest.err
15601   rm -f conftest.er1
15602   cat conftest.err >&5
15603   echo "$as_me:15603: \$? = $ac_status" >&5
15604   (exit $ac_status); } >/dev/null; then
15605   if test -s conftest.err; then
15606     ac_cpp_err=$ac_c_preproc_warn_flag
15607   else
15608     ac_cpp_err=
15609   fi
15610 else
15611   ac_cpp_err=yes
15612 fi
15613 if test -z "$ac_cpp_err"; then
15614   ac_cv_header_stdc=yes
15615 else
15616   echo "$as_me: failed program was:" >&5
15617   cat conftest.$ac_ext >&5
15618   ac_cv_header_stdc=no
15619 fi
15620 rm -f conftest.err conftest.$ac_ext
15621
15622 if test $ac_cv_header_stdc = yes; then
15623   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15624   cat >conftest.$ac_ext <<_ACEOF
15625 #line 15625 "configure"
15626 #include "confdefs.h"
15627 #include <string.h>
15628
15629 _ACEOF
15630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15631   egrep "memchr" >/dev/null 2>&1; then
15632   :
15633 else
15634   ac_cv_header_stdc=no
15635 fi
15636 rm -rf conftest*
15637
15638 fi
15639
15640 if test $ac_cv_header_stdc = yes; then
15641   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15642   cat >conftest.$ac_ext <<_ACEOF
15643 #line 15643 "configure"
15644 #include "confdefs.h"
15645 #include <stdlib.h>
15646
15647 _ACEOF
15648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15649   egrep "free" >/dev/null 2>&1; then
15650   :
15651 else
15652   ac_cv_header_stdc=no
15653 fi
15654 rm -rf conftest*
15655
15656 fi
15657
15658 if test $ac_cv_header_stdc = yes; then
15659   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15660   if test "$cross_compiling" = yes; then
15661   :
15662 else
15663   cat >conftest.$ac_ext <<_ACEOF
15664 #line 15664 "configure"
15665 #include "confdefs.h"
15666 #include <ctype.h>
15667 #if ((' ' & 0x0FF) == 0x020)
15668 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15669 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15670 #else
15671 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15672                      || ('j' <= (c) && (c) <= 'r') \
15673                      || ('s' <= (c) && (c) <= 'z'))
15674 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15675 #endif
15676
15677 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15678 int
15679 main (void)
15680 {
15681   int i;
15682   for (i = 0; i < 256; i++)
15683     if (XOR (islower (i), ISLOWER (i))
15684         || toupper (i) != TOUPPER (i))
15685       $ac_main_return(2);
15686   $ac_main_return (0);
15687 }
15688 _ACEOF
15689 rm -f conftest$ac_exeext
15690 if { (eval echo "$as_me:15690: \"$ac_link\"") >&5
15691   (eval $ac_link) 2>&5
15692   ac_status=$?
15693   echo "$as_me:15693: \$? = $ac_status" >&5
15694   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15695   { (eval echo "$as_me:15695: \"$ac_try\"") >&5
15696   (eval $ac_try) 2>&5
15697   ac_status=$?
15698   echo "$as_me:15698: \$? = $ac_status" >&5
15699   (exit $ac_status); }; }; then
15700   :
15701 else
15702   echo "$as_me: program exited with status $ac_status" >&5
15703 echo "$as_me: failed program was:" >&5
15704 cat conftest.$ac_ext >&5
15705 ac_cv_header_stdc=no
15706 fi
15707 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15708 fi
15709 fi
15710 fi
15711 echo "$as_me:15711: result: $ac_cv_header_stdc" >&5
15712 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15713 if test $ac_cv_header_stdc = yes; then
15714
15715 cat >>confdefs.h <<\EOF
15716 #define STDC_HEADERS 1
15717 EOF
15718
15719 fi
15720
15721 ac_header_dirent=no
15722 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15723   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15724 echo "$as_me:15724: checking for $ac_hdr that defines DIR" >&5
15725 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15726 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15727   echo $ECHO_N "(cached) $ECHO_C" >&6
15728 else
15729   cat >conftest.$ac_ext <<_ACEOF
15730 #line 15730 "configure"
15731 #include "confdefs.h"
15732 #include <sys/types.h>
15733 #include <$ac_hdr>
15734
15735 int
15736 main (void)
15737 {
15738 if ((DIR *) 0)
15739 return 0;
15740   ;
15741   return 0;
15742 }
15743 _ACEOF
15744 rm -f conftest.$ac_objext
15745 if { (eval echo "$as_me:15745: \"$ac_compile\"") >&5
15746   (eval $ac_compile) 2>&5
15747   ac_status=$?
15748   echo "$as_me:15748: \$? = $ac_status" >&5
15749   (exit $ac_status); } &&
15750          { ac_try='test -s conftest.$ac_objext'
15751   { (eval echo "$as_me:15751: \"$ac_try\"") >&5
15752   (eval $ac_try) 2>&5
15753   ac_status=$?
15754   echo "$as_me:15754: \$? = $ac_status" >&5
15755   (exit $ac_status); }; }; then
15756   eval "$as_ac_Header=yes"
15757 else
15758   echo "$as_me: failed program was:" >&5
15759 cat conftest.$ac_ext >&5
15760 eval "$as_ac_Header=no"
15761 fi
15762 rm -f conftest.$ac_objext conftest.$ac_ext
15763 fi
15764 echo "$as_me:15764: result: `eval echo '${'$as_ac_Header'}'`" >&5
15765 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15766 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15767   cat >>confdefs.h <<EOF
15768 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15769 EOF
15770
15771 ac_header_dirent=$ac_hdr; break
15772 fi
15773
15774 done
15775 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15776 if test $ac_header_dirent = dirent.h; then
15777   echo "$as_me:15777: checking for opendir in -ldir" >&5
15778 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15779 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15780   echo $ECHO_N "(cached) $ECHO_C" >&6
15781 else
15782   ac_check_lib_save_LIBS=$LIBS
15783 LIBS="-ldir  $LIBS"
15784 cat >conftest.$ac_ext <<_ACEOF
15785 #line 15785 "configure"
15786 #include "confdefs.h"
15787
15788 /* Override any gcc2 internal prototype to avoid an error.  */
15789 #ifdef __cplusplus
15790 extern "C"
15791 #endif
15792 /* We use char because int might match the return type of a gcc2
15793    builtin and then its argument prototype would still apply.  */
15794 char opendir ();
15795 int
15796 main (void)
15797 {
15798 opendir ();
15799   ;
15800   return 0;
15801 }
15802 _ACEOF
15803 rm -f conftest.$ac_objext conftest$ac_exeext
15804 if { (eval echo "$as_me:15804: \"$ac_link\"") >&5
15805   (eval $ac_link) 2>&5
15806   ac_status=$?
15807   echo "$as_me:15807: \$? = $ac_status" >&5
15808   (exit $ac_status); } &&
15809          { ac_try='test -s conftest$ac_exeext'
15810   { (eval echo "$as_me:15810: \"$ac_try\"") >&5
15811   (eval $ac_try) 2>&5
15812   ac_status=$?
15813   echo "$as_me:15813: \$? = $ac_status" >&5
15814   (exit $ac_status); }; }; then
15815   ac_cv_lib_dir_opendir=yes
15816 else
15817   echo "$as_me: failed program was:" >&5
15818 cat conftest.$ac_ext >&5
15819 ac_cv_lib_dir_opendir=no
15820 fi
15821 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15822 LIBS=$ac_check_lib_save_LIBS
15823 fi
15824 echo "$as_me:15824: result: $ac_cv_lib_dir_opendir" >&5
15825 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15826 if test $ac_cv_lib_dir_opendir = yes; then
15827   LIBS="$LIBS -ldir"
15828 fi
15829
15830 else
15831   echo "$as_me:15831: checking for opendir in -lx" >&5
15832 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15833 if test "${ac_cv_lib_x_opendir+set}" = set; then
15834   echo $ECHO_N "(cached) $ECHO_C" >&6
15835 else
15836   ac_check_lib_save_LIBS=$LIBS
15837 LIBS="-lx  $LIBS"
15838 cat >conftest.$ac_ext <<_ACEOF
15839 #line 15839 "configure"
15840 #include "confdefs.h"
15841
15842 /* Override any gcc2 internal prototype to avoid an error.  */
15843 #ifdef __cplusplus
15844 extern "C"
15845 #endif
15846 /* We use char because int might match the return type of a gcc2
15847    builtin and then its argument prototype would still apply.  */
15848 char opendir ();
15849 int
15850 main (void)
15851 {
15852 opendir ();
15853   ;
15854   return 0;
15855 }
15856 _ACEOF
15857 rm -f conftest.$ac_objext conftest$ac_exeext
15858 if { (eval echo "$as_me:15858: \"$ac_link\"") >&5
15859   (eval $ac_link) 2>&5
15860   ac_status=$?
15861   echo "$as_me:15861: \$? = $ac_status" >&5
15862   (exit $ac_status); } &&
15863          { ac_try='test -s conftest$ac_exeext'
15864   { (eval echo "$as_me:15864: \"$ac_try\"") >&5
15865   (eval $ac_try) 2>&5
15866   ac_status=$?
15867   echo "$as_me:15867: \$? = $ac_status" >&5
15868   (exit $ac_status); }; }; then
15869   ac_cv_lib_x_opendir=yes
15870 else
15871   echo "$as_me: failed program was:" >&5
15872 cat conftest.$ac_ext >&5
15873 ac_cv_lib_x_opendir=no
15874 fi
15875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15876 LIBS=$ac_check_lib_save_LIBS
15877 fi
15878 echo "$as_me:15878: result: $ac_cv_lib_x_opendir" >&5
15879 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15880 if test $ac_cv_lib_x_opendir = yes; then
15881   LIBS="$LIBS -lx"
15882 fi
15883
15884 fi
15885
15886 echo "$as_me:15886: checking whether time.h and sys/time.h may both be included" >&5
15887 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15888 if test "${ac_cv_header_time+set}" = set; then
15889   echo $ECHO_N "(cached) $ECHO_C" >&6
15890 else
15891   cat >conftest.$ac_ext <<_ACEOF
15892 #line 15892 "configure"
15893 #include "confdefs.h"
15894 #include <sys/types.h>
15895 #include <sys/time.h>
15896 #include <time.h>
15897
15898 int
15899 main (void)
15900 {
15901 if ((struct tm *) 0)
15902 return 0;
15903   ;
15904   return 0;
15905 }
15906 _ACEOF
15907 rm -f conftest.$ac_objext
15908 if { (eval echo "$as_me:15908: \"$ac_compile\"") >&5
15909   (eval $ac_compile) 2>&5
15910   ac_status=$?
15911   echo "$as_me:15911: \$? = $ac_status" >&5
15912   (exit $ac_status); } &&
15913          { ac_try='test -s conftest.$ac_objext'
15914   { (eval echo "$as_me:15914: \"$ac_try\"") >&5
15915   (eval $ac_try) 2>&5
15916   ac_status=$?
15917   echo "$as_me:15917: \$? = $ac_status" >&5
15918   (exit $ac_status); }; }; then
15919   ac_cv_header_time=yes
15920 else
15921   echo "$as_me: failed program was:" >&5
15922 cat conftest.$ac_ext >&5
15923 ac_cv_header_time=no
15924 fi
15925 rm -f conftest.$ac_objext conftest.$ac_ext
15926 fi
15927 echo "$as_me:15927: result: $ac_cv_header_time" >&5
15928 echo "${ECHO_T}$ac_cv_header_time" >&6
15929 if test $ac_cv_header_time = yes; then
15930
15931 cat >>confdefs.h <<\EOF
15932 #define TIME_WITH_SYS_TIME 1
15933 EOF
15934
15935 fi
15936
15937 cf_regex_func=no
15938
15939 cf_regex_libs="regex re"
15940 case $host_os in
15941 (mingw*)
15942         cf_regex_libs="gnurx $cf_regex_libs"
15943         ;;
15944 esac
15945
15946 echo "$as_me:15946: checking for regcomp" >&5
15947 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15948 if test "${ac_cv_func_regcomp+set}" = set; then
15949   echo $ECHO_N "(cached) $ECHO_C" >&6
15950 else
15951   cat >conftest.$ac_ext <<_ACEOF
15952 #line 15952 "configure"
15953 #include "confdefs.h"
15954 /* System header to define __stub macros and hopefully few prototypes,
15955     which can conflict with char regcomp (); below.  */
15956 #include <assert.h>
15957 /* Override any gcc2 internal prototype to avoid an error.  */
15958 #ifdef __cplusplus
15959 extern "C"
15960 #endif
15961 /* We use char because int might match the return type of a gcc2
15962    builtin and then its argument prototype would still apply.  */
15963 char regcomp ();
15964 char (*f) ();
15965
15966 int
15967 main (void)
15968 {
15969 /* The GNU C library defines this for functions which it implements
15970     to always fail with ENOSYS.  Some functions are actually named
15971     something starting with __ and the normal name is an alias.  */
15972 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15973 choke me
15974 #else
15975 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15976 #endif
15977
15978   ;
15979   return 0;
15980 }
15981 _ACEOF
15982 rm -f conftest.$ac_objext conftest$ac_exeext
15983 if { (eval echo "$as_me:15983: \"$ac_link\"") >&5
15984   (eval $ac_link) 2>&5
15985   ac_status=$?
15986   echo "$as_me:15986: \$? = $ac_status" >&5
15987   (exit $ac_status); } &&
15988          { ac_try='test -s conftest$ac_exeext'
15989   { (eval echo "$as_me:15989: \"$ac_try\"") >&5
15990   (eval $ac_try) 2>&5
15991   ac_status=$?
15992   echo "$as_me:15992: \$? = $ac_status" >&5
15993   (exit $ac_status); }; }; then
15994   ac_cv_func_regcomp=yes
15995 else
15996   echo "$as_me: failed program was:" >&5
15997 cat conftest.$ac_ext >&5
15998 ac_cv_func_regcomp=no
15999 fi
16000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16001 fi
16002 echo "$as_me:16002: result: $ac_cv_func_regcomp" >&5
16003 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
16004 if test $ac_cv_func_regcomp = yes; then
16005   cf_regex_func=regcomp
16006 else
16007
16008         for cf_regex_lib in $cf_regex_libs
16009         do
16010                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
16011 echo "$as_me:16011: checking for regcomp in -l$cf_regex_lib" >&5
16012 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
16013 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16014   echo $ECHO_N "(cached) $ECHO_C" >&6
16015 else
16016   ac_check_lib_save_LIBS=$LIBS
16017 LIBS="-l$cf_regex_lib  $LIBS"
16018 cat >conftest.$ac_ext <<_ACEOF
16019 #line 16019 "configure"
16020 #include "confdefs.h"
16021
16022 /* Override any gcc2 internal prototype to avoid an error.  */
16023 #ifdef __cplusplus
16024 extern "C"
16025 #endif
16026 /* We use char because int might match the return type of a gcc2
16027    builtin and then its argument prototype would still apply.  */
16028 char regcomp ();
16029 int
16030 main (void)
16031 {
16032 regcomp ();
16033   ;
16034   return 0;
16035 }
16036 _ACEOF
16037 rm -f conftest.$ac_objext conftest$ac_exeext
16038 if { (eval echo "$as_me:16038: \"$ac_link\"") >&5
16039   (eval $ac_link) 2>&5
16040   ac_status=$?
16041   echo "$as_me:16041: \$? = $ac_status" >&5
16042   (exit $ac_status); } &&
16043          { ac_try='test -s conftest$ac_exeext'
16044   { (eval echo "$as_me:16044: \"$ac_try\"") >&5
16045   (eval $ac_try) 2>&5
16046   ac_status=$?
16047   echo "$as_me:16047: \$? = $ac_status" >&5
16048   (exit $ac_status); }; }; then
16049   eval "$as_ac_Lib=yes"
16050 else
16051   echo "$as_me: failed program was:" >&5
16052 cat conftest.$ac_ext >&5
16053 eval "$as_ac_Lib=no"
16054 fi
16055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16056 LIBS=$ac_check_lib_save_LIBS
16057 fi
16058 echo "$as_me:16058: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16059 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16060 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16061
16062 cf_add_libs="-l$cf_regex_lib"
16063 # Filter out duplicates - this happens with badly-designed ".pc" files...
16064 for cf_add_1lib in $LIBS
16065 do
16066         for cf_add_2lib in $cf_add_libs
16067         do
16068                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16069                 then
16070                         cf_add_1lib=
16071                         break
16072                 fi
16073         done
16074         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16075 done
16076 LIBS="$cf_add_libs"
16077
16078                                 cf_regex_func=regcomp
16079                                 break
16080 fi
16081
16082         done
16083
16084 fi
16085
16086 if test "$cf_regex_func" = no ; then
16087         echo "$as_me:16087: checking for compile" >&5
16088 echo $ECHO_N "checking for compile... $ECHO_C" >&6
16089 if test "${ac_cv_func_compile+set}" = set; then
16090   echo $ECHO_N "(cached) $ECHO_C" >&6
16091 else
16092   cat >conftest.$ac_ext <<_ACEOF
16093 #line 16093 "configure"
16094 #include "confdefs.h"
16095 /* System header to define __stub macros and hopefully few prototypes,
16096     which can conflict with char compile (); below.  */
16097 #include <assert.h>
16098 /* Override any gcc2 internal prototype to avoid an error.  */
16099 #ifdef __cplusplus
16100 extern "C"
16101 #endif
16102 /* We use char because int might match the return type of a gcc2
16103    builtin and then its argument prototype would still apply.  */
16104 char compile ();
16105 char (*f) ();
16106
16107 int
16108 main (void)
16109 {
16110 /* The GNU C library defines this for functions which it implements
16111     to always fail with ENOSYS.  Some functions are actually named
16112     something starting with __ and the normal name is an alias.  */
16113 #if defined (__stub_compile) || defined (__stub___compile)
16114 choke me
16115 #else
16116 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16117 #endif
16118
16119   ;
16120   return 0;
16121 }
16122 _ACEOF
16123 rm -f conftest.$ac_objext conftest$ac_exeext
16124 if { (eval echo "$as_me:16124: \"$ac_link\"") >&5
16125   (eval $ac_link) 2>&5
16126   ac_status=$?
16127   echo "$as_me:16127: \$? = $ac_status" >&5
16128   (exit $ac_status); } &&
16129          { ac_try='test -s conftest$ac_exeext'
16130   { (eval echo "$as_me:16130: \"$ac_try\"") >&5
16131   (eval $ac_try) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); }; }; then
16135   ac_cv_func_compile=yes
16136 else
16137   echo "$as_me: failed program was:" >&5
16138 cat conftest.$ac_ext >&5
16139 ac_cv_func_compile=no
16140 fi
16141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16142 fi
16143 echo "$as_me:16143: result: $ac_cv_func_compile" >&5
16144 echo "${ECHO_T}$ac_cv_func_compile" >&6
16145 if test $ac_cv_func_compile = yes; then
16146   cf_regex_func=compile
16147 else
16148
16149                 echo "$as_me:16149: checking for compile in -lgen" >&5
16150 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16151 if test "${ac_cv_lib_gen_compile+set}" = set; then
16152   echo $ECHO_N "(cached) $ECHO_C" >&6
16153 else
16154   ac_check_lib_save_LIBS=$LIBS
16155 LIBS="-lgen  $LIBS"
16156 cat >conftest.$ac_ext <<_ACEOF
16157 #line 16157 "configure"
16158 #include "confdefs.h"
16159
16160 /* Override any gcc2 internal prototype to avoid an error.  */
16161 #ifdef __cplusplus
16162 extern "C"
16163 #endif
16164 /* We use char because int might match the return type of a gcc2
16165    builtin and then its argument prototype would still apply.  */
16166 char compile ();
16167 int
16168 main (void)
16169 {
16170 compile ();
16171   ;
16172   return 0;
16173 }
16174 _ACEOF
16175 rm -f conftest.$ac_objext conftest$ac_exeext
16176 if { (eval echo "$as_me:16176: \"$ac_link\"") >&5
16177   (eval $ac_link) 2>&5
16178   ac_status=$?
16179   echo "$as_me:16179: \$? = $ac_status" >&5
16180   (exit $ac_status); } &&
16181          { ac_try='test -s conftest$ac_exeext'
16182   { (eval echo "$as_me:16182: \"$ac_try\"") >&5
16183   (eval $ac_try) 2>&5
16184   ac_status=$?
16185   echo "$as_me:16185: \$? = $ac_status" >&5
16186   (exit $ac_status); }; }; then
16187   ac_cv_lib_gen_compile=yes
16188 else
16189   echo "$as_me: failed program was:" >&5
16190 cat conftest.$ac_ext >&5
16191 ac_cv_lib_gen_compile=no
16192 fi
16193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16194 LIBS=$ac_check_lib_save_LIBS
16195 fi
16196 echo "$as_me:16196: result: $ac_cv_lib_gen_compile" >&5
16197 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16198 if test $ac_cv_lib_gen_compile = yes; then
16199
16200 cf_add_libs="-lgen"
16201 # Filter out duplicates - this happens with badly-designed ".pc" files...
16202 for cf_add_1lib in $LIBS
16203 do
16204         for cf_add_2lib in $cf_add_libs
16205         do
16206                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16207                 then
16208                         cf_add_1lib=
16209                         break
16210                 fi
16211         done
16212         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16213 done
16214 LIBS="$cf_add_libs"
16215
16216                                 cf_regex_func=compile
16217 fi
16218
16219 fi
16220
16221 fi
16222
16223 if test "$cf_regex_func" = no ; then
16224         { echo "$as_me:16224: WARNING: cannot find regular expression library" >&5
16225 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16226 fi
16227
16228 echo "$as_me:16228: checking for regular-expression headers" >&5
16229 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16230 if test "${cf_cv_regex_hdrs+set}" = set; then
16231   echo $ECHO_N "(cached) $ECHO_C" >&6
16232 else
16233
16234 cf_cv_regex_hdrs=no
16235 case $cf_regex_func in
16236 (compile)
16237         for cf_regex_hdr in regexp.h regexpr.h
16238         do
16239                 cat >conftest.$ac_ext <<_ACEOF
16240 #line 16240 "configure"
16241 #include "confdefs.h"
16242 #include <$cf_regex_hdr>
16243 int
16244 main (void)
16245 {
16246
16247                         char *p = compile("", "", "", 0);
16248                         int x = step("", "");
16249
16250   ;
16251   return 0;
16252 }
16253 _ACEOF
16254 rm -f conftest.$ac_objext conftest$ac_exeext
16255 if { (eval echo "$as_me:16255: \"$ac_link\"") >&5
16256   (eval $ac_link) 2>&5
16257   ac_status=$?
16258   echo "$as_me:16258: \$? = $ac_status" >&5
16259   (exit $ac_status); } &&
16260          { ac_try='test -s conftest$ac_exeext'
16261   { (eval echo "$as_me:16261: \"$ac_try\"") >&5
16262   (eval $ac_try) 2>&5
16263   ac_status=$?
16264   echo "$as_me:16264: \$? = $ac_status" >&5
16265   (exit $ac_status); }; }; then
16266
16267                         cf_cv_regex_hdrs=$cf_regex_hdr
16268                         break
16269
16270 else
16271   echo "$as_me: failed program was:" >&5
16272 cat conftest.$ac_ext >&5
16273 fi
16274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16275         done
16276         ;;
16277 (*)
16278         for cf_regex_hdr in regex.h
16279         do
16280                 cat >conftest.$ac_ext <<_ACEOF
16281 #line 16281 "configure"
16282 #include "confdefs.h"
16283 #include <sys/types.h>
16284 #include <$cf_regex_hdr>
16285 int
16286 main (void)
16287 {
16288
16289                         regex_t *p;
16290                         int x = regcomp(p, "", 0);
16291                         int y = regexec(p, "", 0, 0, 0);
16292                         regfree(p);
16293
16294   ;
16295   return 0;
16296 }
16297 _ACEOF
16298 rm -f conftest.$ac_objext conftest$ac_exeext
16299 if { (eval echo "$as_me:16299: \"$ac_link\"") >&5
16300   (eval $ac_link) 2>&5
16301   ac_status=$?
16302   echo "$as_me:16302: \$? = $ac_status" >&5
16303   (exit $ac_status); } &&
16304          { ac_try='test -s conftest$ac_exeext'
16305   { (eval echo "$as_me:16305: \"$ac_try\"") >&5
16306   (eval $ac_try) 2>&5
16307   ac_status=$?
16308   echo "$as_me:16308: \$? = $ac_status" >&5
16309   (exit $ac_status); }; }; then
16310
16311                         cf_cv_regex_hdrs=$cf_regex_hdr
16312                         break
16313
16314 else
16315   echo "$as_me: failed program was:" >&5
16316 cat conftest.$ac_ext >&5
16317 fi
16318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16319         done
16320         ;;
16321 esac
16322
16323 fi
16324 echo "$as_me:16324: result: $cf_cv_regex_hdrs" >&5
16325 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16326
16327 case $cf_cv_regex_hdrs in
16328         (no)            { echo "$as_me:16328: WARNING: no regular expression header found" >&5
16329 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16330         (regex.h)
16331 cat >>confdefs.h <<\EOF
16332 #define HAVE_REGEX_H_FUNCS 1
16333 EOF
16334  ;;
16335         (regexp.h)
16336 cat >>confdefs.h <<\EOF
16337 #define HAVE_REGEXP_H_FUNCS 1
16338 EOF
16339  ;;
16340         (regexpr.h)
16341 cat >>confdefs.h <<\EOF
16342 #define HAVE_REGEXPR_H_FUNCS 1
16343 EOF
16344  ;;
16345 esac
16346
16347 for ac_header in \
16348 fcntl.h \
16349 getopt.h \
16350 limits.h \
16351 locale.h \
16352 math.h \
16353 poll.h \
16354 sys/bsdtypes.h \
16355 sys/ioctl.h \
16356 sys/param.h \
16357 sys/poll.h \
16358 sys/select.h \
16359 sys/time.h \
16360 sys/times.h \
16361 ttyent.h \
16362 unistd.h \
16363 wctype.h \
16364
16365 do
16366 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16367 echo "$as_me:16367: checking for $ac_header" >&5
16368 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16369 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16370   echo $ECHO_N "(cached) $ECHO_C" >&6
16371 else
16372   cat >conftest.$ac_ext <<_ACEOF
16373 #line 16373 "configure"
16374 #include "confdefs.h"
16375 #include <$ac_header>
16376 _ACEOF
16377 if { (eval echo "$as_me:16377: \"$ac_cpp conftest.$ac_ext\"") >&5
16378   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16379   ac_status=$?
16380   egrep -v '^ *\+' conftest.er1 >conftest.err
16381   rm -f conftest.er1
16382   cat conftest.err >&5
16383   echo "$as_me:16383: \$? = $ac_status" >&5
16384   (exit $ac_status); } >/dev/null; then
16385   if test -s conftest.err; then
16386     ac_cpp_err=$ac_c_preproc_warn_flag
16387   else
16388     ac_cpp_err=
16389   fi
16390 else
16391   ac_cpp_err=yes
16392 fi
16393 if test -z "$ac_cpp_err"; then
16394   eval "$as_ac_Header=yes"
16395 else
16396   echo "$as_me: failed program was:" >&5
16397   cat conftest.$ac_ext >&5
16398   eval "$as_ac_Header=no"
16399 fi
16400 rm -f conftest.err conftest.$ac_ext
16401 fi
16402 echo "$as_me:16402: result: `eval echo '${'$as_ac_Header'}'`" >&5
16403 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16404 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16405   cat >>confdefs.h <<EOF
16406 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16407 EOF
16408
16409 fi
16410 done
16411
16412 for ac_header in unistd.h getopt.h
16413 do
16414 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16415 echo "$as_me:16415: checking for $ac_header" >&5
16416 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16417 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16418   echo $ECHO_N "(cached) $ECHO_C" >&6
16419 else
16420   cat >conftest.$ac_ext <<_ACEOF
16421 #line 16421 "configure"
16422 #include "confdefs.h"
16423 #include <$ac_header>
16424 _ACEOF
16425 if { (eval echo "$as_me:16425: \"$ac_cpp conftest.$ac_ext\"") >&5
16426   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16427   ac_status=$?
16428   egrep -v '^ *\+' conftest.er1 >conftest.err
16429   rm -f conftest.er1
16430   cat conftest.err >&5
16431   echo "$as_me:16431: \$? = $ac_status" >&5
16432   (exit $ac_status); } >/dev/null; then
16433   if test -s conftest.err; then
16434     ac_cpp_err=$ac_c_preproc_warn_flag
16435   else
16436     ac_cpp_err=
16437   fi
16438 else
16439   ac_cpp_err=yes
16440 fi
16441 if test -z "$ac_cpp_err"; then
16442   eval "$as_ac_Header=yes"
16443 else
16444   echo "$as_me: failed program was:" >&5
16445   cat conftest.$ac_ext >&5
16446   eval "$as_ac_Header=no"
16447 fi
16448 rm -f conftest.err conftest.$ac_ext
16449 fi
16450 echo "$as_me:16450: result: `eval echo '${'$as_ac_Header'}'`" >&5
16451 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16452 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16453   cat >>confdefs.h <<EOF
16454 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16455 EOF
16456
16457 fi
16458 done
16459
16460 echo "$as_me:16460: checking for header declaring getopt variables" >&5
16461 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16462 if test "${cf_cv_getopt_header+set}" = set; then
16463   echo $ECHO_N "(cached) $ECHO_C" >&6
16464 else
16465
16466 cf_cv_getopt_header=none
16467 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16468 do
16469 cat >conftest.$ac_ext <<_ACEOF
16470 #line 16470 "configure"
16471 #include "confdefs.h"
16472
16473 #include <$cf_header>
16474 int
16475 main (void)
16476 {
16477 int x = optind; char *y = optarg
16478   ;
16479   return 0;
16480 }
16481 _ACEOF
16482 rm -f conftest.$ac_objext
16483 if { (eval echo "$as_me:16483: \"$ac_compile\"") >&5
16484   (eval $ac_compile) 2>&5
16485   ac_status=$?
16486   echo "$as_me:16486: \$? = $ac_status" >&5
16487   (exit $ac_status); } &&
16488          { ac_try='test -s conftest.$ac_objext'
16489   { (eval echo "$as_me:16489: \"$ac_try\"") >&5
16490   (eval $ac_try) 2>&5
16491   ac_status=$?
16492   echo "$as_me:16492: \$? = $ac_status" >&5
16493   (exit $ac_status); }; }; then
16494   cf_cv_getopt_header=$cf_header
16495  break
16496 else
16497   echo "$as_me: failed program was:" >&5
16498 cat conftest.$ac_ext >&5
16499 fi
16500 rm -f conftest.$ac_objext conftest.$ac_ext
16501 done
16502
16503 fi
16504 echo "$as_me:16504: result: $cf_cv_getopt_header" >&5
16505 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16506 if test $cf_cv_getopt_header != none ; then
16507
16508 cat >>confdefs.h <<\EOF
16509 #define HAVE_GETOPT_HEADER 1
16510 EOF
16511
16512 fi
16513 if test $cf_cv_getopt_header = getopt.h ; then
16514
16515 cat >>confdefs.h <<\EOF
16516 #define NEED_GETOPT_H 1
16517 EOF
16518
16519 fi
16520
16521 # check for ISC (this may also define _POSIX_SOURCE)
16522 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16523 if test "x$ISC" = xyes ; then
16524
16525 echo "$as_me:16525: checking for main in -lcposix" >&5
16526 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16527 if test "${ac_cv_lib_cposix_main+set}" = set; then
16528   echo $ECHO_N "(cached) $ECHO_C" >&6
16529 else
16530   ac_check_lib_save_LIBS=$LIBS
16531 LIBS="-lcposix  $LIBS"
16532 cat >conftest.$ac_ext <<_ACEOF
16533 #line 16533 "configure"
16534 #include "confdefs.h"
16535
16536 int
16537 main (void)
16538 {
16539 main ();
16540   ;
16541   return 0;
16542 }
16543 _ACEOF
16544 rm -f conftest.$ac_objext conftest$ac_exeext
16545 if { (eval echo "$as_me:16545: \"$ac_link\"") >&5
16546   (eval $ac_link) 2>&5
16547   ac_status=$?
16548   echo "$as_me:16548: \$? = $ac_status" >&5
16549   (exit $ac_status); } &&
16550          { ac_try='test -s conftest$ac_exeext'
16551   { (eval echo "$as_me:16551: \"$ac_try\"") >&5
16552   (eval $ac_try) 2>&5
16553   ac_status=$?
16554   echo "$as_me:16554: \$? = $ac_status" >&5
16555   (exit $ac_status); }; }; then
16556   ac_cv_lib_cposix_main=yes
16557 else
16558   echo "$as_me: failed program was:" >&5
16559 cat conftest.$ac_ext >&5
16560 ac_cv_lib_cposix_main=no
16561 fi
16562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16563 LIBS=$ac_check_lib_save_LIBS
16564 fi
16565 echo "$as_me:16565: result: $ac_cv_lib_cposix_main" >&5
16566 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16567 if test $ac_cv_lib_cposix_main = yes; then
16568   cat >>confdefs.h <<EOF
16569 #define HAVE_LIBCPOSIX 1
16570 EOF
16571
16572   LIBS="-lcposix $LIBS"
16573
16574 fi
16575
16576         echo "$as_me:16576: checking for bzero in -linet" >&5
16577 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16578 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16579   echo $ECHO_N "(cached) $ECHO_C" >&6
16580 else
16581   ac_check_lib_save_LIBS=$LIBS
16582 LIBS="-linet  $LIBS"
16583 cat >conftest.$ac_ext <<_ACEOF
16584 #line 16584 "configure"
16585 #include "confdefs.h"
16586
16587 /* Override any gcc2 internal prototype to avoid an error.  */
16588 #ifdef __cplusplus
16589 extern "C"
16590 #endif
16591 /* We use char because int might match the return type of a gcc2
16592    builtin and then its argument prototype would still apply.  */
16593 char bzero ();
16594 int
16595 main (void)
16596 {
16597 bzero ();
16598   ;
16599   return 0;
16600 }
16601 _ACEOF
16602 rm -f conftest.$ac_objext conftest$ac_exeext
16603 if { (eval echo "$as_me:16603: \"$ac_link\"") >&5
16604   (eval $ac_link) 2>&5
16605   ac_status=$?
16606   echo "$as_me:16606: \$? = $ac_status" >&5
16607   (exit $ac_status); } &&
16608          { ac_try='test -s conftest$ac_exeext'
16609   { (eval echo "$as_me:16609: \"$ac_try\"") >&5
16610   (eval $ac_try) 2>&5
16611   ac_status=$?
16612   echo "$as_me:16612: \$? = $ac_status" >&5
16613   (exit $ac_status); }; }; then
16614   ac_cv_lib_inet_bzero=yes
16615 else
16616   echo "$as_me: failed program was:" >&5
16617 cat conftest.$ac_ext >&5
16618 ac_cv_lib_inet_bzero=no
16619 fi
16620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16621 LIBS=$ac_check_lib_save_LIBS
16622 fi
16623 echo "$as_me:16623: result: $ac_cv_lib_inet_bzero" >&5
16624 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16625 if test $ac_cv_lib_inet_bzero = yes; then
16626
16627 cf_add_libs="-linet"
16628 # Filter out duplicates - this happens with badly-designed ".pc" files...
16629 for cf_add_1lib in $LIBS
16630 do
16631         for cf_add_2lib in $cf_add_libs
16632         do
16633                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16634                 then
16635                         cf_add_1lib=
16636                         break
16637                 fi
16638         done
16639         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16640 done
16641 LIBS="$cf_add_libs"
16642
16643 fi
16644 fi
16645
16646 echo "$as_me:16646: checking if sys/time.h works with sys/select.h" >&5
16647 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16648 if test "${cf_cv_sys_time_select+set}" = set; then
16649   echo $ECHO_N "(cached) $ECHO_C" >&6
16650 else
16651
16652 cat >conftest.$ac_ext <<_ACEOF
16653 #line 16653 "configure"
16654 #include "confdefs.h"
16655
16656 #include <sys/types.h>
16657 #ifdef HAVE_SYS_TIME_H
16658 #include <sys/time.h>
16659 #endif
16660 #ifdef HAVE_SYS_SELECT_H
16661 #include <sys/select.h>
16662 #endif
16663
16664 int
16665 main (void)
16666 {
16667
16668   ;
16669   return 0;
16670 }
16671 _ACEOF
16672 rm -f conftest.$ac_objext
16673 if { (eval echo "$as_me:16673: \"$ac_compile\"") >&5
16674   (eval $ac_compile) 2>&5
16675   ac_status=$?
16676   echo "$as_me:16676: \$? = $ac_status" >&5
16677   (exit $ac_status); } &&
16678          { ac_try='test -s conftest.$ac_objext'
16679   { (eval echo "$as_me:16679: \"$ac_try\"") >&5
16680   (eval $ac_try) 2>&5
16681   ac_status=$?
16682   echo "$as_me:16682: \$? = $ac_status" >&5
16683   (exit $ac_status); }; }; then
16684   cf_cv_sys_time_select=yes
16685 else
16686   echo "$as_me: failed program was:" >&5
16687 cat conftest.$ac_ext >&5
16688 cf_cv_sys_time_select=no
16689 fi
16690 rm -f conftest.$ac_objext conftest.$ac_ext
16691
16692 fi
16693
16694 echo "$as_me:16694: result: $cf_cv_sys_time_select" >&5
16695 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16696 test "$cf_cv_sys_time_select" = yes &&
16697 cat >>confdefs.h <<\EOF
16698 #define HAVE_SYS_TIME_SELECT 1
16699 EOF
16700
16701 ###     checks for compiler characteristics
16702 ac_ext=c
16703 ac_cpp='$CPP $CPPFLAGS'
16704 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16705 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16706 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16707 ac_main_return=return
16708
16709 echo "$as_me:16709: checking for an ANSI C-conforming const" >&5
16710 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16711 if test "${ac_cv_c_const+set}" = set; then
16712   echo $ECHO_N "(cached) $ECHO_C" >&6
16713 else
16714   cat >conftest.$ac_ext <<_ACEOF
16715 #line 16715 "configure"
16716 #include "confdefs.h"
16717
16718 int
16719 main (void)
16720 {
16721 /* FIXME: Include the comments suggested by Paul. */
16722 #ifndef __cplusplus
16723   /* Ultrix mips cc rejects this.  */
16724   typedef int charset[2];
16725   const charset x;
16726   /* SunOS 4.1.1 cc rejects this.  */
16727   char const *const *ccp;
16728   char **p;
16729   /* NEC SVR4.0.2 mips cc rejects this.  */
16730   struct point {int x, y;};
16731   static struct point const zero = {0,0};
16732   /* AIX XL C 1.02.0.0 rejects this.
16733      It does not let you subtract one const X* pointer from another in
16734      an arm of an if-expression whose if-part is not a constant
16735      expression */
16736   const char *g = "string";
16737   ccp = &g + (g ? g-g : 0);
16738   /* HPUX 7.0 cc rejects these. */
16739   ++ccp;
16740   p = (char**) ccp;
16741   ccp = (char const *const *) p;
16742   { /* SCO 3.2v4 cc rejects this.  */
16743     char *t;
16744     char const *s = 0 ? (char *) 0 : (char const *) 0;
16745
16746     *t++ = 0;
16747   }
16748   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16749     int x[] = {25, 17};
16750     const int *foo = &x[0];
16751     ++foo;
16752   }
16753   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16754     typedef const int *iptr;
16755     iptr p = 0;
16756     ++p;
16757   }
16758   { /* AIX XL C 1.02.0.0 rejects this saying
16759        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16760     struct s { int j; const int *ap[3]; };
16761     struct s *b; b->j = 5;
16762   }
16763   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16764     const int foo = 10;
16765   }
16766 #endif
16767
16768   ;
16769   return 0;
16770 }
16771 _ACEOF
16772 rm -f conftest.$ac_objext
16773 if { (eval echo "$as_me:16773: \"$ac_compile\"") >&5
16774   (eval $ac_compile) 2>&5
16775   ac_status=$?
16776   echo "$as_me:16776: \$? = $ac_status" >&5
16777   (exit $ac_status); } &&
16778          { ac_try='test -s conftest.$ac_objext'
16779   { (eval echo "$as_me:16779: \"$ac_try\"") >&5
16780   (eval $ac_try) 2>&5
16781   ac_status=$?
16782   echo "$as_me:16782: \$? = $ac_status" >&5
16783   (exit $ac_status); }; }; then
16784   ac_cv_c_const=yes
16785 else
16786   echo "$as_me: failed program was:" >&5
16787 cat conftest.$ac_ext >&5
16788 ac_cv_c_const=no
16789 fi
16790 rm -f conftest.$ac_objext conftest.$ac_ext
16791 fi
16792 echo "$as_me:16792: result: $ac_cv_c_const" >&5
16793 echo "${ECHO_T}$ac_cv_c_const" >&6
16794 if test $ac_cv_c_const = no; then
16795
16796 cat >>confdefs.h <<\EOF
16797 #define const
16798 EOF
16799
16800 fi
16801
16802 echo "$as_me:16802: checking for inline" >&5
16803 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16804 if test "${ac_cv_c_inline+set}" = set; then
16805   echo $ECHO_N "(cached) $ECHO_C" >&6
16806 else
16807   ac_cv_c_inline=no
16808 for ac_kw in inline __inline__ __inline; do
16809   cat >conftest.$ac_ext <<_ACEOF
16810 #line 16810 "configure"
16811 #include "confdefs.h"
16812 #ifndef __cplusplus
16813 static $ac_kw int static_foo () {return 0; }
16814 $ac_kw int foo () {return 0; }
16815 #endif
16816
16817 _ACEOF
16818 rm -f conftest.$ac_objext
16819 if { (eval echo "$as_me:16819: \"$ac_compile\"") >&5
16820   (eval $ac_compile) 2>&5
16821   ac_status=$?
16822   echo "$as_me:16822: \$? = $ac_status" >&5
16823   (exit $ac_status); } &&
16824          { ac_try='test -s conftest.$ac_objext'
16825   { (eval echo "$as_me:16825: \"$ac_try\"") >&5
16826   (eval $ac_try) 2>&5
16827   ac_status=$?
16828   echo "$as_me:16828: \$? = $ac_status" >&5
16829   (exit $ac_status); }; }; then
16830   ac_cv_c_inline=$ac_kw; break
16831 else
16832   echo "$as_me: failed program was:" >&5
16833 cat conftest.$ac_ext >&5
16834 fi
16835 rm -f conftest.$ac_objext conftest.$ac_ext
16836 done
16837
16838 fi
16839 echo "$as_me:16839: result: $ac_cv_c_inline" >&5
16840 echo "${ECHO_T}$ac_cv_c_inline" >&6
16841 case $ac_cv_c_inline in
16842   inline | yes) ;;
16843   no)
16844 cat >>confdefs.h <<\EOF
16845 #define inline
16846 EOF
16847  ;;
16848   *)  cat >>confdefs.h <<EOF
16849 #define inline $ac_cv_c_inline
16850 EOF
16851  ;;
16852 esac
16853
16854 NCURSES_INLINE=
16855 if test "$ac_cv_c_inline" != no ; then
16856         NCURSES_INLINE=inline
16857         if test "$INTEL_COMPILER" = yes
16858         then
16859                 :
16860         elif test "$CLANG_COMPILER" = yes
16861         then
16862                 :
16863         elif test "$GCC" = yes
16864         then
16865                 echo "$as_me:16865: checking if $CC supports options to tune inlining" >&5
16866 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16867 if test "${cf_cv_gcc_inline+set}" = set; then
16868   echo $ECHO_N "(cached) $ECHO_C" >&6
16869 else
16870
16871                 cf_save_CFLAGS=$CFLAGS
16872                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16873                 cat >conftest.$ac_ext <<_ACEOF
16874 #line 16874 "configure"
16875 #include "confdefs.h"
16876 inline int foo(void) { return 1; }
16877 int
16878 main (void)
16879 {
16880 ${cf_cv_main_return:-return} foo()
16881   ;
16882   return 0;
16883 }
16884 _ACEOF
16885 rm -f conftest.$ac_objext
16886 if { (eval echo "$as_me:16886: \"$ac_compile\"") >&5
16887   (eval $ac_compile) 2>&5
16888   ac_status=$?
16889   echo "$as_me:16889: \$? = $ac_status" >&5
16890   (exit $ac_status); } &&
16891          { ac_try='test -s conftest.$ac_objext'
16892   { (eval echo "$as_me:16892: \"$ac_try\"") >&5
16893   (eval $ac_try) 2>&5
16894   ac_status=$?
16895   echo "$as_me:16895: \$? = $ac_status" >&5
16896   (exit $ac_status); }; }; then
16897   cf_cv_gcc_inline=yes
16898 else
16899   echo "$as_me: failed program was:" >&5
16900 cat conftest.$ac_ext >&5
16901 cf_cv_gcc_inline=no
16902 fi
16903 rm -f conftest.$ac_objext conftest.$ac_ext
16904                 CFLAGS=$cf_save_CFLAGS
16905
16906 fi
16907 echo "$as_me:16907: result: $cf_cv_gcc_inline" >&5
16908 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16909                 if test "$cf_cv_gcc_inline" = yes ; then
16910
16911 cf_fix_cppflags=no
16912 cf_new_cflags=
16913 cf_new_cppflags=
16914 cf_new_extra_cppflags=
16915
16916 for cf_add_cflags in --param max-inline-insns-single=1200
16917 do
16918 case $cf_fix_cppflags in
16919 (no)
16920         case $cf_add_cflags in
16921         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16922                 case $cf_add_cflags in
16923                 (-D*)
16924                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16925
16926                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16927                                 && test -z "${cf_tst_cflags}" \
16928                                 && cf_fix_cppflags=yes
16929
16930                         if test $cf_fix_cppflags = yes ; then
16931
16932         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16933         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16934
16935                                 continue
16936                         elif test "${cf_tst_cflags}" = "\"'" ; then
16937
16938         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16939         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16940
16941                                 continue
16942                         fi
16943                         ;;
16944                 esac
16945                 case "$CPPFLAGS" in
16946                 (*$cf_add_cflags)
16947                         ;;
16948                 (*)
16949                         case $cf_add_cflags in
16950                         (-D*)
16951                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16952
16953 CPPFLAGS=`echo "$CPPFLAGS" | \
16954         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16955                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16956
16957                                 ;;
16958                         esac
16959
16960         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16961         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16962
16963                         ;;
16964                 esac
16965                 ;;
16966         (*)
16967
16968         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16969         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16970
16971                 ;;
16972         esac
16973         ;;
16974 (yes)
16975
16976         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16977         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16978
16979         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16980
16981         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16982                 && test -z "${cf_tst_cflags}" \
16983                 && cf_fix_cppflags=no
16984         ;;
16985 esac
16986 done
16987
16988 if test -n "$cf_new_cflags" ; then
16989
16990         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16991         CFLAGS="${CFLAGS}$cf_new_cflags"
16992
16993 fi
16994
16995 if test -n "$cf_new_cppflags" ; then
16996
16997         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16998         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16999
17000 fi
17001
17002 if test -n "$cf_new_extra_cppflags" ; then
17003
17004         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17005         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17006
17007 fi
17008
17009                 fi
17010         fi
17011 fi
17012
17013 echo "$as_me:17013: checking for signal global datatype" >&5
17014 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
17015 if test "${cf_cv_sig_atomic_t+set}" = set; then
17016   echo $ECHO_N "(cached) $ECHO_C" >&6
17017 else
17018
17019         for cf_type in \
17020                 "volatile sig_atomic_t" \
17021                 "sig_atomic_t" \
17022                 "int"
17023         do
17024         cat >conftest.$ac_ext <<_ACEOF
17025 #line 17025 "configure"
17026 #include "confdefs.h"
17027
17028 #include <sys/types.h>
17029 #include <signal.h>
17030 #include <stdio.h>
17031
17032 extern $cf_type x;
17033 $cf_type x;
17034 static void handler(int sig)
17035 {
17036         x = 5;
17037 }
17038 int
17039 main (void)
17040 {
17041 signal(SIGINT, handler);
17042                  x = 1
17043   ;
17044   return 0;
17045 }
17046 _ACEOF
17047 rm -f conftest.$ac_objext
17048 if { (eval echo "$as_me:17048: \"$ac_compile\"") >&5
17049   (eval $ac_compile) 2>&5
17050   ac_status=$?
17051   echo "$as_me:17051: \$? = $ac_status" >&5
17052   (exit $ac_status); } &&
17053          { ac_try='test -s conftest.$ac_objext'
17054   { (eval echo "$as_me:17054: \"$ac_try\"") >&5
17055   (eval $ac_try) 2>&5
17056   ac_status=$?
17057   echo "$as_me:17057: \$? = $ac_status" >&5
17058   (exit $ac_status); }; }; then
17059   cf_cv_sig_atomic_t=$cf_type
17060 else
17061   echo "$as_me: failed program was:" >&5
17062 cat conftest.$ac_ext >&5
17063 cf_cv_sig_atomic_t=no
17064 fi
17065 rm -f conftest.$ac_objext conftest.$ac_ext
17066                 test "$cf_cv_sig_atomic_t" != no && break
17067         done
17068
17069 fi
17070
17071 echo "$as_me:17071: result: $cf_cv_sig_atomic_t" >&5
17072 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
17073 test "$cf_cv_sig_atomic_t" != no &&
17074 cat >>confdefs.h <<EOF
17075 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
17076 EOF
17077
17078 if test $NCURSES_CHTYPE = auto ; then
17079
17080 echo "$as_me:17080: checking for type of chtype" >&5
17081 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
17082 if test "${cf_cv_typeof_chtype+set}" = set; then
17083   echo $ECHO_N "(cached) $ECHO_C" >&6
17084 else
17085
17086                 if test "$cross_compiling" = yes; then
17087   cf_cv_typeof_chtype=long
17088 else
17089   cat >conftest.$ac_ext <<_ACEOF
17090 #line 17090 "configure"
17091 #include "confdefs.h"
17092
17093 #define WANT_BITS 31
17094 #include <stdio.h>
17095 int main(void)
17096 {
17097         FILE *fp = fopen("cf_test.out", "w");
17098         if (fp != 0) {
17099                 char *result = "long";
17100                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
17101                         int n;
17102                         unsigned int x, y;
17103                         for (n = 0; n < WANT_BITS; n++) {
17104                                 x = (1 << n);
17105                                 y = (x >> n);
17106                                 if (y != 1 || x == 0) {
17107                                         x = 0;
17108                                         break;
17109                                 }
17110                         }
17111                         /*
17112                          * If x is nonzero, an int is big enough for the bits
17113                          * that we want.
17114                          */
17115                         result = (x != 0) ? "int" : "long";
17116                 }
17117                 fputs(result, fp);
17118                 fclose(fp);
17119         }
17120         ${cf_cv_main_return:-return}(0);
17121 }
17122
17123 _ACEOF
17124 rm -f conftest$ac_exeext
17125 if { (eval echo "$as_me:17125: \"$ac_link\"") >&5
17126   (eval $ac_link) 2>&5
17127   ac_status=$?
17128   echo "$as_me:17128: \$? = $ac_status" >&5
17129   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17130   { (eval echo "$as_me:17130: \"$ac_try\"") >&5
17131   (eval $ac_try) 2>&5
17132   ac_status=$?
17133   echo "$as_me:17133: \$? = $ac_status" >&5
17134   (exit $ac_status); }; }; then
17135   cf_cv_typeof_chtype=`cat cf_test.out`
17136 else
17137   echo "$as_me: program exited with status $ac_status" >&5
17138 echo "$as_me: failed program was:" >&5
17139 cat conftest.$ac_ext >&5
17140 cf_cv_typeof_chtype=long
17141 fi
17142 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17143 fi
17144                 rm -f cf_test.out
17145
17146 fi
17147
17148 echo "$as_me:17148: result: $cf_cv_typeof_chtype" >&5
17149 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17150
17151 cat >>confdefs.h <<EOF
17152 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17153 EOF
17154
17155 else
17156         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17157 fi
17158 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17159
17160 echo "$as_me:17160: checking if unsigned literals are legal" >&5
17161 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17162 if test "${cf_cv_unsigned_literals+set}" = set; then
17163   echo $ECHO_N "(cached) $ECHO_C" >&6
17164 else
17165
17166         cat >conftest.$ac_ext <<_ACEOF
17167 #line 17167 "configure"
17168 #include "confdefs.h"
17169
17170 int
17171 main (void)
17172 {
17173 long x = 1L + 1UL + 1U + 1
17174   ;
17175   return 0;
17176 }
17177 _ACEOF
17178 rm -f conftest.$ac_objext
17179 if { (eval echo "$as_me:17179: \"$ac_compile\"") >&5
17180   (eval $ac_compile) 2>&5
17181   ac_status=$?
17182   echo "$as_me:17182: \$? = $ac_status" >&5
17183   (exit $ac_status); } &&
17184          { ac_try='test -s conftest.$ac_objext'
17185   { (eval echo "$as_me:17185: \"$ac_try\"") >&5
17186   (eval $ac_try) 2>&5
17187   ac_status=$?
17188   echo "$as_me:17188: \$? = $ac_status" >&5
17189   (exit $ac_status); }; }; then
17190   cf_cv_unsigned_literals=yes
17191 else
17192   echo "$as_me: failed program was:" >&5
17193 cat conftest.$ac_ext >&5
17194 cf_cv_unsigned_literals=no
17195 fi
17196 rm -f conftest.$ac_objext conftest.$ac_ext
17197
17198 fi
17199
17200 echo "$as_me:17200: result: $cf_cv_unsigned_literals" >&5
17201 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17202
17203 cf_cv_1UL="1"
17204 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17205 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17206
17207 if test $NCURSES_MMASK_T = auto ; then
17208         cf_cv_typeof_mmask_t=long
17209 else
17210         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17211 fi
17212 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17213
17214 ###     Checks for external-data
17215
17216 echo "$as_me:17216: checking if external errno is declared" >&5
17217 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17218 if test "${cf_cv_dcl_errno+set}" = set; then
17219   echo $ECHO_N "(cached) $ECHO_C" >&6
17220 else
17221
17222         cat >conftest.$ac_ext <<_ACEOF
17223 #line 17223 "configure"
17224 #include "confdefs.h"
17225
17226 #ifdef HAVE_STDLIB_H
17227 #include <stdlib.h>
17228 #endif
17229 #include <stdio.h>
17230 #include <sys/types.h>
17231 #include <errno.h>
17232 int
17233 main (void)
17234 {
17235 int x = (int) errno
17236   ;
17237   return 0;
17238 }
17239 _ACEOF
17240 rm -f conftest.$ac_objext
17241 if { (eval echo "$as_me:17241: \"$ac_compile\"") >&5
17242   (eval $ac_compile) 2>&5
17243   ac_status=$?
17244   echo "$as_me:17244: \$? = $ac_status" >&5
17245   (exit $ac_status); } &&
17246          { ac_try='test -s conftest.$ac_objext'
17247   { (eval echo "$as_me:17247: \"$ac_try\"") >&5
17248   (eval $ac_try) 2>&5
17249   ac_status=$?
17250   echo "$as_me:17250: \$? = $ac_status" >&5
17251   (exit $ac_status); }; }; then
17252   cf_cv_dcl_errno=yes
17253 else
17254   echo "$as_me: failed program was:" >&5
17255 cat conftest.$ac_ext >&5
17256 cf_cv_dcl_errno=no
17257 fi
17258 rm -f conftest.$ac_objext conftest.$ac_ext
17259
17260 fi
17261 echo "$as_me:17261: result: $cf_cv_dcl_errno" >&5
17262 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17263
17264 if test "$cf_cv_dcl_errno" = no ; then
17265
17266 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17267
17268         cat >>confdefs.h <<EOF
17269 #define $cf_result 1
17270 EOF
17271
17272 fi
17273
17274 # It's possible (for near-UNIX clones) that the data doesn't exist
17275
17276 echo "$as_me:17276: checking if external errno exists" >&5
17277 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17278 if test "${cf_cv_have_errno+set}" = set; then
17279   echo $ECHO_N "(cached) $ECHO_C" >&6
17280 else
17281
17282         cat >conftest.$ac_ext <<_ACEOF
17283 #line 17283 "configure"
17284 #include "confdefs.h"
17285
17286 #undef errno
17287 extern int errno;
17288
17289 int
17290 main (void)
17291 {
17292 errno = 2
17293   ;
17294   return 0;
17295 }
17296 _ACEOF
17297 rm -f conftest.$ac_objext conftest$ac_exeext
17298 if { (eval echo "$as_me:17298: \"$ac_link\"") >&5
17299   (eval $ac_link) 2>&5
17300   ac_status=$?
17301   echo "$as_me:17301: \$? = $ac_status" >&5
17302   (exit $ac_status); } &&
17303          { ac_try='test -s conftest$ac_exeext'
17304   { (eval echo "$as_me:17304: \"$ac_try\"") >&5
17305   (eval $ac_try) 2>&5
17306   ac_status=$?
17307   echo "$as_me:17307: \$? = $ac_status" >&5
17308   (exit $ac_status); }; }; then
17309   cf_cv_have_errno=yes
17310 else
17311   echo "$as_me: failed program was:" >&5
17312 cat conftest.$ac_ext >&5
17313 cf_cv_have_errno=no
17314 fi
17315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17316
17317 fi
17318 echo "$as_me:17318: result: $cf_cv_have_errno" >&5
17319 echo "${ECHO_T}$cf_cv_have_errno" >&6
17320
17321 if test "$cf_cv_have_errno" = yes ; then
17322
17323 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17324
17325         cat >>confdefs.h <<EOF
17326 #define $cf_result 1
17327 EOF
17328
17329 fi
17330
17331 echo "$as_me:17331: checking if data-only library module links" >&5
17332 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17333 if test "${cf_cv_link_dataonly+set}" = set; then
17334   echo $ECHO_N "(cached) $ECHO_C" >&6
17335 else
17336
17337         rm -f conftest.a
17338         cat >conftest.$ac_ext <<EOF
17339 #line 17339 "configure"
17340 int     testdata[3] = { 123, 456, 789 };
17341 EOF
17342         if { (eval echo "$as_me:17342: \"$ac_compile\"") >&5
17343   (eval $ac_compile) 2>&5
17344   ac_status=$?
17345   echo "$as_me:17345: \$? = $ac_status" >&5
17346   (exit $ac_status); } ; then
17347                 mv conftest.o data.o && \
17348                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17349         fi
17350         rm -f conftest.$ac_ext data.o
17351         cat >conftest.$ac_ext <<EOF
17352 #line 17352 "configure"
17353 int     testfunc(void)
17354 {
17355 #if defined(NeXT)
17356         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17357 #else
17358         extern int testdata[3];
17359         return testdata[0] == 123
17360            &&  testdata[1] == 456
17361            &&  testdata[2] == 789;
17362 #endif
17363 }
17364 EOF
17365         if { (eval echo "$as_me:17365: \"$ac_compile\"") >&5
17366   (eval $ac_compile) 2>&5
17367   ac_status=$?
17368   echo "$as_me:17368: \$? = $ac_status" >&5
17369   (exit $ac_status); }; then
17370                 mv conftest.o func.o && \
17371                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17372         fi
17373         rm -f conftest.$ac_ext func.o
17374         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17375         cf_saveLIBS="$LIBS"
17376         LIBS="conftest.a $LIBS"
17377         if test "$cross_compiling" = yes; then
17378   cf_cv_link_dataonly=unknown
17379 else
17380   cat >conftest.$ac_ext <<_ACEOF
17381 #line 17381 "configure"
17382 #include "confdefs.h"
17383
17384         int main(void)
17385         {
17386                 extern int testfunc();
17387                 ${cf_cv_main_return:-return} (!testfunc());
17388         }
17389
17390 _ACEOF
17391 rm -f conftest$ac_exeext
17392 if { (eval echo "$as_me:17392: \"$ac_link\"") >&5
17393   (eval $ac_link) 2>&5
17394   ac_status=$?
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17397   { (eval echo "$as_me:17397: \"$ac_try\"") >&5
17398   (eval $ac_try) 2>&5
17399   ac_status=$?
17400   echo "$as_me:17400: \$? = $ac_status" >&5
17401   (exit $ac_status); }; }; then
17402   cf_cv_link_dataonly=yes
17403 else
17404   echo "$as_me: program exited with status $ac_status" >&5
17405 echo "$as_me: failed program was:" >&5
17406 cat conftest.$ac_ext >&5
17407 cf_cv_link_dataonly=no
17408 fi
17409 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17410 fi
17411         LIBS="$cf_saveLIBS"
17412
17413 fi
17414
17415 echo "$as_me:17415: result: $cf_cv_link_dataonly" >&5
17416 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17417
17418 if test "$cf_cv_link_dataonly" = no ; then
17419
17420 cat >>confdefs.h <<\EOF
17421 #define BROKEN_LINKER 1
17422 EOF
17423
17424         BROKEN_LINKER=1
17425 fi
17426
17427 ###     Checks for library functions.
17428
17429 for ac_func in \
17430 getcwd \
17431 getegid \
17432 geteuid \
17433 getopt \
17434 getttynam \
17435 issetugid \
17436 poll \
17437 putenv \
17438 remove \
17439 select \
17440 setbuf \
17441 setbuffer \
17442 setenv \
17443 setvbuf \
17444 sigaction \
17445 sigvec \
17446 strdup \
17447 strstr \
17448 tcgetpgrp \
17449 tdestroy \
17450 times \
17451 tsearch \
17452 vsnprintf \
17453
17454 do
17455 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17456 echo "$as_me:17456: checking for $ac_func" >&5
17457 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17458 if eval "test \"\${$as_ac_var+set}\" = set"; then
17459   echo $ECHO_N "(cached) $ECHO_C" >&6
17460 else
17461   cat >conftest.$ac_ext <<_ACEOF
17462 #line 17462 "configure"
17463 #include "confdefs.h"
17464 /* System header to define __stub macros and hopefully few prototypes,
17465     which can conflict with char $ac_func (); below.  */
17466 #include <assert.h>
17467 /* Override any gcc2 internal prototype to avoid an error.  */
17468 #ifdef __cplusplus
17469 extern "C"
17470 #endif
17471 /* We use char because int might match the return type of a gcc2
17472    builtin and then its argument prototype would still apply.  */
17473 char $ac_func ();
17474 char (*f) ();
17475
17476 int
17477 main (void)
17478 {
17479 /* The GNU C library defines this for functions which it implements
17480     to always fail with ENOSYS.  Some functions are actually named
17481     something starting with __ and the normal name is an alias.  */
17482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17483 choke me
17484 #else
17485 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17486 #endif
17487
17488   ;
17489   return 0;
17490 }
17491 _ACEOF
17492 rm -f conftest.$ac_objext conftest$ac_exeext
17493 if { (eval echo "$as_me:17493: \"$ac_link\"") >&5
17494   (eval $ac_link) 2>&5
17495   ac_status=$?
17496   echo "$as_me:17496: \$? = $ac_status" >&5
17497   (exit $ac_status); } &&
17498          { ac_try='test -s conftest$ac_exeext'
17499   { (eval echo "$as_me:17499: \"$ac_try\"") >&5
17500   (eval $ac_try) 2>&5
17501   ac_status=$?
17502   echo "$as_me:17502: \$? = $ac_status" >&5
17503   (exit $ac_status); }; }; then
17504   eval "$as_ac_var=yes"
17505 else
17506   echo "$as_me: failed program was:" >&5
17507 cat conftest.$ac_ext >&5
17508 eval "$as_ac_var=no"
17509 fi
17510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17511 fi
17512 echo "$as_me:17512: result: `eval echo '${'$as_ac_var'}'`" >&5
17513 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17514 if test `eval echo '${'$as_ac_var'}'` = yes; then
17515   cat >>confdefs.h <<EOF
17516 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17517 EOF
17518
17519 fi
17520 done
17521
17522 if test "x$ac_cv_func_getopt" = xno && \
17523    test "x$cf_with_progs$cf_with_tests" != xnono; then
17524         { { echo "$as_me:17524: error: getopt is required for building programs" >&5
17525 echo "$as_me: error: getopt is required for building programs" >&2;}
17526    { (exit 1); exit 1; }; }
17527 fi
17528
17529 if test "x$with_getcap" = "xyes" ; then
17530
17531 echo "$as_me:17531: checking for terminal-capability database functions" >&5
17532 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17533 if test "${cf_cv_cgetent+set}" = set; then
17534   echo $ECHO_N "(cached) $ECHO_C" >&6
17535 else
17536
17537 cat >conftest.$ac_ext <<_ACEOF
17538 #line 17538 "configure"
17539 #include "confdefs.h"
17540
17541 #include <stdlib.h>
17542 int
17543 main (void)
17544 {
17545
17546         char temp[128];
17547         char *buf = temp;
17548         char *db_array = temp;
17549         cgetent(&buf, &db_array, "vt100");
17550         cgetcap(buf, "tc", '=');
17551         cgetmatch(buf, "tc");
17552
17553   ;
17554   return 0;
17555 }
17556 _ACEOF
17557 rm -f conftest.$ac_objext conftest$ac_exeext
17558 if { (eval echo "$as_me:17558: \"$ac_link\"") >&5
17559   (eval $ac_link) 2>&5
17560   ac_status=$?
17561   echo "$as_me:17561: \$? = $ac_status" >&5
17562   (exit $ac_status); } &&
17563          { ac_try='test -s conftest$ac_exeext'
17564   { (eval echo "$as_me:17564: \"$ac_try\"") >&5
17565   (eval $ac_try) 2>&5
17566   ac_status=$?
17567   echo "$as_me:17567: \$? = $ac_status" >&5
17568   (exit $ac_status); }; }; then
17569   cf_cv_cgetent=yes
17570 else
17571   echo "$as_me: failed program was:" >&5
17572 cat conftest.$ac_ext >&5
17573 cf_cv_cgetent=no
17574 fi
17575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17576
17577 fi
17578 echo "$as_me:17578: result: $cf_cv_cgetent" >&5
17579 echo "${ECHO_T}$cf_cv_cgetent" >&6
17580
17581 if test "$cf_cv_cgetent" = yes
17582 then
17583
17584 cat >>confdefs.h <<\EOF
17585 #define HAVE_BSD_CGETENT 1
17586 EOF
17587
17588 echo "$as_me:17588: checking if cgetent uses const parameter" >&5
17589 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17590 if test "${cf_cv_cgetent_const+set}" = set; then
17591   echo $ECHO_N "(cached) $ECHO_C" >&6
17592 else
17593
17594 cat >conftest.$ac_ext <<_ACEOF
17595 #line 17595 "configure"
17596 #include "confdefs.h"
17597
17598 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17599 #include <stdlib.h>
17600 int
17601 main (void)
17602 {
17603
17604         char temp[128];
17605         char *buf = temp;
17606 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17607         const char *db_array = temp;
17608         cgetent(&buf, &db_array, "vt100");
17609 #endif
17610         cgetcap(buf, "tc", '=');
17611         cgetmatch(buf, "tc");
17612
17613   ;
17614   return 0;
17615 }
17616 _ACEOF
17617 rm -f conftest.$ac_objext conftest$ac_exeext
17618 if { (eval echo "$as_me:17618: \"$ac_link\"") >&5
17619   (eval $ac_link) 2>&5
17620   ac_status=$?
17621   echo "$as_me:17621: \$? = $ac_status" >&5
17622   (exit $ac_status); } &&
17623          { ac_try='test -s conftest$ac_exeext'
17624   { (eval echo "$as_me:17624: \"$ac_try\"") >&5
17625   (eval $ac_try) 2>&5
17626   ac_status=$?
17627   echo "$as_me:17627: \$? = $ac_status" >&5
17628   (exit $ac_status); }; }; then
17629   cf_cv_cgetent_const=yes
17630 else
17631   echo "$as_me: failed program was:" >&5
17632 cat conftest.$ac_ext >&5
17633 cf_cv_cgetent_const=no
17634 fi
17635 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17636
17637 fi
17638 echo "$as_me:17638: result: $cf_cv_cgetent_const" >&5
17639 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17640         if test "$cf_cv_cgetent_const" = yes
17641         then
17642
17643 cat >>confdefs.h <<EOF
17644 #define CGETENT_CONST const
17645 EOF
17646
17647         fi
17648 fi
17649
17650 fi
17651
17652 echo "$as_me:17652: checking for isascii" >&5
17653 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17654 if test "${cf_cv_have_isascii+set}" = set; then
17655   echo $ECHO_N "(cached) $ECHO_C" >&6
17656 else
17657
17658         cat >conftest.$ac_ext <<_ACEOF
17659 #line 17659 "configure"
17660 #include "confdefs.h"
17661 #include <ctype.h>
17662 int
17663 main (void)
17664 {
17665 int x = isascii(' ')
17666   ;
17667   return 0;
17668 }
17669 _ACEOF
17670 rm -f conftest.$ac_objext conftest$ac_exeext
17671 if { (eval echo "$as_me:17671: \"$ac_link\"") >&5
17672   (eval $ac_link) 2>&5
17673   ac_status=$?
17674   echo "$as_me:17674: \$? = $ac_status" >&5
17675   (exit $ac_status); } &&
17676          { ac_try='test -s conftest$ac_exeext'
17677   { (eval echo "$as_me:17677: \"$ac_try\"") >&5
17678   (eval $ac_try) 2>&5
17679   ac_status=$?
17680   echo "$as_me:17680: \$? = $ac_status" >&5
17681   (exit $ac_status); }; }; then
17682   cf_cv_have_isascii=yes
17683 else
17684   echo "$as_me: failed program was:" >&5
17685 cat conftest.$ac_ext >&5
17686 cf_cv_have_isascii=no
17687 fi
17688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17689
17690 fi
17691 echo "$as_me:17691: result: $cf_cv_have_isascii" >&5
17692 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17693 test "$cf_cv_have_isascii" = yes &&
17694 cat >>confdefs.h <<\EOF
17695 #define HAVE_ISASCII 1
17696 EOF
17697
17698 if test "$ac_cv_func_sigaction" = yes; then
17699 echo "$as_me:17699: checking whether sigaction needs _POSIX_SOURCE" >&5
17700 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17701 cat >conftest.$ac_ext <<_ACEOF
17702 #line 17702 "configure"
17703 #include "confdefs.h"
17704
17705 #include <sys/types.h>
17706 #include <signal.h>
17707 int
17708 main (void)
17709 {
17710 struct sigaction act
17711   ;
17712   return 0;
17713 }
17714 _ACEOF
17715 rm -f conftest.$ac_objext
17716 if { (eval echo "$as_me:17716: \"$ac_compile\"") >&5
17717   (eval $ac_compile) 2>&5
17718   ac_status=$?
17719   echo "$as_me:17719: \$? = $ac_status" >&5
17720   (exit $ac_status); } &&
17721          { ac_try='test -s conftest.$ac_objext'
17722   { (eval echo "$as_me:17722: \"$ac_try\"") >&5
17723   (eval $ac_try) 2>&5
17724   ac_status=$?
17725   echo "$as_me:17725: \$? = $ac_status" >&5
17726   (exit $ac_status); }; }; then
17727   sigact_bad=no
17728 else
17729   echo "$as_me: failed program was:" >&5
17730 cat conftest.$ac_ext >&5
17731
17732 cat >conftest.$ac_ext <<_ACEOF
17733 #line 17733 "configure"
17734 #include "confdefs.h"
17735
17736 #define _POSIX_SOURCE
17737 #include <sys/types.h>
17738 #include <signal.h>
17739 int
17740 main (void)
17741 {
17742 struct sigaction act
17743   ;
17744   return 0;
17745 }
17746 _ACEOF
17747 rm -f conftest.$ac_objext
17748 if { (eval echo "$as_me:17748: \"$ac_compile\"") >&5
17749   (eval $ac_compile) 2>&5
17750   ac_status=$?
17751   echo "$as_me:17751: \$? = $ac_status" >&5
17752   (exit $ac_status); } &&
17753          { ac_try='test -s conftest.$ac_objext'
17754   { (eval echo "$as_me:17754: \"$ac_try\"") >&5
17755   (eval $ac_try) 2>&5
17756   ac_status=$?
17757   echo "$as_me:17757: \$? = $ac_status" >&5
17758   (exit $ac_status); }; }; then
17759   sigact_bad=yes
17760
17761 cat >>confdefs.h <<\EOF
17762 #define _POSIX_SOURCE 1
17763 EOF
17764
17765 else
17766   echo "$as_me: failed program was:" >&5
17767 cat conftest.$ac_ext >&5
17768 sigact_bad=unknown
17769 fi
17770 rm -f conftest.$ac_objext conftest.$ac_ext
17771 fi
17772 rm -f conftest.$ac_objext conftest.$ac_ext
17773 echo "$as_me:17773: result: $sigact_bad" >&5
17774 echo "${ECHO_T}$sigact_bad" >&6
17775 fi
17776
17777 echo "$as_me:17777: checking if nanosleep really works" >&5
17778 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17779 if test "${cf_cv_func_nanosleep+set}" = set; then
17780   echo $ECHO_N "(cached) $ECHO_C" >&6
17781 else
17782
17783 if test "$cross_compiling" = yes; then
17784   cf_cv_func_nanosleep=unknown
17785 else
17786   cat >conftest.$ac_ext <<_ACEOF
17787 #line 17787 "configure"
17788 #include "confdefs.h"
17789
17790 #include <stdio.h>
17791 #include <errno.h>
17792 #include <time.h>
17793
17794 #ifdef HAVE_SYS_TIME_H
17795 #include <sys/time.h>
17796 #endif
17797
17798 int main(void) {
17799         struct timespec ts1, ts2;
17800         int code;
17801         ts1.tv_sec  = 0;
17802         ts1.tv_nsec = 750000000;
17803         ts2.tv_sec  = 0;
17804         ts2.tv_nsec = 0;
17805         errno = 0;
17806         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17807         ${cf_cv_main_return:-return}(code != 0);
17808 }
17809
17810 _ACEOF
17811 rm -f conftest$ac_exeext
17812 if { (eval echo "$as_me:17812: \"$ac_link\"") >&5
17813   (eval $ac_link) 2>&5
17814   ac_status=$?
17815   echo "$as_me:17815: \$? = $ac_status" >&5
17816   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17817   { (eval echo "$as_me:17817: \"$ac_try\"") >&5
17818   (eval $ac_try) 2>&5
17819   ac_status=$?
17820   echo "$as_me:17820: \$? = $ac_status" >&5
17821   (exit $ac_status); }; }; then
17822   cf_cv_func_nanosleep=yes
17823 else
17824   echo "$as_me: program exited with status $ac_status" >&5
17825 echo "$as_me: failed program was:" >&5
17826 cat conftest.$ac_ext >&5
17827 cf_cv_func_nanosleep=no
17828 fi
17829 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17830 fi
17831 fi
17832 echo "$as_me:17832: result: $cf_cv_func_nanosleep" >&5
17833 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17834
17835 test "$cf_cv_func_nanosleep" = "yes" &&
17836 cat >>confdefs.h <<\EOF
17837 #define HAVE_NANOSLEEP 1
17838 EOF
17839
17840 for ac_header in \
17841 termio.h \
17842 termios.h \
17843 unistd.h \
17844
17845 do
17846 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17847 echo "$as_me:17847: checking for $ac_header" >&5
17848 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17849 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17850   echo $ECHO_N "(cached) $ECHO_C" >&6
17851 else
17852   cat >conftest.$ac_ext <<_ACEOF
17853 #line 17853 "configure"
17854 #include "confdefs.h"
17855 #include <$ac_header>
17856 _ACEOF
17857 if { (eval echo "$as_me:17857: \"$ac_cpp conftest.$ac_ext\"") >&5
17858   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17859   ac_status=$?
17860   egrep -v '^ *\+' conftest.er1 >conftest.err
17861   rm -f conftest.er1
17862   cat conftest.err >&5
17863   echo "$as_me:17863: \$? = $ac_status" >&5
17864   (exit $ac_status); } >/dev/null; then
17865   if test -s conftest.err; then
17866     ac_cpp_err=$ac_c_preproc_warn_flag
17867   else
17868     ac_cpp_err=
17869   fi
17870 else
17871   ac_cpp_err=yes
17872 fi
17873 if test -z "$ac_cpp_err"; then
17874   eval "$as_ac_Header=yes"
17875 else
17876   echo "$as_me: failed program was:" >&5
17877   cat conftest.$ac_ext >&5
17878   eval "$as_ac_Header=no"
17879 fi
17880 rm -f conftest.err conftest.$ac_ext
17881 fi
17882 echo "$as_me:17882: result: `eval echo '${'$as_ac_Header'}'`" >&5
17883 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17884 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17885   cat >>confdefs.h <<EOF
17886 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17887 EOF
17888
17889 fi
17890 done
17891
17892 if test "$ISC" = yes ; then
17893
17894 for ac_header in sys/termio.h
17895 do
17896 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17897 echo "$as_me:17897: checking for $ac_header" >&5
17898 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17899 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17900   echo $ECHO_N "(cached) $ECHO_C" >&6
17901 else
17902   cat >conftest.$ac_ext <<_ACEOF
17903 #line 17903 "configure"
17904 #include "confdefs.h"
17905 #include <$ac_header>
17906 _ACEOF
17907 if { (eval echo "$as_me:17907: \"$ac_cpp conftest.$ac_ext\"") >&5
17908   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17909   ac_status=$?
17910   egrep -v '^ *\+' conftest.er1 >conftest.err
17911   rm -f conftest.er1
17912   cat conftest.err >&5
17913   echo "$as_me:17913: \$? = $ac_status" >&5
17914   (exit $ac_status); } >/dev/null; then
17915   if test -s conftest.err; then
17916     ac_cpp_err=$ac_c_preproc_warn_flag
17917   else
17918     ac_cpp_err=
17919   fi
17920 else
17921   ac_cpp_err=yes
17922 fi
17923 if test -z "$ac_cpp_err"; then
17924   eval "$as_ac_Header=yes"
17925 else
17926   echo "$as_me: failed program was:" >&5
17927   cat conftest.$ac_ext >&5
17928   eval "$as_ac_Header=no"
17929 fi
17930 rm -f conftest.err conftest.$ac_ext
17931 fi
17932 echo "$as_me:17932: result: `eval echo '${'$as_ac_Header'}'`" >&5
17933 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17934 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17935   cat >>confdefs.h <<EOF
17936 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17937 EOF
17938
17939 fi
17940 done
17941
17942 fi
17943 if test "$ac_cv_header_termios_h" = yes ; then
17944         case "$CFLAGS $CPPFLAGS" in
17945         (*-D_POSIX_SOURCE*)
17946                 termios_bad=dunno ;;
17947         (*)     termios_bad=maybe ;;
17948         esac
17949         if test "$termios_bad" = maybe ; then
17950         echo "$as_me:17950: checking whether termios.h needs _POSIX_SOURCE" >&5
17951 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17952         cat >conftest.$ac_ext <<_ACEOF
17953 #line 17953 "configure"
17954 #include "confdefs.h"
17955 #include <termios.h>
17956 int
17957 main (void)
17958 {
17959 struct termios foo; int x = foo.c_iflag
17960   ;
17961   return 0;
17962 }
17963 _ACEOF
17964 rm -f conftest.$ac_objext
17965 if { (eval echo "$as_me:17965: \"$ac_compile\"") >&5
17966   (eval $ac_compile) 2>&5
17967   ac_status=$?
17968   echo "$as_me:17968: \$? = $ac_status" >&5
17969   (exit $ac_status); } &&
17970          { ac_try='test -s conftest.$ac_objext'
17971   { (eval echo "$as_me:17971: \"$ac_try\"") >&5
17972   (eval $ac_try) 2>&5
17973   ac_status=$?
17974   echo "$as_me:17974: \$? = $ac_status" >&5
17975   (exit $ac_status); }; }; then
17976   termios_bad=no
17977 else
17978   echo "$as_me: failed program was:" >&5
17979 cat conftest.$ac_ext >&5
17980
17981                 cat >conftest.$ac_ext <<_ACEOF
17982 #line 17982 "configure"
17983 #include "confdefs.h"
17984
17985 #define _POSIX_SOURCE
17986 #include <termios.h>
17987 int
17988 main (void)
17989 {
17990 struct termios foo; int x = foo.c_iflag
17991   ;
17992   return 0;
17993 }
17994 _ACEOF
17995 rm -f conftest.$ac_objext
17996 if { (eval echo "$as_me:17996: \"$ac_compile\"") >&5
17997   (eval $ac_compile) 2>&5
17998   ac_status=$?
17999   echo "$as_me:17999: \$? = $ac_status" >&5
18000   (exit $ac_status); } &&
18001          { ac_try='test -s conftest.$ac_objext'
18002   { (eval echo "$as_me:18002: \"$ac_try\"") >&5
18003   (eval $ac_try) 2>&5
18004   ac_status=$?
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); }; }; then
18007   termios_bad=unknown
18008 else
18009   echo "$as_me: failed program was:" >&5
18010 cat conftest.$ac_ext >&5
18011 termios_bad=yes
18012 cat >>confdefs.h <<\EOF
18013 #define _POSIX_SOURCE 1
18014 EOF
18015
18016 fi
18017 rm -f conftest.$ac_objext conftest.$ac_ext
18018
18019 fi
18020 rm -f conftest.$ac_objext conftest.$ac_ext
18021         echo "$as_me:18021: result: $termios_bad" >&5
18022 echo "${ECHO_T}$termios_bad" >&6
18023         fi
18024 fi
18025
18026 echo "$as_me:18026: checking for tcgetattr" >&5
18027 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
18028 if test "${cf_cv_have_tcgetattr+set}" = set; then
18029   echo $ECHO_N "(cached) $ECHO_C" >&6
18030 else
18031
18032 cat >conftest.$ac_ext <<_ACEOF
18033 #line 18033 "configure"
18034 #include "confdefs.h"
18035
18036 #include <sys/types.h>
18037 #ifdef HAVE_UNISTD_H
18038 #include <unistd.h>
18039 #endif
18040 #ifdef HAVE_TERMIOS_H
18041 #include <termios.h>
18042 #define TTY struct termios
18043 #else
18044 #ifdef HAVE_TERMIO_H
18045 #include <termio.h>
18046 #define TTY struct termio
18047 #endif
18048 #endif
18049
18050 int
18051 main (void)
18052 {
18053
18054 TTY foo;
18055 tcgetattr(1, &foo);
18056   ;
18057   return 0;
18058 }
18059 _ACEOF
18060 rm -f conftest.$ac_objext conftest$ac_exeext
18061 if { (eval echo "$as_me:18061: \"$ac_link\"") >&5
18062   (eval $ac_link) 2>&5
18063   ac_status=$?
18064   echo "$as_me:18064: \$? = $ac_status" >&5
18065   (exit $ac_status); } &&
18066          { ac_try='test -s conftest$ac_exeext'
18067   { (eval echo "$as_me:18067: \"$ac_try\"") >&5
18068   (eval $ac_try) 2>&5
18069   ac_status=$?
18070   echo "$as_me:18070: \$? = $ac_status" >&5
18071   (exit $ac_status); }; }; then
18072   cf_cv_have_tcgetattr=yes
18073 else
18074   echo "$as_me: failed program was:" >&5
18075 cat conftest.$ac_ext >&5
18076 cf_cv_have_tcgetattr=no
18077 fi
18078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18079 fi
18080 echo "$as_me:18080: result: $cf_cv_have_tcgetattr" >&5
18081 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
18082 test "$cf_cv_have_tcgetattr" = yes &&
18083 cat >>confdefs.h <<\EOF
18084 #define HAVE_TCGETATTR 1
18085 EOF
18086
18087 echo "$as_me:18087: checking for vsscanf function or workaround" >&5
18088 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
18089 if test "${cf_cv_func_vsscanf+set}" = set; then
18090   echo $ECHO_N "(cached) $ECHO_C" >&6
18091 else
18092
18093 cat >conftest.$ac_ext <<_ACEOF
18094 #line 18094 "configure"
18095 #include "confdefs.h"
18096
18097 #include <stdarg.h>
18098 #include <stdio.h>
18099 int
18100 main (void)
18101 {
18102
18103         va_list ap;
18104         vsscanf("from", "%d", ap)
18105   ;
18106   return 0;
18107 }
18108 _ACEOF
18109 rm -f conftest.$ac_objext conftest$ac_exeext
18110 if { (eval echo "$as_me:18110: \"$ac_link\"") >&5
18111   (eval $ac_link) 2>&5
18112   ac_status=$?
18113   echo "$as_me:18113: \$? = $ac_status" >&5
18114   (exit $ac_status); } &&
18115          { ac_try='test -s conftest$ac_exeext'
18116   { (eval echo "$as_me:18116: \"$ac_try\"") >&5
18117   (eval $ac_try) 2>&5
18118   ac_status=$?
18119   echo "$as_me:18119: \$? = $ac_status" >&5
18120   (exit $ac_status); }; }; then
18121   cf_cv_func_vsscanf=vsscanf
18122 else
18123   echo "$as_me: failed program was:" >&5
18124 cat conftest.$ac_ext >&5
18125
18126 cat >conftest.$ac_ext <<_ACEOF
18127 #line 18127 "configure"
18128 #include "confdefs.h"
18129
18130 #include <stdarg.h>
18131 #include <stdio.h>
18132 int
18133 main (void)
18134 {
18135
18136         FILE strbuf;
18137         char *str = "from";
18138
18139         strbuf._flag = _IOREAD;
18140         strbuf._ptr = strbuf._base = (unsigned char *) str;
18141         strbuf._cnt = strlen(str);
18142         strbuf._file = _NFILE;
18143         return (vfscanf(&strbuf, "%d", ap))
18144   ;
18145   return 0;
18146 }
18147 _ACEOF
18148 rm -f conftest.$ac_objext conftest$ac_exeext
18149 if { (eval echo "$as_me:18149: \"$ac_link\"") >&5
18150   (eval $ac_link) 2>&5
18151   ac_status=$?
18152   echo "$as_me:18152: \$? = $ac_status" >&5
18153   (exit $ac_status); } &&
18154          { ac_try='test -s conftest$ac_exeext'
18155   { (eval echo "$as_me:18155: \"$ac_try\"") >&5
18156   (eval $ac_try) 2>&5
18157   ac_status=$?
18158   echo "$as_me:18158: \$? = $ac_status" >&5
18159   (exit $ac_status); }; }; then
18160   cf_cv_func_vsscanf=vfscanf
18161 else
18162   echo "$as_me: failed program was:" >&5
18163 cat conftest.$ac_ext >&5
18164
18165 cat >conftest.$ac_ext <<_ACEOF
18166 #line 18166 "configure"
18167 #include "confdefs.h"
18168
18169 #include <stdarg.h>
18170 #include <stdio.h>
18171 int
18172 main (void)
18173 {
18174
18175         FILE strbuf;
18176         char *str = "from";
18177
18178         strbuf._flag = _IOREAD;
18179         strbuf._ptr = strbuf._base = (unsigned char *) str;
18180         strbuf._cnt = strlen(str);
18181         strbuf._file = _NFILE;
18182         return (_doscan(&strbuf, "%d", ap))
18183   ;
18184   return 0;
18185 }
18186 _ACEOF
18187 rm -f conftest.$ac_objext conftest$ac_exeext
18188 if { (eval echo "$as_me:18188: \"$ac_link\"") >&5
18189   (eval $ac_link) 2>&5
18190   ac_status=$?
18191   echo "$as_me:18191: \$? = $ac_status" >&5
18192   (exit $ac_status); } &&
18193          { ac_try='test -s conftest$ac_exeext'
18194   { (eval echo "$as_me:18194: \"$ac_try\"") >&5
18195   (eval $ac_try) 2>&5
18196   ac_status=$?
18197   echo "$as_me:18197: \$? = $ac_status" >&5
18198   (exit $ac_status); }; }; then
18199   cf_cv_func_vsscanf=_doscan
18200 else
18201   echo "$as_me: failed program was:" >&5
18202 cat conftest.$ac_ext >&5
18203
18204 cf_cv_func_vsscanf=no
18205 fi
18206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18207 fi
18208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18209 fi
18210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18211 fi
18212 echo "$as_me:18212: result: $cf_cv_func_vsscanf" >&5
18213 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18214
18215 case $cf_cv_func_vsscanf in
18216 (vsscanf)
18217 cat >>confdefs.h <<\EOF
18218 #define HAVE_VSSCANF 1
18219 EOF
18220 ;;
18221 (vfscanf)
18222 cat >>confdefs.h <<\EOF
18223 #define HAVE_VFSCANF 1
18224 EOF
18225 ;;
18226 (_doscan)
18227 cat >>confdefs.h <<\EOF
18228 #define HAVE__DOSCAN 1
18229 EOF
18230 ;;
18231 esac
18232
18233 for ac_header in \
18234 unistd.h \
18235
18236 do
18237 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18238 echo "$as_me:18238: checking for $ac_header" >&5
18239 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18240 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18241   echo $ECHO_N "(cached) $ECHO_C" >&6
18242 else
18243   cat >conftest.$ac_ext <<_ACEOF
18244 #line 18244 "configure"
18245 #include "confdefs.h"
18246 #include <$ac_header>
18247 _ACEOF
18248 if { (eval echo "$as_me:18248: \"$ac_cpp conftest.$ac_ext\"") >&5
18249   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18250   ac_status=$?
18251   egrep -v '^ *\+' conftest.er1 >conftest.err
18252   rm -f conftest.er1
18253   cat conftest.err >&5
18254   echo "$as_me:18254: \$? = $ac_status" >&5
18255   (exit $ac_status); } >/dev/null; then
18256   if test -s conftest.err; then
18257     ac_cpp_err=$ac_c_preproc_warn_flag
18258   else
18259     ac_cpp_err=
18260   fi
18261 else
18262   ac_cpp_err=yes
18263 fi
18264 if test -z "$ac_cpp_err"; then
18265   eval "$as_ac_Header=yes"
18266 else
18267   echo "$as_me: failed program was:" >&5
18268   cat conftest.$ac_ext >&5
18269   eval "$as_ac_Header=no"
18270 fi
18271 rm -f conftest.err conftest.$ac_ext
18272 fi
18273 echo "$as_me:18273: result: `eval echo '${'$as_ac_Header'}'`" >&5
18274 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18275 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18276   cat >>confdefs.h <<EOF
18277 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18278 EOF
18279
18280 fi
18281 done
18282
18283 echo "$as_me:18283: checking for working mkstemp" >&5
18284 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18285 if test "${cf_cv_func_mkstemp+set}" = set; then
18286   echo $ECHO_N "(cached) $ECHO_C" >&6
18287 else
18288
18289 rm -rf conftest*
18290 if test "$cross_compiling" = yes; then
18291   cf_cv_func_mkstemp=maybe
18292 else
18293   cat >conftest.$ac_ext <<_ACEOF
18294 #line 18294 "configure"
18295 #include "confdefs.h"
18296
18297 #include <sys/types.h>
18298 #ifdef HAVE_UNISTD_H
18299 #include <unistd.h>
18300 #endif
18301 #include <stdlib.h>
18302 #include <stdio.h>
18303 #include <string.h>
18304 #include <sys/stat.h>
18305 int main(void)
18306 {
18307         char *tmpl = "conftestXXXXXX";
18308         char name[2][80];
18309         int n;
18310         int result = 0;
18311         int fd;
18312         struct stat sb;
18313
18314         umask(077);
18315         for (n = 0; n < 2; ++n) {
18316                 strcpy(name[n], tmpl);
18317                 if ((fd = mkstemp(name[n])) >= 0) {
18318                         if (!strcmp(name[n], tmpl)
18319                          || stat(name[n], &sb) != 0
18320                          || (sb.st_mode & S_IFMT) != S_IFREG
18321                          || (sb.st_mode & 077) != 0) {
18322                                 result = 1;
18323                         }
18324                         close(fd);
18325                 }
18326         }
18327         if (result == 0
18328          && !strcmp(name[0], name[1]))
18329                 result = 1;
18330         ${cf_cv_main_return:-return}(result);
18331 }
18332
18333 _ACEOF
18334 rm -f conftest$ac_exeext
18335 if { (eval echo "$as_me:18335: \"$ac_link\"") >&5
18336   (eval $ac_link) 2>&5
18337   ac_status=$?
18338   echo "$as_me:18338: \$? = $ac_status" >&5
18339   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18340   { (eval echo "$as_me:18340: \"$ac_try\"") >&5
18341   (eval $ac_try) 2>&5
18342   ac_status=$?
18343   echo "$as_me:18343: \$? = $ac_status" >&5
18344   (exit $ac_status); }; }; then
18345   cf_cv_func_mkstemp=yes
18346
18347 else
18348   echo "$as_me: program exited with status $ac_status" >&5
18349 echo "$as_me: failed program was:" >&5
18350 cat conftest.$ac_ext >&5
18351 cf_cv_func_mkstemp=no
18352
18353 fi
18354 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18355 fi
18356
18357 fi
18358 echo "$as_me:18358: result: $cf_cv_func_mkstemp" >&5
18359 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18360 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18361         echo "$as_me:18361: checking for mkstemp" >&5
18362 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18363 if test "${ac_cv_func_mkstemp+set}" = set; then
18364   echo $ECHO_N "(cached) $ECHO_C" >&6
18365 else
18366   cat >conftest.$ac_ext <<_ACEOF
18367 #line 18367 "configure"
18368 #include "confdefs.h"
18369 /* System header to define __stub macros and hopefully few prototypes,
18370     which can conflict with char mkstemp (); below.  */
18371 #include <assert.h>
18372 /* Override any gcc2 internal prototype to avoid an error.  */
18373 #ifdef __cplusplus
18374 extern "C"
18375 #endif
18376 /* We use char because int might match the return type of a gcc2
18377    builtin and then its argument prototype would still apply.  */
18378 char mkstemp ();
18379 char (*f) ();
18380
18381 int
18382 main (void)
18383 {
18384 /* The GNU C library defines this for functions which it implements
18385     to always fail with ENOSYS.  Some functions are actually named
18386     something starting with __ and the normal name is an alias.  */
18387 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18388 choke me
18389 #else
18390 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18391 #endif
18392
18393   ;
18394   return 0;
18395 }
18396 _ACEOF
18397 rm -f conftest.$ac_objext conftest$ac_exeext
18398 if { (eval echo "$as_me:18398: \"$ac_link\"") >&5
18399   (eval $ac_link) 2>&5
18400   ac_status=$?
18401   echo "$as_me:18401: \$? = $ac_status" >&5
18402   (exit $ac_status); } &&
18403          { ac_try='test -s conftest$ac_exeext'
18404   { (eval echo "$as_me:18404: \"$ac_try\"") >&5
18405   (eval $ac_try) 2>&5
18406   ac_status=$?
18407   echo "$as_me:18407: \$? = $ac_status" >&5
18408   (exit $ac_status); }; }; then
18409   ac_cv_func_mkstemp=yes
18410 else
18411   echo "$as_me: failed program was:" >&5
18412 cat conftest.$ac_ext >&5
18413 ac_cv_func_mkstemp=no
18414 fi
18415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18416 fi
18417 echo "$as_me:18417: result: $ac_cv_func_mkstemp" >&5
18418 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18419
18420 fi
18421 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18422
18423 cat >>confdefs.h <<\EOF
18424 #define HAVE_MKSTEMP 1
18425 EOF
18426
18427 fi
18428
18429 # setup for prototype of fallback for vsscanf()
18430
18431 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18432         HAVE_VSSCANF=1
18433 else
18434         HAVE_VSSCANF=0
18435 fi
18436
18437 if test "x$cross_compiling" = xyes ; then
18438         { echo "$as_me:18438: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18439 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18440 else
18441         echo "$as_me:18441: checking whether setvbuf arguments are reversed" >&5
18442 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18443 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18444   echo $ECHO_N "(cached) $ECHO_C" >&6
18445 else
18446   if test "$cross_compiling" = yes; then
18447   { { echo "$as_me:18447: error: cannot run test program while cross compiling" >&5
18448 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18449    { (exit 1); exit 1; }; }
18450 else
18451   cat >conftest.$ac_ext <<_ACEOF
18452 #line 18452 "configure"
18453 #include "confdefs.h"
18454 #include <stdio.h>
18455 /* If setvbuf has the reversed format, exit 0. */
18456 int
18457 main (void)
18458 {
18459   /* This call has the arguments reversed.
18460      A reversed system may check and see that the address of main
18461      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18462   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18463     $ac_main_return(1);
18464   putc('\r', stdout);
18465   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18466 }
18467 _ACEOF
18468 rm -f conftest$ac_exeext
18469 if { (eval echo "$as_me:18469: \"$ac_link\"") >&5
18470   (eval $ac_link) 2>&5
18471   ac_status=$?
18472   echo "$as_me:18472: \$? = $ac_status" >&5
18473   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18474   { (eval echo "$as_me:18474: \"$ac_try\"") >&5
18475   (eval $ac_try) 2>&5
18476   ac_status=$?
18477   echo "$as_me:18477: \$? = $ac_status" >&5
18478   (exit $ac_status); }; }; then
18479   ac_cv_func_setvbuf_reversed=yes
18480 else
18481   echo "$as_me: program exited with status $ac_status" >&5
18482 echo "$as_me: failed program was:" >&5
18483 cat conftest.$ac_ext >&5
18484 ac_cv_func_setvbuf_reversed=no
18485 fi
18486 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18487 fi
18488 rm -f core core.* *.core
18489 fi
18490 echo "$as_me:18490: result: $ac_cv_func_setvbuf_reversed" >&5
18491 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18492 if test $ac_cv_func_setvbuf_reversed = yes; then
18493
18494 cat >>confdefs.h <<\EOF
18495 #define SETVBUF_REVERSED 1
18496 EOF
18497
18498 fi
18499
18500 fi
18501 echo "$as_me:18501: checking for intptr_t" >&5
18502 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18503 if test "${ac_cv_type_intptr_t+set}" = set; then
18504   echo $ECHO_N "(cached) $ECHO_C" >&6
18505 else
18506   cat >conftest.$ac_ext <<_ACEOF
18507 #line 18507 "configure"
18508 #include "confdefs.h"
18509 $ac_includes_default
18510 int
18511 main (void)
18512 {
18513 if ((intptr_t *) 0)
18514   return 0;
18515 if (sizeof (intptr_t))
18516   return 0;
18517   ;
18518   return 0;
18519 }
18520 _ACEOF
18521 rm -f conftest.$ac_objext
18522 if { (eval echo "$as_me:18522: \"$ac_compile\"") >&5
18523   (eval $ac_compile) 2>&5
18524   ac_status=$?
18525   echo "$as_me:18525: \$? = $ac_status" >&5
18526   (exit $ac_status); } &&
18527          { ac_try='test -s conftest.$ac_objext'
18528   { (eval echo "$as_me:18528: \"$ac_try\"") >&5
18529   (eval $ac_try) 2>&5
18530   ac_status=$?
18531   echo "$as_me:18531: \$? = $ac_status" >&5
18532   (exit $ac_status); }; }; then
18533   ac_cv_type_intptr_t=yes
18534 else
18535   echo "$as_me: failed program was:" >&5
18536 cat conftest.$ac_ext >&5
18537 ac_cv_type_intptr_t=no
18538 fi
18539 rm -f conftest.$ac_objext conftest.$ac_ext
18540 fi
18541 echo "$as_me:18541: result: $ac_cv_type_intptr_t" >&5
18542 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18543 if test $ac_cv_type_intptr_t = yes; then
18544   :
18545 else
18546
18547 cat >>confdefs.h <<EOF
18548 #define intptr_t long
18549 EOF
18550
18551 fi
18552
18553 echo "$as_me:18553: checking for ssize_t" >&5
18554 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18555 if test "${ac_cv_type_ssize_t+set}" = set; then
18556   echo $ECHO_N "(cached) $ECHO_C" >&6
18557 else
18558   cat >conftest.$ac_ext <<_ACEOF
18559 #line 18559 "configure"
18560 #include "confdefs.h"
18561 $ac_includes_default
18562 int
18563 main (void)
18564 {
18565 if ((ssize_t *) 0)
18566   return 0;
18567 if (sizeof (ssize_t))
18568   return 0;
18569   ;
18570   return 0;
18571 }
18572 _ACEOF
18573 rm -f conftest.$ac_objext
18574 if { (eval echo "$as_me:18574: \"$ac_compile\"") >&5
18575   (eval $ac_compile) 2>&5
18576   ac_status=$?
18577   echo "$as_me:18577: \$? = $ac_status" >&5
18578   (exit $ac_status); } &&
18579          { ac_try='test -s conftest.$ac_objext'
18580   { (eval echo "$as_me:18580: \"$ac_try\"") >&5
18581   (eval $ac_try) 2>&5
18582   ac_status=$?
18583   echo "$as_me:18583: \$? = $ac_status" >&5
18584   (exit $ac_status); }; }; then
18585   ac_cv_type_ssize_t=yes
18586 else
18587   echo "$as_me: failed program was:" >&5
18588 cat conftest.$ac_ext >&5
18589 ac_cv_type_ssize_t=no
18590 fi
18591 rm -f conftest.$ac_objext conftest.$ac_ext
18592 fi
18593 echo "$as_me:18593: result: $ac_cv_type_ssize_t" >&5
18594 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18595 if test $ac_cv_type_ssize_t = yes; then
18596   :
18597 else
18598
18599 cat >>confdefs.h <<EOF
18600 #define ssize_t int
18601 EOF
18602
18603 fi
18604
18605 echo "$as_me:18605: checking for type sigaction_t" >&5
18606 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18607 if test "${cf_cv_type_sigaction+set}" = set; then
18608   echo $ECHO_N "(cached) $ECHO_C" >&6
18609 else
18610
18611         cat >conftest.$ac_ext <<_ACEOF
18612 #line 18612 "configure"
18613 #include "confdefs.h"
18614
18615 #include <signal.h>
18616 int
18617 main (void)
18618 {
18619 sigaction_t x
18620   ;
18621   return 0;
18622 }
18623 _ACEOF
18624 rm -f conftest.$ac_objext
18625 if { (eval echo "$as_me:18625: \"$ac_compile\"") >&5
18626   (eval $ac_compile) 2>&5
18627   ac_status=$?
18628   echo "$as_me:18628: \$? = $ac_status" >&5
18629   (exit $ac_status); } &&
18630          { ac_try='test -s conftest.$ac_objext'
18631   { (eval echo "$as_me:18631: \"$ac_try\"") >&5
18632   (eval $ac_try) 2>&5
18633   ac_status=$?
18634   echo "$as_me:18634: \$? = $ac_status" >&5
18635   (exit $ac_status); }; }; then
18636   cf_cv_type_sigaction=yes
18637 else
18638   echo "$as_me: failed program was:" >&5
18639 cat conftest.$ac_ext >&5
18640 cf_cv_type_sigaction=no
18641 fi
18642 rm -f conftest.$ac_objext conftest.$ac_ext
18643 fi
18644
18645 echo "$as_me:18645: result: $cf_cv_type_sigaction" >&5
18646 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18647 test "$cf_cv_type_sigaction" = yes &&
18648 cat >>confdefs.h <<\EOF
18649 #define HAVE_TYPE_SIGACTION 1
18650 EOF
18651
18652 echo "$as_me:18652: checking declaration of size-change" >&5
18653 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18654 if test "${cf_cv_sizechange+set}" = set; then
18655   echo $ECHO_N "(cached) $ECHO_C" >&6
18656 else
18657
18658         cf_cv_sizechange=unknown
18659         cf_save_CPPFLAGS="$CPPFLAGS"
18660
18661 for cf_opts in "" "NEED_PTEM_H"
18662 do
18663
18664         CPPFLAGS="$cf_save_CPPFLAGS"
18665         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18666         cat >conftest.$ac_ext <<_ACEOF
18667 #line 18667 "configure"
18668 #include "confdefs.h"
18669 #include <sys/types.h>
18670 #ifdef HAVE_TERMIOS_H
18671 #include <termios.h>
18672 #else
18673 #ifdef HAVE_TERMIO_H
18674 #include <termio.h>
18675 #endif
18676 #endif
18677 #ifdef NEED_PTEM_H
18678 /* This is a workaround for SCO:  they neglected to define struct winsize in
18679  * termios.h -- it's only in termio.h and ptem.h
18680  */
18681 #include        <sys/stream.h>
18682 #include        <sys/ptem.h>
18683 #endif
18684 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18685 #include <sys/ioctl.h>
18686 #endif
18687
18688 int
18689 main (void)
18690 {
18691
18692 #ifdef TIOCGSIZE
18693         struct ttysize win;     /* FIXME: what system is this? */
18694         int y = win.ts_lines;
18695         int x = win.ts_cols;
18696 #else
18697 #ifdef TIOCGWINSZ
18698         struct winsize win;
18699         int y = win.ws_row;
18700         int x = win.ws_col;
18701 #else
18702         no TIOCGSIZE or TIOCGWINSZ
18703 #endif /* TIOCGWINSZ */
18704 #endif /* TIOCGSIZE */
18705
18706   ;
18707   return 0;
18708 }
18709 _ACEOF
18710 rm -f conftest.$ac_objext
18711 if { (eval echo "$as_me:18711: \"$ac_compile\"") >&5
18712   (eval $ac_compile) 2>&5
18713   ac_status=$?
18714   echo "$as_me:18714: \$? = $ac_status" >&5
18715   (exit $ac_status); } &&
18716          { ac_try='test -s conftest.$ac_objext'
18717   { (eval echo "$as_me:18717: \"$ac_try\"") >&5
18718   (eval $ac_try) 2>&5
18719   ac_status=$?
18720   echo "$as_me:18720: \$? = $ac_status" >&5
18721   (exit $ac_status); }; }; then
18722   cf_cv_sizechange=yes
18723 else
18724   echo "$as_me: failed program was:" >&5
18725 cat conftest.$ac_ext >&5
18726 cf_cv_sizechange=no
18727 fi
18728 rm -f conftest.$ac_objext conftest.$ac_ext
18729
18730         CPPFLAGS="$cf_save_CPPFLAGS"
18731         if test "$cf_cv_sizechange" = yes ; then
18732                 echo "size-change succeeded ($cf_opts)" >&5
18733                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18734                 break
18735         fi
18736 done
18737
18738 fi
18739 echo "$as_me:18739: result: $cf_cv_sizechange" >&5
18740 echo "${ECHO_T}$cf_cv_sizechange" >&6
18741 if test "$cf_cv_sizechange" != no ; then
18742
18743 cat >>confdefs.h <<\EOF
18744 #define HAVE_SIZECHANGE 1
18745 EOF
18746
18747         case $cf_cv_sizechange in
18748         (NEED*)
18749                 cat >>confdefs.h <<EOF
18750 #define $cf_cv_sizechange  1
18751 EOF
18752
18753                 ;;
18754         esac
18755 fi
18756
18757 echo "$as_me:18757: checking for memmove" >&5
18758 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18759 if test "${ac_cv_func_memmove+set}" = set; then
18760   echo $ECHO_N "(cached) $ECHO_C" >&6
18761 else
18762   cat >conftest.$ac_ext <<_ACEOF
18763 #line 18763 "configure"
18764 #include "confdefs.h"
18765 /* System header to define __stub macros and hopefully few prototypes,
18766     which can conflict with char memmove (); below.  */
18767 #include <assert.h>
18768 /* Override any gcc2 internal prototype to avoid an error.  */
18769 #ifdef __cplusplus
18770 extern "C"
18771 #endif
18772 /* We use char because int might match the return type of a gcc2
18773    builtin and then its argument prototype would still apply.  */
18774 char memmove ();
18775 char (*f) ();
18776
18777 int
18778 main (void)
18779 {
18780 /* The GNU C library defines this for functions which it implements
18781     to always fail with ENOSYS.  Some functions are actually named
18782     something starting with __ and the normal name is an alias.  */
18783 #if defined (__stub_memmove) || defined (__stub___memmove)
18784 choke me
18785 #else
18786 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18787 #endif
18788
18789   ;
18790   return 0;
18791 }
18792 _ACEOF
18793 rm -f conftest.$ac_objext conftest$ac_exeext
18794 if { (eval echo "$as_me:18794: \"$ac_link\"") >&5
18795   (eval $ac_link) 2>&5
18796   ac_status=$?
18797   echo "$as_me:18797: \$? = $ac_status" >&5
18798   (exit $ac_status); } &&
18799          { ac_try='test -s conftest$ac_exeext'
18800   { (eval echo "$as_me:18800: \"$ac_try\"") >&5
18801   (eval $ac_try) 2>&5
18802   ac_status=$?
18803   echo "$as_me:18803: \$? = $ac_status" >&5
18804   (exit $ac_status); }; }; then
18805   ac_cv_func_memmove=yes
18806 else
18807   echo "$as_me: failed program was:" >&5
18808 cat conftest.$ac_ext >&5
18809 ac_cv_func_memmove=no
18810 fi
18811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18812 fi
18813 echo "$as_me:18813: result: $ac_cv_func_memmove" >&5
18814 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18815 if test $ac_cv_func_memmove = yes; then
18816   :
18817 else
18818
18819 echo "$as_me:18819: checking for bcopy" >&5
18820 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18821 if test "${ac_cv_func_bcopy+set}" = set; then
18822   echo $ECHO_N "(cached) $ECHO_C" >&6
18823 else
18824   cat >conftest.$ac_ext <<_ACEOF
18825 #line 18825 "configure"
18826 #include "confdefs.h"
18827 /* System header to define __stub macros and hopefully few prototypes,
18828     which can conflict with char bcopy (); below.  */
18829 #include <assert.h>
18830 /* Override any gcc2 internal prototype to avoid an error.  */
18831 #ifdef __cplusplus
18832 extern "C"
18833 #endif
18834 /* We use char because int might match the return type of a gcc2
18835    builtin and then its argument prototype would still apply.  */
18836 char bcopy ();
18837 char (*f) ();
18838
18839 int
18840 main (void)
18841 {
18842 /* The GNU C library defines this for functions which it implements
18843     to always fail with ENOSYS.  Some functions are actually named
18844     something starting with __ and the normal name is an alias.  */
18845 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18846 choke me
18847 #else
18848 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18849 #endif
18850
18851   ;
18852   return 0;
18853 }
18854 _ACEOF
18855 rm -f conftest.$ac_objext conftest$ac_exeext
18856 if { (eval echo "$as_me:18856: \"$ac_link\"") >&5
18857   (eval $ac_link) 2>&5
18858   ac_status=$?
18859   echo "$as_me:18859: \$? = $ac_status" >&5
18860   (exit $ac_status); } &&
18861          { ac_try='test -s conftest$ac_exeext'
18862   { (eval echo "$as_me:18862: \"$ac_try\"") >&5
18863   (eval $ac_try) 2>&5
18864   ac_status=$?
18865   echo "$as_me:18865: \$? = $ac_status" >&5
18866   (exit $ac_status); }; }; then
18867   ac_cv_func_bcopy=yes
18868 else
18869   echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18871 ac_cv_func_bcopy=no
18872 fi
18873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18874 fi
18875 echo "$as_me:18875: result: $ac_cv_func_bcopy" >&5
18876 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18877 if test $ac_cv_func_bcopy = yes; then
18878
18879         echo "$as_me:18879: checking if bcopy does overlapping moves" >&5
18880 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18881 if test "${cf_cv_good_bcopy+set}" = set; then
18882   echo $ECHO_N "(cached) $ECHO_C" >&6
18883 else
18884
18885                 if test "$cross_compiling" = yes; then
18886   cf_cv_good_bcopy=unknown
18887 else
18888   cat >conftest.$ac_ext <<_ACEOF
18889 #line 18889 "configure"
18890 #include "confdefs.h"
18891
18892 int main(void) {
18893         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18894         char temp[40];
18895         bcopy(data, temp, sizeof(data));
18896         bcopy(temp+10, temp, 15);
18897         bcopy(temp+5, temp+15, 10);
18898         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18899 }
18900
18901 _ACEOF
18902 rm -f conftest$ac_exeext
18903 if { (eval echo "$as_me:18903: \"$ac_link\"") >&5
18904   (eval $ac_link) 2>&5
18905   ac_status=$?
18906   echo "$as_me:18906: \$? = $ac_status" >&5
18907   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18908   { (eval echo "$as_me:18908: \"$ac_try\"") >&5
18909   (eval $ac_try) 2>&5
18910   ac_status=$?
18911   echo "$as_me:18911: \$? = $ac_status" >&5
18912   (exit $ac_status); }; }; then
18913   cf_cv_good_bcopy=yes
18914 else
18915   echo "$as_me: program exited with status $ac_status" >&5
18916 echo "$as_me: failed program was:" >&5
18917 cat conftest.$ac_ext >&5
18918 cf_cv_good_bcopy=no
18919 fi
18920 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18921 fi
18922
18923 fi
18924 echo "$as_me:18924: result: $cf_cv_good_bcopy" >&5
18925 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18926
18927 else
18928   cf_cv_good_bcopy=no
18929 fi
18930
18931         if test "$cf_cv_good_bcopy" = yes ; then
18932
18933 cat >>confdefs.h <<\EOF
18934 #define USE_OK_BCOPY 1
18935 EOF
18936
18937         else
18938
18939 cat >>confdefs.h <<\EOF
18940 #define USE_MY_MEMMOVE 1
18941 EOF
18942
18943         fi
18944
18945 fi
18946
18947 tty 2>&1 >/dev/null || {
18948 for ac_func in posix_openpt
18949 do
18950 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18951 echo "$as_me:18951: checking for $ac_func" >&5
18952 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18953 if eval "test \"\${$as_ac_var+set}\" = set"; then
18954   echo $ECHO_N "(cached) $ECHO_C" >&6
18955 else
18956   cat >conftest.$ac_ext <<_ACEOF
18957 #line 18957 "configure"
18958 #include "confdefs.h"
18959 /* System header to define __stub macros and hopefully few prototypes,
18960     which can conflict with char $ac_func (); below.  */
18961 #include <assert.h>
18962 /* Override any gcc2 internal prototype to avoid an error.  */
18963 #ifdef __cplusplus
18964 extern "C"
18965 #endif
18966 /* We use char because int might match the return type of a gcc2
18967    builtin and then its argument prototype would still apply.  */
18968 char $ac_func ();
18969 char (*f) ();
18970
18971 int
18972 main (void)
18973 {
18974 /* The GNU C library defines this for functions which it implements
18975     to always fail with ENOSYS.  Some functions are actually named
18976     something starting with __ and the normal name is an alias.  */
18977 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18978 choke me
18979 #else
18980 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18981 #endif
18982
18983   ;
18984   return 0;
18985 }
18986 _ACEOF
18987 rm -f conftest.$ac_objext conftest$ac_exeext
18988 if { (eval echo "$as_me:18988: \"$ac_link\"") >&5
18989   (eval $ac_link) 2>&5
18990   ac_status=$?
18991   echo "$as_me:18991: \$? = $ac_status" >&5
18992   (exit $ac_status); } &&
18993          { ac_try='test -s conftest$ac_exeext'
18994   { (eval echo "$as_me:18994: \"$ac_try\"") >&5
18995   (eval $ac_try) 2>&5
18996   ac_status=$?
18997   echo "$as_me:18997: \$? = $ac_status" >&5
18998   (exit $ac_status); }; }; then
18999   eval "$as_ac_var=yes"
19000 else
19001   echo "$as_me: failed program was:" >&5
19002 cat conftest.$ac_ext >&5
19003 eval "$as_ac_var=no"
19004 fi
19005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19006 fi
19007 echo "$as_me:19007: result: `eval echo '${'$as_ac_var'}'`" >&5
19008 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19009 if test `eval echo '${'$as_ac_var'}'` = yes; then
19010   cat >>confdefs.h <<EOF
19011 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19012 EOF
19013
19014 fi
19015 done
19016  }
19017 echo "$as_me:19017: checking if poll really works" >&5
19018 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
19019 if test "${cf_cv_working_poll+set}" = set; then
19020   echo $ECHO_N "(cached) $ECHO_C" >&6
19021 else
19022
19023 if test "$cross_compiling" = yes; then
19024   cf_cv_working_poll=unknown
19025 else
19026   cat >conftest.$ac_ext <<_ACEOF
19027 #line 19027 "configure"
19028 #include "confdefs.h"
19029
19030 #include <stdlib.h>
19031 #include <stdio.h>
19032 #include <unistd.h>
19033 #include <fcntl.h>
19034 #ifdef HAVE_POLL_H
19035 #include <poll.h>
19036 #else
19037 #include <sys/poll.h>
19038 #endif
19039 int main(void) {
19040         struct pollfd myfds;
19041         int ret;
19042
19043         /* check for Darwin bug with respect to "devices" */
19044         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
19045         if (myfds.fd < 0)
19046                 myfds.fd = 0;
19047         myfds.events = POLLIN;
19048         myfds.revents = 0;
19049
19050         ret = poll(&myfds, 1, 100);
19051
19052         if (ret < 0 || (myfds.revents & POLLNVAL)) {
19053                 ret = -1;
19054         } else {
19055                 int fd = 0;
19056                 if (!isatty(fd)) {
19057                         fd = open("/dev/tty", 2);       /* O_RDWR */
19058                 }
19059 #ifdef HAVE_POSIX_OPENPT
19060                 if (fd < 0) {
19061                         fd = posix_openpt(O_RDWR);
19062                 }
19063 #endif
19064
19065                 if (fd >= 0) {
19066                         /* also check with standard input */
19067                         myfds.fd = fd;
19068                         myfds.events = POLLIN;
19069                         myfds.revents = 0;
19070                         ret = poll(&myfds, 1, 100);
19071                 } else {
19072                         ret = -1;
19073                 }
19074         }
19075         ${cf_cv_main_return:-return}(ret < 0);
19076 }
19077 _ACEOF
19078 rm -f conftest$ac_exeext
19079 if { (eval echo "$as_me:19079: \"$ac_link\"") >&5
19080   (eval $ac_link) 2>&5
19081   ac_status=$?
19082   echo "$as_me:19082: \$? = $ac_status" >&5
19083   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19084   { (eval echo "$as_me:19084: \"$ac_try\"") >&5
19085   (eval $ac_try) 2>&5
19086   ac_status=$?
19087   echo "$as_me:19087: \$? = $ac_status" >&5
19088   (exit $ac_status); }; }; then
19089   cf_cv_working_poll=yes
19090 else
19091   echo "$as_me: program exited with status $ac_status" >&5
19092 echo "$as_me: failed program was:" >&5
19093 cat conftest.$ac_ext >&5
19094 cf_cv_working_poll=no
19095 fi
19096 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19097 fi
19098 fi
19099 echo "$as_me:19099: result: $cf_cv_working_poll" >&5
19100 echo "${ECHO_T}$cf_cv_working_poll" >&6
19101 test "$cf_cv_working_poll" = "yes" &&
19102 cat >>confdefs.h <<\EOF
19103 #define HAVE_WORKING_POLL 1
19104 EOF
19105
19106 echo "$as_me:19106: checking for va_copy" >&5
19107 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
19108 if test "${cf_cv_have_va_copy+set}" = set; then
19109   echo $ECHO_N "(cached) $ECHO_C" >&6
19110 else
19111
19112 cat >conftest.$ac_ext <<_ACEOF
19113 #line 19113 "configure"
19114 #include "confdefs.h"
19115
19116 #include <stdarg.h>
19117
19118 int
19119 main (void)
19120 {
19121
19122         static va_list dst;
19123         static va_list src;
19124         va_copy(dst, src)
19125   ;
19126   return 0;
19127 }
19128 _ACEOF
19129 rm -f conftest.$ac_objext conftest$ac_exeext
19130 if { (eval echo "$as_me:19130: \"$ac_link\"") >&5
19131   (eval $ac_link) 2>&5
19132   ac_status=$?
19133   echo "$as_me:19133: \$? = $ac_status" >&5
19134   (exit $ac_status); } &&
19135          { ac_try='test -s conftest$ac_exeext'
19136   { (eval echo "$as_me:19136: \"$ac_try\"") >&5
19137   (eval $ac_try) 2>&5
19138   ac_status=$?
19139   echo "$as_me:19139: \$? = $ac_status" >&5
19140   (exit $ac_status); }; }; then
19141   cf_cv_have_va_copy=yes
19142 else
19143   echo "$as_me: failed program was:" >&5
19144 cat conftest.$ac_ext >&5
19145 cf_cv_have_va_copy=no
19146 fi
19147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19148 fi
19149 echo "$as_me:19149: result: $cf_cv_have_va_copy" >&5
19150 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19151
19152 test "$cf_cv_have_va_copy" = yes &&
19153 cat >>confdefs.h <<\EOF
19154 #define HAVE_VA_COPY 1
19155 EOF
19156
19157 echo "$as_me:19157: checking for __va_copy" >&5
19158 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19159 if test "${cf_cv_have___va_copy+set}" = set; then
19160   echo $ECHO_N "(cached) $ECHO_C" >&6
19161 else
19162
19163 cat >conftest.$ac_ext <<_ACEOF
19164 #line 19164 "configure"
19165 #include "confdefs.h"
19166
19167 #include <stdarg.h>
19168
19169 int
19170 main (void)
19171 {
19172
19173         static va_list dst;
19174         static va_list src;
19175         __va_copy(dst, src)
19176   ;
19177   return 0;
19178 }
19179 _ACEOF
19180 rm -f conftest.$ac_objext conftest$ac_exeext
19181 if { (eval echo "$as_me:19181: \"$ac_link\"") >&5
19182   (eval $ac_link) 2>&5
19183   ac_status=$?
19184   echo "$as_me:19184: \$? = $ac_status" >&5
19185   (exit $ac_status); } &&
19186          { ac_try='test -s conftest$ac_exeext'
19187   { (eval echo "$as_me:19187: \"$ac_try\"") >&5
19188   (eval $ac_try) 2>&5
19189   ac_status=$?
19190   echo "$as_me:19190: \$? = $ac_status" >&5
19191   (exit $ac_status); }; }; then
19192   cf_cv_have___va_copy=yes
19193 else
19194   echo "$as_me: failed program was:" >&5
19195 cat conftest.$ac_ext >&5
19196 cf_cv_have___va_copy=no
19197 fi
19198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19199 fi
19200 echo "$as_me:19200: result: $cf_cv_have___va_copy" >&5
19201 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19202
19203 test "$cf_cv_have___va_copy" = yes &&
19204 cat >>confdefs.h <<\EOF
19205 #define HAVE___VA_COPY 1
19206 EOF
19207
19208 echo "$as_me:19208: checking for pid_t" >&5
19209 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19210 if test "${ac_cv_type_pid_t+set}" = set; then
19211   echo $ECHO_N "(cached) $ECHO_C" >&6
19212 else
19213   cat >conftest.$ac_ext <<_ACEOF
19214 #line 19214 "configure"
19215 #include "confdefs.h"
19216 $ac_includes_default
19217 int
19218 main (void)
19219 {
19220 if ((pid_t *) 0)
19221   return 0;
19222 if (sizeof (pid_t))
19223   return 0;
19224   ;
19225   return 0;
19226 }
19227 _ACEOF
19228 rm -f conftest.$ac_objext
19229 if { (eval echo "$as_me:19229: \"$ac_compile\"") >&5
19230   (eval $ac_compile) 2>&5
19231   ac_status=$?
19232   echo "$as_me:19232: \$? = $ac_status" >&5
19233   (exit $ac_status); } &&
19234          { ac_try='test -s conftest.$ac_objext'
19235   { (eval echo "$as_me:19235: \"$ac_try\"") >&5
19236   (eval $ac_try) 2>&5
19237   ac_status=$?
19238   echo "$as_me:19238: \$? = $ac_status" >&5
19239   (exit $ac_status); }; }; then
19240   ac_cv_type_pid_t=yes
19241 else
19242   echo "$as_me: failed program was:" >&5
19243 cat conftest.$ac_ext >&5
19244 ac_cv_type_pid_t=no
19245 fi
19246 rm -f conftest.$ac_objext conftest.$ac_ext
19247 fi
19248 echo "$as_me:19248: result: $ac_cv_type_pid_t" >&5
19249 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19250 if test $ac_cv_type_pid_t = yes; then
19251   :
19252 else
19253
19254 cat >>confdefs.h <<EOF
19255 #define pid_t int
19256 EOF
19257
19258 fi
19259
19260 for ac_header in unistd.h vfork.h
19261 do
19262 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19263 echo "$as_me:19263: checking for $ac_header" >&5
19264 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19265 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19266   echo $ECHO_N "(cached) $ECHO_C" >&6
19267 else
19268   cat >conftest.$ac_ext <<_ACEOF
19269 #line 19269 "configure"
19270 #include "confdefs.h"
19271 #include <$ac_header>
19272 _ACEOF
19273 if { (eval echo "$as_me:19273: \"$ac_cpp conftest.$ac_ext\"") >&5
19274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19275   ac_status=$?
19276   egrep -v '^ *\+' conftest.er1 >conftest.err
19277   rm -f conftest.er1
19278   cat conftest.err >&5
19279   echo "$as_me:19279: \$? = $ac_status" >&5
19280   (exit $ac_status); } >/dev/null; then
19281   if test -s conftest.err; then
19282     ac_cpp_err=$ac_c_preproc_warn_flag
19283   else
19284     ac_cpp_err=
19285   fi
19286 else
19287   ac_cpp_err=yes
19288 fi
19289 if test -z "$ac_cpp_err"; then
19290   eval "$as_ac_Header=yes"
19291 else
19292   echo "$as_me: failed program was:" >&5
19293   cat conftest.$ac_ext >&5
19294   eval "$as_ac_Header=no"
19295 fi
19296 rm -f conftest.err conftest.$ac_ext
19297 fi
19298 echo "$as_me:19298: result: `eval echo '${'$as_ac_Header'}'`" >&5
19299 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19300 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19301   cat >>confdefs.h <<EOF
19302 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19303 EOF
19304
19305 fi
19306 done
19307
19308 for ac_func in fork vfork
19309 do
19310 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19311 echo "$as_me:19311: checking for $ac_func" >&5
19312 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19313 if eval "test \"\${$as_ac_var+set}\" = set"; then
19314   echo $ECHO_N "(cached) $ECHO_C" >&6
19315 else
19316   cat >conftest.$ac_ext <<_ACEOF
19317 #line 19317 "configure"
19318 #include "confdefs.h"
19319 /* System header to define __stub macros and hopefully few prototypes,
19320     which can conflict with char $ac_func (); below.  */
19321 #include <assert.h>
19322 /* Override any gcc2 internal prototype to avoid an error.  */
19323 #ifdef __cplusplus
19324 extern "C"
19325 #endif
19326 /* We use char because int might match the return type of a gcc2
19327    builtin and then its argument prototype would still apply.  */
19328 char $ac_func ();
19329 char (*f) ();
19330
19331 int
19332 main (void)
19333 {
19334 /* The GNU C library defines this for functions which it implements
19335     to always fail with ENOSYS.  Some functions are actually named
19336     something starting with __ and the normal name is an alias.  */
19337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19338 choke me
19339 #else
19340 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19341 #endif
19342
19343   ;
19344   return 0;
19345 }
19346 _ACEOF
19347 rm -f conftest.$ac_objext conftest$ac_exeext
19348 if { (eval echo "$as_me:19348: \"$ac_link\"") >&5
19349   (eval $ac_link) 2>&5
19350   ac_status=$?
19351   echo "$as_me:19351: \$? = $ac_status" >&5
19352   (exit $ac_status); } &&
19353          { ac_try='test -s conftest$ac_exeext'
19354   { (eval echo "$as_me:19354: \"$ac_try\"") >&5
19355   (eval $ac_try) 2>&5
19356   ac_status=$?
19357   echo "$as_me:19357: \$? = $ac_status" >&5
19358   (exit $ac_status); }; }; then
19359   eval "$as_ac_var=yes"
19360 else
19361   echo "$as_me: failed program was:" >&5
19362 cat conftest.$ac_ext >&5
19363 eval "$as_ac_var=no"
19364 fi
19365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19366 fi
19367 echo "$as_me:19367: result: `eval echo '${'$as_ac_var'}'`" >&5
19368 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19369 if test `eval echo '${'$as_ac_var'}'` = yes; then
19370   cat >>confdefs.h <<EOF
19371 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19372 EOF
19373
19374 fi
19375 done
19376
19377 ac_cv_func_fork_works=$ac_cv_func_fork
19378 if test "x$ac_cv_func_fork" = xyes; then
19379   echo "$as_me:19379: checking for working fork" >&5
19380 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19381 if test "${ac_cv_func_fork_works+set}" = set; then
19382   echo $ECHO_N "(cached) $ECHO_C" >&6
19383 else
19384   if test "$cross_compiling" = yes; then
19385   ac_cv_func_fork_works=cross
19386 else
19387   cat >conftest.$ac_ext <<_ACEOF
19388 /* By Rüdiger Kuhlmann. */
19389       #include <sys/types.h>
19390       #if HAVE_UNISTD_H
19391       # include <unistd.h>
19392       #endif
19393       /* Some systems only have a dummy stub for fork() */
19394       int main (void)
19395       {
19396         if (fork() < 0)
19397           $ac_main_return (1);
19398         $ac_main_return (0);
19399       }
19400 _ACEOF
19401 rm -f conftest$ac_exeext
19402 if { (eval echo "$as_me:19402: \"$ac_link\"") >&5
19403   (eval $ac_link) 2>&5
19404   ac_status=$?
19405   echo "$as_me:19405: \$? = $ac_status" >&5
19406   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19407   { (eval echo "$as_me:19407: \"$ac_try\"") >&5
19408   (eval $ac_try) 2>&5
19409   ac_status=$?
19410   echo "$as_me:19410: \$? = $ac_status" >&5
19411   (exit $ac_status); }; }; then
19412   ac_cv_func_fork_works=yes
19413 else
19414   echo "$as_me: program exited with status $ac_status" >&5
19415 echo "$as_me: failed program was:" >&5
19416 cat conftest.$ac_ext >&5
19417 ac_cv_func_fork_works=no
19418 fi
19419 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19420 fi
19421 fi
19422 echo "$as_me:19422: result: $ac_cv_func_fork_works" >&5
19423 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19424
19425 fi
19426 if test "x$ac_cv_func_fork_works" = xcross; then
19427   case $host in
19428     *-*-amigaos* | *-*-msdosdjgpp*)
19429       # Override, as these systems have only a dummy fork() stub
19430       ac_cv_func_fork_works=no
19431       ;;
19432     *)
19433       ac_cv_func_fork_works=yes
19434       ;;
19435   esac
19436   { echo "$as_me:19436: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19437 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19438 fi
19439 ac_cv_func_vfork_works=$ac_cv_func_vfork
19440 if test "x$ac_cv_func_vfork" = xyes; then
19441   echo "$as_me:19441: checking for working vfork" >&5
19442 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19443 if test "${ac_cv_func_vfork_works+set}" = set; then
19444   echo $ECHO_N "(cached) $ECHO_C" >&6
19445 else
19446   if test "$cross_compiling" = yes; then
19447   ac_cv_func_vfork_works=cross
19448 else
19449   cat >conftest.$ac_ext <<_ACEOF
19450 #line 19450 "configure"
19451 #include "confdefs.h"
19452 /* Thanks to Paul Eggert for this test.  */
19453 #include <stdio.h>
19454 #include <sys/types.h>
19455 #include <sys/stat.h>
19456 #if HAVE_UNISTD_H
19457 # include <unistd.h>
19458 #endif
19459 #if HAVE_VFORK_H
19460 # include <vfork.h>
19461 #endif
19462 /* On some sparc systems, changes by the child to local and incoming
19463    argument registers are propagated back to the parent.  The compiler
19464    is told about this with #include <vfork.h>, but some compilers
19465    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19466    static variable whose address is put into a register that is
19467    clobbered by the vfork.  */
19468 static
19469 #ifdef __cplusplus
19470 sparc_address_test (int arg)
19471 # else
19472 sparc_address_test (arg) int arg;
19473 #endif
19474 {
19475   static pid_t child;
19476   if (!child) {
19477     child = vfork ();
19478     if (child < 0) {
19479       perror ("vfork");
19480       _exit(2);
19481     }
19482     if (!child) {
19483       arg = getpid();
19484       write(-1, "", 0);
19485       _exit (arg);
19486     }
19487   }
19488 }
19489
19490 int
19491 main (void)
19492 {
19493   pid_t parent = getpid ();
19494   pid_t child;
19495
19496   sparc_address_test ();
19497
19498   child = vfork ();
19499
19500   if (child == 0) {
19501     /* Here is another test for sparc vfork register problems.  This
19502        test uses lots of local variables, at least as many local
19503        variables as main has allocated so far including compiler
19504        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19505        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19506        reuse the register of parent for one of the local variables,
19507        since it will think that parent can't possibly be used any more
19508        in this routine.  Assigning to the local variable will thus
19509        munge parent in the parent process.  */
19510     pid_t
19511       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19512       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19513     /* Convince the compiler that p..p7 are live; otherwise, it might
19514        use the same hardware register for all 8 local variables.  */
19515     if (p != p1 || p != p2 || p != p3 || p != p4
19516         || p != p5 || p != p6 || p != p7)
19517       _exit(1);
19518
19519     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19520        from child file descriptors.  If the child closes a descriptor
19521        before it execs or exits, this munges the parent's descriptor
19522        as well.  Test for this by closing stdout in the child.  */
19523     _exit(close(fileno(stdout)) != 0);
19524   } else {
19525     int status;
19526     struct stat st;
19527
19528     while (wait(&status) != child)
19529       ;
19530     $ac_main_return(
19531          /* Was there some problem with vforking?  */
19532          child < 0
19533
19534          /* Did the child fail?  (This shouldn't happen.)  */
19535          || status
19536
19537          /* Did the vfork/compiler bug occur?  */
19538          || parent != getpid()
19539
19540          /* Did the file descriptor bug occur?  */
19541          || fstat(fileno(stdout), &st) != 0
19542          );
19543   }
19544 }
19545 _ACEOF
19546 rm -f conftest$ac_exeext
19547 if { (eval echo "$as_me:19547: \"$ac_link\"") >&5
19548   (eval $ac_link) 2>&5
19549   ac_status=$?
19550   echo "$as_me:19550: \$? = $ac_status" >&5
19551   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19552   { (eval echo "$as_me:19552: \"$ac_try\"") >&5
19553   (eval $ac_try) 2>&5
19554   ac_status=$?
19555   echo "$as_me:19555: \$? = $ac_status" >&5
19556   (exit $ac_status); }; }; then
19557   ac_cv_func_vfork_works=yes
19558 else
19559   echo "$as_me: program exited with status $ac_status" >&5
19560 echo "$as_me: failed program was:" >&5
19561 cat conftest.$ac_ext >&5
19562 ac_cv_func_vfork_works=no
19563 fi
19564 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19565 fi
19566 fi
19567 echo "$as_me:19567: result: $ac_cv_func_vfork_works" >&5
19568 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19569
19570 fi;
19571 if test "x$ac_cv_func_fork_works" = xcross; then
19572   ac_cv_func_vfork_works=ac_cv_func_vfork
19573   { echo "$as_me:19573: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19574 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19575 fi
19576
19577 if test "x$ac_cv_func_vfork_works" = xyes; then
19578
19579 cat >>confdefs.h <<\EOF
19580 #define HAVE_WORKING_VFORK 1
19581 EOF
19582
19583 else
19584
19585 cat >>confdefs.h <<\EOF
19586 #define vfork fork
19587 EOF
19588
19589 fi
19590 if test "x$ac_cv_func_fork_works" = xyes; then
19591
19592 cat >>confdefs.h <<\EOF
19593 #define HAVE_WORKING_FORK 1
19594 EOF
19595
19596 fi
19597
19598 # special check for test/ditto.c
19599
19600 echo "$as_me:19600: checking for openpty in -lutil" >&5
19601 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19602 if test "${ac_cv_lib_util_openpty+set}" = set; then
19603   echo $ECHO_N "(cached) $ECHO_C" >&6
19604 else
19605   ac_check_lib_save_LIBS=$LIBS
19606 LIBS="-lutil  $LIBS"
19607 cat >conftest.$ac_ext <<_ACEOF
19608 #line 19608 "configure"
19609 #include "confdefs.h"
19610
19611 /* Override any gcc2 internal prototype to avoid an error.  */
19612 #ifdef __cplusplus
19613 extern "C"
19614 #endif
19615 /* We use char because int might match the return type of a gcc2
19616    builtin and then its argument prototype would still apply.  */
19617 char openpty ();
19618 int
19619 main (void)
19620 {
19621 openpty ();
19622   ;
19623   return 0;
19624 }
19625 _ACEOF
19626 rm -f conftest.$ac_objext conftest$ac_exeext
19627 if { (eval echo "$as_me:19627: \"$ac_link\"") >&5
19628   (eval $ac_link) 2>&5
19629   ac_status=$?
19630   echo "$as_me:19630: \$? = $ac_status" >&5
19631   (exit $ac_status); } &&
19632          { ac_try='test -s conftest$ac_exeext'
19633   { (eval echo "$as_me:19633: \"$ac_try\"") >&5
19634   (eval $ac_try) 2>&5
19635   ac_status=$?
19636   echo "$as_me:19636: \$? = $ac_status" >&5
19637   (exit $ac_status); }; }; then
19638   ac_cv_lib_util_openpty=yes
19639 else
19640   echo "$as_me: failed program was:" >&5
19641 cat conftest.$ac_ext >&5
19642 ac_cv_lib_util_openpty=no
19643 fi
19644 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19645 LIBS=$ac_check_lib_save_LIBS
19646 fi
19647 echo "$as_me:19647: result: $ac_cv_lib_util_openpty" >&5
19648 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19649 if test $ac_cv_lib_util_openpty = yes; then
19650   cf_cv_lib_util=yes
19651 else
19652   cf_cv_lib_util=no
19653 fi
19654
19655 echo "$as_me:19655: checking for openpty header" >&5
19656 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19657 if test "${cf_cv_func_openpty+set}" = set; then
19658   echo $ECHO_N "(cached) $ECHO_C" >&6
19659 else
19660
19661         cf_save_LIBS="$LIBS"
19662         test $cf_cv_lib_util = yes && {
19663 cf_add_libs="-lutil"
19664 # Filter out duplicates - this happens with badly-designed ".pc" files...
19665 for cf_add_1lib in $LIBS
19666 do
19667         for cf_add_2lib in $cf_add_libs
19668         do
19669                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19670                 then
19671                         cf_add_1lib=
19672                         break
19673                 fi
19674         done
19675         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19676 done
19677 LIBS="$cf_add_libs"
19678  }
19679         for cf_header in pty.h libutil.h util.h
19680         do
19681         cat >conftest.$ac_ext <<_ACEOF
19682 #line 19682 "configure"
19683 #include "confdefs.h"
19684
19685 #include <$cf_header>
19686
19687 int
19688 main (void)
19689 {
19690
19691         int x = openpty((int *)0, (int *)0, (char *)0,
19692                                    (struct termios *)0, (struct winsize *)0);
19693
19694   ;
19695   return 0;
19696 }
19697 _ACEOF
19698 rm -f conftest.$ac_objext conftest$ac_exeext
19699 if { (eval echo "$as_me:19699: \"$ac_link\"") >&5
19700   (eval $ac_link) 2>&5
19701   ac_status=$?
19702   echo "$as_me:19702: \$? = $ac_status" >&5
19703   (exit $ac_status); } &&
19704          { ac_try='test -s conftest$ac_exeext'
19705   { (eval echo "$as_me:19705: \"$ac_try\"") >&5
19706   (eval $ac_try) 2>&5
19707   ac_status=$?
19708   echo "$as_me:19708: \$? = $ac_status" >&5
19709   (exit $ac_status); }; }; then
19710
19711                 cf_cv_func_openpty=$cf_header
19712                 break
19713
19714 else
19715   echo "$as_me: failed program was:" >&5
19716 cat conftest.$ac_ext >&5
19717
19718                 cf_cv_func_openpty=no
19719
19720 fi
19721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19722         done
19723         LIBS="$cf_save_LIBS"
19724
19725 fi
19726 echo "$as_me:19726: result: $cf_cv_func_openpty" >&5
19727 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19728
19729 if test "$cf_cv_func_openpty" != no ; then
19730
19731 cat >>confdefs.h <<EOF
19732 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19733 EOF
19734
19735 cat >>confdefs.h <<\EOF
19736 #define USE_XTERM_PTY 1
19737 EOF
19738
19739         if test "x$cf_cv_lib_util" = xyes ; then
19740
19741 cf_add_libs="-lutil"
19742 # Filter out duplicates - this happens with badly-designed ".pc" files...
19743 for cf_add_1lib in $TEST_LIBS
19744 do
19745         for cf_add_2lib in $cf_add_libs
19746         do
19747                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19748                 then
19749                         cf_add_1lib=
19750                         break
19751                 fi
19752         done
19753         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19754 done
19755 TEST_LIBS="$cf_add_libs"
19756
19757         fi
19758 fi
19759
19760 if test "$with_hashed_db" != no ; then
19761
19762 cat >>confdefs.h <<\EOF
19763 #define USE_HASHED_DB 1
19764 EOF
19765
19766 case $with_hashed_db in
19767 (yes|*able*)
19768         ;;
19769 (*)
19770         if test -d "$with_hashed_db" ; then
19771
19772 if test -n "$with_hashed_db/include" ; then
19773   for cf_add_incdir in $with_hashed_db/include
19774   do
19775         while test $cf_add_incdir != /usr/include
19776         do
19777           if test -d $cf_add_incdir
19778           then
19779                 cf_have_incdir=no
19780                 if test -n "$CFLAGS$CPPFLAGS" ; then
19781                   # a loop is needed to ensure we can add subdirs of existing dirs
19782                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19783                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19784                           cf_have_incdir=yes; break
19785                         fi
19786                   done
19787                 fi
19788
19789                 if test "$cf_have_incdir" = no ; then
19790                   if test "$cf_add_incdir" = /usr/local/include ; then
19791                         if test "$GCC" = yes
19792                         then
19793                           cf_save_CPPFLAGS=$CPPFLAGS
19794                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19795                           cat >conftest.$ac_ext <<_ACEOF
19796 #line 19796 "configure"
19797 #include "confdefs.h"
19798 #include <stdio.h>
19799 int
19800 main (void)
19801 {
19802 printf("Hello")
19803   ;
19804   return 0;
19805 }
19806 _ACEOF
19807 rm -f conftest.$ac_objext
19808 if { (eval echo "$as_me:19808: \"$ac_compile\"") >&5
19809   (eval $ac_compile) 2>&5
19810   ac_status=$?
19811   echo "$as_me:19811: \$? = $ac_status" >&5
19812   (exit $ac_status); } &&
19813          { ac_try='test -s conftest.$ac_objext'
19814   { (eval echo "$as_me:19814: \"$ac_try\"") >&5
19815   (eval $ac_try) 2>&5
19816   ac_status=$?
19817   echo "$as_me:19817: \$? = $ac_status" >&5
19818   (exit $ac_status); }; }; then
19819   :
19820 else
19821   echo "$as_me: failed program was:" >&5
19822 cat conftest.$ac_ext >&5
19823 cf_have_incdir=yes
19824 fi
19825 rm -f conftest.$ac_objext conftest.$ac_ext
19826                           CPPFLAGS=$cf_save_CPPFLAGS
19827                         fi
19828                   fi
19829                 fi
19830
19831                 if test "$cf_have_incdir" = no ; then
19832                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19833
19834 echo "${as_me:-configure}:19834: testing adding $cf_add_incdir to include-path ..." 1>&5
19835
19836                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19837
19838                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19839                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19840                   cf_add_incdir="$cf_top_incdir"
19841                 else
19842                   break
19843                 fi
19844           else
19845                 break
19846           fi
19847         done
19848   done
19849 fi
19850
19851 if test -n "$with_hashed_db/lib" ; then
19852         for cf_add_libdir in $with_hashed_db/lib
19853         do
19854                 if test $cf_add_libdir = /usr/lib ; then
19855                         :
19856                 elif test -d $cf_add_libdir
19857                 then
19858                         cf_have_libdir=no
19859                         if test -n "$LDFLAGS$LIBS" ; then
19860                                 # a loop is needed to ensure we can add subdirs of existing dirs
19861                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19862                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19863                                                 cf_have_libdir=yes; break
19864                                         fi
19865                                 done
19866                         fi
19867                         if test "$cf_have_libdir" = no ; then
19868                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19869
19870 echo "${as_me:-configure}:19870: testing adding $cf_add_libdir to library-path ..." 1>&5
19871
19872                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19873                         fi
19874                 fi
19875         done
19876 fi
19877
19878         else
19879                 case "$with_hashed_db" in
19880                 (./*|../*|/*)
19881                         { echo "$as_me:19881: WARNING: no such directory $with_hashed_db" >&5
19882 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19883                         ;;
19884                 (*)
19885
19886 cf_search=
19887
19888 test "x$prefix" != "xNONE" && \
19889 test -d "$prefix" && \
19890  {
19891         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19892         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19893         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19894         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19895         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19896         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19897 }
19898
19899 for cf_subdir_prefix in \
19900         /usr \
19901         /usr/local \
19902         /usr/pkg \
19903         /opt \
19904         /opt/local \
19905         $HOME
19906 do
19907
19908 test "x$cf_subdir_prefix" != "x$prefix" && \
19909 test -d "$cf_subdir_prefix" && \
19910 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19911         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19912         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19913         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19914         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19915         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19916         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"
19917 }
19918
19919 done
19920
19921         for cf_item in $cf_search
19922         do
19923                 case $cf_item in
19924                 (*/$with_hashed_db)
19925
19926 if test -n "$cf_item" ; then
19927   for cf_add_incdir in $cf_item
19928   do
19929         while test $cf_add_incdir != /usr/include
19930         do
19931           if test -d $cf_add_incdir
19932           then
19933                 cf_have_incdir=no
19934                 if test -n "$CFLAGS$CPPFLAGS" ; then
19935                   # a loop is needed to ensure we can add subdirs of existing dirs
19936                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19937                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19938                           cf_have_incdir=yes; break
19939                         fi
19940                   done
19941                 fi
19942
19943                 if test "$cf_have_incdir" = no ; then
19944                   if test "$cf_add_incdir" = /usr/local/include ; then
19945                         if test "$GCC" = yes
19946                         then
19947                           cf_save_CPPFLAGS=$CPPFLAGS
19948                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19949                           cat >conftest.$ac_ext <<_ACEOF
19950 #line 19950 "configure"
19951 #include "confdefs.h"
19952 #include <stdio.h>
19953 int
19954 main (void)
19955 {
19956 printf("Hello")
19957   ;
19958   return 0;
19959 }
19960 _ACEOF
19961 rm -f conftest.$ac_objext
19962 if { (eval echo "$as_me:19962: \"$ac_compile\"") >&5
19963   (eval $ac_compile) 2>&5
19964   ac_status=$?
19965   echo "$as_me:19965: \$? = $ac_status" >&5
19966   (exit $ac_status); } &&
19967          { ac_try='test -s conftest.$ac_objext'
19968   { (eval echo "$as_me:19968: \"$ac_try\"") >&5
19969   (eval $ac_try) 2>&5
19970   ac_status=$?
19971   echo "$as_me:19971: \$? = $ac_status" >&5
19972   (exit $ac_status); }; }; then
19973   :
19974 else
19975   echo "$as_me: failed program was:" >&5
19976 cat conftest.$ac_ext >&5
19977 cf_have_incdir=yes
19978 fi
19979 rm -f conftest.$ac_objext conftest.$ac_ext
19980                           CPPFLAGS=$cf_save_CPPFLAGS
19981                         fi
19982                   fi
19983                 fi
19984
19985                 if test "$cf_have_incdir" = no ; then
19986                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19987
19988 echo "${as_me:-configure}:19988: testing adding $cf_add_incdir to include-path ..." 1>&5
19989
19990                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19991
19992                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19993                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19994                   cf_add_incdir="$cf_top_incdir"
19995                 else
19996                   break
19997                 fi
19998           else
19999                 break
20000           fi
20001         done
20002   done
20003 fi
20004
20005                         ;;
20006                 esac
20007         done
20008
20009 cf_search=
20010
20011 test "x$prefix" != "xNONE" && \
20012 test -d "$prefix" && \
20013  {
20014         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
20015         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
20016         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
20017         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
20018         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
20019         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
20020 }
20021
20022 for cf_subdir_prefix in \
20023         /usr \
20024         /usr/local \
20025         /usr/pkg \
20026         /opt \
20027         /opt/local \
20028         $HOME
20029 do
20030
20031 test "x$cf_subdir_prefix" != "x$prefix" && \
20032 test -d "$cf_subdir_prefix" && \
20033 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20034         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
20035         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
20036         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
20037         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
20038         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
20039         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"
20040 }
20041
20042 done
20043
20044         for cf_item in $cf_search
20045         do
20046                 case $cf_item in
20047                 (*/$with_hashed_db)
20048
20049 if test -n "$cf_item" ; then
20050         for cf_add_libdir in $cf_item
20051         do
20052                 if test $cf_add_libdir = /usr/lib ; then
20053                         :
20054                 elif test -d $cf_add_libdir
20055                 then
20056                         cf_have_libdir=no
20057                         if test -n "$LDFLAGS$LIBS" ; then
20058                                 # a loop is needed to ensure we can add subdirs of existing dirs
20059                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20060                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20061                                                 cf_have_libdir=yes; break
20062                                         fi
20063                                 done
20064                         fi
20065                         if test "$cf_have_libdir" = no ; then
20066                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20067
20068 echo "${as_me:-configure}:20068: testing adding $cf_add_libdir to library-path ..." 1>&5
20069
20070                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20071                         fi
20072                 fi
20073         done
20074 fi
20075
20076                         ;;
20077                 esac
20078         done
20079
20080                         ;;
20081                 esac
20082         fi
20083 esac
20084
20085 echo "$as_me:20085: checking for db.h" >&5
20086 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
20087 if test "${ac_cv_header_db_h+set}" = set; then
20088   echo $ECHO_N "(cached) $ECHO_C" >&6
20089 else
20090   cat >conftest.$ac_ext <<_ACEOF
20091 #line 20091 "configure"
20092 #include "confdefs.h"
20093 #include <db.h>
20094 _ACEOF
20095 if { (eval echo "$as_me:20095: \"$ac_cpp conftest.$ac_ext\"") >&5
20096   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20097   ac_status=$?
20098   egrep -v '^ *\+' conftest.er1 >conftest.err
20099   rm -f conftest.er1
20100   cat conftest.err >&5
20101   echo "$as_me:20101: \$? = $ac_status" >&5
20102   (exit $ac_status); } >/dev/null; then
20103   if test -s conftest.err; then
20104     ac_cpp_err=$ac_c_preproc_warn_flag
20105   else
20106     ac_cpp_err=
20107   fi
20108 else
20109   ac_cpp_err=yes
20110 fi
20111 if test -z "$ac_cpp_err"; then
20112   ac_cv_header_db_h=yes
20113 else
20114   echo "$as_me: failed program was:" >&5
20115   cat conftest.$ac_ext >&5
20116   ac_cv_header_db_h=no
20117 fi
20118 rm -f conftest.err conftest.$ac_ext
20119 fi
20120 echo "$as_me:20120: result: $ac_cv_header_db_h" >&5
20121 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20122 if test $ac_cv_header_db_h = yes; then
20123
20124 echo "$as_me:20124: checking for version of db" >&5
20125 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20126 if test "${cf_cv_hashed_db_version+set}" = set; then
20127   echo $ECHO_N "(cached) $ECHO_C" >&6
20128 else
20129
20130 cf_cv_hashed_db_version=unknown
20131
20132 for cf_db_version in 1 2 3 4 5 6
20133 do
20134
20135 echo "${as_me:-configure}:20135: testing checking for db version $cf_db_version ..." 1>&5
20136
20137         cat >conftest.$ac_ext <<_ACEOF
20138 #line 20138 "configure"
20139 #include "confdefs.h"
20140
20141 $ac_includes_default
20142 #include <db.h>
20143
20144 #ifdef DB_VERSION_MAJOR
20145         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20146 #if $cf_db_version == DB_VERSION_MAJOR
20147         /* ok */
20148 #else
20149         make an error
20150 #endif
20151 #else
20152 #if $cf_db_version == 1
20153         /* ok: assuming this is DB 1.8.5 */
20154 #else
20155         make an error
20156 #endif
20157 #endif
20158
20159 int
20160 main (void)
20161 {
20162 DBT *foo = 0
20163   ;
20164   return 0;
20165 }
20166 _ACEOF
20167 rm -f conftest.$ac_objext
20168 if { (eval echo "$as_me:20168: \"$ac_compile\"") >&5
20169   (eval $ac_compile) 2>&5
20170   ac_status=$?
20171   echo "$as_me:20171: \$? = $ac_status" >&5
20172   (exit $ac_status); } &&
20173          { ac_try='test -s conftest.$ac_objext'
20174   { (eval echo "$as_me:20174: \"$ac_try\"") >&5
20175   (eval $ac_try) 2>&5
20176   ac_status=$?
20177   echo "$as_me:20177: \$? = $ac_status" >&5
20178   (exit $ac_status); }; }; then
20179
20180         cf_cv_hashed_db_version=$cf_db_version
20181         break
20182
20183 else
20184   echo "$as_me: failed program was:" >&5
20185 cat conftest.$ac_ext >&5
20186 fi
20187 rm -f conftest.$ac_objext conftest.$ac_ext
20188 done
20189
20190 fi
20191 echo "$as_me:20191: result: $cf_cv_hashed_db_version" >&5
20192 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20193
20194 if test "$cf_cv_hashed_db_version" = unknown ; then
20195         { { echo "$as_me:20195: error: Cannot determine version of db" >&5
20196 echo "$as_me: error: Cannot determine version of db" >&2;}
20197    { (exit 1); exit 1; }; }
20198 else
20199
20200 echo "$as_me:20200: checking for db libraries" >&5
20201 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20202 if test "${cf_cv_hashed_db_libs+set}" = set; then
20203   echo $ECHO_N "(cached) $ECHO_C" >&6
20204 else
20205
20206 cf_cv_hashed_db_libs=unknown
20207 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20208 do
20209         cf_save_libs="$LIBS"
20210         if test -n "$cf_db_libs"; then
20211
20212 cf_add_libs="-l$cf_db_libs"
20213 # Filter out duplicates - this happens with badly-designed ".pc" files...
20214 for cf_add_1lib in $LIBS
20215 do
20216         for cf_add_2lib in $cf_add_libs
20217         do
20218                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20219                 then
20220                         cf_add_1lib=
20221                         break
20222                 fi
20223         done
20224         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20225 done
20226 LIBS="$cf_add_libs"
20227
20228         fi
20229
20230 echo "${as_me:-configure}:20230: testing checking for library "$cf_db_libs" ..." 1>&5
20231
20232         cat >conftest.$ac_ext <<_ACEOF
20233 #line 20233 "configure"
20234 #include "confdefs.h"
20235
20236 $ac_includes_default
20237 #include <db.h>
20238
20239 int
20240 main (void)
20241 {
20242
20243         char *path = "/tmp/foo";
20244 #ifdef DB_VERSION_MAJOR
20245 #if DB_VERSION_MAJOR >= 4
20246         DB *result = 0;
20247         db_create(&result, NULL, 0);
20248         result->open(result,
20249                 NULL,
20250                 path,
20251                 path,
20252                 DB_HASH,
20253                 DB_CREATE,
20254                 0644);
20255 #elif DB_VERSION_MAJOR >= 3
20256         DB *result = 0;
20257         db_create(&result, NULL, 0);
20258         result->open(result,
20259                 path,
20260                 path,
20261                 DB_HASH,
20262                 DB_CREATE,
20263                 0644);
20264 #elif DB_VERSION_MAJOR >= 2
20265         DB *result = 0;
20266         db_open(path,
20267                 DB_HASH,
20268                 DB_CREATE,
20269                 0644,
20270                 (DB_ENV *) 0,
20271                 (DB_INFO *) 0,
20272                 &result);
20273 #endif /* DB_VERSION_MAJOR */
20274 #else
20275         DB *result = dbopen(path,
20276                      2,
20277                      0644,
20278                      DB_HASH,
20279                      0);
20280 #endif
20281         ${cf_cv_main_return:-return}(result != 0)
20282
20283   ;
20284   return 0;
20285 }
20286 _ACEOF
20287 rm -f conftest.$ac_objext conftest$ac_exeext
20288 if { (eval echo "$as_me:20288: \"$ac_link\"") >&5
20289   (eval $ac_link) 2>&5
20290   ac_status=$?
20291   echo "$as_me:20291: \$? = $ac_status" >&5
20292   (exit $ac_status); } &&
20293          { ac_try='test -s conftest$ac_exeext'
20294   { (eval echo "$as_me:20294: \"$ac_try\"") >&5
20295   (eval $ac_try) 2>&5
20296   ac_status=$?
20297   echo "$as_me:20297: \$? = $ac_status" >&5
20298   (exit $ac_status); }; }; then
20299
20300         if test -n "$cf_db_libs" ; then
20301                 cf_cv_hashed_db_libs=$cf_db_libs
20302         else
20303                 cf_cv_hashed_db_libs=default
20304         fi
20305         LIBS="$cf_save_libs"
20306         break
20307
20308 else
20309   echo "$as_me: failed program was:" >&5
20310 cat conftest.$ac_ext >&5
20311 fi
20312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20313         LIBS="$cf_save_libs"
20314 done
20315
20316 fi
20317 echo "$as_me:20317: result: $cf_cv_hashed_db_libs" >&5
20318 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20319
20320         if test "$cf_cv_hashed_db_libs" = unknown ; then
20321                 { { echo "$as_me:20321: error: Cannot determine library for db" >&5
20322 echo "$as_me: error: Cannot determine library for db" >&2;}
20323    { (exit 1); exit 1; }; }
20324         elif test "$cf_cv_hashed_db_libs" != default ; then
20325
20326 cf_add_libs="-l$cf_cv_hashed_db_libs"
20327 # Filter out duplicates - this happens with badly-designed ".pc" files...
20328 for cf_add_1lib in $LIBS
20329 do
20330         for cf_add_2lib in $cf_add_libs
20331         do
20332                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20333                 then
20334                         cf_add_1lib=
20335                         break
20336                 fi
20337         done
20338         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20339 done
20340 LIBS="$cf_add_libs"
20341
20342         fi
20343 fi
20344
20345 else
20346
20347         { { echo "$as_me:20347: error: Cannot find db.h" >&5
20348 echo "$as_me: error: Cannot find db.h" >&2;}
20349    { (exit 1); exit 1; }; }
20350
20351 fi
20352
20353 fi
20354
20355 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20356         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20357         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20358 fi
20359
20360 # Just in case, check if the C compiler has a bool type.
20361
20362 echo "$as_me:20362: checking if we should include stdbool.h" >&5
20363 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20364
20365 if test "${cf_cv_header_stdbool_h+set}" = set; then
20366   echo $ECHO_N "(cached) $ECHO_C" >&6
20367 else
20368
20369         cat >conftest.$ac_ext <<_ACEOF
20370 #line 20370 "configure"
20371 #include "confdefs.h"
20372
20373 int
20374 main (void)
20375 {
20376 bool foo = false
20377   ;
20378   return 0;
20379 }
20380 _ACEOF
20381 rm -f conftest.$ac_objext
20382 if { (eval echo "$as_me:20382: \"$ac_compile\"") >&5
20383   (eval $ac_compile) 2>&5
20384   ac_status=$?
20385   echo "$as_me:20385: \$? = $ac_status" >&5
20386   (exit $ac_status); } &&
20387          { ac_try='test -s conftest.$ac_objext'
20388   { (eval echo "$as_me:20388: \"$ac_try\"") >&5
20389   (eval $ac_try) 2>&5
20390   ac_status=$?
20391   echo "$as_me:20391: \$? = $ac_status" >&5
20392   (exit $ac_status); }; }; then
20393   cf_cv_header_stdbool_h=0
20394 else
20395   echo "$as_me: failed program was:" >&5
20396 cat conftest.$ac_ext >&5
20397 cat >conftest.$ac_ext <<_ACEOF
20398 #line 20398 "configure"
20399 #include "confdefs.h"
20400
20401 #ifndef __BEOS__
20402 #include <stdbool.h>
20403 #endif
20404
20405 int
20406 main (void)
20407 {
20408 bool foo = false
20409   ;
20410   return 0;
20411 }
20412 _ACEOF
20413 rm -f conftest.$ac_objext
20414 if { (eval echo "$as_me:20414: \"$ac_compile\"") >&5
20415   (eval $ac_compile) 2>&5
20416   ac_status=$?
20417   echo "$as_me:20417: \$? = $ac_status" >&5
20418   (exit $ac_status); } &&
20419          { ac_try='test -s conftest.$ac_objext'
20420   { (eval echo "$as_me:20420: \"$ac_try\"") >&5
20421   (eval $ac_try) 2>&5
20422   ac_status=$?
20423   echo "$as_me:20423: \$? = $ac_status" >&5
20424   (exit $ac_status); }; }; then
20425   cf_cv_header_stdbool_h=1
20426 else
20427   echo "$as_me: failed program was:" >&5
20428 cat conftest.$ac_ext >&5
20429 cf_cv_header_stdbool_h=0
20430 fi
20431 rm -f conftest.$ac_objext conftest.$ac_ext
20432 fi
20433 rm -f conftest.$ac_objext conftest.$ac_ext
20434 fi
20435
20436 if test "$cf_cv_header_stdbool_h" = 1
20437 then    echo "$as_me:20437: result: yes" >&5
20438 echo "${ECHO_T}yes" >&6
20439 else    echo "$as_me:20439: result: no" >&5
20440 echo "${ECHO_T}no" >&6
20441 fi
20442
20443 echo "$as_me:20443: checking for builtin bool type" >&5
20444 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20445
20446 if test "${cf_cv_cc_bool_type+set}" = set; then
20447   echo $ECHO_N "(cached) $ECHO_C" >&6
20448 else
20449
20450         cat >conftest.$ac_ext <<_ACEOF
20451 #line 20451 "configure"
20452 #include "confdefs.h"
20453
20454 #include <stdio.h>
20455 #include <sys/types.h>
20456
20457 int
20458 main (void)
20459 {
20460 bool x = false
20461   ;
20462   return 0;
20463 }
20464 _ACEOF
20465 rm -f conftest.$ac_objext
20466 if { (eval echo "$as_me:20466: \"$ac_compile\"") >&5
20467   (eval $ac_compile) 2>&5
20468   ac_status=$?
20469   echo "$as_me:20469: \$? = $ac_status" >&5
20470   (exit $ac_status); } &&
20471          { ac_try='test -s conftest.$ac_objext'
20472   { (eval echo "$as_me:20472: \"$ac_try\"") >&5
20473   (eval $ac_try) 2>&5
20474   ac_status=$?
20475   echo "$as_me:20475: \$? = $ac_status" >&5
20476   (exit $ac_status); }; }; then
20477   cf_cv_cc_bool_type=1
20478 else
20479   echo "$as_me: failed program was:" >&5
20480 cat conftest.$ac_ext >&5
20481 cf_cv_cc_bool_type=0
20482 fi
20483 rm -f conftest.$ac_objext conftest.$ac_ext
20484
20485 fi
20486
20487 if test "$cf_cv_cc_bool_type" = 1
20488 then    echo "$as_me:20488: result: yes" >&5
20489 echo "${ECHO_T}yes" >&6
20490 else    echo "$as_me:20490: result: no" >&5
20491 echo "${ECHO_T}no" >&6
20492 fi
20493
20494 # Check for C++ compiler characteristics (and ensure that it's there!)
20495 if test -n "$CXX" ; then
20496         ac_ext=cc
20497 ac_cpp='$CXXCPP $CPPFLAGS'
20498 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20499 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20500 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20501 ac_main_return=return
20502
20503 if test -n "$GXX" ; then
20504
20505         cf_save="$LIBS"
20506         LIBS="$LIBS $CXXLIBS"
20507         echo "$as_me:20507: checking if we already have C++ library" >&5
20508 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20509         cat >conftest.$ac_ext <<_ACEOF
20510 #line 20510 "configure"
20511 #include "confdefs.h"
20512
20513                         #include <iostream>
20514 int
20515 main (void)
20516 {
20517
20518                         std::cout << "Hello World!" << std::endl;
20519   ;
20520   return 0;
20521 }
20522 _ACEOF
20523 rm -f conftest.$ac_objext conftest$ac_exeext
20524 if { (eval echo "$as_me:20524: \"$ac_link\"") >&5
20525   (eval $ac_link) 2>&5
20526   ac_status=$?
20527   echo "$as_me:20527: \$? = $ac_status" >&5
20528   (exit $ac_status); } &&
20529          { ac_try='test -s conftest$ac_exeext'
20530   { (eval echo "$as_me:20530: \"$ac_try\"") >&5
20531   (eval $ac_try) 2>&5
20532   ac_status=$?
20533   echo "$as_me:20533: \$? = $ac_status" >&5
20534   (exit $ac_status); }; }; then
20535   cf_have_libstdcpp=yes
20536 else
20537   echo "$as_me: failed program was:" >&5
20538 cat conftest.$ac_ext >&5
20539 cf_have_libstdcpp=no
20540 fi
20541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20542         echo "$as_me:20542: result: $cf_have_libstdcpp" >&5
20543 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20544         LIBS="$cf_save"
20545
20546         if test $cf_have_libstdcpp != yes
20547         then
20548                 case $cf_cv_system_name in
20549                 (os2*)
20550                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20551                                 cf_stdcpp_libname=stdcpp
20552                         else
20553                                 cf_stdcpp_libname=stdc++
20554                         fi
20555                         ;;
20556                 (*)
20557                         cf_stdcpp_libname=stdc++
20558                         ;;
20559                 esac
20560
20561                 echo "$as_me:20561: checking for library $cf_stdcpp_libname" >&5
20562 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20563 if test "${cf_cv_libstdcpp+set}" = set; then
20564   echo $ECHO_N "(cached) $ECHO_C" >&6
20565 else
20566
20567                         cf_save="$LIBS"
20568                         LIBS="$LIBS $CXXLIBS"
20569
20570 cf_add_libs="-l$cf_stdcpp_libname"
20571 # Filter out duplicates - this happens with badly-designed ".pc" files...
20572 for cf_add_1lib in $LIBS
20573 do
20574         for cf_add_2lib in $cf_add_libs
20575         do
20576                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20577                 then
20578                         cf_add_1lib=
20579                         break
20580                 fi
20581         done
20582         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20583 done
20584 LIBS="$cf_add_libs"
20585
20586                 cat >conftest.$ac_ext <<_ACEOF
20587 #line 20587 "configure"
20588 #include "confdefs.h"
20589
20590                                 #include <iostream>
20591 int
20592 main (void)
20593 {
20594
20595                                 std::cout << "Hello World!" << std::endl;
20596   ;
20597   return 0;
20598 }
20599 _ACEOF
20600 rm -f conftest.$ac_objext conftest$ac_exeext
20601 if { (eval echo "$as_me:20601: \"$ac_link\"") >&5
20602   (eval $ac_link) 2>&5
20603   ac_status=$?
20604   echo "$as_me:20604: \$? = $ac_status" >&5
20605   (exit $ac_status); } &&
20606          { ac_try='test -s conftest$ac_exeext'
20607   { (eval echo "$as_me:20607: \"$ac_try\"") >&5
20608   (eval $ac_try) 2>&5
20609   ac_status=$?
20610   echo "$as_me:20610: \$? = $ac_status" >&5
20611   (exit $ac_status); }; }; then
20612   cf_cv_libstdcpp=yes
20613 else
20614   echo "$as_me: failed program was:" >&5
20615 cat conftest.$ac_ext >&5
20616 cf_cv_libstdcpp=no
20617 fi
20618 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20619                         LIBS="$cf_save"
20620
20621 fi
20622 echo "$as_me:20622: result: $cf_cv_libstdcpp" >&5
20623 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20624                 test "$cf_cv_libstdcpp" = yes && {
20625 cf_add_libs="-l$cf_stdcpp_libname"
20626 # Filter out duplicates - this happens with badly-designed ".pc" files...
20627 for cf_add_1lib in $CXXLIBS
20628 do
20629         for cf_add_2lib in $cf_add_libs
20630         do
20631                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20632                 then
20633                         cf_add_1lib=
20634                         break
20635                 fi
20636         done
20637         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20638 done
20639 CXXLIBS="$cf_add_libs"
20640  }
20641         fi
20642 fi
20643
20644         echo "$as_me:20644: checking whether $CXX understands -c and -o together" >&5
20645 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20646 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20647   echo $ECHO_N "(cached) $ECHO_C" >&6
20648 else
20649
20650 cat > conftest.$ac_ext <<CF_EOF
20651 int main(void)
20652 {
20653         ${cf_cv_main_return:-return}(0);
20654 }
20655 CF_EOF
20656 # We do the test twice because some compilers refuse to overwrite an
20657 # existing .o file with -o, though they will create one.
20658 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20659 if { (eval echo "$as_me:20659: \"$ac_try\"") >&5
20660   (eval $ac_try) 2>&5
20661   ac_status=$?
20662   echo "$as_me:20662: \$? = $ac_status" >&5
20663   (exit $ac_status); } &&
20664   test -f conftest2.$ac_objext && { (eval echo "$as_me:20664: \"$ac_try\"") >&5
20665   (eval $ac_try) 2>&5
20666   ac_status=$?
20667   echo "$as_me:20667: \$? = $ac_status" >&5
20668   (exit $ac_status); };
20669 then
20670   eval cf_cv_prog_CXX_c_o=yes
20671 else
20672   eval cf_cv_prog_CXX_c_o=no
20673 fi
20674 rm -rf conftest*
20675
20676 fi
20677 if test $cf_cv_prog_CXX_c_o = yes; then
20678   echo "$as_me:20678: result: yes" >&5
20679 echo "${ECHO_T}yes" >&6
20680 else
20681   echo "$as_me:20681: result: no" >&5
20682 echo "${ECHO_T}no" >&6
20683 fi
20684
20685         case $GXX_VERSION in
20686         (1*|2.0-6*)
20687                 cf_cxx_library=yes
20688                 ;;
20689         (*-2.7*|2.7*)
20690
20691 cf_cxx_library=unknown
20692 case $cf_cv_system_name in
20693 (os2*)
20694         cf_gpp_libname=gpp
20695         ;;
20696 (*)
20697         cf_gpp_libname=g++
20698         ;;
20699 esac
20700 if test "$GXX" = yes; then
20701         echo "$as_me:20701: checking for lib$cf_gpp_libname" >&5
20702 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20703         cf_save="$LIBS"
20704
20705 cf_add_libs="-l$cf_gpp_libname"
20706 # Filter out duplicates - this happens with badly-designed ".pc" files...
20707 for cf_add_1lib in $LIBS
20708 do
20709         for cf_add_2lib in $cf_add_libs
20710         do
20711                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20712                 then
20713                         cf_add_1lib=
20714                         break
20715                 fi
20716         done
20717         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20718 done
20719 LIBS="$cf_add_libs"
20720
20721         cat >conftest.$ac_ext <<_ACEOF
20722 #line 20722 "configure"
20723 #include "confdefs.h"
20724
20725 #include <$cf_gpp_libname/builtin.h>
20726
20727 int
20728 main (void)
20729 {
20730 two_arg_error_handler_t foo2 = lib_error_handler
20731   ;
20732   return 0;
20733 }
20734 _ACEOF
20735 rm -f conftest.$ac_objext conftest$ac_exeext
20736 if { (eval echo "$as_me:20736: \"$ac_link\"") >&5
20737   (eval $ac_link) 2>&5
20738   ac_status=$?
20739   echo "$as_me:20739: \$? = $ac_status" >&5
20740   (exit $ac_status); } &&
20741          { ac_try='test -s conftest$ac_exeext'
20742   { (eval echo "$as_me:20742: \"$ac_try\"") >&5
20743   (eval $ac_try) 2>&5
20744   ac_status=$?
20745   echo "$as_me:20745: \$? = $ac_status" >&5
20746   (exit $ac_status); }; }; then
20747   cf_cxx_library=yes
20748
20749 cf_add_libs="-l$cf_gpp_libname"
20750 # Filter out duplicates - this happens with badly-designed ".pc" files...
20751 for cf_add_1lib in $CXXLIBS
20752 do
20753         for cf_add_2lib in $cf_add_libs
20754         do
20755                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20756                 then
20757                         cf_add_1lib=
20758                         break
20759                 fi
20760         done
20761         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20762 done
20763 CXXLIBS="$cf_add_libs"
20764
20765          if test "$cf_gpp_libname" = cpp ; then
20766
20767 cat >>confdefs.h <<\EOF
20768 #define HAVE_GPP_BUILTIN_H 1
20769 EOF
20770
20771          else
20772
20773 cat >>confdefs.h <<\EOF
20774 #define HAVE_GXX_BUILTIN_H 1
20775 EOF
20776
20777          fi
20778 else
20779   echo "$as_me: failed program was:" >&5
20780 cat conftest.$ac_ext >&5
20781 cat >conftest.$ac_ext <<_ACEOF
20782 #line 20782 "configure"
20783 #include "confdefs.h"
20784
20785 #include <builtin.h>
20786
20787 int
20788 main (void)
20789 {
20790 two_arg_error_handler_t foo2 = lib_error_handler
20791   ;
20792   return 0;
20793 }
20794 _ACEOF
20795 rm -f conftest.$ac_objext conftest$ac_exeext
20796 if { (eval echo "$as_me:20796: \"$ac_link\"") >&5
20797   (eval $ac_link) 2>&5
20798   ac_status=$?
20799   echo "$as_me:20799: \$? = $ac_status" >&5
20800   (exit $ac_status); } &&
20801          { ac_try='test -s conftest$ac_exeext'
20802   { (eval echo "$as_me:20802: \"$ac_try\"") >&5
20803   (eval $ac_try) 2>&5
20804   ac_status=$?
20805   echo "$as_me:20805: \$? = $ac_status" >&5
20806   (exit $ac_status); }; }; then
20807   cf_cxx_library=yes
20808
20809 cf_add_libs="-l$cf_gpp_libname"
20810 # Filter out duplicates - this happens with badly-designed ".pc" files...
20811 for cf_add_1lib in $CXXLIBS
20812 do
20813         for cf_add_2lib in $cf_add_libs
20814         do
20815                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20816                 then
20817                         cf_add_1lib=
20818                         break
20819                 fi
20820         done
20821         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20822 done
20823 CXXLIBS="$cf_add_libs"
20824
20825 cat >>confdefs.h <<\EOF
20826 #define HAVE_BUILTIN_H 1
20827 EOF
20828
20829 else
20830   echo "$as_me: failed program was:" >&5
20831 cat conftest.$ac_ext >&5
20832 cf_cxx_library=no
20833 fi
20834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20835 fi
20836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20837         LIBS="$cf_save"
20838         echo "$as_me:20838: result: $cf_cxx_library" >&5
20839 echo "${ECHO_T}$cf_cxx_library" >&6
20840 fi
20841
20842                 ;;
20843         (*)
20844                 cf_cxx_library=no
20845                 ;;
20846         esac
20847
20848         ac_ext=cc
20849 ac_cpp='$CXXCPP $CPPFLAGS'
20850 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20851 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20852 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20853 ac_main_return=return
20854 echo "$as_me:20854: checking how to run the C++ preprocessor" >&5
20855 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20856 if test -z "$CXXCPP"; then
20857   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20858   echo $ECHO_N "(cached) $ECHO_C" >&6
20859 else
20860       # Double quotes because CXXCPP needs to be expanded
20861     for CXXCPP in "$CXX -E" "/lib/cpp"
20862     do
20863       ac_preproc_ok=false
20864 for ac_cxx_preproc_warn_flag in '' yes
20865 do
20866   # Use a header file that comes with gcc, so configuring glibc
20867   # with a fresh cross-compiler works.
20868   # On the NeXT, cc -E runs the code through the compiler's parser,
20869   # not just through cpp. "Syntax error" is here to catch this case.
20870   cat >conftest.$ac_ext <<_ACEOF
20871 #line 20871 "configure"
20872 #include "confdefs.h"
20873 #include <assert.h>
20874                      Syntax error
20875 _ACEOF
20876 if { (eval echo "$as_me:20876: \"$ac_cpp conftest.$ac_ext\"") >&5
20877   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20878   ac_status=$?
20879   egrep -v '^ *\+' conftest.er1 >conftest.err
20880   rm -f conftest.er1
20881   cat conftest.err >&5
20882   echo "$as_me:20882: \$? = $ac_status" >&5
20883   (exit $ac_status); } >/dev/null; then
20884   if test -s conftest.err; then
20885     ac_cpp_err=$ac_cxx_preproc_warn_flag
20886   else
20887     ac_cpp_err=
20888   fi
20889 else
20890   ac_cpp_err=yes
20891 fi
20892 if test -z "$ac_cpp_err"; then
20893   :
20894 else
20895   echo "$as_me: failed program was:" >&5
20896   cat conftest.$ac_ext >&5
20897   # Broken: fails on valid input.
20898 continue
20899 fi
20900 rm -f conftest.err conftest.$ac_ext
20901
20902   # OK, works on sane cases.  Now check whether non-existent headers
20903   # can be detected and how.
20904   cat >conftest.$ac_ext <<_ACEOF
20905 #line 20905 "configure"
20906 #include "confdefs.h"
20907 #include <ac_nonexistent.h>
20908 _ACEOF
20909 if { (eval echo "$as_me:20909: \"$ac_cpp conftest.$ac_ext\"") >&5
20910   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20911   ac_status=$?
20912   egrep -v '^ *\+' conftest.er1 >conftest.err
20913   rm -f conftest.er1
20914   cat conftest.err >&5
20915   echo "$as_me:20915: \$? = $ac_status" >&5
20916   (exit $ac_status); } >/dev/null; then
20917   if test -s conftest.err; then
20918     ac_cpp_err=$ac_cxx_preproc_warn_flag
20919   else
20920     ac_cpp_err=
20921   fi
20922 else
20923   ac_cpp_err=yes
20924 fi
20925 if test -z "$ac_cpp_err"; then
20926   # Broken: success on invalid input.
20927 continue
20928 else
20929   echo "$as_me: failed program was:" >&5
20930   cat conftest.$ac_ext >&5
20931   # Passes both tests.
20932 ac_preproc_ok=:
20933 break
20934 fi
20935 rm -f conftest.err conftest.$ac_ext
20936
20937 done
20938 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20939 rm -f conftest.err conftest.$ac_ext
20940 if $ac_preproc_ok; then
20941   break
20942 fi
20943
20944     done
20945     ac_cv_prog_CXXCPP=$CXXCPP
20946
20947 fi
20948   CXXCPP=$ac_cv_prog_CXXCPP
20949 else
20950   ac_cv_prog_CXXCPP=$CXXCPP
20951 fi
20952 echo "$as_me:20952: result: $CXXCPP" >&5
20953 echo "${ECHO_T}$CXXCPP" >&6
20954 ac_preproc_ok=false
20955 for ac_cxx_preproc_warn_flag in '' yes
20956 do
20957   # Use a header file that comes with gcc, so configuring glibc
20958   # with a fresh cross-compiler works.
20959   # On the NeXT, cc -E runs the code through the compiler's parser,
20960   # not just through cpp. "Syntax error" is here to catch this case.
20961   cat >conftest.$ac_ext <<_ACEOF
20962 #line 20962 "configure"
20963 #include "confdefs.h"
20964 #include <assert.h>
20965                      Syntax error
20966 _ACEOF
20967 if { (eval echo "$as_me:20967: \"$ac_cpp conftest.$ac_ext\"") >&5
20968   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20969   ac_status=$?
20970   egrep -v '^ *\+' conftest.er1 >conftest.err
20971   rm -f conftest.er1
20972   cat conftest.err >&5
20973   echo "$as_me:20973: \$? = $ac_status" >&5
20974   (exit $ac_status); } >/dev/null; then
20975   if test -s conftest.err; then
20976     ac_cpp_err=$ac_cxx_preproc_warn_flag
20977   else
20978     ac_cpp_err=
20979   fi
20980 else
20981   ac_cpp_err=yes
20982 fi
20983 if test -z "$ac_cpp_err"; then
20984   :
20985 else
20986   echo "$as_me: failed program was:" >&5
20987   cat conftest.$ac_ext >&5
20988   # Broken: fails on valid input.
20989 continue
20990 fi
20991 rm -f conftest.err conftest.$ac_ext
20992
20993   # OK, works on sane cases.  Now check whether non-existent headers
20994   # can be detected and how.
20995   cat >conftest.$ac_ext <<_ACEOF
20996 #line 20996 "configure"
20997 #include "confdefs.h"
20998 #include <ac_nonexistent.h>
20999 _ACEOF
21000 if { (eval echo "$as_me:21000: \"$ac_cpp conftest.$ac_ext\"") >&5
21001   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21002   ac_status=$?
21003   egrep -v '^ *\+' conftest.er1 >conftest.err
21004   rm -f conftest.er1
21005   cat conftest.err >&5
21006   echo "$as_me:21006: \$? = $ac_status" >&5
21007   (exit $ac_status); } >/dev/null; then
21008   if test -s conftest.err; then
21009     ac_cpp_err=$ac_cxx_preproc_warn_flag
21010   else
21011     ac_cpp_err=
21012   fi
21013 else
21014   ac_cpp_err=yes
21015 fi
21016 if test -z "$ac_cpp_err"; then
21017   # Broken: success on invalid input.
21018 continue
21019 else
21020   echo "$as_me: failed program was:" >&5
21021   cat conftest.$ac_ext >&5
21022   # Passes both tests.
21023 ac_preproc_ok=:
21024 break
21025 fi
21026 rm -f conftest.err conftest.$ac_ext
21027
21028 done
21029 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21030 rm -f conftest.err conftest.$ac_ext
21031 if $ac_preproc_ok; then
21032   :
21033 else
21034   { { echo "$as_me:21034: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
21035 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
21036    { (exit 1); exit 1; }; }
21037 fi
21038
21039 ac_ext=cc
21040 ac_cpp='$CXXCPP $CPPFLAGS'
21041 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21042 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21043 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21044 ac_main_return=return
21045
21046 for ac_header in typeinfo
21047 do
21048 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21049 echo "$as_me:21049: checking for $ac_header" >&5
21050 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21051 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21052   echo $ECHO_N "(cached) $ECHO_C" >&6
21053 else
21054   cat >conftest.$ac_ext <<_ACEOF
21055 #line 21055 "configure"
21056 #include "confdefs.h"
21057 #include <$ac_header>
21058 _ACEOF
21059 if { (eval echo "$as_me:21059: \"$ac_cpp conftest.$ac_ext\"") >&5
21060   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21061   ac_status=$?
21062   egrep -v '^ *\+' conftest.er1 >conftest.err
21063   rm -f conftest.er1
21064   cat conftest.err >&5
21065   echo "$as_me:21065: \$? = $ac_status" >&5
21066   (exit $ac_status); } >/dev/null; then
21067   if test -s conftest.err; then
21068     ac_cpp_err=$ac_cxx_preproc_warn_flag
21069   else
21070     ac_cpp_err=
21071   fi
21072 else
21073   ac_cpp_err=yes
21074 fi
21075 if test -z "$ac_cpp_err"; then
21076   eval "$as_ac_Header=yes"
21077 else
21078   echo "$as_me: failed program was:" >&5
21079   cat conftest.$ac_ext >&5
21080   eval "$as_ac_Header=no"
21081 fi
21082 rm -f conftest.err conftest.$ac_ext
21083 fi
21084 echo "$as_me:21084: result: `eval echo '${'$as_ac_Header'}'`" >&5
21085 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21086 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21087   cat >>confdefs.h <<EOF
21088 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21089 EOF
21090
21091 fi
21092 done
21093
21094 for ac_header in iostream
21095 do
21096 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21097 echo "$as_me:21097: checking for $ac_header" >&5
21098 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21099 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21100   echo $ECHO_N "(cached) $ECHO_C" >&6
21101 else
21102   cat >conftest.$ac_ext <<_ACEOF
21103 #line 21103 "configure"
21104 #include "confdefs.h"
21105 #include <$ac_header>
21106 _ACEOF
21107 if { (eval echo "$as_me:21107: \"$ac_cpp conftest.$ac_ext\"") >&5
21108   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21109   ac_status=$?
21110   egrep -v '^ *\+' conftest.er1 >conftest.err
21111   rm -f conftest.er1
21112   cat conftest.err >&5
21113   echo "$as_me:21113: \$? = $ac_status" >&5
21114   (exit $ac_status); } >/dev/null; then
21115   if test -s conftest.err; then
21116     ac_cpp_err=$ac_cxx_preproc_warn_flag
21117   else
21118     ac_cpp_err=
21119   fi
21120 else
21121   ac_cpp_err=yes
21122 fi
21123 if test -z "$ac_cpp_err"; then
21124   eval "$as_ac_Header=yes"
21125 else
21126   echo "$as_me: failed program was:" >&5
21127   cat conftest.$ac_ext >&5
21128   eval "$as_ac_Header=no"
21129 fi
21130 rm -f conftest.err conftest.$ac_ext
21131 fi
21132 echo "$as_me:21132: result: `eval echo '${'$as_ac_Header'}'`" >&5
21133 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21134 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21135   cat >>confdefs.h <<EOF
21136 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21137 EOF
21138
21139 fi
21140 done
21141
21142 if test x"$ac_cv_header_iostream" = xyes ; then
21143         echo "$as_me:21143: checking if iostream uses std-namespace" >&5
21144 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21145         cat >conftest.$ac_ext <<_ACEOF
21146 #line 21146 "configure"
21147 #include "confdefs.h"
21148
21149 #include <iostream>
21150 using std::endl;
21151 using std::cerr;
21152 int
21153 main (void)
21154 {
21155
21156 cerr << "testing" << endl;
21157
21158   ;
21159   return 0;
21160 }
21161 _ACEOF
21162 rm -f conftest.$ac_objext
21163 if { (eval echo "$as_me:21163: \"$ac_compile\"") >&5
21164   (eval $ac_compile) 2>&5
21165   ac_status=$?
21166   echo "$as_me:21166: \$? = $ac_status" >&5
21167   (exit $ac_status); } &&
21168          { ac_try='test -s conftest.$ac_objext'
21169   { (eval echo "$as_me:21169: \"$ac_try\"") >&5
21170   (eval $ac_try) 2>&5
21171   ac_status=$?
21172   echo "$as_me:21172: \$? = $ac_status" >&5
21173   (exit $ac_status); }; }; then
21174   cf_iostream_namespace=yes
21175 else
21176   echo "$as_me: failed program was:" >&5
21177 cat conftest.$ac_ext >&5
21178 cf_iostream_namespace=no
21179 fi
21180 rm -f conftest.$ac_objext conftest.$ac_ext
21181         echo "$as_me:21181: result: $cf_iostream_namespace" >&5
21182 echo "${ECHO_T}$cf_iostream_namespace" >&6
21183         if test "$cf_iostream_namespace" = yes ; then
21184
21185 cat >>confdefs.h <<\EOF
21186 #define IOSTREAM_NAMESPACE 1
21187 EOF
21188
21189         fi
21190 fi
21191
21192 echo "$as_me:21192: checking if we should include stdbool.h" >&5
21193 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21194
21195 if test "${cf_cv_header_stdbool_h+set}" = set; then
21196   echo $ECHO_N "(cached) $ECHO_C" >&6
21197 else
21198
21199         cat >conftest.$ac_ext <<_ACEOF
21200 #line 21200 "configure"
21201 #include "confdefs.h"
21202
21203 int
21204 main (void)
21205 {
21206 bool foo = false
21207   ;
21208   return 0;
21209 }
21210 _ACEOF
21211 rm -f conftest.$ac_objext
21212 if { (eval echo "$as_me:21212: \"$ac_compile\"") >&5
21213   (eval $ac_compile) 2>&5
21214   ac_status=$?
21215   echo "$as_me:21215: \$? = $ac_status" >&5
21216   (exit $ac_status); } &&
21217          { ac_try='test -s conftest.$ac_objext'
21218   { (eval echo "$as_me:21218: \"$ac_try\"") >&5
21219   (eval $ac_try) 2>&5
21220   ac_status=$?
21221   echo "$as_me:21221: \$? = $ac_status" >&5
21222   (exit $ac_status); }; }; then
21223   cf_cv_header_stdbool_h=0
21224 else
21225   echo "$as_me: failed program was:" >&5
21226 cat conftest.$ac_ext >&5
21227 cat >conftest.$ac_ext <<_ACEOF
21228 #line 21228 "configure"
21229 #include "confdefs.h"
21230
21231 #ifndef __BEOS__
21232 #include <stdbool.h>
21233 #endif
21234
21235 int
21236 main (void)
21237 {
21238 bool foo = false
21239   ;
21240   return 0;
21241 }
21242 _ACEOF
21243 rm -f conftest.$ac_objext
21244 if { (eval echo "$as_me:21244: \"$ac_compile\"") >&5
21245   (eval $ac_compile) 2>&5
21246   ac_status=$?
21247   echo "$as_me:21247: \$? = $ac_status" >&5
21248   (exit $ac_status); } &&
21249          { ac_try='test -s conftest.$ac_objext'
21250   { (eval echo "$as_me:21250: \"$ac_try\"") >&5
21251   (eval $ac_try) 2>&5
21252   ac_status=$?
21253   echo "$as_me:21253: \$? = $ac_status" >&5
21254   (exit $ac_status); }; }; then
21255   cf_cv_header_stdbool_h=1
21256 else
21257   echo "$as_me: failed program was:" >&5
21258 cat conftest.$ac_ext >&5
21259 cf_cv_header_stdbool_h=0
21260 fi
21261 rm -f conftest.$ac_objext conftest.$ac_ext
21262 fi
21263 rm -f conftest.$ac_objext conftest.$ac_ext
21264 fi
21265
21266 if test "$cf_cv_header_stdbool_h" = 1
21267 then    echo "$as_me:21267: result: yes" >&5
21268 echo "${ECHO_T}yes" >&6
21269 else    echo "$as_me:21269: result: no" >&5
21270 echo "${ECHO_T}no" >&6
21271 fi
21272
21273 echo "$as_me:21273: checking for builtin bool type" >&5
21274 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21275
21276 if test "${cf_cv_builtin_bool+set}" = set; then
21277   echo $ECHO_N "(cached) $ECHO_C" >&6
21278 else
21279
21280         cat >conftest.$ac_ext <<_ACEOF
21281 #line 21281 "configure"
21282 #include "confdefs.h"
21283
21284 #include <stdio.h>
21285 #include <sys/types.h>
21286
21287 int
21288 main (void)
21289 {
21290 bool x = false
21291   ;
21292   return 0;
21293 }
21294 _ACEOF
21295 rm -f conftest.$ac_objext
21296 if { (eval echo "$as_me:21296: \"$ac_compile\"") >&5
21297   (eval $ac_compile) 2>&5
21298   ac_status=$?
21299   echo "$as_me:21299: \$? = $ac_status" >&5
21300   (exit $ac_status); } &&
21301          { ac_try='test -s conftest.$ac_objext'
21302   { (eval echo "$as_me:21302: \"$ac_try\"") >&5
21303   (eval $ac_try) 2>&5
21304   ac_status=$?
21305   echo "$as_me:21305: \$? = $ac_status" >&5
21306   (exit $ac_status); }; }; then
21307   cf_cv_builtin_bool=1
21308 else
21309   echo "$as_me: failed program was:" >&5
21310 cat conftest.$ac_ext >&5
21311 cf_cv_builtin_bool=0
21312 fi
21313 rm -f conftest.$ac_objext conftest.$ac_ext
21314
21315 fi
21316
21317 if test "$cf_cv_builtin_bool" = 1
21318 then    echo "$as_me:21318: result: yes" >&5
21319 echo "${ECHO_T}yes" >&6
21320 else    echo "$as_me:21320: result: no" >&5
21321 echo "${ECHO_T}no" >&6
21322 fi
21323
21324 echo "$as_me:21324: checking for size of bool" >&5
21325 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21326 if test "${cf_cv_type_of_bool+set}" = set; then
21327   echo $ECHO_N "(cached) $ECHO_C" >&6
21328 else
21329
21330         rm -f cf_test.out
21331         if test "$cross_compiling" = yes; then
21332   cf_cv_type_of_bool=unknown
21333 else
21334   cat >conftest.$ac_ext <<_ACEOF
21335 #line 21335 "configure"
21336 #include "confdefs.h"
21337
21338 #include <stdlib.h>
21339 #include <stdio.h>
21340
21341 #if defined(__cplusplus)
21342
21343 #ifdef HAVE_GXX_BUILTIN_H
21344 #include <g++/builtin.h>
21345 #elif HAVE_GPP_BUILTIN_H
21346 #include <gpp/builtin.h>
21347 #elif HAVE_BUILTIN_H
21348 #include <builtin.h>
21349 #endif
21350
21351 #else
21352
21353 #if $cf_cv_header_stdbool_h
21354 #include <stdbool.h>
21355 #endif
21356
21357 #endif
21358
21359 int main(void)
21360 {
21361         FILE *fp = fopen("cf_test.out", "w");
21362         if (fp != 0) {
21363                 bool x = true;
21364                 if ((bool)(-x) >= 0)
21365                         fputs("unsigned ", fp);
21366                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21367                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21368                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21369                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21370                 fclose(fp);
21371         }
21372         ${cf_cv_main_return:-return}(0);
21373 }
21374
21375 _ACEOF
21376 rm -f conftest$ac_exeext
21377 if { (eval echo "$as_me:21377: \"$ac_link\"") >&5
21378   (eval $ac_link) 2>&5
21379   ac_status=$?
21380   echo "$as_me:21380: \$? = $ac_status" >&5
21381   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21382   { (eval echo "$as_me:21382: \"$ac_try\"") >&5
21383   (eval $ac_try) 2>&5
21384   ac_status=$?
21385   echo "$as_me:21385: \$? = $ac_status" >&5
21386   (exit $ac_status); }; }; then
21387   cf_cv_type_of_bool=`cat cf_test.out`
21388                  if test -z "$cf_cv_type_of_bool"; then
21389                    cf_cv_type_of_bool=unknown
21390                  fi
21391 else
21392   echo "$as_me: program exited with status $ac_status" >&5
21393 echo "$as_me: failed program was:" >&5
21394 cat conftest.$ac_ext >&5
21395 cf_cv_type_of_bool=unknown
21396 fi
21397 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21398 fi
21399
21400 fi
21401
21402         rm -f cf_test.out
21403 echo "$as_me:21403: result: $cf_cv_type_of_bool" >&5
21404 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21405 if test "$cf_cv_type_of_bool" = unknown ; then
21406         case .$NCURSES_BOOL in
21407         (.auto|.) NCURSES_BOOL=unsigned;;
21408         esac
21409         { echo "$as_me:21409: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21410 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21411         cf_cv_type_of_bool=$NCURSES_BOOL
21412 fi
21413
21414 echo "$as_me:21414: checking for special defines needed for etip.h" >&5
21415 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21416 cf_save_CXXFLAGS="$CXXFLAGS"
21417 cf_result="none"
21418
21419 # etip.h includes ncurses.h which includes ncurses_dll.h
21420 # But ncurses_dll.h is generated - fix here.
21421 test -d include || mkdir include
21422 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
21423
21424 for cf_math in "" MATH_H
21425 do
21426 for cf_excp in "" MATH_EXCEPTION
21427 do
21428         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21429         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21430         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21431 cat >conftest.$ac_ext <<_ACEOF
21432 #line 21432 "configure"
21433 #include "confdefs.h"
21434
21435 #include <etip.h.in>
21436
21437 int
21438 main (void)
21439 {
21440
21441   ;
21442   return 0;
21443 }
21444 _ACEOF
21445 rm -f conftest.$ac_objext
21446 if { (eval echo "$as_me:21446: \"$ac_compile\"") >&5
21447   (eval $ac_compile) 2>&5
21448   ac_status=$?
21449   echo "$as_me:21449: \$? = $ac_status" >&5
21450   (exit $ac_status); } &&
21451          { ac_try='test -s conftest.$ac_objext'
21452   { (eval echo "$as_me:21452: \"$ac_try\"") >&5
21453   (eval $ac_try) 2>&5
21454   ac_status=$?
21455   echo "$as_me:21455: \$? = $ac_status" >&5
21456   (exit $ac_status); }; }; then
21457
21458         test -n "$cf_math" && cat >>confdefs.h <<EOF
21459 #define ETIP_NEEDS_${cf_math} 1
21460 EOF
21461
21462         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21463 #define ETIP_NEEDS_${cf_excp} 1
21464 EOF
21465
21466         cf_result="$cf_math $cf_excp"
21467         break 2
21468
21469 else
21470   echo "$as_me: failed program was:" >&5
21471 cat conftest.$ac_ext >&5
21472 fi
21473 rm -f conftest.$ac_objext conftest.$ac_ext
21474 done
21475 done
21476 echo "$as_me:21476: result: $cf_result" >&5
21477 echo "${ECHO_T}$cf_result" >&6
21478 CXXFLAGS="$cf_save_CXXFLAGS"
21479
21480 if test -n "$CXX"; then
21481 echo "$as_me:21481: checking if $CXX accepts parameter initialization" >&5
21482 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21483 if test "${cf_cv_cpp_param_init+set}" = set; then
21484   echo $ECHO_N "(cached) $ECHO_C" >&6
21485 else
21486
21487         ac_ext=cc
21488 ac_cpp='$CXXCPP $CPPFLAGS'
21489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21492 ac_main_return=return
21493
21494         if test "$cross_compiling" = yes; then
21495   cf_cv_cpp_param_init=unknown
21496 else
21497   cat >conftest.$ac_ext <<_ACEOF
21498 #line 21498 "configure"
21499 #include "confdefs.h"
21500
21501 class TEST {
21502 private:
21503         int value;
21504 public:
21505         TEST(int x = 1);
21506         ~TEST();
21507 };
21508
21509 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21510 {
21511         value = x;
21512 }
21513 int main(void) { }
21514
21515 _ACEOF
21516 rm -f conftest$ac_exeext
21517 if { (eval echo "$as_me:21517: \"$ac_link\"") >&5
21518   (eval $ac_link) 2>&5
21519   ac_status=$?
21520   echo "$as_me:21520: \$? = $ac_status" >&5
21521   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21522   { (eval echo "$as_me:21522: \"$ac_try\"") >&5
21523   (eval $ac_try) 2>&5
21524   ac_status=$?
21525   echo "$as_me:21525: \$? = $ac_status" >&5
21526   (exit $ac_status); }; }; then
21527   cf_cv_cpp_param_init=yes
21528 else
21529   echo "$as_me: program exited with status $ac_status" >&5
21530 echo "$as_me: failed program was:" >&5
21531 cat conftest.$ac_ext >&5
21532 cf_cv_cpp_param_init=no
21533 fi
21534 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21535 fi
21536         ac_ext=cc
21537 ac_cpp='$CXXCPP $CPPFLAGS'
21538 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21539 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21540 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21541 ac_main_return=return
21542
21543 fi
21544 echo "$as_me:21544: result: $cf_cv_cpp_param_init" >&5
21545 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21546 fi
21547 test "$cf_cv_cpp_param_init" = yes &&
21548 cat >>confdefs.h <<\EOF
21549 #define CPP_HAS_PARAM_INIT 1
21550 EOF
21551
21552 if test -n "$CXX"; then
21553
21554 echo "$as_me:21554: checking if $CXX accepts static_cast" >&5
21555 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21556 if test "${cf_cv_cpp_static_cast+set}" = set; then
21557   echo $ECHO_N "(cached) $ECHO_C" >&6
21558 else
21559
21560         ac_ext=cc
21561 ac_cpp='$CXXCPP $CPPFLAGS'
21562 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21563 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21564 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21565 ac_main_return=return
21566
21567         cat >conftest.$ac_ext <<_ACEOF
21568 #line 21568 "configure"
21569 #include "confdefs.h"
21570
21571 class NCursesPanel
21572 {
21573 public:
21574   NCursesPanel(int nlines,
21575                int ncols,
21576                int begin_y = 0,
21577                int begin_x = 0)
21578   {
21579   }
21580   NCursesPanel();
21581   ~NCursesPanel();
21582 };
21583
21584 template<class T> class NCursesUserPanel : public NCursesPanel
21585 {
21586 public:
21587   NCursesUserPanel (int nlines,
21588                     int ncols,
21589                     int begin_y = 0,
21590                     int begin_x = 0,
21591                     const T* p_UserData = static_cast<T*>(0))
21592     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21593   {
21594   };
21595   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21596   {
21597   };
21598
21599   virtual ~NCursesUserPanel() {};
21600 };
21601
21602 int
21603 main (void)
21604 {
21605
21606         const char* p_UserData = static_cast<char*>(0)
21607   ;
21608   return 0;
21609 }
21610 _ACEOF
21611 rm -f conftest.$ac_objext
21612 if { (eval echo "$as_me:21612: \"$ac_compile\"") >&5
21613   (eval $ac_compile) 2>&5
21614   ac_status=$?
21615   echo "$as_me:21615: \$? = $ac_status" >&5
21616   (exit $ac_status); } &&
21617          { ac_try='test -s conftest.$ac_objext'
21618   { (eval echo "$as_me:21618: \"$ac_try\"") >&5
21619   (eval $ac_try) 2>&5
21620   ac_status=$?
21621   echo "$as_me:21621: \$? = $ac_status" >&5
21622   (exit $ac_status); }; }; then
21623   cf_cv_cpp_static_cast=yes
21624 else
21625   echo "$as_me: failed program was:" >&5
21626 cat conftest.$ac_ext >&5
21627 cf_cv_cpp_static_cast=no
21628 fi
21629 rm -f conftest.$ac_objext conftest.$ac_ext
21630
21631         ac_ext=cc
21632 ac_cpp='$CXXCPP $CPPFLAGS'
21633 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21634 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21635 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21636 ac_main_return=return
21637
21638 fi
21639 echo "$as_me:21639: result: $cf_cv_cpp_static_cast" >&5
21640 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21641
21642 fi
21643
21644 test "$cf_cv_cpp_static_cast" = yes &&
21645 cat >>confdefs.h <<\EOF
21646 #define CPP_HAS_STATIC_CAST 1
21647 EOF
21648
21649         CXX_AR='$(AR)'
21650         CXX_ARFLAGS='$(ARFLAGS)'
21651         case $cf_cv_system_name in
21652         (irix*)
21653             if test "$GXX" != yes ; then
21654                 CXX_AR='$(CXX)'
21655                 CXX_ARFLAGS='-ar -o'
21656             fi
21657             ;;
21658         (sco3.2v5*)
21659             CXXLDFLAGS="-u main"
21660             ;;
21661         (solaris2*)
21662             if test "$GXX" != yes ; then
21663                 CXX_AR='$(CXX)'
21664                 CXX_ARFLAGS='-xar -o'
21665             fi
21666             ;;
21667         esac
21668
21669 else
21670         cf_cxx_library=no
21671         cf_cv_builtin_bool=1
21672
21673         # Just because we are not configuring against C++ right now does not
21674         # mean that a user will not want to use C++.  Some distributors disable
21675         # the C++ portion of this configuration as a shortcut (or just to avoid
21676         # compiling the demo in the c++ directory).  So we need a reasonable
21677         # default for the 'bool' type.
21678         #
21679         # Caveat: since the storage of the bool type is not standardized, it
21680         # may change.
21681
21682         if test "$NCURSES_BOOL" != auto ; then
21683                 cf_cv_type_of_bool=$NCURSES_BOOL
21684                 cf_cv_header_stdbool_h=0
21685         else
21686                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21687
21688 echo "$as_me:21688: checking for size of bool" >&5
21689 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21690 if test "${cf_cv_type_of_bool+set}" = set; then
21691   echo $ECHO_N "(cached) $ECHO_C" >&6
21692 else
21693
21694         rm -f cf_test.out
21695         if test "$cross_compiling" = yes; then
21696   cf_cv_type_of_bool=unknown
21697 else
21698   cat >conftest.$ac_ext <<_ACEOF
21699 #line 21699 "configure"
21700 #include "confdefs.h"
21701
21702 #include <stdlib.h>
21703 #include <stdio.h>
21704
21705 #if defined(__cplusplus)
21706
21707 #ifdef HAVE_GXX_BUILTIN_H
21708 #include <g++/builtin.h>
21709 #elif HAVE_GPP_BUILTIN_H
21710 #include <gpp/builtin.h>
21711 #elif HAVE_BUILTIN_H
21712 #include <builtin.h>
21713 #endif
21714
21715 #else
21716
21717 #if $cf_cv_header_stdbool_h
21718 #include <stdbool.h>
21719 #endif
21720
21721 #endif
21722
21723 int main(void)
21724 {
21725         FILE *fp = fopen("cf_test.out", "w");
21726         if (fp != 0) {
21727                 bool x = true;
21728                 if ((bool)(-x) >= 0)
21729                         fputs("unsigned ", fp);
21730                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21731                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21732                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21733                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21734                 fclose(fp);
21735         }
21736         ${cf_cv_main_return:-return}(0);
21737 }
21738
21739 _ACEOF
21740 rm -f conftest$ac_exeext
21741 if { (eval echo "$as_me:21741: \"$ac_link\"") >&5
21742   (eval $ac_link) 2>&5
21743   ac_status=$?
21744   echo "$as_me:21744: \$? = $ac_status" >&5
21745   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21746   { (eval echo "$as_me:21746: \"$ac_try\"") >&5
21747   (eval $ac_try) 2>&5
21748   ac_status=$?
21749   echo "$as_me:21749: \$? = $ac_status" >&5
21750   (exit $ac_status); }; }; then
21751   cf_cv_type_of_bool=`cat cf_test.out`
21752                  if test -z "$cf_cv_type_of_bool"; then
21753                    cf_cv_type_of_bool=unknown
21754                  fi
21755 else
21756   echo "$as_me: program exited with status $ac_status" >&5
21757 echo "$as_me: failed program was:" >&5
21758 cat conftest.$ac_ext >&5
21759 cf_cv_type_of_bool=unknown
21760 fi
21761 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21762 fi
21763
21764 fi
21765
21766         rm -f cf_test.out
21767 echo "$as_me:21767: result: $cf_cv_type_of_bool" >&5
21768 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21769 if test "$cf_cv_type_of_bool" = unknown ; then
21770         case .$NCURSES_BOOL in
21771         (.auto|.) NCURSES_BOOL=unsigned;;
21772         esac
21773         { echo "$as_me:21773: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21774 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21775         cf_cv_type_of_bool=$NCURSES_BOOL
21776 fi
21777
21778                 else
21779                         echo "$as_me:21779: checking for fallback type of bool" >&5
21780 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21781                         case "$host_cpu" in
21782                         (i?86)  cf_cv_type_of_bool=char ;;
21783                         (*)     cf_cv_type_of_bool=int  ;;
21784                         esac
21785                         echo "$as_me:21785: result: $cf_cv_type_of_bool" >&5
21786 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21787                 fi
21788         fi
21789 fi
21790
21791 # If the C compiler did not declare bool, and we did not determine that the C++
21792 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21793 # ncurses library use the same type as C++ bool.  Note that this allows one to
21794 # specify the type of bool in a configure-script option and postpone
21795 # integration with the C++ compiler provided that the types are compatible.
21796 USE_CXX_BOOL=1
21797 if test $cf_cv_cc_bool_type = 1
21798 then
21799         # oops: C has a bool.  Unlikely, but C++ could differ.
21800         USE_CXX_BOOL=0
21801 elif test $cf_cv_builtin_bool = 0
21802 then
21803         # C++ has no bool
21804         USE_CXX_BOOL=0
21805 else
21806         # this is the normal case
21807         USE_CXX_BOOL='defined(__cplusplus)'
21808 fi
21809
21810 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21811
21812         if test "$cf_with_ada" != "no" ; then
21813                 if test "$with_libtool" != "no"; then
21814                         { echo "$as_me:21814: WARNING: libtool does not support Ada - disabling feature" >&5
21815 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21816                         cf_with_ada=no
21817                 fi
21818         fi
21819
21820         if test "$cf_with_ada" != "no" ; then
21821
21822 cf_ada_make=gnatmake
21823 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21824 set dummy $cf_ada_make; ac_word=$2
21825 echo "$as_me:21825: checking for $ac_word" >&5
21826 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21827 if test "${ac_cv_prog_gnat_exists+set}" = set; then
21828   echo $ECHO_N "(cached) $ECHO_C" >&6
21829 else
21830   if test -n "$gnat_exists"; then
21831   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
21832 else
21833   ac_save_IFS=$IFS; IFS=$ac_path_separator
21834 ac_dummy="$PATH"
21835 for ac_dir in $ac_dummy; do
21836   IFS=$ac_save_IFS
21837   test -z "$ac_dir" && ac_dir=.
21838   $as_executable_p "$ac_dir/$ac_word" || continue
21839 ac_cv_prog_gnat_exists="yes"
21840 echo "$as_me:21840: found $ac_dir/$ac_word" >&5
21841 break
21842 done
21843
21844   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21845 fi
21846 fi
21847 gnat_exists=$ac_cv_prog_gnat_exists
21848 if test -n "$gnat_exists"; then
21849   echo "$as_me:21849: result: $gnat_exists" >&5
21850 echo "${ECHO_T}$gnat_exists" >&6
21851 else
21852   echo "$as_me:21852: result: no" >&5
21853 echo "${ECHO_T}no" >&6
21854 fi
21855
21856 if test "$ac_cv_prog_gnat_exists" = no; then
21857         cf_ada_make=
21858         cf_cv_prog_gnat_correct=no
21859 else
21860
21861 echo "$as_me:21861: checking for gnat version" >&5
21862 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21863 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21864         grep '[0-9].[0-9][0-9]*' |\
21865         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21866 echo "$as_me:21866: result: $cf_gnat_version" >&5
21867 echo "${ECHO_T}$cf_gnat_version" >&6
21868
21869 case $cf_gnat_version in
21870 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21871         cf_cv_prog_gnat_correct=yes
21872         ;;
21873 (*)
21874         { echo "$as_me:21874: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21875 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21876         cf_cv_prog_gnat_correct=no
21877         ;;
21878 esac
21879
21880         # Extract the first word of "m4", so it can be a program name with args.
21881 set dummy m4; ac_word=$2
21882 echo "$as_me:21882: checking for $ac_word" >&5
21883 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21884 if test "${ac_cv_prog_M4_exists+set}" = set; then
21885   echo $ECHO_N "(cached) $ECHO_C" >&6
21886 else
21887   if test -n "$M4_exists"; then
21888   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21889 else
21890   ac_save_IFS=$IFS; IFS=$ac_path_separator
21891 ac_dummy="$PATH"
21892 for ac_dir in $ac_dummy; do
21893   IFS=$ac_save_IFS
21894   test -z "$ac_dir" && ac_dir=.
21895   $as_executable_p "$ac_dir/$ac_word" || continue
21896 ac_cv_prog_M4_exists="yes"
21897 echo "$as_me:21897: found $ac_dir/$ac_word" >&5
21898 break
21899 done
21900
21901   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21902 fi
21903 fi
21904 M4_exists=$ac_cv_prog_M4_exists
21905 if test -n "$M4_exists"; then
21906   echo "$as_me:21906: result: $M4_exists" >&5
21907 echo "${ECHO_T}$M4_exists" >&6
21908 else
21909   echo "$as_me:21909: result: no" >&5
21910 echo "${ECHO_T}no" >&6
21911 fi
21912
21913         if test "$ac_cv_prog_M4_exists" = no; then
21914                 cf_cv_prog_gnat_correct=no
21915                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21916         fi
21917         if test "$cf_cv_prog_gnat_correct" = yes; then
21918                 echo "$as_me:21918: checking if GNAT works" >&5
21919 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21920
21921 rm -rf conftest* *~conftest*
21922 cat >>conftest.ads <<CF_EOF
21923 procedure conftest;
21924 CF_EOF
21925 cat >>conftest.adb <<CF_EOF
21926 with Text_IO;
21927 with GNAT.OS_Lib;
21928 procedure conftest is
21929 begin
21930    Text_IO.Put ("Hello World");
21931    Text_IO.New_Line;
21932    GNAT.OS_Lib.OS_Exit (0);
21933 end conftest;
21934 CF_EOF
21935 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21936    if ( ./conftest 1>&5 2>&1 ) ; then
21937       cf_cv_prog_gnat_correct=yes
21938    else
21939       cf_cv_prog_gnat_correct=no
21940    fi
21941 else
21942    cf_cv_prog_gnat_correct=no
21943 fi
21944 rm -rf conftest* *~conftest*
21945
21946                 echo "$as_me:21946: result: $cf_cv_prog_gnat_correct" >&5
21947 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21948         fi
21949 fi
21950
21951                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21952
21953         ADAFLAGS="$ADAFLAGS -gnatpn"
21954
21955         echo "$as_me:21955: checking optimization options for ADAFLAGS" >&5
21956 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21957         case "$CFLAGS" in
21958         (*-g*)
21959
21960         ADAFLAGS="$ADAFLAGS -g"
21961
21962                 ;;
21963         esac
21964         case "$CFLAGS" in
21965         (*-O*)
21966                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21967
21968         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21969
21970                 ;;
21971         esac
21972         echo "$as_me:21972: result: $ADAFLAGS" >&5
21973 echo "${ECHO_T}$ADAFLAGS" >&6
21974
21975 echo "$as_me:21975: checking if GNATPREP supports -T option" >&5
21976 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21977 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21978   echo $ECHO_N "(cached) $ECHO_C" >&6
21979 else
21980
21981 cf_cv_gnatprep_opt_t=no
21982 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21983
21984 fi
21985 echo "$as_me:21985: result: $cf_cv_gnatprep_opt_t" >&5
21986 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21987 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21988
21989 echo "$as_me:21989: checking if GNAT supports generics" >&5
21990 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21991 case $cf_gnat_version in
21992 (3.[1-9]*|[4-9].*)
21993         cf_gnat_generics=yes
21994         ;;
21995 (*)
21996         cf_gnat_generics=no
21997         ;;
21998 esac
21999 echo "$as_me:21999: result: $cf_gnat_generics" >&5
22000 echo "${ECHO_T}$cf_gnat_generics" >&6
22001
22002 if test "$cf_gnat_generics" = yes
22003 then
22004         cf_compile_generics=generics
22005         cf_generic_objects="\${GENOBJS}"
22006 else
22007         cf_compile_generics=
22008         cf_generic_objects=
22009 fi
22010
22011 echo "$as_me:22011: checking if GNAT supports SIGINT" >&5
22012 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
22013 if test "${cf_cv_gnat_sigint+set}" = set; then
22014   echo $ECHO_N "(cached) $ECHO_C" >&6
22015 else
22016
22017 rm -rf conftest* *~conftest*
22018 cat >>conftest.ads <<CF_EOF
22019 with Ada.Interrupts.Names;
22020
22021 package ConfTest is
22022
22023    pragma Warnings (Off);  --  the next pragma exists since 3.11p
22024    pragma Unreserve_All_Interrupts;
22025    pragma Warnings (On);
22026
22027    protected Process is
22028       procedure Stop;
22029       function Continue return Boolean;
22030       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
22031    private
22032       Done : Boolean := False;
22033    end Process;
22034
22035 end ConfTest;
22036 CF_EOF
22037 cat >>conftest.adb <<CF_EOF
22038 package body ConfTest is
22039    protected body Process is
22040       procedure Stop is
22041       begin
22042          Done := True;
22043       end Stop;
22044       function Continue return Boolean is
22045       begin
22046          return not Done;
22047       end Continue;
22048    end Process;
22049 end ConfTest;
22050 CF_EOF
22051 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22052       cf_cv_gnat_sigint=yes
22053 else
22054    cf_cv_gnat_sigint=no
22055 fi
22056 rm -rf conftest* *~conftest*
22057
22058 fi
22059 echo "$as_me:22059: result: $cf_cv_gnat_sigint" >&5
22060 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
22061
22062 if test $cf_cv_gnat_sigint = yes ; then
22063         USE_GNAT_SIGINT=""
22064 else
22065         USE_GNAT_SIGINT="#"
22066 fi
22067
22068 cf_gnat_libraries=no
22069 cf_gnat_projects=no
22070
22071 if test "$enable_gnat_projects" != no ; then
22072 echo "$as_me:22072: checking if GNAT supports project files" >&5
22073 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
22074 case $cf_gnat_version in
22075 (3.[0-9]*)
22076         ;;
22077 (*)
22078         case $cf_cv_system_name in
22079         (cygwin*|msys*)
22080                 ;;
22081         (*)
22082                 mkdir conftest.src conftest.bin conftest.lib
22083                 cd conftest.src
22084                 rm -rf conftest* *~conftest*
22085                 cat >>library.gpr <<CF_EOF
22086 project Library is
22087   Kind := External ("LIB_KIND");
22088   for Library_Name use "ConfTest";
22089   for Object_Dir use ".";
22090   for Library_ALI_Dir use External("LIBRARY_DIR");
22091   for Library_Version use External ("SONAME");
22092   for Library_Kind use Kind;
22093   for Library_Dir use External("BUILD_DIR");
22094   Source_Dir := External ("SOURCE_DIR");
22095   for Source_Dirs use (Source_Dir);
22096 end Library;
22097 CF_EOF
22098                 cat >>confpackage.ads <<CF_EOF
22099 package ConfPackage is
22100    procedure conftest;
22101 end ConfPackage;
22102 CF_EOF
22103                 cat >>confpackage.adb <<CF_EOF
22104 with Text_IO;
22105 package body ConfPackage is
22106    procedure conftest is
22107    begin
22108       Text_IO.Put ("Hello World");
22109       Text_IO.New_Line;
22110    end conftest;
22111 end ConfPackage;
22112 CF_EOF
22113                 if ( $cf_ada_make $ADAFLAGS \
22114                                 -Plibrary.gpr \
22115                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22116                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22117                                 -XSOURCE_DIR=`pwd` \
22118                                 -XSONAME=libConfTest.so.1 \
22119                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
22120                         cf_gnat_projects=yes
22121                 fi
22122                 cd ..
22123                 if test -f conftest.lib/confpackage.ali
22124                 then
22125                         cf_gnat_libraries=yes
22126                 fi
22127                 rm -rf conftest* *~conftest*
22128                 ;;
22129         esac
22130         ;;
22131 esac
22132 echo "$as_me:22132: result: $cf_gnat_projects" >&5
22133 echo "${ECHO_T}$cf_gnat_projects" >&6
22134 fi # enable_gnat_projects
22135
22136 if test $cf_gnat_projects = yes
22137 then
22138         echo "$as_me:22138: checking if GNAT supports libraries" >&5
22139 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22140         echo "$as_me:22140: result: $cf_gnat_libraries" >&5
22141 echo "${ECHO_T}$cf_gnat_libraries" >&6
22142 fi
22143
22144 if test "$cf_gnat_projects" = yes
22145 then
22146         USE_OLD_MAKERULES="#"
22147         USE_GNAT_PROJECTS=""
22148 else
22149         USE_OLD_MAKERULES=""
22150         USE_GNAT_PROJECTS="#"
22151 fi
22152
22153 if test "$cf_gnat_libraries" = yes
22154 then
22155         USE_GNAT_LIBRARIES=""
22156 else
22157         USE_GNAT_LIBRARIES="#"
22158 fi
22159
22160 echo "$as_me:22160: checking for ada-compiler" >&5
22161 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22162
22163 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22164 if test "${with_ada_compiler+set}" = set; then
22165   withval="$with_ada_compiler"
22166   cf_ada_compiler=$withval
22167 else
22168   cf_ada_compiler=gnatmake
22169 fi;
22170
22171 echo "$as_me:22171: result: $cf_ada_compiler" >&5
22172 echo "${ECHO_T}$cf_ada_compiler" >&6
22173
22174                         cf_ada_package=terminal_interface
22175
22176 echo "$as_me:22176: checking for ada-include" >&5
22177 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22178
22179 # Check whether --with-ada-include or --without-ada-include was given.
22180 if test "${with_ada_include+set}" = set; then
22181   withval="$with_ada_include"
22182
22183 else
22184   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22185 fi; if test -n "$prefix/share/ada/adainclude" ; then
22186
22187 if test "x$prefix" != xNONE; then
22188         cf_path_syntax="$prefix"
22189 else
22190         cf_path_syntax="$ac_default_prefix"
22191 fi
22192
22193 case ".$withval" in
22194 (.\$\(*\)*|.\'*\'*)
22195         ;;
22196 (..|./*|.\\*)
22197         ;;
22198 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22199         ;;
22200 (.\${*prefix}*|.\${*dir}*)
22201         eval withval="$withval"
22202         case ".$withval" in
22203         (.NONE/*)
22204                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22205                 ;;
22206         esac
22207         ;;
22208 (.no|.NONE/*)
22209         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22210         ;;
22211 (*)
22212         { { echo "$as_me:22212: error: expected a pathname, not \"$withval\"" >&5
22213 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22214    { (exit 1); exit 1; }; }
22215         ;;
22216 esac
22217
22218 fi
22219 eval ADA_INCLUDE="$withval"
22220
22221 echo "$as_me:22221: result: $ADA_INCLUDE" >&5
22222 echo "${ECHO_T}$ADA_INCLUDE" >&6
22223
22224 echo "$as_me:22224: checking for ada-objects" >&5
22225 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22226
22227 # Check whether --with-ada-objects or --without-ada-objects was given.
22228 if test "${with_ada_objects+set}" = set; then
22229   withval="$with_ada_objects"
22230
22231 else
22232   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22233 fi; if test -n "$prefix/lib/ada/adalib" ; then
22234
22235 if test "x$prefix" != xNONE; then
22236         cf_path_syntax="$prefix"
22237 else
22238         cf_path_syntax="$ac_default_prefix"
22239 fi
22240
22241 case ".$withval" in
22242 (.\$\(*\)*|.\'*\'*)
22243         ;;
22244 (..|./*|.\\*)
22245         ;;
22246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22247         ;;
22248 (.\${*prefix}*|.\${*dir}*)
22249         eval withval="$withval"
22250         case ".$withval" in
22251         (.NONE/*)
22252                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22253                 ;;
22254         esac
22255         ;;
22256 (.no|.NONE/*)
22257         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22258         ;;
22259 (*)
22260         { { echo "$as_me:22260: error: expected a pathname, not \"$withval\"" >&5
22261 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22262    { (exit 1); exit 1; }; }
22263         ;;
22264 esac
22265
22266 fi
22267 eval ADA_OBJECTS="$withval"
22268
22269 echo "$as_me:22269: result: $ADA_OBJECTS" >&5
22270 echo "${ECHO_T}$ADA_OBJECTS" >&6
22271
22272 echo "$as_me:22272: checking if an Ada95 shared-library should be built" >&5
22273 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22274
22275 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22276 if test "${with_ada_sharedlib+set}" = set; then
22277   withval="$with_ada_sharedlib"
22278   with_ada_sharedlib=$withval
22279 else
22280   with_ada_sharedlib=no
22281 fi;
22282 echo "$as_me:22282: result: $with_ada_sharedlib" >&5
22283 echo "${ECHO_T}$with_ada_sharedlib" >&6
22284
22285 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22286 MAKE_ADA_SHAREDLIB="#"
22287
22288 if test "x$with_ada_sharedlib" != xno
22289 then
22290         MAKE_ADA_SHAREDLIB=
22291         if test "x$with_ada_sharedlib" != xyes
22292         then
22293                 ADA_SHAREDLIB="$with_ada_sharedlib"
22294         fi
22295 fi
22296
22297                 fi
22298         fi
22299 else
22300         cf_with_ada=no
22301 fi
22302
22303 # do this "late" to avoid conflict with header-checks
22304 if test "x$with_widec" = xyes ; then
22305         echo "$as_me:22305: checking for wchar_t" >&5
22306 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22307 if test "${ac_cv_type_wchar_t+set}" = set; then
22308   echo $ECHO_N "(cached) $ECHO_C" >&6
22309 else
22310   cat >conftest.$ac_ext <<_ACEOF
22311 #line 22311 "configure"
22312 #include "confdefs.h"
22313 $ac_includes_default
22314 int
22315 main (void)
22316 {
22317 if ((wchar_t *) 0)
22318   return 0;
22319 if (sizeof (wchar_t))
22320   return 0;
22321   ;
22322   return 0;
22323 }
22324 _ACEOF
22325 rm -f conftest.$ac_objext
22326 if { (eval echo "$as_me:22326: \"$ac_compile\"") >&5
22327   (eval $ac_compile) 2>&5
22328   ac_status=$?
22329   echo "$as_me:22329: \$? = $ac_status" >&5
22330   (exit $ac_status); } &&
22331          { ac_try='test -s conftest.$ac_objext'
22332   { (eval echo "$as_me:22332: \"$ac_try\"") >&5
22333   (eval $ac_try) 2>&5
22334   ac_status=$?
22335   echo "$as_me:22335: \$? = $ac_status" >&5
22336   (exit $ac_status); }; }; then
22337   ac_cv_type_wchar_t=yes
22338 else
22339   echo "$as_me: failed program was:" >&5
22340 cat conftest.$ac_ext >&5
22341 ac_cv_type_wchar_t=no
22342 fi
22343 rm -f conftest.$ac_objext conftest.$ac_ext
22344 fi
22345 echo "$as_me:22345: result: $ac_cv_type_wchar_t" >&5
22346 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22347
22348 echo "$as_me:22348: checking size of wchar_t" >&5
22349 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22350 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22351   echo $ECHO_N "(cached) $ECHO_C" >&6
22352 else
22353   if test "$ac_cv_type_wchar_t" = yes; then
22354   if test "$cross_compiling" = yes; then
22355   # Depending upon the size, compute the lo and hi bounds.
22356 cat >conftest.$ac_ext <<_ACEOF
22357 #line 22357 "configure"
22358 #include "confdefs.h"
22359 $ac_includes_default
22360 int
22361 main (void)
22362 {
22363 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22364   ;
22365   return 0;
22366 }
22367 _ACEOF
22368 rm -f conftest.$ac_objext
22369 if { (eval echo "$as_me:22369: \"$ac_compile\"") >&5
22370   (eval $ac_compile) 2>&5
22371   ac_status=$?
22372   echo "$as_me:22372: \$? = $ac_status" >&5
22373   (exit $ac_status); } &&
22374          { ac_try='test -s conftest.$ac_objext'
22375   { (eval echo "$as_me:22375: \"$ac_try\"") >&5
22376   (eval $ac_try) 2>&5
22377   ac_status=$?
22378   echo "$as_me:22378: \$? = $ac_status" >&5
22379   (exit $ac_status); }; }; then
22380   ac_lo=0 ac_mid=0
22381   while :; do
22382     cat >conftest.$ac_ext <<_ACEOF
22383 #line 22383 "configure"
22384 #include "confdefs.h"
22385 $ac_includes_default
22386 int
22387 main (void)
22388 {
22389 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22390   ;
22391   return 0;
22392 }
22393 _ACEOF
22394 rm -f conftest.$ac_objext
22395 if { (eval echo "$as_me:22395: \"$ac_compile\"") >&5
22396   (eval $ac_compile) 2>&5
22397   ac_status=$?
22398   echo "$as_me:22398: \$? = $ac_status" >&5
22399   (exit $ac_status); } &&
22400          { ac_try='test -s conftest.$ac_objext'
22401   { (eval echo "$as_me:22401: \"$ac_try\"") >&5
22402   (eval $ac_try) 2>&5
22403   ac_status=$?
22404   echo "$as_me:22404: \$? = $ac_status" >&5
22405   (exit $ac_status); }; }; then
22406   ac_hi=$ac_mid; break
22407 else
22408   echo "$as_me: failed program was:" >&5
22409 cat conftest.$ac_ext >&5
22410 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22411 fi
22412 rm -f conftest.$ac_objext conftest.$ac_ext
22413   done
22414 else
22415   echo "$as_me: failed program was:" >&5
22416 cat conftest.$ac_ext >&5
22417 ac_hi=-1 ac_mid=-1
22418   while :; do
22419     cat >conftest.$ac_ext <<_ACEOF
22420 #line 22420 "configure"
22421 #include "confdefs.h"
22422 $ac_includes_default
22423 int
22424 main (void)
22425 {
22426 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22427   ;
22428   return 0;
22429 }
22430 _ACEOF
22431 rm -f conftest.$ac_objext
22432 if { (eval echo "$as_me:22432: \"$ac_compile\"") >&5
22433   (eval $ac_compile) 2>&5
22434   ac_status=$?
22435   echo "$as_me:22435: \$? = $ac_status" >&5
22436   (exit $ac_status); } &&
22437          { ac_try='test -s conftest.$ac_objext'
22438   { (eval echo "$as_me:22438: \"$ac_try\"") >&5
22439   (eval $ac_try) 2>&5
22440   ac_status=$?
22441   echo "$as_me:22441: \$? = $ac_status" >&5
22442   (exit $ac_status); }; }; then
22443   ac_lo=$ac_mid; break
22444 else
22445   echo "$as_me: failed program was:" >&5
22446 cat conftest.$ac_ext >&5
22447 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22448 fi
22449 rm -f conftest.$ac_objext conftest.$ac_ext
22450   done
22451 fi
22452 rm -f conftest.$ac_objext conftest.$ac_ext
22453 # Binary search between lo and hi bounds.
22454 while test "x$ac_lo" != "x$ac_hi"; do
22455   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22456   cat >conftest.$ac_ext <<_ACEOF
22457 #line 22457 "configure"
22458 #include "confdefs.h"
22459 $ac_includes_default
22460 int
22461 main (void)
22462 {
22463 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22464   ;
22465   return 0;
22466 }
22467 _ACEOF
22468 rm -f conftest.$ac_objext
22469 if { (eval echo "$as_me:22469: \"$ac_compile\"") >&5
22470   (eval $ac_compile) 2>&5
22471   ac_status=$?
22472   echo "$as_me:22472: \$? = $ac_status" >&5
22473   (exit $ac_status); } &&
22474          { ac_try='test -s conftest.$ac_objext'
22475   { (eval echo "$as_me:22475: \"$ac_try\"") >&5
22476   (eval $ac_try) 2>&5
22477   ac_status=$?
22478   echo "$as_me:22478: \$? = $ac_status" >&5
22479   (exit $ac_status); }; }; then
22480   ac_hi=$ac_mid
22481 else
22482   echo "$as_me: failed program was:" >&5
22483 cat conftest.$ac_ext >&5
22484 ac_lo=`expr $ac_mid + 1`
22485 fi
22486 rm -f conftest.$ac_objext conftest.$ac_ext
22487 done
22488 ac_cv_sizeof_wchar_t=$ac_lo
22489 else
22490   if test "$cross_compiling" = yes; then
22491   { { echo "$as_me:22491: error: cannot run test program while cross compiling" >&5
22492 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22493    { (exit 1); exit 1; }; }
22494 else
22495   cat >conftest.$ac_ext <<_ACEOF
22496 #line 22496 "configure"
22497 #include "confdefs.h"
22498 $ac_includes_default
22499 int
22500 main (void)
22501 {
22502 FILE *f = fopen ("conftest.val", "w");
22503 if (!f)
22504   $ac_main_return (1);
22505 fprintf (f, "%d", (sizeof (wchar_t)));
22506 fclose (f);
22507   ;
22508   return 0;
22509 }
22510 _ACEOF
22511 rm -f conftest$ac_exeext
22512 if { (eval echo "$as_me:22512: \"$ac_link\"") >&5
22513   (eval $ac_link) 2>&5
22514   ac_status=$?
22515   echo "$as_me:22515: \$? = $ac_status" >&5
22516   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22517   { (eval echo "$as_me:22517: \"$ac_try\"") >&5
22518   (eval $ac_try) 2>&5
22519   ac_status=$?
22520   echo "$as_me:22520: \$? = $ac_status" >&5
22521   (exit $ac_status); }; }; then
22522   ac_cv_sizeof_wchar_t=`cat conftest.val`
22523 else
22524   echo "$as_me: program exited with status $ac_status" >&5
22525 echo "$as_me: failed program was:" >&5
22526 cat conftest.$ac_ext >&5
22527 fi
22528 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22529 fi
22530 fi
22531 rm -f conftest.val
22532 else
22533   ac_cv_sizeof_wchar_t=0
22534 fi
22535 fi
22536 echo "$as_me:22536: result: $ac_cv_sizeof_wchar_t" >&5
22537 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22538 cat >>confdefs.h <<EOF
22539 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22540 EOF
22541
22542 fi
22543
22544 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22545 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22546 ###
22547 ### ticlib modules may be a separate library, otherwise contained in termlib.
22548 ### termlib modules may be a separate library, otherwise contained in ncurses.
22549 ###
22550 ### The of "+" or " " between the tokens controls the way the script
22551 ### chooses to split module lists into libraries.
22552 ###
22553 ### (see CF_LIB_RULES).
22554 echo "$as_me:22554: checking for library subsets" >&5
22555 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22556 LIB_SUBSETS=
22557
22558 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22559         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22560         if test "$with_ticlib" != no ; then
22561                 LIB_SUBSETS="${LIB_SUBSETS} "
22562         else
22563                 LIB_SUBSETS="${LIB_SUBSETS}+"
22564         fi
22565 fi
22566
22567 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22568 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22569
22570 if test "$with_termlib" != no ; then
22571         LIB_SUBSETS="${LIB_SUBSETS} "
22572 else
22573         LIB_SUBSETS="${LIB_SUBSETS}+"
22574 fi
22575
22576 LIB_SUBSETS="${LIB_SUBSETS}base"
22577
22578 # Most term-driver calls are to tinfo, but some like init_pair are to the
22579 # base library (so it resides in base).
22580 if test "$with_term_driver" != no ; then
22581         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22582         case $cf_cv_system_name in
22583         (*mingw32*|*mingw64*)
22584                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22585                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22586                 ;;
22587         (*)
22588                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22589                 ;;
22590         esac
22591 fi
22592
22593 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22594 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22595
22596 echo "$as_me:22596: result: $LIB_SUBSETS" >&5
22597 echo "${ECHO_T}$LIB_SUBSETS" >&6
22598
22599 ### Construct the list of include-directories to be generated
22600
22601 if test "$srcdir" != "."; then
22602         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22603 fi
22604 CPPFLAGS="-I../include $CPPFLAGS"
22605 if test "$srcdir" != "."; then
22606         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22607 fi
22608 CPPFLAGS="-I. $CPPFLAGS"
22609
22610 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22611 if test "$srcdir" != "."; then
22612         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22613 fi
22614 if test "$GCC" != yes; then
22615         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22616 elif test "$includedir" != "/usr/include"; then
22617         if test "$includedir" = '${prefix}/include' ; then
22618                 if test x$prefix != x/usr ; then
22619                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22620                 fi
22621         else
22622                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22623         fi
22624 fi
22625
22626 ### Build up pieces for makefile rules
22627 echo "$as_me:22627: checking default library suffix" >&5
22628 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22629
22630         case $DFT_LWR_MODEL in
22631         (libtool) DFT_ARG_SUFFIX=''   ;;
22632         (normal)  DFT_ARG_SUFFIX=''   ;;
22633         (debug)   DFT_ARG_SUFFIX='_g' ;;
22634         (profile) DFT_ARG_SUFFIX='_p' ;;
22635         (shared)  DFT_ARG_SUFFIX=''   ;;
22636         esac
22637         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22638 echo "$as_me:22638: result: $DFT_ARG_SUFFIX" >&5
22639 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22640
22641 echo "$as_me:22641: checking default library-dependency suffix" >&5
22642 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22643
22644         case X$DFT_LWR_MODEL in
22645         (Xlibtool)
22646                 DFT_LIB_SUFFIX='.la'
22647                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22648                 ;;
22649         (Xdebug)
22650                 DFT_LIB_SUFFIX='_g.a'
22651                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22652                 ;;
22653         (Xprofile)
22654                 DFT_LIB_SUFFIX='_p.a'
22655                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22656                 ;;
22657         (Xshared)
22658                 case $cf_cv_system_name in
22659                 (aix[5-7]*)
22660                         DFT_LIB_SUFFIX='.so'
22661                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22662                         ;;
22663                 (cygwin*|msys*|mingw*)
22664                         DFT_LIB_SUFFIX='.dll'
22665                         DFT_DEP_SUFFIX='.dll.a'
22666                         ;;
22667                 (darwin*)
22668                         DFT_LIB_SUFFIX='.dylib'
22669                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22670                         ;;
22671                 (hpux*)
22672                         case $target in
22673                         (ia64*)
22674                                 DFT_LIB_SUFFIX='.so'
22675                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22676                                 ;;
22677                         (*)
22678                                 DFT_LIB_SUFFIX='.sl'
22679                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22680                                 ;;
22681                         esac
22682                         ;;
22683                 (*)
22684                         DFT_LIB_SUFFIX='.so'
22685                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22686                         ;;
22687                 esac
22688                 ;;
22689         (*)
22690                 DFT_LIB_SUFFIX='.a'
22691                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22692                 ;;
22693         esac
22694         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22695         then
22696                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22697                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22698         fi
22699 echo "$as_me:22699: result: $DFT_DEP_SUFFIX" >&5
22700 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22701
22702 echo "$as_me:22702: checking default object directory" >&5
22703 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22704
22705         case $DFT_LWR_MODEL in
22706         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22707         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22708         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22709         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22710         (shared)
22711                 case $cf_cv_system_name in
22712                 (cygwin|msys)
22713                         DFT_OBJ_SUBDIR='objects' ;;
22714                 (*)
22715                         DFT_OBJ_SUBDIR='obj_s' ;;
22716                 esac
22717         esac
22718 echo "$as_me:22718: result: $DFT_OBJ_SUBDIR" >&5
22719 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22720
22721 if test "x$cf_with_cxx" = xyes ; then
22722 echo "$as_me:22722: checking c++ library-dependency suffix" >&5
22723 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22724 if test "$with_libtool" != "no"; then
22725         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22726         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22727 elif test "$with_shared_cxx" != "no"; then
22728         # also for g++ users...
22729         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22730 else
22731         # we normally make a static library because C/C++ library rules differ
22732
22733         case Xnormal in
22734         (Xlibtool)
22735                 CXX_LIB_SUFFIX='.la'
22736                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22737                 ;;
22738         (Xdebug)
22739                 CXX_LIB_SUFFIX='_g.a'
22740                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22741                 ;;
22742         (Xprofile)
22743                 CXX_LIB_SUFFIX='_p.a'
22744                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22745                 ;;
22746         (Xshared)
22747                 case $cf_cv_system_name in
22748                 (aix[5-7]*)
22749                         CXX_LIB_SUFFIX='.so'
22750                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22751                         ;;
22752                 (cygwin*|msys*|mingw*)
22753                         CXX_LIB_SUFFIX='.dll'
22754                         CXX_DEP_SUFFIX='.dll.a'
22755                         ;;
22756                 (darwin*)
22757                         CXX_LIB_SUFFIX='.dylib'
22758                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22759                         ;;
22760                 (hpux*)
22761                         case $target in
22762                         (ia64*)
22763                                 CXX_LIB_SUFFIX='.so'
22764                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22765                                 ;;
22766                         (*)
22767                                 CXX_LIB_SUFFIX='.sl'
22768                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22769                                 ;;
22770                         esac
22771                         ;;
22772                 (*)
22773                         CXX_LIB_SUFFIX='.so'
22774                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22775                         ;;
22776                 esac
22777                 ;;
22778         (*)
22779                 CXX_LIB_SUFFIX='.a'
22780                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22781                 ;;
22782         esac
22783         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22784         then
22785                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22786                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22787         fi
22788
22789 fi
22790 echo "$as_me:22790: result: $CXX_LIB_SUFFIX" >&5
22791 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22792
22793 fi
22794
22795 # do not want -ldl in build except as needed for -lncurses dependency
22796 if test "x$with_dlsym" = xyes ; then
22797 if test $DFT_LWR_MODEL = shared || \
22798    test $DFT_LWR_MODEL = libtool ; then
22799
22800 # remove dl library from $LIBS
22801 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22802
22803 fi
22804 fi
22805 ### Set up low-level terminfo dependencies for makefiles.
22806
22807 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22808 # do not need libdl
22809 TICS_LIST=
22810 if test "x$with_dlsym" = xyes ; then
22811
22812 # remove dl library from $SHLIB_LIST
22813 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22814
22815 fi
22816
22817 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22818 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22819 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22820 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22821 then
22822         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22823 fi
22824
22825 if test "$with_ticlib" != no ; then
22826
22827         if test "x$with_ticlib" != xyes ; then
22828                 TICS_NAME=$with_ticlib
22829                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22830                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22831                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22832                 TICS_LIB_SUFFIX="${with_ticlib}"
22833         else
22834                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22835                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22836                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22837                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22838         fi
22839         TICS_LDFLAGS="-L${LIB_DIR}"
22840         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22841 else
22842         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22843         TICS_LDFLAGS="-L${LIB_DIR}"
22844         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22845 fi
22846
22847 if test "$with_termlib" != no ; then
22848
22849         if test "x$with_termlib" != xyes ; then
22850                 TINFO_NAME=$with_termlib
22851                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22852                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22853                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22854                 TINFO_LIB_SUFFIX="${with_termlib}"
22855         else
22856                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22857                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22858                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22859                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22860         fi
22861
22862         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22863         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22864         if test "$DFT_LWR_MODEL" = "libtool"; then
22865                 TEST_ARGS="${TEST_DEPS}"
22866                 TEST_ARG2="${TEST_DEP2}"
22867                 TINFO_LDFLAGS="-L${LIB_DIR}"
22868                 TINFO_LIBS="$TEST_ARGS"
22869                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22870                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22871         else
22872                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22873                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22874                 if test "x$with_term_driver" != xno ; then
22875                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22876                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22877                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22878                 else
22879                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22880                         TINFO_LIBS="$TEST_ARGS"
22881                 fi
22882                 TINFO_LDFLAGS="-L${LIB_DIR}"
22883                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22884         fi
22885 else
22886         # the next lines are needed for linking libtic over libncurses
22887         TINFO_NAME=${LIB_NAME}
22888         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22889         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22890         if test "x$with_tic_depends" = xyes ; then
22891                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22892         else
22893                 TICS_LIST="$SHLIB_LIST"
22894         fi
22895
22896         TINFO_LDFLAGS="-L${LIB_DIR}"
22897         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22898 fi
22899
22900 if test "$DFT_LWR_MODEL" = shared ; then
22901         case $cf_cv_system_name in
22902         (cygwin*|msys*)
22903                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22904                 TINFO_SUFFIX=.dll
22905                 ;;
22906         esac
22907 fi
22908
22909 if test "x$with_dlsym" = xyes ; then
22910
22911 # remove dl library from $TICS_LIST
22912 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22913
22914 fi
22915
22916 if test "$DFT_LWR_MODEL" = "libtool"; then
22917         OBJEXT=lo
22918 fi
22919
22920 # needed for Ada95
22921 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22922
22923 case $DFT_LWR_MODEL in
22924 (normal|debug|profile)
22925
22926 if test "$GCC" = yes ; then
22927         case $cf_cv_system_name in
22928         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22929                 LDFLAGS_STATIC=
22930                 LDFLAGS_SHARED=
22931                 ;;
22932         (*)     # normally, except when broken
22933                 LDFLAGS_STATIC=-static
22934                 LDFLAGS_SHARED=-dynamic
22935                 ;;
22936         esac
22937 else
22938         case $cf_cv_system_name in
22939         (aix[4-7]*)     # from ld manpage
22940                 LDFLAGS_STATIC=-bstatic
22941                 LDFLAGS_SHARED=-bdynamic
22942                 ;;
22943         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22944                 # We could also use just "archive" and "shared".
22945                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22946                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22947                 ;;
22948         (irix*)         # from ld manpage IRIX64
22949                 LDFLAGS_STATIC=-Bstatic
22950                 LDFLAGS_SHARED=-Bdynamic
22951                 ;;
22952         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22953                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22954                 LDFLAGS_STATIC=-noso
22955                 LDFLAGS_SHARED=-so_archive
22956                 ;;
22957         (solaris2*)
22958                 LDFLAGS_STATIC=-Bstatic
22959                 LDFLAGS_SHARED=-Bdynamic
22960                 ;;
22961         esac
22962 fi
22963
22964 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22965 then
22966         echo "$as_me:22966: checking if linker supports switching between static/dynamic" >&5
22967 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22968
22969         rm -f libconftest.a
22970         cat >conftest.$ac_ext <<EOF
22971 #line 22971 "configure"
22972 #include <stdio.h>
22973 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22974 EOF
22975         if { (eval echo "$as_me:22975: \"$ac_compile\"") >&5
22976   (eval $ac_compile) 2>&5
22977   ac_status=$?
22978   echo "$as_me:22978: \$? = $ac_status" >&5
22979   (exit $ac_status); } ; then
22980                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22981                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22982         fi
22983         rm -f conftest.*
22984
22985         cf_save_LIBS="$LIBS"
22986
22987         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22988         cat >conftest.$ac_ext <<_ACEOF
22989 #line 22989 "configure"
22990 #include "confdefs.h"
22991
22992 #line 22992 "configure"
22993 #include <stdio.h>
22994 int cf_ldflags_static(FILE *fp);
22995
22996 int
22997 main (void)
22998 {
22999
23000         return cf_ldflags_static(stdin);
23001
23002   ;
23003   return 0;
23004 }
23005 _ACEOF
23006 rm -f conftest.$ac_objext conftest$ac_exeext
23007 if { (eval echo "$as_me:23007: \"$ac_link\"") >&5
23008   (eval $ac_link) 2>&5
23009   ac_status=$?
23010   echo "$as_me:23010: \$? = $ac_status" >&5
23011   (exit $ac_status); } &&
23012          { ac_try='test -s conftest$ac_exeext'
23013   { (eval echo "$as_me:23013: \"$ac_try\"") >&5
23014   (eval $ac_try) 2>&5
23015   ac_status=$?
23016   echo "$as_me:23016: \$? = $ac_status" >&5
23017   (exit $ac_status); }; }; then
23018
23019         # some linkers simply ignore the -dynamic
23020         case x`file conftest$ac_exeext 2>/dev/null` in
23021         (*static*)
23022                 cf_ldflags_static=no
23023                 ;;
23024         (*)
23025                 cf_ldflags_static=yes
23026                 ;;
23027         esac
23028
23029 else
23030   echo "$as_me: failed program was:" >&5
23031 cat conftest.$ac_ext >&5
23032 cf_ldflags_static=no
23033 fi
23034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23035
23036         rm -f libconftest.*
23037         LIBS="$cf_save_LIBS"
23038
23039         echo "$as_me:23039: result: $cf_ldflags_static" >&5
23040 echo "${ECHO_T}$cf_ldflags_static" >&6
23041
23042         if test $cf_ldflags_static != yes
23043         then
23044                 LDFLAGS_STATIC=
23045                 LDFLAGS_SHARED=
23046         fi
23047 else
23048         LDFLAGS_STATIC=
23049         LDFLAGS_SHARED=
23050 fi
23051
23052         ;;
23053 esac
23054
23055 echo "$as_me:23055: checking where we will install curses.h" >&5
23056 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
23057
23058 includesubdir=
23059 if test "$with_overwrite" = no && \
23060  ( test "x$includedir" = 'x${prefix}/include' || \
23061    test "x$includedir" = "x${prefix}/include" )
23062 then
23063         includesubdir="/ncurses${USE_LIB_SUFFIX}"
23064 fi
23065 echo "$as_me:23065: result: ${includedir}${includesubdir}" >&5
23066 echo "${ECHO_T}${includedir}${includesubdir}" >&6
23067
23068 ### Resolve a conflict between normal and wide-curses by forcing applications
23069 ### that will need libutf8 to add it to their configure script.
23070 if test "$with_overwrite" != no ; then
23071 if test "$NCURSES_LIBUTF8" = 1 ; then
23072         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
23073         { echo "$as_me:23073: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
23074 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
23075 fi
23076 fi
23077 WITH_OVERWRITE=$with_overwrite
23078
23079 # used to separate tack out of the tree
23080 NCURSES_TREE=
23081
23082 ### predefined stuff for the test programs
23083
23084 cat >>confdefs.h <<\EOF
23085 #define HAVE_SLK_COLOR 1
23086 EOF
23087
23088 ### Construct the list of subdirectories for which we'll customize makefiles
23089 ### with the appropriate compile-rules.
23090
23091 echo "$as_me:23091: checking for src modules" >&5
23092 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
23093
23094 # dependencies and linker-arguments for test-programs
23095 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
23096 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
23097 if test "$DFT_LWR_MODEL" = "libtool"; then
23098         TEST_ARGS="${TEST_DEPS}"
23099         TEST_ARG2="${TEST_DEP2}"
23100 else
23101         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23102         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
23103 fi
23104
23105 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
23106 cf_cv_src_modules=
23107 for cf_dir in $modules_to_build
23108 do
23109         if test -f $srcdir/$cf_dir/modules; then
23110
23111                 # We may/may not have tack in the distribution, though the
23112                 # makefile is.
23113                 if test $cf_dir = tack ; then
23114                         if test "x$cf_with_tack" != "xyes"; then
23115                                 continue
23116                         fi
23117                 fi
23118
23119                 if test -z "$cf_cv_src_modules"; then
23120                         cf_cv_src_modules=$cf_dir
23121                 else
23122                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23123                 fi
23124
23125                 # Make the ncurses_cfg.h file record the library interface files as
23126                 # well.  These are header files that are the same name as their
23127                 # directory.  Ncurses is the only library that does not follow
23128                 # that pattern.
23129                 if test $cf_dir = tack ; then
23130                         continue
23131                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23132
23133 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23134
23135                         cat >>confdefs.h <<EOF
23136 #define HAVE_${cf_have_include}_H 1
23137 EOF
23138
23139                         cat >>confdefs.h <<EOF
23140 #define HAVE_LIB${cf_have_include} 1
23141 EOF
23142
23143                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23144                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23145                         if test "$DFT_LWR_MODEL" = "libtool"; then
23146                                 TEST_ARGS="${TEST_DEPS}"
23147                                 TEST_ARG2="${TEST_DEP2}"
23148                         else
23149                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23150                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23151                         fi
23152                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23153                 fi
23154         fi
23155 done
23156 echo "$as_me:23156: result: $cf_cv_src_modules" >&5
23157 echo "${ECHO_T}$cf_cv_src_modules" >&6
23158
23159 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23160 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23161
23162 SRC_SUBDIRS=
23163 if test "x$cf_with_manpages" != xno ; then
23164         SRC_SUBDIRS="$SRC_SUBDIRS man"
23165 fi
23166 SRC_SUBDIRS="$SRC_SUBDIRS include"
23167 for cf_dir in $cf_cv_src_modules
23168 do
23169         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23170 done
23171 if test "x$cf_with_tests" != "xno" ; then
23172         SRC_SUBDIRS="$SRC_SUBDIRS test"
23173 fi
23174 # always make this, to install the ncurses-config script
23175 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23176 if test "$cf_with_cxx_binding" != no; then
23177         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23178         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23179 fi
23180
23181 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23182 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23183
23184 ADA_SUBDIRS=
23185 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23186         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23187         ADA_SUBDIRS="gen src"
23188         if test "x$cf_with_tests" != "xno" ; then
23189                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23190         fi
23191 fi
23192
23193 SUB_MAKEFILES=
23194 for cf_dir in $SRC_SUBDIRS
23195 do
23196         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23197 done
23198
23199 if test -n "$ADA_SUBDIRS"; then
23200         for cf_dir in $ADA_SUBDIRS
23201         do
23202                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23203         done
23204
23205 fi
23206
23207 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23208    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23209    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23210 fi
23211
23212 DIRS_TO_MAKE="lib"
23213 for cf_item in $cf_list_models
23214 do
23215
23216         case $cf_item in
23217         (libtool) cf_subdir='obj_lo'  ;;
23218         (normal)  cf_subdir='objects' ;;
23219         (debug)   cf_subdir='obj_g' ;;
23220         (profile) cf_subdir='obj_p' ;;
23221         (shared)
23222                 case $cf_cv_system_name in
23223                 (cygwin|msys)
23224                         cf_subdir='objects' ;;
23225                 (*)
23226                         cf_subdir='obj_s' ;;
23227                 esac
23228         esac
23229
23230         for cf_item2 in $DIRS_TO_MAKE
23231         do
23232                 test $cf_item2 = $cf_subdir && break
23233         done
23234         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23235 done
23236 for cf_dir in $DIRS_TO_MAKE
23237 do
23238         test ! -d $cf_dir && mkdir $cf_dir
23239 done
23240
23241 # symbols that differ when compiling Ada95 by itself.
23242 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23243
23244 # values to use as strings
23245
23246 cat >>confdefs.h <<EOF
23247 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23248 EOF
23249
23250 cat >>confdefs.h <<EOF
23251 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23252 EOF
23253
23254 ### Now that we're done running tests, add the compiler-warnings, if any
23255
23256 cf_fix_cppflags=no
23257 cf_new_cflags=
23258 cf_new_cppflags=
23259 cf_new_extra_cppflags=
23260
23261 for cf_add_cflags in $EXTRA_CFLAGS
23262 do
23263 case $cf_fix_cppflags in
23264 (no)
23265         case $cf_add_cflags in
23266         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23267                 case $cf_add_cflags in
23268                 (-D*)
23269                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23270
23271                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23272                                 && test -z "${cf_tst_cflags}" \
23273                                 && cf_fix_cppflags=yes
23274
23275                         if test $cf_fix_cppflags = yes ; then
23276
23277         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23278         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23279
23280                                 continue
23281                         elif test "${cf_tst_cflags}" = "\"'" ; then
23282
23283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23285
23286                                 continue
23287                         fi
23288                         ;;
23289                 esac
23290                 case "$CPPFLAGS" in
23291                 (*$cf_add_cflags)
23292                         ;;
23293                 (*)
23294                         case $cf_add_cflags in
23295                         (-D*)
23296                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23297
23298 CPPFLAGS=`echo "$CPPFLAGS" | \
23299         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23300                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23301
23302                                 ;;
23303                         esac
23304
23305         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23306         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23307
23308                         ;;
23309                 esac
23310                 ;;
23311         (*)
23312
23313         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23314         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23315
23316                 ;;
23317         esac
23318         ;;
23319 (yes)
23320
23321         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23322         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23323
23324         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23325
23326         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23327                 && test -z "${cf_tst_cflags}" \
23328                 && cf_fix_cppflags=no
23329         ;;
23330 esac
23331 done
23332
23333 if test -n "$cf_new_cflags" ; then
23334
23335         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23336         CFLAGS="${CFLAGS}$cf_new_cflags"
23337
23338 fi
23339
23340 if test -n "$cf_new_cppflags" ; then
23341
23342         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23343         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23344
23345 fi
23346
23347 if test -n "$cf_new_extra_cppflags" ; then
23348
23349         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23350         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23351
23352 fi
23353
23354 ### Define substitutions for header files to avoid name-pollution
23355
23356 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23357         HAVE_TCGETATTR=1
23358 else
23359         HAVE_TCGETATTR=0
23360 fi
23361
23362 if test "x$ac_cv_header_stdint_h" = xyes ; then
23363         HAVE_STDINT_H=1
23364 else
23365         HAVE_STDINT_H=0
23366 fi
23367
23368 if test "x$ac_cv_header_termio_h" = xyes ; then
23369         HAVE_TERMIO_H=1
23370 else
23371         HAVE_TERMIO_H=0
23372 fi
23373
23374 if test "x$ac_cv_header_termios_h" = xyes ; then
23375         HAVE_TERMIOS_H=1
23376 else
23377         HAVE_TERMIOS_H=0
23378 fi
23379
23380 ################################################################################
23381 test "x$use_database" = xyes && \
23382 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23383
23384 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23385 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23386
23387 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23388 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23389 fi
23390
23391 # Extract the first word of "tic", so it can be a program name with args.
23392 set dummy tic; ac_word=$2
23393 echo "$as_me:23393: checking for $ac_word" >&5
23394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23395 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23396   echo $ECHO_N "(cached) $ECHO_C" >&6
23397 else
23398   case $TIC_PATH in
23399   [\\/]* | ?:[\\/]*)
23400   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23401   ;;
23402   *)
23403   ac_save_IFS=$IFS; IFS=$ac_path_separator
23404 ac_dummy="$PATH:/usr/local/ncurses/bin"
23405 for ac_dir in $ac_dummy; do
23406   IFS=$ac_save_IFS
23407   test -z "$ac_dir" && ac_dir=.
23408   if $as_executable_p "$ac_dir/$ac_word"; then
23409    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23410    echo "$as_me:23410: found $ac_dir/$ac_word" >&5
23411    break
23412 fi
23413 done
23414
23415   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23416   ;;
23417 esac
23418 fi
23419 TIC_PATH=$ac_cv_path_TIC_PATH
23420
23421 if test -n "$TIC_PATH"; then
23422   echo "$as_me:23422: result: $TIC_PATH" >&5
23423 echo "${ECHO_T}$TIC_PATH" >&6
23424 else
23425   echo "$as_me:23425: result: no" >&5
23426 echo "${ECHO_T}no" >&6
23427 fi
23428
23429 if test -n "$FALLBACK_LIST"
23430 then
23431         if test "$TIC_PATH" = unknown
23432         then
23433                 { echo "$as_me:23433: WARNING: no tic program found for fallbacks" >&5
23434 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23435         fi
23436 fi
23437
23438 if test "x$cf_with_tests" != xno ; then
23439         MAKE_TESTS=
23440 else
23441         MAKE_TESTS="#"
23442 fi
23443
23444 ADAHTML_DIR=../../doc/html/ada
23445
23446 # these could be configurable, but are not currently
23447 PANEL_NAME=panel
23448 MENU_NAME=menu
23449 FORM_NAME=form
23450 CXX_NAME=ncurses++
23451
23452 # workaround for OS/2 (20151017)
23453 case $cf_cv_system_name in
23454 (os2*)
23455         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23456         ;;
23457 (*)
23458         LIBTOOL_OPTS_CXX=
23459         ;;
23460 esac
23461
23462 # workaround for g++ versus Solaris (20131116)
23463 case $cf_cv_system_name in
23464 (solaris2*)
23465         case "x$CPPFLAGS" in
23466         (*-D_XOPEN_SOURCE_EXTENDED*)
23467                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23468
23469 echo "${as_me:-configure}:23469: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23470
23471                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23472                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23473                 ;;
23474         esac
23475         ;;
23476 esac
23477
23478 # Help to automatically enable the extended curses features when using either
23479 # the *-config or the ".pc" files by adding defines.
23480 echo "$as_me:23480: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23481 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23482 PKG_CFLAGS=
23483 for cf_loop1 in $CPPFLAGS_after_XOPEN
23484 do
23485         cf_found=no
23486         for cf_loop2 in $CPPFLAGS_before_XOPEN
23487         do
23488                 if test "x$cf_loop1" = "x$cf_loop2"
23489                 then
23490                         cf_found=yes
23491                         break
23492                 fi
23493         done
23494         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23495 done
23496 echo "$as_me:23496: result: $PKG_CFLAGS" >&5
23497 echo "${ECHO_T}$PKG_CFLAGS" >&6
23498
23499 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23500 case "x$NCURSES_OSPEED" in
23501 (*short*)
23502         cf_compatible=1
23503         ;;
23504 (*)
23505         cf_compatible=0
23506         ;;
23507 esac
23508
23509 cat >>confdefs.h <<EOF
23510 #define NCURSES_OSPEED_COMPAT $cf_compatible
23511 EOF
23512
23513 case "x$cf_cv_typeof_chtype" in
23514 (xshort|xint|xlong)
23515         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23516         ;;
23517 esac
23518
23519 case "x$cf_cv_typeof_mmask_t" in
23520 (xshort|xint|xlong)
23521         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23522         ;;
23523 esac
23524
23525 # substitute into misc/Makefile to suppress
23526 # (un)install.data from the
23527 # (un)install rules.
23528 if test "x$cf_with_db_install" = "xno"; then
23529         MISC_INSTALL_DATA=
23530         MISC_UNINSTALL_DATA=
23531 else
23532         MISC_INSTALL_DATA=install.data
23533         MISC_UNINSTALL_DATA=uninstall.data
23534 fi
23535
23536 SUB_SCRIPTS=
23537
23538 if test -n "$PACKAGE"
23539 then
23540         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23541         export PACKAGE
23542         echo "package: $PACKAGE"
23543 fi
23544
23545 UNALTERED_SYMS=
23546 cf_filter_syms=no
23547
23548 if test -n "$RESULTING_SYMS"
23549 then
23550         cf_filter_syms=$cf_dft_filter_syms
23551         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23552
23553 echo "${as_me:-configure}:23553: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23554
23555 fi
23556
23557 if test "x$WILDCARD_SYMS" = xno
23558 then
23559         cf_filter_syms=yes
23560 fi
23561
23562 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23563
23564 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23565 if test $cf_filter_syms = yes
23566 then
23567         RESULTING_SYMS=resulting.map
23568 fi
23569
23570 if test "x$cross_compiling" = xyes ; then
23571         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23572         CHECK_BUILD="#"
23573 else
23574         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23575         CHECK_BUILD=
23576 fi
23577
23578 cat >>confdefs.h <<\EOF
23579 #define HAVE_CURSES_DATA_BOOLNAMES 1
23580 EOF
23581
23582 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"
23583 ac_config_commands="$ac_config_commands default"
23584 cat >confcache <<\_ACEOF
23585 # This file is a shell script that caches the results of configure
23586 # tests run on this system so they can be shared between configure
23587 # scripts and configure runs, see configure's option --config-cache.
23588 # It is not useful on other systems.  If it contains results you don't
23589 # want to keep, you may remove or edit it.
23590 #
23591 # config.status only pays attention to the cache file if you give it
23592 # the --recheck option to rerun configure.
23593 #
23594 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23595 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23596 # following values.
23597
23598 _ACEOF
23599
23600 # The following way of writing the cache mishandles newlines in values,
23601 # but we know of no workaround that is simple, portable, and efficient.
23602 # So, don't put newlines in cache variables' values.
23603 # Ultrix sh set writes to stderr and can't be redirected directly,
23604 # and sets the high bit in the cache file unless we assign to the vars.
23605 {
23606   (set) 2>&1 |
23607     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23608     *ac_space=\ *)
23609       # `set' does not quote correctly, so add quotes (double-quote
23610       # substitution turns \\\\ into \\, and sed turns \\ into \).
23611       sed -n \
23612         "s/'/'\\\\''/g;
23613           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23614       ;;
23615     *)
23616       # `set' quotes correctly as required by POSIX, so do not add quotes.
23617       sed -n \
23618         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23619       ;;
23620     esac;
23621 } |
23622   sed '
23623      t clear
23624      : clear
23625      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23626      t end
23627      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23628      : end' >>confcache
23629 if cmp -s $cache_file confcache; then :; else
23630   if test -w $cache_file; then
23631     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23632     cat confcache >$cache_file
23633   else
23634     echo "not updating unwritable cache $cache_file"
23635   fi
23636 fi
23637 rm -f confcache
23638
23639 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23640 # Let make expand exec_prefix.
23641 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23642
23643 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23644 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23645 # trailing colons and then remove the whole line if VPATH becomes empty
23646 # (actually we leave an empty line to preserve line numbers).
23647 if test "x$srcdir" = x.; then
23648   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23649 s/:*\$(srcdir):*/:/;
23650 s/:*\${srcdir}:*/:/;
23651 s/:*@srcdir@:*/:/;
23652 s/^\([^=]*=[    ]*\):*/\1/;
23653 s/:*$//;
23654 s/^[^=]*=[      ]*$//;
23655 }'
23656 fi
23657
23658 DEFS=-DHAVE_CONFIG_H
23659
23660 : ${CONFIG_STATUS=./config.status}
23661 ac_clean_files_save=$ac_clean_files
23662 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23663 { echo "$as_me:23663: creating $CONFIG_STATUS" >&5
23664 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23665 cat >$CONFIG_STATUS <<_ACEOF
23666 #! $SHELL
23667 # Generated automatically by configure.
23668 # Run this file to recreate the current configuration.
23669 # Compiler output produced by configure, useful for debugging
23670 # configure, is in config.log if it exists.
23671
23672 debug=false
23673 SHELL=\${CONFIG_SHELL-$SHELL}
23674 ac_cs_invocation="\$0 \$@"
23675
23676 _ACEOF
23677
23678 cat >>$CONFIG_STATUS <<\_ACEOF
23679 # Be Bourne compatible
23680 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23681   emulate sh
23682   NULLCMD=:
23683 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23684   set -o posix
23685 fi
23686
23687 # Name of the executable.
23688 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23689
23690 if expr a : '\(a\)' >/dev/null 2>&1; then
23691   as_expr=expr
23692 else
23693   as_expr=false
23694 fi
23695
23696 rm -f conf$$ conf$$.exe conf$$.file
23697 echo >conf$$.file
23698 if ln -s conf$$.file conf$$ 2>/dev/null; then
23699   # We could just check for DJGPP; but this test a) works b) is more generic
23700   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23701   if test -f conf$$.exe; then
23702     # Don't use ln at all; we don't have any links
23703     as_ln_s='cp -p'
23704   else
23705     as_ln_s='ln -s'
23706   fi
23707 elif ln conf$$.file conf$$ 2>/dev/null; then
23708   as_ln_s=ln
23709 else
23710   as_ln_s='cp -p'
23711 fi
23712 rm -f conf$$ conf$$.exe conf$$.file
23713
23714 as_executable_p="test -f"
23715
23716 # Support unset when possible.
23717 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23718   as_unset=unset
23719 else
23720   as_unset=false
23721 fi
23722
23723 # NLS nuisances.
23724 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23725 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23726 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23727 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23728 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23729 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23730 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23731 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23732
23733 # IFS
23734 # We need space, tab and new line, in precisely that order.
23735 as_nl='
23736 '
23737 IFS="   $as_nl"
23738
23739 # CDPATH.
23740 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23741
23742 exec 6>&1
23743
23744 _ACEOF
23745
23746 # Files that config.status was made for.
23747 if test -n "$ac_config_files"; then
23748   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23749 fi
23750
23751 if test -n "$ac_config_headers"; then
23752   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23753 fi
23754
23755 if test -n "$ac_config_links"; then
23756   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23757 fi
23758
23759 if test -n "$ac_config_commands"; then
23760   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23761 fi
23762
23763 cat >>$CONFIG_STATUS <<\EOF
23764
23765 ac_cs_usage="\
23766 \`$as_me' instantiates files from templates according to the
23767 current configuration.
23768
23769 Usage: $0 [OPTIONS] [FILE]...
23770
23771   -h, --help       print this help, then exit
23772   -V, --version    print version number, then exit
23773   -d, --debug      don't remove temporary files
23774       --recheck    update $as_me by reconfiguring in the same conditions
23775   --file=FILE[:TEMPLATE]
23776                    instantiate the configuration file FILE
23777   --header=FILE[:TEMPLATE]
23778                    instantiate the configuration header FILE
23779
23780 Configuration files:
23781 $config_files
23782
23783 Configuration headers:
23784 $config_headers
23785
23786 Configuration commands:
23787 $config_commands
23788
23789 Report bugs to <dickey@invisible-island.net>."
23790 EOF
23791
23792 cat >>$CONFIG_STATUS <<EOF
23793 ac_cs_version="\\
23794 config.status
23795 configured by $0, generated by GNU Autoconf 2.52.20170501,
23796   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23797
23798 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23799 Free Software Foundation, Inc.
23800 This config.status script is free software; the Free Software Foundation
23801 gives unlimited permission to copy, distribute and modify it."
23802 srcdir=$srcdir
23803 INSTALL="$INSTALL"
23804 EOF
23805
23806 cat >>$CONFIG_STATUS <<\EOF
23807 # If no file are specified by the user, then we need to provide default
23808 # value.  By we need to know if files were specified by the user.
23809 ac_need_defaults=:
23810 while test $# != 0
23811 do
23812   case $1 in
23813   --*=*)
23814     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23815     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23816     shift
23817     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23818     shift
23819     ;;
23820   -*);;
23821   *) # This is not an option, so the user has probably given explicit
23822      # arguments.
23823      ac_need_defaults=false;;
23824   esac
23825
23826   case $1 in
23827   # Handling of the options.
23828 EOF
23829 cat >>$CONFIG_STATUS <<EOF
23830   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23831     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23832     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23833 EOF
23834 cat >>$CONFIG_STATUS <<\EOF
23835   --version | --vers* | -V )
23836     echo "$ac_cs_version"; exit 0 ;;
23837   --he | --h)
23838     # Conflict between --help and --header
23839     { { echo "$as_me:23839: error: ambiguous option: $1
23840 Try \`$0 --help' for more information." >&5
23841 echo "$as_me: error: ambiguous option: $1
23842 Try \`$0 --help' for more information." >&2;}
23843    { (exit 1); exit 1; }; };;
23844   --help | --hel | -h )
23845     echo "$ac_cs_usage"; exit 0 ;;
23846   --debug | --d* | -d )
23847     debug=: ;;
23848   --file | --fil | --fi | --f )
23849     shift
23850     CONFIG_FILES="$CONFIG_FILES $1"
23851     ac_need_defaults=false;;
23852   --header | --heade | --head | --hea )
23853     shift
23854     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23855     ac_need_defaults=false;;
23856
23857   # This is an error.
23858   -*) { { echo "$as_me:23858: error: unrecognized option: $1
23859 Try \`$0 --help' for more information." >&5
23860 echo "$as_me: error: unrecognized option: $1
23861 Try \`$0 --help' for more information." >&2;}
23862    { (exit 1); exit 1; }; } ;;
23863
23864   *) ac_config_targets="$ac_config_targets $1" ;;
23865
23866   esac
23867   shift
23868 done
23869
23870 exec 5>>config.log
23871 cat >&5 << _ACEOF
23872
23873 ## ----------------------- ##
23874 ## Running config.status.  ##
23875 ## ----------------------- ##
23876
23877 This file was extended by $as_me 2.52.20170501, executed with
23878   CONFIG_FILES    = $CONFIG_FILES
23879   CONFIG_HEADERS  = $CONFIG_HEADERS
23880   CONFIG_LINKS    = $CONFIG_LINKS
23881   CONFIG_COMMANDS = $CONFIG_COMMANDS
23882   > $ac_cs_invocation
23883 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23884
23885 _ACEOF
23886 EOF
23887
23888 cat >>$CONFIG_STATUS <<EOF
23889 #
23890 # INIT-COMMANDS section.
23891 #
23892
23893 ### Special initialization commands, used to pass information from the
23894 ### configuration-run into config.status
23895
23896 AWK="$AWK"
23897 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23898 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23899 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23900 ECHO_LD="$ECHO_LD"
23901 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23902 LDCONFIG="$LDCONFIG"
23903 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23904 LIB_NAME="$LIB_NAME"
23905 LIB_PREFIX="$LIB_PREFIX"
23906 LIB_SUBSETS="$LIB_SUBSETS"
23907 LIB_SUFFIX="$LIB_SUFFIX"
23908 LIB_TRACING="$LIB_TRACING"
23909 LN_S="$LN_S"
23910 MAKE_TERMINFO="$MAKE_TERMINFO"
23911 NCURSES_MAJOR="$NCURSES_MAJOR"
23912 NCURSES_MINOR="$NCURSES_MINOR"
23913 NCURSES_OSPEED="$NCURSES_OSPEED"
23914 NCURSES_PATCH="$NCURSES_PATCH"
23915 SRC_SUBDIRS="$SRC_SUBDIRS"
23916 TERMINFO="$TERMINFO"
23917 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23918 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23919 TICS_NAME="$TICS_NAME"
23920 TICS_SUFFIX="$TICS_SUFFIX"
23921 TIC_PATH="$TIC_PATH"
23922 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23923 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23924 TINFO_NAME="$TINFO_NAME"
23925 TINFO_SUFFIX="$TINFO_SUFFIX"
23926 UNALTERED_SYMS="$UNALTERED_SYMS"
23927 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23928 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23929 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23930 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23931 WILDCARD_SYMS="$WILDCARD_SYMS"
23932 WITH_CURSES_H="$with_curses_h"
23933 WITH_ECHO="${enable_echo:=yes}"
23934 WITH_OVERWRITE="$with_overwrite"
23935 cf_LIST_MODELS="$cf_list_models"
23936 cf_cv_abi_version="$cf_cv_abi_version"
23937 cf_cv_do_relink="$cf_cv_do_relink"
23938 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23939 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23940 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23941 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23942 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23943 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23944 cf_cv_rel_version="$cf_cv_rel_version"
23945 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23946 cf_cv_shared_soname='$cf_cv_shared_soname'
23947 cf_cv_shlib_version="$cf_cv_shlib_version"
23948 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23949 cf_cv_system_name="$cf_cv_system_name"
23950 cf_cv_term_driver="$with_term_driver"
23951 cf_with_ada="$cf_with_ada"
23952 cf_with_cxx_binding="$cf_with_cxx_binding"
23953 cf_with_db_install="$cf_with_db_install"
23954 cf_with_manpages="$cf_with_manpages"
23955 cf_with_tests="$cf_with_tests"
23956 host="$host"
23957 target="$target"
23958 with_shared_cxx="$with_shared_cxx"
23959
23960 EOF
23961
23962 cat >>$CONFIG_STATUS <<\EOF
23963 for ac_config_target in $ac_config_targets
23964 do
23965   case "$ac_config_target" in
23966   # Handling of arguments.
23967   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23968   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23969   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23970   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23971   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23972   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23973   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23974   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23975   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23976   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23977   *) { { echo "$as_me:23977: error: invalid argument: $ac_config_target" >&5
23978 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23979    { (exit 1); exit 1; }; };;
23980   esac
23981 done
23982
23983 # If the user did not use the arguments to specify the items to instantiate,
23984 # then the envvar interface is used.  Set only those that are not.
23985 # We use the long form for the default assignment because of an extremely
23986 # bizarre bug on SunOS 4.1.3.
23987 if $ac_need_defaults; then
23988   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23989   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23990   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23991 fi
23992
23993 # Create a temporary directory, and hook for its removal unless debugging.
23994 $debug ||
23995 {
23996   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23997   trap '{ (exit 1); exit 1; }' 1 2 13 15
23998 }
23999
24000 # Create a (secure) tmp directory for tmp files.
24001 : ${TMPDIR=/tmp}
24002 {
24003   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24004   test -n "$tmp" && test -d "$tmp"
24005 }  ||
24006 {
24007   tmp=$TMPDIR/cs$$-$RANDOM
24008   (umask 077 && mkdir $tmp)
24009 } ||
24010 {
24011    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24012    { (exit 1); exit 1; }
24013 }
24014
24015 EOF
24016
24017 cat >>$CONFIG_STATUS <<EOF
24018
24019 #
24020 # CONFIG_FILES section.
24021 #
24022
24023 # No need to generate the scripts if there are no CONFIG_FILES.
24024 # This happens for instance when ./config.status config.h
24025 if test -n "\$CONFIG_FILES"; then
24026   # Protect against being on the right side of a sed subst in config.status.
24027   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24028    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24029 s,@SHELL@,$SHELL,;t t
24030 s,@exec_prefix@,$exec_prefix,;t t
24031 s,@prefix@,$prefix,;t t
24032 s,@program_transform_name@,$program_transform_name,;t t
24033 s,@bindir@,$bindir,;t t
24034 s,@sbindir@,$sbindir,;t t
24035 s,@libexecdir@,$libexecdir,;t t
24036 s,@datarootdir@,$datarootdir,;t t
24037 s,@datadir@,$datadir,;t t
24038 s,@sysconfdir@,$sysconfdir,;t t
24039 s,@sharedstatedir@,$sharedstatedir,;t t
24040 s,@localstatedir@,$localstatedir,;t t
24041 s,@libdir@,$libdir,;t t
24042 s,@includedir@,$includedir,;t t
24043 s,@oldincludedir@,$oldincludedir,;t t
24044 s,@infodir@,$infodir,;t t
24045 s,@mandir@,$mandir,;t t
24046 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24047 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24048 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24049 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24050 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24051 s,@build_alias@,$build_alias,;t t
24052 s,@host_alias@,$host_alias,;t t
24053 s,@target_alias@,$target_alias,;t t
24054 s,@ECHO_C@,$ECHO_C,;t t
24055 s,@ECHO_N@,$ECHO_N,;t t
24056 s,@ECHO_T@,$ECHO_T,;t t
24057 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24058 s,@DEFS@,$DEFS,;t t
24059 s,@LIBS@,$LIBS,;t t
24060 s,@top_builddir@,$top_builddir,;t t
24061 s,@EGREP@,$EGREP,;t t
24062 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
24063 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
24064 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
24065 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24066 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24067 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
24068 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
24069 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
24070 s,@VERSION@,$VERSION,;t t
24071 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
24072 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
24073 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
24074 s,@PACKAGE@,$PACKAGE,;t t
24075 s,@build@,$build,;t t
24076 s,@build_cpu@,$build_cpu,;t t
24077 s,@build_vendor@,$build_vendor,;t t
24078 s,@build_os@,$build_os,;t t
24079 s,@host@,$host,;t t
24080 s,@host_cpu@,$host_cpu,;t t
24081 s,@host_vendor@,$host_vendor,;t t
24082 s,@host_os@,$host_os,;t t
24083 s,@target@,$target,;t t
24084 s,@target_cpu@,$target_cpu,;t t
24085 s,@target_vendor@,$target_vendor,;t t
24086 s,@target_os@,$target_os,;t t
24087 s,@CC@,$CC,;t t
24088 s,@CFLAGS@,$CFLAGS,;t t
24089 s,@LDFLAGS@,$LDFLAGS,;t t
24090 s,@CPPFLAGS@,$CPPFLAGS,;t t
24091 s,@ac_ct_CC@,$ac_ct_CC,;t t
24092 s,@EXEEXT@,$EXEEXT,;t t
24093 s,@OBJEXT@,$OBJEXT,;t t
24094 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24095 s,@CPP@,$CPP,;t t
24096 s,@LDCONFIG@,$LDCONFIG,;t t
24097 s,@CXX@,$CXX,;t t
24098 s,@CXXFLAGS@,$CXXFLAGS,;t t
24099 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
24100 s,@AWK@,$AWK,;t t
24101 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24102 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24103 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24104 s,@LINT@,$LINT,;t t
24105 s,@LINT_OPTS@,$LINT_OPTS,;t t
24106 s,@LN_S@,$LN_S,;t t
24107 s,@cf_config_suffix@,$cf_config_suffix,;t t
24108 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24109 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24110 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
24111 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24112 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24113 s,@SET_MAKE@,$SET_MAKE,;t t
24114 s,@CTAGS@,$CTAGS,;t t
24115 s,@ETAGS@,$ETAGS,;t t
24116 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24117 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24118 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24119 s,@RANLIB@,$RANLIB,;t t
24120 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24121 s,@LD@,$LD,;t t
24122 s,@ac_ct_LD@,$ac_ct_LD,;t t
24123 s,@AR@,$AR,;t t
24124 s,@ac_ct_AR@,$ac_ct_AR,;t t
24125 s,@NM@,$NM,;t t
24126 s,@ac_ct_NM@,$ac_ct_NM,;t t
24127 s,@ARFLAGS@,$ARFLAGS,;t t
24128 s,@DESTDIR@,$DESTDIR,;t t
24129 s,@BUILD_CC@,$BUILD_CC,;t t
24130 s,@BUILD_CPP@,$BUILD_CPP,;t t
24131 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24132 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24133 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24134 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24135 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24136 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24137 s,@cf_list_models@,$cf_list_models,;t t
24138 s,@ABI_VERSION@,$ABI_VERSION,;t t
24139 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24140 s,@LIBTOOL@,$LIBTOOL,;t t
24141 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24142 s,@LT_UNDEF@,$LT_UNDEF,;t t
24143 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24144 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24145 s,@LIB_CREATE@,$LIB_CREATE,;t t
24146 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24147 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24148 s,@LIB_PREP@,$LIB_PREP,;t t
24149 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24150 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24151 s,@LIB_LINK@,$LIB_LINK,;t t
24152 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24153 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24154 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24155 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24156 s,@TICS_NAME@,$TICS_NAME,;t t
24157 s,@TINFO_NAME@,$TINFO_NAME,;t t
24158 s,@LIB_NAME@,$LIB_NAME,;t t
24159 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24160 s,@CC_G_OPT@,$CC_G_OPT,;t t
24161 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24162 s,@LD_MODEL@,$LD_MODEL,;t t
24163 s,@shlibdir@,$shlibdir,;t t
24164 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24165 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24166 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24167 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24168 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24169 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24170 s,@LINK_PROGS@,$LINK_PROGS,;t t
24171 s,@LINK_TESTS@,$LINK_TESTS,;t t
24172 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24173 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24174 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24175 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24176 s,@RPATH_LIST@,$RPATH_LIST,;t t
24177 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24178 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24179 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24180 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24181 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24182 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24183 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24184 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24185 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24186 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24187 s,@XTERM_KBS@,$XTERM_KBS,;t t
24188 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24189 s,@TERMINFO@,$TERMINFO,;t t
24190 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24191 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24192 s,@TERMPATH@,$TERMPATH,;t t
24193 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24194 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24195 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24196 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24197 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24198 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24199 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24200 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24201 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24202 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24203 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24204 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24205 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24206 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24207 s,@RGB_PATH@,$RGB_PATH,;t t
24208 s,@no_x11_rgb@,$no_x11_rgb,;t t
24209 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24210 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24211 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24212 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24213 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24214 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24215 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24216 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24217 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24218 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24219 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24220 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24221 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24222 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24223 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24224 s,@PTHREAD@,$PTHREAD,;t t
24225 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24226 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24227 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24228 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24229 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24230 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24231 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24232 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24233 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24234 s,@ECHO_LT@,$ECHO_LT,;t t
24235 s,@ECHO_LD@,$ECHO_LD,;t t
24236 s,@RULE_CC@,$RULE_CC,;t t
24237 s,@SHOW_CC@,$SHOW_CC,;t t
24238 s,@ECHO_CC@,$ECHO_CC,;t t
24239 s,@ECHO_LINK@,$ECHO_LINK,;t t
24240 s,@ADAFLAGS@,$ADAFLAGS,;t t
24241 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24242 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24243 s,@ADA_TRACE@,$ADA_TRACE,;t t
24244 s,@MATH_LIB@,$MATH_LIB,;t t
24245 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24246 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24247 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24248 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24249 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24250 s,@TEST_LIBS@,$TEST_LIBS,;t t
24251 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24252 s,@CXXCPP@,$CXXCPP,;t t
24253 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24254 s,@CXX_AR@,$CXX_AR,;t t
24255 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24256 s,@CXXLIBS@,$CXXLIBS,;t t
24257 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24258 s,@gnat_exists@,$gnat_exists,;t t
24259 s,@M4_exists@,$M4_exists,;t t
24260 s,@cf_ada_make@,$cf_ada_make,;t t
24261 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24262 s,@cf_compile_generics@,$cf_compile_generics,;t t
24263 s,@cf_generic_objects@,$cf_generic_objects,;t t
24264 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24265 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24266 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24267 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24268 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24269 s,@cf_ada_package@,$cf_ada_package,;t t
24270 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24271 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24272 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24273 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24274 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24275 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24276 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24277 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24278 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24279 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24280 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24281 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24282 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24283 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24284 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24285 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24286 s,@TICS_LIBS@,$TICS_LIBS,;t t
24287 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24288 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24289 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24290 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24291 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24292 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24293 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24294 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24295 s,@includesubdir@,$includesubdir,;t t
24296 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24297 s,@TICS_LIST@,$TICS_LIST,;t t
24298 s,@TINFO_LIST@,$TINFO_LIST,;t t
24299 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24300 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24301 s,@TEST_ARGS@,$TEST_ARGS,;t t
24302 s,@TEST_DEPS@,$TEST_DEPS,;t t
24303 s,@TEST_ARG2@,$TEST_ARG2,;t t
24304 s,@TEST_DEP2@,$TEST_DEP2,;t t
24305 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24306 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24307 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24308 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24309 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24310 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24311 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24312 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24313 s,@cross_compiling@,$cross_compiling,;t t
24314 s,@TIC_PATH@,$TIC_PATH,;t t
24315 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24316 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24317 s,@PANEL_NAME@,$PANEL_NAME,;t t
24318 s,@MENU_NAME@,$MENU_NAME,;t t
24319 s,@FORM_NAME@,$FORM_NAME,;t t
24320 s,@CXX_NAME@,$CXX_NAME,;t t
24321 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24322 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24323 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24324 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24325 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24326 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24327 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24328 CEOF
24329
24330 EOF
24331
24332   cat >>$CONFIG_STATUS <<\EOF
24333   # Split the substitutions into bite-sized pieces for seds with
24334   # small command number limits, like on Digital OSF/1 and HP-UX.
24335   ac_max_sed_lines=48
24336   ac_sed_frag=1 # Number of current file.
24337   ac_beg=1 # First line for current file.
24338   ac_end=$ac_max_sed_lines # Line after last line for current file.
24339   ac_more_lines=:
24340   ac_sed_cmds=
24341   while $ac_more_lines; do
24342     if test $ac_beg -gt 1; then
24343       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24344     else
24345       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24346     fi
24347     if test ! -s $tmp/subs.frag; then
24348       ac_more_lines=false
24349     else
24350       # The purpose of the label and of the branching condition is to
24351       # speed up the sed processing (if there are no `@' at all, there
24352       # is no need to browse any of the substitutions).
24353       # These are the two extra sed commands mentioned above.
24354       (echo ':t
24355   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24356       # It is possible to make a multiline substitution using escaped newlines.
24357       # Ensure that we do not split the substitution between script fragments.
24358       ac_BEG=$ac_end
24359       ac_END=`expr $ac_end + $ac_max_sed_lines`
24360       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24361       if test -s $tmp/subs.next; then
24362         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24363         if test ! -s $tmp/subs.edit; then
24364           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24365           if test ! -s $tmp/subs.edit; then
24366             if test $ac_beg -gt 1; then
24367               ac_end=`expr $ac_end - 1`
24368               continue
24369             fi
24370           fi
24371         fi
24372       fi
24373
24374       if test -z "$ac_sed_cmds"; then
24375         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24376       else
24377         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24378       fi
24379       ac_sed_frag=`expr $ac_sed_frag + 1`
24380       ac_beg=$ac_end
24381       ac_end=`expr $ac_end + $ac_max_sed_lines`
24382     fi
24383   done
24384   if test -z "$ac_sed_cmds"; then
24385     ac_sed_cmds=cat
24386   fi
24387 fi # test -n "$CONFIG_FILES"
24388
24389 EOF
24390 cat >>$CONFIG_STATUS <<\EOF
24391 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24392   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24393   case $ac_file in
24394   - | *:- | *:-:* ) # input from stdin
24395         cat >$tmp/stdin
24396         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24397         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24398   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24399         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24400   * )   ac_file_in=$ac_file.in ;;
24401   esac
24402
24403   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24404   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24405          X"$ac_file" : 'X\(//\)[^/]' \| \
24406          X"$ac_file" : 'X\(//\)$' \| \
24407          X"$ac_file" : 'X\(/\)' \| \
24408          .     : '\(.\)' 2>/dev/null ||
24409 echo X"$ac_file" |
24410     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24411           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24412           /^X\(\/\/\)$/{ s//\1/; q; }
24413           /^X\(\/\).*/{ s//\1/; q; }
24414           s/.*/./; q'`
24415   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24416     { case "$ac_dir" in
24417   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24418   *)                      as_incr_dir=.;;
24419 esac
24420 as_dummy="$ac_dir"
24421 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24422   case $as_mkdir_dir in
24423     # Skip DOS drivespec
24424     ?:) as_incr_dir=$as_mkdir_dir ;;
24425     *)
24426       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24427       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24428     ;;
24429   esac
24430 done; }
24431
24432     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24433     # A "../" for each directory in $ac_dir_suffix.
24434     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24435   else
24436     ac_dir_suffix= ac_dots=
24437   fi
24438
24439   case $srcdir in
24440   .)  ac_srcdir=.
24441       if test -z "$ac_dots"; then
24442          ac_top_srcdir=.
24443       else
24444          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24445       fi ;;
24446   [\\/]* | ?:[\\/]* )
24447       ac_srcdir=$srcdir$ac_dir_suffix;
24448       ac_top_srcdir=$srcdir ;;
24449   *) # Relative path.
24450     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24451     ac_top_srcdir=$ac_dots$srcdir ;;
24452   esac
24453
24454   case $INSTALL in
24455   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24456   *) ac_INSTALL=$ac_dots$INSTALL ;;
24457   esac
24458
24459   if test x"$ac_file" != x-; then
24460     { echo "$as_me:24460: creating $ac_file" >&5
24461 echo "$as_me: creating $ac_file" >&6;}
24462     rm -f "$ac_file"
24463   fi
24464   # Let's still pretend it is `configure' which instantiates (i.e., don't
24465   # use $as_me), people would be surprised to read:
24466   #    /* config.h.  Generated automatically by config.status.  */
24467   configure_input="Generated automatically from `echo $ac_file_in |
24468                                                  sed 's,.*/,,'` by configure."
24469
24470   # First look for the input files in the build tree, otherwise in the
24471   # src tree.
24472   ac_file_inputs=`IFS=:
24473     for f in $ac_file_in; do
24474       case $f in
24475       -) echo $tmp/stdin ;;
24476       [\\/$]*)
24477          # Absolute (can't be DOS-style, as IFS=:)
24478          test -f "$f" || { { echo "$as_me:24478: error: cannot find input file: $f" >&5
24479 echo "$as_me: error: cannot find input file: $f" >&2;}
24480    { (exit 1); exit 1; }; }
24481          echo $f;;
24482       *) # Relative
24483          if test -f "$f"; then
24484            # Build tree
24485            echo $f
24486          elif test -f "$srcdir/$f"; then
24487            # Source tree
24488            echo $srcdir/$f
24489          else
24490            # /dev/null tree
24491            { { echo "$as_me:24491: error: cannot find input file: $f" >&5
24492 echo "$as_me: error: cannot find input file: $f" >&2;}
24493    { (exit 1); exit 1; }; }
24494          fi;;
24495       esac
24496     done` || { (exit 1); exit 1; }
24497 EOF
24498 cat >>$CONFIG_STATUS <<\EOF
24499   ac_warn_datarootdir=no
24500   if test x"$ac_file" != x-; then
24501     for ac_item in $ac_file_inputs
24502     do
24503       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24504       if test -n "$ac_seen"; then
24505         ac_used=`grep '@datarootdir@' $ac_item`
24506         if test -z "$ac_used"; then
24507           { echo "$as_me:24507: WARNING: datarootdir was used implicitly but not set:
24508 $ac_seen" >&5
24509 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24510 $ac_seen" >&2;}
24511           ac_warn_datarootdir=yes
24512         fi
24513       fi
24514       ac_seen=`grep '${datarootdir}' $ac_item`
24515       if test -n "$ac_seen"; then
24516         { echo "$as_me:24516: WARNING: datarootdir was used explicitly but not set:
24517 $ac_seen" >&5
24518 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24519 $ac_seen" >&2;}
24520         ac_warn_datarootdir=yes
24521       fi
24522     done
24523   fi
24524
24525 if test "x$ac_warn_datarootdir" = xyes; then
24526   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24527 fi
24528
24529 EOF
24530 cat >>$CONFIG_STATUS <<EOF
24531   sed "$ac_vpsub
24532 $extrasub
24533 EOF
24534 cat >>$CONFIG_STATUS <<\EOF
24535 :t
24536 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24537 s,@configure_input@,$configure_input,;t t
24538 s,@srcdir@,$ac_srcdir,;t t
24539 s,@top_srcdir@,$ac_top_srcdir,;t t
24540 s,@INSTALL@,$ac_INSTALL,;t t
24541 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24542   rm -f $tmp/stdin
24543   if test x"$ac_file" != x-; then
24544     cp $tmp/out $ac_file
24545
24546     for ac_name in prefix exec_prefix datarootdir
24547     do
24548         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24549         if test -n "$ac_seen"; then
24550             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24551             if test -z "$ac_init"; then
24552               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24553               { echo "$as_me:24553: WARNING: Variable $ac_name is used but was not set:
24554 $ac_seen" >&5
24555 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24556 $ac_seen" >&2;}
24557             fi
24558         fi
24559     done
24560     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24561     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24562     if test -s $tmp/out; then
24563       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24564       { echo "$as_me:24564: WARNING: Some variables may not be substituted:
24565 $ac_seen" >&5
24566 echo "$as_me: WARNING: Some variables may not be substituted:
24567 $ac_seen" >&2;}
24568     fi
24569   else
24570     cat $tmp/out
24571   fi
24572   rm -f $tmp/out
24573
24574 done
24575 EOF
24576 cat >>$CONFIG_STATUS <<\EOF
24577
24578 #
24579 # CONFIG_HEADER section.
24580 #
24581
24582 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24583 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24584 #
24585 # ac_d sets the value in "#define NAME VALUE" lines.
24586 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24587 ac_dB='[        ].*$,\1#\2'
24588 ac_dC=' '
24589 ac_dD=',;t'
24590 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24591 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24592 ac_iB='\([      ]\),\1#\2define\3'
24593 ac_iC=' '
24594 ac_iD='\4,;t'
24595 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24596 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24597 ac_uB='$,\1#\2define\3'
24598 ac_uC=' '
24599 ac_uD=',;t'
24600
24601 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24602   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24603   case $ac_file in
24604   - | *:- | *:-:* ) # input from stdin
24605         cat >$tmp/stdin
24606         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24607         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24608   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24609         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24610   * )   ac_file_in=$ac_file.in ;;
24611   esac
24612
24613   test x"$ac_file" != x- && { echo "$as_me:24613: creating $ac_file" >&5
24614 echo "$as_me: creating $ac_file" >&6;}
24615
24616   # First look for the input files in the build tree, otherwise in the
24617   # src tree.
24618   ac_file_inputs=`IFS=:
24619     for f in $ac_file_in; do
24620       case $f in
24621       -) echo $tmp/stdin ;;
24622       [\\/$]*)
24623          # Absolute (can't be DOS-style, as IFS=:)
24624          test -f "$f" || { { echo "$as_me:24624: error: cannot find input file: $f" >&5
24625 echo "$as_me: error: cannot find input file: $f" >&2;}
24626    { (exit 1); exit 1; }; }
24627          echo $f;;
24628       *) # Relative
24629          if test -f "$f"; then
24630            # Build tree
24631            echo $f
24632          elif test -f "$srcdir/$f"; then
24633            # Source tree
24634            echo $srcdir/$f
24635          else
24636            # /dev/null tree
24637            { { echo "$as_me:24637: error: cannot find input file: $f" >&5
24638 echo "$as_me: error: cannot find input file: $f" >&2;}
24639    { (exit 1); exit 1; }; }
24640          fi;;
24641       esac
24642     done` || { (exit 1); exit 1; }
24643   # Remove the trailing spaces.
24644   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24645
24646 EOF
24647
24648 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24649 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24650 # be either 'cat' or 'sort'.
24651 cat confdefs.h | uniq >conftest.vals
24652
24653 # Break up conftest.vals because some shells have a limit on
24654 # the size of here documents, and old seds have small limits too.
24655
24656 rm -f conftest.tail
24657 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24658 while grep . conftest.vals >/dev/null
24659 do
24660   # Write chunks of a limited-size here document to conftest.frag.
24661   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24662   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24663   echo 'CEOF' >> $CONFIG_STATUS
24664   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24665   rm -f conftest.vals
24666   mv conftest.tail conftest.vals
24667 done
24668 rm -f conftest.vals
24669
24670 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24671 # marker @DEFS@.
24672 echo '  cat >> conftest.edit <<CEOF
24673 /@DEFS@/r conftest.frag
24674 /@DEFS@/d
24675 CEOF
24676 sed -f conftest.edit $tmp/in > $tmp/out
24677 rm -f $tmp/in
24678 mv $tmp/out $tmp/in
24679 rm -f conftest.edit conftest.frag
24680 ' >> $CONFIG_STATUS
24681
24682 cat >>$CONFIG_STATUS <<\EOF
24683   # Let's still pretend it is `configure' which instantiates (i.e., don't
24684   # use $as_me), people would be surprised to read:
24685   #    /* config.h.  Generated automatically by config.status.  */
24686   if test x"$ac_file" = x-; then
24687     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24688   else
24689     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24690   fi
24691   cat $tmp/in >>$tmp/config.h
24692   rm -f $tmp/in
24693   if test x"$ac_file" != x-; then
24694     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24695       { echo "$as_me:24695: $ac_file is unchanged" >&5
24696 echo "$as_me: $ac_file is unchanged" >&6;}
24697     else
24698       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24699          X"$ac_file" : 'X\(//\)[^/]' \| \
24700          X"$ac_file" : 'X\(//\)$' \| \
24701          X"$ac_file" : 'X\(/\)' \| \
24702          .     : '\(.\)' 2>/dev/null ||
24703 echo X"$ac_file" |
24704     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24705           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24706           /^X\(\/\/\)$/{ s//\1/; q; }
24707           /^X\(\/\).*/{ s//\1/; q; }
24708           s/.*/./; q'`
24709       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24710         { case "$ac_dir" in
24711   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24712   *)                      as_incr_dir=.;;
24713 esac
24714 as_dummy="$ac_dir"
24715 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24716   case $as_mkdir_dir in
24717     # Skip DOS drivespec
24718     ?:) as_incr_dir=$as_mkdir_dir ;;
24719     *)
24720       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24721       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24722     ;;
24723   esac
24724 done; }
24725
24726       fi
24727       rm -f $ac_file
24728       mv $tmp/config.h $ac_file
24729     fi
24730   else
24731     cat $tmp/config.h
24732     rm -f $tmp/config.h
24733   fi
24734 done
24735 EOF
24736 cat >>$CONFIG_STATUS <<\EOF
24737 #
24738 # CONFIG_COMMANDS section.
24739 #
24740 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24741   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24742   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24743
24744   case $ac_dest in
24745     default )
24746 if test "x$cf_with_tests" != xno ; then
24747
24748 for cf_dir in test
24749 do
24750         if test ! -d $srcdir/$cf_dir; then
24751                 continue
24752         elif test -f $srcdir/$cf_dir/programs; then
24753                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24754         fi
24755 done
24756
24757 fi
24758
24759 cf_prefix=$LIB_PREFIX
24760
24761 case $cf_cv_shlib_version in
24762 (cygdll|msysdll|mingw)
24763         TINFO_NAME=$TINFO_ARG_SUFFIX
24764         TINFO_SUFFIX=.dll
24765         ;;
24766 esac
24767
24768 if test -n "$TINFO_SUFFIX" ; then
24769         case $TINFO_SUFFIX in
24770         (tw*)
24771                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24772                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24773                 ;;
24774         (t*)
24775                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24776                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24777                 ;;
24778         (w*)
24779                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24780                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24781                 ;;
24782         esac
24783 fi
24784
24785 for cf_dir in $SRC_SUBDIRS
24786 do
24787         if test ! -d $srcdir/$cf_dir ; then
24788                 continue
24789         elif test -f $srcdir/$cf_dir/modules; then
24790
24791                 SHARED_LIB=
24792                 Libs_To_Make=
24793                 cf_awk_program=
24794                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24795                 then
24796                         cf_awk_program="$cf_awk_program\
24797 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24798 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24799 "
24800                 fi
24801
24802                 if test "x$WILDCARD_SYMS" = xno
24803                 then
24804                         cf_awk_program="$cf_awk_program\
24805 /[      ]_\\*;/ { skip=1; next; }\
24806 "
24807                 fi
24808
24809                 if test "x$cf_awk_program" != "x"
24810                 then
24811                         cat >>$cf_dir/Makefile <<CF_EOF
24812
24813 # Generated by CF_LIB_RULES
24814 resulting.map: $UNALTERED_SYMS
24815         $AWK 'BEGIN { skip = 1; last=""; } \
24816 $cf_awk_program \
24817 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24818  skip = 0; last = \$\$0; } \
24819 END { print last; }' < $UNALTERED_SYMS >\$@
24820
24821 distclean::
24822         rm -f resulting.map
24823 CF_EOF
24824                 fi
24825
24826                 for cf_item in $cf_LIST_MODELS
24827                 do
24828
24829         case X$cf_item in
24830         (Xlibtool)
24831                 cf_suffix='.la'
24832                 cf_depsuf=$cf_suffix
24833                 ;;
24834         (Xdebug)
24835                 cf_suffix='_g.a'
24836                 cf_depsuf=$cf_suffix
24837                 ;;
24838         (Xprofile)
24839                 cf_suffix='_p.a'
24840                 cf_depsuf=$cf_suffix
24841                 ;;
24842         (Xshared)
24843                 case $cf_cv_system_name in
24844                 (aix[5-7]*)
24845                         cf_suffix='.so'
24846                         cf_depsuf=$cf_suffix
24847                         ;;
24848                 (cygwin*|msys*|mingw*)
24849                         cf_suffix='.dll'
24850                         cf_depsuf='.dll.a'
24851                         ;;
24852                 (darwin*)
24853                         cf_suffix='.dylib'
24854                         cf_depsuf=$cf_suffix
24855                         ;;
24856                 (hpux*)
24857                         case $target in
24858                         (ia64*)
24859                                 cf_suffix='.so'
24860                                 cf_depsuf=$cf_suffix
24861                                 ;;
24862                         (*)
24863                                 cf_suffix='.sl'
24864                                 cf_depsuf=$cf_suffix
24865                                 ;;
24866                         esac
24867                         ;;
24868                 (*)
24869                         cf_suffix='.so'
24870                         cf_depsuf=$cf_suffix
24871                         ;;
24872                 esac
24873                 ;;
24874         (*)
24875                 cf_suffix='.a'
24876                 cf_depsuf=$cf_suffix
24877                 ;;
24878         esac
24879         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24880         then
24881                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24882                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24883         fi
24884
24885                         cf_libname=$cf_dir
24886                         test "$cf_dir" = c++ && cf_libname=ncurses++
24887                         if test $cf_item = shared ; then
24888                                 if test -n "${LIB_SUFFIX}"
24889                                 then
24890                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24891                                 else
24892                                         cf_shared_suffix="$cf_suffix"
24893                                 fi
24894                                 if test "$cf_cv_do_symlinks" = yes ; then
24895                                         cf_version_name=
24896
24897                                         case "$cf_cv_shlib_version" in
24898                                         (rel)
24899                                                 cf_version_name=REL_VERSION
24900                                                 ;;
24901                                         (abi)
24902                                                 cf_version_name=ABI_VERSION
24903                                                 ;;
24904                                         esac
24905
24906                                         if test -n "$cf_version_name"
24907                                         then
24908                                                 case "$cf_cv_system_name" in
24909                                                 (darwin*)
24910                                                         # "w", etc?
24911                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24912                                                         ;;
24913                                                 (*)
24914                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24915                                                         ;;
24916                                                 esac
24917                                         fi
24918                                         if test -n "${USE_LIB_SUFFIX}"
24919                                         then
24920                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24921                                         else
24922                                                 cf_shared_suffix="$cf_suffix"
24923                                         fi
24924                                 fi
24925                                 # cygwin needs import library, and has unique naming convention
24926                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24927                                 # use 'cyg' prefix for shared lib.
24928                                 case $cf_cv_shlib_version in
24929                                 (cygdll)
24930                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24931                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24932                                         ;;
24933                                 (msysdll)
24934                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24935                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24936                                         ;;
24937                                 (mingw)
24938                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24939                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24940                                         ;;
24941                                 (*)
24942                                         cf_add_lib=
24943                                         ;;
24944                                 esac
24945                                 if test -n "$cf_add_lib"
24946                                 then
24947                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24948                                         continue
24949                                 fi
24950                         fi
24951                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24952                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24953                 done
24954
24955                 if test $cf_dir = ncurses ; then
24956                         cf_subsets="$LIB_SUBSETS"
24957                         cf_r_parts="$cf_subsets"
24958                         cf_liblist="$Libs_To_Make"
24959
24960                         while test -n "$cf_r_parts"
24961                         do
24962                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24963                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24964                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24965                                         cf_add_lib=
24966                                         case $cf_l_parts in
24967                                         (*termlib*)
24968                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24969                                                 ;;
24970                                         (*ticlib*)
24971                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24972                                                 ;;
24973                                         (*)
24974                                                 break
24975                                                 ;;
24976                                         esac
24977                                         if test -n "$cf_add_lib"; then
24978                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24979                                         fi
24980                                 else
24981                                         break
24982                                 fi
24983                         done
24984                 else
24985                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24986                 fi
24987
24988                 if test $cf_dir = c++; then
24989                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24990                                 cf_list=
24991                                 for cf_item in $Libs_To_Make
24992                                 do
24993                                         case $cf_item in
24994                                         (*.a)
24995                                                 ;;
24996                                         (*)
24997                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24998                                                 ;;
24999                                         esac
25000                                         for cf_test in $cf_list
25001                                         do
25002                                                 if test "$cf_test" = "$cf_item"
25003                                                 then
25004                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
25005                                                         cf_item=
25006                                                         break
25007                                                 fi
25008                                         done
25009                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
25010                                 done
25011                                 Libs_To_Make="$cf_list"
25012                         fi
25013                 fi
25014
25015                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
25016                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
25017                         $cf_dir/Makefile >$cf_dir/Makefile.out
25018                 mv $cf_dir/Makefile.out $cf_dir/Makefile
25019
25020                 $AWK -f $srcdir/mk-0th.awk \
25021                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
25022                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25023
25024                 for cf_subset in $cf_subsets
25025                 do
25026                         cf_subdirs=
25027                         for cf_item in $cf_LIST_MODELS
25028                         do
25029
25030                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
25031
25032 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25033
25034                         CXX_MODEL=$cf_ITEM
25035                         if test "$CXX_MODEL" = SHARED; then
25036                                 case $cf_cv_shlib_version in
25037                                 (cygdll|msysdll|mingw)
25038                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
25039
25040 echo "${as_me:-configure}:25040: testing overriding CXX_MODEL to SHARED ..." 1>&5
25041
25042                                         with_shared_cxx=yes
25043                                         ;;
25044                                 (*)
25045                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
25046                                         ;;
25047                                 esac
25048                         fi
25049
25050         case X$cf_item in
25051         (Xlibtool)
25052                 cf_suffix='.la'
25053                 cf_depsuf=$cf_suffix
25054                 ;;
25055         (Xdebug)
25056                 cf_suffix='_g.a'
25057                 cf_depsuf=$cf_suffix
25058                 ;;
25059         (Xprofile)
25060                 cf_suffix='_p.a'
25061                 cf_depsuf=$cf_suffix
25062                 ;;
25063         (Xshared)
25064                 case $cf_cv_system_name in
25065                 (aix[5-7]*)
25066                         cf_suffix='.so'
25067                         cf_depsuf=$cf_suffix
25068                         ;;
25069                 (cygwin*|msys*|mingw*)
25070                         cf_suffix='.dll'
25071                         cf_depsuf='.dll.a'
25072                         ;;
25073                 (darwin*)
25074                         cf_suffix='.dylib'
25075                         cf_depsuf=$cf_suffix
25076                         ;;
25077                 (hpux*)
25078                         case $target in
25079                         (ia64*)
25080                                 cf_suffix='.so'
25081                                 cf_depsuf=$cf_suffix
25082                                 ;;
25083                         (*)
25084                                 cf_suffix='.sl'
25085                                 cf_depsuf=$cf_suffix
25086                                 ;;
25087                         esac
25088                         ;;
25089                 (*)
25090                         cf_suffix='.so'
25091                         cf_depsuf=$cf_suffix
25092                         ;;
25093                 esac
25094                 ;;
25095         (*)
25096                 cf_suffix='.a'
25097                 cf_depsuf=$cf_suffix
25098                 ;;
25099         esac
25100         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25101         then
25102                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25103                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25104         fi
25105
25106         case $cf_item in
25107         (libtool) cf_subdir='obj_lo'  ;;
25108         (normal)  cf_subdir='objects' ;;
25109         (debug)   cf_subdir='obj_g' ;;
25110         (profile) cf_subdir='obj_p' ;;
25111         (shared)
25112                 case $cf_cv_system_name in
25113                 (cygwin|msys)
25114                         cf_subdir='objects' ;;
25115                 (*)
25116                         cf_subdir='obj_s' ;;
25117                 esac
25118         esac
25119
25120                         # Test for case where we build libtinfo with a different name.
25121                         cf_libname=$cf_dir
25122                         if test $cf_dir = ncurses ; then
25123                                 case $cf_subset in
25124                                 (*base*)
25125                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25126                                         ;;
25127                                 (*termlib*)
25128                                         cf_libname=$TINFO_LIB_SUFFIX
25129                                         ;;
25130                                 (ticlib*)
25131                                         cf_libname=$TICS_LIB_SUFFIX
25132                                         ;;
25133                                 esac
25134                         elif test $cf_dir = c++ ; then
25135                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25136                         else
25137                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25138                         fi
25139                         if test -n "${USE_ARG_SUFFIX}" ; then
25140                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25141                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25142                         fi
25143
25144                         # These dependencies really are for development, not
25145                         # builds, but they are useful in porting, too.
25146                         cf_depend="../include/ncurses_cfg.h"
25147                         if test "$srcdir" = "."; then
25148                                 cf_reldir="."
25149                         else
25150                                 cf_reldir="\${srcdir}"
25151                         fi
25152
25153                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25154                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25155                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25156                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25157                         fi
25158
25159                         cf_dir_suffix=
25160                         old_cf_suffix="$cf_suffix"
25161                         if test "$cf_cv_shlib_version_infix" = yes ; then
25162                         if test -n "$USE_LIB_SUFFIX" ; then
25163                                 case $USE_LIB_SUFFIX in
25164                                 (tw*)
25165                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25166                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25167                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25168                                         ;;
25169                                 (t*)
25170                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25171                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25172                                         cf_dir_suffix=t$EXTRA_SUFFIX
25173                                         ;;
25174                                 (w*)
25175                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25176                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25177                                         cf_dir_suffix=w$EXTRA_SUFFIX
25178                                         ;;
25179                                 (*)
25180                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25181                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25182                                         cf_dir_suffix=$EXTRA_SUFFIX
25183                                         ;;
25184                                 esac
25185                         fi
25186                         fi
25187
25188                         $AWK -f $srcdir/mk-1st.awk \
25189                                 name=${cf_libname}${cf_dir_suffix} \
25190                                 traces=$LIB_TRACING \
25191                                 MODEL=$cf_ITEM \
25192                                 CXX_MODEL=$CXX_MODEL \
25193                                 model=$cf_subdir \
25194                                 prefix=$cf_prefix \
25195                                 suffix=$cf_suffix \
25196                                 subset=$cf_subset \
25197                                 driver=$cf_cv_term_driver \
25198                                 SymLink="$LN_S" \
25199                                 TermlibRoot=$TINFO_NAME \
25200                                 TermlibSuffix=$TINFO_SUFFIX \
25201                                 ShlibVer=$cf_cv_shlib_version \
25202                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25203                                 ReLink=${cf_cv_do_relink:-no} \
25204                                 DoLinks=$cf_cv_do_symlinks \
25205                                 rmSoLocs=$cf_cv_rm_so_locs \
25206                                 ldconfig="$LDCONFIG" \
25207                                 overwrite=$WITH_OVERWRITE \
25208                                 depend="$cf_depend" \
25209                                 host="$host" \
25210                                 libtool_version="$LIBTOOL_VERSION" \
25211                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25212
25213                         cf_suffix="$old_cf_suffix"
25214
25215                         for cf_subdir2 in $cf_subdirs lib
25216                         do
25217                                 test $cf_subdir = $cf_subdir2 && break
25218                         done
25219                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25220                         $AWK -f $srcdir/mk-2nd.awk \
25221                                 name=$cf_dir \
25222                                 traces=$LIB_TRACING \
25223                                 MODEL=$cf_ITEM \
25224                                 model=$cf_subdir \
25225                                 subset=$cf_subset \
25226                                 srcdir=$srcdir \
25227                                 echo=$WITH_ECHO \
25228                                 crenames=$cf_cv_prog_CC_c_o \
25229                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25230                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25231                         cf_subdirs="$cf_subdirs $cf_subdir"
25232                         done
25233                 done
25234         fi
25235
25236         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25237 done
25238
25239 for cf_dir in $SRC_SUBDIRS
25240 do
25241         if test ! -d $srcdir/$cf_dir ; then
25242                 continue
25243         fi
25244
25245         if test -f $cf_dir/Makefile ; then
25246                 case "$cf_dir" in
25247                 (Ada95)
25248                         echo 'libs \' >> Makefile
25249                         echo 'install.libs \' >> Makefile
25250                         echo 'uninstall.libs ::' >> Makefile
25251                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25252                         ;;
25253                 esac
25254         fi
25255
25256         if test -f $srcdir/$cf_dir/modules; then
25257                 echo >> Makefile
25258                 if test -f $srcdir/$cf_dir/headers; then
25259 cat >> Makefile <<CF_EOF
25260 install.includes \\
25261 uninstall.includes \\
25262 CF_EOF
25263                 fi
25264 if test "$cf_dir" != "c++" ; then
25265 echo 'lint \' >> Makefile
25266 fi
25267 cat >> Makefile <<CF_EOF
25268 libs \\
25269 lintlib \\
25270 install.libs \\
25271 uninstall.libs \\
25272 install.$cf_dir \\
25273 uninstall.$cf_dir ::
25274         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25275 CF_EOF
25276         elif test -f $srcdir/$cf_dir/headers; then
25277 cat >> Makefile <<CF_EOF
25278
25279 libs \\
25280 install.libs \\
25281 uninstall.libs \\
25282 install.includes \\
25283 uninstall.includes ::
25284         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25285 CF_EOF
25286 fi
25287 done
25288
25289 if test "x$cf_with_db_install" = xyes; then
25290 cat >> Makefile <<CF_EOF
25291
25292 install.libs uninstall.libs \\
25293 install.data uninstall.data ::
25294 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25295 CF_EOF
25296 else
25297 cat >> Makefile <<CF_EOF
25298
25299 install.libs uninstall.libs ::
25300         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25301 CF_EOF
25302 fi
25303
25304 if test "x$cf_with_manpages" = xyes; then
25305 cat >> Makefile <<CF_EOF
25306
25307 install.man \\
25308 uninstall.man ::
25309         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25310 CF_EOF
25311 fi
25312
25313 cat >> Makefile <<CF_EOF
25314
25315 distclean ::
25316         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25317         rm -f headers.sh headers.sed mk_shared_lib.sh
25318         rm -f edit_man.* man_alias.*
25319         rm -rf \${DIRS_TO_MAKE}
25320 CF_EOF
25321
25322 # Special case: tack's manpage lives in its own directory.
25323 if test "x$cf_with_manpages" = xyes; then
25324 if test "x$cf_with_tack" = "xyes"; then
25325 cat >> Makefile <<CF_EOF
25326
25327 install.man \\
25328 uninstall.man ::
25329         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25330 CF_EOF
25331 fi
25332 fi
25333
25334 rm -f headers.sed headers.sh
25335
25336 echo creating headers.sh
25337 cat >headers.sh <<CF_EOF
25338 #! $SHELL
25339 # This shell script is generated by the 'configure' script.  It is invoked in a
25340 # subdirectory of the build tree.  It generates a sed-script in the parent
25341 # directory that is used to adjust includes for header files that reside in a
25342 # subdirectory of /usr/include, etc.
25343 PRG=""
25344 while test \$# != 3
25345 do
25346 PRG="\$PRG \$1"; shift
25347 done
25348 DST=\$1
25349 REF=\$2
25350 SRC=\$3
25351 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25352 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25353 echo installing \$SRC in \$DST
25354 CF_EOF
25355
25356 if test $WITH_CURSES_H = yes; then
25357         cat >>headers.sh <<CF_EOF
25358 case \$DST in
25359 (/*/include/*)
25360         END=\`basename \$DST\`
25361         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25362         do
25363                 NAME=\`basename \$i\`
25364                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25365         done
25366         ;;
25367 (*)
25368         echo "" >> \$TMPSED
25369         ;;
25370 esac
25371 CF_EOF
25372
25373 else
25374         cat >>headers.sh <<CF_EOF
25375 case \$DST in
25376 (/*/include/*)
25377         END=\`basename \$DST\`
25378         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25379         do
25380                 NAME=\`basename \$i\`
25381                 if test "\$NAME" = "curses.h"
25382                 then
25383                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25384                         NAME=ncurses.h
25385                 fi
25386                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25387         done
25388         ;;
25389 (*)
25390         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25391         ;;
25392 esac
25393 CF_EOF
25394 fi
25395 cat >>headers.sh <<CF_EOF
25396 rm -f \$TMPSRC
25397 sed -f \$TMPSED \$SRC > \$TMPSRC
25398 NAME=\`basename \$SRC\`
25399 CF_EOF
25400 if test $WITH_CURSES_H != yes; then
25401         cat >>headers.sh <<CF_EOF
25402 test "\$NAME" = "curses.h" && NAME=ncurses.h
25403 CF_EOF
25404 fi
25405 cat >>headers.sh <<CF_EOF
25406 # Just in case someone gzip'd manpages, remove the conflicting copy.
25407 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25408
25409 eval \$PRG \$TMPSRC \$DST/\$NAME
25410 rm -f \$TMPSRC \$TMPSED
25411 CF_EOF
25412
25413 chmod 0755 headers.sh
25414
25415 for cf_dir in $SRC_SUBDIRS
25416 do
25417         if test ! -d $srcdir/$cf_dir ; then
25418                 continue
25419         fi
25420
25421         if test -f $srcdir/$cf_dir/headers; then
25422                 $AWK -f $srcdir/mk-hdr.awk \
25423                         subset="$LIB_SUBSETS" \
25424                         compat="$WITH_CURSES_H" \
25425                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25426         fi
25427
25428         if test -f $srcdir/$cf_dir/modules; then
25429                 if test "$cf_dir" != "c++" ; then
25430                         cat >>$cf_dir/Makefile <<"CF_EOF"
25431 depend : ${AUTO_SRC}
25432         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25433
25434 # DO NOT DELETE THIS LINE -- make depend depends on it.
25435 CF_EOF
25436                 fi
25437         fi
25438 done
25439
25440 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25441 if test -z "$USE_OLD_MAKERULES" ; then
25442         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25443 fi
25444 fi
25445  ;;
25446   esac
25447 done
25448 EOF
25449
25450 cat >>$CONFIG_STATUS <<\EOF
25451
25452 { (exit 0); exit 0; }
25453 EOF
25454 chmod +x $CONFIG_STATUS
25455 ac_clean_files=$ac_clean_files_save
25456
25457 # configure is writing to config.log, and then calls config.status.
25458 # config.status does its own redirection, appending to config.log.
25459 # Unfortunately, on DOS this fails, as config.log is still kept open
25460 # by configure, so config.status won't be able to write to it; its
25461 # output is simply discarded.  So we exec the FD to /dev/null,
25462 # effectively closing config.log, so it can be properly (re)opened and
25463 # appended to by config.status.  When coming back to configure, we
25464 # need to make the FD available again.
25465 if test "$no_create" != yes; then
25466   ac_cs_success=:
25467   exec 5>/dev/null
25468   $SHELL $CONFIG_STATUS || ac_cs_success=false
25469   exec 5>>config.log
25470   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25471   # would make configure fail if this is the last instruction.
25472   $ac_cs_success || { (exit 1); exit 1; }
25473 fi
25474 ${MAKE:-make} preinstall