]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20180512
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.656 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tack          suppress build/install with tack program
713   --without-tests         suppress build/install with test-programs
714   --without-curses-h      install curses.h as ncurses.h only
715   --with-config-suffix=X  suffixes ncursesXX-config file
716   --with-pkg-config{=path} enable/disable use of pkg-config
717   --with-pkg-config-libdir=XXX use given directory for installing pc-files
718   --enable-pc-files       generate and install .pc files for pkg-config
719   --with-pc-suffix        suffixes pc-files
720   --enable-mixed-case     tic should assume mixed-case filenames
721   --with-install-prefix   prefixes actual install-location ($DESTDIR)
722 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
723   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
724   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
725   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
726   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
727   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
728   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
729 Options to Specify the Libraries Built/Used:
730   --disable-libtool-version  enable to use libtool's incompatible naming scheme
731   --with-libtool          generate libraries with libtool
732   --with-shared           generate shared-libraries
733   --with-normal           generate normal-libraries (default)
734   --with-debug            generate debug-libraries (default)
735   --with-profile          generate profile-libraries
736   --with-cxx-shared       generate C++ shared-libraries
737   --with-lib-prefix       override library-prefix
738   --with-termlib          generate separate terminfo library
739   --with-ticlib           generate separate tic library
740   --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   --enable-signed-char    compile using signed Boolean's in term.h
787   --with-tparm-arg=TYPE   override parameter type of tparm
788   --with-rcs-ids          compile-in RCS identifiers
789 Options to Specify How Manpages are Installed:
790   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
791                           optionally formatted/catonly, e.g., gzip,formatted
792   --with-manpage-renames  specify manpage-renaming
793   --with-manpage-aliases  specify manpage-aliases using .so
794   --with-manpage-symlinks specify manpage-aliases using symlinks
795   --with-manpage-tbl      specify manpage processing with tbl
796 Extensions:
797   --disable-ext-funcs     disable function-extensions
798   --enable-sp-funcs       enable SCREEN-extensions
799   --enable-term-driver    enable terminal-driver
800   --enable-const          compile with extra/non-standard const
801   --enable-ext-colors     compile for 256-color support
802   --enable-ext-mouse      compile for extended mouse-encoding
803   --enable-ext-putwin     compile with extended putwin/screendump
804   --enable-no-padding     compile with $NCURSES_NO_PADDING code
805   --enable-sigwinch       compile with SIGWINCH handler
806   --enable-tcap-names     compile with user-definable terminal capabilities
807 Reentrant Code:
808   --with-pthread          use POSIX thread library
809   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
810   --enable-weak-symbols   enable weak-symbols for pthreads
811   --enable-reentrant      compile with reentrant code
812   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
813   --enable-opaque-form    make form-library structures "opaque"
814   --enable-opaque-menu    make menu-library structures "opaque"
815   --enable-opaque-panel   make panel-library structures "opaque"
816   --with-wrap-prefix=XXX  override prefix used for public variables
817 Development Code:
818   --without-develop       disable development options
819   --enable-hard-tabs      compile with hard-tabs code
820   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
821 Experimental Code:
822   --disable-assumed-color do not assume anything about default-colors
823   --disable-hashmap       compile without hashmap scrolling-optimization
824   --enable-colorfgbg      compile-in experimental $COLORFGBG code
825   --enable-interop        compile-in interop bindings
826   --enable-safe-sprintf   compile with experimental safe-sprintf code
827   --disable-scroll-hints  compile without scroll-hints code
828   --enable-wgetch-events  compile with wgetch-events code
829 Testing/development Options:
830   --disable-echo          do not display "compiling" commands
831   --disable-stripping     do not strip installed executables
832   --enable-warnings       build: turn on GCC compiler warnings
833   --enable-string-hacks   work around bogus compiler/loader warnings
834   --enable-assertions     test: turn on generation of assertion code
835   --with-dmalloc          test: use Gray Watson's dmalloc library
836   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
837   --with-valgrind         test: use valgrind
838   --disable-leaks         test: free permanent memory, analyze leaks
839   --enable-expanded       test: generate functions for certain macros
840   --disable-macros        test: use functions rather than macros
841   --with-trace            test: add trace() function to all models of ncurses
842   --disable-gnat-projects test: disable GNAT projects even if usable
843 Ada95 Binding Options:
844   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
845   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
846   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
847   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
848
849 Some influential environment variables:
850   CC          C compiler command
851   CFLAGS      C compiler flags
852   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
853               nonstandard directory <lib dir>
854   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
855               headers in a nonstandard directory <include dir>
856   CPP         C preprocessor
857   CXX         C++ compiler command
858   CXXFLAGS    C++ compiler flags
859   CXXCPP      C++ preprocessor
860
861 Use these variables to override the choices made by `configure' or to help
862 it to find libraries and programs with nonstandard names/locations.
863
864 EOF
865 fi
866
867 if test "$ac_init_help" = "recursive"; then
868   # If there are subdirs, report their specific --help.
869   ac_popdir=`pwd`
870   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
871     cd $ac_subdir
872     # A "../" for each directory in /$ac_subdir.
873     ac_dots=`echo $ac_subdir |
874              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
875
876     case $srcdir in
877     .) # No --srcdir option.  We are building in place.
878       ac_sub_srcdir=$srcdir ;;
879     [\\/]* | ?:[\\/]* ) # Absolute path.
880       ac_sub_srcdir=$srcdir/$ac_subdir ;;
881     *) # Relative path.
882       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
883     esac
884
885     # Check for guested configure; otherwise get Cygnus style configure.
886     if test -f $ac_sub_srcdir/configure.gnu; then
887       echo
888       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
889     elif test -f $ac_sub_srcdir/configure; then
890       echo
891       $SHELL $ac_sub_srcdir/configure  --help=recursive
892     elif test -f $ac_sub_srcdir/configure.ac ||
893            test -f $ac_sub_srcdir/configure.in; then
894       echo
895       $ac_configure --help
896     else
897       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
898     fi
899     cd $ac_popdir
900   done
901 fi
902
903 test -n "$ac_init_help" && exit 0
904 if $ac_init_version; then
905   cat <<\EOF
906
907 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
908 Free Software Foundation, Inc.
909 This configure script is free software; the Free Software Foundation
910 gives unlimited permission to copy, distribute and modify it.
911 EOF
912   exit 0
913 fi
914 exec 5>config.log
915 cat >&5 <<EOF
916 This file contains any messages produced by compilers while
917 running configure, to aid debugging if configure makes a mistake.
918
919 It was created by $as_me, which was
920 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
921
922   $ $0 $@
923
924 EOF
925 {
926 cat <<_ASUNAME
927 ## ---------- ##
928 ## Platform.  ##
929 ## ---------- ##
930
931 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
932 uname -m = `(uname -m) 2>/dev/null || echo unknown`
933 uname -r = `(uname -r) 2>/dev/null || echo unknown`
934 uname -s = `(uname -s) 2>/dev/null || echo unknown`
935 uname -v = `(uname -v) 2>/dev/null || echo unknown`
936
937 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
938 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
939
940 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
941 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
942 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
943 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
944 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
945 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
946 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
947
948 PATH = $PATH
949
950 _ASUNAME
951 } >&5
952
953 cat >&5 <<EOF
954 ## ------------ ##
955 ## Core tests.  ##
956 ## ------------ ##
957
958 EOF
959
960 # Keep a trace of the command line.
961 # Strip out --no-create and --no-recursion so they do not pile up.
962 # Also quote any args containing shell meta-characters.
963 ac_configure_args=
964 ac_sep=
965 for ac_arg
966 do
967   case $ac_arg in
968   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
969   | --no-cr | --no-c) ;;
970   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
971   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
972   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
973     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
974     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
975     ac_sep=" " ;;
976   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
977      ac_sep=" " ;;
978   esac
979   # Get rid of the leading space.
980 done
981
982 # When interrupted or exit'd, cleanup temporary files, and complete
983 # config.log.  We remove comments because anyway the quotes in there
984 # would cause problems or look ugly.
985 trap 'exit_status=$?
986   # Save into config.log some information that might help in debugging.
987   echo >&5
988   echo "## ----------------- ##" >&5
989   echo "## Cache variables.  ##" >&5
990   echo "## ----------------- ##" >&5
991   echo >&5
992   # The following way of writing the cache mishandles newlines in values,
993 {
994   (set) 2>&1 |
995     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
996     *ac_space=\ *)
997       sed -n \
998         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
999           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1000       ;;
1001     *)
1002       sed -n \
1003         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1004       ;;
1005     esac;
1006 } >&5
1007   sed "/^$/d" confdefs.h >conftest.log
1008   if test -s conftest.log; then
1009     echo >&5
1010     echo "## ------------ ##" >&5
1011     echo "## confdefs.h.  ##" >&5
1012     echo "## ------------ ##" >&5
1013     echo >&5
1014     cat conftest.log >&5
1015   fi
1016   (echo; echo) >&5
1017   test "$ac_signal" != 0 &&
1018     echo "$as_me: caught signal $ac_signal" >&5
1019   echo "$as_me: exit $exit_status" >&5
1020   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1021     exit $exit_status
1022      ' 0
1023 for ac_signal in 1 2 13 15; do
1024   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1025 done
1026 ac_signal=0
1027
1028 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1029 rm -rf conftest* confdefs.h
1030 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1031 echo >confdefs.h
1032
1033 # Let the site file select an alternate cache file if it wants to.
1034 # Prefer explicitly selected file to automatically selected ones.
1035 if test -z "$CONFIG_SITE"; then
1036   if test "x$prefix" != xNONE; then
1037     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1038   else
1039     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1040   fi
1041 fi
1042 for ac_site_file in $CONFIG_SITE; do
1043   if test -r "$ac_site_file"; then
1044     { echo "$as_me:1044: loading site script $ac_site_file" >&5
1045 echo "$as_me: loading site script $ac_site_file" >&6;}
1046     cat "$ac_site_file" >&5
1047     . "$ac_site_file"
1048   fi
1049 done
1050
1051 if test -r "$cache_file"; then
1052   # Some versions of bash will fail to source /dev/null (special
1053   # files actually), so we avoid doing that.
1054   if test -f "$cache_file"; then
1055     { echo "$as_me:1055: loading cache $cache_file" >&5
1056 echo "$as_me: loading cache $cache_file" >&6;}
1057     case $cache_file in
1058       [\\/]* | ?:[\\/]* ) . $cache_file;;
1059       *)                      . ./$cache_file;;
1060     esac
1061   fi
1062 else
1063   { echo "$as_me:1063: creating cache $cache_file" >&5
1064 echo "$as_me: creating cache $cache_file" >&6;}
1065   >$cache_file
1066 fi
1067
1068 # Check that the precious variables saved in the cache have kept the same
1069 # value.
1070 ac_cache_corrupted=false
1071 for ac_var in `(set) 2>&1 |
1072                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1073   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1074   eval ac_new_set=\$ac_env_${ac_var}_set
1075   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1076   eval ac_new_val="\$ac_env_${ac_var}_value"
1077   case $ac_old_set,$ac_new_set in
1078     set,)
1079       { echo "$as_me:1079: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1080 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1081       ac_cache_corrupted=: ;;
1082     ,set)
1083       { echo "$as_me:1083: error: \`$ac_var' was not set in the previous run" >&5
1084 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1085       ac_cache_corrupted=: ;;
1086     ,);;
1087     *)
1088       if test "x$ac_old_val" != "x$ac_new_val"; then
1089         { echo "$as_me:1089: error: \`$ac_var' has changed since the previous run:" >&5
1090 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1091         { echo "$as_me:1091:   former value:  $ac_old_val" >&5
1092 echo "$as_me:   former value:  $ac_old_val" >&2;}
1093         { echo "$as_me:1093:   current value: $ac_new_val" >&5
1094 echo "$as_me:   current value: $ac_new_val" >&2;}
1095         ac_cache_corrupted=:
1096       fi;;
1097   esac
1098   # Pass precious variables to config.status.  It doesn't matter if
1099   # we pass some twice (in addition to the command line arguments).
1100   if test "$ac_new_set" = set; then
1101     case $ac_new_val in
1102     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1103       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1104       ac_configure_args="$ac_configure_args '$ac_arg'"
1105       ;;
1106     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1107        ;;
1108     esac
1109   fi
1110 done
1111 if $ac_cache_corrupted; then
1112   { echo "$as_me:1112: error: changes in the environment can compromise the build" >&5
1113 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1114   { { echo "$as_me:1114: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1115 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1116    { (exit 1); exit 1; }; }
1117 fi
1118
1119 ac_ext=c
1120 ac_cpp='$CPP $CPPFLAGS'
1121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1124 ac_main_return=return
1125
1126 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1127   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1128                    ECHO_T='     ' ;;
1129   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1130   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1131 esac
1132 echo "#! $SHELL" >conftest.sh
1133 echo  "exit 0"   >>conftest.sh
1134 chmod +x conftest.sh
1135 if { (echo "$as_me:1135: PATH=\".;.\"; conftest.sh") >&5
1136   (PATH=".;."; conftest.sh) 2>&5
1137   ac_status=$?
1138   echo "$as_me:1138: \$? = $ac_status" >&5
1139   (exit $ac_status); }; then
1140   ac_path_separator=';'
1141 else
1142   ac_path_separator=:
1143 fi
1144 PATH_SEPARATOR="$ac_path_separator"
1145 rm -f conftest.sh
1146
1147 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1148
1149 top_builddir=`pwd`
1150
1151 echo "$as_me:1151: checking for egrep" >&5
1152 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1153 if test "${ac_cv_prog_egrep+set}" = set; then
1154   echo $ECHO_N "(cached) $ECHO_C" >&6
1155 else
1156   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1157                 then ac_cv_prog_egrep='grep -E'
1158                 else ac_cv_prog_egrep='egrep'
1159         fi
1160 fi
1161 echo "$as_me:1161: result: $ac_cv_prog_egrep" >&5
1162 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1163         EGREP=$ac_cv_prog_egrep
1164
1165         test -z "$EGREP" && { { echo "$as_me:1165: error: No egrep program found" >&5
1166 echo "$as_me: error: No egrep program found" >&2;}
1167    { (exit 1); exit 1; }; }
1168
1169 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1170 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1171 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1172 cf_cv_abi_version=${NCURSES_MAJOR}
1173 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1174 cf_cv_timestamp=`date`
1175 echo "$as_me:1175: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1176 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1177
1178 if test -f $srcdir/VERSION ; then
1179         echo "$as_me:1179: checking for package version" >&5
1180 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1181
1182         # if there are not enough fields, cut returns the last one...
1183         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1184         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1185         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1186
1187         # this is how CF_BUNDLED_INTL uses $VERSION:
1188         VERSION="$cf_field1"
1189
1190         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1191         test -z "$VERSION_MAJOR" && { { echo "$as_me:1191: error: missing major-version" >&5
1192 echo "$as_me: error: missing major-version" >&2;}
1193    { (exit 1); exit 1; }; }
1194
1195         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1196         test -z "$VERSION_MINOR" && { { echo "$as_me:1196: error: missing minor-version" >&5
1197 echo "$as_me: error: missing minor-version" >&2;}
1198    { (exit 1); exit 1; }; }
1199
1200         echo "$as_me:1200: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1201 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1202
1203         echo "$as_me:1203: checking for package patch date" >&5
1204 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1205         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1206         case .$VERSION_PATCH in
1207         (.)
1208                 { { echo "$as_me:1208: error: missing patch-date $VERSION_PATCH" >&5
1209 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1210    { (exit 1); exit 1; }; }
1211                 ;;
1212         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1213                 ;;
1214         (*)
1215                 { { echo "$as_me:1215: error: illegal patch-date $VERSION_PATCH" >&5
1216 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1217    { (exit 1); exit 1; }; }
1218                 ;;
1219         esac
1220         echo "$as_me:1220: result: $VERSION_PATCH" >&5
1221 echo "${ECHO_T}$VERSION_PATCH" >&6
1222 else
1223         { { echo "$as_me:1223: error: did not find $srcdir/VERSION" >&5
1224 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1225    { (exit 1); exit 1; }; }
1226 fi
1227
1228 # show the actual data that we have for versions:
1229 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing ABI VERSION $VERSION ..." 1>&5
1232
1233 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1234
1235 echo "${as_me:-configure}:1235: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1236
1237 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1238
1239 echo "${as_me:-configure}:1239: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1240
1241 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1242
1243 echo "${as_me:-configure}:1243: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1244
1245         cf_PACKAGE=NCURSES
1246         PACKAGE=ncurses
1247
1248 cat >>confdefs.h <<EOF
1249 #define PACKAGE "$PACKAGE"
1250 EOF
1251
1252 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1253
1254         cat >>confdefs.h <<EOF
1255 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1256 EOF
1257
1258         cat >>confdefs.h <<EOF
1259 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1260 EOF
1261
1262 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1263
1264 # Check whether --with-rel-version or --without-rel-version was given.
1265 if test "${with_rel_version+set}" = set; then
1266   withval="$with_rel_version"
1267   { echo "$as_me:1267: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1268 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1269  cf_cv_rel_version=$withval
1270 fi;
1271
1272  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1273  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1274
1275 if test -n "$NCURSES_MAJOR" ; then
1276   case $NCURSES_MAJOR in
1277   ([0-9]*)
1278         ;;
1279   (*)
1280         { { echo "$as_me:1280: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1281 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1282    { (exit 1); exit 1; }; }
1283         ;;
1284   esac
1285 else
1286   { { echo "$as_me:1286: error: Release major-version value is empty" >&5
1287 echo "$as_me: error: Release major-version value is empty" >&2;}
1288    { (exit 1); exit 1; }; }
1289 fi
1290
1291 if test -n "$NCURSES_MINOR" ; then
1292   case $NCURSES_MINOR in
1293   ([0-9]*)
1294         ;;
1295   (*)
1296         { { echo "$as_me:1296: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1297 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1298    { (exit 1); exit 1; }; }
1299         ;;
1300   esac
1301 else
1302   { { echo "$as_me:1302: error: Release minor-version value is empty" >&5
1303 echo "$as_me: error: Release minor-version value is empty" >&2;}
1304    { (exit 1); exit 1; }; }
1305 fi
1306
1307 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1308
1309 # Check whether --with-abi-version or --without-abi-version was given.
1310 if test "${with_abi_version+set}" = set; then
1311   withval="$with_abi_version"
1312
1313         if test "x$cf_cv_abi_version" != "x$withval"
1314         then
1315                 { echo "$as_me:1315: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1316 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1317                 case $cf_cv_rel_version in
1318                 (5.*)
1319                         cf_cv_rel_version=$withval.0
1320                         ;;
1321                 (6.*)
1322                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1323                         ;;
1324                 esac
1325         fi
1326         cf_cv_abi_version=$withval
1327 fi;
1328
1329 if test -n "$cf_cv_abi_version" ; then
1330   case $cf_cv_abi_version in
1331   ([0-9]*)
1332         ;;
1333   (*)
1334         { { echo "$as_me:1334: error: ABI version is not a number: $cf_cv_abi_version" >&5
1335 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1336    { (exit 1); exit 1; }; }
1337         ;;
1338   esac
1339 else
1340   { { echo "$as_me:1340: error: ABI version value is empty" >&5
1341 echo "$as_me: error: ABI version value is empty" >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344
1345 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1346 then
1347         case $cf_cv_rel_version in
1348         (5.*)
1349                 cf_cv_rel_version=$with_abi_version.0
1350                 ;;
1351         esac
1352 fi
1353
1354 ac_aux_dir=
1355 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1356   if test -f $ac_dir/install-sh; then
1357     ac_aux_dir=$ac_dir
1358     ac_install_sh="$ac_aux_dir/install-sh -c"
1359     break
1360   elif test -f $ac_dir/install.sh; then
1361     ac_aux_dir=$ac_dir
1362     ac_install_sh="$ac_aux_dir/install.sh -c"
1363     break
1364   elif test -f $ac_dir/shtool; then
1365     ac_aux_dir=$ac_dir
1366     ac_install_sh="$ac_aux_dir/shtool install -c"
1367     break
1368   fi
1369 done
1370 if test -z "$ac_aux_dir"; then
1371   { { echo "$as_me:1371: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1372 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1373    { (exit 1); exit 1; }; }
1374 fi
1375 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1376 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1377 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1378
1379 # Make sure we can run config.sub.
1380 $ac_config_sub sun4 >/dev/null 2>&1 ||
1381   { { echo "$as_me:1381: error: cannot run $ac_config_sub" >&5
1382 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1383    { (exit 1); exit 1; }; }
1384
1385 echo "$as_me:1385: checking build system type" >&5
1386 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1387 if test "${ac_cv_build+set}" = set; then
1388   echo $ECHO_N "(cached) $ECHO_C" >&6
1389 else
1390   ac_cv_build_alias=$build_alias
1391 test -z "$ac_cv_build_alias" &&
1392   ac_cv_build_alias=`$ac_config_guess`
1393 test -z "$ac_cv_build_alias" &&
1394   { { echo "$as_me:1394: error: cannot guess build type; you must specify one" >&5
1395 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1396    { (exit 1); exit 1; }; }
1397 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1398   { { echo "$as_me:1398: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1399 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1400    { (exit 1); exit 1; }; }
1401
1402 fi
1403 echo "$as_me:1403: result: $ac_cv_build" >&5
1404 echo "${ECHO_T}$ac_cv_build" >&6
1405 build=$ac_cv_build
1406 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1407 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1408 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1409
1410 echo "$as_me:1410: checking host system type" >&5
1411 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1412 if test "${ac_cv_host+set}" = set; then
1413   echo $ECHO_N "(cached) $ECHO_C" >&6
1414 else
1415   ac_cv_host_alias=$host_alias
1416 test -z "$ac_cv_host_alias" &&
1417   ac_cv_host_alias=$ac_cv_build_alias
1418 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1419   { { echo "$as_me:1419: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:1424: result: $ac_cv_host" >&5
1425 echo "${ECHO_T}$ac_cv_host" >&6
1426 host=$ac_cv_host
1427 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1432         echo "$as_me:1432: checking target system type" >&5
1433 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1434 if test "${ac_cv_target+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_target_alias=$target_alias
1438 test "x$ac_cv_target_alias" = "x" &&
1439   ac_cv_target_alias=$ac_cv_host_alias
1440 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1441   { { echo "$as_me:1441: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:1446: result: $ac_cv_target" >&5
1447 echo "${ECHO_T}$ac_cv_target" >&6
1448 target=$ac_cv_target
1449 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453 # The aliases save the names the user supplied, while $host etc.
1454 # will get canonicalized.
1455 test -n "$target_alias" &&
1456   test "$program_prefix$program_suffix$program_transform_name" = \
1457     NONENONEs,x,x, &&
1458   program_prefix=${target_alias}-
1459         system_name="$host_os"
1460 else
1461         system_name="`(uname -s -r) 2>/dev/null`"
1462         if test -z "$system_name" ; then
1463                 system_name="`(hostname) 2>/dev/null`"
1464         fi
1465 fi
1466 test -n "$system_name" &&
1467 cat >>confdefs.h <<EOF
1468 #define SYSTEM_NAME "$system_name"
1469 EOF
1470
1471 if test "${cf_cv_system_name+set}" = set; then
1472   echo $ECHO_N "(cached) $ECHO_C" >&6
1473 else
1474   cf_cv_system_name="$system_name"
1475 fi
1476
1477 test -z "$system_name" && system_name="$cf_cv_system_name"
1478 test -n "$cf_cv_system_name" && echo "$as_me:1478: result: Configuring for $cf_cv_system_name" >&5
1479 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1480
1481 if test ".$system_name" != ".$cf_cv_system_name" ; then
1482         echo "$as_me:1482: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1483 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1484         { { echo "$as_me:1484: error: \"Please remove config.cache and try again.\"" >&5
1485 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1486    { (exit 1); exit 1; }; }
1487 fi
1488
1489 # Check whether --with-system-type or --without-system-type was given.
1490 if test "${with_system_type+set}" = set; then
1491   withval="$with_system_type"
1492   { echo "$as_me:1492: WARNING: overriding system type to $withval" >&5
1493 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1494         cf_cv_system_name=$withval
1495         host_os=$withval
1496
1497 fi;
1498
1499 ###     Save the given $CFLAGS to allow user-override.
1500 cf_user_CFLAGS="$CFLAGS"
1501
1502 ###     Default install-location
1503
1504 echo "$as_me:1504: checking for prefix" >&5
1505 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1506 if test "x$prefix" = "xNONE" ; then
1507         case "$cf_cv_system_name" in
1508                 # non-vendor systems don't have a conflict
1509         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1510                 prefix=/usr
1511                 ;;
1512         (*)     prefix=$ac_default_prefix
1513                 ;;
1514         esac
1515 fi
1516 echo "$as_me:1516: result: $prefix" >&5
1517 echo "${ECHO_T}$prefix" >&6
1518
1519 if test "x$prefix" = "xNONE" ; then
1520 echo "$as_me:1520: checking for default include-directory" >&5
1521 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1522 test -n "$verbose" && echo 1>&6
1523 for cf_symbol in \
1524         $includedir \
1525         $includedir/ncurses \
1526         $prefix/include \
1527         $prefix/include/ncurses \
1528         /usr/local/include \
1529         /usr/local/include/ncurses \
1530         /usr/include \
1531         /usr/include/ncurses
1532 do
1533         cf_dir=`eval echo $cf_symbol`
1534         if test -f $cf_dir/curses.h ; then
1535         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1536                 includedir="$cf_symbol"
1537                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1538                 break
1539         fi
1540         fi
1541         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1542 done
1543 echo "$as_me:1543: result: $includedir" >&5
1544 echo "${ECHO_T}$includedir" >&6
1545 fi
1546
1547 ### Defaults for ncurses ABI
1548
1549 case x$cf_cv_abi_version in
1550 (x[6789])
1551         cf_dft_ext_colors=yes
1552         cf_dft_ext_const=yes
1553         cf_dft_ext_mouse=yes
1554         cf_dft_ext_putwin=yes
1555         cf_dft_ext_spfuncs=yes
1556         cf_dft_filter_syms=yes
1557         cf_dft_chtype=uint32_t
1558         cf_dft_mmask_t=uint32_t
1559         cf_dft_interop=yes
1560         cf_dft_tparm_arg=intptr_t
1561         cf_dft_with_lp64=yes
1562         ;;
1563 (*)
1564         cf_dft_ext_colors=no
1565         cf_dft_ext_const=no
1566         cf_dft_ext_mouse=no
1567         cf_dft_ext_putwin=no
1568         cf_dft_ext_spfuncs=no
1569         cf_dft_filter_syms=no
1570         cf_dft_chtype=auto
1571         cf_dft_mmask_t=auto
1572         cf_dft_interop=no
1573         cf_dft_tparm_arg=long
1574         cf_dft_with_lp64=no
1575         ;;
1576 esac
1577
1578 ###     Checks for programs.
1579
1580 # Check whether --with-ada or --without-ada was given.
1581 if test "${with_ada+set}" = set; then
1582   withval="$with_ada"
1583   cf_with_ada=$withval
1584 else
1585   cf_with_ada=yes
1586 fi;
1587 if test "x$cf_with_ada" = xyes
1588 then
1589         cf_PROG_CC="gnatgcc gcc cc"
1590 else
1591         cf_PROG_CC="gcc cc"
1592 fi
1593
1594 ac_ext=c
1595 ac_cpp='$CPP $CPPFLAGS'
1596 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1597 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1598 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1599 ac_main_return=return
1600 if test -n "$ac_tool_prefix"; then
1601   for ac_prog in $cf_PROG_CC
1602   do
1603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1605 echo "$as_me:1605: checking for $ac_word" >&5
1606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1607 if test "${ac_cv_prog_CC+set}" = set; then
1608   echo $ECHO_N "(cached) $ECHO_C" >&6
1609 else
1610   if test -n "$CC"; then
1611   ac_cv_prog_CC="$CC" # Let the user override the test.
1612 else
1613   ac_save_IFS=$IFS; IFS=$ac_path_separator
1614 ac_dummy="$PATH"
1615 for ac_dir in $ac_dummy; do
1616   IFS=$ac_save_IFS
1617   test -z "$ac_dir" && ac_dir=.
1618   $as_executable_p "$ac_dir/$ac_word" || continue
1619 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1620 echo "$as_me:1620: found $ac_dir/$ac_word" >&5
1621 break
1622 done
1623
1624 fi
1625 fi
1626 CC=$ac_cv_prog_CC
1627 if test -n "$CC"; then
1628   echo "$as_me:1628: result: $CC" >&5
1629 echo "${ECHO_T}$CC" >&6
1630 else
1631   echo "$as_me:1631: result: no" >&5
1632 echo "${ECHO_T}no" >&6
1633 fi
1634
1635     test -n "$CC" && break
1636   done
1637 fi
1638 if test -z "$CC"; then
1639   ac_ct_CC=$CC
1640   for ac_prog in $cf_PROG_CC
1641 do
1642   # Extract the first word of "$ac_prog", so it can be a program name with args.
1643 set dummy $ac_prog; ac_word=$2
1644 echo "$as_me:1644: checking for $ac_word" >&5
1645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   if test -n "$ac_ct_CC"; then
1650   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1651 else
1652   ac_save_IFS=$IFS; IFS=$ac_path_separator
1653 ac_dummy="$PATH"
1654 for ac_dir in $ac_dummy; do
1655   IFS=$ac_save_IFS
1656   test -z "$ac_dir" && ac_dir=.
1657   $as_executable_p "$ac_dir/$ac_word" || continue
1658 ac_cv_prog_ac_ct_CC="$ac_prog"
1659 echo "$as_me:1659: found $ac_dir/$ac_word" >&5
1660 break
1661 done
1662
1663 fi
1664 fi
1665 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1666 if test -n "$ac_ct_CC"; then
1667   echo "$as_me:1667: result: $ac_ct_CC" >&5
1668 echo "${ECHO_T}$ac_ct_CC" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$ac_ct_CC" && break
1675 done
1676
1677   CC=$ac_ct_CC
1678 fi
1679
1680 test -z "$CC" && { { echo "$as_me:1680: error: no acceptable cc found in \$PATH" >&5
1681 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1682    { (exit 1); exit 1; }; }
1683
1684 # Provide some information about the compiler.
1685 echo "$as_me:1685:" \
1686      "checking for C compiler version" >&5
1687 ac_compiler=`set X $ac_compile; echo $2`
1688 { (eval echo "$as_me:1688: \"$ac_compiler --version </dev/null >&5\"") >&5
1689   (eval $ac_compiler --version </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693 { (eval echo "$as_me:1693: \"$ac_compiler -v </dev/null >&5\"") >&5
1694   (eval $ac_compiler -v </dev/null >&5) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }
1698 { (eval echo "$as_me:1698: \"$ac_compiler -V </dev/null >&5\"") >&5
1699   (eval $ac_compiler -V </dev/null >&5) 2>&5
1700   ac_status=$?
1701   echo "$as_me:1701: \$? = $ac_status" >&5
1702   (exit $ac_status); }
1703
1704 cat >conftest.$ac_ext <<_ACEOF
1705 #line 1705 "configure"
1706 #include "confdefs.h"
1707
1708 int
1709 main (void)
1710 {
1711
1712   ;
1713   return 0;
1714 }
1715 _ACEOF
1716 ac_clean_files_save=$ac_clean_files
1717 ac_clean_files="$ac_clean_files a.out a.exe"
1718 # Try to create an executable without -o first, disregard a.out.
1719 # It will help us diagnose broken compilers, and finding out an intuition
1720 # of exeext.
1721 echo "$as_me:1721: checking for C compiler default output" >&5
1722 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1723 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1724 if { (eval echo "$as_me:1724: \"$ac_link_default\"") >&5
1725   (eval $ac_link_default) 2>&5
1726   ac_status=$?
1727   echo "$as_me:1727: \$? = $ac_status" >&5
1728   (exit $ac_status); }; then
1729   # Find the output, starting from the most likely.  This scheme is
1730 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1731 # resort.
1732 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1733                 ls a.out conftest 2>/dev/null;
1734                 ls a.* conftest.* 2>/dev/null`; do
1735   case $ac_file in
1736     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1737     a.out ) # We found the default executable, but exeext='' is most
1738             # certainly right.
1739             break;;
1740     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1741           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1742           export ac_cv_exeext
1743           break;;
1744     * ) break;;
1745   esac
1746 done
1747 else
1748   echo "$as_me: failed program was:" >&5
1749 cat conftest.$ac_ext >&5
1750 { { echo "$as_me:1750: error: C compiler cannot create executables" >&5
1751 echo "$as_me: error: C compiler cannot create executables" >&2;}
1752    { (exit 77); exit 77; }; }
1753 fi
1754
1755 ac_exeext=$ac_cv_exeext
1756 echo "$as_me:1756: result: $ac_file" >&5
1757 echo "${ECHO_T}$ac_file" >&6
1758
1759 # Check the compiler produces executables we can run.  If not, either
1760 # the compiler is broken, or we cross compile.
1761 echo "$as_me:1761: checking whether the C compiler works" >&5
1762 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1763 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1764 # If not cross compiling, check that we can run a simple program.
1765 if test "$cross_compiling" != yes; then
1766   if { ac_try='./$ac_file'
1767   { (eval echo "$as_me:1767: \"$ac_try\"") >&5
1768   (eval $ac_try) 2>&5
1769   ac_status=$?
1770   echo "$as_me:1770: \$? = $ac_status" >&5
1771   (exit $ac_status); }; }; then
1772     cross_compiling=no
1773   else
1774     if test "$cross_compiling" = maybe; then
1775         cross_compiling=yes
1776     else
1777         { { echo "$as_me:1777: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&5
1779 echo "$as_me: error: cannot run C compiled programs.
1780 If you meant to cross compile, use \`--host'." >&2;}
1781    { (exit 1); exit 1; }; }
1782     fi
1783   fi
1784 fi
1785 echo "$as_me:1785: result: yes" >&5
1786 echo "${ECHO_T}yes" >&6
1787
1788 rm -f a.out a.exe conftest$ac_cv_exeext
1789 ac_clean_files=$ac_clean_files_save
1790 # Check the compiler produces executables we can run.  If not, either
1791 # the compiler is broken, or we cross compile.
1792 echo "$as_me:1792: checking whether we are cross compiling" >&5
1793 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1794 echo "$as_me:1794: result: $cross_compiling" >&5
1795 echo "${ECHO_T}$cross_compiling" >&6
1796
1797 echo "$as_me:1797: checking for executable suffix" >&5
1798 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1799 if { (eval echo "$as_me:1799: \"$ac_link\"") >&5
1800   (eval $ac_link) 2>&5
1801   ac_status=$?
1802   echo "$as_me:1802: \$? = $ac_status" >&5
1803   (exit $ac_status); }; then
1804   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1805 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1806 # work properly (i.e., refer to `conftest.exe'), while it won't with
1807 # `rm'.
1808 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1809   case $ac_file in
1810     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1811     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1812           export ac_cv_exeext
1813           break;;
1814     * ) break;;
1815   esac
1816 done
1817 else
1818   { { echo "$as_me:1818: error: cannot compute EXEEXT: cannot compile and link" >&5
1819 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1820    { (exit 1); exit 1; }; }
1821 fi
1822
1823 rm -f conftest$ac_cv_exeext
1824 echo "$as_me:1824: result: $ac_cv_exeext" >&5
1825 echo "${ECHO_T}$ac_cv_exeext" >&6
1826
1827 rm -f conftest.$ac_ext
1828 EXEEXT=$ac_cv_exeext
1829 ac_exeext=$EXEEXT
1830 echo "$as_me:1830: checking for object suffix" >&5
1831 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1832 if test "${ac_cv_objext+set}" = set; then
1833   echo $ECHO_N "(cached) $ECHO_C" >&6
1834 else
1835   cat >conftest.$ac_ext <<_ACEOF
1836 #line 1836 "configure"
1837 #include "confdefs.h"
1838
1839 int
1840 main (void)
1841 {
1842
1843   ;
1844   return 0;
1845 }
1846 _ACEOF
1847 rm -f conftest.o conftest.obj
1848 if { (eval echo "$as_me:1848: \"$ac_compile\"") >&5
1849   (eval $ac_compile) 2>&5
1850   ac_status=$?
1851   echo "$as_me:1851: \$? = $ac_status" >&5
1852   (exit $ac_status); }; then
1853   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1854   case $ac_file in
1855     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1856     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1857        break;;
1858   esac
1859 done
1860 else
1861   echo "$as_me: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
1863 { { echo "$as_me:1863: error: cannot compute OBJEXT: cannot compile" >&5
1864 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1865    { (exit 1); exit 1; }; }
1866 fi
1867
1868 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1869 fi
1870 echo "$as_me:1870: result: $ac_cv_objext" >&5
1871 echo "${ECHO_T}$ac_cv_objext" >&6
1872 OBJEXT=$ac_cv_objext
1873 ac_objext=$OBJEXT
1874 echo "$as_me:1874: checking whether we are using the GNU C compiler" >&5
1875 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1876 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1877   echo $ECHO_N "(cached) $ECHO_C" >&6
1878 else
1879   cat >conftest.$ac_ext <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886 #ifndef __GNUC__
1887        choke me
1888 #endif
1889
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f conftest.$ac_objext
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit $ac_status); } &&
1900          { ac_try='test -s conftest.$ac_objext'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); }; }; then
1906   ac_compiler_gnu=yes
1907 else
1908   echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 ac_compiler_gnu=no
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1914
1915 fi
1916 echo "$as_me:1916: result: $ac_cv_c_compiler_gnu" >&5
1917 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1918 GCC=`test $ac_compiler_gnu = yes && echo yes`
1919 ac_test_CFLAGS=${CFLAGS+set}
1920 ac_save_CFLAGS=$CFLAGS
1921 CFLAGS="-g"
1922 echo "$as_me:1922: checking whether $CC accepts -g" >&5
1923 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1924 if test "${ac_cv_prog_cc_g+set}" = set; then
1925   echo $ECHO_N "(cached) $ECHO_C" >&6
1926 else
1927   cat >conftest.$ac_ext <<_ACEOF
1928 #line 1928 "configure"
1929 #include "confdefs.h"
1930
1931 int
1932 main (void)
1933 {
1934
1935   ;
1936   return 0;
1937 }
1938 _ACEOF
1939 rm -f conftest.$ac_objext
1940 if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5
1941   (eval $ac_compile) 2>&5
1942   ac_status=$?
1943   echo "$as_me:1943: \$? = $ac_status" >&5
1944   (exit $ac_status); } &&
1945          { ac_try='test -s conftest.$ac_objext'
1946   { (eval echo "$as_me:1946: \"$ac_try\"") >&5
1947   (eval $ac_try) 2>&5
1948   ac_status=$?
1949   echo "$as_me:1949: \$? = $ac_status" >&5
1950   (exit $ac_status); }; }; then
1951   ac_cv_prog_cc_g=yes
1952 else
1953   echo "$as_me: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1955 ac_cv_prog_cc_g=no
1956 fi
1957 rm -f conftest.$ac_objext conftest.$ac_ext
1958 fi
1959 echo "$as_me:1959: result: $ac_cv_prog_cc_g" >&5
1960 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1961 if test "$ac_test_CFLAGS" = set; then
1962   CFLAGS=$ac_save_CFLAGS
1963 elif test $ac_cv_prog_cc_g = yes; then
1964   if test "$GCC" = yes; then
1965     CFLAGS="-g -O2"
1966   else
1967     CFLAGS="-g"
1968   fi
1969 else
1970   if test "$GCC" = yes; then
1971     CFLAGS="-O2"
1972   else
1973     CFLAGS=
1974   fi
1975 fi
1976 # Some people use a C++ compiler to compile C.  Since we use `exit',
1977 # in C++ we need to declare it.  In case someone uses the same compiler
1978 # for both compiling C and C++ we need to have the C++ compiler decide
1979 # the declaration of exit, since it's the most demanding environment.
1980 cat >conftest.$ac_ext <<_ACEOF
1981 #ifndef __cplusplus
1982   choke me
1983 #endif
1984 _ACEOF
1985 rm -f conftest.$ac_objext
1986 if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
1987   (eval $ac_compile) 2>&5
1988   ac_status=$?
1989   echo "$as_me:1989: \$? = $ac_status" >&5
1990   (exit $ac_status); } &&
1991          { ac_try='test -s conftest.$ac_objext'
1992   { (eval echo "$as_me:1992: \"$ac_try\"") >&5
1993   (eval $ac_try) 2>&5
1994   ac_status=$?
1995   echo "$as_me:1995: \$? = $ac_status" >&5
1996   (exit $ac_status); }; }; then
1997   for ac_declaration in \
1998    ''\
1999    '#include <stdlib.h>' \
2000    'extern "C" void std::exit (int) throw (); using std::exit;' \
2001    'extern "C" void std::exit (int); using std::exit;' \
2002    'extern "C" void exit (int) throw ();' \
2003    'extern "C" void exit (int);' \
2004    'void exit (int);'
2005 do
2006   cat >conftest.$ac_ext <<_ACEOF
2007 #line 2007 "configure"
2008 #include "confdefs.h"
2009 #include <stdlib.h>
2010 $ac_declaration
2011 int
2012 main (void)
2013 {
2014 exit (42);
2015   ;
2016   return 0;
2017 }
2018 _ACEOF
2019 rm -f conftest.$ac_objext
2020 if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5
2021   (eval $ac_compile) 2>&5
2022   ac_status=$?
2023   echo "$as_me:2023: \$? = $ac_status" >&5
2024   (exit $ac_status); } &&
2025          { ac_try='test -s conftest.$ac_objext'
2026   { (eval echo "$as_me:2026: \"$ac_try\"") >&5
2027   (eval $ac_try) 2>&5
2028   ac_status=$?
2029   echo "$as_me:2029: \$? = $ac_status" >&5
2030   (exit $ac_status); }; }; then
2031   :
2032 else
2033   echo "$as_me: failed program was:" >&5
2034 cat conftest.$ac_ext >&5
2035 continue
2036 fi
2037 rm -f conftest.$ac_objext conftest.$ac_ext
2038   cat >conftest.$ac_ext <<_ACEOF
2039 #line 2039 "configure"
2040 #include "confdefs.h"
2041 $ac_declaration
2042 int
2043 main (void)
2044 {
2045 exit (42);
2046   ;
2047   return 0;
2048 }
2049 _ACEOF
2050 rm -f conftest.$ac_objext
2051 if { (eval echo "$as_me:2051: \"$ac_compile\"") >&5
2052   (eval $ac_compile) 2>&5
2053   ac_status=$?
2054   echo "$as_me:2054: \$? = $ac_status" >&5
2055   (exit $ac_status); } &&
2056          { ac_try='test -s conftest.$ac_objext'
2057   { (eval echo "$as_me:2057: \"$ac_try\"") >&5
2058   (eval $ac_try) 2>&5
2059   ac_status=$?
2060   echo "$as_me:2060: \$? = $ac_status" >&5
2061   (exit $ac_status); }; }; then
2062   break
2063 else
2064   echo "$as_me: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2066 fi
2067 rm -f conftest.$ac_objext conftest.$ac_ext
2068 done
2069 rm -rf conftest*
2070 if test -n "$ac_declaration"; then
2071   echo '#ifdef __cplusplus' >>confdefs.h
2072   echo $ac_declaration      >>confdefs.h
2073   echo '#endif'             >>confdefs.h
2074 fi
2075
2076 else
2077   echo "$as_me: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 fi
2080 rm -f conftest.$ac_objext conftest.$ac_ext
2081 ac_ext=c
2082 ac_cpp='$CPP $CPPFLAGS'
2083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2086 ac_main_return=return
2087
2088 GCC_VERSION=none
2089 if test "$GCC" = yes ; then
2090         echo "$as_me:2090: checking version of $CC" >&5
2091 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2092         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2093         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2094         echo "$as_me:2094: result: $GCC_VERSION" >&5
2095 echo "${ECHO_T}$GCC_VERSION" >&6
2096 fi
2097
2098 echo "$as_me:2098: checking for $CC option to accept ANSI C" >&5
2099 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2100 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2101   echo $ECHO_N "(cached) $ECHO_C" >&6
2102 else
2103   ac_cv_prog_cc_stdc=no
2104 ac_save_CC=$CC
2105 cat >conftest.$ac_ext <<_ACEOF
2106 #line 2106 "configure"
2107 #include "confdefs.h"
2108 #include <stdarg.h>
2109 #include <stdio.h>
2110 #include <sys/types.h>
2111 #include <sys/stat.h>
2112 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2113 struct buf { int x; };
2114 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2115 static char *e (p, i)
2116      char **p;
2117      int i;
2118 {
2119   return p[i];
2120 }
2121 static char *f (char * (*g) (char **, int), char **p, ...)
2122 {
2123   char *s;
2124   va_list v;
2125   va_start (v,p);
2126   s = g (p, va_arg (v,int));
2127   va_end (v);
2128   return s;
2129 }
2130 int test (int i, double x);
2131 struct s1 {int (*f) (int a);};
2132 struct s2 {int (*f) (double a);};
2133 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2134 int argc;
2135 char **argv;
2136 int
2137 main (void)
2138 {
2139 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2140   ;
2141   return 0;
2142 }
2143 _ACEOF
2144 # Don't try gcc -ansi; that turns off useful extensions and
2145 # breaks some systems' header files.
2146 # AIX                   -qlanglvl=ansi
2147 # Ultrix and OSF/1      -std1
2148 # HP-UX 10.20 and later -Ae
2149 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2150 # SVR4                  -Xc -D__EXTENSIONS__
2151 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2152 do
2153   CC="$ac_save_CC $ac_arg"
2154   rm -f conftest.$ac_objext
2155 if { (eval echo "$as_me:2155: \"$ac_compile\"") >&5
2156   (eval $ac_compile) 2>&5
2157   ac_status=$?
2158   echo "$as_me:2158: \$? = $ac_status" >&5
2159   (exit $ac_status); } &&
2160          { ac_try='test -s conftest.$ac_objext'
2161   { (eval echo "$as_me:2161: \"$ac_try\"") >&5
2162   (eval $ac_try) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit $ac_status); }; }; then
2166   ac_cv_prog_cc_stdc=$ac_arg
2167 break
2168 else
2169   echo "$as_me: failed program was:" >&5
2170 cat conftest.$ac_ext >&5
2171 fi
2172 rm -f conftest.$ac_objext
2173 done
2174 rm -f conftest.$ac_ext conftest.$ac_objext
2175 CC=$ac_save_CC
2176
2177 fi
2178
2179 case "x$ac_cv_prog_cc_stdc" in
2180   x|xno)
2181     echo "$as_me:2181: result: none needed" >&5
2182 echo "${ECHO_T}none needed" >&6 ;;
2183   *)
2184     echo "$as_me:2184: result: $ac_cv_prog_cc_stdc" >&5
2185 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2186     CC="$CC $ac_cv_prog_cc_stdc" ;;
2187 esac
2188
2189 # This should have been defined by AC_PROG_CC
2190 : ${CC:=cc}
2191
2192 echo "$as_me:2192: checking \$CC variable" >&5
2193 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2194 case "$CC" in
2195 (*[\ \  ]-*)
2196         echo "$as_me:2196: result: broken" >&5
2197 echo "${ECHO_T}broken" >&6
2198         { echo "$as_me:2198: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2199 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2200         # humor him...
2201         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2202         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2203         CC="$cf_prog"
2204         for cf_arg in $cf_flags
2205         do
2206                 case "x$cf_arg" in
2207                 (x-[IUDfgOW]*)
2208
2209 cf_fix_cppflags=no
2210 cf_new_cflags=
2211 cf_new_cppflags=
2212 cf_new_extra_cppflags=
2213
2214 for cf_add_cflags in $cf_arg
2215 do
2216 case $cf_fix_cppflags in
2217 (no)
2218         case $cf_add_cflags in
2219         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2220                 case $cf_add_cflags in
2221                 (-D*)
2222                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2223
2224                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2225                                 && test -z "${cf_tst_cflags}" \
2226                                 && cf_fix_cppflags=yes
2227
2228                         if test $cf_fix_cppflags = yes ; then
2229
2230         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2231         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2232
2233                                 continue
2234                         elif test "${cf_tst_cflags}" = "\"'" ; then
2235
2236         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2237         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2238
2239                                 continue
2240                         fi
2241                         ;;
2242                 esac
2243                 case "$CPPFLAGS" in
2244                 (*$cf_add_cflags)
2245                         ;;
2246                 (*)
2247                         case $cf_add_cflags in
2248                         (-D*)
2249                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2250
2251 CPPFLAGS=`echo "$CPPFLAGS" | \
2252         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2253                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2254
2255                                 ;;
2256                         esac
2257
2258         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2259         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2260
2261                         ;;
2262                 esac
2263                 ;;
2264         (*)
2265
2266         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2267         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2268
2269                 ;;
2270         esac
2271         ;;
2272 (yes)
2273
2274         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2275         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2276
2277         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2278
2279         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2280                 && test -z "${cf_tst_cflags}" \
2281                 && cf_fix_cppflags=no
2282         ;;
2283 esac
2284 done
2285
2286 if test -n "$cf_new_cflags" ; then
2287
2288         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2289         CFLAGS="${CFLAGS}$cf_new_cflags"
2290
2291 fi
2292
2293 if test -n "$cf_new_cppflags" ; then
2294
2295         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2296         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2297
2298 fi
2299
2300 if test -n "$cf_new_extra_cppflags" ; then
2301
2302         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2303         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2304
2305 fi
2306
2307                         ;;
2308                 (*)
2309                         CC="$CC $cf_arg"
2310                         ;;
2311                 esac
2312         done
2313         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2314
2315 echo "${as_me:-configure}:2315: testing resulting CC: '$CC' ..." 1>&5
2316
2317         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2318
2319 echo "${as_me:-configure}:2319: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2320
2321         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2322
2323 echo "${as_me:-configure}:2323: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2324
2325         ;;
2326 (*)
2327         echo "$as_me:2327: result: ok" >&5
2328 echo "${ECHO_T}ok" >&6
2329         ;;
2330 esac
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338 echo "$as_me:2338: checking how to run the C preprocessor" >&5
2339 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2340 # On Suns, sometimes $CPP names a directory.
2341 if test -n "$CPP" && test -d "$CPP"; then
2342   CPP=
2343 fi
2344 if test -z "$CPP"; then
2345   if test "${ac_cv_prog_CPP+set}" = set; then
2346   echo $ECHO_N "(cached) $ECHO_C" >&6
2347 else
2348       # Double quotes because CPP needs to be expanded
2349     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2350     do
2351       ac_preproc_ok=false
2352 for ac_c_preproc_warn_flag in '' yes
2353 do
2354   # Use a header file that comes with gcc, so configuring glibc
2355   # with a fresh cross-compiler works.
2356   # On the NeXT, cc -E runs the code through the compiler's parser,
2357   # not just through cpp. "Syntax error" is here to catch this case.
2358   cat >conftest.$ac_ext <<_ACEOF
2359 #line 2359 "configure"
2360 #include "confdefs.h"
2361 #include <assert.h>
2362                      Syntax error
2363 _ACEOF
2364 if { (eval echo "$as_me:2364: \"$ac_cpp conftest.$ac_ext\"") >&5
2365   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2366   ac_status=$?
2367   egrep -v '^ *\+' conftest.er1 >conftest.err
2368   rm -f conftest.er1
2369   cat conftest.err >&5
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit $ac_status); } >/dev/null; then
2372   if test -s conftest.err; then
2373     ac_cpp_err=$ac_c_preproc_warn_flag
2374   else
2375     ac_cpp_err=
2376   fi
2377 else
2378   ac_cpp_err=yes
2379 fi
2380 if test -z "$ac_cpp_err"; then
2381   :
2382 else
2383   echo "$as_me: failed program was:" >&5
2384   cat conftest.$ac_ext >&5
2385   # Broken: fails on valid input.
2386 continue
2387 fi
2388 rm -f conftest.err conftest.$ac_ext
2389
2390   # OK, works on sane cases.  Now check whether non-existent headers
2391   # can be detected and how.
2392   cat >conftest.$ac_ext <<_ACEOF
2393 #line 2393 "configure"
2394 #include "confdefs.h"
2395 #include <ac_nonexistent.h>
2396 _ACEOF
2397 if { (eval echo "$as_me:2397: \"$ac_cpp conftest.$ac_ext\"") >&5
2398   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2399   ac_status=$?
2400   egrep -v '^ *\+' conftest.er1 >conftest.err
2401   rm -f conftest.er1
2402   cat conftest.err >&5
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); } >/dev/null; then
2405   if test -s conftest.err; then
2406     ac_cpp_err=$ac_c_preproc_warn_flag
2407   else
2408     ac_cpp_err=
2409   fi
2410 else
2411   ac_cpp_err=yes
2412 fi
2413 if test -z "$ac_cpp_err"; then
2414   # Broken: success on invalid input.
2415 continue
2416 else
2417   echo "$as_me: failed program was:" >&5
2418   cat conftest.$ac_ext >&5
2419   # Passes both tests.
2420 ac_preproc_ok=:
2421 break
2422 fi
2423 rm -f conftest.err conftest.$ac_ext
2424
2425 done
2426 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2427 rm -f conftest.err conftest.$ac_ext
2428 if $ac_preproc_ok; then
2429   break
2430 fi
2431
2432     done
2433     ac_cv_prog_CPP=$CPP
2434
2435 fi
2436   CPP=$ac_cv_prog_CPP
2437 else
2438   ac_cv_prog_CPP=$CPP
2439 fi
2440 echo "$as_me:2440: result: $CPP" >&5
2441 echo "${ECHO_T}$CPP" >&6
2442 ac_preproc_ok=false
2443 for ac_c_preproc_warn_flag in '' yes
2444 do
2445   # Use a header file that comes with gcc, so configuring glibc
2446   # with a fresh cross-compiler works.
2447   # On the NeXT, cc -E runs the code through the compiler's parser,
2448   # not just through cpp. "Syntax error" is here to catch this case.
2449   cat >conftest.$ac_ext <<_ACEOF
2450 #line 2450 "configure"
2451 #include "confdefs.h"
2452 #include <assert.h>
2453                      Syntax error
2454 _ACEOF
2455 if { (eval echo "$as_me:2455: \"$ac_cpp conftest.$ac_ext\"") >&5
2456   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2457   ac_status=$?
2458   egrep -v '^ *\+' conftest.er1 >conftest.err
2459   rm -f conftest.er1
2460   cat conftest.err >&5
2461   echo "$as_me:2461: \$? = $ac_status" >&5
2462   (exit $ac_status); } >/dev/null; then
2463   if test -s conftest.err; then
2464     ac_cpp_err=$ac_c_preproc_warn_flag
2465   else
2466     ac_cpp_err=
2467   fi
2468 else
2469   ac_cpp_err=yes
2470 fi
2471 if test -z "$ac_cpp_err"; then
2472   :
2473 else
2474   echo "$as_me: failed program was:" >&5
2475   cat conftest.$ac_ext >&5
2476   # Broken: fails on valid input.
2477 continue
2478 fi
2479 rm -f conftest.err conftest.$ac_ext
2480
2481   # OK, works on sane cases.  Now check whether non-existent headers
2482   # can be detected and how.
2483   cat >conftest.$ac_ext <<_ACEOF
2484 #line 2484 "configure"
2485 #include "confdefs.h"
2486 #include <ac_nonexistent.h>
2487 _ACEOF
2488 if { (eval echo "$as_me:2488: \"$ac_cpp conftest.$ac_ext\"") >&5
2489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2490   ac_status=$?
2491   egrep -v '^ *\+' conftest.er1 >conftest.err
2492   rm -f conftest.er1
2493   cat conftest.err >&5
2494   echo "$as_me:2494: \$? = $ac_status" >&5
2495   (exit $ac_status); } >/dev/null; then
2496   if test -s conftest.err; then
2497     ac_cpp_err=$ac_c_preproc_warn_flag
2498   else
2499     ac_cpp_err=
2500   fi
2501 else
2502   ac_cpp_err=yes
2503 fi
2504 if test -z "$ac_cpp_err"; then
2505   # Broken: success on invalid input.
2506 continue
2507 else
2508   echo "$as_me: failed program was:" >&5
2509   cat conftest.$ac_ext >&5
2510   # Passes both tests.
2511 ac_preproc_ok=:
2512 break
2513 fi
2514 rm -f conftest.err conftest.$ac_ext
2515
2516 done
2517 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2518 rm -f conftest.err conftest.$ac_ext
2519 if $ac_preproc_ok; then
2520   :
2521 else
2522   { { echo "$as_me:2522: error: C preprocessor \"$CPP\" fails sanity check" >&5
2523 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2524    { (exit 1); exit 1; }; }
2525 fi
2526
2527 ac_ext=c
2528 ac_cpp='$CPP $CPPFLAGS'
2529 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2530 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2531 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2532 ac_main_return=return
2533
2534 if test $ac_cv_c_compiler_gnu = yes; then
2535     echo "$as_me:2535: checking whether $CC needs -traditional" >&5
2536 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2537 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2538   echo $ECHO_N "(cached) $ECHO_C" >&6
2539 else
2540     ac_pattern="Autoconf.*'x'"
2541   cat >conftest.$ac_ext <<_ACEOF
2542 #line 2542 "configure"
2543 #include "confdefs.h"
2544 #include <sgtty.h>
2545 int Autoconf = TIOCGETP;
2546 _ACEOF
2547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2548   egrep "$ac_pattern" >/dev/null 2>&1; then
2549   ac_cv_prog_gcc_traditional=yes
2550 else
2551   ac_cv_prog_gcc_traditional=no
2552 fi
2553 rm -rf conftest*
2554
2555   if test $ac_cv_prog_gcc_traditional = no; then
2556     cat >conftest.$ac_ext <<_ACEOF
2557 #line 2557 "configure"
2558 #include "confdefs.h"
2559 #include <termio.h>
2560 int Autoconf = TCGETA;
2561 _ACEOF
2562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2563   egrep "$ac_pattern" >/dev/null 2>&1; then
2564   ac_cv_prog_gcc_traditional=yes
2565 fi
2566 rm -rf conftest*
2567
2568   fi
2569 fi
2570 echo "$as_me:2570: result: $ac_cv_prog_gcc_traditional" >&5
2571 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2572   if test $ac_cv_prog_gcc_traditional = yes; then
2573     CC="$CC -traditional"
2574   fi
2575 fi
2576
2577 echo "$as_me:2577: checking whether $CC understands -c and -o together" >&5
2578 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2579 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2580   echo $ECHO_N "(cached) $ECHO_C" >&6
2581 else
2582
2583 cat > conftest.$ac_ext <<CF_EOF
2584 int main(void)
2585 {
2586         ${cf_cv_main_return:-return}(0);
2587 }
2588 CF_EOF
2589 # We do the test twice because some compilers refuse to overwrite an
2590 # existing .o file with -o, though they will create one.
2591 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2592 if { (eval echo "$as_me:2592: \"$ac_try\"") >&5
2593   (eval $ac_try) 2>&5
2594   ac_status=$?
2595   echo "$as_me:2595: \$? = $ac_status" >&5
2596   (exit $ac_status); } &&
2597   test -f conftest2.$ac_objext && { (eval echo "$as_me:2597: \"$ac_try\"") >&5
2598   (eval $ac_try) 2>&5
2599   ac_status=$?
2600   echo "$as_me:2600: \$? = $ac_status" >&5
2601   (exit $ac_status); };
2602 then
2603   eval cf_cv_prog_CC_c_o=yes
2604 else
2605   eval cf_cv_prog_CC_c_o=no
2606 fi
2607 rm -rf conftest*
2608
2609 fi
2610 if test $cf_cv_prog_CC_c_o = yes; then
2611   echo "$as_me:2611: result: yes" >&5
2612 echo "${ECHO_T}yes" >&6
2613 else
2614   echo "$as_me:2614: result: no" >&5
2615 echo "${ECHO_T}no" >&6
2616 fi
2617
2618 if test "$cross_compiling" = yes ; then
2619         LDCONFIG=:
2620 else
2621         case "$cf_cv_system_name" in
2622         (dragonfly*|mirbsd*|freebsd*)
2623                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2624                 ;;
2625         (*) LDPATH=$PATH:/sbin:/usr/sbin
2626                 # Extract the first word of "ldconfig", so it can be a program name with args.
2627 set dummy ldconfig; ac_word=$2
2628 echo "$as_me:2628: checking for $ac_word" >&5
2629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2630 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   case $LDCONFIG in
2634   [\\/]* | ?:[\\/]*)
2635   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2636   ;;
2637   *)
2638   ac_save_IFS=$IFS; IFS=$ac_path_separator
2639 ac_dummy="$LDPATH"
2640 for ac_dir in $ac_dummy; do
2641   IFS=$ac_save_IFS
2642   test -z "$ac_dir" && ac_dir=.
2643   if $as_executable_p "$ac_dir/$ac_word"; then
2644    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2645    echo "$as_me:2645: found $ac_dir/$ac_word" >&5
2646    break
2647 fi
2648 done
2649
2650   ;;
2651 esac
2652 fi
2653 LDCONFIG=$ac_cv_path_LDCONFIG
2654
2655 if test -n "$LDCONFIG"; then
2656   echo "$as_me:2656: result: $LDCONFIG" >&5
2657 echo "${ECHO_T}$LDCONFIG" >&6
2658 else
2659   echo "$as_me:2659: result: no" >&5
2660 echo "${ECHO_T}no" >&6
2661 fi
2662
2663                 ;;
2664         esac
2665 fi
2666
2667 echo "$as_me:2667: checking if you want to ensure bool is consistent with C++" >&5
2668 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2669
2670 # Check whether --with-cxx or --without-cxx was given.
2671 if test "${with_cxx+set}" = set; then
2672   withval="$with_cxx"
2673   cf_with_cxx=$withval
2674 else
2675   cf_with_cxx=yes
2676 fi;
2677 echo "$as_me:2677: result: $cf_with_cxx" >&5
2678 echo "${ECHO_T}$cf_with_cxx" >&6
2679 if test "X$cf_with_cxx" = Xno ; then
2680         CXX=""
2681         GXX=""
2682 else
2683         # with autoconf 2.13, we can change the error to a warning:
2684                 ac_ext=cc
2685 ac_cpp='$CXXCPP $CPPFLAGS'
2686 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2689 ac_main_return=return
2690 if test -n "$ac_tool_prefix"; then
2691   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2692   do
2693     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2694 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2695 echo "$as_me:2695: checking for $ac_word" >&5
2696 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2697 if test "${ac_cv_prog_CXX+set}" = set; then
2698   echo $ECHO_N "(cached) $ECHO_C" >&6
2699 else
2700   if test -n "$CXX"; then
2701   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2702 else
2703   ac_save_IFS=$IFS; IFS=$ac_path_separator
2704 ac_dummy="$PATH"
2705 for ac_dir in $ac_dummy; do
2706   IFS=$ac_save_IFS
2707   test -z "$ac_dir" && ac_dir=.
2708   $as_executable_p "$ac_dir/$ac_word" || continue
2709 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2710 echo "$as_me:2710: found $ac_dir/$ac_word" >&5
2711 break
2712 done
2713
2714 fi
2715 fi
2716 CXX=$ac_cv_prog_CXX
2717 if test -n "$CXX"; then
2718   echo "$as_me:2718: result: $CXX" >&5
2719 echo "${ECHO_T}$CXX" >&6
2720 else
2721   echo "$as_me:2721: result: no" >&5
2722 echo "${ECHO_T}no" >&6
2723 fi
2724
2725     test -n "$CXX" && break
2726   done
2727 fi
2728 if test -z "$CXX"; then
2729   ac_ct_CXX=$CXX
2730   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2731 do
2732   # Extract the first word of "$ac_prog", so it can be a program name with args.
2733 set dummy $ac_prog; ac_word=$2
2734 echo "$as_me:2734: checking for $ac_word" >&5
2735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2736 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2737   echo $ECHO_N "(cached) $ECHO_C" >&6
2738 else
2739   if test -n "$ac_ct_CXX"; then
2740   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2741 else
2742   ac_save_IFS=$IFS; IFS=$ac_path_separator
2743 ac_dummy="$PATH"
2744 for ac_dir in $ac_dummy; do
2745   IFS=$ac_save_IFS
2746   test -z "$ac_dir" && ac_dir=.
2747   $as_executable_p "$ac_dir/$ac_word" || continue
2748 ac_cv_prog_ac_ct_CXX="$ac_prog"
2749 echo "$as_me:2749: found $ac_dir/$ac_word" >&5
2750 break
2751 done
2752
2753 fi
2754 fi
2755 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2756 if test -n "$ac_ct_CXX"; then
2757   echo "$as_me:2757: result: $ac_ct_CXX" >&5
2758 echo "${ECHO_T}$ac_ct_CXX" >&6
2759 else
2760   echo "$as_me:2760: result: no" >&5
2761 echo "${ECHO_T}no" >&6
2762 fi
2763
2764   test -n "$ac_ct_CXX" && break
2765 done
2766 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2767
2768   CXX=$ac_ct_CXX
2769 fi
2770
2771 # Provide some information about the compiler.
2772 echo "$as_me:2772:" \
2773      "checking for C++ compiler version" >&5
2774 ac_compiler=`set X $ac_compile; echo $2`
2775 { (eval echo "$as_me:2775: \"$ac_compiler --version </dev/null >&5\"") >&5
2776   (eval $ac_compiler --version </dev/null >&5) 2>&5
2777   ac_status=$?
2778   echo "$as_me:2778: \$? = $ac_status" >&5
2779   (exit $ac_status); }
2780 { (eval echo "$as_me:2780: \"$ac_compiler -v </dev/null >&5\"") >&5
2781   (eval $ac_compiler -v </dev/null >&5) 2>&5
2782   ac_status=$?
2783   echo "$as_me:2783: \$? = $ac_status" >&5
2784   (exit $ac_status); }
2785 { (eval echo "$as_me:2785: \"$ac_compiler -V </dev/null >&5\"") >&5
2786   (eval $ac_compiler -V </dev/null >&5) 2>&5
2787   ac_status=$?
2788   echo "$as_me:2788: \$? = $ac_status" >&5
2789   (exit $ac_status); }
2790
2791 echo "$as_me:2791: checking whether we are using the GNU C++ compiler" >&5
2792 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2793 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2794   echo $ECHO_N "(cached) $ECHO_C" >&6
2795 else
2796   cat >conftest.$ac_ext <<_ACEOF
2797 #line 2797 "configure"
2798 #include "confdefs.h"
2799
2800 int
2801 main (void)
2802 {
2803 #ifndef __GNUC__
2804        choke me
2805 #endif
2806
2807   ;
2808   return 0;
2809 }
2810 _ACEOF
2811 rm -f conftest.$ac_objext
2812 if { (eval echo "$as_me:2812: \"$ac_compile\"") >&5
2813   (eval $ac_compile) 2>&5
2814   ac_status=$?
2815   echo "$as_me:2815: \$? = $ac_status" >&5
2816   (exit $ac_status); } &&
2817          { ac_try='test -s conftest.$ac_objext'
2818   { (eval echo "$as_me:2818: \"$ac_try\"") >&5
2819   (eval $ac_try) 2>&5
2820   ac_status=$?
2821   echo "$as_me:2821: \$? = $ac_status" >&5
2822   (exit $ac_status); }; }; then
2823   ac_compiler_gnu=yes
2824 else
2825   echo "$as_me: failed program was:" >&5
2826 cat conftest.$ac_ext >&5
2827 ac_compiler_gnu=no
2828 fi
2829 rm -f conftest.$ac_objext conftest.$ac_ext
2830 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2831
2832 fi
2833 echo "$as_me:2833: result: $ac_cv_cxx_compiler_gnu" >&5
2834 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2835 GXX=`test $ac_compiler_gnu = yes && echo yes`
2836 ac_test_CXXFLAGS=${CXXFLAGS+set}
2837 ac_save_CXXFLAGS=$CXXFLAGS
2838 CXXFLAGS="-g"
2839 echo "$as_me:2839: checking whether $CXX accepts -g" >&5
2840 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2841 if test "${ac_cv_prog_cxx_g+set}" = set; then
2842   echo $ECHO_N "(cached) $ECHO_C" >&6
2843 else
2844   cat >conftest.$ac_ext <<_ACEOF
2845 #line 2845 "configure"
2846 #include "confdefs.h"
2847
2848 int
2849 main (void)
2850 {
2851
2852   ;
2853   return 0;
2854 }
2855 _ACEOF
2856 rm -f conftest.$ac_objext
2857 if { (eval echo "$as_me:2857: \"$ac_compile\"") >&5
2858   (eval $ac_compile) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); } &&
2862          { ac_try='test -s conftest.$ac_objext'
2863   { (eval echo "$as_me:2863: \"$ac_try\"") >&5
2864   (eval $ac_try) 2>&5
2865   ac_status=$?
2866   echo "$as_me:2866: \$? = $ac_status" >&5
2867   (exit $ac_status); }; }; then
2868   ac_cv_prog_cxx_g=yes
2869 else
2870   echo "$as_me: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2872 ac_cv_prog_cxx_g=no
2873 fi
2874 rm -f conftest.$ac_objext conftest.$ac_ext
2875 fi
2876 echo "$as_me:2876: result: $ac_cv_prog_cxx_g" >&5
2877 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2878 if test "$ac_test_CXXFLAGS" = set; then
2879   CXXFLAGS=$ac_save_CXXFLAGS
2880 elif test $ac_cv_prog_cxx_g = yes; then
2881   if test "$GXX" = yes; then
2882     CXXFLAGS="-g -O2"
2883   else
2884     CXXFLAGS="-g"
2885   fi
2886 else
2887   if test "$GXX" = yes; then
2888     CXXFLAGS="-O2"
2889   else
2890     CXXFLAGS=
2891   fi
2892 fi
2893 for ac_declaration in \
2894    ''\
2895    '#include <stdlib.h>' \
2896    'extern "C" void std::exit (int) throw (); using std::exit;' \
2897    'extern "C" void std::exit (int); using std::exit;' \
2898    'extern "C" void exit (int) throw ();' \
2899    'extern "C" void exit (int);' \
2900    'void exit (int);'
2901 do
2902   cat >conftest.$ac_ext <<_ACEOF
2903 #line 2903 "configure"
2904 #include "confdefs.h"
2905 #include <stdlib.h>
2906 $ac_declaration
2907 int
2908 main (void)
2909 {
2910 exit (42);
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 rm -f conftest.$ac_objext
2916 if { (eval echo "$as_me:2916: \"$ac_compile\"") >&5
2917   (eval $ac_compile) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); } &&
2921          { ac_try='test -s conftest.$ac_objext'
2922   { (eval echo "$as_me:2922: \"$ac_try\"") >&5
2923   (eval $ac_try) 2>&5
2924   ac_status=$?
2925   echo "$as_me:2925: \$? = $ac_status" >&5
2926   (exit $ac_status); }; }; then
2927   :
2928 else
2929   echo "$as_me: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2931 continue
2932 fi
2933 rm -f conftest.$ac_objext conftest.$ac_ext
2934   cat >conftest.$ac_ext <<_ACEOF
2935 #line 2935 "configure"
2936 #include "confdefs.h"
2937 $ac_declaration
2938 int
2939 main (void)
2940 {
2941 exit (42);
2942   ;
2943   return 0;
2944 }
2945 _ACEOF
2946 rm -f conftest.$ac_objext
2947 if { (eval echo "$as_me:2947: \"$ac_compile\"") >&5
2948   (eval $ac_compile) 2>&5
2949   ac_status=$?
2950   echo "$as_me:2950: \$? = $ac_status" >&5
2951   (exit $ac_status); } &&
2952          { ac_try='test -s conftest.$ac_objext'
2953   { (eval echo "$as_me:2953: \"$ac_try\"") >&5
2954   (eval $ac_try) 2>&5
2955   ac_status=$?
2956   echo "$as_me:2956: \$? = $ac_status" >&5
2957   (exit $ac_status); }; }; then
2958   break
2959 else
2960   echo "$as_me: failed program was:" >&5
2961 cat conftest.$ac_ext >&5
2962 fi
2963 rm -f conftest.$ac_objext conftest.$ac_ext
2964 done
2965 rm -rf conftest*
2966 if test -n "$ac_declaration"; then
2967   echo '#ifdef __cplusplus' >>confdefs.h
2968   echo $ac_declaration      >>confdefs.h
2969   echo '#endif'             >>confdefs.h
2970 fi
2971
2972 ac_ext=c
2973 ac_cpp='$CPP $CPPFLAGS'
2974 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2975 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2976 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2977 ac_main_return=return
2978
2979         ac_ext=cc
2980 ac_cpp='$CXXCPP $CPPFLAGS'
2981 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2982 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2983 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2984 ac_main_return=return
2985
2986         if test "x$cf_with_cxx" != xno
2987         then
2988                 # Several of the C++ configurations do not work, particularly when
2989                 # cross-compiling (20140913 -TD)
2990                 echo "$as_me:2990: checking if $CXX works" >&5
2991 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2992
2993                 save_CPPFLAGS="$CPPFLAGS"
2994                 eval cf_includedir=${includedir}
2995                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2996
2997 cat >conftest.$ac_ext <<_ACEOF
2998 #line 2998 "configure"
2999 #include "confdefs.h"
3000
3001 #include <stdlib.h>
3002 #include <stdio.h>
3003
3004 int
3005 main (void)
3006 {
3007
3008                 printf("Hello world!\n")
3009
3010   ;
3011   return 0;
3012 }
3013 _ACEOF
3014 rm -f conftest.$ac_objext
3015 if { (eval echo "$as_me:3015: \"$ac_compile\"") >&5
3016   (eval $ac_compile) 2>&5
3017   ac_status=$?
3018   echo "$as_me:3018: \$? = $ac_status" >&5
3019   (exit $ac_status); } &&
3020          { ac_try='test -s conftest.$ac_objext'
3021   { (eval echo "$as_me:3021: \"$ac_try\"") >&5
3022   (eval $ac_try) 2>&5
3023   ac_status=$?
3024   echo "$as_me:3024: \$? = $ac_status" >&5
3025   (exit $ac_status); }; }; then
3026   cf_cxx_works=yes
3027 else
3028   echo "$as_me: failed program was:" >&5
3029 cat conftest.$ac_ext >&5
3030 cf_cxx_works=no
3031 fi
3032 rm -f conftest.$ac_objext conftest.$ac_ext
3033                 CPPFLAGS="$save_CPPFLAGS"
3034
3035                 echo "$as_me:3035: result: $cf_cxx_works" >&5
3036 echo "${ECHO_T}$cf_cxx_works" >&6
3037                 if test "x$cf_cxx_works" = xno
3038                 then
3039                         { echo "$as_me:3039: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3040 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3041                         cf_with_cxx=no; CXX=""; GXX="";
3042                 fi
3043         fi
3044         ac_ext=c
3045 ac_cpp='$CPP $CPPFLAGS'
3046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3049 ac_main_return=return
3050
3051         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3052         if test "$CXX" = "g++" ; then
3053                 # Extract the first word of "g++", so it can be a program name with args.
3054 set dummy g++; ac_word=$2
3055 echo "$as_me:3055: checking for $ac_word" >&5
3056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3057 if test "${ac_cv_path_CXX+set}" = set; then
3058   echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060   case $CXX in
3061   [\\/]* | ?:[\\/]*)
3062   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3063   ;;
3064   *)
3065   ac_save_IFS=$IFS; IFS=$ac_path_separator
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068   IFS=$ac_save_IFS
3069   test -z "$ac_dir" && ac_dir=.
3070   if $as_executable_p "$ac_dir/$ac_word"; then
3071    ac_cv_path_CXX="$ac_dir/$ac_word"
3072    echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3073    break
3074 fi
3075 done
3076
3077   ;;
3078 esac
3079 fi
3080 CXX=$ac_cv_path_CXX
3081
3082 if test -n "$CXX"; then
3083   echo "$as_me:3083: result: $CXX" >&5
3084 echo "${ECHO_T}$CXX" >&6
3085 else
3086   echo "$as_me:3086: result: no" >&5
3087 echo "${ECHO_T}no" >&6
3088 fi
3089
3090         fi
3091         case "x$CXX" in
3092         (x|xg++)
3093                 { echo "$as_me:3093: WARNING: You don't have any C++ compiler, too bad" >&5
3094 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3095                 cf_with_cxx=no; CXX=""; GXX="";
3096                 ;;
3097         esac
3098 fi
3099
3100 GXX_VERSION=none
3101 if test "$GXX" = yes; then
3102         echo "$as_me:3102: checking version of ${CXX:-g++}" >&5
3103 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3104         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3105         if test -z "$GXX_VERSION"
3106         then
3107                 GXX_VERSION=unknown
3108                 GXX=no
3109         fi
3110         echo "$as_me:3110: result: $GXX_VERSION" >&5
3111 echo "${ECHO_T}$GXX_VERSION" >&6
3112 fi
3113
3114 case $GXX_VERSION in
3115 (1*|2.[0-6]*)
3116         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3117         # cf_cxx_library=no
3118         { echo "$as_me:3118: WARNING: templates do not work" >&5
3119 echo "$as_me: WARNING: templates do not work" >&2;}
3120         ;;
3121 esac
3122
3123 echo "$as_me:3123: checking if you want to build C++ binding and demo" >&5
3124 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3125
3126 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3127 if test "${with_cxx_binding+set}" = set; then
3128   withval="$with_cxx_binding"
3129   cf_with_cxx_binding=$withval
3130 else
3131   cf_with_cxx_binding=$cf_with_cxx
3132 fi;
3133 echo "$as_me:3133: result: $cf_with_cxx_binding" >&5
3134 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3135
3136 echo "$as_me:3136: checking if you want to build with Ada95" >&5
3137 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3138 echo "$as_me:3138: result: $cf_with_ada" >&5
3139 echo "${ECHO_T}$cf_with_ada" >&6
3140
3141 echo "$as_me:3141: checking if you want to install terminal database" >&5
3142 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3143
3144 # Check whether --enable-db-install or --disable-db-install was given.
3145 if test "${enable_db_install+set}" = set; then
3146   enableval="$enable_db_install"
3147   cf_with_db_install=$enableval
3148 else
3149   cf_with_db_install=yes
3150 fi;
3151 echo "$as_me:3151: result: $cf_with_db_install" >&5
3152 echo "${ECHO_T}$cf_with_db_install" >&6
3153
3154 echo "$as_me:3154: checking if you want to install manpages" >&5
3155 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3156
3157 # Check whether --with-manpages or --without-manpages was given.
3158 if test "${with_manpages+set}" = set; then
3159   withval="$with_manpages"
3160   cf_with_manpages=$withval
3161 else
3162   cf_with_manpages=yes
3163 fi;
3164 echo "$as_me:3164: result: $cf_with_manpages" >&5
3165 echo "${ECHO_T}$cf_with_manpages" >&6
3166
3167 echo "$as_me:3167: checking if you want to build programs such as tic" >&5
3168 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3169
3170 # Check whether --with-progs or --without-progs was given.
3171 if test "${with_progs+set}" = set; then
3172   withval="$with_progs"
3173   cf_with_progs=$withval
3174 else
3175   cf_with_progs=yes
3176 fi;
3177 echo "$as_me:3177: result: $cf_with_progs" >&5
3178 echo "${ECHO_T}$cf_with_progs" >&6
3179
3180 if test -f $srcdir/tack/tack.h; then
3181         if test "x$cross_compiling" = xyes ; then
3182                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3183
3184 echo "${as_me:-configure}:3184: testing ignoring tack because we are cross-compiling ..." 1>&5
3185
3186                 cf_with_tack=no
3187         else
3188                 echo "$as_me:3188: checking if you want to build the tack program" >&5
3189 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3190
3191 # Check whether --with-tack or --without-tack was given.
3192 if test "${with_tack+set}" = set; then
3193   withval="$with_tack"
3194   cf_with_tack=$withval
3195 else
3196   cf_with_tack=$cf_with_progs
3197 fi;
3198                 echo "$as_me:3198: result: $cf_with_tack" >&5
3199 echo "${ECHO_T}$cf_with_tack" >&6
3200         fi
3201 else
3202         cf_with_tack=no
3203 fi
3204
3205 echo "$as_me:3205: checking if you want to build test-programs" >&5
3206 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3207
3208 # Check whether --with-tests or --without-tests was given.
3209 if test "${with_tests+set}" = set; then
3210   withval="$with_tests"
3211   cf_with_tests=$withval
3212 else
3213   cf_with_tests=yes
3214 fi;
3215 echo "$as_me:3215: result: $cf_with_tests" >&5
3216 echo "${ECHO_T}$cf_with_tests" >&6
3217
3218 echo "$as_me:3218: checking if you wish to install curses.h" >&5
3219 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3220
3221 # Check whether --with-curses-h or --without-curses-h was given.
3222 if test "${with_curses_h+set}" = set; then
3223   withval="$with_curses_h"
3224   with_curses_h=$withval
3225 else
3226   with_curses_h=yes
3227 fi;
3228 echo "$as_me:3228: result: $with_curses_h" >&5
3229 echo "${ECHO_T}$with_curses_h" >&6
3230
3231 modules_to_build="ncurses"
3232 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3233 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3234 modules_to_build="$modules_to_build panel menu form"
3235
3236 test "$program_prefix" != NONE &&
3237   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3238 # Use a double $ so make ignores it.
3239 test "$program_suffix" != NONE &&
3240   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3241 # Double any \ or $.  echo might interpret backslashes.
3242 # By default was `s,x,x', remove it if useless.
3243 cat <<\_ACEOF >conftest.sed
3244 s/[\\$]/&&/g;s/;s,x,x,$//
3245 _ACEOF
3246 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3247 rm conftest.sed
3248
3249 for ac_prog in mawk gawk nawk awk
3250 do
3251   # Extract the first word of "$ac_prog", so it can be a program name with args.
3252 set dummy $ac_prog; ac_word=$2
3253 echo "$as_me:3253: checking for $ac_word" >&5
3254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3255 if test "${ac_cv_prog_AWK+set}" = set; then
3256   echo $ECHO_N "(cached) $ECHO_C" >&6
3257 else
3258   if test -n "$AWK"; then
3259   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3260 else
3261   ac_save_IFS=$IFS; IFS=$ac_path_separator
3262 ac_dummy="$PATH"
3263 for ac_dir in $ac_dummy; do
3264   IFS=$ac_save_IFS
3265   test -z "$ac_dir" && ac_dir=.
3266   $as_executable_p "$ac_dir/$ac_word" || continue
3267 ac_cv_prog_AWK="$ac_prog"
3268 echo "$as_me:3268: found $ac_dir/$ac_word" >&5
3269 break
3270 done
3271
3272 fi
3273 fi
3274 AWK=$ac_cv_prog_AWK
3275 if test -n "$AWK"; then
3276   echo "$as_me:3276: result: $AWK" >&5
3277 echo "${ECHO_T}$AWK" >&6
3278 else
3279   echo "$as_me:3279: result: no" >&5
3280 echo "${ECHO_T}no" >&6
3281 fi
3282
3283   test -n "$AWK" && break
3284 done
3285
3286 test -z "$AWK" && { { echo "$as_me:3286: error: No awk program found" >&5
3287 echo "$as_me: error: No awk program found" >&2;}
3288    { (exit 1); exit 1; }; }
3289
3290 echo "$as_me:3290: checking for egrep" >&5
3291 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3292 if test "${ac_cv_prog_egrep+set}" = set; then
3293   echo $ECHO_N "(cached) $ECHO_C" >&6
3294 else
3295   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3296                 then ac_cv_prog_egrep='grep -E'
3297                 else ac_cv_prog_egrep='egrep'
3298         fi
3299 fi
3300 echo "$as_me:3300: result: $ac_cv_prog_egrep" >&5
3301 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3302         EGREP=$ac_cv_prog_egrep
3303
3304         test -z "$EGREP" && { { echo "$as_me:3304: error: No egrep program found" >&5
3305 echo "$as_me: error: No egrep program found" >&2;}
3306    { (exit 1); exit 1; }; }
3307
3308 # Find a good install program.  We prefer a C program (faster),
3309 # so one script is as good as another.  But avoid the broken or
3310 # incompatible versions:
3311 # SysV /etc/install, /usr/sbin/install
3312 # SunOS /usr/etc/install
3313 # IRIX /sbin/install
3314 # AIX /bin/install
3315 # AmigaOS /C/install, which installs bootblocks on floppy discs
3316 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3317 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3318 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3319 # ./install, which can be erroneously created by make from ./install.sh.
3320 echo "$as_me:3320: checking for a BSD compatible install" >&5
3321 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3322 if test -z "$INSTALL"; then
3323 if test "${ac_cv_path_install+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326     ac_save_IFS=$IFS; IFS=$ac_path_separator
3327   for ac_dir in $PATH; do
3328     IFS=$ac_save_IFS
3329     # Account for people who put trailing slashes in PATH elements.
3330     case $ac_dir/ in
3331     / | ./ | .// | /cC/* \
3332     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3333     | /usr/ucb/* ) ;;
3334     *)
3335       # OSF1 and SCO ODT 3.0 have their own names for install.
3336       # Don't use installbsd from OSF since it installs stuff as root
3337       # by default.
3338       for ac_prog in ginstall scoinst install; do
3339         if $as_executable_p "$ac_dir/$ac_prog"; then
3340           if test $ac_prog = install &&
3341             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3342             # AIX install.  It has an incompatible calling convention.
3343             :
3344           elif test $ac_prog = install &&
3345             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3346             # program-specific install script used by HP pwplus--don't use.
3347             :
3348           else
3349             ac_cv_path_install="$ac_dir/$ac_prog -c"
3350             break 2
3351           fi
3352         fi
3353       done
3354       ;;
3355     esac
3356   done
3357
3358 fi
3359   if test "${ac_cv_path_install+set}" = set; then
3360     INSTALL=$ac_cv_path_install
3361   else
3362     # As a last resort, use the slow shell script.  We don't cache a
3363     # path for INSTALL within a source directory, because that will
3364     # break other packages using the cache if that directory is
3365     # removed, or if the path is relative.
3366     INSTALL=$ac_install_sh
3367   fi
3368 fi
3369 echo "$as_me:3369: result: $INSTALL" >&5
3370 echo "${ECHO_T}$INSTALL" >&6
3371
3372 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3373 # It thinks the first close brace ends the variable substitution.
3374 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3375
3376 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3377
3378 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3379
3380 case $INSTALL in
3381 (/*)
3382         ;;
3383 (*)
3384         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3385         test -z "$cf_dir" && cf_dir=.
3386         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3387         ;;
3388 esac
3389
3390 for ac_prog in lint cppcheck splint
3391 do
3392   # Extract the first word of "$ac_prog", so it can be a program name with args.
3393 set dummy $ac_prog; ac_word=$2
3394 echo "$as_me:3394: checking for $ac_word" >&5
3395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396 if test "${ac_cv_prog_LINT+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   if test -n "$LINT"; then
3400   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3401 else
3402   ac_save_IFS=$IFS; IFS=$ac_path_separator
3403 ac_dummy="$PATH"
3404 for ac_dir in $ac_dummy; do
3405   IFS=$ac_save_IFS
3406   test -z "$ac_dir" && ac_dir=.
3407   $as_executable_p "$ac_dir/$ac_word" || continue
3408 ac_cv_prog_LINT="$ac_prog"
3409 echo "$as_me:3409: found $ac_dir/$ac_word" >&5
3410 break
3411 done
3412
3413 fi
3414 fi
3415 LINT=$ac_cv_prog_LINT
3416 if test -n "$LINT"; then
3417   echo "$as_me:3417: result: $LINT" >&5
3418 echo "${ECHO_T}$LINT" >&6
3419 else
3420   echo "$as_me:3420: result: no" >&5
3421 echo "${ECHO_T}no" >&6
3422 fi
3423
3424   test -n "$LINT" && break
3425 done
3426
3427 echo "$as_me:3427: checking whether ln -s works" >&5
3428 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3429 LN_S=$as_ln_s
3430 if test "$LN_S" = "ln -s"; then
3431   echo "$as_me:3431: result: yes" >&5
3432 echo "${ECHO_T}yes" >&6
3433 else
3434   echo "$as_me:3434: result: no, using $LN_S" >&5
3435 echo "${ECHO_T}no, using $LN_S" >&6
3436 fi
3437
3438 echo "$as_me:3438: checking if $LN_S -f options work" >&5
3439 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3440
3441 rm -f conf$$.src conf$$dst
3442 echo >conf$$.dst
3443 echo first >conf$$.src
3444 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3445         cf_prog_ln_sf=yes
3446 else
3447         cf_prog_ln_sf=no
3448 fi
3449 rm -f conf$$.dst conf$$src
3450 echo "$as_me:3450: result: $cf_prog_ln_sf" >&5
3451 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3452
3453 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3454
3455 echo "$as_me:3455: checking for long file names" >&5
3456 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3457 if test "${ac_cv_sys_long_file_names+set}" = set; then
3458   echo $ECHO_N "(cached) $ECHO_C" >&6
3459 else
3460   ac_cv_sys_long_file_names=yes
3461 # Test for long file names in all the places we know might matter:
3462 #      .                the current directory, where building will happen
3463 #      $prefix/lib      where we will be installing things
3464 #      $exec_prefix/lib likewise
3465 # eval it to expand exec_prefix.
3466 #      $TMPDIR          if set, where it might want to write temporary files
3467 # if $TMPDIR is not set:
3468 #      /tmp             where it might want to write temporary files
3469 #      /var/tmp         likewise
3470 #      /usr/tmp         likewise
3471 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3472   ac_tmpdirs=$TMPDIR
3473 else
3474   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3475 fi
3476 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3477   test -d $ac_dir || continue
3478   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3479   ac_xdir=$ac_dir/cf$$
3480   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3481   ac_tf1=$ac_xdir/conftest9012345
3482   ac_tf2=$ac_xdir/conftest9012346
3483   (echo 1 >$ac_tf1) 2>/dev/null
3484   (echo 2 >$ac_tf2) 2>/dev/null
3485   ac_val=`cat $ac_tf1 2>/dev/null`
3486   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3487     ac_cv_sys_long_file_names=no
3488     rm -rf $ac_xdir 2>/dev/null
3489     break
3490   fi
3491   rm -rf $ac_xdir 2>/dev/null
3492 done
3493 fi
3494 echo "$as_me:3494: result: $ac_cv_sys_long_file_names" >&5
3495 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3496 if test $ac_cv_sys_long_file_names = yes; then
3497
3498 cat >>confdefs.h <<\EOF
3499 #define HAVE_LONG_FILE_NAMES 1
3500 EOF
3501
3502 fi
3503
3504 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3505 # of package conflict.
3506 cf_config_suffix=
3507
3508 # Check whether --with-config-suffix or --without-config-suffix was given.
3509 if test "${with_config_suffix+set}" = set; then
3510   withval="$with_config_suffix"
3511   case "x$withval" in
3512         (xyes|xno)
3513                 { echo "$as_me:3513: WARNING: expected a value for config-suffix option" >&5
3514 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3515                 ;;
3516         (*)     cf_config_suffix="$withval"
3517                 ;;
3518         esac
3519 fi;
3520
3521 # If we find pkg-config, check if we should install the ".pc" files.
3522
3523 echo "$as_me:3523: checking if you want to use pkg-config" >&5
3524 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3525
3526 # Check whether --with-pkg-config or --without-pkg-config was given.
3527 if test "${with_pkg_config+set}" = set; then
3528   withval="$with_pkg_config"
3529   cf_pkg_config=$withval
3530 else
3531   cf_pkg_config=yes
3532 fi;
3533 echo "$as_me:3533: result: $cf_pkg_config" >&5
3534 echo "${ECHO_T}$cf_pkg_config" >&6
3535
3536 case $cf_pkg_config in
3537 (no)
3538         PKG_CONFIG=none
3539         ;;
3540 (yes)
3541
3542 if test -n "$ac_tool_prefix"; then
3543   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3544 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3545 echo "$as_me:3545: checking for $ac_word" >&5
3546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3547 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3548   echo $ECHO_N "(cached) $ECHO_C" >&6
3549 else
3550   case $PKG_CONFIG in
3551   [\\/]* | ?:[\\/]*)
3552   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3553   ;;
3554   *)
3555   ac_save_IFS=$IFS; IFS=$ac_path_separator
3556 ac_dummy="$PATH"
3557 for ac_dir in $ac_dummy; do
3558   IFS=$ac_save_IFS
3559   test -z "$ac_dir" && ac_dir=.
3560   if $as_executable_p "$ac_dir/$ac_word"; then
3561    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3562    echo "$as_me:3562: found $ac_dir/$ac_word" >&5
3563    break
3564 fi
3565 done
3566
3567   ;;
3568 esac
3569 fi
3570 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3571
3572 if test -n "$PKG_CONFIG"; then
3573   echo "$as_me:3573: result: $PKG_CONFIG" >&5
3574 echo "${ECHO_T}$PKG_CONFIG" >&6
3575 else
3576   echo "$as_me:3576: result: no" >&5
3577 echo "${ECHO_T}no" >&6
3578 fi
3579
3580 fi
3581 if test -z "$ac_cv_path_PKG_CONFIG"; then
3582   ac_pt_PKG_CONFIG=$PKG_CONFIG
3583   # Extract the first word of "pkg-config", so it can be a program name with args.
3584 set dummy pkg-config; ac_word=$2
3585 echo "$as_me:3585: checking for $ac_word" >&5
3586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3587 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3588   echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590   case $ac_pt_PKG_CONFIG in
3591   [\\/]* | ?:[\\/]*)
3592   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3593   ;;
3594   *)
3595   ac_save_IFS=$IFS; IFS=$ac_path_separator
3596 ac_dummy="$PATH"
3597 for ac_dir in $ac_dummy; do
3598   IFS=$ac_save_IFS
3599   test -z "$ac_dir" && ac_dir=.
3600   if $as_executable_p "$ac_dir/$ac_word"; then
3601    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3602    echo "$as_me:3602: found $ac_dir/$ac_word" >&5
3603    break
3604 fi
3605 done
3606
3607   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3608   ;;
3609 esac
3610 fi
3611 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3612
3613 if test -n "$ac_pt_PKG_CONFIG"; then
3614   echo "$as_me:3614: result: $ac_pt_PKG_CONFIG" >&5
3615 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3616 else
3617   echo "$as_me:3617: result: no" >&5
3618 echo "${ECHO_T}no" >&6
3619 fi
3620
3621   PKG_CONFIG=$ac_pt_PKG_CONFIG
3622 else
3623   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3624 fi
3625
3626         ;;
3627 (*)
3628         PKG_CONFIG=$withval
3629         ;;
3630 esac
3631
3632 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3633 if test "$PKG_CONFIG" != none ; then
3634
3635 if test "x$prefix" != xNONE; then
3636         cf_path_syntax="$prefix"
3637 else
3638         cf_path_syntax="$ac_default_prefix"
3639 fi
3640
3641 case ".$PKG_CONFIG" in
3642 (.\$\(*\)*|.\'*\'*)
3643         ;;
3644 (..|./*|.\\*)
3645         ;;
3646 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3647         ;;
3648 (.\${*prefix}*|.\${*dir}*)
3649         eval PKG_CONFIG="$PKG_CONFIG"
3650         case ".$PKG_CONFIG" in
3651         (.NONE/*)
3652                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3653                 ;;
3654         esac
3655         ;;
3656 (.no|.NONE/*)
3657         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3658         ;;
3659 (*)
3660         { { echo "$as_me:3660: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3661 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3662    { (exit 1); exit 1; }; }
3663         ;;
3664 esac
3665
3666 elif test "x$cf_pkg_config" != xno ; then
3667         { echo "$as_me:3667: WARNING: pkg-config is not installed" >&5
3668 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3669 fi
3670
3671 case $PKG_CONFIG in
3672 (no|none|yes)
3673         echo "$as_me:3673: checking for pkg-config library directory" >&5
3674 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3675         ;;
3676 (*)
3677         echo "$as_me:3677: checking for $PKG_CONFIG library directory" >&5
3678 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3679         ;;
3680 esac
3681
3682 PKG_CONFIG_LIBDIR=no
3683
3684 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3685 if test "${with_pkg_config_libdir+set}" = set; then
3686   withval="$with_pkg_config_libdir"
3687   PKG_CONFIG_LIBDIR=$withval
3688 else
3689   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3690 fi;
3691
3692 case x$PKG_CONFIG_LIBDIR in
3693 (x/*)
3694         ;;
3695 (xyes)
3696         # Look for the library directory using the same prefix as the executable
3697         if test "x$PKG_CONFIG" = xnone
3698         then
3699                 cf_path=$prefix
3700         else
3701                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3702         fi
3703
3704         # If you don't like using the default architecture, you have to specify the
3705         # intended library directory and corresponding compiler/linker options.
3706         #
3707         # This case allows for Debian's 2014-flavor of multiarch, along with the
3708         # most common variations before that point.  Some other variants spell the
3709         # directory differently, e.g., "pkg-config", and put it in unusual places.
3710         # pkg-config has always been poorly standardized, which is ironic...
3711         case x`(arch) 2>/dev/null` in
3712         (*64)
3713                 cf_search_path="\
3714                         $cf_path/lib/*64-linux-gnu \
3715                         $cf_path/share \
3716                         $cf_path/lib64 \
3717                         $cf_path/lib32 \
3718                         $cf_path/lib"
3719                 ;;
3720         (*)
3721                 cf_search_path="\
3722                         $cf_path/lib/*-linux-gnu \
3723                         $cf_path/share \
3724                         $cf_path/lib32 \
3725                         $cf_path/lib \
3726                         $cf_path/libdata"
3727                 ;;
3728         esac
3729
3730         test -n "$verbose" && echo "    list..." 1>&6
3731
3732 echo "${as_me:-configure}:3732: testing list... ..." 1>&5
3733
3734         for cf_config in $cf_search_path
3735         do
3736                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3737
3738 echo "${as_me:-configure}:3738: testing checking $cf_config/pkgconfig ..." 1>&5
3739
3740                 if test -d $cf_config/pkgconfig
3741                 then
3742                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3743                         echo "$as_me:3743: checking done" >&5
3744 echo $ECHO_N "checking done... $ECHO_C" >&6
3745                         break
3746                 fi
3747         done
3748         ;;
3749 (*)
3750         ;;
3751 esac
3752
3753 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3754         echo "$as_me:3754: result: $PKG_CONFIG_LIBDIR" >&5
3755 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3756 fi
3757
3758 if test "x$PKG_CONFIG" != xnone
3759 then
3760         echo "$as_me:3760: checking if we should install .pc files for $PKG_CONFIG" >&5
3761 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3762 else
3763         echo "$as_me:3763: checking if we should install .pc files" >&5
3764 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3765 fi
3766
3767 # Check whether --enable-pc-files or --disable-pc-files was given.
3768 if test "${enable_pc_files+set}" = set; then
3769   enableval="$enable_pc_files"
3770   enable_pc_files=$enableval
3771 else
3772   enable_pc_files=no
3773 fi;
3774 echo "$as_me:3774: result: $enable_pc_files" >&5
3775 echo "${ECHO_T}$enable_pc_files" >&6
3776
3777 if test "x$enable_pc_files" != xno
3778 then
3779         MAKE_PC_FILES=
3780         case "x$PKG_CONFIG_LIBDIR" in
3781         (xno|xyes)
3782                 { echo "$as_me:3782: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3783 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3784                 ;;
3785         (*)
3786
3787 if test "x$prefix" != xNONE; then
3788         cf_path_syntax="$prefix"
3789 else
3790         cf_path_syntax="$ac_default_prefix"
3791 fi
3792
3793 case ".$PKG_CONFIG_LIBDIR" in
3794 (.\$\(*\)*|.\'*\'*)
3795         ;;
3796 (..|./*|.\\*)
3797         ;;
3798 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3799         ;;
3800 (.\${*prefix}*|.\${*dir}*)
3801         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3802         case ".$PKG_CONFIG_LIBDIR" in
3803         (.NONE/*)
3804                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3805                 ;;
3806         esac
3807         ;;
3808 (.no|.NONE/*)
3809         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3810         ;;
3811 (*)
3812         { { echo "$as_me:3812: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3813 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3814    { (exit 1); exit 1; }; }
3815         ;;
3816 esac
3817
3818                 ;;
3819         esac
3820 else
3821         MAKE_PC_FILES="#"
3822 fi
3823
3824 if test -z "$MAKE_PC_FILES"
3825 then
3826         echo "$as_me:3826: checking for suffix to add to pc-files" >&5
3827 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3828
3829 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3830 if test "${with_pc_suffix+set}" = set; then
3831   withval="$with_pc_suffix"
3832   case "x$withval" in
3833         (xyes|xno)
3834                 PC_MODULE_SUFFIX=
3835                 ;;
3836         (*)     PC_MODULE_SUFFIX="$withval"
3837                 ;;
3838         esac
3839 fi;
3840         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3841         echo "$as_me:3841: result: $PC_MODULE_SUFFIX" >&5
3842 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3843         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3844
3845 fi
3846
3847 echo "$as_me:3847: checking if we should assume mixed-case filenames" >&5
3848 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3849
3850 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3851 if test "${enable_mixed_case+set}" = set; then
3852   enableval="$enable_mixed_case"
3853   enable_mixedcase=$enableval
3854 else
3855   enable_mixedcase=auto
3856 fi;
3857 echo "$as_me:3857: result: $enable_mixedcase" >&5
3858 echo "${ECHO_T}$enable_mixedcase" >&6
3859 if test "$enable_mixedcase" = "auto" ; then
3860
3861 echo "$as_me:3861: checking if filesystem supports mixed-case filenames" >&5
3862 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3863 if test "${cf_cv_mixedcase+set}" = set; then
3864   echo $ECHO_N "(cached) $ECHO_C" >&6
3865 else
3866
3867 if test "$cross_compiling" = yes ; then
3868         case $target_alias in
3869         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3870                 cf_cv_mixedcase=no
3871                 ;;
3872         (*)
3873                 cf_cv_mixedcase=yes
3874                 ;;
3875         esac
3876 else
3877         rm -f conftest CONFTEST
3878         echo test >conftest
3879         if test -f CONFTEST ; then
3880                 cf_cv_mixedcase=no
3881         else
3882                 cf_cv_mixedcase=yes
3883         fi
3884         rm -f conftest CONFTEST
3885 fi
3886
3887 fi
3888 echo "$as_me:3888: result: $cf_cv_mixedcase" >&5
3889 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3890 test "$cf_cv_mixedcase" = yes &&
3891 cat >>confdefs.h <<\EOF
3892 #define MIXEDCASE_FILENAMES 1
3893 EOF
3894
3895 else
3896         cf_cv_mixedcase=$enable_mixedcase
3897         if test "x$enable_mixedcase" = "xyes" ; then
3898
3899 cat >>confdefs.h <<\EOF
3900 #define MIXEDCASE_FILENAMES 1
3901 EOF
3902
3903         fi
3904 fi
3905
3906 # do this after mixed-case option (tags/TAGS is not as important as tic).
3907 echo "$as_me:3907: checking whether ${MAKE-make} sets \${MAKE}" >&5
3908 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3909 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3910 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3911   echo $ECHO_N "(cached) $ECHO_C" >&6
3912 else
3913   cat >conftest.make <<\EOF
3914 all:
3915         @echo 'ac_maketemp="${MAKE}"'
3916 EOF
3917 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3918 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3919 if test -n "$ac_maketemp"; then
3920   eval ac_cv_prog_make_${ac_make}_set=yes
3921 else
3922   eval ac_cv_prog_make_${ac_make}_set=no
3923 fi
3924 rm -f conftest.make
3925 fi
3926 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3927   echo "$as_me:3927: result: yes" >&5
3928 echo "${ECHO_T}yes" >&6
3929   SET_MAKE=
3930 else
3931   echo "$as_me:3931: result: no" >&5
3932 echo "${ECHO_T}no" >&6
3933   SET_MAKE="MAKE=${MAKE-make}"
3934 fi
3935
3936 for ac_prog in exctags ctags
3937 do
3938   # Extract the first word of "$ac_prog", so it can be a program name with args.
3939 set dummy $ac_prog; ac_word=$2
3940 echo "$as_me:3940: checking for $ac_word" >&5
3941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942 if test "${ac_cv_prog_CTAGS+set}" = set; then
3943   echo $ECHO_N "(cached) $ECHO_C" >&6
3944 else
3945   if test -n "$CTAGS"; then
3946   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3947 else
3948   ac_save_IFS=$IFS; IFS=$ac_path_separator
3949 ac_dummy="$PATH"
3950 for ac_dir in $ac_dummy; do
3951   IFS=$ac_save_IFS
3952   test -z "$ac_dir" && ac_dir=.
3953   $as_executable_p "$ac_dir/$ac_word" || continue
3954 ac_cv_prog_CTAGS="$ac_prog"
3955 echo "$as_me:3955: found $ac_dir/$ac_word" >&5
3956 break
3957 done
3958
3959 fi
3960 fi
3961 CTAGS=$ac_cv_prog_CTAGS
3962 if test -n "$CTAGS"; then
3963   echo "$as_me:3963: result: $CTAGS" >&5
3964 echo "${ECHO_T}$CTAGS" >&6
3965 else
3966   echo "$as_me:3966: result: no" >&5
3967 echo "${ECHO_T}no" >&6
3968 fi
3969
3970   test -n "$CTAGS" && break
3971 done
3972
3973 for ac_prog in exetags etags
3974 do
3975   # Extract the first word of "$ac_prog", so it can be a program name with args.
3976 set dummy $ac_prog; ac_word=$2
3977 echo "$as_me:3977: checking for $ac_word" >&5
3978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3979 if test "${ac_cv_prog_ETAGS+set}" = set; then
3980   echo $ECHO_N "(cached) $ECHO_C" >&6
3981 else
3982   if test -n "$ETAGS"; then
3983   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3984 else
3985   ac_save_IFS=$IFS; IFS=$ac_path_separator
3986 ac_dummy="$PATH"
3987 for ac_dir in $ac_dummy; do
3988   IFS=$ac_save_IFS
3989   test -z "$ac_dir" && ac_dir=.
3990   $as_executable_p "$ac_dir/$ac_word" || continue
3991 ac_cv_prog_ETAGS="$ac_prog"
3992 echo "$as_me:3992: found $ac_dir/$ac_word" >&5
3993 break
3994 done
3995
3996 fi
3997 fi
3998 ETAGS=$ac_cv_prog_ETAGS
3999 if test -n "$ETAGS"; then
4000   echo "$as_me:4000: result: $ETAGS" >&5
4001 echo "${ECHO_T}$ETAGS" >&6
4002 else
4003   echo "$as_me:4003: result: no" >&5
4004 echo "${ECHO_T}no" >&6
4005 fi
4006
4007   test -n "$ETAGS" && break
4008 done
4009
4010 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4011 set dummy ${CTAGS:-ctags}; ac_word=$2
4012 echo "$as_me:4012: checking for $ac_word" >&5
4013 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4014 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4015   echo $ECHO_N "(cached) $ECHO_C" >&6
4016 else
4017   if test -n "$MAKE_LOWER_TAGS"; then
4018   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4019 else
4020   ac_save_IFS=$IFS; IFS=$ac_path_separator
4021 ac_dummy="$PATH"
4022 for ac_dir in $ac_dummy; do
4023   IFS=$ac_save_IFS
4024   test -z "$ac_dir" && ac_dir=.
4025   $as_executable_p "$ac_dir/$ac_word" || continue
4026 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4027 echo "$as_me:4027: found $ac_dir/$ac_word" >&5
4028 break
4029 done
4030
4031   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4032 fi
4033 fi
4034 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4035 if test -n "$MAKE_LOWER_TAGS"; then
4036   echo "$as_me:4036: result: $MAKE_LOWER_TAGS" >&5
4037 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4038 else
4039   echo "$as_me:4039: result: no" >&5
4040 echo "${ECHO_T}no" >&6
4041 fi
4042
4043 if test "$cf_cv_mixedcase" = yes ; then
4044         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4045 set dummy ${ETAGS:-etags}; ac_word=$2
4046 echo "$as_me:4046: checking for $ac_word" >&5
4047 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4048 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4049   echo $ECHO_N "(cached) $ECHO_C" >&6
4050 else
4051   if test -n "$MAKE_UPPER_TAGS"; then
4052   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4053 else
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   $as_executable_p "$ac_dir/$ac_word" || continue
4060 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4061 echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062 break
4063 done
4064
4065   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4066 fi
4067 fi
4068 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4069 if test -n "$MAKE_UPPER_TAGS"; then
4070   echo "$as_me:4070: result: $MAKE_UPPER_TAGS" >&5
4071 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4072 else
4073   echo "$as_me:4073: result: no" >&5
4074 echo "${ECHO_T}no" >&6
4075 fi
4076
4077 else
4078         MAKE_UPPER_TAGS=no
4079 fi
4080
4081 if test "$MAKE_UPPER_TAGS" = yes ; then
4082         MAKE_UPPER_TAGS=
4083 else
4084         MAKE_UPPER_TAGS="#"
4085 fi
4086
4087 if test "$MAKE_LOWER_TAGS" = yes ; then
4088         MAKE_LOWER_TAGS=
4089 else
4090         MAKE_LOWER_TAGS="#"
4091 fi
4092
4093 echo "$as_me:4093: checking for makeflags variable" >&5
4094 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4095 if test "${cf_cv_makeflags+set}" = set; then
4096   echo $ECHO_N "(cached) $ECHO_C" >&6
4097 else
4098
4099         cf_cv_makeflags=''
4100         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4101         do
4102                 cat >cf_makeflags.tmp <<CF_EOF
4103 SHELL = $SHELL
4104 all :
4105         @ echo '.$cf_option'
4106 CF_EOF
4107                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4108                 case "$cf_result" in
4109                 (.*k|.*kw)
4110                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4111                         case "$cf_result" in
4112                         (.*CC=*)        cf_cv_makeflags=
4113                                 ;;
4114                         (*)     cf_cv_makeflags=$cf_option
4115                                 ;;
4116                         esac
4117                         break
4118                         ;;
4119                 (.-)    ;;
4120                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4121                         ;;
4122                 esac
4123         done
4124         rm -f cf_makeflags.tmp
4125
4126 fi
4127 echo "$as_me:4127: result: $cf_cv_makeflags" >&5
4128 echo "${ECHO_T}$cf_cv_makeflags" >&6
4129
4130 if test -n "$ac_tool_prefix"; then
4131   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4132 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4133 echo "$as_me:4133: checking for $ac_word" >&5
4134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4135 if test "${ac_cv_prog_RANLIB+set}" = set; then
4136   echo $ECHO_N "(cached) $ECHO_C" >&6
4137 else
4138   if test -n "$RANLIB"; then
4139   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4140 else
4141   ac_save_IFS=$IFS; IFS=$ac_path_separator
4142 ac_dummy="$PATH"
4143 for ac_dir in $ac_dummy; do
4144   IFS=$ac_save_IFS
4145   test -z "$ac_dir" && ac_dir=.
4146   $as_executable_p "$ac_dir/$ac_word" || continue
4147 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4148 echo "$as_me:4148: found $ac_dir/$ac_word" >&5
4149 break
4150 done
4151
4152 fi
4153 fi
4154 RANLIB=$ac_cv_prog_RANLIB
4155 if test -n "$RANLIB"; then
4156   echo "$as_me:4156: result: $RANLIB" >&5
4157 echo "${ECHO_T}$RANLIB" >&6
4158 else
4159   echo "$as_me:4159: result: no" >&5
4160 echo "${ECHO_T}no" >&6
4161 fi
4162
4163 fi
4164 if test -z "$ac_cv_prog_RANLIB"; then
4165   ac_ct_RANLIB=$RANLIB
4166   # Extract the first word of "ranlib", so it can be a program name with args.
4167 set dummy ranlib; ac_word=$2
4168 echo "$as_me:4168: checking for $ac_word" >&5
4169 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4170 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4171   echo $ECHO_N "(cached) $ECHO_C" >&6
4172 else
4173   if test -n "$ac_ct_RANLIB"; then
4174   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4175 else
4176   ac_save_IFS=$IFS; IFS=$ac_path_separator
4177 ac_dummy="$PATH"
4178 for ac_dir in $ac_dummy; do
4179   IFS=$ac_save_IFS
4180   test -z "$ac_dir" && ac_dir=.
4181   $as_executable_p "$ac_dir/$ac_word" || continue
4182 ac_cv_prog_ac_ct_RANLIB="ranlib"
4183 echo "$as_me:4183: found $ac_dir/$ac_word" >&5
4184 break
4185 done
4186
4187   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4188 fi
4189 fi
4190 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4191 if test -n "$ac_ct_RANLIB"; then
4192   echo "$as_me:4192: result: $ac_ct_RANLIB" >&5
4193 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4194 else
4195   echo "$as_me:4195: result: no" >&5
4196 echo "${ECHO_T}no" >&6
4197 fi
4198
4199   RANLIB=$ac_ct_RANLIB
4200 else
4201   RANLIB="$ac_cv_prog_RANLIB"
4202 fi
4203
4204 if test -n "$ac_tool_prefix"; then
4205   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4206 set dummy ${ac_tool_prefix}ld; ac_word=$2
4207 echo "$as_me:4207: checking for $ac_word" >&5
4208 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4209 if test "${ac_cv_prog_LD+set}" = set; then
4210   echo $ECHO_N "(cached) $ECHO_C" >&6
4211 else
4212   if test -n "$LD"; then
4213   ac_cv_prog_LD="$LD" # Let the user override the test.
4214 else
4215   ac_save_IFS=$IFS; IFS=$ac_path_separator
4216 ac_dummy="$PATH"
4217 for ac_dir in $ac_dummy; do
4218   IFS=$ac_save_IFS
4219   test -z "$ac_dir" && ac_dir=.
4220   $as_executable_p "$ac_dir/$ac_word" || continue
4221 ac_cv_prog_LD="${ac_tool_prefix}ld"
4222 echo "$as_me:4222: found $ac_dir/$ac_word" >&5
4223 break
4224 done
4225
4226 fi
4227 fi
4228 LD=$ac_cv_prog_LD
4229 if test -n "$LD"; then
4230   echo "$as_me:4230: result: $LD" >&5
4231 echo "${ECHO_T}$LD" >&6
4232 else
4233   echo "$as_me:4233: result: no" >&5
4234 echo "${ECHO_T}no" >&6
4235 fi
4236
4237 fi
4238 if test -z "$ac_cv_prog_LD"; then
4239   ac_ct_LD=$LD
4240   # Extract the first word of "ld", so it can be a program name with args.
4241 set dummy ld; ac_word=$2
4242 echo "$as_me:4242: checking for $ac_word" >&5
4243 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4244 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4245   echo $ECHO_N "(cached) $ECHO_C" >&6
4246 else
4247   if test -n "$ac_ct_LD"; then
4248   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4249 else
4250   ac_save_IFS=$IFS; IFS=$ac_path_separator
4251 ac_dummy="$PATH"
4252 for ac_dir in $ac_dummy; do
4253   IFS=$ac_save_IFS
4254   test -z "$ac_dir" && ac_dir=.
4255   $as_executable_p "$ac_dir/$ac_word" || continue
4256 ac_cv_prog_ac_ct_LD="ld"
4257 echo "$as_me:4257: found $ac_dir/$ac_word" >&5
4258 break
4259 done
4260
4261   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4262 fi
4263 fi
4264 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4265 if test -n "$ac_ct_LD"; then
4266   echo "$as_me:4266: result: $ac_ct_LD" >&5
4267 echo "${ECHO_T}$ac_ct_LD" >&6
4268 else
4269   echo "$as_me:4269: result: no" >&5
4270 echo "${ECHO_T}no" >&6
4271 fi
4272
4273   LD=$ac_ct_LD
4274 else
4275   LD="$ac_cv_prog_LD"
4276 fi
4277
4278 if test -n "$ac_tool_prefix"; then
4279   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4280 set dummy ${ac_tool_prefix}ar; ac_word=$2
4281 echo "$as_me:4281: checking for $ac_word" >&5
4282 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4283 if test "${ac_cv_prog_AR+set}" = set; then
4284   echo $ECHO_N "(cached) $ECHO_C" >&6
4285 else
4286   if test -n "$AR"; then
4287   ac_cv_prog_AR="$AR" # Let the user override the test.
4288 else
4289   ac_save_IFS=$IFS; IFS=$ac_path_separator
4290 ac_dummy="$PATH"
4291 for ac_dir in $ac_dummy; do
4292   IFS=$ac_save_IFS
4293   test -z "$ac_dir" && ac_dir=.
4294   $as_executable_p "$ac_dir/$ac_word" || continue
4295 ac_cv_prog_AR="${ac_tool_prefix}ar"
4296 echo "$as_me:4296: found $ac_dir/$ac_word" >&5
4297 break
4298 done
4299
4300 fi
4301 fi
4302 AR=$ac_cv_prog_AR
4303 if test -n "$AR"; then
4304   echo "$as_me:4304: result: $AR" >&5
4305 echo "${ECHO_T}$AR" >&6
4306 else
4307   echo "$as_me:4307: result: no" >&5
4308 echo "${ECHO_T}no" >&6
4309 fi
4310
4311 fi
4312 if test -z "$ac_cv_prog_AR"; then
4313   ac_ct_AR=$AR
4314   # Extract the first word of "ar", so it can be a program name with args.
4315 set dummy ar; ac_word=$2
4316 echo "$as_me:4316: checking for $ac_word" >&5
4317 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4318 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4319   echo $ECHO_N "(cached) $ECHO_C" >&6
4320 else
4321   if test -n "$ac_ct_AR"; then
4322   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4323 else
4324   ac_save_IFS=$IFS; IFS=$ac_path_separator
4325 ac_dummy="$PATH"
4326 for ac_dir in $ac_dummy; do
4327   IFS=$ac_save_IFS
4328   test -z "$ac_dir" && ac_dir=.
4329   $as_executable_p "$ac_dir/$ac_word" || continue
4330 ac_cv_prog_ac_ct_AR="ar"
4331 echo "$as_me:4331: found $ac_dir/$ac_word" >&5
4332 break
4333 done
4334
4335   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4336 fi
4337 fi
4338 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4339 if test -n "$ac_ct_AR"; then
4340   echo "$as_me:4340: result: $ac_ct_AR" >&5
4341 echo "${ECHO_T}$ac_ct_AR" >&6
4342 else
4343   echo "$as_me:4343: result: no" >&5
4344 echo "${ECHO_T}no" >&6
4345 fi
4346
4347   AR=$ac_ct_AR
4348 else
4349   AR="$ac_cv_prog_AR"
4350 fi
4351
4352 if test -n "$ac_tool_prefix"; then
4353   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4354 set dummy ${ac_tool_prefix}nm; ac_word=$2
4355 echo "$as_me:4355: checking for $ac_word" >&5
4356 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4357 if test "${ac_cv_prog_NM+set}" = set; then
4358   echo $ECHO_N "(cached) $ECHO_C" >&6
4359 else
4360   if test -n "$NM"; then
4361   ac_cv_prog_NM="$NM" # Let the user override the test.
4362 else
4363   ac_save_IFS=$IFS; IFS=$ac_path_separator
4364 ac_dummy="$PATH"
4365 for ac_dir in $ac_dummy; do
4366   IFS=$ac_save_IFS
4367   test -z "$ac_dir" && ac_dir=.
4368   $as_executable_p "$ac_dir/$ac_word" || continue
4369 ac_cv_prog_NM="${ac_tool_prefix}nm"
4370 echo "$as_me:4370: found $ac_dir/$ac_word" >&5
4371 break
4372 done
4373
4374 fi
4375 fi
4376 NM=$ac_cv_prog_NM
4377 if test -n "$NM"; then
4378   echo "$as_me:4378: result: $NM" >&5
4379 echo "${ECHO_T}$NM" >&6
4380 else
4381   echo "$as_me:4381: result: no" >&5
4382 echo "${ECHO_T}no" >&6
4383 fi
4384
4385 fi
4386 if test -z "$ac_cv_prog_NM"; then
4387   ac_ct_NM=$NM
4388   # Extract the first word of "nm", so it can be a program name with args.
4389 set dummy nm; ac_word=$2
4390 echo "$as_me:4390: checking for $ac_word" >&5
4391 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4392 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4393   echo $ECHO_N "(cached) $ECHO_C" >&6
4394 else
4395   if test -n "$ac_ct_NM"; then
4396   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4397 else
4398   ac_save_IFS=$IFS; IFS=$ac_path_separator
4399 ac_dummy="$PATH"
4400 for ac_dir in $ac_dummy; do
4401   IFS=$ac_save_IFS
4402   test -z "$ac_dir" && ac_dir=.
4403   $as_executable_p "$ac_dir/$ac_word" || continue
4404 ac_cv_prog_ac_ct_NM="nm"
4405 echo "$as_me:4405: found $ac_dir/$ac_word" >&5
4406 break
4407 done
4408
4409   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4410 fi
4411 fi
4412 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4413 if test -n "$ac_ct_NM"; then
4414   echo "$as_me:4414: result: $ac_ct_NM" >&5
4415 echo "${ECHO_T}$ac_ct_NM" >&6
4416 else
4417   echo "$as_me:4417: result: no" >&5
4418 echo "${ECHO_T}no" >&6
4419 fi
4420
4421   NM=$ac_ct_NM
4422 else
4423   NM="$ac_cv_prog_NM"
4424 fi
4425
4426 if test -n "$ac_tool_prefix"; then
4427   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4428 set dummy ${ac_tool_prefix}ar; ac_word=$2
4429 echo "$as_me:4429: checking for $ac_word" >&5
4430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4431 if test "${ac_cv_prog_AR+set}" = set; then
4432   echo $ECHO_N "(cached) $ECHO_C" >&6
4433 else
4434   if test -n "$AR"; then
4435   ac_cv_prog_AR="$AR" # Let the user override the test.
4436 else
4437   ac_save_IFS=$IFS; IFS=$ac_path_separator
4438 ac_dummy="$PATH"
4439 for ac_dir in $ac_dummy; do
4440   IFS=$ac_save_IFS
4441   test -z "$ac_dir" && ac_dir=.
4442   $as_executable_p "$ac_dir/$ac_word" || continue
4443 ac_cv_prog_AR="${ac_tool_prefix}ar"
4444 echo "$as_me:4444: found $ac_dir/$ac_word" >&5
4445 break
4446 done
4447
4448 fi
4449 fi
4450 AR=$ac_cv_prog_AR
4451 if test -n "$AR"; then
4452   echo "$as_me:4452: result: $AR" >&5
4453 echo "${ECHO_T}$AR" >&6
4454 else
4455   echo "$as_me:4455: result: no" >&5
4456 echo "${ECHO_T}no" >&6
4457 fi
4458
4459 fi
4460 if test -z "$ac_cv_prog_AR"; then
4461   ac_ct_AR=$AR
4462   # Extract the first word of "ar", so it can be a program name with args.
4463 set dummy ar; ac_word=$2
4464 echo "$as_me:4464: checking for $ac_word" >&5
4465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4466 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4467   echo $ECHO_N "(cached) $ECHO_C" >&6
4468 else
4469   if test -n "$ac_ct_AR"; then
4470   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4471 else
4472   ac_save_IFS=$IFS; IFS=$ac_path_separator
4473 ac_dummy="$PATH"
4474 for ac_dir in $ac_dummy; do
4475   IFS=$ac_save_IFS
4476   test -z "$ac_dir" && ac_dir=.
4477   $as_executable_p "$ac_dir/$ac_word" || continue
4478 ac_cv_prog_ac_ct_AR="ar"
4479 echo "$as_me:4479: found $ac_dir/$ac_word" >&5
4480 break
4481 done
4482
4483   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4484 fi
4485 fi
4486 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4487 if test -n "$ac_ct_AR"; then
4488   echo "$as_me:4488: result: $ac_ct_AR" >&5
4489 echo "${ECHO_T}$ac_ct_AR" >&6
4490 else
4491   echo "$as_me:4491: result: no" >&5
4492 echo "${ECHO_T}no" >&6
4493 fi
4494
4495   AR=$ac_ct_AR
4496 else
4497   AR="$ac_cv_prog_AR"
4498 fi
4499
4500 echo "$as_me:4500: checking for options to update archives" >&5
4501 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4502 if test "${cf_cv_ar_flags+set}" = set; then
4503   echo $ECHO_N "(cached) $ECHO_C" >&6
4504 else
4505
4506         cf_cv_ar_flags=unknown
4507         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4508         do
4509
4510                 # check if $ARFLAGS already contains this choice
4511                 if test "x$ARFLAGS" != "x" ; then
4512                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4513                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4514                                 cf_cv_ar_flags=
4515                                 break
4516                         fi
4517                 fi
4518
4519                 rm -f conftest.$ac_cv_objext
4520                 rm -f conftest.a
4521
4522                 cat >conftest.$ac_ext <<EOF
4523 #line 4523 "configure"
4524 int     testdata[3] = { 123, 456, 789 };
4525 EOF
4526                 if { (eval echo "$as_me:4526: \"$ac_compile\"") >&5
4527   (eval $ac_compile) 2>&5
4528   ac_status=$?
4529   echo "$as_me:4529: \$? = $ac_status" >&5
4530   (exit $ac_status); } ; then
4531                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4532                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4533                         if test -f conftest.a ; then
4534                                 cf_cv_ar_flags=$cf_ar_flags
4535                                 break
4536                         fi
4537                 else
4538                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4539
4540 echo "${as_me:-configure}:4540: testing cannot compile test-program ..." 1>&5
4541
4542                         break
4543                 fi
4544         done
4545         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4546
4547 fi
4548 echo "$as_me:4548: result: $cf_cv_ar_flags" >&5
4549 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4550
4551 if test -n "$ARFLAGS" ; then
4552         if test -n "$cf_cv_ar_flags" ; then
4553                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4554         fi
4555 else
4556         ARFLAGS=$cf_cv_ar_flags
4557 fi
4558
4559 echo "$as_me:4559: checking if you have specified an install-prefix" >&5
4560 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4561
4562 # Check whether --with-install-prefix or --without-install-prefix was given.
4563 if test "${with_install_prefix+set}" = set; then
4564   withval="$with_install_prefix"
4565   case "x$withval" in
4566         (xyes|xno)
4567                 ;;
4568         (*)     DESTDIR="$withval"
4569                 ;;
4570         esac
4571 fi;
4572 echo "$as_me:4572: result: $DESTDIR" >&5
4573 echo "${ECHO_T}$DESTDIR" >&6
4574
4575 ###############################################################################
4576
4577 # If we're cross-compiling, allow the user to override the tools and their
4578 # options.  The configure script is oriented toward identifying the host
4579 # compiler, etc., but we need a build compiler to generate parts of the source.
4580
4581 if test "$cross_compiling" = yes ; then
4582
4583         # defaults that we might want to override
4584         : ${BUILD_CFLAGS:=''}
4585         : ${BUILD_CPPFLAGS:=''}
4586         : ${BUILD_LDFLAGS:=''}
4587         : ${BUILD_LIBS:=''}
4588         : ${BUILD_EXEEXT:='$x'}
4589         : ${BUILD_OBJEXT:='o'}
4590
4591 # Check whether --with-build-cc or --without-build-cc was given.
4592 if test "${with_build_cc+set}" = set; then
4593   withval="$with_build_cc"
4594   BUILD_CC="$withval"
4595 else
4596   for ac_prog in gcc clang c99 c89 cc cl
4597 do
4598   # Extract the first word of "$ac_prog", so it can be a program name with args.
4599 set dummy $ac_prog; ac_word=$2
4600 echo "$as_me:4600: checking for $ac_word" >&5
4601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4602 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4603   echo $ECHO_N "(cached) $ECHO_C" >&6
4604 else
4605   if test -n "$BUILD_CC"; then
4606   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4607 else
4608   ac_save_IFS=$IFS; IFS=$ac_path_separator
4609 ac_dummy="$PATH"
4610 for ac_dir in $ac_dummy; do
4611   IFS=$ac_save_IFS
4612   test -z "$ac_dir" && ac_dir=.
4613   $as_executable_p "$ac_dir/$ac_word" || continue
4614 ac_cv_prog_BUILD_CC="$ac_prog"
4615 echo "$as_me:4615: found $ac_dir/$ac_word" >&5
4616 break
4617 done
4618
4619 fi
4620 fi
4621 BUILD_CC=$ac_cv_prog_BUILD_CC
4622 if test -n "$BUILD_CC"; then
4623   echo "$as_me:4623: result: $BUILD_CC" >&5
4624 echo "${ECHO_T}$BUILD_CC" >&6
4625 else
4626   echo "$as_me:4626: result: no" >&5
4627 echo "${ECHO_T}no" >&6
4628 fi
4629
4630   test -n "$BUILD_CC" && break
4631 done
4632 test -n "$BUILD_CC" || BUILD_CC="none"
4633
4634 fi;
4635         echo "$as_me:4635: checking for native build C compiler" >&5
4636 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4637         echo "$as_me:4637: result: $BUILD_CC" >&5
4638 echo "${ECHO_T}$BUILD_CC" >&6
4639
4640         echo "$as_me:4640: checking for native build C preprocessor" >&5
4641 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4642
4643 # Check whether --with-build-cpp or --without-build-cpp was given.
4644 if test "${with_build_cpp+set}" = set; then
4645   withval="$with_build_cpp"
4646   BUILD_CPP="$withval"
4647 else
4648   BUILD_CPP='${BUILD_CC} -E'
4649 fi;
4650         echo "$as_me:4650: result: $BUILD_CPP" >&5
4651 echo "${ECHO_T}$BUILD_CPP" >&6
4652
4653         echo "$as_me:4653: checking for native build C flags" >&5
4654 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4655
4656 # Check whether --with-build-cflags or --without-build-cflags was given.
4657 if test "${with_build_cflags+set}" = set; then
4658   withval="$with_build_cflags"
4659   BUILD_CFLAGS="$withval"
4660 fi;
4661         echo "$as_me:4661: result: $BUILD_CFLAGS" >&5
4662 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4663
4664         echo "$as_me:4664: checking for native build C preprocessor-flags" >&5
4665 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4666
4667 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4668 if test "${with_build_cppflags+set}" = set; then
4669   withval="$with_build_cppflags"
4670   BUILD_CPPFLAGS="$withval"
4671 fi;
4672         echo "$as_me:4672: result: $BUILD_CPPFLAGS" >&5
4673 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4674
4675         echo "$as_me:4675: checking for native build linker-flags" >&5
4676 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4677
4678 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4679 if test "${with_build_ldflags+set}" = set; then
4680   withval="$with_build_ldflags"
4681   BUILD_LDFLAGS="$withval"
4682 fi;
4683         echo "$as_me:4683: result: $BUILD_LDFLAGS" >&5
4684 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4685
4686         echo "$as_me:4686: checking for native build linker-libraries" >&5
4687 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4688
4689 # Check whether --with-build-libs or --without-build-libs was given.
4690 if test "${with_build_libs+set}" = set; then
4691   withval="$with_build_libs"
4692   BUILD_LIBS="$withval"
4693 fi;
4694         echo "$as_me:4694: result: $BUILD_LIBS" >&5
4695 echo "${ECHO_T}$BUILD_LIBS" >&6
4696
4697         # this assumes we're on Unix.
4698         BUILD_EXEEXT=
4699         BUILD_OBJEXT=o
4700
4701         : ${BUILD_CC:='${CC}'}
4702
4703         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4704                 { { echo "$as_me:4704: error: Cross-build requires two compilers.
4705 Use --with-build-cc to specify the native compiler." >&5
4706 echo "$as_me: error: Cross-build requires two compilers.
4707 Use --with-build-cc to specify the native compiler." >&2;}
4708    { (exit 1); exit 1; }; }
4709         fi
4710
4711 else
4712         : ${BUILD_CC:='${CC}'}
4713         : ${BUILD_CPP:='${CPP}'}
4714         : ${BUILD_CFLAGS:='${CFLAGS}'}
4715         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4716         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4717         : ${BUILD_LIBS:='${LIBS}'}
4718         : ${BUILD_EXEEXT:='$x'}
4719         : ${BUILD_OBJEXT:='o'}
4720 fi
4721
4722 ###############################################################################
4723
4724 ### Options to allow the user to specify the set of libraries which are used.
4725 ### Use "--without-normal --with-shared" to allow the default model to be
4726 ### shared, for example.
4727 cf_list_models=""
4728
4729 echo "$as_me:4729: checking if libtool -version-number should be used" >&5
4730 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4731
4732 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4733 if test "${enable_libtool_version+set}" = set; then
4734   enableval="$enable_libtool_version"
4735   test "$enableval" != no && enableval=yes
4736         if test "$enableval" != "yes" ; then
4737     cf_libtool_version=no
4738         else
4739                 cf_libtool_version=yes
4740         fi
4741 else
4742   enableval=yes
4743         cf_libtool_version=yes
4744
4745 fi;
4746 echo "$as_me:4746: result: $cf_libtool_version" >&5
4747 echo "${ECHO_T}$cf_libtool_version" >&6
4748
4749 if test "$cf_libtool_version" = yes ; then
4750         LIBTOOL_VERSION="-version-number"
4751 else
4752         LIBTOOL_VERSION="-version-info"
4753         case "x$VERSION" in
4754         (x)
4755                 { echo "$as_me:4755: WARNING: VERSION was not set" >&5
4756 echo "$as_me: WARNING: VERSION was not set" >&2;}
4757                 ;;
4758         (x*.*.*)
4759                 ABI_VERSION="$VERSION"
4760                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4761
4762 echo "${as_me:-configure}:4762: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4763
4764                 ;;
4765         (x*:*:*)
4766                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4767                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4768
4769 echo "${as_me:-configure}:4769: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4770
4771                 ;;
4772         (*)
4773                 { echo "$as_me:4773: WARNING: unexpected VERSION value: $VERSION" >&5
4774 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4775                 ;;
4776         esac
4777 fi
4778
4779 LIBTOOL=
4780
4781 # common library maintenance symbols that are convenient for libtool scripts:
4782 LIB_CREATE='${AR} -cr'
4783 LIB_OBJECT='${OBJECTS}'
4784 LIB_SUFFIX=.a
4785 LIB_PREP="$RANLIB"
4786
4787 # symbols used to prop libtool up to enable it to determine what it should be
4788 # doing:
4789 LIB_CLEAN=
4790 LIB_COMPILE=
4791 LIB_LINK='${CC}'
4792 LIB_INSTALL=
4793 LIB_UNINSTALL=
4794
4795 echo "$as_me:4795: checking if you want to build libraries with libtool" >&5
4796 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4797
4798 # Check whether --with-libtool or --without-libtool was given.
4799 if test "${with_libtool+set}" = set; then
4800   withval="$with_libtool"
4801   with_libtool=$withval
4802 else
4803   with_libtool=no
4804 fi;
4805 echo "$as_me:4805: result: $with_libtool" >&5
4806 echo "${ECHO_T}$with_libtool" >&6
4807 if test "$with_libtool" != "no"; then
4808
4809         if test "$with_libtool" != "yes" ; then
4810
4811 if test "x$prefix" != xNONE; then
4812         cf_path_syntax="$prefix"
4813 else
4814         cf_path_syntax="$ac_default_prefix"
4815 fi
4816
4817 case ".$with_libtool" in
4818 (.\$\(*\)*|.\'*\'*)
4819         ;;
4820 (..|./*|.\\*)
4821         ;;
4822 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4823         ;;
4824 (.\${*prefix}*|.\${*dir}*)
4825         eval with_libtool="$with_libtool"
4826         case ".$with_libtool" in
4827         (.NONE/*)
4828                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4829                 ;;
4830         esac
4831         ;;
4832 (.no|.NONE/*)
4833         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4834         ;;
4835 (*)
4836         { { echo "$as_me:4836: error: expected a pathname, not \"$with_libtool\"" >&5
4837 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4838    { (exit 1); exit 1; }; }
4839         ;;
4840 esac
4841
4842                 LIBTOOL=$with_libtool
4843         else
4844                 if test -n "$ac_tool_prefix"; then
4845   for ac_prog in libtool glibtool
4846   do
4847     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4848 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4849 echo "$as_me:4849: checking for $ac_word" >&5
4850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4851 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4852   echo $ECHO_N "(cached) $ECHO_C" >&6
4853 else
4854   if test -n "$LIBTOOL"; then
4855   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4856 else
4857   ac_save_IFS=$IFS; IFS=$ac_path_separator
4858 ac_dummy="$PATH"
4859 for ac_dir in $ac_dummy; do
4860   IFS=$ac_save_IFS
4861   test -z "$ac_dir" && ac_dir=.
4862   $as_executable_p "$ac_dir/$ac_word" || continue
4863 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4864 echo "$as_me:4864: found $ac_dir/$ac_word" >&5
4865 break
4866 done
4867
4868 fi
4869 fi
4870 LIBTOOL=$ac_cv_prog_LIBTOOL
4871 if test -n "$LIBTOOL"; then
4872   echo "$as_me:4872: result: $LIBTOOL" >&5
4873 echo "${ECHO_T}$LIBTOOL" >&6
4874 else
4875   echo "$as_me:4875: result: no" >&5
4876 echo "${ECHO_T}no" >&6
4877 fi
4878
4879     test -n "$LIBTOOL" && break
4880   done
4881 fi
4882 if test -z "$LIBTOOL"; then
4883   ac_ct_LIBTOOL=$LIBTOOL
4884   for ac_prog in libtool glibtool
4885 do
4886   # Extract the first word of "$ac_prog", so it can be a program name with args.
4887 set dummy $ac_prog; ac_word=$2
4888 echo "$as_me:4888: checking for $ac_word" >&5
4889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4890 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4891   echo $ECHO_N "(cached) $ECHO_C" >&6
4892 else
4893   if test -n "$ac_ct_LIBTOOL"; then
4894   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4895 else
4896   ac_save_IFS=$IFS; IFS=$ac_path_separator
4897 ac_dummy="$PATH"
4898 for ac_dir in $ac_dummy; do
4899   IFS=$ac_save_IFS
4900   test -z "$ac_dir" && ac_dir=.
4901   $as_executable_p "$ac_dir/$ac_word" || continue
4902 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4903 echo "$as_me:4903: found $ac_dir/$ac_word" >&5
4904 break
4905 done
4906
4907 fi
4908 fi
4909 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4910 if test -n "$ac_ct_LIBTOOL"; then
4911   echo "$as_me:4911: result: $ac_ct_LIBTOOL" >&5
4912 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4913 else
4914   echo "$as_me:4914: result: no" >&5
4915 echo "${ECHO_T}no" >&6
4916 fi
4917
4918   test -n "$ac_ct_LIBTOOL" && break
4919 done
4920 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4921
4922   LIBTOOL=$ac_ct_LIBTOOL
4923 fi
4924
4925 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4926 then
4927         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.].*//'`
4928 else
4929         cf_cv_libtool_version=
4930 fi
4931 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4932
4933                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4934                 then
4935
4936 unset ac_cv_prog_ac_ct_LIBTOOL
4937 unset ac_ct_LIBTOOL
4938 unset LIBTOOL
4939
4940                         if test -n "$ac_tool_prefix"; then
4941   for ac_prog in glibtool
4942   do
4943     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4944 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4945 echo "$as_me:4945: checking for $ac_word" >&5
4946 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4947 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4948   echo $ECHO_N "(cached) $ECHO_C" >&6
4949 else
4950   if test -n "$LIBTOOL"; then
4951   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4952 else
4953   ac_save_IFS=$IFS; IFS=$ac_path_separator
4954 ac_dummy="$PATH"
4955 for ac_dir in $ac_dummy; do
4956   IFS=$ac_save_IFS
4957   test -z "$ac_dir" && ac_dir=.
4958   $as_executable_p "$ac_dir/$ac_word" || continue
4959 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4960 echo "$as_me:4960: found $ac_dir/$ac_word" >&5
4961 break
4962 done
4963
4964 fi
4965 fi
4966 LIBTOOL=$ac_cv_prog_LIBTOOL
4967 if test -n "$LIBTOOL"; then
4968   echo "$as_me:4968: result: $LIBTOOL" >&5
4969 echo "${ECHO_T}$LIBTOOL" >&6
4970 else
4971   echo "$as_me:4971: result: no" >&5
4972 echo "${ECHO_T}no" >&6
4973 fi
4974
4975     test -n "$LIBTOOL" && break
4976   done
4977 fi
4978 if test -z "$LIBTOOL"; then
4979   ac_ct_LIBTOOL=$LIBTOOL
4980   for ac_prog in glibtool
4981 do
4982   # Extract the first word of "$ac_prog", so it can be a program name with args.
4983 set dummy $ac_prog; ac_word=$2
4984 echo "$as_me:4984: checking for $ac_word" >&5
4985 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4986 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4987   echo $ECHO_N "(cached) $ECHO_C" >&6
4988 else
4989   if test -n "$ac_ct_LIBTOOL"; then
4990   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4991 else
4992   ac_save_IFS=$IFS; IFS=$ac_path_separator
4993 ac_dummy="$PATH"
4994 for ac_dir in $ac_dummy; do
4995   IFS=$ac_save_IFS
4996   test -z "$ac_dir" && ac_dir=.
4997   $as_executable_p "$ac_dir/$ac_word" || continue
4998 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4999 echo "$as_me:4999: found $ac_dir/$ac_word" >&5
5000 break
5001 done
5002
5003 fi
5004 fi
5005 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5006 if test -n "$ac_ct_LIBTOOL"; then
5007   echo "$as_me:5007: result: $ac_ct_LIBTOOL" >&5
5008 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5009 else
5010   echo "$as_me:5010: result: no" >&5
5011 echo "${ECHO_T}no" >&6
5012 fi
5013
5014   test -n "$ac_ct_LIBTOOL" && break
5015 done
5016 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5017
5018   LIBTOOL=$ac_ct_LIBTOOL
5019 fi
5020
5021 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5022 then
5023         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.].*//'`
5024 else
5025         cf_cv_libtool_version=
5026 fi
5027 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5028
5029                 fi
5030         fi
5031         if test -z "$LIBTOOL" ; then
5032                 { { echo "$as_me:5032: error: Cannot find libtool" >&5
5033 echo "$as_me: error: Cannot find libtool" >&2;}
5034    { (exit 1); exit 1; }; }
5035         fi
5036         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5037         LIB_OBJECT='${OBJECTS:.o=.lo}'
5038         LIB_SUFFIX=.la
5039         LIB_CLEAN='${LIBTOOL} --mode=clean'
5040         LIB_COMPILE='${LIBTOOL} --mode=compile'
5041         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5042         LIB_INSTALL='${LIBTOOL} --mode=install'
5043         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5044         LIB_PREP=:
5045
5046 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5047 then
5048         echo "$as_me:5048: checking version of $LIBTOOL" >&5
5049 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5050
5051 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5052 then
5053         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.].*//'`
5054 else
5055         cf_cv_libtool_version=
5056 fi
5057 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5058
5059         echo "$as_me:5059: result: $cf_cv_libtool_version" >&5
5060 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5061         if test -z "$cf_cv_libtool_version" ; then
5062                 { { echo "$as_me:5062: error: This is not GNU libtool" >&5
5063 echo "$as_me: error: This is not GNU libtool" >&2;}
5064    { (exit 1); exit 1; }; }
5065         fi
5066 else
5067         { { echo "$as_me:5067: error: GNU libtool has not been found" >&5
5068 echo "$as_me: error: GNU libtool has not been found" >&2;}
5069    { (exit 1); exit 1; }; }
5070 fi
5071
5072         # special hack to add -no-undefined (which libtool should do for itself)
5073         LT_UNDEF=
5074         case "$cf_cv_system_name" in
5075         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5076                 LT_UNDEF=-no-undefined
5077                 ;;
5078         esac
5079
5080         # special hack to add --tag option for C++ compiler
5081         case $cf_cv_libtool_version in
5082         (1.[5-9]*|[2-9].[0-9.a-z]*)
5083                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5084                 LIBTOOL="$LIBTOOL --tag=CC"
5085                 ;;
5086         (*)
5087                 LIBTOOL_CXX="$LIBTOOL"
5088                 ;;
5089         esac
5090 else
5091         LIBTOOL=""
5092         LIBTOOL_CXX=""
5093 fi
5094
5095 test -z "$LIBTOOL" && ECHO_LT=
5096
5097 if test "$with_libtool" != "no" ; then
5098
5099 cf_list_models="$cf_list_models libtool"
5100
5101 else
5102
5103 echo "$as_me:5103: checking if you want to build shared libraries" >&5
5104 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5105
5106 # Check whether --with-shared or --without-shared was given.
5107 if test "${with_shared+set}" = set; then
5108   withval="$with_shared"
5109   with_shared=$withval
5110 else
5111   with_shared=no
5112 fi;
5113 echo "$as_me:5113: result: $with_shared" >&5
5114 echo "${ECHO_T}$with_shared" >&6
5115 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5116
5117 echo "$as_me:5117: checking if you want to build static libraries" >&5
5118 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5119
5120 # Check whether --with-normal or --without-normal was given.
5121 if test "${with_normal+set}" = set; then
5122   withval="$with_normal"
5123   with_normal=$withval
5124 else
5125   with_normal=yes
5126 fi;
5127 echo "$as_me:5127: result: $with_normal" >&5
5128 echo "${ECHO_T}$with_normal" >&6
5129 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5130
5131 echo "$as_me:5131: checking if you want to build debug libraries" >&5
5132 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5133
5134 # Check whether --with-debug or --without-debug was given.
5135 if test "${with_debug+set}" = set; then
5136   withval="$with_debug"
5137   with_debug=$withval
5138 else
5139   with_debug=yes
5140 fi;
5141 echo "$as_me:5141: result: $with_debug" >&5
5142 echo "${ECHO_T}$with_debug" >&6
5143 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5144
5145 echo "$as_me:5145: checking if you want to build profiling libraries" >&5
5146 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5147
5148 # Check whether --with-profile or --without-profile was given.
5149 if test "${with_profile+set}" = set; then
5150   withval="$with_profile"
5151   with_profile=$withval
5152 else
5153   with_profile=no
5154 fi;
5155 echo "$as_me:5155: result: $with_profile" >&5
5156 echo "${ECHO_T}$with_profile" >&6
5157 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5158
5159 fi
5160
5161 if test "X$cf_with_cxx_binding" != Xno; then
5162 if test "x$with_shared" = "xyes"; then
5163 echo "$as_me:5163: checking if you want to build C++ shared libraries" >&5
5164 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5165
5166 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5167 if test "${with_cxx_shared+set}" = set; then
5168   withval="$with_cxx_shared"
5169   with_shared_cxx=$withval
5170 else
5171   with_shared_cxx=no
5172 fi;
5173 echo "$as_me:5173: result: $with_shared_cxx" >&5
5174 echo "${ECHO_T}$with_shared_cxx" >&6
5175 fi
5176 fi
5177
5178 ###############################################################################
5179
5180 echo "$as_me:5180: checking for specified models" >&5
5181 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5182 test -z "$cf_list_models" && cf_list_models=normal
5183 test "$with_libtool" != "no" && cf_list_models=libtool
5184 echo "$as_me:5184: result: $cf_list_models" >&5
5185 echo "${ECHO_T}$cf_list_models" >&6
5186
5187 ### Use the first model as the default, and save its suffix for use in building
5188 ### up test-applications.
5189 echo "$as_me:5189: checking for default model" >&5
5190 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5191 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5192 echo "$as_me:5192: result: $DFT_LWR_MODEL" >&5
5193 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5194
5195 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5196
5197 TICS_NAME=tic
5198
5199 TINFO_NAME=tinfo
5200
5201 LIB_NAME=ncurses
5202
5203 LIB_DIR=../lib
5204 LIB_2ND=../../lib
5205
5206 echo "$as_me:5206: checking if you want to have a library-prefix" >&5
5207 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5208
5209 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5210 if test "${with_lib_prefix+set}" = set; then
5211   withval="$with_lib_prefix"
5212   with_lib_prefix=$withval
5213 else
5214   with_lib_prefix=auto
5215 fi;
5216 echo "$as_me:5216: result: $with_lib_prefix" >&5
5217 echo "${ECHO_T}$with_lib_prefix" >&6
5218
5219 if test $with_lib_prefix = auto
5220 then
5221
5222         case $cf_cv_system_name in
5223         (OS/2*|os2*)
5224                 if test "$DFT_LWR_MODEL" = libtool; then
5225                         LIB_PREFIX='lib'
5226                 else
5227                         LIB_PREFIX=''
5228                 fi
5229                 ;;
5230         (*)     LIB_PREFIX='lib'
5231                 ;;
5232         esac
5233 cf_prefix=$LIB_PREFIX
5234
5235 elif test $with_lib_prefix = no
5236 then
5237         LIB_PREFIX=
5238 else
5239         LIB_PREFIX=$with_lib_prefix
5240 fi
5241
5242 LIB_SUFFIX=
5243
5244         echo "$as_me:5244: checking for PATH separator" >&5
5245 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5246         case $cf_cv_system_name in
5247         (os2*)  PATH_SEPARATOR=';'  ;;
5248         (*)     ${PATH_SEPARATOR:=':'}  ;;
5249         esac
5250
5251         echo "$as_me:5251: result: $PATH_SEPARATOR" >&5
5252 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5253
5254 ###############################################################################
5255
5256 echo "$as_me:5256: checking if you want to build a separate terminfo library" >&5
5257 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5258
5259 # Check whether --with-termlib or --without-termlib was given.
5260 if test "${with_termlib+set}" = set; then
5261   withval="$with_termlib"
5262   with_termlib=$withval
5263 else
5264   with_termlib=no
5265 fi;
5266 echo "$as_me:5266: result: $with_termlib" >&5
5267 echo "${ECHO_T}$with_termlib" >&6
5268
5269 echo "$as_me:5269: checking if you want to build a separate tic library" >&5
5270 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5271
5272 # Check whether --with-ticlib or --without-ticlib was given.
5273 if test "${with_ticlib+set}" = set; then
5274   withval="$with_ticlib"
5275   with_ticlib=$withval
5276 else
5277   with_ticlib=no
5278 fi;
5279 echo "$as_me:5279: result: $with_ticlib" >&5
5280 echo "${ECHO_T}$with_ticlib" >&6
5281
5282 ### Checks for special libraries, must be done up-front.
5283 SHLIB_LIST=""
5284
5285 echo "$as_me:5285: checking if you want to link with the GPM mouse library" >&5
5286 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5287
5288 # Check whether --with-gpm or --without-gpm was given.
5289 if test "${with_gpm+set}" = set; then
5290   withval="$with_gpm"
5291   with_gpm=$withval
5292 else
5293   with_gpm=maybe
5294 fi;
5295 echo "$as_me:5295: result: $with_gpm" >&5
5296 echo "${ECHO_T}$with_gpm" >&6
5297
5298 if test "$with_gpm" != no ; then
5299         echo "$as_me:5299: checking for gpm.h" >&5
5300 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5301 if test "${ac_cv_header_gpm_h+set}" = set; then
5302   echo $ECHO_N "(cached) $ECHO_C" >&6
5303 else
5304   cat >conftest.$ac_ext <<_ACEOF
5305 #line 5305 "configure"
5306 #include "confdefs.h"
5307 #include <gpm.h>
5308 _ACEOF
5309 if { (eval echo "$as_me:5309: \"$ac_cpp conftest.$ac_ext\"") >&5
5310   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5311   ac_status=$?
5312   egrep -v '^ *\+' conftest.er1 >conftest.err
5313   rm -f conftest.er1
5314   cat conftest.err >&5
5315   echo "$as_me:5315: \$? = $ac_status" >&5
5316   (exit $ac_status); } >/dev/null; then
5317   if test -s conftest.err; then
5318     ac_cpp_err=$ac_c_preproc_warn_flag
5319   else
5320     ac_cpp_err=
5321   fi
5322 else
5323   ac_cpp_err=yes
5324 fi
5325 if test -z "$ac_cpp_err"; then
5326   ac_cv_header_gpm_h=yes
5327 else
5328   echo "$as_me: failed program was:" >&5
5329   cat conftest.$ac_ext >&5
5330   ac_cv_header_gpm_h=no
5331 fi
5332 rm -f conftest.err conftest.$ac_ext
5333 fi
5334 echo "$as_me:5334: result: $ac_cv_header_gpm_h" >&5
5335 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5336 if test $ac_cv_header_gpm_h = yes; then
5337
5338 cat >>confdefs.h <<\EOF
5339 #define HAVE_GPM_H 1
5340 EOF
5341
5342                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5343                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5344
5345 echo "${as_me:-configure}:5345: testing assuming we really have GPM library ..." 1>&5
5346
5347 cat >>confdefs.h <<\EOF
5348 #define HAVE_LIBGPM 1
5349 EOF
5350
5351                         with_gpm=yes
5352                 else
5353                         echo "$as_me:5353: checking for Gpm_Open in -lgpm" >&5
5354 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5355 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5356   echo $ECHO_N "(cached) $ECHO_C" >&6
5357 else
5358   ac_check_lib_save_LIBS=$LIBS
5359 LIBS="-lgpm  $LIBS"
5360 cat >conftest.$ac_ext <<_ACEOF
5361 #line 5361 "configure"
5362 #include "confdefs.h"
5363
5364 /* Override any gcc2 internal prototype to avoid an error.  */
5365 #ifdef __cplusplus
5366 extern "C"
5367 #endif
5368 /* We use char because int might match the return type of a gcc2
5369    builtin and then its argument prototype would still apply.  */
5370 char Gpm_Open ();
5371 int
5372 main (void)
5373 {
5374 Gpm_Open ();
5375   ;
5376   return 0;
5377 }
5378 _ACEOF
5379 rm -f conftest.$ac_objext conftest$ac_exeext
5380 if { (eval echo "$as_me:5380: \"$ac_link\"") >&5
5381   (eval $ac_link) 2>&5
5382   ac_status=$?
5383   echo "$as_me:5383: \$? = $ac_status" >&5
5384   (exit $ac_status); } &&
5385          { ac_try='test -s conftest$ac_exeext'
5386   { (eval echo "$as_me:5386: \"$ac_try\"") >&5
5387   (eval $ac_try) 2>&5
5388   ac_status=$?
5389   echo "$as_me:5389: \$? = $ac_status" >&5
5390   (exit $ac_status); }; }; then
5391   ac_cv_lib_gpm_Gpm_Open=yes
5392 else
5393   echo "$as_me: failed program was:" >&5
5394 cat conftest.$ac_ext >&5
5395 ac_cv_lib_gpm_Gpm_Open=no
5396 fi
5397 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5398 LIBS=$ac_check_lib_save_LIBS
5399 fi
5400 echo "$as_me:5400: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5401 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5402 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5403   with_gpm=yes
5404 else
5405
5406                                 if test "$with_gpm" = maybe; then
5407                                         { echo "$as_me:5407: WARNING: Cannot link with GPM library" >&5
5408 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5409                                         with_gpm=no
5410                                 else
5411                                         { { echo "$as_me:5411: error: Cannot link with GPM library" >&5
5412 echo "$as_me: error: Cannot link with GPM library" >&2;}
5413    { (exit 1); exit 1; }; }
5414                                 fi
5415
5416 fi
5417
5418                 fi
5419
5420 else
5421
5422                 test "$with_gpm" != maybe && { echo "$as_me:5422: WARNING: Cannot find GPM header" >&5
5423 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5424                 with_gpm=no
5425
5426 fi
5427
5428 fi
5429
5430 if test "$with_gpm" != no ; then
5431         echo "$as_me:5431: checking if you want to load GPM dynamically" >&5
5432 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5433
5434 # Check whether --with-dlsym or --without-dlsym was given.
5435 if test "${with_dlsym+set}" = set; then
5436   withval="$with_dlsym"
5437   with_dlsym=$withval
5438 else
5439   with_dlsym=yes
5440 fi;
5441         echo "$as_me:5441: result: $with_dlsym" >&5
5442 echo "${ECHO_T}$with_dlsym" >&6
5443         if test "x$with_dlsym" = xyes ; then
5444
5445 cf_have_dlsym=no
5446 echo "$as_me:5446: checking for dlsym" >&5
5447 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5448 if test "${ac_cv_func_dlsym+set}" = set; then
5449   echo $ECHO_N "(cached) $ECHO_C" >&6
5450 else
5451   cat >conftest.$ac_ext <<_ACEOF
5452 #line 5452 "configure"
5453 #include "confdefs.h"
5454 /* System header to define __stub macros and hopefully few prototypes,
5455     which can conflict with char dlsym (); below.  */
5456 #include <assert.h>
5457 /* Override any gcc2 internal prototype to avoid an error.  */
5458 #ifdef __cplusplus
5459 extern "C"
5460 #endif
5461 /* We use char because int might match the return type of a gcc2
5462    builtin and then its argument prototype would still apply.  */
5463 char dlsym ();
5464 char (*f) ();
5465
5466 int
5467 main (void)
5468 {
5469 /* The GNU C library defines this for functions which it implements
5470     to always fail with ENOSYS.  Some functions are actually named
5471     something starting with __ and the normal name is an alias.  */
5472 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5473 choke me
5474 #else
5475 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5476 #endif
5477
5478   ;
5479   return 0;
5480 }
5481 _ACEOF
5482 rm -f conftest.$ac_objext conftest$ac_exeext
5483 if { (eval echo "$as_me:5483: \"$ac_link\"") >&5
5484   (eval $ac_link) 2>&5
5485   ac_status=$?
5486   echo "$as_me:5486: \$? = $ac_status" >&5
5487   (exit $ac_status); } &&
5488          { ac_try='test -s conftest$ac_exeext'
5489   { (eval echo "$as_me:5489: \"$ac_try\"") >&5
5490   (eval $ac_try) 2>&5
5491   ac_status=$?
5492   echo "$as_me:5492: \$? = $ac_status" >&5
5493   (exit $ac_status); }; }; then
5494   ac_cv_func_dlsym=yes
5495 else
5496   echo "$as_me: failed program was:" >&5
5497 cat conftest.$ac_ext >&5
5498 ac_cv_func_dlsym=no
5499 fi
5500 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5501 fi
5502 echo "$as_me:5502: result: $ac_cv_func_dlsym" >&5
5503 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5504 if test $ac_cv_func_dlsym = yes; then
5505   cf_have_dlsym=yes
5506 else
5507
5508 cf_have_libdl=no
5509 echo "$as_me:5509: checking for dlsym in -ldl" >&5
5510 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5511 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5512   echo $ECHO_N "(cached) $ECHO_C" >&6
5513 else
5514   ac_check_lib_save_LIBS=$LIBS
5515 LIBS="-ldl  $LIBS"
5516 cat >conftest.$ac_ext <<_ACEOF
5517 #line 5517 "configure"
5518 #include "confdefs.h"
5519
5520 /* Override any gcc2 internal prototype to avoid an error.  */
5521 #ifdef __cplusplus
5522 extern "C"
5523 #endif
5524 /* We use char because int might match the return type of a gcc2
5525    builtin and then its argument prototype would still apply.  */
5526 char dlsym ();
5527 int
5528 main (void)
5529 {
5530 dlsym ();
5531   ;
5532   return 0;
5533 }
5534 _ACEOF
5535 rm -f conftest.$ac_objext conftest$ac_exeext
5536 if { (eval echo "$as_me:5536: \"$ac_link\"") >&5
5537   (eval $ac_link) 2>&5
5538   ac_status=$?
5539   echo "$as_me:5539: \$? = $ac_status" >&5
5540   (exit $ac_status); } &&
5541          { ac_try='test -s conftest$ac_exeext'
5542   { (eval echo "$as_me:5542: \"$ac_try\"") >&5
5543   (eval $ac_try) 2>&5
5544   ac_status=$?
5545   echo "$as_me:5545: \$? = $ac_status" >&5
5546   (exit $ac_status); }; }; then
5547   ac_cv_lib_dl_dlsym=yes
5548 else
5549   echo "$as_me: failed program was:" >&5
5550 cat conftest.$ac_ext >&5
5551 ac_cv_lib_dl_dlsym=no
5552 fi
5553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5554 LIBS=$ac_check_lib_save_LIBS
5555 fi
5556 echo "$as_me:5556: result: $ac_cv_lib_dl_dlsym" >&5
5557 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5558 if test $ac_cv_lib_dl_dlsym = yes; then
5559
5560         cf_have_dlsym=yes
5561         cf_have_libdl=yes
5562 fi
5563
5564 fi
5565
5566 if test "$cf_have_dlsym" = yes ; then
5567         test "$cf_have_libdl" = yes && {
5568 cf_add_libs="-ldl"
5569 # Filter out duplicates - this happens with badly-designed ".pc" files...
5570 for cf_add_1lib in $LIBS
5571 do
5572         for cf_add_2lib in $cf_add_libs
5573         do
5574                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5575                 then
5576                         cf_add_1lib=
5577                         break
5578                 fi
5579         done
5580         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5581 done
5582 LIBS="$cf_add_libs"
5583  }
5584
5585         echo "$as_me:5585: checking whether able to link to dl*() functions" >&5
5586 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5587         cat >conftest.$ac_ext <<_ACEOF
5588 #line 5588 "configure"
5589 #include "confdefs.h"
5590 #include <dlfcn.h>
5591 int
5592 main (void)
5593 {
5594
5595                 void *obj;
5596                 if ((obj = dlopen("filename", 0)) != 0) {
5597                         if (dlsym(obj, "symbolname") == 0) {
5598                         dlclose(obj);
5599                         }
5600                 }
5601   ;
5602   return 0;
5603 }
5604 _ACEOF
5605 rm -f conftest.$ac_objext conftest$ac_exeext
5606 if { (eval echo "$as_me:5606: \"$ac_link\"") >&5
5607   (eval $ac_link) 2>&5
5608   ac_status=$?
5609   echo "$as_me:5609: \$? = $ac_status" >&5
5610   (exit $ac_status); } &&
5611          { ac_try='test -s conftest$ac_exeext'
5612   { (eval echo "$as_me:5612: \"$ac_try\"") >&5
5613   (eval $ac_try) 2>&5
5614   ac_status=$?
5615   echo "$as_me:5615: \$? = $ac_status" >&5
5616   (exit $ac_status); }; }; then
5617
5618 cat >>confdefs.h <<\EOF
5619 #define HAVE_LIBDL 1
5620 EOF
5621
5622 else
5623   echo "$as_me: failed program was:" >&5
5624 cat conftest.$ac_ext >&5
5625
5626                 { { echo "$as_me:5626: error: Cannot link test program for libdl" >&5
5627 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5628    { (exit 1); exit 1; }; }
5629 fi
5630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5631         echo "$as_me:5631: result: ok" >&5
5632 echo "${ECHO_T}ok" >&6
5633 else
5634         { { echo "$as_me:5634: error: Cannot find dlsym function" >&5
5635 echo "$as_me: error: Cannot find dlsym function" >&2;}
5636    { (exit 1); exit 1; }; }
5637 fi
5638
5639                 if test "x$with_gpm" != xyes ; then
5640                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5641
5642 echo "${as_me:-configure}:5642: testing assuming soname for gpm is $with_gpm ..." 1>&5
5643
5644                         cf_cv_gpm_soname="$with_gpm"
5645                 else
5646
5647 echo "$as_me:5647: checking for soname of gpm library" >&5
5648 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5649 if test "${cf_cv_gpm_soname+set}" = set; then
5650   echo $ECHO_N "(cached) $ECHO_C" >&6
5651 else
5652
5653 cf_cv_gpm_soname=unknown
5654 if test "$cross_compiling" != yes ; then
5655 cat >conftest.$ac_ext <<CF_EOF
5656 #include <gpm.h>
5657 int main(void)
5658 {
5659 if (Gpm_Open(0,0)) Gpm_Close();
5660         ${cf_cv_main_return:-return}(0);
5661 }
5662 CF_EOF
5663 cf_save_LIBS="$LIBS"
5664
5665 cf_add_libs="-lgpm"
5666 # Filter out duplicates - this happens with badly-designed ".pc" files...
5667 for cf_add_1lib in $LIBS
5668 do
5669         for cf_add_2lib in $cf_add_libs
5670         do
5671                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5672                 then
5673                         cf_add_1lib=
5674                         break
5675                 fi
5676         done
5677         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5678 done
5679 LIBS="$cf_add_libs"
5680
5681         if { (eval echo "$as_me:5681: \"$ac_compile\"") >&5
5682   (eval $ac_compile) 2>&5
5683   ac_status=$?
5684   echo "$as_me:5684: \$? = $ac_status" >&5
5685   (exit $ac_status); } ; then
5686                 if { (eval echo "$as_me:5686: \"$ac_link\"") >&5
5687   (eval $ac_link) 2>&5
5688   ac_status=$?
5689   echo "$as_me:5689: \$? = $ac_status" >&5
5690   (exit $ac_status); } ; then
5691                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5692                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5693                 fi
5694         fi
5695 rm -rf conftest*
5696 LIBS="$cf_save_LIBS"
5697 fi
5698
5699 fi
5700 echo "$as_me:5700: result: $cf_cv_gpm_soname" >&5
5701 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5702
5703                 fi
5704                 test "$cf_cv_gpm_soname" != "unknown" &&
5705 cat >>confdefs.h <<EOF
5706 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5707 EOF
5708
5709                 SHLIB_LIST="-ldl $SHLIB_LIST"
5710         else
5711                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5712
5713 cf_add_libs="-lgpm"
5714 # Filter out duplicates - this happens with badly-designed ".pc" files...
5715 for cf_add_1lib in $TEST_LIBS
5716 do
5717         for cf_add_2lib in $cf_add_libs
5718         do
5719                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5720                 then
5721                         cf_add_1lib=
5722                         break
5723                 fi
5724         done
5725         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5726 done
5727 TEST_LIBS="$cf_add_libs"
5728
5729         fi
5730
5731 cat >>confdefs.h <<\EOF
5732 #define HAVE_LIBGPM 1
5733 EOF
5734
5735 echo "$as_me:5735: checking for Gpm_Wgetch in -lgpm" >&5
5736 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5737 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5738   echo $ECHO_N "(cached) $ECHO_C" >&6
5739 else
5740   ac_check_lib_save_LIBS=$LIBS
5741 LIBS="-lgpm  $LIBS"
5742 cat >conftest.$ac_ext <<_ACEOF
5743 #line 5743 "configure"
5744 #include "confdefs.h"
5745
5746 /* Override any gcc2 internal prototype to avoid an error.  */
5747 #ifdef __cplusplus
5748 extern "C"
5749 #endif
5750 /* We use char because int might match the return type of a gcc2
5751    builtin and then its argument prototype would still apply.  */
5752 char Gpm_Wgetch ();
5753 int
5754 main (void)
5755 {
5756 Gpm_Wgetch ();
5757   ;
5758   return 0;
5759 }
5760 _ACEOF
5761 rm -f conftest.$ac_objext conftest$ac_exeext
5762 if { (eval echo "$as_me:5762: \"$ac_link\"") >&5
5763   (eval $ac_link) 2>&5
5764   ac_status=$?
5765   echo "$as_me:5765: \$? = $ac_status" >&5
5766   (exit $ac_status); } &&
5767          { ac_try='test -s conftest$ac_exeext'
5768   { (eval echo "$as_me:5768: \"$ac_try\"") >&5
5769   (eval $ac_try) 2>&5
5770   ac_status=$?
5771   echo "$as_me:5771: \$? = $ac_status" >&5
5772   (exit $ac_status); }; }; then
5773   ac_cv_lib_gpm_Gpm_Wgetch=yes
5774 else
5775   echo "$as_me: failed program was:" >&5
5776 cat conftest.$ac_ext >&5
5777 ac_cv_lib_gpm_Gpm_Wgetch=no
5778 fi
5779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5780 LIBS=$ac_check_lib_save_LIBS
5781 fi
5782 echo "$as_me:5782: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5783 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5784 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5785
5786 echo "$as_me:5786: checking if GPM is weakly bound to curses library" >&5
5787 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5788 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5789   echo $ECHO_N "(cached) $ECHO_C" >&6
5790 else
5791
5792 cf_cv_check_gpm_wgetch=unknown
5793 if test "$cross_compiling" != yes ; then
5794
5795 cat >conftest.$ac_ext <<CF_EOF
5796 #include <gpm.h>
5797 int main(void)
5798 {
5799         Gpm_Wgetch();
5800         ${cf_cv_main_return:-return}(0);
5801 }
5802 CF_EOF
5803
5804         cf_save_LIBS="$LIBS"
5805         # This only works if we can look at the symbol table.  If a shared
5806         # library is stripped for install, we cannot use that.  So we're forced
5807         # to rely on the static library, noting that some packagers may not
5808         # include it.
5809         LIBS="-static -lgpm -dynamic $LIBS"
5810         if { (eval echo "$as_me:5810: \"$ac_compile\"") >&5
5811   (eval $ac_compile) 2>&5
5812   ac_status=$?
5813   echo "$as_me:5813: \$? = $ac_status" >&5
5814   (exit $ac_status); } ; then
5815                 if { (eval echo "$as_me:5815: \"$ac_link\"") >&5
5816   (eval $ac_link) 2>&5
5817   ac_status=$?
5818   echo "$as_me:5818: \$? = $ac_status" >&5
5819   (exit $ac_status); } ; then
5820                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5821                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5822                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5823                 fi
5824         fi
5825         rm -rf conftest*
5826         LIBS="$cf_save_LIBS"
5827 fi
5828
5829 fi
5830 echo "$as_me:5830: result: $cf_cv_check_gpm_wgetch" >&5
5831 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5832
5833 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5834         { echo "$as_me:5834: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5835 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5836 fi
5837
5838 fi
5839
5840 fi
5841
5842 # not everyone has "test -c"
5843 if test -c /dev/sysmouse 2>/dev/null ; then
5844 echo "$as_me:5844: checking if you want to use sysmouse" >&5
5845 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5846
5847 # Check whether --with-sysmouse or --without-sysmouse was given.
5848 if test "${with_sysmouse+set}" = set; then
5849   withval="$with_sysmouse"
5850   cf_with_sysmouse=$withval
5851 else
5852   cf_with_sysmouse=maybe
5853 fi;
5854         if test "$cf_with_sysmouse" != no ; then
5855         cat >conftest.$ac_ext <<_ACEOF
5856 #line 5856 "configure"
5857 #include "confdefs.h"
5858
5859 #include <osreldate.h>
5860 #if (__FreeBSD_version >= 400017)
5861 #include <sys/consio.h>
5862 #include <sys/fbio.h>
5863 #else
5864 #include <machine/console.h>
5865 #endif
5866
5867 int
5868 main (void)
5869 {
5870
5871         struct mouse_info the_mouse;
5872         ioctl(0, CONS_MOUSECTL, &the_mouse);
5873
5874   ;
5875   return 0;
5876 }
5877 _ACEOF
5878 rm -f conftest.$ac_objext
5879 if { (eval echo "$as_me:5879: \"$ac_compile\"") >&5
5880   (eval $ac_compile) 2>&5
5881   ac_status=$?
5882   echo "$as_me:5882: \$? = $ac_status" >&5
5883   (exit $ac_status); } &&
5884          { ac_try='test -s conftest.$ac_objext'
5885   { (eval echo "$as_me:5885: \"$ac_try\"") >&5
5886   (eval $ac_try) 2>&5
5887   ac_status=$?
5888   echo "$as_me:5888: \$? = $ac_status" >&5
5889   (exit $ac_status); }; }; then
5890   cf_with_sysmouse=yes
5891 else
5892   echo "$as_me: failed program was:" >&5
5893 cat conftest.$ac_ext >&5
5894 cf_with_sysmouse=no
5895 fi
5896 rm -f conftest.$ac_objext conftest.$ac_ext
5897         fi
5898 echo "$as_me:5898: result: $cf_with_sysmouse" >&5
5899 echo "${ECHO_T}$cf_with_sysmouse" >&6
5900 test "$cf_with_sysmouse" = yes &&
5901 cat >>confdefs.h <<\EOF
5902 #define USE_SYSMOUSE 1
5903 EOF
5904
5905 fi
5906
5907 if test X"$CC_G_OPT" = X"" ; then
5908         CC_G_OPT='-g'
5909         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5910 fi
5911
5912 if test X"$CXX_G_OPT" = X"" ; then
5913         CXX_G_OPT='-g'
5914         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5915 fi
5916
5917 echo "$as_me:5917: checking for default loader flags" >&5
5918 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5919 case $DFT_LWR_MODEL in
5920 (libtool) LD_MODEL=''   ;;
5921 (normal)  LD_MODEL=''   ;;
5922 (debug)   LD_MODEL=$CC_G_OPT ;;
5923 (profile) LD_MODEL='-pg';;
5924 (shared)  LD_MODEL=''   ;;
5925 esac
5926 echo "$as_me:5926: result: $LD_MODEL" >&5
5927 echo "${ECHO_T}$LD_MODEL" >&6
5928
5929 case $DFT_LWR_MODEL in
5930 (shared)
5931
5932 echo "$as_me:5932: checking if rpath option should be used" >&5
5933 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5934
5935 # Check whether --enable-rpath or --disable-rpath was given.
5936 if test "${enable_rpath+set}" = set; then
5937   enableval="$enable_rpath"
5938   cf_cv_enable_rpath=$enableval
5939 else
5940   cf_cv_enable_rpath=no
5941 fi;
5942 echo "$as_me:5942: result: $cf_cv_enable_rpath" >&5
5943 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5944
5945 echo "$as_me:5945: checking if shared libraries should be relinked during install" >&5
5946 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5947
5948 # Check whether --enable-relink or --disable-relink was given.
5949 if test "${enable_relink+set}" = set; then
5950   enableval="$enable_relink"
5951   cf_cv_do_relink=$enableval
5952 else
5953   cf_cv_do_relink=yes
5954 fi;
5955 echo "$as_me:5955: result: $cf_cv_do_relink" >&5
5956 echo "${ECHO_T}$cf_cv_do_relink" >&6
5957         ;;
5958 esac
5959
5960 # we will build libraries one-level down.
5961 rel_builddir=..
5962
5963 LD_RPATH_OPT=
5964 echo "$as_me:5964: checking for an rpath option" >&5
5965 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5966 case $cf_cv_system_name in
5967 (irix*)
5968         if test "$GCC" = yes; then
5969                 LD_RPATH_OPT="-Wl,-rpath,"
5970         else
5971                 LD_RPATH_OPT="-rpath "
5972         fi
5973         ;;
5974 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5975         LD_RPATH_OPT="-Wl,-rpath,"
5976         ;;
5977 (openbsd[2-9].*|mirbsd*)
5978         LD_RPATH_OPT="-Wl,-rpath,"
5979         ;;
5980 (dragonfly*)
5981         LD_RPATH_OPT="-rpath "
5982         ;;
5983 (netbsd*)
5984         LD_RPATH_OPT="-Wl,-rpath,"
5985         ;;
5986 (osf*|mls+*)
5987         LD_RPATH_OPT="-rpath "
5988         ;;
5989 (solaris2*)
5990         LD_RPATH_OPT="-R"
5991         ;;
5992 (*)
5993         ;;
5994 esac
5995 echo "$as_me:5995: result: $LD_RPATH_OPT" >&5
5996 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5997
5998 case "x$LD_RPATH_OPT" in
5999 (x-R*)
6000         echo "$as_me:6000: checking if we need a space after rpath option" >&5
6001 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6002         cf_save_LIBS="$LIBS"
6003
6004 cf_add_libs="${LD_RPATH_OPT}$libdir"
6005 # Filter out duplicates - this happens with badly-designed ".pc" files...
6006 for cf_add_1lib in $LIBS
6007 do
6008         for cf_add_2lib in $cf_add_libs
6009         do
6010                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6011                 then
6012                         cf_add_1lib=
6013                         break
6014                 fi
6015         done
6016         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6017 done
6018 LIBS="$cf_add_libs"
6019
6020         cat >conftest.$ac_ext <<_ACEOF
6021 #line 6021 "configure"
6022 #include "confdefs.h"
6023
6024 int
6025 main (void)
6026 {
6027
6028   ;
6029   return 0;
6030 }
6031 _ACEOF
6032 rm -f conftest.$ac_objext conftest$ac_exeext
6033 if { (eval echo "$as_me:6033: \"$ac_link\"") >&5
6034   (eval $ac_link) 2>&5
6035   ac_status=$?
6036   echo "$as_me:6036: \$? = $ac_status" >&5
6037   (exit $ac_status); } &&
6038          { ac_try='test -s conftest$ac_exeext'
6039   { (eval echo "$as_me:6039: \"$ac_try\"") >&5
6040   (eval $ac_try) 2>&5
6041   ac_status=$?
6042   echo "$as_me:6042: \$? = $ac_status" >&5
6043   (exit $ac_status); }; }; then
6044   cf_rpath_space=no
6045 else
6046   echo "$as_me: failed program was:" >&5
6047 cat conftest.$ac_ext >&5
6048 cf_rpath_space=yes
6049 fi
6050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6051         LIBS="$cf_save_LIBS"
6052         echo "$as_me:6052: result: $cf_rpath_space" >&5
6053 echo "${ECHO_T}$cf_rpath_space" >&6
6054         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6055         ;;
6056 esac
6057
6058         RM_SHARED_OPTS=
6059         LOCAL_LDFLAGS=
6060         LOCAL_LDFLAGS2=
6061         LD_SHARED_OPTS=
6062         INSTALL_LIB="-m 644"
6063         : ${rel_builddir:=.}
6064
6065         shlibdir=$libdir
6066
6067         MAKE_DLLS="#"
6068
6069         cf_cv_do_symlinks=no
6070         cf_ld_rpath_opt=
6071         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6072
6073         echo "$as_me:6073: checking if release/abi version should be used for shared libs" >&5
6074 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6075
6076 # Check whether --with-shlib-version or --without-shlib-version was given.
6077 if test "${with_shlib_version+set}" = set; then
6078   withval="$with_shlib_version"
6079   test -z "$withval" && withval=auto
6080         case $withval in
6081         (yes)
6082                 cf_cv_shlib_version=auto
6083                 ;;
6084         (rel|abi|auto)
6085                 cf_cv_shlib_version=$withval
6086                 ;;
6087         (*)
6088                 echo "$as_me:6088: result: $withval" >&5
6089 echo "${ECHO_T}$withval" >&6
6090                 { { echo "$as_me:6090: error: option value must be one of: rel, abi, or auto" >&5
6091 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6092    { (exit 1); exit 1; }; }
6093                 ;;
6094         esac
6095
6096 else
6097   cf_cv_shlib_version=auto
6098 fi;
6099         echo "$as_me:6099: result: $cf_cv_shlib_version" >&5
6100 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6101
6102         cf_cv_rm_so_locs=no
6103         cf_try_cflags=
6104
6105         # Some less-capable ports of gcc support only -fpic
6106         CC_SHARED_OPTS=
6107
6108         cf_try_fPIC=no
6109         if test "$GCC" = yes
6110         then
6111                 cf_try_fPIC=yes
6112         else
6113                 case $cf_cv_system_name in
6114                 (*linux*)       # e.g., PGI compiler
6115                         cf_try_fPIC=yes
6116                         ;;
6117                 esac
6118         fi
6119
6120         if test "$cf_try_fPIC" = yes
6121         then
6122                 echo "$as_me:6122: checking which $CC option to use" >&5
6123 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6124                 cf_save_CFLAGS="$CFLAGS"
6125                 for CC_SHARED_OPTS in -fPIC -fpic ''
6126                 do
6127                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6128                         cat >conftest.$ac_ext <<_ACEOF
6129 #line 6129 "configure"
6130 #include "confdefs.h"
6131 #include <stdio.h>
6132 int
6133 main (void)
6134 {
6135 int x = 1
6136   ;
6137   return 0;
6138 }
6139 _ACEOF
6140 rm -f conftest.$ac_objext
6141 if { (eval echo "$as_me:6141: \"$ac_compile\"") >&5
6142   (eval $ac_compile) 2>&5
6143   ac_status=$?
6144   echo "$as_me:6144: \$? = $ac_status" >&5
6145   (exit $ac_status); } &&
6146          { ac_try='test -s conftest.$ac_objext'
6147   { (eval echo "$as_me:6147: \"$ac_try\"") >&5
6148   (eval $ac_try) 2>&5
6149   ac_status=$?
6150   echo "$as_me:6150: \$? = $ac_status" >&5
6151   (exit $ac_status); }; }; then
6152   break
6153 else
6154   echo "$as_me: failed program was:" >&5
6155 cat conftest.$ac_ext >&5
6156 fi
6157 rm -f conftest.$ac_objext conftest.$ac_ext
6158                 done
6159                 echo "$as_me:6159: result: $CC_SHARED_OPTS" >&5
6160 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6161                 CFLAGS="$cf_save_CFLAGS"
6162         fi
6163
6164         cf_cv_shlib_version_infix=no
6165
6166         case $cf_cv_system_name in
6167         (aix4.3-9*|aix[5-7]*)
6168                 if test "$GCC" = yes; then
6169                         CC_SHARED_OPTS='-Wl,-brtl'
6170                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6171                 else
6172                         CC_SHARED_OPTS='-brtl'
6173                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6174                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6175                 fi
6176                 ;;
6177         (beos*)
6178                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6179                 ;;
6180         (cygwin*)
6181                 CC_SHARED_OPTS=
6182                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6183                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6184                 cf_cv_shlib_version=cygdll
6185                 cf_cv_shlib_version_infix=cygdll
6186                 shlibdir=$bindir
6187                 MAKE_DLLS=
6188                 cat >mk_shared_lib.sh <<-CF_EOF
6189                 #!$SHELL
6190                 SHARED_LIB=\$1
6191                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6192                 shift
6193                 cat <<-EOF
6194                 Linking shared library
6195                 ** SHARED_LIB \$SHARED_LIB
6196                 ** IMPORT_LIB \$IMPORT_LIB
6197 EOF
6198                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6199 CF_EOF
6200                 chmod +x mk_shared_lib.sh
6201                 ;;
6202         (msys*)
6203                 CC_SHARED_OPTS=
6204                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6205                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6206                 cf_cv_shlib_version=msysdll
6207                 cf_cv_shlib_version_infix=msysdll
6208                 shlibdir=$bindir
6209                 MAKE_DLLS=
6210                 cat >mk_shared_lib.sh <<-CF_EOF
6211                 #!$SHELL
6212                 SHARED_LIB=\$1
6213                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6214                 shift
6215                 cat <<-EOF
6216                 Linking shared library
6217                 ** SHARED_LIB \$SHARED_LIB
6218                 ** IMPORT_LIB \$IMPORT_LIB
6219 EOF
6220                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6221 CF_EOF
6222                 chmod +x mk_shared_lib.sh
6223                 ;;
6224         (darwin*)
6225                 cf_try_cflags="no-cpp-precomp"
6226                 CC_SHARED_OPTS="-dynamic"
6227                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6228                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6229                 cf_cv_shlib_version_infix=yes
6230                 echo "$as_me:6230: checking if ld -search_paths_first works" >&5
6231 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6232 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6233   echo $ECHO_N "(cached) $ECHO_C" >&6
6234 else
6235
6236                         cf_save_LDFLAGS=$LDFLAGS
6237                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6238                         cat >conftest.$ac_ext <<_ACEOF
6239 #line 6239 "configure"
6240 #include "confdefs.h"
6241
6242 int
6243 main (void)
6244 {
6245 int i;
6246   ;
6247   return 0;
6248 }
6249 _ACEOF
6250 rm -f conftest.$ac_objext conftest$ac_exeext
6251 if { (eval echo "$as_me:6251: \"$ac_link\"") >&5
6252   (eval $ac_link) 2>&5
6253   ac_status=$?
6254   echo "$as_me:6254: \$? = $ac_status" >&5
6255   (exit $ac_status); } &&
6256          { ac_try='test -s conftest$ac_exeext'
6257   { (eval echo "$as_me:6257: \"$ac_try\"") >&5
6258   (eval $ac_try) 2>&5
6259   ac_status=$?
6260   echo "$as_me:6260: \$? = $ac_status" >&5
6261   (exit $ac_status); }; }; then
6262   cf_cv_ldflags_search_paths_first=yes
6263 else
6264   echo "$as_me: failed program was:" >&5
6265 cat conftest.$ac_ext >&5
6266 cf_cv_ldflags_search_paths_first=no
6267 fi
6268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6269                                 LDFLAGS=$cf_save_LDFLAGS
6270 fi
6271 echo "$as_me:6271: result: $cf_cv_ldflags_search_paths_first" >&5
6272 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6273                 if test $cf_cv_ldflags_search_paths_first = yes; then
6274                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6275                 fi
6276                 ;;
6277         (hpux[7-8]*)
6278                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6279                 if test "$GCC" != yes; then
6280                         CC_SHARED_OPTS='+Z'
6281                 fi
6282                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6283                 INSTALL_LIB="-m 555"
6284                 ;;
6285         (hpux*)
6286                 # (tested with gcc 2.7.2 -- I don't have c89)
6287                 if test "$GCC" = yes; then
6288                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6289                 else
6290                         CC_SHARED_OPTS='+Z'
6291                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6292                 fi
6293                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6294                 # HP-UX shared libraries must be executable, and should be
6295                 # readonly to exploit a quirk in the memory manager.
6296                 INSTALL_LIB="-m 555"
6297                 ;;
6298         (interix*)
6299                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6300                 if test "$cf_cv_shlib_version" = rel; then
6301                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6302                 else
6303                         cf_shared_soname='`basename $@`'
6304                 fi
6305                 CC_SHARED_OPTS=
6306                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6307                 ;;
6308         (irix*)
6309                 if test "$cf_cv_enable_rpath" = yes ; then
6310                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6311                 fi
6312                 # tested with IRIX 5.2 and 'cc'.
6313                 if test "$GCC" != yes; then
6314                         CC_SHARED_OPTS='-KPIC'
6315                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6316                 else
6317                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6318                 fi
6319                 cf_cv_rm_so_locs=yes
6320                 ;;
6321         (linux*|gnu*|k*bsd*-gnu)
6322                 if test "$DFT_LWR_MODEL" = "shared" ; then
6323                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6324                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6325                 fi
6326                 if test "$cf_cv_enable_rpath" = yes ; then
6327                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6328                 fi
6329
6330         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6331         if test "$cf_cv_shlib_version" = rel; then
6332                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6333         else
6334                 cf_cv_shared_soname='`basename $@`'
6335         fi
6336
6337                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6338                 ;;
6339         (mingw*)
6340                 cf_cv_shlib_version=mingw
6341                 cf_cv_shlib_version_infix=mingw
6342                 shlibdir=$bindir
6343                 MAKE_DLLS=
6344                 if test "$DFT_LWR_MODEL" = "shared" ; then
6345                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6346                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6347                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6348                 fi
6349                 CC_SHARED_OPTS=
6350                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6351                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6352                 cat >mk_shared_lib.sh <<-CF_EOF
6353                 #!$SHELL
6354                 SHARED_LIB=\$1
6355                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6356                 shift
6357                 cat <<-EOF
6358                 Linking shared library
6359                 ** SHARED_LIB \$SHARED_LIB
6360                 ** IMPORT_LIB \$IMPORT_LIB
6361 EOF
6362                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6363 CF_EOF
6364                 chmod +x mk_shared_lib.sh
6365                 ;;
6366         (openbsd[2-9].*|mirbsd*)
6367                 if test "$DFT_LWR_MODEL" = "shared" ; then
6368                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6369                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6370                 fi
6371                 if test "$cf_cv_enable_rpath" = yes ; then
6372                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6373                 fi
6374                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6375
6376         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6377         if test "$cf_cv_shlib_version" = rel; then
6378                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6379         else
6380                 cf_cv_shared_soname='`basename $@`'
6381         fi
6382
6383                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6384                 ;;
6385         (nto-qnx*|openbsd*|freebsd[12].*)
6386                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6387                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6388                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6389                 ;;
6390         (dragonfly*|freebsd*)
6391                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6392                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6393                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6394                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6395                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6396                 fi
6397
6398         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6399         if test "$cf_cv_shlib_version" = rel; then
6400                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6401         else
6402                 cf_cv_shared_soname='`basename $@`'
6403         fi
6404
6405                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6406                 ;;
6407         (netbsd*)
6408                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6409                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6410                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6411                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6412                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6413                         if test "$cf_cv_shlib_version" = auto; then
6414                         if test -f /usr/libexec/ld.elf_so; then
6415                                 cf_cv_shlib_version=abi
6416                         else
6417                                 cf_cv_shlib_version=rel
6418                         fi
6419                         fi
6420
6421         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6422         if test "$cf_cv_shlib_version" = rel; then
6423                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6424         else
6425                 cf_cv_shared_soname='`basename $@`'
6426         fi
6427
6428                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6429                 else
6430                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6431                 fi
6432                 ;;
6433         (osf*|mls+*)
6434                 # tested with OSF/1 V3.2 and 'cc'
6435                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6436                 # link with shared libs).
6437                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6438                 case $host_os in
6439                 (osf4*)
6440                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6441                         ;;
6442                 esac
6443                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6444                 if test "$DFT_LWR_MODEL" = "shared" ; then
6445                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6446                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6447                 fi
6448                 cf_cv_rm_so_locs=yes
6449                 ;;
6450         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6451                 # tested with osr5.0.5
6452                 if test "$GCC" != yes; then
6453                         CC_SHARED_OPTS='-belf -KPIC'
6454                 fi
6455                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6456                 if test "$cf_cv_enable_rpath" = yes ; then
6457                         # only way is to set LD_RUN_PATH but no switch for it
6458                         RUN_PATH=$libdir
6459                 fi
6460                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6461                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6462                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6463                 ;;
6464         (sunos4*)
6465                 # tested with SunOS 4.1.1 and gcc 2.7.0
6466                 if test "$GCC" != yes; then
6467                         CC_SHARED_OPTS='-KPIC'
6468                 fi
6469                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6470                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6471                 ;;
6472         (solaris2*)
6473                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6474                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6475                 if test "$DFT_LWR_MODEL" = "shared" ; then
6476                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6477                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6478                 fi
6479                 if test "$cf_cv_enable_rpath" = yes ; then
6480                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6481                 fi
6482
6483         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6484         if test "$cf_cv_shlib_version" = rel; then
6485                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6486         else
6487                 cf_cv_shared_soname='`basename $@`'
6488         fi
6489
6490                 if test "$GCC" != yes; then
6491                         cf_save_CFLAGS="$CFLAGS"
6492                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6493                         do
6494                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6495                                 cat >conftest.$ac_ext <<_ACEOF
6496 #line 6496 "configure"
6497 #include "confdefs.h"
6498 #include <stdio.h>
6499 int
6500 main (void)
6501 {
6502 printf("Hello\n");
6503   ;
6504   return 0;
6505 }
6506 _ACEOF
6507 rm -f conftest.$ac_objext
6508 if { (eval echo "$as_me:6508: \"$ac_compile\"") >&5
6509   (eval $ac_compile) 2>&5
6510   ac_status=$?
6511   echo "$as_me:6511: \$? = $ac_status" >&5
6512   (exit $ac_status); } &&
6513          { ac_try='test -s conftest.$ac_objext'
6514   { (eval echo "$as_me:6514: \"$ac_try\"") >&5
6515   (eval $ac_try) 2>&5
6516   ac_status=$?
6517   echo "$as_me:6517: \$? = $ac_status" >&5
6518   (exit $ac_status); }; }; then
6519   break
6520 else
6521   echo "$as_me: failed program was:" >&5
6522 cat conftest.$ac_ext >&5
6523 fi
6524 rm -f conftest.$ac_objext conftest.$ac_ext
6525                         done
6526                         CFLAGS="$cf_save_CFLAGS"
6527                         CC_SHARED_OPTS=$cf_shared_opts
6528                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6529                 else
6530                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6531                 fi
6532                 ;;
6533         (sysv5uw7*|unix_sv*)
6534                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6535                 if test "$GCC" != yes; then
6536                         CC_SHARED_OPTS='-KPIC'
6537                 fi
6538                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6539                 ;;
6540         (*)
6541                 CC_SHARED_OPTS='unknown'
6542                 MK_SHARED_LIB='echo unknown'
6543                 ;;
6544         esac
6545
6546         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6547         case "$cf_cv_shlib_version" in
6548         (rel|abi)
6549                 case "$MK_SHARED_LIB" in
6550                 (*'-o $@')
6551                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6552                         ;;
6553                 (*)
6554                         { echo "$as_me:6554: WARNING: ignored --with-shlib-version" >&5
6555 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6556                         ;;
6557                 esac
6558                 ;;
6559         esac
6560
6561         if test -n "$cf_try_cflags"
6562         then
6563 cat > conftest.$ac_ext <<EOF
6564 #line 6564 "${as_me:-configure}"
6565 #include <stdio.h>
6566 int main(int argc, char *argv[])
6567 {
6568         printf("hello\n");
6569         return (argv[argc-1] == 0) ;
6570 }
6571 EOF
6572                 cf_save_CFLAGS="$CFLAGS"
6573                 for cf_opt in $cf_try_cflags
6574                 do
6575                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6576                         echo "$as_me:6576: checking if CFLAGS option -$cf_opt works" >&5
6577 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6578                         if { (eval echo "$as_me:6578: \"$ac_compile\"") >&5
6579   (eval $ac_compile) 2>&5
6580   ac_status=$?
6581   echo "$as_me:6581: \$? = $ac_status" >&5
6582   (exit $ac_status); }; then
6583                                 echo "$as_me:6583: result: yes" >&5
6584 echo "${ECHO_T}yes" >&6
6585                                 cf_save_CFLAGS="$CFLAGS"
6586                         else
6587                                 echo "$as_me:6587: result: no" >&5
6588 echo "${ECHO_T}no" >&6
6589                         fi
6590                 done
6591                 CFLAGS="$cf_save_CFLAGS"
6592         fi
6593
6594         # RPATH_LIST is a colon-separated list of directories
6595         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6596         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6597
6598         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6599
6600         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6601
6602 echo "${as_me:-configure}:6602: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6603
6604         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6605
6606 echo "${as_me:-configure}:6606: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6607
6608 for model in $cf_list_models; do
6609         case $model in
6610         (libtool)
6611
6612 echo "$as_me:6612: checking for additional libtool options" >&5
6613 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6614
6615 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6616 if test "${with_libtool_opts+set}" = set; then
6617   withval="$with_libtool_opts"
6618   with_libtool_opts=$withval
6619 else
6620   with_libtool_opts=no
6621 fi;
6622 echo "$as_me:6622: result: $with_libtool_opts" >&5
6623 echo "${ECHO_T}$with_libtool_opts" >&6
6624
6625 case .$with_libtool_opts in
6626 (.yes|.no|.)
6627         ;;
6628 (*)
6629         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6630         ;;
6631 esac
6632
6633 echo "$as_me:6633: checking if exported-symbols file should be used" >&5
6634 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6635
6636 # Check whether --with-export-syms or --without-export-syms was given.
6637 if test "${with_export_syms+set}" = set; then
6638   withval="$with_export_syms"
6639   with_export_syms=$withval
6640 else
6641   with_export_syms=no
6642 fi;
6643 if test "x$with_export_syms" = xyes
6644 then
6645         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6646
6647 fi
6648 echo "$as_me:6648: result: $with_export_syms" >&5
6649 echo "${ECHO_T}$with_export_syms" >&6
6650 if test "x$with_export_syms" != xno
6651 then
6652         EXPORT_SYMS="-export-symbols $with_export_syms"
6653
6654 fi
6655
6656                 ;;
6657         (shared)
6658                 if test "$CC_SHARED_OPTS" = "unknown"; then
6659                         { { echo "$as_me:6659: error: Shared libraries are not supported in this version" >&5
6660 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6661    { (exit 1); exit 1; }; }
6662                 fi
6663                 # workaround for inept transition to PIE vs PIC...
6664                 echo "$as_me:6664: checking if current CFLAGS link properly" >&5
6665 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6666                 cat >conftest.$ac_ext <<_ACEOF
6667 #line 6667 "configure"
6668 #include "confdefs.h"
6669 #include <stdio.h>
6670 int
6671 main (void)
6672 {
6673 printf("Hello work\n");
6674   ;
6675   return 0;
6676 }
6677 _ACEOF
6678 rm -f conftest.$ac_objext conftest$ac_exeext
6679 if { (eval echo "$as_me:6679: \"$ac_link\"") >&5
6680   (eval $ac_link) 2>&5
6681   ac_status=$?
6682   echo "$as_me:6682: \$? = $ac_status" >&5
6683   (exit $ac_status); } &&
6684          { ac_try='test -s conftest$ac_exeext'
6685   { (eval echo "$as_me:6685: \"$ac_try\"") >&5
6686   (eval $ac_try) 2>&5
6687   ac_status=$?
6688   echo "$as_me:6688: \$? = $ac_status" >&5
6689   (exit $ac_status); }; }; then
6690   cf_cflags_work=yes
6691 else
6692   echo "$as_me: failed program was:" >&5
6693 cat conftest.$ac_ext >&5
6694 cf_cflags_work=no
6695 fi
6696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6697                 echo "$as_me:6697: result: $cf_cflags_work" >&5
6698 echo "${ECHO_T}$cf_cflags_work" >&6
6699                 if test "$cf_cflags_work" = no
6700                 then
6701                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6702
6703 echo "${as_me:-configure}:6703: testing try to work around by appending shared-options ..." 1>&5
6704
6705                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6706                 fi
6707
6708 echo "$as_me:6708: checking if versioned-symbols file should be used" >&5
6709 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6710
6711 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6712 if test "${with_versioned_syms+set}" = set; then
6713   withval="$with_versioned_syms"
6714   with_versioned_syms=$withval
6715 else
6716   with_versioned_syms=no
6717 fi;
6718 if test "x$with_versioned_syms" = xyes
6719 then
6720         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6721
6722 fi
6723 echo "$as_me:6723: result: $with_versioned_syms" >&5
6724 echo "${ECHO_T}$with_versioned_syms" >&6
6725
6726 RESULTING_SYMS=
6727 VERSIONED_SYMS=
6728 WILDCARD_SYMS=
6729
6730 if test "x$with_versioned_syms" != xno
6731 then
6732         RESULTING_SYMS=$with_versioned_syms
6733         case "x$MK_SHARED_LIB" in
6734         (*-Wl,*)
6735                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6736                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6737                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6738
6739 echo "${as_me:-configure}:6739: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6740
6741                 ;;
6742         (*-dy\ *)
6743                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6744                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6745                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6746
6747 echo "${as_me:-configure}:6747: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6748
6749                 ;;
6750         (*)
6751                 { echo "$as_me:6751: WARNING: this system does not support versioned-symbols" >&5
6752 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6753                 ;;
6754         esac
6755
6756         # Linux ld can selectively override scope, e.g., of symbols beginning with
6757         # "_" by first declaring some as global, and then using a wildcard to
6758         # declare the others as local.  Some other loaders cannot do this.  Check
6759         # by constructing a (very) simple shared library and inspecting its
6760         # symbols.
6761         if test "x$VERSIONED_SYMS" != "x"
6762         then
6763                 echo "$as_me:6763: checking if wildcards can be used to selectively omit symbols" >&5
6764 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6765                 WILDCARD_SYMS=no
6766
6767                 # make sources
6768                 rm -f conftest.*
6769
6770                 cat >conftest.ver <<EOF
6771 module_1.0 {
6772 global:
6773         globalf1;
6774 local:
6775         localf1;
6776 };
6777 module_2.0 {
6778 global:
6779         globalf2;
6780 local:
6781         localf2;
6782         _*;
6783 } module_1.0;
6784 submodule_1.0 {
6785 global:
6786         subglobalf1;
6787         _ismissing;
6788 local:
6789         sublocalf1;
6790 };
6791 submodule_2.0 {
6792 global:
6793         subglobalf2;
6794 local:
6795         sublocalf2;
6796         _*;
6797 } submodule_1.0;
6798 EOF
6799                 cat >conftest.$ac_ext <<EOF
6800 #line 6800 "configure"
6801 int     _ismissing(void) { return 1; }
6802 int     _localf1(void) { return 1; }
6803 int     _localf2(void) { return 2; }
6804 int     globalf1(void) { return 1; }
6805 int     globalf2(void) { return 2; }
6806 int     _sublocalf1(void) { return 1; }
6807 int     _sublocalf2(void) { return 2; }
6808 int     subglobalf1(void) { return 1; }
6809 int     subglobalf2(void) { return 2; }
6810 EOF
6811                 cat >conftest.mk <<EOF
6812 CC=${CC}
6813 CFLAGS=${CFLAGS}
6814 CPPFLAGS=${CPPFLAGS}
6815 LDFLAGS=${LDFLAGS}
6816 LIBS=${LIBS}
6817 VERSIONED_SYMS=${VERSIONED_SYMS}
6818 RESULTING_SYMS=conftest.ver
6819 MK_SHARED_LIB=${MK_SHARED_LIB}
6820 conftest.so: conftest.$ac_cv_objext
6821                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6822 EOF
6823
6824                 # compile source, make library
6825                 if make -f conftest.mk 2>&5 >/dev/null
6826                 then
6827                         # test for missing symbol in either Data or Text section
6828                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6829                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6830                 fi
6831                 echo "$as_me:6831: result: $WILDCARD_SYMS" >&5
6832 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6833                 rm -f conftest.*
6834         fi
6835 fi
6836
6837                 ;;
6838         esac
6839 done
6840
6841 # pretend that ncurses==ncursesw==ncursest
6842 echo "$as_me:6842: checking if you want to disable library suffixes" >&5
6843 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6844
6845 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6846 if test "${enable_lib_suffixes+set}" = set; then
6847   enableval="$enable_lib_suffixes"
6848   test "$enableval" != no && enableval=yes
6849         if test "$enableval" != "yes" ; then
6850     disable_lib_suffixes=yes
6851         else
6852                 disable_lib_suffixes=no
6853         fi
6854 else
6855   enableval=yes
6856         disable_lib_suffixes=no
6857
6858 fi;
6859 echo "$as_me:6859: result: $disable_lib_suffixes" >&5
6860 echo "${ECHO_T}$disable_lib_suffixes" >&6
6861
6862 ### If we're building with rpath, try to link non-standard libs that way too.
6863 if test "$DFT_LWR_MODEL" = "shared"; then
6864
6865 echo "$as_me:6865: checking if rpath-hack should be disabled" >&5
6866 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6867
6868 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6869 if test "${enable_rpath_hack+set}" = set; then
6870   enableval="$enable_rpath_hack"
6871   test "$enableval" != no && enableval=yes
6872         if test "$enableval" != "yes" ; then
6873     cf_disable_rpath_hack=yes
6874         else
6875                 cf_disable_rpath_hack=no
6876         fi
6877 else
6878   enableval=yes
6879         cf_disable_rpath_hack=no
6880
6881 fi;
6882 echo "$as_me:6882: result: $cf_disable_rpath_hack" >&5
6883 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6884 if test "$cf_disable_rpath_hack" = no ; then
6885
6886 echo "$as_me:6886: checking for updated LDFLAGS" >&5
6887 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6888 if test -n "$LD_RPATH_OPT" ; then
6889         echo "$as_me:6889: result: maybe" >&5
6890 echo "${ECHO_T}maybe" >&6
6891
6892         for ac_prog in ldd
6893 do
6894   # Extract the first word of "$ac_prog", so it can be a program name with args.
6895 set dummy $ac_prog; ac_word=$2
6896 echo "$as_me:6896: checking for $ac_word" >&5
6897 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6898 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6899   echo $ECHO_N "(cached) $ECHO_C" >&6
6900 else
6901   if test -n "$cf_ldd_prog"; then
6902   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6903 else
6904   ac_save_IFS=$IFS; IFS=$ac_path_separator
6905 ac_dummy="$PATH"
6906 for ac_dir in $ac_dummy; do
6907   IFS=$ac_save_IFS
6908   test -z "$ac_dir" && ac_dir=.
6909   $as_executable_p "$ac_dir/$ac_word" || continue
6910 ac_cv_prog_cf_ldd_prog="$ac_prog"
6911 echo "$as_me:6911: found $ac_dir/$ac_word" >&5
6912 break
6913 done
6914
6915 fi
6916 fi
6917 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6918 if test -n "$cf_ldd_prog"; then
6919   echo "$as_me:6919: result: $cf_ldd_prog" >&5
6920 echo "${ECHO_T}$cf_ldd_prog" >&6
6921 else
6922   echo "$as_me:6922: result: no" >&5
6923 echo "${ECHO_T}no" >&6
6924 fi
6925
6926   test -n "$cf_ldd_prog" && break
6927 done
6928 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6929
6930         cf_rpath_list="/usr/lib /lib"
6931         if test "$cf_ldd_prog" != no
6932         then
6933                 cf_rpath_oops=
6934
6935 cat >conftest.$ac_ext <<_ACEOF
6936 #line 6936 "configure"
6937 #include "confdefs.h"
6938 #include <stdio.h>
6939 int
6940 main (void)
6941 {
6942 printf("Hello");
6943   ;
6944   return 0;
6945 }
6946 _ACEOF
6947 rm -f conftest.$ac_objext conftest$ac_exeext
6948 if { (eval echo "$as_me:6948: \"$ac_link\"") >&5
6949   (eval $ac_link) 2>&5
6950   ac_status=$?
6951   echo "$as_me:6951: \$? = $ac_status" >&5
6952   (exit $ac_status); } &&
6953          { ac_try='test -s conftest$ac_exeext'
6954   { (eval echo "$as_me:6954: \"$ac_try\"") >&5
6955   (eval $ac_try) 2>&5
6956   ac_status=$?
6957   echo "$as_me:6957: \$? = $ac_status" >&5
6958   (exit $ac_status); }; }; then
6959   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6960                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6961 else
6962   echo "$as_me: failed program was:" >&5
6963 cat conftest.$ac_ext >&5
6964 fi
6965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6966
6967                 # If we passed the link-test, but get a "not found" on a given library,
6968                 # this could be due to inept reconfiguration of gcc to make it only
6969                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6970                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6971                 # /usr/local libraries.
6972                 if test -n "$cf_rpath_oops"
6973                 then
6974                         for cf_rpath_src in $cf_rpath_oops
6975                         do
6976                                 for cf_rpath_dir in \
6977                                         /usr/local \
6978                                         /usr/pkg \
6979                                         /opt/sfw
6980                                 do
6981                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6982                                         then
6983                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6984
6985 echo "${as_me:-configure}:6985: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6986
6987                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6988                                                 break
6989                                         fi
6990                                 done
6991                         done
6992                 fi
6993         fi
6994
6995         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6996
6997 echo "${as_me:-configure}:6997: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6998
6999 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7000
7001 echo "${as_me:-configure}:7001: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7002
7003 cf_rpath_dst=
7004 for cf_rpath_src in $LDFLAGS
7005 do
7006         case $cf_rpath_src in
7007         (-L*)
7008
7009                 # check if this refers to a directory which we will ignore
7010                 cf_rpath_skip=no
7011                 if test -n "$cf_rpath_list"
7012                 then
7013                         for cf_rpath_item in $cf_rpath_list
7014                         do
7015                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7016                                 then
7017                                         cf_rpath_skip=yes
7018                                         break
7019                                 fi
7020                         done
7021                 fi
7022
7023                 if test "$cf_rpath_skip" = no
7024                 then
7025                         # transform the option
7026                         if test "$LD_RPATH_OPT" = "-R " ; then
7027                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7028                         else
7029                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7030                         fi
7031
7032                         # if we have not already added this, add it now
7033                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7034                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7035                         then
7036                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7037
7038 echo "${as_me:-configure}:7038: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7039
7040                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7041                         fi
7042                 fi
7043                 ;;
7044         esac
7045         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7046 done
7047 LDFLAGS=$cf_rpath_dst
7048
7049 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7050
7051 echo "${as_me:-configure}:7051: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7052
7053 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7054
7055 echo "${as_me:-configure}:7055: testing ...checking LIBS $LIBS ..." 1>&5
7056
7057 cf_rpath_dst=
7058 for cf_rpath_src in $LIBS
7059 do
7060         case $cf_rpath_src in
7061         (-L*)
7062
7063                 # check if this refers to a directory which we will ignore
7064                 cf_rpath_skip=no
7065                 if test -n "$cf_rpath_list"
7066                 then
7067                         for cf_rpath_item in $cf_rpath_list
7068                         do
7069                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7070                                 then
7071                                         cf_rpath_skip=yes
7072                                         break
7073                                 fi
7074                         done
7075                 fi
7076
7077                 if test "$cf_rpath_skip" = no
7078                 then
7079                         # transform the option
7080                         if test "$LD_RPATH_OPT" = "-R " ; then
7081                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7082                         else
7083                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7084                         fi
7085
7086                         # if we have not already added this, add it now
7087                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7088                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7089                         then
7090                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7091
7092 echo "${as_me:-configure}:7092: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7093
7094                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7095                         fi
7096                 fi
7097                 ;;
7098         esac
7099         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7100 done
7101 LIBS=$cf_rpath_dst
7102
7103 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7104
7105 echo "${as_me:-configure}:7105: testing ...checked LIBS $LIBS ..." 1>&5
7106
7107         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7108
7109 echo "${as_me:-configure}:7109: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7110
7111 else
7112         echo "$as_me:7112: result: no" >&5
7113 echo "${ECHO_T}no" >&6
7114 fi
7115
7116 fi
7117
7118 fi
7119
7120 ###############################################################################
7121
7122 ###     use option --with-extra-suffix to append suffix to headers and libraries
7123 echo "$as_me:7123: checking if you wish to append extra suffix to header/library paths" >&5
7124 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7125 EXTRA_SUFFIX=
7126
7127 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7128 if test "${with_extra_suffix+set}" = set; then
7129   withval="$with_extra_suffix"
7130   case x$withval in
7131         (no)
7132                 ;;
7133         (xyes|x)
7134                 EXTRA_SUFFIX=$cf_cv_abi_version
7135                 ;;
7136         (*)
7137                 EXTRA_SUFFIX=$withval
7138                 ;;
7139         esac
7140
7141 fi;
7142 echo "$as_me:7142: result: $EXTRA_SUFFIX" >&5
7143 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7144
7145 ###     use option --disable-overwrite to leave out the link to -lcurses
7146 echo "$as_me:7146: checking if you wish to install ncurses overwriting curses" >&5
7147 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7148
7149 # Check whether --enable-overwrite or --disable-overwrite was given.
7150 if test "${enable_overwrite+set}" = set; then
7151   enableval="$enable_overwrite"
7152   with_overwrite=$enableval
7153 else
7154   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7155 fi;
7156 echo "$as_me:7156: result: $with_overwrite" >&5
7157 echo "${ECHO_T}$with_overwrite" >&6
7158
7159 echo "$as_me:7159: checking if external terminfo-database is used" >&5
7160 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7161
7162 # Check whether --enable-database or --disable-database was given.
7163 if test "${enable_database+set}" = set; then
7164   enableval="$enable_database"
7165   use_database=$enableval
7166 else
7167   use_database=yes
7168 fi;
7169 echo "$as_me:7169: result: $use_database" >&5
7170 echo "${ECHO_T}$use_database" >&6
7171
7172 case $host_os in
7173 (os2*)
7174         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7175         ;;
7176 (*)
7177         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7178         ;;
7179 esac
7180
7181 NCURSES_USE_DATABASE=0
7182 if test "$use_database" != no ; then
7183         NCURSES_USE_DATABASE=1
7184
7185         echo "$as_me:7185: checking which terminfo source-file will be installed" >&5
7186 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7187
7188 # Check whether --with-database or --without-database was given.
7189 if test "${with_database+set}" = set; then
7190   withval="$with_database"
7191   TERMINFO_SRC=$withval
7192 fi;
7193         echo "$as_me:7193: result: $TERMINFO_SRC" >&5
7194 echo "${ECHO_T}$TERMINFO_SRC" >&6
7195
7196         echo "$as_me:7196: checking whether to use hashed database instead of directory/tree" >&5
7197 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7198
7199 # Check whether --with-hashed-db or --without-hashed-db was given.
7200 if test "${with_hashed_db+set}" = set; then
7201   withval="$with_hashed_db"
7202
7203 else
7204   with_hashed_db=no
7205 fi;
7206         echo "$as_me:7206: result: $with_hashed_db" >&5
7207 echo "${ECHO_T}$with_hashed_db" >&6
7208 else
7209         with_hashed_db=no
7210 fi
7211
7212 echo "$as_me:7212: checking for list of fallback descriptions" >&5
7213 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7214
7215 # Check whether --with-fallbacks or --without-fallbacks was given.
7216 if test "${with_fallbacks+set}" = set; then
7217   withval="$with_fallbacks"
7218   with_fallback=$withval
7219 else
7220   with_fallback=
7221 fi;
7222 echo "$as_me:7222: result: $with_fallback" >&5
7223 echo "${ECHO_T}$with_fallback" >&6
7224 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7225
7226 echo "$as_me:7226: checking if you want modern xterm or antique" >&5
7227 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7228
7229 # Check whether --with-xterm-new or --without-xterm-new was given.
7230 if test "${with_xterm_new+set}" = set; then
7231   withval="$with_xterm_new"
7232   with_xterm_new=$withval
7233 else
7234   with_xterm_new=yes
7235 fi;
7236 case $with_xterm_new in
7237 (no) with_xterm_new=xterm-old;;
7238 (*)      with_xterm_new=xterm-new;;
7239 esac
7240 echo "$as_me:7240: result: $with_xterm_new" >&5
7241 echo "${ECHO_T}$with_xterm_new" >&6
7242 WHICH_XTERM=$with_xterm_new
7243
7244 echo "$as_me:7244: checking if xterm backspace sends BS or DEL" >&5
7245 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7246
7247 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7248 if test "${with_xterm_kbs+set}" = set; then
7249   withval="$with_xterm_kbs"
7250   with_xterm_kbs=$withval
7251 else
7252   with_xterm_kbs=BS
7253 fi;
7254 case x$with_xterm_kbs in
7255 (xyes|xno|xBS|xbs|x8)
7256         with_xterm_kbs=BS
7257         ;;
7258 (xDEL|xdel|x127)
7259         with_xterm_kbs=DEL
7260         ;;
7261 (*)
7262         with_xterm_kbs=$withval
7263         ;;
7264 esac
7265 echo "$as_me:7265: result: $with_xterm_kbs" >&5
7266 echo "${ECHO_T}$with_xterm_kbs" >&6
7267 XTERM_KBS=$with_xterm_kbs
7268
7269 MAKE_TERMINFO=
7270 if test "$use_database" = no ; then
7271         TERMINFO="${datadir}/terminfo"
7272         MAKE_TERMINFO="#"
7273 else
7274
7275 echo "$as_me:7275: checking for list of terminfo directories" >&5
7276 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7277
7278 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7279 if test "${with_terminfo_dirs+set}" = set; then
7280   withval="$with_terminfo_dirs"
7281
7282 else
7283   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7284 fi;
7285 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7286 cf_dst_path=
7287 for cf_src_path in $withval
7288 do
7289
7290 if test "x$prefix" != xNONE; then
7291         cf_path_syntax="$prefix"
7292 else
7293         cf_path_syntax="$ac_default_prefix"
7294 fi
7295
7296 case ".$cf_src_path" in
7297 (.\$\(*\)*|.\'*\'*)
7298         ;;
7299 (..|./*|.\\*)
7300         ;;
7301 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7302         ;;
7303 (.\${*prefix}*|.\${*dir}*)
7304         eval cf_src_path="$cf_src_path"
7305         case ".$cf_src_path" in
7306         (.NONE/*)
7307                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7308                 ;;
7309         esac
7310         ;;
7311 (.no|.NONE/*)
7312         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7313         ;;
7314 (*)
7315         { { echo "$as_me:7315: error: expected a pathname, not \"$cf_src_path\"" >&5
7316 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7317    { (exit 1); exit 1; }; }
7318         ;;
7319 esac
7320
7321   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7322   cf_dst_path="${cf_dst_path}${cf_src_path}"
7323 done
7324 IFS="$ac_save_ifs"
7325
7326 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7327 # so we have to check/work around.  We do prefer the result of "eval"...
7328 eval cf_dst_eval="$cf_dst_path"
7329 case "x$cf_dst_eval" in
7330 (xNONE*)
7331         TERMINFO_DIRS=$cf_dst_path
7332         ;;
7333 (*)
7334         TERMINFO_DIRS="$cf_dst_eval"
7335         ;;
7336 esac
7337
7338 echo "$as_me:7338: result: $TERMINFO_DIRS" >&5
7339 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7340 test -n "$TERMINFO_DIRS" &&
7341 cat >>confdefs.h <<EOF
7342 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7343 EOF
7344
7345 echo "$as_me:7345: checking for default terminfo directory" >&5
7346 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7347
7348 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7349 if test "${with_default_terminfo_dir+set}" = set; then
7350   withval="$with_default_terminfo_dir"
7351
7352 else
7353   withval="${TERMINFO:-${datadir}/terminfo}"
7354 fi; if test -n "${datadir}/terminfo" ; then
7355
7356 if test "x$prefix" != xNONE; then
7357         cf_path_syntax="$prefix"
7358 else
7359         cf_path_syntax="$ac_default_prefix"
7360 fi
7361
7362 case ".$withval" in
7363 (.\$\(*\)*|.\'*\'*)
7364         ;;
7365 (..|./*|.\\*)
7366         ;;
7367 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7368         ;;
7369 (.\${*prefix}*|.\${*dir}*)
7370         eval withval="$withval"
7371         case ".$withval" in
7372         (.NONE/*)
7373                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7374                 ;;
7375         esac
7376         ;;
7377 (.no|.NONE/*)
7378         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7379         ;;
7380 (*)
7381         { { echo "$as_me:7381: error: expected a pathname, not \"$withval\"" >&5
7382 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7383    { (exit 1); exit 1; }; }
7384         ;;
7385 esac
7386
7387 fi
7388 eval TERMINFO="$withval"
7389
7390 echo "$as_me:7390: result: $TERMINFO" >&5
7391 echo "${ECHO_T}$TERMINFO" >&6
7392
7393 cat >>confdefs.h <<EOF
7394 #define TERMINFO "$TERMINFO"
7395 EOF
7396
7397 fi
7398
7399 ###     use option --disable-big-core to make tic run on small machines
7400 ###     We need 4Mb, check if we can allocate 50% more than that.
7401 echo "$as_me:7401: checking if big-core option selected" >&5
7402 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7403
7404 # Check whether --enable-big-core or --disable-big-core was given.
7405 if test "${enable_big_core+set}" = set; then
7406   enableval="$enable_big_core"
7407   with_big_core=$enableval
7408 else
7409   if test "$cross_compiling" = yes; then
7410   with_big_core=no
7411 else
7412   cat >conftest.$ac_ext <<_ACEOF
7413 #line 7413 "configure"
7414 #include "confdefs.h"
7415
7416 #include <stdlib.h>
7417 #include <string.h>
7418 int main() {
7419         unsigned long n = 6000000L;
7420         char *s = malloc(n);
7421         if (s != 0)
7422                 s[0] = s[n-1] = 0;
7423         ${cf_cv_main_return:-return}(s == 0);
7424 }
7425 _ACEOF
7426 rm -f conftest$ac_exeext
7427 if { (eval echo "$as_me:7427: \"$ac_link\"") >&5
7428   (eval $ac_link) 2>&5
7429   ac_status=$?
7430   echo "$as_me:7430: \$? = $ac_status" >&5
7431   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7432   { (eval echo "$as_me:7432: \"$ac_try\"") >&5
7433   (eval $ac_try) 2>&5
7434   ac_status=$?
7435   echo "$as_me:7435: \$? = $ac_status" >&5
7436   (exit $ac_status); }; }; then
7437   with_big_core=yes
7438 else
7439   echo "$as_me: program exited with status $ac_status" >&5
7440 echo "$as_me: failed program was:" >&5
7441 cat conftest.$ac_ext >&5
7442 with_big_core=no
7443 fi
7444 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7445 fi
7446 fi;
7447 echo "$as_me:7447: result: $with_big_core" >&5
7448 echo "${ECHO_T}$with_big_core" >&6
7449 test "x$with_big_core" = "xyes" &&
7450 cat >>confdefs.h <<\EOF
7451 #define HAVE_BIG_CORE 1
7452 EOF
7453
7454 ### ISO C only guarantees 512-char strings, we have tables which load faster
7455 ### when constructed using "big" strings.  More than the C compiler, the awk
7456 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7457 echo "$as_me:7457: checking if big-strings option selected" >&5
7458 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7459
7460 # Check whether --enable-big-strings or --disable-big-strings was given.
7461 if test "${enable_big_strings+set}" = set; then
7462   enableval="$enable_big_strings"
7463   with_big_strings=$enableval
7464 else
7465
7466         case x$AWK in
7467         (x)
7468                 eval with_big_strings=no
7469                 ;;
7470         (*)
7471                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7472                         | $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
7473                         eval with_big_strings=yes
7474                 else
7475                         eval with_big_strings=no
7476                 fi
7477                 ;;
7478         esac
7479
7480 fi;
7481 echo "$as_me:7481: result: $with_big_strings" >&5
7482 echo "${ECHO_T}$with_big_strings" >&6
7483
7484 USE_BIG_STRINGS=0
7485 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7486
7487 ###     use option --enable-termcap to compile in the termcap fallback support
7488 echo "$as_me:7488: checking if you want termcap-fallback support" >&5
7489 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7490
7491 # Check whether --enable-termcap or --disable-termcap was given.
7492 if test "${enable_termcap+set}" = set; then
7493   enableval="$enable_termcap"
7494   with_termcap=$enableval
7495 else
7496   with_termcap=no
7497 fi;
7498 echo "$as_me:7498: result: $with_termcap" >&5
7499 echo "${ECHO_T}$with_termcap" >&6
7500
7501 NCURSES_USE_TERMCAP=0
7502 if test "x$with_termcap" != "xyes" ; then
7503         if test "$use_database" = no ; then
7504                 if test -z "$with_fallback" ; then
7505                         { { echo "$as_me:7505: error: You have disabled the database w/o specifying fallbacks" >&5
7506 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7507    { (exit 1); exit 1; }; }
7508                 fi
7509         fi
7510
7511 cat >>confdefs.h <<\EOF
7512 #define PURE_TERMINFO 1
7513 EOF
7514
7515 else
7516
7517         if test "$with_ticlib" != no ; then
7518                 { { echo "$as_me:7518: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7519 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7520    { (exit 1); exit 1; }; }
7521         fi
7522
7523         NCURSES_USE_TERMCAP=1
7524         echo "$as_me:7524: checking for list of termcap files" >&5
7525 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7526
7527 # Check whether --with-termpath or --without-termpath was given.
7528 if test "${with_termpath+set}" = set; then
7529   withval="$with_termpath"
7530
7531 else
7532   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7533 fi;
7534 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7535 cf_dst_path=
7536 for cf_src_path in $withval
7537 do
7538
7539 if test "x$prefix" != xNONE; then
7540         cf_path_syntax="$prefix"
7541 else
7542         cf_path_syntax="$ac_default_prefix"
7543 fi
7544
7545 case ".$cf_src_path" in
7546 (.\$\(*\)*|.\'*\'*)
7547         ;;
7548 (..|./*|.\\*)
7549         ;;
7550 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7551         ;;
7552 (.\${*prefix}*|.\${*dir}*)
7553         eval cf_src_path="$cf_src_path"
7554         case ".$cf_src_path" in
7555         (.NONE/*)
7556                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7557                 ;;
7558         esac
7559         ;;
7560 (.no|.NONE/*)
7561         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7562         ;;
7563 (*)
7564         { { echo "$as_me:7564: error: expected a pathname, not \"$cf_src_path\"" >&5
7565 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7566    { (exit 1); exit 1; }; }
7567         ;;
7568 esac
7569
7570   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7571   cf_dst_path="${cf_dst_path}${cf_src_path}"
7572 done
7573 IFS="$ac_save_ifs"
7574
7575 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7576 # so we have to check/work around.  We do prefer the result of "eval"...
7577 eval cf_dst_eval="$cf_dst_path"
7578 case "x$cf_dst_eval" in
7579 (xNONE*)
7580         TERMPATH=$cf_dst_path
7581         ;;
7582 (*)
7583         TERMPATH="$cf_dst_eval"
7584         ;;
7585 esac
7586
7587         echo "$as_me:7587: result: $TERMPATH" >&5
7588 echo "${ECHO_T}$TERMPATH" >&6
7589         test -n "$TERMPATH" &&
7590 cat >>confdefs.h <<EOF
7591 #define TERMPATH "$TERMPATH"
7592 EOF
7593
7594         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7595         echo "$as_me:7595: checking if fast termcap-loader is needed" >&5
7596 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7597
7598 # Check whether --enable-getcap or --disable-getcap was given.
7599 if test "${enable_getcap+set}" = set; then
7600   enableval="$enable_getcap"
7601   with_getcap=$enableval
7602 else
7603   with_getcap=no
7604 fi;
7605         echo "$as_me:7605: result: $with_getcap" >&5
7606 echo "${ECHO_T}$with_getcap" >&6
7607         test "x$with_getcap" = "xyes" &&
7608 cat >>confdefs.h <<\EOF
7609 #define USE_GETCAP 1
7610 EOF
7611
7612         echo "$as_me:7612: checking if translated termcaps will be cached in ~/.terminfo" >&5
7613 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7614
7615 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7616 if test "${enable_getcap_cache+set}" = set; then
7617   enableval="$enable_getcap_cache"
7618   with_getcap_cache=$enableval
7619 else
7620   with_getcap_cache=no
7621 fi;
7622         echo "$as_me:7622: result: $with_getcap_cache" >&5
7623 echo "${ECHO_T}$with_getcap_cache" >&6
7624         test "x$with_getcap_cache" = "xyes" &&
7625 cat >>confdefs.h <<\EOF
7626 #define USE_GETCAP_CACHE 1
7627 EOF
7628
7629 fi
7630
7631 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7632 echo "$as_me:7632: checking if ~/.terminfo is wanted" >&5
7633 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7634
7635 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7636 if test "${enable_home_terminfo+set}" = set; then
7637   enableval="$enable_home_terminfo"
7638   with_home_terminfo=$enableval
7639 else
7640   with_home_terminfo=yes
7641 fi;
7642 echo "$as_me:7642: result: $with_home_terminfo" >&5
7643 echo "${ECHO_T}$with_home_terminfo" >&6
7644 test "x$with_home_terminfo" = "xyes" &&
7645 cat >>confdefs.h <<\EOF
7646 #define USE_HOME_TERMINFO 1
7647 EOF
7648
7649 echo "$as_me:7649: checking if you want to use restricted environment when running as root" >&5
7650 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7651
7652 # Check whether --enable-root-environ or --disable-root-environ was given.
7653 if test "${enable_root_environ+set}" = set; then
7654   enableval="$enable_root_environ"
7655   with_root_environ=$enableval
7656 else
7657   with_root_environ=yes
7658 fi;
7659 echo "$as_me:7659: result: $with_root_environ" >&5
7660 echo "${ECHO_T}$with_root_environ" >&6
7661 test "x$with_root_environ" = xyes &&
7662 cat >>confdefs.h <<\EOF
7663 #define USE_ROOT_ENVIRON 1
7664 EOF
7665
7666 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7667 ###   to reduce storage requirements for the terminfo database.
7668
7669 for ac_header in \
7670 unistd.h \
7671
7672 do
7673 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7674 echo "$as_me:7674: checking for $ac_header" >&5
7675 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7676 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7677   echo $ECHO_N "(cached) $ECHO_C" >&6
7678 else
7679   cat >conftest.$ac_ext <<_ACEOF
7680 #line 7680 "configure"
7681 #include "confdefs.h"
7682 #include <$ac_header>
7683 _ACEOF
7684 if { (eval echo "$as_me:7684: \"$ac_cpp conftest.$ac_ext\"") >&5
7685   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7686   ac_status=$?
7687   egrep -v '^ *\+' conftest.er1 >conftest.err
7688   rm -f conftest.er1
7689   cat conftest.err >&5
7690   echo "$as_me:7690: \$? = $ac_status" >&5
7691   (exit $ac_status); } >/dev/null; then
7692   if test -s conftest.err; then
7693     ac_cpp_err=$ac_c_preproc_warn_flag
7694   else
7695     ac_cpp_err=
7696   fi
7697 else
7698   ac_cpp_err=yes
7699 fi
7700 if test -z "$ac_cpp_err"; then
7701   eval "$as_ac_Header=yes"
7702 else
7703   echo "$as_me: failed program was:" >&5
7704   cat conftest.$ac_ext >&5
7705   eval "$as_ac_Header=no"
7706 fi
7707 rm -f conftest.err conftest.$ac_ext
7708 fi
7709 echo "$as_me:7709: result: `eval echo '${'$as_ac_Header'}'`" >&5
7710 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7711 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7712   cat >>confdefs.h <<EOF
7713 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7714 EOF
7715
7716 fi
7717 done
7718
7719 for ac_func in \
7720         remove \
7721         unlink
7722 do
7723 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7724 echo "$as_me:7724: checking for $ac_func" >&5
7725 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7726 if eval "test \"\${$as_ac_var+set}\" = set"; then
7727   echo $ECHO_N "(cached) $ECHO_C" >&6
7728 else
7729   cat >conftest.$ac_ext <<_ACEOF
7730 #line 7730 "configure"
7731 #include "confdefs.h"
7732 /* System header to define __stub macros and hopefully few prototypes,
7733     which can conflict with char $ac_func (); below.  */
7734 #include <assert.h>
7735 /* Override any gcc2 internal prototype to avoid an error.  */
7736 #ifdef __cplusplus
7737 extern "C"
7738 #endif
7739 /* We use char because int might match the return type of a gcc2
7740    builtin and then its argument prototype would still apply.  */
7741 char $ac_func ();
7742 char (*f) ();
7743
7744 int
7745 main (void)
7746 {
7747 /* The GNU C library defines this for functions which it implements
7748     to always fail with ENOSYS.  Some functions are actually named
7749     something starting with __ and the normal name is an alias.  */
7750 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7751 choke me
7752 #else
7753 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7754 #endif
7755
7756   ;
7757   return 0;
7758 }
7759 _ACEOF
7760 rm -f conftest.$ac_objext conftest$ac_exeext
7761 if { (eval echo "$as_me:7761: \"$ac_link\"") >&5
7762   (eval $ac_link) 2>&5
7763   ac_status=$?
7764   echo "$as_me:7764: \$? = $ac_status" >&5
7765   (exit $ac_status); } &&
7766          { ac_try='test -s conftest$ac_exeext'
7767   { (eval echo "$as_me:7767: \"$ac_try\"") >&5
7768   (eval $ac_try) 2>&5
7769   ac_status=$?
7770   echo "$as_me:7770: \$? = $ac_status" >&5
7771   (exit $ac_status); }; }; then
7772   eval "$as_ac_var=yes"
7773 else
7774   echo "$as_me: failed program was:" >&5
7775 cat conftest.$ac_ext >&5
7776 eval "$as_ac_var=no"
7777 fi
7778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7779 fi
7780 echo "$as_me:7780: result: `eval echo '${'$as_ac_var'}'`" >&5
7781 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7782 if test `eval echo '${'$as_ac_var'}'` = yes; then
7783   cat >>confdefs.h <<EOF
7784 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7785 EOF
7786
7787 fi
7788 done
7789
7790 if test "$cross_compiling" = yes ; then
7791
7792 for ac_func in \
7793                 link \
7794                 symlink
7795 do
7796 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7797 echo "$as_me:7797: checking for $ac_func" >&5
7798 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7799 if eval "test \"\${$as_ac_var+set}\" = set"; then
7800   echo $ECHO_N "(cached) $ECHO_C" >&6
7801 else
7802   cat >conftest.$ac_ext <<_ACEOF
7803 #line 7803 "configure"
7804 #include "confdefs.h"
7805 /* System header to define __stub macros and hopefully few prototypes,
7806     which can conflict with char $ac_func (); below.  */
7807 #include <assert.h>
7808 /* Override any gcc2 internal prototype to avoid an error.  */
7809 #ifdef __cplusplus
7810 extern "C"
7811 #endif
7812 /* We use char because int might match the return type of a gcc2
7813    builtin and then its argument prototype would still apply.  */
7814 char $ac_func ();
7815 char (*f) ();
7816
7817 int
7818 main (void)
7819 {
7820 /* The GNU C library defines this for functions which it implements
7821     to always fail with ENOSYS.  Some functions are actually named
7822     something starting with __ and the normal name is an alias.  */
7823 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7824 choke me
7825 #else
7826 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7827 #endif
7828
7829   ;
7830   return 0;
7831 }
7832 _ACEOF
7833 rm -f conftest.$ac_objext conftest$ac_exeext
7834 if { (eval echo "$as_me:7834: \"$ac_link\"") >&5
7835   (eval $ac_link) 2>&5
7836   ac_status=$?
7837   echo "$as_me:7837: \$? = $ac_status" >&5
7838   (exit $ac_status); } &&
7839          { ac_try='test -s conftest$ac_exeext'
7840   { (eval echo "$as_me:7840: \"$ac_try\"") >&5
7841   (eval $ac_try) 2>&5
7842   ac_status=$?
7843   echo "$as_me:7843: \$? = $ac_status" >&5
7844   (exit $ac_status); }; }; then
7845   eval "$as_ac_var=yes"
7846 else
7847   echo "$as_me: failed program was:" >&5
7848 cat conftest.$ac_ext >&5
7849 eval "$as_ac_var=no"
7850 fi
7851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7852 fi
7853 echo "$as_me:7853: result: `eval echo '${'$as_ac_var'}'`" >&5
7854 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7855 if test `eval echo '${'$as_ac_var'}'` = yes; then
7856   cat >>confdefs.h <<EOF
7857 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7858 EOF
7859
7860 fi
7861 done
7862
7863 else
7864         echo "$as_me:7864: checking if link/symlink functions work" >&5
7865 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7866 if test "${cf_cv_link_funcs+set}" = set; then
7867   echo $ECHO_N "(cached) $ECHO_C" >&6
7868 else
7869
7870                 cf_cv_link_funcs=
7871                 for cf_func in link symlink ; do
7872                         if test "$cross_compiling" = yes; then
7873
7874                         eval 'ac_cv_func_'$cf_func'=error'
7875 else
7876   cat >conftest.$ac_ext <<_ACEOF
7877 #line 7877 "configure"
7878 #include "confdefs.h"
7879
7880 #include <sys/types.h>
7881 #include <sys/stat.h>
7882 #ifdef HAVE_UNISTD_H
7883 #include <unistd.h>
7884 #endif
7885 int main(void)
7886 {
7887         int fail = 0;
7888         char *src = "config.log";
7889         char *dst = "conftest.chk";
7890         struct stat src_sb;
7891         struct stat dst_sb;
7892
7893         stat(src, &src_sb);
7894         fail = ($cf_func("config.log", "conftest.chk") < 0)
7895             || (stat(dst, &dst_sb) < 0)
7896             || (dst_sb.st_mtime != src_sb.st_mtime);
7897 #ifdef HAVE_UNLINK
7898         unlink(dst);
7899 #else
7900         remove(dst);
7901 #endif
7902         ${cf_cv_main_return:-return} (fail);
7903 }
7904
7905 _ACEOF
7906 rm -f conftest$ac_exeext
7907 if { (eval echo "$as_me:7907: \"$ac_link\"") >&5
7908   (eval $ac_link) 2>&5
7909   ac_status=$?
7910   echo "$as_me:7910: \$? = $ac_status" >&5
7911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7912   { (eval echo "$as_me:7912: \"$ac_try\"") >&5
7913   (eval $ac_try) 2>&5
7914   ac_status=$?
7915   echo "$as_me:7915: \$? = $ac_status" >&5
7916   (exit $ac_status); }; }; then
7917
7918                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7919                         eval 'ac_cv_func_'$cf_func'=yes'
7920 else
7921   echo "$as_me: program exited with status $ac_status" >&5
7922 echo "$as_me: failed program was:" >&5
7923 cat conftest.$ac_ext >&5
7924
7925                         eval 'ac_cv_func_'$cf_func'=no'
7926 fi
7927 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7928 fi
7929                 done
7930                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7931
7932 fi
7933 echo "$as_me:7933: result: $cf_cv_link_funcs" >&5
7934 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7935         test "$ac_cv_func_link"    = yes &&
7936 cat >>confdefs.h <<\EOF
7937 #define HAVE_LINK 1
7938 EOF
7939
7940         test "$ac_cv_func_symlink" = yes &&
7941 cat >>confdefs.h <<\EOF
7942 #define HAVE_SYMLINK 1
7943 EOF
7944
7945 fi
7946
7947 with_links=no
7948 with_symlinks=no
7949
7950 # soft links (symbolic links) are useful for some systems where hard links do
7951 # not work, or to make it simpler to copy terminfo trees around.
7952 if test "x$ac_cv_func_symlink" = xyes ; then
7953         echo "$as_me:7953: checking if tic should use symbolic links" >&5
7954 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7955
7956 # Check whether --enable-symlinks or --disable-symlinks was given.
7957 if test "${enable_symlinks+set}" = set; then
7958   enableval="$enable_symlinks"
7959   with_symlinks=$enableval
7960 else
7961   with_symlinks=no
7962 fi;
7963         echo "$as_me:7963: result: $with_symlinks" >&5
7964 echo "${ECHO_T}$with_symlinks" >&6
7965 fi
7966
7967 # If we have hard links and did not choose to use soft links instead, there is
7968 # no reason to make this choice optional - use the hard links.
7969 if test "$with_symlinks" = no ; then
7970         echo "$as_me:7970: checking if tic should use hard links" >&5
7971 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7972         if test "x$ac_cv_func_link" = xyes ; then
7973                 with_links=yes
7974         else
7975                 with_links=no
7976         fi
7977         echo "$as_me:7977: result: $with_links" >&5
7978 echo "${ECHO_T}$with_links" >&6
7979 fi
7980
7981 test "x$with_links" = xyes &&
7982 cat >>confdefs.h <<\EOF
7983 #define USE_LINKS 1
7984 EOF
7985
7986 test "x$with_symlinks" = xyes &&
7987 cat >>confdefs.h <<\EOF
7988 #define USE_SYMLINKS 1
7989 EOF
7990
7991 ###   use option --enable-broken-linker to force on use of broken-linker support
7992 echo "$as_me:7992: checking if you want broken-linker support code" >&5
7993 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7994
7995 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7996 if test "${enable_broken_linker+set}" = set; then
7997   enableval="$enable_broken_linker"
7998   with_broken_linker=$enableval
7999 else
8000   with_broken_linker=${BROKEN_LINKER:-no}
8001 fi;
8002 echo "$as_me:8002: result: $with_broken_linker" >&5
8003 echo "${ECHO_T}$with_broken_linker" >&6
8004
8005 BROKEN_LINKER=0
8006 if test "x$with_broken_linker" = xyes ; then
8007
8008 cat >>confdefs.h <<\EOF
8009 #define BROKEN_LINKER 1
8010 EOF
8011
8012         BROKEN_LINKER=1
8013 elif test "$DFT_LWR_MODEL" = shared ; then
8014         case $cf_cv_system_name in
8015         (cygwin*)
8016
8017 cat >>confdefs.h <<\EOF
8018 #define BROKEN_LINKER 1
8019 EOF
8020
8021                 BROKEN_LINKER=1
8022                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8023
8024 echo "${as_me:-configure}:8024: testing cygwin linker is broken anyway ..." 1>&5
8025
8026                 ;;
8027         esac
8028 fi
8029
8030 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8031 echo "$as_me:8031: checking if tputs should process BSD-style prefix padding" >&5
8032 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8033
8034 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8035 if test "${enable_bsdpad+set}" = set; then
8036   enableval="$enable_bsdpad"
8037   with_bsdpad=$enableval
8038 else
8039   with_bsdpad=no
8040 fi;
8041 echo "$as_me:8041: result: $with_bsdpad" >&5
8042 echo "${ECHO_T}$with_bsdpad" >&6
8043 test "x$with_bsdpad" = xyes &&
8044 cat >>confdefs.h <<\EOF
8045 #define BSD_TPUTS 1
8046 EOF
8047
8048 ###   use option --enable-widec to turn on use of wide-character support
8049 NCURSES_CH_T=chtype
8050 NCURSES_LIBUTF8=0
8051
8052 NEED_WCHAR_H=0
8053 NCURSES_MBSTATE_T=0
8054 NCURSES_WCHAR_T=0
8055 NCURSES_WINT_T=0
8056
8057 # Check to define _XOPEN_SOURCE "automatically"
8058 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8059
8060 cf_XOPEN_SOURCE=500
8061 cf_POSIX_C_SOURCE=199506L
8062 cf_xopen_source=
8063
8064 case $host_os in
8065 (aix[4-7]*)
8066         cf_xopen_source="-D_ALL_SOURCE"
8067         ;;
8068 (msys)
8069         cf_XOPEN_SOURCE=600
8070         ;;
8071 (darwin[0-8].*)
8072         cf_xopen_source="-D_APPLE_C_SOURCE"
8073         ;;
8074 (darwin*)
8075         cf_xopen_source="-D_DARWIN_C_SOURCE"
8076         cf_XOPEN_SOURCE=
8077         ;;
8078 (freebsd*|dragonfly*)
8079         # 5.x headers associate
8080         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8081         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8082         cf_POSIX_C_SOURCE=200112L
8083         cf_XOPEN_SOURCE=600
8084         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8085         ;;
8086 (hpux11*)
8087         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8088         ;;
8089 (hpux*)
8090         cf_xopen_source="-D_HPUX_SOURCE"
8091         ;;
8092 (irix[56].*)
8093         cf_xopen_source="-D_SGI_SOURCE"
8094         cf_XOPEN_SOURCE=
8095         ;;
8096 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8097
8098 echo "$as_me:8098: checking if we must define _GNU_SOURCE" >&5
8099 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8100 if test "${cf_cv_gnu_source+set}" = set; then
8101   echo $ECHO_N "(cached) $ECHO_C" >&6
8102 else
8103
8104 cat >conftest.$ac_ext <<_ACEOF
8105 #line 8105 "configure"
8106 #include "confdefs.h"
8107 #include <sys/types.h>
8108 int
8109 main (void)
8110 {
8111
8112 #ifndef _XOPEN_SOURCE
8113 make an error
8114 #endif
8115   ;
8116   return 0;
8117 }
8118 _ACEOF
8119 rm -f conftest.$ac_objext
8120 if { (eval echo "$as_me:8120: \"$ac_compile\"") >&5
8121   (eval $ac_compile) 2>&5
8122   ac_status=$?
8123   echo "$as_me:8123: \$? = $ac_status" >&5
8124   (exit $ac_status); } &&
8125          { ac_try='test -s conftest.$ac_objext'
8126   { (eval echo "$as_me:8126: \"$ac_try\"") >&5
8127   (eval $ac_try) 2>&5
8128   ac_status=$?
8129   echo "$as_me:8129: \$? = $ac_status" >&5
8130   (exit $ac_status); }; }; then
8131   cf_cv_gnu_source=no
8132 else
8133   echo "$as_me: failed program was:" >&5
8134 cat conftest.$ac_ext >&5
8135 cf_save="$CPPFLAGS"
8136          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8137          cat >conftest.$ac_ext <<_ACEOF
8138 #line 8138 "configure"
8139 #include "confdefs.h"
8140 #include <sys/types.h>
8141 int
8142 main (void)
8143 {
8144
8145 #ifdef _XOPEN_SOURCE
8146 make an error
8147 #endif
8148   ;
8149   return 0;
8150 }
8151 _ACEOF
8152 rm -f conftest.$ac_objext
8153 if { (eval echo "$as_me:8153: \"$ac_compile\"") >&5
8154   (eval $ac_compile) 2>&5
8155   ac_status=$?
8156   echo "$as_me:8156: \$? = $ac_status" >&5
8157   (exit $ac_status); } &&
8158          { ac_try='test -s conftest.$ac_objext'
8159   { (eval echo "$as_me:8159: \"$ac_try\"") >&5
8160   (eval $ac_try) 2>&5
8161   ac_status=$?
8162   echo "$as_me:8162: \$? = $ac_status" >&5
8163   (exit $ac_status); }; }; then
8164   cf_cv_gnu_source=no
8165 else
8166   echo "$as_me: failed program was:" >&5
8167 cat conftest.$ac_ext >&5
8168 cf_cv_gnu_source=yes
8169 fi
8170 rm -f conftest.$ac_objext conftest.$ac_ext
8171         CPPFLAGS="$cf_save"
8172
8173 fi
8174 rm -f conftest.$ac_objext conftest.$ac_ext
8175
8176 fi
8177 echo "$as_me:8177: result: $cf_cv_gnu_source" >&5
8178 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8179
8180 if test "$cf_cv_gnu_source" = yes
8181 then
8182 echo "$as_me:8182: checking if we should also define _DEFAULT_SOURCE" >&5
8183 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8184 if test "${cf_cv_default_source+set}" = set; then
8185   echo $ECHO_N "(cached) $ECHO_C" >&6
8186 else
8187
8188 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8189         cat >conftest.$ac_ext <<_ACEOF
8190 #line 8190 "configure"
8191 #include "confdefs.h"
8192 #include <sys/types.h>
8193 int
8194 main (void)
8195 {
8196
8197 #ifdef _DEFAULT_SOURCE
8198 make an error
8199 #endif
8200   ;
8201   return 0;
8202 }
8203 _ACEOF
8204 rm -f conftest.$ac_objext
8205 if { (eval echo "$as_me:8205: \"$ac_compile\"") >&5
8206   (eval $ac_compile) 2>&5
8207   ac_status=$?
8208   echo "$as_me:8208: \$? = $ac_status" >&5
8209   (exit $ac_status); } &&
8210          { ac_try='test -s conftest.$ac_objext'
8211   { (eval echo "$as_me:8211: \"$ac_try\"") >&5
8212   (eval $ac_try) 2>&5
8213   ac_status=$?
8214   echo "$as_me:8214: \$? = $ac_status" >&5
8215   (exit $ac_status); }; }; then
8216   cf_cv_default_source=no
8217 else
8218   echo "$as_me: failed program was:" >&5
8219 cat conftest.$ac_ext >&5
8220 cf_cv_default_source=yes
8221 fi
8222 rm -f conftest.$ac_objext conftest.$ac_ext
8223
8224 fi
8225 echo "$as_me:8225: result: $cf_cv_default_source" >&5
8226 echo "${ECHO_T}$cf_cv_default_source" >&6
8227 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8228 fi
8229
8230         ;;
8231 (minix*)
8232         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8233         ;;
8234 (mirbsd*)
8235         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8236         cf_XOPEN_SOURCE=
8237
8238 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8239
8240 cf_save_CFLAGS="$CFLAGS"
8241 cf_save_CPPFLAGS="$CPPFLAGS"
8242
8243 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8244         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8245                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8246
8247 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8248         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8249                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8250
8251 echo "$as_me:8251: checking if we should define _POSIX_C_SOURCE" >&5
8252 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8253 if test "${cf_cv_posix_c_source+set}" = set; then
8254   echo $ECHO_N "(cached) $ECHO_C" >&6
8255 else
8256
8257 echo "${as_me:-configure}:8257: testing if the symbol is already defined go no further ..." 1>&5
8258
8259         cat >conftest.$ac_ext <<_ACEOF
8260 #line 8260 "configure"
8261 #include "confdefs.h"
8262 #include <sys/types.h>
8263 int
8264 main (void)
8265 {
8266
8267 #ifndef _POSIX_C_SOURCE
8268 make an error
8269 #endif
8270   ;
8271   return 0;
8272 }
8273 _ACEOF
8274 rm -f conftest.$ac_objext
8275 if { (eval echo "$as_me:8275: \"$ac_compile\"") >&5
8276   (eval $ac_compile) 2>&5
8277   ac_status=$?
8278   echo "$as_me:8278: \$? = $ac_status" >&5
8279   (exit $ac_status); } &&
8280          { ac_try='test -s conftest.$ac_objext'
8281   { (eval echo "$as_me:8281: \"$ac_try\"") >&5
8282   (eval $ac_try) 2>&5
8283   ac_status=$?
8284   echo "$as_me:8284: \$? = $ac_status" >&5
8285   (exit $ac_status); }; }; then
8286   cf_cv_posix_c_source=no
8287 else
8288   echo "$as_me: failed program was:" >&5
8289 cat conftest.$ac_ext >&5
8290 cf_want_posix_source=no
8291          case .$cf_POSIX_C_SOURCE in
8292          (.[12]??*)
8293                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8294                 ;;
8295          (.2)
8296                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8297                 cf_want_posix_source=yes
8298                 ;;
8299          (.*)
8300                 cf_want_posix_source=yes
8301                 ;;
8302          esac
8303          if test "$cf_want_posix_source" = yes ; then
8304                 cat >conftest.$ac_ext <<_ACEOF
8305 #line 8305 "configure"
8306 #include "confdefs.h"
8307 #include <sys/types.h>
8308 int
8309 main (void)
8310 {
8311
8312 #ifdef _POSIX_SOURCE
8313 make an error
8314 #endif
8315   ;
8316   return 0;
8317 }
8318 _ACEOF
8319 rm -f conftest.$ac_objext
8320 if { (eval echo "$as_me:8320: \"$ac_compile\"") >&5
8321   (eval $ac_compile) 2>&5
8322   ac_status=$?
8323   echo "$as_me:8323: \$? = $ac_status" >&5
8324   (exit $ac_status); } &&
8325          { ac_try='test -s conftest.$ac_objext'
8326   { (eval echo "$as_me:8326: \"$ac_try\"") >&5
8327   (eval $ac_try) 2>&5
8328   ac_status=$?
8329   echo "$as_me:8329: \$? = $ac_status" >&5
8330   (exit $ac_status); }; }; then
8331   :
8332 else
8333   echo "$as_me: failed program was:" >&5
8334 cat conftest.$ac_ext >&5
8335 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8336 fi
8337 rm -f conftest.$ac_objext conftest.$ac_ext
8338          fi
8339
8340 echo "${as_me:-configure}:8340: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8341
8342          CFLAGS="$cf_trim_CFLAGS"
8343          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8344
8345 echo "${as_me:-configure}:8345: testing if the second compile does not leave our definition intact error ..." 1>&5
8346
8347          cat >conftest.$ac_ext <<_ACEOF
8348 #line 8348 "configure"
8349 #include "confdefs.h"
8350 #include <sys/types.h>
8351 int
8352 main (void)
8353 {
8354
8355 #ifndef _POSIX_C_SOURCE
8356 make an error
8357 #endif
8358   ;
8359   return 0;
8360 }
8361 _ACEOF
8362 rm -f conftest.$ac_objext
8363 if { (eval echo "$as_me:8363: \"$ac_compile\"") >&5
8364   (eval $ac_compile) 2>&5
8365   ac_status=$?
8366   echo "$as_me:8366: \$? = $ac_status" >&5
8367   (exit $ac_status); } &&
8368          { ac_try='test -s conftest.$ac_objext'
8369   { (eval echo "$as_me:8369: \"$ac_try\"") >&5
8370   (eval $ac_try) 2>&5
8371   ac_status=$?
8372   echo "$as_me:8372: \$? = $ac_status" >&5
8373   (exit $ac_status); }; }; then
8374   :
8375 else
8376   echo "$as_me: failed program was:" >&5
8377 cat conftest.$ac_ext >&5
8378 cf_cv_posix_c_source=no
8379 fi
8380 rm -f conftest.$ac_objext conftest.$ac_ext
8381          CFLAGS="$cf_save_CFLAGS"
8382          CPPFLAGS="$cf_save_CPPFLAGS"
8383
8384 fi
8385 rm -f conftest.$ac_objext conftest.$ac_ext
8386
8387 fi
8388 echo "$as_me:8388: result: $cf_cv_posix_c_source" >&5
8389 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8390
8391 if test "$cf_cv_posix_c_source" != no ; then
8392         CFLAGS="$cf_trim_CFLAGS"
8393         CPPFLAGS="$cf_trim_CPPFLAGS"
8394
8395 cf_fix_cppflags=no
8396 cf_new_cflags=
8397 cf_new_cppflags=
8398 cf_new_extra_cppflags=
8399
8400 for cf_add_cflags in $cf_cv_posix_c_source
8401 do
8402 case $cf_fix_cppflags in
8403 (no)
8404         case $cf_add_cflags in
8405         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8406                 case $cf_add_cflags in
8407                 (-D*)
8408                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8409
8410                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8411                                 && test -z "${cf_tst_cflags}" \
8412                                 && cf_fix_cppflags=yes
8413
8414                         if test $cf_fix_cppflags = yes ; then
8415
8416         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8417         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8418
8419                                 continue
8420                         elif test "${cf_tst_cflags}" = "\"'" ; then
8421
8422         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8423         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8424
8425                                 continue
8426                         fi
8427                         ;;
8428                 esac
8429                 case "$CPPFLAGS" in
8430                 (*$cf_add_cflags)
8431                         ;;
8432                 (*)
8433                         case $cf_add_cflags in
8434                         (-D*)
8435                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8436
8437 CPPFLAGS=`echo "$CPPFLAGS" | \
8438         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8439                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8440
8441                                 ;;
8442                         esac
8443
8444         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8445         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8446
8447                         ;;
8448                 esac
8449                 ;;
8450         (*)
8451
8452         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8453         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8454
8455                 ;;
8456         esac
8457         ;;
8458 (yes)
8459
8460         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8461         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8462
8463         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8464
8465         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8466                 && test -z "${cf_tst_cflags}" \
8467                 && cf_fix_cppflags=no
8468         ;;
8469 esac
8470 done
8471
8472 if test -n "$cf_new_cflags" ; then
8473
8474         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8475         CFLAGS="${CFLAGS}$cf_new_cflags"
8476
8477 fi
8478
8479 if test -n "$cf_new_cppflags" ; then
8480
8481         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8482         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8483
8484 fi
8485
8486 if test -n "$cf_new_extra_cppflags" ; then
8487
8488         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8489         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8490
8491 fi
8492
8493 fi
8494
8495         ;;
8496 (netbsd*)
8497         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8498         ;;
8499 (openbsd[4-9]*)
8500         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8501         cf_xopen_source="-D_BSD_SOURCE"
8502         cf_XOPEN_SOURCE=600
8503         ;;
8504 (openbsd*)
8505         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8506         ;;
8507 (osf[45]*)
8508         cf_xopen_source="-D_OSF_SOURCE"
8509         ;;
8510 (nto-qnx*)
8511         cf_xopen_source="-D_QNX_SOURCE"
8512         ;;
8513 (sco*)
8514         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8515         ;;
8516 (solaris2.*)
8517         cf_xopen_source="-D__EXTENSIONS__"
8518         cf_cv_xopen_source=broken
8519         ;;
8520 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8521         cf_XOPEN_SOURCE=
8522         cf_POSIX_C_SOURCE=
8523         ;;
8524 (*)
8525
8526 echo "$as_me:8526: checking if we should define _XOPEN_SOURCE" >&5
8527 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8528 if test "${cf_cv_xopen_source+set}" = set; then
8529   echo $ECHO_N "(cached) $ECHO_C" >&6
8530 else
8531
8532         cat >conftest.$ac_ext <<_ACEOF
8533 #line 8533 "configure"
8534 #include "confdefs.h"
8535
8536 #include <stdlib.h>
8537 #include <string.h>
8538 #include <sys/types.h>
8539
8540 int
8541 main (void)
8542 {
8543
8544 #ifndef _XOPEN_SOURCE
8545 make an error
8546 #endif
8547   ;
8548   return 0;
8549 }
8550 _ACEOF
8551 rm -f conftest.$ac_objext
8552 if { (eval echo "$as_me:8552: \"$ac_compile\"") >&5
8553   (eval $ac_compile) 2>&5
8554   ac_status=$?
8555   echo "$as_me:8555: \$? = $ac_status" >&5
8556   (exit $ac_status); } &&
8557          { ac_try='test -s conftest.$ac_objext'
8558   { (eval echo "$as_me:8558: \"$ac_try\"") >&5
8559   (eval $ac_try) 2>&5
8560   ac_status=$?
8561   echo "$as_me:8561: \$? = $ac_status" >&5
8562   (exit $ac_status); }; }; then
8563   cf_cv_xopen_source=no
8564 else
8565   echo "$as_me: failed program was:" >&5
8566 cat conftest.$ac_ext >&5
8567 cf_save="$CPPFLAGS"
8568          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8569          cat >conftest.$ac_ext <<_ACEOF
8570 #line 8570 "configure"
8571 #include "confdefs.h"
8572
8573 #include <stdlib.h>
8574 #include <string.h>
8575 #include <sys/types.h>
8576
8577 int
8578 main (void)
8579 {
8580
8581 #ifdef _XOPEN_SOURCE
8582 make an error
8583 #endif
8584   ;
8585   return 0;
8586 }
8587 _ACEOF
8588 rm -f conftest.$ac_objext
8589 if { (eval echo "$as_me:8589: \"$ac_compile\"") >&5
8590   (eval $ac_compile) 2>&5
8591   ac_status=$?
8592   echo "$as_me:8592: \$? = $ac_status" >&5
8593   (exit $ac_status); } &&
8594          { ac_try='test -s conftest.$ac_objext'
8595   { (eval echo "$as_me:8595: \"$ac_try\"") >&5
8596   (eval $ac_try) 2>&5
8597   ac_status=$?
8598   echo "$as_me:8598: \$? = $ac_status" >&5
8599   (exit $ac_status); }; }; then
8600   cf_cv_xopen_source=no
8601 else
8602   echo "$as_me: failed program was:" >&5
8603 cat conftest.$ac_ext >&5
8604 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8605 fi
8606 rm -f conftest.$ac_objext conftest.$ac_ext
8607         CPPFLAGS="$cf_save"
8608
8609 fi
8610 rm -f conftest.$ac_objext conftest.$ac_ext
8611
8612 fi
8613 echo "$as_me:8613: result: $cf_cv_xopen_source" >&5
8614 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8615
8616 if test "$cf_cv_xopen_source" != no ; then
8617
8618 CFLAGS=`echo "$CFLAGS" | \
8619         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8620                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8621
8622 CPPFLAGS=`echo "$CPPFLAGS" | \
8623         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8624                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8625
8626         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8627
8628 cf_fix_cppflags=no
8629 cf_new_cflags=
8630 cf_new_cppflags=
8631 cf_new_extra_cppflags=
8632
8633 for cf_add_cflags in $cf_temp_xopen_source
8634 do
8635 case $cf_fix_cppflags in
8636 (no)
8637         case $cf_add_cflags in
8638         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8639                 case $cf_add_cflags in
8640                 (-D*)
8641                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8642
8643                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8644                                 && test -z "${cf_tst_cflags}" \
8645                                 && cf_fix_cppflags=yes
8646
8647                         if test $cf_fix_cppflags = yes ; then
8648
8649         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8650         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8651
8652                                 continue
8653                         elif test "${cf_tst_cflags}" = "\"'" ; then
8654
8655         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8656         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8657
8658                                 continue
8659                         fi
8660                         ;;
8661                 esac
8662                 case "$CPPFLAGS" in
8663                 (*$cf_add_cflags)
8664                         ;;
8665                 (*)
8666                         case $cf_add_cflags in
8667                         (-D*)
8668                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8669
8670 CPPFLAGS=`echo "$CPPFLAGS" | \
8671         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8672                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8673
8674                                 ;;
8675                         esac
8676
8677         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8678         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8679
8680                         ;;
8681                 esac
8682                 ;;
8683         (*)
8684
8685         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8686         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8687
8688                 ;;
8689         esac
8690         ;;
8691 (yes)
8692
8693         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8694         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8695
8696         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8697
8698         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8699                 && test -z "${cf_tst_cflags}" \
8700                 && cf_fix_cppflags=no
8701         ;;
8702 esac
8703 done
8704
8705 if test -n "$cf_new_cflags" ; then
8706
8707         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8708         CFLAGS="${CFLAGS}$cf_new_cflags"
8709
8710 fi
8711
8712 if test -n "$cf_new_cppflags" ; then
8713
8714         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8715         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8716
8717 fi
8718
8719 if test -n "$cf_new_extra_cppflags" ; then
8720
8721         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8722         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8723
8724 fi
8725
8726 fi
8727
8728 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8729
8730 cf_save_CFLAGS="$CFLAGS"
8731 cf_save_CPPFLAGS="$CPPFLAGS"
8732
8733 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8734         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8735                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8736
8737 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8738         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8739                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8740
8741 echo "$as_me:8741: checking if we should define _POSIX_C_SOURCE" >&5
8742 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8743 if test "${cf_cv_posix_c_source+set}" = set; then
8744   echo $ECHO_N "(cached) $ECHO_C" >&6
8745 else
8746
8747 echo "${as_me:-configure}:8747: testing if the symbol is already defined go no further ..." 1>&5
8748
8749         cat >conftest.$ac_ext <<_ACEOF
8750 #line 8750 "configure"
8751 #include "confdefs.h"
8752 #include <sys/types.h>
8753 int
8754 main (void)
8755 {
8756
8757 #ifndef _POSIX_C_SOURCE
8758 make an error
8759 #endif
8760   ;
8761   return 0;
8762 }
8763 _ACEOF
8764 rm -f conftest.$ac_objext
8765 if { (eval echo "$as_me:8765: \"$ac_compile\"") >&5
8766   (eval $ac_compile) 2>&5
8767   ac_status=$?
8768   echo "$as_me:8768: \$? = $ac_status" >&5
8769   (exit $ac_status); } &&
8770          { ac_try='test -s conftest.$ac_objext'
8771   { (eval echo "$as_me:8771: \"$ac_try\"") >&5
8772   (eval $ac_try) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); }; }; then
8776   cf_cv_posix_c_source=no
8777 else
8778   echo "$as_me: failed program was:" >&5
8779 cat conftest.$ac_ext >&5
8780 cf_want_posix_source=no
8781          case .$cf_POSIX_C_SOURCE in
8782          (.[12]??*)
8783                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8784                 ;;
8785          (.2)
8786                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8787                 cf_want_posix_source=yes
8788                 ;;
8789          (.*)
8790                 cf_want_posix_source=yes
8791                 ;;
8792          esac
8793          if test "$cf_want_posix_source" = yes ; then
8794                 cat >conftest.$ac_ext <<_ACEOF
8795 #line 8795 "configure"
8796 #include "confdefs.h"
8797 #include <sys/types.h>
8798 int
8799 main (void)
8800 {
8801
8802 #ifdef _POSIX_SOURCE
8803 make an error
8804 #endif
8805   ;
8806   return 0;
8807 }
8808 _ACEOF
8809 rm -f conftest.$ac_objext
8810 if { (eval echo "$as_me:8810: \"$ac_compile\"") >&5
8811   (eval $ac_compile) 2>&5
8812   ac_status=$?
8813   echo "$as_me:8813: \$? = $ac_status" >&5
8814   (exit $ac_status); } &&
8815          { ac_try='test -s conftest.$ac_objext'
8816   { (eval echo "$as_me:8816: \"$ac_try\"") >&5
8817   (eval $ac_try) 2>&5
8818   ac_status=$?
8819   echo "$as_me:8819: \$? = $ac_status" >&5
8820   (exit $ac_status); }; }; then
8821   :
8822 else
8823   echo "$as_me: failed program was:" >&5
8824 cat conftest.$ac_ext >&5
8825 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8826 fi
8827 rm -f conftest.$ac_objext conftest.$ac_ext
8828          fi
8829
8830 echo "${as_me:-configure}:8830: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8831
8832          CFLAGS="$cf_trim_CFLAGS"
8833          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8834
8835 echo "${as_me:-configure}:8835: testing if the second compile does not leave our definition intact error ..." 1>&5
8836
8837          cat >conftest.$ac_ext <<_ACEOF
8838 #line 8838 "configure"
8839 #include "confdefs.h"
8840 #include <sys/types.h>
8841 int
8842 main (void)
8843 {
8844
8845 #ifndef _POSIX_C_SOURCE
8846 make an error
8847 #endif
8848   ;
8849   return 0;
8850 }
8851 _ACEOF
8852 rm -f conftest.$ac_objext
8853 if { (eval echo "$as_me:8853: \"$ac_compile\"") >&5
8854   (eval $ac_compile) 2>&5
8855   ac_status=$?
8856   echo "$as_me:8856: \$? = $ac_status" >&5
8857   (exit $ac_status); } &&
8858          { ac_try='test -s conftest.$ac_objext'
8859   { (eval echo "$as_me:8859: \"$ac_try\"") >&5
8860   (eval $ac_try) 2>&5
8861   ac_status=$?
8862   echo "$as_me:8862: \$? = $ac_status" >&5
8863   (exit $ac_status); }; }; then
8864   :
8865 else
8866   echo "$as_me: failed program was:" >&5
8867 cat conftest.$ac_ext >&5
8868 cf_cv_posix_c_source=no
8869 fi
8870 rm -f conftest.$ac_objext conftest.$ac_ext
8871          CFLAGS="$cf_save_CFLAGS"
8872          CPPFLAGS="$cf_save_CPPFLAGS"
8873
8874 fi
8875 rm -f conftest.$ac_objext conftest.$ac_ext
8876
8877 fi
8878 echo "$as_me:8878: result: $cf_cv_posix_c_source" >&5
8879 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8880
8881 if test "$cf_cv_posix_c_source" != no ; then
8882         CFLAGS="$cf_trim_CFLAGS"
8883         CPPFLAGS="$cf_trim_CPPFLAGS"
8884
8885 cf_fix_cppflags=no
8886 cf_new_cflags=
8887 cf_new_cppflags=
8888 cf_new_extra_cppflags=
8889
8890 for cf_add_cflags in $cf_cv_posix_c_source
8891 do
8892 case $cf_fix_cppflags in
8893 (no)
8894         case $cf_add_cflags in
8895         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8896                 case $cf_add_cflags in
8897                 (-D*)
8898                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8899
8900                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8901                                 && test -z "${cf_tst_cflags}" \
8902                                 && cf_fix_cppflags=yes
8903
8904                         if test $cf_fix_cppflags = yes ; then
8905
8906         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8907         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8908
8909                                 continue
8910                         elif test "${cf_tst_cflags}" = "\"'" ; then
8911
8912         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8913         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8914
8915                                 continue
8916                         fi
8917                         ;;
8918                 esac
8919                 case "$CPPFLAGS" in
8920                 (*$cf_add_cflags)
8921                         ;;
8922                 (*)
8923                         case $cf_add_cflags in
8924                         (-D*)
8925                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8926
8927 CPPFLAGS=`echo "$CPPFLAGS" | \
8928         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8929                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8930
8931                                 ;;
8932                         esac
8933
8934         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8935         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8936
8937                         ;;
8938                 esac
8939                 ;;
8940         (*)
8941
8942         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8943         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8944
8945                 ;;
8946         esac
8947         ;;
8948 (yes)
8949
8950         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8951         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8952
8953         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8954
8955         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8956                 && test -z "${cf_tst_cflags}" \
8957                 && cf_fix_cppflags=no
8958         ;;
8959 esac
8960 done
8961
8962 if test -n "$cf_new_cflags" ; then
8963
8964         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8965         CFLAGS="${CFLAGS}$cf_new_cflags"
8966
8967 fi
8968
8969 if test -n "$cf_new_cppflags" ; then
8970
8971         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8972         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8973
8974 fi
8975
8976 if test -n "$cf_new_extra_cppflags" ; then
8977
8978         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8979         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8980
8981 fi
8982
8983 fi
8984
8985         ;;
8986 esac
8987
8988 if test -n "$cf_xopen_source" ; then
8989
8990 cf_fix_cppflags=no
8991 cf_new_cflags=
8992 cf_new_cppflags=
8993 cf_new_extra_cppflags=
8994
8995 for cf_add_cflags in $cf_xopen_source
8996 do
8997 case $cf_fix_cppflags in
8998 (no)
8999         case $cf_add_cflags in
9000         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9001                 case $cf_add_cflags in
9002                 (-D*)
9003                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9004
9005                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9006                                 && test -z "${cf_tst_cflags}" \
9007                                 && cf_fix_cppflags=yes
9008
9009                         if test $cf_fix_cppflags = yes ; then
9010
9011         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9012         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9013
9014                                 continue
9015                         elif test "${cf_tst_cflags}" = "\"'" ; then
9016
9017         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9018         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9019
9020                                 continue
9021                         fi
9022                         ;;
9023                 esac
9024                 case "$CPPFLAGS" in
9025                 (*$cf_add_cflags)
9026                         ;;
9027                 (*)
9028                         case $cf_add_cflags in
9029                         (-D*)
9030                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9031
9032 CPPFLAGS=`echo "$CPPFLAGS" | \
9033         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9034                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9035
9036                                 ;;
9037                         esac
9038
9039         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9040         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9041
9042                         ;;
9043                 esac
9044                 ;;
9045         (*)
9046
9047         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9048         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9049
9050                 ;;
9051         esac
9052         ;;
9053 (yes)
9054
9055         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9056         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9057
9058         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9059
9060         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9061                 && test -z "${cf_tst_cflags}" \
9062                 && cf_fix_cppflags=no
9063         ;;
9064 esac
9065 done
9066
9067 if test -n "$cf_new_cflags" ; then
9068         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9069
9070 echo "${as_me:-configure}:9070: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9071
9072         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9073         CFLAGS="${CFLAGS}$cf_new_cflags"
9074
9075 fi
9076
9077 if test -n "$cf_new_cppflags" ; then
9078         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9079
9080 echo "${as_me:-configure}:9080: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9081
9082         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9083         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9084
9085 fi
9086
9087 if test -n "$cf_new_extra_cppflags" ; then
9088         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9089
9090 echo "${as_me:-configure}:9090: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9091
9092         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9093         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9094
9095 fi
9096
9097 fi
9098
9099 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9100         echo "$as_me:9100: checking if _XOPEN_SOURCE really is set" >&5
9101 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9102         cat >conftest.$ac_ext <<_ACEOF
9103 #line 9103 "configure"
9104 #include "confdefs.h"
9105 #include <stdlib.h>
9106 int
9107 main (void)
9108 {
9109
9110 #ifndef _XOPEN_SOURCE
9111 make an error
9112 #endif
9113   ;
9114   return 0;
9115 }
9116 _ACEOF
9117 rm -f conftest.$ac_objext
9118 if { (eval echo "$as_me:9118: \"$ac_compile\"") >&5
9119   (eval $ac_compile) 2>&5
9120   ac_status=$?
9121   echo "$as_me:9121: \$? = $ac_status" >&5
9122   (exit $ac_status); } &&
9123          { ac_try='test -s conftest.$ac_objext'
9124   { (eval echo "$as_me:9124: \"$ac_try\"") >&5
9125   (eval $ac_try) 2>&5
9126   ac_status=$?
9127   echo "$as_me:9127: \$? = $ac_status" >&5
9128   (exit $ac_status); }; }; then
9129   cf_XOPEN_SOURCE_set=yes
9130 else
9131   echo "$as_me: failed program was:" >&5
9132 cat conftest.$ac_ext >&5
9133 cf_XOPEN_SOURCE_set=no
9134 fi
9135 rm -f conftest.$ac_objext conftest.$ac_ext
9136         echo "$as_me:9136: result: $cf_XOPEN_SOURCE_set" >&5
9137 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9138         if test $cf_XOPEN_SOURCE_set = yes
9139         then
9140                 cat >conftest.$ac_ext <<_ACEOF
9141 #line 9141 "configure"
9142 #include "confdefs.h"
9143 #include <stdlib.h>
9144 int
9145 main (void)
9146 {
9147
9148 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9149 make an error
9150 #endif
9151   ;
9152   return 0;
9153 }
9154 _ACEOF
9155 rm -f conftest.$ac_objext
9156 if { (eval echo "$as_me:9156: \"$ac_compile\"") >&5
9157   (eval $ac_compile) 2>&5
9158   ac_status=$?
9159   echo "$as_me:9159: \$? = $ac_status" >&5
9160   (exit $ac_status); } &&
9161          { ac_try='test -s conftest.$ac_objext'
9162   { (eval echo "$as_me:9162: \"$ac_try\"") >&5
9163   (eval $ac_try) 2>&5
9164   ac_status=$?
9165   echo "$as_me:9165: \$? = $ac_status" >&5
9166   (exit $ac_status); }; }; then
9167   cf_XOPEN_SOURCE_set_ok=yes
9168 else
9169   echo "$as_me: failed program was:" >&5
9170 cat conftest.$ac_ext >&5
9171 cf_XOPEN_SOURCE_set_ok=no
9172 fi
9173 rm -f conftest.$ac_objext conftest.$ac_ext
9174                 if test $cf_XOPEN_SOURCE_set_ok = no
9175                 then
9176                         { echo "$as_me:9176: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9177 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9178                 fi
9179         else
9180
9181 echo "$as_me:9181: checking if we should define _XOPEN_SOURCE" >&5
9182 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9183 if test "${cf_cv_xopen_source+set}" = set; then
9184   echo $ECHO_N "(cached) $ECHO_C" >&6
9185 else
9186
9187         cat >conftest.$ac_ext <<_ACEOF
9188 #line 9188 "configure"
9189 #include "confdefs.h"
9190
9191 #include <stdlib.h>
9192 #include <string.h>
9193 #include <sys/types.h>
9194
9195 int
9196 main (void)
9197 {
9198
9199 #ifndef _XOPEN_SOURCE
9200 make an error
9201 #endif
9202   ;
9203   return 0;
9204 }
9205 _ACEOF
9206 rm -f conftest.$ac_objext
9207 if { (eval echo "$as_me:9207: \"$ac_compile\"") >&5
9208   (eval $ac_compile) 2>&5
9209   ac_status=$?
9210   echo "$as_me:9210: \$? = $ac_status" >&5
9211   (exit $ac_status); } &&
9212          { ac_try='test -s conftest.$ac_objext'
9213   { (eval echo "$as_me:9213: \"$ac_try\"") >&5
9214   (eval $ac_try) 2>&5
9215   ac_status=$?
9216   echo "$as_me:9216: \$? = $ac_status" >&5
9217   (exit $ac_status); }; }; then
9218   cf_cv_xopen_source=no
9219 else
9220   echo "$as_me: failed program was:" >&5
9221 cat conftest.$ac_ext >&5
9222 cf_save="$CPPFLAGS"
9223          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9224          cat >conftest.$ac_ext <<_ACEOF
9225 #line 9225 "configure"
9226 #include "confdefs.h"
9227
9228 #include <stdlib.h>
9229 #include <string.h>
9230 #include <sys/types.h>
9231
9232 int
9233 main (void)
9234 {
9235
9236 #ifdef _XOPEN_SOURCE
9237 make an error
9238 #endif
9239   ;
9240   return 0;
9241 }
9242 _ACEOF
9243 rm -f conftest.$ac_objext
9244 if { (eval echo "$as_me:9244: \"$ac_compile\"") >&5
9245   (eval $ac_compile) 2>&5
9246   ac_status=$?
9247   echo "$as_me:9247: \$? = $ac_status" >&5
9248   (exit $ac_status); } &&
9249          { ac_try='test -s conftest.$ac_objext'
9250   { (eval echo "$as_me:9250: \"$ac_try\"") >&5
9251   (eval $ac_try) 2>&5
9252   ac_status=$?
9253   echo "$as_me:9253: \$? = $ac_status" >&5
9254   (exit $ac_status); }; }; then
9255   cf_cv_xopen_source=no
9256 else
9257   echo "$as_me: failed program was:" >&5
9258 cat conftest.$ac_ext >&5
9259 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9260 fi
9261 rm -f conftest.$ac_objext conftest.$ac_ext
9262         CPPFLAGS="$cf_save"
9263
9264 fi
9265 rm -f conftest.$ac_objext conftest.$ac_ext
9266
9267 fi
9268 echo "$as_me:9268: result: $cf_cv_xopen_source" >&5
9269 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9270
9271 if test "$cf_cv_xopen_source" != no ; then
9272
9273 CFLAGS=`echo "$CFLAGS" | \
9274         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9275                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9276
9277 CPPFLAGS=`echo "$CPPFLAGS" | \
9278         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9279                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9280
9281         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9282
9283 cf_fix_cppflags=no
9284 cf_new_cflags=
9285 cf_new_cppflags=
9286 cf_new_extra_cppflags=
9287
9288 for cf_add_cflags in $cf_temp_xopen_source
9289 do
9290 case $cf_fix_cppflags in
9291 (no)
9292         case $cf_add_cflags in
9293         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9294                 case $cf_add_cflags in
9295                 (-D*)
9296                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9297
9298                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9299                                 && test -z "${cf_tst_cflags}" \
9300                                 && cf_fix_cppflags=yes
9301
9302                         if test $cf_fix_cppflags = yes ; then
9303
9304         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9305         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9306
9307                                 continue
9308                         elif test "${cf_tst_cflags}" = "\"'" ; then
9309
9310         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9311         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9312
9313                                 continue
9314                         fi
9315                         ;;
9316                 esac
9317                 case "$CPPFLAGS" in
9318                 (*$cf_add_cflags)
9319                         ;;
9320                 (*)
9321                         case $cf_add_cflags in
9322                         (-D*)
9323                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9324
9325 CPPFLAGS=`echo "$CPPFLAGS" | \
9326         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9327                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9328
9329                                 ;;
9330                         esac
9331
9332         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9333         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9334
9335                         ;;
9336                 esac
9337                 ;;
9338         (*)
9339
9340         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9341         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9342
9343                 ;;
9344         esac
9345         ;;
9346 (yes)
9347
9348         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9349         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9350
9351         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9352
9353         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9354                 && test -z "${cf_tst_cflags}" \
9355                 && cf_fix_cppflags=no
9356         ;;
9357 esac
9358 done
9359
9360 if test -n "$cf_new_cflags" ; then
9361
9362         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9363         CFLAGS="${CFLAGS}$cf_new_cflags"
9364
9365 fi
9366
9367 if test -n "$cf_new_cppflags" ; then
9368
9369         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9370         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9371
9372 fi
9373
9374 if test -n "$cf_new_extra_cppflags" ; then
9375
9376         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9377         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9378
9379 fi
9380
9381 fi
9382
9383         fi
9384 fi
9385
9386 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9387
9388 # Work around breakage on OS X
9389
9390 echo "$as_me:9390: checking if SIGWINCH is defined" >&5
9391 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9392 if test "${cf_cv_define_sigwinch+set}" = set; then
9393   echo $ECHO_N "(cached) $ECHO_C" >&6
9394 else
9395
9396         cat >conftest.$ac_ext <<_ACEOF
9397 #line 9397 "configure"
9398 #include "confdefs.h"
9399
9400 #include <sys/types.h>
9401 #include <sys/signal.h>
9402
9403 int
9404 main (void)
9405 {
9406 int x = SIGWINCH
9407   ;
9408   return 0;
9409 }
9410 _ACEOF
9411 rm -f conftest.$ac_objext
9412 if { (eval echo "$as_me:9412: \"$ac_compile\"") >&5
9413   (eval $ac_compile) 2>&5
9414   ac_status=$?
9415   echo "$as_me:9415: \$? = $ac_status" >&5
9416   (exit $ac_status); } &&
9417          { ac_try='test -s conftest.$ac_objext'
9418   { (eval echo "$as_me:9418: \"$ac_try\"") >&5
9419   (eval $ac_try) 2>&5
9420   ac_status=$?
9421   echo "$as_me:9421: \$? = $ac_status" >&5
9422   (exit $ac_status); }; }; then
9423   cf_cv_define_sigwinch=yes
9424 else
9425   echo "$as_me: failed program was:" >&5
9426 cat conftest.$ac_ext >&5
9427 cat >conftest.$ac_ext <<_ACEOF
9428 #line 9428 "configure"
9429 #include "confdefs.h"
9430
9431 #undef _XOPEN_SOURCE
9432 #undef _POSIX_SOURCE
9433 #undef _POSIX_C_SOURCE
9434 #include <sys/types.h>
9435 #include <sys/signal.h>
9436
9437 int
9438 main (void)
9439 {
9440 int x = SIGWINCH
9441   ;
9442   return 0;
9443 }
9444 _ACEOF
9445 rm -f conftest.$ac_objext
9446 if { (eval echo "$as_me:9446: \"$ac_compile\"") >&5
9447   (eval $ac_compile) 2>&5
9448   ac_status=$?
9449   echo "$as_me:9449: \$? = $ac_status" >&5
9450   (exit $ac_status); } &&
9451          { ac_try='test -s conftest.$ac_objext'
9452   { (eval echo "$as_me:9452: \"$ac_try\"") >&5
9453   (eval $ac_try) 2>&5
9454   ac_status=$?
9455   echo "$as_me:9455: \$? = $ac_status" >&5
9456   (exit $ac_status); }; }; then
9457   cf_cv_define_sigwinch=maybe
9458 else
9459   echo "$as_me: failed program was:" >&5
9460 cat conftest.$ac_ext >&5
9461 cf_cv_define_sigwinch=no
9462 fi
9463 rm -f conftest.$ac_objext conftest.$ac_ext
9464
9465 fi
9466 rm -f conftest.$ac_objext conftest.$ac_ext
9467
9468 fi
9469 echo "$as_me:9469: result: $cf_cv_define_sigwinch" >&5
9470 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9471
9472 if test "$cf_cv_define_sigwinch" = maybe ; then
9473 echo "$as_me:9473: checking for actual SIGWINCH definition" >&5
9474 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9475 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9476   echo $ECHO_N "(cached) $ECHO_C" >&6
9477 else
9478
9479 cf_cv_fixup_sigwinch=unknown
9480 cf_sigwinch=32
9481 while test $cf_sigwinch != 1
9482 do
9483         cat >conftest.$ac_ext <<_ACEOF
9484 #line 9484 "configure"
9485 #include "confdefs.h"
9486
9487 #undef _XOPEN_SOURCE
9488 #undef _POSIX_SOURCE
9489 #undef _POSIX_C_SOURCE
9490 #include <sys/types.h>
9491 #include <sys/signal.h>
9492
9493 int
9494 main (void)
9495 {
9496
9497 #if SIGWINCH != $cf_sigwinch
9498 make an error
9499 #endif
9500 int x = SIGWINCH
9501   ;
9502   return 0;
9503 }
9504 _ACEOF
9505 rm -f conftest.$ac_objext
9506 if { (eval echo "$as_me:9506: \"$ac_compile\"") >&5
9507   (eval $ac_compile) 2>&5
9508   ac_status=$?
9509   echo "$as_me:9509: \$? = $ac_status" >&5
9510   (exit $ac_status); } &&
9511          { ac_try='test -s conftest.$ac_objext'
9512   { (eval echo "$as_me:9512: \"$ac_try\"") >&5
9513   (eval $ac_try) 2>&5
9514   ac_status=$?
9515   echo "$as_me:9515: \$? = $ac_status" >&5
9516   (exit $ac_status); }; }; then
9517   cf_cv_fixup_sigwinch=$cf_sigwinch
9518          break
9519 else
9520   echo "$as_me: failed program was:" >&5
9521 cat conftest.$ac_ext >&5
9522 fi
9523 rm -f conftest.$ac_objext conftest.$ac_ext
9524
9525 cf_sigwinch=`expr $cf_sigwinch - 1`
9526 done
9527
9528 fi
9529 echo "$as_me:9529: result: $cf_cv_fixup_sigwinch" >&5
9530 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9531
9532         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9533                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9534         fi
9535 fi
9536
9537 # Checks for CODESET support.
9538
9539 echo "$as_me:9539: checking for nl_langinfo and CODESET" >&5
9540 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9541 if test "${am_cv_langinfo_codeset+set}" = set; then
9542   echo $ECHO_N "(cached) $ECHO_C" >&6
9543 else
9544   cat >conftest.$ac_ext <<_ACEOF
9545 #line 9545 "configure"
9546 #include "confdefs.h"
9547 #include <langinfo.h>
9548 int
9549 main (void)
9550 {
9551 char* cs = nl_langinfo(CODESET);
9552   ;
9553   return 0;
9554 }
9555 _ACEOF
9556 rm -f conftest.$ac_objext conftest$ac_exeext
9557 if { (eval echo "$as_me:9557: \"$ac_link\"") >&5
9558   (eval $ac_link) 2>&5
9559   ac_status=$?
9560   echo "$as_me:9560: \$? = $ac_status" >&5
9561   (exit $ac_status); } &&
9562          { ac_try='test -s conftest$ac_exeext'
9563   { (eval echo "$as_me:9563: \"$ac_try\"") >&5
9564   (eval $ac_try) 2>&5
9565   ac_status=$?
9566   echo "$as_me:9566: \$? = $ac_status" >&5
9567   (exit $ac_status); }; }; then
9568   am_cv_langinfo_codeset=yes
9569 else
9570   echo "$as_me: failed program was:" >&5
9571 cat conftest.$ac_ext >&5
9572 am_cv_langinfo_codeset=no
9573 fi
9574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9575
9576 fi
9577 echo "$as_me:9577: result: $am_cv_langinfo_codeset" >&5
9578 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9579         if test $am_cv_langinfo_codeset = yes; then
9580
9581 cat >>confdefs.h <<\EOF
9582 #define HAVE_LANGINFO_CODESET 1
9583 EOF
9584
9585         fi
9586
9587 # use these variables to work around a defect in gcc's fixincludes.
9588 NCURSES_OK_WCHAR_T=
9589 NCURSES_OK_WINT_T=
9590
9591 echo "$as_me:9591: checking if you want wide-character code" >&5
9592 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9593
9594 # Check whether --enable-widec or --disable-widec was given.
9595 if test "${enable_widec+set}" = set; then
9596   enableval="$enable_widec"
9597   with_widec=$enableval
9598 else
9599   with_widec=no
9600 fi;
9601 echo "$as_me:9601: result: $with_widec" >&5
9602 echo "${ECHO_T}$with_widec" >&6
9603
9604 NCURSES_WCWIDTH_GRAPHICS=1
9605
9606 if test "x$with_widec" = xyes ; then
9607         if test "x$disable_lib_suffixes" = xno ; then
9608                 LIB_SUFFIX="w${LIB_SUFFIX}"
9609         fi
9610
9611 cat >>confdefs.h <<\EOF
9612 #define USE_WIDEC_SUPPORT 1
9613 EOF
9614
9615 cat >>confdefs.h <<\EOF
9616 #define NCURSES_WIDECHAR 1
9617 EOF
9618
9619 for ac_header in \
9620 wchar.h \
9621 wctype.h \
9622
9623 do
9624 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9625 echo "$as_me:9625: checking for $ac_header" >&5
9626 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9627 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9628   echo $ECHO_N "(cached) $ECHO_C" >&6
9629 else
9630   cat >conftest.$ac_ext <<_ACEOF
9631 #line 9631 "configure"
9632 #include "confdefs.h"
9633 #include <$ac_header>
9634 _ACEOF
9635 if { (eval echo "$as_me:9635: \"$ac_cpp conftest.$ac_ext\"") >&5
9636   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9637   ac_status=$?
9638   egrep -v '^ *\+' conftest.er1 >conftest.err
9639   rm -f conftest.er1
9640   cat conftest.err >&5
9641   echo "$as_me:9641: \$? = $ac_status" >&5
9642   (exit $ac_status); } >/dev/null; then
9643   if test -s conftest.err; then
9644     ac_cpp_err=$ac_c_preproc_warn_flag
9645   else
9646     ac_cpp_err=
9647   fi
9648 else
9649   ac_cpp_err=yes
9650 fi
9651 if test -z "$ac_cpp_err"; then
9652   eval "$as_ac_Header=yes"
9653 else
9654   echo "$as_me: failed program was:" >&5
9655   cat conftest.$ac_ext >&5
9656   eval "$as_ac_Header=no"
9657 fi
9658 rm -f conftest.err conftest.$ac_ext
9659 fi
9660 echo "$as_me:9660: result: `eval echo '${'$as_ac_Header'}'`" >&5
9661 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9662 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9663   cat >>confdefs.h <<EOF
9664 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9665 EOF
9666
9667 fi
9668 done
9669
9670 echo "$as_me:9670: checking if wchar.h can be used as is" >&5
9671 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9672 if test "${cf_cv_wchar_h_okay+set}" = set; then
9673   echo $ECHO_N "(cached) $ECHO_C" >&6
9674 else
9675
9676 cat >conftest.$ac_ext <<_ACEOF
9677 #line 9677 "configure"
9678 #include "confdefs.h"
9679
9680 #include <stdlib.h>
9681 #ifdef HAVE_WCHAR_H
9682 #include <wchar.h>
9683 #endif
9684 #ifdef HAVE_WCTYPE_H
9685 #include <wctype.h>
9686 #endif
9687
9688 int
9689 main (void)
9690 {
9691
9692         wint_t foo = 0;
9693         int bar = iswpunct(foo)
9694   ;
9695   return 0;
9696 }
9697 _ACEOF
9698 rm -f conftest.$ac_objext
9699 if { (eval echo "$as_me:9699: \"$ac_compile\"") >&5
9700   (eval $ac_compile) 2>&5
9701   ac_status=$?
9702   echo "$as_me:9702: \$? = $ac_status" >&5
9703   (exit $ac_status); } &&
9704          { ac_try='test -s conftest.$ac_objext'
9705   { (eval echo "$as_me:9705: \"$ac_try\"") >&5
9706   (eval $ac_try) 2>&5
9707   ac_status=$?
9708   echo "$as_me:9708: \$? = $ac_status" >&5
9709   (exit $ac_status); }; }; then
9710   cf_cv_wchar_h_okay=yes
9711 else
9712   echo "$as_me: failed program was:" >&5
9713 cat conftest.$ac_ext >&5
9714 cf_cv_wchar_h_okay=no
9715 fi
9716 rm -f conftest.$ac_objext conftest.$ac_ext
9717 fi
9718 echo "$as_me:9718: result: $cf_cv_wchar_h_okay" >&5
9719 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9720
9721 if test $cf_cv_wchar_h_okay = no
9722 then
9723
9724 echo "$as_me:9724: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9725 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9726 cat >conftest.$ac_ext <<_ACEOF
9727 #line 9727 "configure"
9728 #include "confdefs.h"
9729 #include <sys/types.h>
9730
9731 int
9732 main (void)
9733 {
9734
9735 #ifndef _XOPEN_SOURCE_EXTENDED
9736 make an error
9737 #endif
9738   ;
9739   return 0;
9740 }
9741 _ACEOF
9742 rm -f conftest.$ac_objext
9743 if { (eval echo "$as_me:9743: \"$ac_compile\"") >&5
9744   (eval $ac_compile) 2>&5
9745   ac_status=$?
9746   echo "$as_me:9746: \$? = $ac_status" >&5
9747   (exit $ac_status); } &&
9748          { ac_try='test -s conftest.$ac_objext'
9749   { (eval echo "$as_me:9749: \"$ac_try\"") >&5
9750   (eval $ac_try) 2>&5
9751   ac_status=$?
9752   echo "$as_me:9752: \$? = $ac_status" >&5
9753   (exit $ac_status); }; }; then
9754   cf_result=no
9755 else
9756   echo "$as_me: failed program was:" >&5
9757 cat conftest.$ac_ext >&5
9758 cf_result=yes
9759 fi
9760 rm -f conftest.$ac_objext conftest.$ac_ext
9761 echo "$as_me:9761: result: $cf_result" >&5
9762 echo "${ECHO_T}$cf_result" >&6
9763
9764 if test "$cf_result" = yes ; then
9765         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9766 elif test "x" != "x" ; then
9767         echo "$as_me:9767: checking checking for compatible value versus " >&5
9768 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9769         cat >conftest.$ac_ext <<_ACEOF
9770 #line 9770 "configure"
9771 #include "confdefs.h"
9772 #include <sys/types.h>
9773
9774 int
9775 main (void)
9776 {
9777
9778 #if _XOPEN_SOURCE_EXTENDED- < 0
9779 make an error
9780 #endif
9781   ;
9782   return 0;
9783 }
9784 _ACEOF
9785 rm -f conftest.$ac_objext
9786 if { (eval echo "$as_me:9786: \"$ac_compile\"") >&5
9787   (eval $ac_compile) 2>&5
9788   ac_status=$?
9789   echo "$as_me:9789: \$? = $ac_status" >&5
9790   (exit $ac_status); } &&
9791          { ac_try='test -s conftest.$ac_objext'
9792   { (eval echo "$as_me:9792: \"$ac_try\"") >&5
9793   (eval $ac_try) 2>&5
9794   ac_status=$?
9795   echo "$as_me:9795: \$? = $ac_status" >&5
9796   (exit $ac_status); }; }; then
9797   cf_result=yes
9798 else
9799   echo "$as_me: failed program was:" >&5
9800 cat conftest.$ac_ext >&5
9801 cf_result=no
9802 fi
9803 rm -f conftest.$ac_objext conftest.$ac_ext
9804         echo "$as_me:9804: result: $cf_result" >&5
9805 echo "${ECHO_T}$cf_result" >&6
9806         if test "$cf_result" = no ; then
9807                 # perhaps we can override it - try...
9808                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9809         fi
9810 fi
9811
9812 fi
9813
9814 echo "$as_me:9814: checking if wcwidth agrees graphics are single-width" >&5
9815 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9816 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9817   echo $ECHO_N "(cached) $ECHO_C" >&6
9818 else
9819
9820 cat >conftest.in <<CF_EOF
9821 -       VT100 symbols
9822 0x250c  upper left corner
9823 0x2514  lower left corner
9824 0x2510  upper right corner
9825 0x2518  lower right corner
9826 0x251c  tee pointing left
9827 0x2524  tee pointing right
9828 0x2534  tee pointing up
9829 0x252c  tee pointing down
9830 0x2500  horizontal line
9831 0x2502  vertical line
9832 0x253c  large plus or crossover
9833 0x23ba  scan line 1
9834 0x23bd  scan line 9
9835 0x25c6  diamond
9836 0x2592  checker board (stipple)
9837 0x00b0  degree symbol
9838 0x00b1  plus/minus
9839 0x00b7  bullet
9840 -       Teletype 5410v1 symbols
9841 0x2190  arrow pointing left
9842 0x2192  arrow pointing right
9843 0x2193  arrow pointing down
9844 0x2191  arrow pointing up
9845 0x2592  board of squares
9846 0x2603  lantern symbol
9847 0x25ae  solid square block
9848 -       these defaults were invented for ncurses
9849 0x23bb  scan line 3
9850 0x23bc  scan line 7
9851 0x2264  less-than-or-equal-to
9852 0x2265  greater-than-or-equal-to
9853 0x03c0  greek pi
9854 0x2260  not-equal
9855 0x00a3  pound-sterling symbol
9856 -       thick-line-drawing
9857 0x250f  upper left corner
9858 0x2517  lower left corner
9859 0x2513  upper right corner
9860 0x251b  lower right corner
9861 0x2523  tee pointing left
9862 0x252b  tee pointing right
9863 0x253b  tee pointing up
9864 0x2533  tee pointing down
9865 0x2501  horizontal line
9866 0x2503  vertical line
9867 0x254b  large plus or crossover
9868 -       double-line-drawing
9869 0x2554  upper left corner
9870 0x255a  lower left corner
9871 0x2557  upper right corner
9872 0x255d  lower right corner
9873 0x2563  tee pointing left
9874 0x2560  tee pointing right
9875 0x2569  tee pointing up
9876 0x2566  tee pointing down
9877 0x2550  horizontal line
9878 0x2551  vertical line
9879 0x256c  large plus or crossover
9880 CF_EOF
9881 if test "$cross_compiling" = yes; then
9882   cf_cv_wcwidth_graphics=unknown
9883 else
9884   cat >conftest.$ac_ext <<_ACEOF
9885 #line 9885 "configure"
9886 #include "confdefs.h"
9887
9888 #include <locale.h>
9889 #include <stdio.h>
9890 #include <wchar.h>
9891
9892 #define MY_LEN 80
9893
9894 int
9895 main(void)
9896 {
9897         FILE *fp;
9898         int value;
9899         char buffer[MY_LEN + 1];
9900         char notes[MY_LEN + 1];
9901         int totals = 0;
9902         int passed = 0;
9903
9904         if (setlocale(LC_ALL, "en_US.UTF8") ||
9905                 setlocale(LC_ALL, "en_US.UTF-8") ||
9906                 setlocale(LC_ALL, "en_US.utf8") ||
9907                 setlocale(LC_ALL, "en_US.utf-8")) {
9908                 if ((fp = fopen("conftest.in", "r")) != 0) {
9909                         while (fgets(buffer, MY_LEN, fp) != 0) {
9910                                 if (*buffer == '-') {
9911                                         fprintf(stderr, "\t%s", buffer);
9912                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9913                                         ++totals;
9914                                         if (wcwidth(value) == 1)
9915                                                 ++passed;
9916                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9917                                 } else {
9918                                         fprintf(stderr, "?\t%s", buffer);
9919                                 }
9920                         }
9921                 }
9922         }
9923         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9924         return (totals == passed) ? 0 : 1;
9925 }
9926
9927 _ACEOF
9928 rm -f conftest$ac_exeext
9929 if { (eval echo "$as_me:9929: \"$ac_link\"") >&5
9930   (eval $ac_link) 2>&5
9931   ac_status=$?
9932   echo "$as_me:9932: \$? = $ac_status" >&5
9933   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9934   { (eval echo "$as_me:9934: \"$ac_try\"") >&5
9935   (eval $ac_try) 2>&5
9936   ac_status=$?
9937   echo "$as_me:9937: \$? = $ac_status" >&5
9938   (exit $ac_status); }; }; then
9939   cf_cv_wcwidth_graphics=yes
9940 else
9941   echo "$as_me: program exited with status $ac_status" >&5
9942 echo "$as_me: failed program was:" >&5
9943 cat conftest.$ac_ext >&5
9944 cf_cv_wcwidth_graphics=no
9945 fi
9946 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9947 fi
9948
9949 fi
9950 echo "$as_me:9950: result: $cf_cv_wcwidth_graphics" >&5
9951 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9952
9953         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9954
9955         # with_overwrite=no
9956         NCURSES_CH_T=cchar_t
9957
9958 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9959 do
9960 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9961 echo "$as_me:9961: checking for $ac_func" >&5
9962 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9963 if eval "test \"\${$as_ac_var+set}\" = set"; then
9964   echo $ECHO_N "(cached) $ECHO_C" >&6
9965 else
9966   cat >conftest.$ac_ext <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9969 /* System header to define __stub macros and hopefully few prototypes,
9970     which can conflict with char $ac_func (); below.  */
9971 #include <assert.h>
9972 /* Override any gcc2 internal prototype to avoid an error.  */
9973 #ifdef __cplusplus
9974 extern "C"
9975 #endif
9976 /* We use char because int might match the return type of a gcc2
9977    builtin and then its argument prototype would still apply.  */
9978 char $ac_func ();
9979 char (*f) ();
9980
9981 int
9982 main (void)
9983 {
9984 /* The GNU C library defines this for functions which it implements
9985     to always fail with ENOSYS.  Some functions are actually named
9986     something starting with __ and the normal name is an alias.  */
9987 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9988 choke me
9989 #else
9990 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9991 #endif
9992
9993   ;
9994   return 0;
9995 }
9996 _ACEOF
9997 rm -f conftest.$ac_objext conftest$ac_exeext
9998 if { (eval echo "$as_me:9998: \"$ac_link\"") >&5
9999   (eval $ac_link) 2>&5
10000   ac_status=$?
10001   echo "$as_me:10001: \$? = $ac_status" >&5
10002   (exit $ac_status); } &&
10003          { ac_try='test -s conftest$ac_exeext'
10004   { (eval echo "$as_me:10004: \"$ac_try\"") >&5
10005   (eval $ac_try) 2>&5
10006   ac_status=$?
10007   echo "$as_me:10007: \$? = $ac_status" >&5
10008   (exit $ac_status); }; }; then
10009   eval "$as_ac_var=yes"
10010 else
10011   echo "$as_me: failed program was:" >&5
10012 cat conftest.$ac_ext >&5
10013 eval "$as_ac_var=no"
10014 fi
10015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10016 fi
10017 echo "$as_me:10017: result: `eval echo '${'$as_ac_var'}'`" >&5
10018 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10019 if test `eval echo '${'$as_ac_var'}'` = yes; then
10020   cat >>confdefs.h <<EOF
10021 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10022 EOF
10023
10024 fi
10025 done
10026
10027         if test "x$ac_cv_func_putwc" != xyes ; then
10028
10029 echo "$as_me:10029: checking for multibyte character support" >&5
10030 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10031 if test "${cf_cv_utf8_lib+set}" = set; then
10032   echo $ECHO_N "(cached) $ECHO_C" >&6
10033 else
10034
10035         cf_save_LIBS="$LIBS"
10036         cat >conftest.$ac_ext <<_ACEOF
10037 #line 10037 "configure"
10038 #include "confdefs.h"
10039
10040 #include <stdlib.h>
10041 int
10042 main (void)
10043 {
10044 putwc(0,0);
10045   ;
10046   return 0;
10047 }
10048 _ACEOF
10049 rm -f conftest.$ac_objext conftest$ac_exeext
10050 if { (eval echo "$as_me:10050: \"$ac_link\"") >&5
10051   (eval $ac_link) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit $ac_status); } &&
10055          { ac_try='test -s conftest$ac_exeext'
10056   { (eval echo "$as_me:10056: \"$ac_try\"") >&5
10057   (eval $ac_try) 2>&5
10058   ac_status=$?
10059   echo "$as_me:10059: \$? = $ac_status" >&5
10060   (exit $ac_status); }; }; then
10061   cf_cv_utf8_lib=yes
10062 else
10063   echo "$as_me: failed program was:" >&5
10064 cat conftest.$ac_ext >&5
10065
10066 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10067 # will be set on completion of the AC_TRY_LINK below.
10068 cf_cv_header_path_utf8=
10069 cf_cv_library_path_utf8=
10070
10071 echo "${as_me:-configure}:10071: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10072
10073 cf_save_LIBS="$LIBS"
10074
10075 cat >conftest.$ac_ext <<_ACEOF
10076 #line 10076 "configure"
10077 #include "confdefs.h"
10078
10079 #include <libutf8.h>
10080 int
10081 main (void)
10082 {
10083 putwc(0,0);
10084   ;
10085   return 0;
10086 }
10087 _ACEOF
10088 rm -f conftest.$ac_objext conftest$ac_exeext
10089 if { (eval echo "$as_me:10089: \"$ac_link\"") >&5
10090   (eval $ac_link) 2>&5
10091   ac_status=$?
10092   echo "$as_me:10092: \$? = $ac_status" >&5
10093   (exit $ac_status); } &&
10094          { ac_try='test -s conftest$ac_exeext'
10095   { (eval echo "$as_me:10095: \"$ac_try\"") >&5
10096   (eval $ac_try) 2>&5
10097   ac_status=$?
10098   echo "$as_me:10098: \$? = $ac_status" >&5
10099   (exit $ac_status); }; }; then
10100
10101         cf_cv_find_linkage_utf8=yes
10102         cf_cv_header_path_utf8=/usr/include
10103         cf_cv_library_path_utf8=/usr/lib
10104
10105 else
10106   echo "$as_me: failed program was:" >&5
10107 cat conftest.$ac_ext >&5
10108
10109 LIBS="-lutf8  $cf_save_LIBS"
10110
10111 cat >conftest.$ac_ext <<_ACEOF
10112 #line 10112 "configure"
10113 #include "confdefs.h"
10114
10115 #include <libutf8.h>
10116 int
10117 main (void)
10118 {
10119 putwc(0,0);
10120   ;
10121   return 0;
10122 }
10123 _ACEOF
10124 rm -f conftest.$ac_objext conftest$ac_exeext
10125 if { (eval echo "$as_me:10125: \"$ac_link\"") >&5
10126   (eval $ac_link) 2>&5
10127   ac_status=$?
10128   echo "$as_me:10128: \$? = $ac_status" >&5
10129   (exit $ac_status); } &&
10130          { ac_try='test -s conftest$ac_exeext'
10131   { (eval echo "$as_me:10131: \"$ac_try\"") >&5
10132   (eval $ac_try) 2>&5
10133   ac_status=$?
10134   echo "$as_me:10134: \$? = $ac_status" >&5
10135   (exit $ac_status); }; }; then
10136
10137         cf_cv_find_linkage_utf8=yes
10138         cf_cv_header_path_utf8=/usr/include
10139         cf_cv_library_path_utf8=/usr/lib
10140         cf_cv_library_file_utf8="-lutf8"
10141
10142 else
10143   echo "$as_me: failed program was:" >&5
10144 cat conftest.$ac_ext >&5
10145
10146         cf_cv_find_linkage_utf8=no
10147         LIBS="$cf_save_LIBS"
10148
10149         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10150
10151 echo "${as_me:-configure}:10151: testing find linkage for utf8 library ..." 1>&5
10152
10153 echo "${as_me:-configure}:10153: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10154
10155         cf_save_CPPFLAGS="$CPPFLAGS"
10156         cf_test_CPPFLAGS="$CPPFLAGS"
10157
10158 cf_search=
10159
10160 # collect the current set of include-directories from compiler flags
10161 cf_header_path_list=""
10162 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10163         for cf_header_path in $CPPFLAGS $CFLAGS
10164         do
10165                 case $cf_header_path in
10166                 (-I*)
10167                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10168
10169 test "x$cf_header_path" != "xNONE" && \
10170 test -d "$cf_header_path" && \
10171  {
10172         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10173         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10174         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10175         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10176         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10177         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10178 }
10179
10180                         cf_header_path_list="$cf_header_path_list $cf_search"
10181                         ;;
10182                 esac
10183         done
10184 fi
10185
10186 # add the variations for the package we are looking for
10187
10188 cf_search=
10189
10190 test "x$prefix" != "xNONE" && \
10191 test -d "$prefix" && \
10192  {
10193         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10194         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10195         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10196         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10197         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10198         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10199 }
10200
10201 for cf_subdir_prefix in \
10202         /usr \
10203         /usr/local \
10204         /usr/pkg \
10205         /opt \
10206         /opt/local \
10207         $HOME
10208 do
10209
10210 test "x$cf_subdir_prefix" != "x$prefix" && \
10211 test -d "$cf_subdir_prefix" && \
10212 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10213         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10214         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10215         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10216         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10217         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10218         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10219 }
10220
10221 done
10222
10223 test "$includedir" != NONE && \
10224 test "$includedir" != "/usr/include" && \
10225 test -d "$includedir" && {
10226         test -d $includedir &&    cf_search="$cf_search $includedir"
10227         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10228 }
10229
10230 test "$oldincludedir" != NONE && \
10231 test "$oldincludedir" != "/usr/include" && \
10232 test -d "$oldincludedir" && {
10233         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10234         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10235 }
10236
10237 cf_search="$cf_search $cf_header_path_list"
10238
10239         for cf_cv_header_path_utf8 in $cf_search
10240         do
10241                 if test -d $cf_cv_header_path_utf8 ; then
10242                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10243
10244 echo "${as_me:-configure}:10244: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10245
10246                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10247                         cat >conftest.$ac_ext <<_ACEOF
10248 #line 10248 "configure"
10249 #include "confdefs.h"
10250
10251 #include <libutf8.h>
10252 int
10253 main (void)
10254 {
10255 putwc(0,0);
10256   ;
10257   return 0;
10258 }
10259 _ACEOF
10260 rm -f conftest.$ac_objext
10261 if { (eval echo "$as_me:10261: \"$ac_compile\"") >&5
10262   (eval $ac_compile) 2>&5
10263   ac_status=$?
10264   echo "$as_me:10264: \$? = $ac_status" >&5
10265   (exit $ac_status); } &&
10266          { ac_try='test -s conftest.$ac_objext'
10267   { (eval echo "$as_me:10267: \"$ac_try\"") >&5
10268   (eval $ac_try) 2>&5
10269   ac_status=$?
10270   echo "$as_me:10270: \$? = $ac_status" >&5
10271   (exit $ac_status); }; }; then
10272
10273                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10274
10275 echo "${as_me:-configure}:10275: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10276
10277                                 cf_cv_find_linkage_utf8=maybe
10278                                 cf_test_CPPFLAGS="$CPPFLAGS"
10279                                 break
10280 else
10281   echo "$as_me: failed program was:" >&5
10282 cat conftest.$ac_ext >&5
10283
10284                                 CPPFLAGS="$cf_save_CPPFLAGS"
10285
10286 fi
10287 rm -f conftest.$ac_objext conftest.$ac_ext
10288                 fi
10289         done
10290
10291         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10292
10293 echo "${as_me:-configure}:10293: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10294
10295                 cf_save_LIBS="$LIBS"
10296                 cf_save_LDFLAGS="$LDFLAGS"
10297
10298                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10299
10300 cf_search=
10301 cf_library_path_list=""
10302 if test -n "${LDFLAGS}${LIBS}" ; then
10303         for cf_library_path in $LDFLAGS $LIBS
10304         do
10305                 case $cf_library_path in
10306                 (-L*)
10307                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10308
10309 test "x$cf_library_path" != "xNONE" && \
10310 test -d "$cf_library_path" && \
10311  {
10312         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10313         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10314         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10315         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10316         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10317         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10318 }
10319
10320                         cf_library_path_list="$cf_library_path_list $cf_search"
10321                         ;;
10322                 esac
10323         done
10324 fi
10325
10326 cf_search=
10327
10328 test "x$prefix" != "xNONE" && \
10329 test -d "$prefix" && \
10330  {
10331         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10332         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10333         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10334         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10335         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10336         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10337 }
10338
10339 for cf_subdir_prefix in \
10340         /usr \
10341         /usr/local \
10342         /usr/pkg \
10343         /opt \
10344         /opt/local \
10345         $HOME
10346 do
10347
10348 test "x$cf_subdir_prefix" != "x$prefix" && \
10349 test -d "$cf_subdir_prefix" && \
10350 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10351         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10352         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10353         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10354         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10355         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10356         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10357 }
10358
10359 done
10360
10361 cf_search="$cf_library_path_list $cf_search"
10362
10363                         for cf_cv_library_path_utf8 in $cf_search
10364                         do
10365                                 if test -d $cf_cv_library_path_utf8 ; then
10366                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10367
10368 echo "${as_me:-configure}:10368: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10369
10370                                         CPPFLAGS="$cf_test_CPPFLAGS"
10371                                         LIBS="-lutf8  $cf_save_LIBS"
10372                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10373                                         cat >conftest.$ac_ext <<_ACEOF
10374 #line 10374 "configure"
10375 #include "confdefs.h"
10376
10377 #include <libutf8.h>
10378 int
10379 main (void)
10380 {
10381 putwc(0,0);
10382   ;
10383   return 0;
10384 }
10385 _ACEOF
10386 rm -f conftest.$ac_objext conftest$ac_exeext
10387 if { (eval echo "$as_me:10387: \"$ac_link\"") >&5
10388   (eval $ac_link) 2>&5
10389   ac_status=$?
10390   echo "$as_me:10390: \$? = $ac_status" >&5
10391   (exit $ac_status); } &&
10392          { ac_try='test -s conftest$ac_exeext'
10393   { (eval echo "$as_me:10393: \"$ac_try\"") >&5
10394   (eval $ac_try) 2>&5
10395   ac_status=$?
10396   echo "$as_me:10396: \$? = $ac_status" >&5
10397   (exit $ac_status); }; }; then
10398
10399                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10400
10401 echo "${as_me:-configure}:10401: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10402
10403                                         cf_cv_find_linkage_utf8=yes
10404                                         cf_cv_library_file_utf8="-lutf8"
10405                                         break
10406 else
10407   echo "$as_me: failed program was:" >&5
10408 cat conftest.$ac_ext >&5
10409
10410                                         CPPFLAGS="$cf_save_CPPFLAGS"
10411                                         LIBS="$cf_save_LIBS"
10412                                         LDFLAGS="$cf_save_LDFLAGS"
10413
10414 fi
10415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10416                                 fi
10417                         done
10418                         CPPFLAGS="$cf_save_CPPFLAGS"
10419                         LDFLAGS="$cf_save_LDFLAGS"
10420                 fi
10421
10422         else
10423                 cf_cv_find_linkage_utf8=no
10424         fi
10425
10426 fi
10427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10428
10429 fi
10430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10431
10432 LIBS="$cf_save_LIBS"
10433
10434 if test "$cf_cv_find_linkage_utf8" = yes ; then
10435 cf_cv_utf8_lib=add-on
10436 else
10437 cf_cv_utf8_lib=no
10438 fi
10439
10440 fi
10441 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10442 fi
10443 echo "$as_me:10443: result: $cf_cv_utf8_lib" >&5
10444 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10445
10446 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10447 # ncurses/ncursesw:
10448 if test "$cf_cv_utf8_lib" = "add-on" ; then
10449
10450 cat >>confdefs.h <<\EOF
10451 #define HAVE_LIBUTF8_H 1
10452 EOF
10453
10454 if test -n "$cf_cv_header_path_utf8" ; then
10455   for cf_add_incdir in $cf_cv_header_path_utf8
10456   do
10457         while test $cf_add_incdir != /usr/include
10458         do
10459           if test -d $cf_add_incdir
10460           then
10461                 cf_have_incdir=no
10462                 if test -n "$CFLAGS$CPPFLAGS" ; then
10463                   # a loop is needed to ensure we can add subdirs of existing dirs
10464                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10465                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10466                           cf_have_incdir=yes; break
10467                         fi
10468                   done
10469                 fi
10470
10471                 if test "$cf_have_incdir" = no ; then
10472                   if test "$cf_add_incdir" = /usr/local/include ; then
10473                         if test "$GCC" = yes
10474                         then
10475                           cf_save_CPPFLAGS=$CPPFLAGS
10476                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10477                           cat >conftest.$ac_ext <<_ACEOF
10478 #line 10478 "configure"
10479 #include "confdefs.h"
10480 #include <stdio.h>
10481 int
10482 main (void)
10483 {
10484 printf("Hello")
10485   ;
10486   return 0;
10487 }
10488 _ACEOF
10489 rm -f conftest.$ac_objext
10490 if { (eval echo "$as_me:10490: \"$ac_compile\"") >&5
10491   (eval $ac_compile) 2>&5
10492   ac_status=$?
10493   echo "$as_me:10493: \$? = $ac_status" >&5
10494   (exit $ac_status); } &&
10495          { ac_try='test -s conftest.$ac_objext'
10496   { (eval echo "$as_me:10496: \"$ac_try\"") >&5
10497   (eval $ac_try) 2>&5
10498   ac_status=$?
10499   echo "$as_me:10499: \$? = $ac_status" >&5
10500   (exit $ac_status); }; }; then
10501   :
10502 else
10503   echo "$as_me: failed program was:" >&5
10504 cat conftest.$ac_ext >&5
10505 cf_have_incdir=yes
10506 fi
10507 rm -f conftest.$ac_objext conftest.$ac_ext
10508                           CPPFLAGS=$cf_save_CPPFLAGS
10509                         fi
10510                   fi
10511                 fi
10512
10513                 if test "$cf_have_incdir" = no ; then
10514                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10515
10516 echo "${as_me:-configure}:10516: testing adding $cf_add_incdir to include-path ..." 1>&5
10517
10518                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10519
10520                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10521                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10522                   cf_add_incdir="$cf_top_incdir"
10523                 else
10524                   break
10525                 fi
10526           else
10527                 break
10528           fi
10529         done
10530   done
10531 fi
10532
10533 if test -n "$cf_cv_library_path_utf8" ; then
10534         for cf_add_libdir in $cf_cv_library_path_utf8
10535         do
10536                 if test $cf_add_libdir = /usr/lib ; then
10537                         :
10538                 elif test -d $cf_add_libdir
10539                 then
10540                         cf_have_libdir=no
10541                         if test -n "$LDFLAGS$LIBS" ; then
10542                                 # a loop is needed to ensure we can add subdirs of existing dirs
10543                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10544                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10545                                                 cf_have_libdir=yes; break
10546                                         fi
10547                                 done
10548                         fi
10549                         if test "$cf_have_libdir" = no ; then
10550                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10551
10552 echo "${as_me:-configure}:10552: testing adding $cf_add_libdir to library-path ..." 1>&5
10553
10554                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10555                         fi
10556                 fi
10557         done
10558 fi
10559
10560 cf_add_libs="$cf_cv_library_file_utf8"
10561 # Filter out duplicates - this happens with badly-designed ".pc" files...
10562 for cf_add_1lib in $LIBS
10563 do
10564         for cf_add_2lib in $cf_add_libs
10565         do
10566                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10567                 then
10568                         cf_add_1lib=
10569                         break
10570                 fi
10571         done
10572         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10573 done
10574 LIBS="$cf_add_libs"
10575
10576 fi
10577
10578                 if test "$cf_cv_utf8_lib" != no ; then
10579                         NCURSES_LIBUTF8=1
10580                 fi
10581         fi
10582
10583 # This is needed on Tru64 5.0 to declare mbstate_t
10584 echo "$as_me:10584: checking if we must include wchar.h to declare mbstate_t" >&5
10585 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10586 if test "${cf_cv_mbstate_t+set}" = set; then
10587   echo $ECHO_N "(cached) $ECHO_C" >&6
10588 else
10589
10590 cat >conftest.$ac_ext <<_ACEOF
10591 #line 10591 "configure"
10592 #include "confdefs.h"
10593
10594 #include <stdlib.h>
10595 #include <stdarg.h>
10596 #include <stdio.h>
10597 #ifdef HAVE_LIBUTF8_H
10598 #include <libutf8.h>
10599 #endif
10600 int
10601 main (void)
10602 {
10603 mbstate_t state
10604   ;
10605   return 0;
10606 }
10607 _ACEOF
10608 rm -f conftest.$ac_objext
10609 if { (eval echo "$as_me:10609: \"$ac_compile\"") >&5
10610   (eval $ac_compile) 2>&5
10611   ac_status=$?
10612   echo "$as_me:10612: \$? = $ac_status" >&5
10613   (exit $ac_status); } &&
10614          { ac_try='test -s conftest.$ac_objext'
10615   { (eval echo "$as_me:10615: \"$ac_try\"") >&5
10616   (eval $ac_try) 2>&5
10617   ac_status=$?
10618   echo "$as_me:10618: \$? = $ac_status" >&5
10619   (exit $ac_status); }; }; then
10620   cf_cv_mbstate_t=no
10621 else
10622   echo "$as_me: failed program was:" >&5
10623 cat conftest.$ac_ext >&5
10624 cat >conftest.$ac_ext <<_ACEOF
10625 #line 10625 "configure"
10626 #include "confdefs.h"
10627
10628 #include <stdlib.h>
10629 #include <stdarg.h>
10630 #include <stdio.h>
10631 #include <wchar.h>
10632 #ifdef HAVE_LIBUTF8_H
10633 #include <libutf8.h>
10634 #endif
10635 int
10636 main (void)
10637 {
10638 mbstate_t value
10639   ;
10640   return 0;
10641 }
10642 _ACEOF
10643 rm -f conftest.$ac_objext
10644 if { (eval echo "$as_me:10644: \"$ac_compile\"") >&5
10645   (eval $ac_compile) 2>&5
10646   ac_status=$?
10647   echo "$as_me:10647: \$? = $ac_status" >&5
10648   (exit $ac_status); } &&
10649          { ac_try='test -s conftest.$ac_objext'
10650   { (eval echo "$as_me:10650: \"$ac_try\"") >&5
10651   (eval $ac_try) 2>&5
10652   ac_status=$?
10653   echo "$as_me:10653: \$? = $ac_status" >&5
10654   (exit $ac_status); }; }; then
10655   cf_cv_mbstate_t=yes
10656 else
10657   echo "$as_me: failed program was:" >&5
10658 cat conftest.$ac_ext >&5
10659 cf_cv_mbstate_t=unknown
10660 fi
10661 rm -f conftest.$ac_objext conftest.$ac_ext
10662 fi
10663 rm -f conftest.$ac_objext conftest.$ac_ext
10664 fi
10665 echo "$as_me:10665: result: $cf_cv_mbstate_t" >&5
10666 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10667
10668 if test "$cf_cv_mbstate_t" = yes ; then
10669
10670 cat >>confdefs.h <<\EOF
10671 #define NEED_WCHAR_H 1
10672 EOF
10673
10674         NEED_WCHAR_H=1
10675 fi
10676
10677 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10678 if test "$cf_cv_mbstate_t" = unknown ; then
10679         NCURSES_MBSTATE_T=1
10680 fi
10681
10682 # This is needed on Tru64 5.0 to declare wchar_t
10683 echo "$as_me:10683: checking if we must include wchar.h to declare wchar_t" >&5
10684 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10685 if test "${cf_cv_wchar_t+set}" = set; then
10686   echo $ECHO_N "(cached) $ECHO_C" >&6
10687 else
10688
10689 cat >conftest.$ac_ext <<_ACEOF
10690 #line 10690 "configure"
10691 #include "confdefs.h"
10692
10693 #include <stdlib.h>
10694 #include <stdarg.h>
10695 #include <stdio.h>
10696 #ifdef HAVE_LIBUTF8_H
10697 #include <libutf8.h>
10698 #endif
10699 int
10700 main (void)
10701 {
10702 wchar_t state
10703   ;
10704   return 0;
10705 }
10706 _ACEOF
10707 rm -f conftest.$ac_objext
10708 if { (eval echo "$as_me:10708: \"$ac_compile\"") >&5
10709   (eval $ac_compile) 2>&5
10710   ac_status=$?
10711   echo "$as_me:10711: \$? = $ac_status" >&5
10712   (exit $ac_status); } &&
10713          { ac_try='test -s conftest.$ac_objext'
10714   { (eval echo "$as_me:10714: \"$ac_try\"") >&5
10715   (eval $ac_try) 2>&5
10716   ac_status=$?
10717   echo "$as_me:10717: \$? = $ac_status" >&5
10718   (exit $ac_status); }; }; then
10719   cf_cv_wchar_t=no
10720 else
10721   echo "$as_me: failed program was:" >&5
10722 cat conftest.$ac_ext >&5
10723 cat >conftest.$ac_ext <<_ACEOF
10724 #line 10724 "configure"
10725 #include "confdefs.h"
10726
10727 #include <stdlib.h>
10728 #include <stdarg.h>
10729 #include <stdio.h>
10730 #include <wchar.h>
10731 #ifdef HAVE_LIBUTF8_H
10732 #include <libutf8.h>
10733 #endif
10734 int
10735 main (void)
10736 {
10737 wchar_t value
10738   ;
10739   return 0;
10740 }
10741 _ACEOF
10742 rm -f conftest.$ac_objext
10743 if { (eval echo "$as_me:10743: \"$ac_compile\"") >&5
10744   (eval $ac_compile) 2>&5
10745   ac_status=$?
10746   echo "$as_me:10746: \$? = $ac_status" >&5
10747   (exit $ac_status); } &&
10748          { ac_try='test -s conftest.$ac_objext'
10749   { (eval echo "$as_me:10749: \"$ac_try\"") >&5
10750   (eval $ac_try) 2>&5
10751   ac_status=$?
10752   echo "$as_me:10752: \$? = $ac_status" >&5
10753   (exit $ac_status); }; }; then
10754   cf_cv_wchar_t=yes
10755 else
10756   echo "$as_me: failed program was:" >&5
10757 cat conftest.$ac_ext >&5
10758 cf_cv_wchar_t=unknown
10759 fi
10760 rm -f conftest.$ac_objext conftest.$ac_ext
10761 fi
10762 rm -f conftest.$ac_objext conftest.$ac_ext
10763 fi
10764 echo "$as_me:10764: result: $cf_cv_wchar_t" >&5
10765 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10766
10767 if test "$cf_cv_wchar_t" = yes ; then
10768
10769 cat >>confdefs.h <<\EOF
10770 #define NEED_WCHAR_H 1
10771 EOF
10772
10773         NEED_WCHAR_H=1
10774 fi
10775
10776 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10777 if test "$cf_cv_wchar_t" = unknown ; then
10778         NCURSES_WCHAR_T=1
10779 fi
10780
10781 # if we find wchar_t in either place, use substitution to provide a fallback.
10782 if test "$cf_cv_wchar_t" != unknown ; then
10783         NCURSES_OK_WCHAR_T=1
10784 fi
10785
10786 # This is needed on Tru64 5.0 to declare wint_t
10787 echo "$as_me:10787: checking if we must include wchar.h to declare wint_t" >&5
10788 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10789 if test "${cf_cv_wint_t+set}" = set; then
10790   echo $ECHO_N "(cached) $ECHO_C" >&6
10791 else
10792
10793 cat >conftest.$ac_ext <<_ACEOF
10794 #line 10794 "configure"
10795 #include "confdefs.h"
10796
10797 #include <stdlib.h>
10798 #include <stdarg.h>
10799 #include <stdio.h>
10800 #ifdef HAVE_LIBUTF8_H
10801 #include <libutf8.h>
10802 #endif
10803 int
10804 main (void)
10805 {
10806 wint_t state
10807   ;
10808   return 0;
10809 }
10810 _ACEOF
10811 rm -f conftest.$ac_objext
10812 if { (eval echo "$as_me:10812: \"$ac_compile\"") >&5
10813   (eval $ac_compile) 2>&5
10814   ac_status=$?
10815   echo "$as_me:10815: \$? = $ac_status" >&5
10816   (exit $ac_status); } &&
10817          { ac_try='test -s conftest.$ac_objext'
10818   { (eval echo "$as_me:10818: \"$ac_try\"") >&5
10819   (eval $ac_try) 2>&5
10820   ac_status=$?
10821   echo "$as_me:10821: \$? = $ac_status" >&5
10822   (exit $ac_status); }; }; then
10823   cf_cv_wint_t=no
10824 else
10825   echo "$as_me: failed program was:" >&5
10826 cat conftest.$ac_ext >&5
10827 cat >conftest.$ac_ext <<_ACEOF
10828 #line 10828 "configure"
10829 #include "confdefs.h"
10830
10831 #include <stdlib.h>
10832 #include <stdarg.h>
10833 #include <stdio.h>
10834 #include <wchar.h>
10835 #ifdef HAVE_LIBUTF8_H
10836 #include <libutf8.h>
10837 #endif
10838 int
10839 main (void)
10840 {
10841 wint_t value
10842   ;
10843   return 0;
10844 }
10845 _ACEOF
10846 rm -f conftest.$ac_objext
10847 if { (eval echo "$as_me:10847: \"$ac_compile\"") >&5
10848   (eval $ac_compile) 2>&5
10849   ac_status=$?
10850   echo "$as_me:10850: \$? = $ac_status" >&5
10851   (exit $ac_status); } &&
10852          { ac_try='test -s conftest.$ac_objext'
10853   { (eval echo "$as_me:10853: \"$ac_try\"") >&5
10854   (eval $ac_try) 2>&5
10855   ac_status=$?
10856   echo "$as_me:10856: \$? = $ac_status" >&5
10857   (exit $ac_status); }; }; then
10858   cf_cv_wint_t=yes
10859 else
10860   echo "$as_me: failed program was:" >&5
10861 cat conftest.$ac_ext >&5
10862 cf_cv_wint_t=unknown
10863 fi
10864 rm -f conftest.$ac_objext conftest.$ac_ext
10865 fi
10866 rm -f conftest.$ac_objext conftest.$ac_ext
10867 fi
10868 echo "$as_me:10868: result: $cf_cv_wint_t" >&5
10869 echo "${ECHO_T}$cf_cv_wint_t" >&6
10870
10871 if test "$cf_cv_wint_t" = yes ; then
10872
10873 cat >>confdefs.h <<\EOF
10874 #define NEED_WCHAR_H 1
10875 EOF
10876
10877         NEED_WCHAR_H=1
10878 fi
10879
10880 # if we do not find wint_t in either place, use substitution to provide a fallback.
10881 if test "$cf_cv_wint_t" = unknown ; then
10882         NCURSES_WINT_T=1
10883 fi
10884
10885 # if we find wint_t in either place, use substitution to provide a fallback.
10886 if test "$cf_cv_wint_t" != unknown ; then
10887         NCURSES_OK_WINT_T=1
10888 fi
10889
10890         if test "$NCURSES_MBSTATE_T" != 0; then
10891
10892 cat >>confdefs.h <<\EOF
10893 #define NEED_MBSTATE_T_DEF 1
10894 EOF
10895
10896         fi
10897 fi
10898
10899 ###   use option --disable-lp64 to allow long chtype
10900 echo "$as_me:10900: checking whether to enable _LP64 definition in curses.h" >&5
10901 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10902
10903 # Check whether --enable-lp64 or --disable-lp64 was given.
10904 if test "${enable_lp64+set}" = set; then
10905   enableval="$enable_lp64"
10906   with_lp64=$enableval
10907 else
10908   with_lp64=$cf_dft_with_lp64
10909 fi;
10910 echo "$as_me:10910: result: $with_lp64" >&5
10911 echo "${ECHO_T}$with_lp64" >&6
10912
10913 if test "x$with_lp64" = xyes ; then
10914         cf_cv_enable_lp64=1
10915 else
10916         cf_cv_enable_lp64=0
10917 fi
10918
10919 # Check whether --enable-largefile or --disable-largefile was given.
10920 if test "${enable_largefile+set}" = set; then
10921   enableval="$enable_largefile"
10922
10923 fi;
10924 if test "$enable_largefile" != no; then
10925
10926   echo "$as_me:10926: checking for special C compiler options needed for large files" >&5
10927 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10928 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10929   echo $ECHO_N "(cached) $ECHO_C" >&6
10930 else
10931   ac_cv_sys_largefile_CC=no
10932      if test "$GCC" != yes; then
10933        ac_save_CC=$CC
10934        while :; do
10935          # IRIX 6.2 and later do not support large files by default,
10936          # so use the C compiler's -n32 option if that helps.
10937          cat >conftest.$ac_ext <<_ACEOF
10938 #line 10938 "configure"
10939 #include "confdefs.h"
10940 #include <sys/types.h>
10941  /* Check that off_t can represent 2**63 - 1 correctly.
10942     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10943     since some C++ compilers masquerading as C compilers
10944     incorrectly reject 9223372036854775807.  */
10945 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10946   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10947                        && LARGE_OFF_T % 2147483647 == 1)
10948                       ? 1 : -1];
10949 int
10950 main (void)
10951 {
10952
10953   ;
10954   return 0;
10955 }
10956 _ACEOF
10957          rm -f conftest.$ac_objext
10958 if { (eval echo "$as_me:10958: \"$ac_compile\"") >&5
10959   (eval $ac_compile) 2>&5
10960   ac_status=$?
10961   echo "$as_me:10961: \$? = $ac_status" >&5
10962   (exit $ac_status); } &&
10963          { ac_try='test -s conftest.$ac_objext'
10964   { (eval echo "$as_me:10964: \"$ac_try\"") >&5
10965   (eval $ac_try) 2>&5
10966   ac_status=$?
10967   echo "$as_me:10967: \$? = $ac_status" >&5
10968   (exit $ac_status); }; }; then
10969   break
10970 else
10971   echo "$as_me: failed program was:" >&5
10972 cat conftest.$ac_ext >&5
10973 fi
10974 rm -f conftest.$ac_objext
10975          CC="$CC -n32"
10976          rm -f conftest.$ac_objext
10977 if { (eval echo "$as_me:10977: \"$ac_compile\"") >&5
10978   (eval $ac_compile) 2>&5
10979   ac_status=$?
10980   echo "$as_me:10980: \$? = $ac_status" >&5
10981   (exit $ac_status); } &&
10982          { ac_try='test -s conftest.$ac_objext'
10983   { (eval echo "$as_me:10983: \"$ac_try\"") >&5
10984   (eval $ac_try) 2>&5
10985   ac_status=$?
10986   echo "$as_me:10986: \$? = $ac_status" >&5
10987   (exit $ac_status); }; }; then
10988   ac_cv_sys_largefile_CC=' -n32'; break
10989 else
10990   echo "$as_me: failed program was:" >&5
10991 cat conftest.$ac_ext >&5
10992 fi
10993 rm -f conftest.$ac_objext
10994          break
10995        done
10996        CC=$ac_save_CC
10997        rm -f conftest.$ac_ext
10998     fi
10999 fi
11000 echo "$as_me:11000: result: $ac_cv_sys_largefile_CC" >&5
11001 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11002   if test "$ac_cv_sys_largefile_CC" != no; then
11003     CC=$CC$ac_cv_sys_largefile_CC
11004   fi
11005
11006   echo "$as_me:11006: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11007 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11008 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11009   echo $ECHO_N "(cached) $ECHO_C" >&6
11010 else
11011   while :; do
11012   ac_cv_sys_file_offset_bits=no
11013   cat >conftest.$ac_ext <<_ACEOF
11014 #line 11014 "configure"
11015 #include "confdefs.h"
11016 #include <sys/types.h>
11017  /* Check that off_t can represent 2**63 - 1 correctly.
11018     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11019     since some C++ compilers masquerading as C compilers
11020     incorrectly reject 9223372036854775807.  */
11021 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11022   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11023                        && LARGE_OFF_T % 2147483647 == 1)
11024                       ? 1 : -1];
11025 int
11026 main (void)
11027 {
11028
11029   ;
11030   return 0;
11031 }
11032 _ACEOF
11033 rm -f conftest.$ac_objext
11034 if { (eval echo "$as_me:11034: \"$ac_compile\"") >&5
11035   (eval $ac_compile) 2>&5
11036   ac_status=$?
11037   echo "$as_me:11037: \$? = $ac_status" >&5
11038   (exit $ac_status); } &&
11039          { ac_try='test -s conftest.$ac_objext'
11040   { (eval echo "$as_me:11040: \"$ac_try\"") >&5
11041   (eval $ac_try) 2>&5
11042   ac_status=$?
11043   echo "$as_me:11043: \$? = $ac_status" >&5
11044   (exit $ac_status); }; }; then
11045   break
11046 else
11047   echo "$as_me: failed program was:" >&5
11048 cat conftest.$ac_ext >&5
11049 fi
11050 rm -f conftest.$ac_objext conftest.$ac_ext
11051   cat >conftest.$ac_ext <<_ACEOF
11052 #line 11052 "configure"
11053 #include "confdefs.h"
11054 #define _FILE_OFFSET_BITS 64
11055 #include <sys/types.h>
11056  /* Check that off_t can represent 2**63 - 1 correctly.
11057     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11058     since some C++ compilers masquerading as C compilers
11059     incorrectly reject 9223372036854775807.  */
11060 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11061   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11062                        && LARGE_OFF_T % 2147483647 == 1)
11063                       ? 1 : -1];
11064 int
11065 main (void)
11066 {
11067
11068   ;
11069   return 0;
11070 }
11071 _ACEOF
11072 rm -f conftest.$ac_objext
11073 if { (eval echo "$as_me:11073: \"$ac_compile\"") >&5
11074   (eval $ac_compile) 2>&5
11075   ac_status=$?
11076   echo "$as_me:11076: \$? = $ac_status" >&5
11077   (exit $ac_status); } &&
11078          { ac_try='test -s conftest.$ac_objext'
11079   { (eval echo "$as_me:11079: \"$ac_try\"") >&5
11080   (eval $ac_try) 2>&5
11081   ac_status=$?
11082   echo "$as_me:11082: \$? = $ac_status" >&5
11083   (exit $ac_status); }; }; then
11084   ac_cv_sys_file_offset_bits=64; break
11085 else
11086   echo "$as_me: failed program was:" >&5
11087 cat conftest.$ac_ext >&5
11088 fi
11089 rm -f conftest.$ac_objext conftest.$ac_ext
11090   break
11091 done
11092 fi
11093 echo "$as_me:11093: result: $ac_cv_sys_file_offset_bits" >&5
11094 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11095 if test "$ac_cv_sys_file_offset_bits" != no; then
11096
11097 cat >>confdefs.h <<EOF
11098 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11099 EOF
11100
11101 fi
11102 rm -rf conftest*
11103   echo "$as_me:11103: checking for _LARGE_FILES value needed for large files" >&5
11104 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11105 if test "${ac_cv_sys_large_files+set}" = set; then
11106   echo $ECHO_N "(cached) $ECHO_C" >&6
11107 else
11108   while :; do
11109   ac_cv_sys_large_files=no
11110   cat >conftest.$ac_ext <<_ACEOF
11111 #line 11111 "configure"
11112 #include "confdefs.h"
11113 #include <sys/types.h>
11114  /* Check that off_t can represent 2**63 - 1 correctly.
11115     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11116     since some C++ compilers masquerading as C compilers
11117     incorrectly reject 9223372036854775807.  */
11118 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11119   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11120                        && LARGE_OFF_T % 2147483647 == 1)
11121                       ? 1 : -1];
11122 int
11123 main (void)
11124 {
11125
11126   ;
11127   return 0;
11128 }
11129 _ACEOF
11130 rm -f conftest.$ac_objext
11131 if { (eval echo "$as_me:11131: \"$ac_compile\"") >&5
11132   (eval $ac_compile) 2>&5
11133   ac_status=$?
11134   echo "$as_me:11134: \$? = $ac_status" >&5
11135   (exit $ac_status); } &&
11136          { ac_try='test -s conftest.$ac_objext'
11137   { (eval echo "$as_me:11137: \"$ac_try\"") >&5
11138   (eval $ac_try) 2>&5
11139   ac_status=$?
11140   echo "$as_me:11140: \$? = $ac_status" >&5
11141   (exit $ac_status); }; }; then
11142   break
11143 else
11144   echo "$as_me: failed program was:" >&5
11145 cat conftest.$ac_ext >&5
11146 fi
11147 rm -f conftest.$ac_objext conftest.$ac_ext
11148   cat >conftest.$ac_ext <<_ACEOF
11149 #line 11149 "configure"
11150 #include "confdefs.h"
11151 #define _LARGE_FILES 1
11152 #include <sys/types.h>
11153  /* Check that off_t can represent 2**63 - 1 correctly.
11154     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11155     since some C++ compilers masquerading as C compilers
11156     incorrectly reject 9223372036854775807.  */
11157 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11158   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11159                        && LARGE_OFF_T % 2147483647 == 1)
11160                       ? 1 : -1];
11161 int
11162 main (void)
11163 {
11164
11165   ;
11166   return 0;
11167 }
11168 _ACEOF
11169 rm -f conftest.$ac_objext
11170 if { (eval echo "$as_me:11170: \"$ac_compile\"") >&5
11171   (eval $ac_compile) 2>&5
11172   ac_status=$?
11173   echo "$as_me:11173: \$? = $ac_status" >&5
11174   (exit $ac_status); } &&
11175          { ac_try='test -s conftest.$ac_objext'
11176   { (eval echo "$as_me:11176: \"$ac_try\"") >&5
11177   (eval $ac_try) 2>&5
11178   ac_status=$?
11179   echo "$as_me:11179: \$? = $ac_status" >&5
11180   (exit $ac_status); }; }; then
11181   ac_cv_sys_large_files=1; break
11182 else
11183   echo "$as_me: failed program was:" >&5
11184 cat conftest.$ac_ext >&5
11185 fi
11186 rm -f conftest.$ac_objext conftest.$ac_ext
11187   break
11188 done
11189 fi
11190 echo "$as_me:11190: result: $ac_cv_sys_large_files" >&5
11191 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11192 if test "$ac_cv_sys_large_files" != no; then
11193
11194 cat >>confdefs.h <<EOF
11195 #define _LARGE_FILES $ac_cv_sys_large_files
11196 EOF
11197
11198 fi
11199 rm -rf conftest*
11200 fi
11201
11202         if test "$enable_largefile" != no ; then
11203         echo "$as_me:11203: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11204 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11205 if test "${ac_cv_sys_largefile_source+set}" = set; then
11206   echo $ECHO_N "(cached) $ECHO_C" >&6
11207 else
11208   while :; do
11209   ac_cv_sys_largefile_source=no
11210   cat >conftest.$ac_ext <<_ACEOF
11211 #line 11211 "configure"
11212 #include "confdefs.h"
11213 #include <stdio.h>
11214 int
11215 main (void)
11216 {
11217 return !fseeko;
11218   ;
11219   return 0;
11220 }
11221 _ACEOF
11222 rm -f conftest.$ac_objext
11223 if { (eval echo "$as_me:11223: \"$ac_compile\"") >&5
11224   (eval $ac_compile) 2>&5
11225   ac_status=$?
11226   echo "$as_me:11226: \$? = $ac_status" >&5
11227   (exit $ac_status); } &&
11228          { ac_try='test -s conftest.$ac_objext'
11229   { (eval echo "$as_me:11229: \"$ac_try\"") >&5
11230   (eval $ac_try) 2>&5
11231   ac_status=$?
11232   echo "$as_me:11232: \$? = $ac_status" >&5
11233   (exit $ac_status); }; }; then
11234   break
11235 else
11236   echo "$as_me: failed program was:" >&5
11237 cat conftest.$ac_ext >&5
11238 fi
11239 rm -f conftest.$ac_objext conftest.$ac_ext
11240   cat >conftest.$ac_ext <<_ACEOF
11241 #line 11241 "configure"
11242 #include "confdefs.h"
11243 #define _LARGEFILE_SOURCE 1
11244 #include <stdio.h>
11245 int
11246 main (void)
11247 {
11248 return !fseeko;
11249   ;
11250   return 0;
11251 }
11252 _ACEOF
11253 rm -f conftest.$ac_objext
11254 if { (eval echo "$as_me:11254: \"$ac_compile\"") >&5
11255   (eval $ac_compile) 2>&5
11256   ac_status=$?
11257   echo "$as_me:11257: \$? = $ac_status" >&5
11258   (exit $ac_status); } &&
11259          { ac_try='test -s conftest.$ac_objext'
11260   { (eval echo "$as_me:11260: \"$ac_try\"") >&5
11261   (eval $ac_try) 2>&5
11262   ac_status=$?
11263   echo "$as_me:11263: \$? = $ac_status" >&5
11264   (exit $ac_status); }; }; then
11265   ac_cv_sys_largefile_source=1; break
11266 else
11267   echo "$as_me: failed program was:" >&5
11268 cat conftest.$ac_ext >&5
11269 fi
11270 rm -f conftest.$ac_objext conftest.$ac_ext
11271   break
11272 done
11273 fi
11274 echo "$as_me:11274: result: $ac_cv_sys_largefile_source" >&5
11275 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11276 if test "$ac_cv_sys_largefile_source" != no; then
11277
11278 cat >>confdefs.h <<EOF
11279 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11280 EOF
11281
11282 fi
11283 rm -rf conftest*
11284
11285 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11286 # in glibc 2.1.3, but that breaks too many other things.
11287 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11288 echo "$as_me:11288: checking for fseeko" >&5
11289 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11290 if test "${ac_cv_func_fseeko+set}" = set; then
11291   echo $ECHO_N "(cached) $ECHO_C" >&6
11292 else
11293   cat >conftest.$ac_ext <<_ACEOF
11294 #line 11294 "configure"
11295 #include "confdefs.h"
11296 #include <stdio.h>
11297 int
11298 main (void)
11299 {
11300 return fseeko && fseeko (stdin, 0, 0);
11301   ;
11302   return 0;
11303 }
11304 _ACEOF
11305 rm -f conftest.$ac_objext conftest$ac_exeext
11306 if { (eval echo "$as_me:11306: \"$ac_link\"") >&5
11307   (eval $ac_link) 2>&5
11308   ac_status=$?
11309   echo "$as_me:11309: \$? = $ac_status" >&5
11310   (exit $ac_status); } &&
11311          { ac_try='test -s conftest$ac_exeext'
11312   { (eval echo "$as_me:11312: \"$ac_try\"") >&5
11313   (eval $ac_try) 2>&5
11314   ac_status=$?
11315   echo "$as_me:11315: \$? = $ac_status" >&5
11316   (exit $ac_status); }; }; then
11317   ac_cv_func_fseeko=yes
11318 else
11319   echo "$as_me: failed program was:" >&5
11320 cat conftest.$ac_ext >&5
11321 ac_cv_func_fseeko=no
11322 fi
11323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11324 fi
11325 echo "$as_me:11325: result: $ac_cv_func_fseeko" >&5
11326 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11327 if test $ac_cv_func_fseeko = yes; then
11328
11329 cat >>confdefs.h <<\EOF
11330 #define HAVE_FSEEKO 1
11331 EOF
11332
11333 fi
11334
11335         # Normally we would collect these definitions in the config.h,
11336         # but (like _XOPEN_SOURCE), some environments rely on having these
11337         # defined before any of the system headers are included.  Another
11338         # case comes up with C++, e.g., on AIX the compiler compiles the
11339         # header files by themselves before looking at the body files it is
11340         # told to compile.  For ncurses, those header files do not include
11341         # the config.h
11342         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11343         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11344         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11345
11346         echo "$as_me:11346: checking whether to use struct dirent64" >&5
11347 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11348 if test "${cf_cv_struct_dirent64+set}" = set; then
11349   echo $ECHO_N "(cached) $ECHO_C" >&6
11350 else
11351
11352                 cat >conftest.$ac_ext <<_ACEOF
11353 #line 11353 "configure"
11354 #include "confdefs.h"
11355
11356 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11357 #include <sys/types.h>
11358 #include <dirent.h>
11359
11360 int
11361 main (void)
11362 {
11363
11364                 /* if transitional largefile support is setup, this is true */
11365                 extern struct dirent64 * readdir(DIR *);
11366                 struct dirent64 *x = readdir((DIR *)0);
11367                 struct dirent *y = readdir((DIR *)0);
11368                 int z = x - y;
11369
11370   ;
11371   return 0;
11372 }
11373 _ACEOF
11374 rm -f conftest.$ac_objext
11375 if { (eval echo "$as_me:11375: \"$ac_compile\"") >&5
11376   (eval $ac_compile) 2>&5
11377   ac_status=$?
11378   echo "$as_me:11378: \$? = $ac_status" >&5
11379   (exit $ac_status); } &&
11380          { ac_try='test -s conftest.$ac_objext'
11381   { (eval echo "$as_me:11381: \"$ac_try\"") >&5
11382   (eval $ac_try) 2>&5
11383   ac_status=$?
11384   echo "$as_me:11384: \$? = $ac_status" >&5
11385   (exit $ac_status); }; }; then
11386   cf_cv_struct_dirent64=yes
11387 else
11388   echo "$as_me: failed program was:" >&5
11389 cat conftest.$ac_ext >&5
11390 cf_cv_struct_dirent64=no
11391 fi
11392 rm -f conftest.$ac_objext conftest.$ac_ext
11393
11394 fi
11395 echo "$as_me:11395: result: $cf_cv_struct_dirent64" >&5
11396 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11397         test "$cf_cv_struct_dirent64" = yes &&
11398 cat >>confdefs.h <<\EOF
11399 #define HAVE_STRUCT_DIRENT64 1
11400 EOF
11401
11402         fi
11403
11404 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11405 echo "$as_me:11405: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11406 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11407
11408 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11409 if test "${enable_tparm_varargs+set}" = set; then
11410   enableval="$enable_tparm_varargs"
11411   with_tparm_varargs=$enableval
11412 else
11413   with_tparm_varargs=yes
11414 fi;
11415 echo "$as_me:11415: result: $with_tparm_varargs" >&5
11416 echo "${ECHO_T}$with_tparm_varargs" >&6
11417 NCURSES_TPARM_VARARGS=0
11418 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11419
11420 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11421 if test "$with_ticlib" != no ; then
11422 echo "$as_me:11422: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11423 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11424
11425 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11426 if test "${enable_tic_depends+set}" = set; then
11427   enableval="$enable_tic_depends"
11428   with_tic_depends=$enableval
11429 else
11430   with_tic_depends=yes
11431 fi;
11432 echo "$as_me:11432: result: $with_tic_depends" >&5
11433 echo "${ECHO_T}$with_tic_depends" >&6
11434 else
11435         with_tic_depends=no
11436 fi
11437
11438 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11439 echo "$as_me:11439: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11440 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11441
11442 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11443 if test "${enable_wattr_macros+set}" = set; then
11444   enableval="$enable_wattr_macros"
11445   with_wattr_macros=$enableval
11446 else
11447   with_wattr_macros=yes
11448 fi;
11449 if [ "x$with_wattr_macros" != xyes ]; then
11450         NCURSES_WATTR_MACROS=0
11451         echo "$as_me:11451: result: yes" >&5
11452 echo "${ECHO_T}yes" >&6
11453 else
11454         NCURSES_WATTR_MACROS=1
11455         echo "$as_me:11455: result: no" >&5
11456 echo "${ECHO_T}no" >&6
11457 fi
11458
11459 echo "$as_me:11459: checking for X11 rgb file" >&5
11460 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
11461
11462 # Check whether --with-x11-rgb or --without-x11-rgb was given.
11463 if test "${with_x11_rgb+set}" = set; then
11464   withval="$with_x11_rgb"
11465   RGB_PATH=$withval
11466 else
11467   RGB_PATH=auto
11468 fi;
11469
11470 if test "x$RGB_PATH" = xauto
11471 then
11472         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
11473         for cf_path in \
11474                 /opt/local/share/X11/rgb.txt \
11475                 /opt/X11/share/X11/rgb.txt \
11476                 /usr/share/X11/rgb.txt \
11477                 /usr/X11/share/X11/rgb.txt \
11478                 /usr/X11/lib/X11/rgb.txt \
11479                 /usr/lib/X11/rgb.txt \
11480                 /etc/X11/rgb.txt \
11481                 /usr/pkg/lib/X11/rgb.txt \
11482                 /usr/X11R7/lib/X11/rgb.txt \
11483                 /usr/X11R6/lib/X11/rgb.txt \
11484                 /usr/X11R5/lib/X11/rgb.txt \
11485                 /usr/X11R4/lib/X11/rgb.txt \
11486                 /usr/local/lib/X11/rgb.txt \
11487                 /usr/local/share/X11/rgb.txt \
11488                 /usr/lib64/X11/rgb.txt
11489         do
11490                 if test -f "$cf_path" ; then
11491                         RGB_PATH="$cf_path"
11492                         break
11493                 fi
11494         done
11495 else
11496         cf_path=$RGB_PATH
11497
11498 if test "x$prefix" != xNONE; then
11499         cf_path_syntax="$prefix"
11500 else
11501         cf_path_syntax="$ac_default_prefix"
11502 fi
11503
11504 case ".$cf_path" in
11505 (.\$\(*\)*|.\'*\'*)
11506         ;;
11507 (..|./*|.\\*)
11508         ;;
11509 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11510         ;;
11511 (.\${*prefix}*|.\${*dir}*)
11512         eval cf_path="$cf_path"
11513         case ".$cf_path" in
11514         (.NONE/*)
11515                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11516                 ;;
11517         esac
11518         ;;
11519 (.no|.NONE/*)
11520         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11521         ;;
11522 (*)
11523         { { echo "$as_me:11523: error: expected a pathname, not \"$cf_path\"" >&5
11524 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
11525    { (exit 1); exit 1; }; }
11526         ;;
11527 esac
11528
11529 fi
11530
11531 echo "$as_me:11531: result: $RGB_PATH" >&5
11532 echo "${ECHO_T}$RGB_PATH" >&6
11533
11534 cat >>confdefs.h <<EOF
11535 #define RGB_PATH "$cf_path"
11536 EOF
11537
11538 no_x11_rgb=
11539 if test "$RGB_PATH" = no
11540 then
11541         no_x11_rgb="#"
11542 fi
11543
11544 ###   use option --with-bool to override bool's type
11545 echo "$as_me:11545: checking for type of bool" >&5
11546 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11547
11548 # Check whether --with-bool or --without-bool was given.
11549 if test "${with_bool+set}" = set; then
11550   withval="$with_bool"
11551   NCURSES_BOOL="$withval"
11552 else
11553   NCURSES_BOOL=auto
11554 fi;
11555 echo "$as_me:11555: result: $NCURSES_BOOL" >&5
11556 echo "${ECHO_T}$NCURSES_BOOL" >&6
11557
11558 echo "$as_me:11558: checking for alternate terminal capabilities file" >&5
11559 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11560
11561 # Check whether --with-caps or --without-caps was given.
11562 if test "${with_caps+set}" = set; then
11563   withval="$with_caps"
11564   TERMINFO_CAPS=Caps.$withval
11565 else
11566   TERMINFO_CAPS=Caps
11567 fi;
11568 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11569 echo "$as_me:11569: result: $TERMINFO_CAPS" >&5
11570 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11571
11572 ###   use option --with-chtype to override chtype's type
11573 echo "$as_me:11573: checking for type of chtype" >&5
11574 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11575
11576 # Check whether --with-chtype or --without-chtype was given.
11577 if test "${with_chtype+set}" = set; then
11578   withval="$with_chtype"
11579   NCURSES_CHTYPE="$withval"
11580 else
11581   NCURSES_CHTYPE=$cf_dft_chtype
11582 fi;
11583 echo "$as_me:11583: result: $NCURSES_CHTYPE" >&5
11584 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11585
11586 ###   use option --with-ospeed to override ospeed's type
11587 echo "$as_me:11587: checking for type of ospeed" >&5
11588 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11589
11590 # Check whether --with-ospeed or --without-ospeed was given.
11591 if test "${with_ospeed+set}" = set; then
11592   withval="$with_ospeed"
11593   NCURSES_OSPEED="$withval"
11594 else
11595   NCURSES_OSPEED=short
11596 fi;
11597 echo "$as_me:11597: result: $NCURSES_OSPEED" >&5
11598 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11599
11600 ###   use option --with-mmask-t to override mmask_t's type
11601 echo "$as_me:11601: checking for type of mmask_t" >&5
11602 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11603
11604 # Check whether --with-mmask-t or --without-mmask-t was given.
11605 if test "${with_mmask_t+set}" = set; then
11606   withval="$with_mmask_t"
11607   NCURSES_MMASK_T="$withval"
11608 else
11609   NCURSES_MMASK_T=$cf_dft_mmask_t
11610 fi;
11611 echo "$as_me:11611: result: $NCURSES_MMASK_T" >&5
11612 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11613
11614 ###   use option --with-ccharw-max to override CCHARW_MAX size
11615 echo "$as_me:11615: checking for size CCHARW_MAX" >&5
11616 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11617
11618 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11619 if test "${with_ccharw_max+set}" = set; then
11620   withval="$with_ccharw_max"
11621   NCURSES_CCHARW_MAX="$withval"
11622 else
11623   NCURSES_CCHARW_MAX=5
11624 fi;
11625 echo "$as_me:11625: result: $NCURSES_CCHARW_MAX" >&5
11626 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11627
11628 echo "$as_me:11628: checking for ANSI C header files" >&5
11629 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11630 if test "${ac_cv_header_stdc+set}" = set; then
11631   echo $ECHO_N "(cached) $ECHO_C" >&6
11632 else
11633   cat >conftest.$ac_ext <<_ACEOF
11634 #line 11634 "configure"
11635 #include "confdefs.h"
11636 #include <stdlib.h>
11637 #include <stdarg.h>
11638 #include <string.h>
11639 #include <float.h>
11640
11641 _ACEOF
11642 if { (eval echo "$as_me:11642: \"$ac_cpp conftest.$ac_ext\"") >&5
11643   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11644   ac_status=$?
11645   egrep -v '^ *\+' conftest.er1 >conftest.err
11646   rm -f conftest.er1
11647   cat conftest.err >&5
11648   echo "$as_me:11648: \$? = $ac_status" >&5
11649   (exit $ac_status); } >/dev/null; then
11650   if test -s conftest.err; then
11651     ac_cpp_err=$ac_c_preproc_warn_flag
11652   else
11653     ac_cpp_err=
11654   fi
11655 else
11656   ac_cpp_err=yes
11657 fi
11658 if test -z "$ac_cpp_err"; then
11659   ac_cv_header_stdc=yes
11660 else
11661   echo "$as_me: failed program was:" >&5
11662   cat conftest.$ac_ext >&5
11663   ac_cv_header_stdc=no
11664 fi
11665 rm -f conftest.err conftest.$ac_ext
11666
11667 if test $ac_cv_header_stdc = yes; then
11668   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11669   cat >conftest.$ac_ext <<_ACEOF
11670 #line 11670 "configure"
11671 #include "confdefs.h"
11672 #include <string.h>
11673
11674 _ACEOF
11675 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11676   egrep "memchr" >/dev/null 2>&1; then
11677   :
11678 else
11679   ac_cv_header_stdc=no
11680 fi
11681 rm -rf conftest*
11682
11683 fi
11684
11685 if test $ac_cv_header_stdc = yes; then
11686   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11687   cat >conftest.$ac_ext <<_ACEOF
11688 #line 11688 "configure"
11689 #include "confdefs.h"
11690 #include <stdlib.h>
11691
11692 _ACEOF
11693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11694   egrep "free" >/dev/null 2>&1; then
11695   :
11696 else
11697   ac_cv_header_stdc=no
11698 fi
11699 rm -rf conftest*
11700
11701 fi
11702
11703 if test $ac_cv_header_stdc = yes; then
11704   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11705   if test "$cross_compiling" = yes; then
11706   :
11707 else
11708   cat >conftest.$ac_ext <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711 #include <ctype.h>
11712 #if ((' ' & 0x0FF) == 0x020)
11713 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11714 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11715 #else
11716 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11717                      || ('j' <= (c) && (c) <= 'r') \
11718                      || ('s' <= (c) && (c) <= 'z'))
11719 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11720 #endif
11721
11722 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11723 int
11724 main (void)
11725 {
11726   int i;
11727   for (i = 0; i < 256; i++)
11728     if (XOR (islower (i), ISLOWER (i))
11729         || toupper (i) != TOUPPER (i))
11730       $ac_main_return(2);
11731   $ac_main_return (0);
11732 }
11733 _ACEOF
11734 rm -f conftest$ac_exeext
11735 if { (eval echo "$as_me:11735: \"$ac_link\"") >&5
11736   (eval $ac_link) 2>&5
11737   ac_status=$?
11738   echo "$as_me:11738: \$? = $ac_status" >&5
11739   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11740   { (eval echo "$as_me:11740: \"$ac_try\"") >&5
11741   (eval $ac_try) 2>&5
11742   ac_status=$?
11743   echo "$as_me:11743: \$? = $ac_status" >&5
11744   (exit $ac_status); }; }; then
11745   :
11746 else
11747   echo "$as_me: program exited with status $ac_status" >&5
11748 echo "$as_me: failed program was:" >&5
11749 cat conftest.$ac_ext >&5
11750 ac_cv_header_stdc=no
11751 fi
11752 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11753 fi
11754 fi
11755 fi
11756 echo "$as_me:11756: result: $ac_cv_header_stdc" >&5
11757 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11758 if test $ac_cv_header_stdc = yes; then
11759
11760 cat >>confdefs.h <<\EOF
11761 #define STDC_HEADERS 1
11762 EOF
11763
11764 fi
11765
11766 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11767
11768 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11769                   inttypes.h stdint.h unistd.h
11770 do
11771 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11772 echo "$as_me:11772: checking for $ac_header" >&5
11773 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11774 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11775   echo $ECHO_N "(cached) $ECHO_C" >&6
11776 else
11777   cat >conftest.$ac_ext <<_ACEOF
11778 #line 11778 "configure"
11779 #include "confdefs.h"
11780 $ac_includes_default
11781 #include <$ac_header>
11782 _ACEOF
11783 rm -f conftest.$ac_objext
11784 if { (eval echo "$as_me:11784: \"$ac_compile\"") >&5
11785   (eval $ac_compile) 2>&5
11786   ac_status=$?
11787   echo "$as_me:11787: \$? = $ac_status" >&5
11788   (exit $ac_status); } &&
11789          { ac_try='test -s conftest.$ac_objext'
11790   { (eval echo "$as_me:11790: \"$ac_try\"") >&5
11791   (eval $ac_try) 2>&5
11792   ac_status=$?
11793   echo "$as_me:11793: \$? = $ac_status" >&5
11794   (exit $ac_status); }; }; then
11795   eval "$as_ac_Header=yes"
11796 else
11797   echo "$as_me: failed program was:" >&5
11798 cat conftest.$ac_ext >&5
11799 eval "$as_ac_Header=no"
11800 fi
11801 rm -f conftest.$ac_objext conftest.$ac_ext
11802 fi
11803 echo "$as_me:11803: result: `eval echo '${'$as_ac_Header'}'`" >&5
11804 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11805 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11806   cat >>confdefs.h <<EOF
11807 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11808 EOF
11809
11810 fi
11811 done
11812
11813 echo "$as_me:11813: checking for signed char" >&5
11814 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11815 if test "${ac_cv_type_signed_char+set}" = set; then
11816   echo $ECHO_N "(cached) $ECHO_C" >&6
11817 else
11818   cat >conftest.$ac_ext <<_ACEOF
11819 #line 11819 "configure"
11820 #include "confdefs.h"
11821 $ac_includes_default
11822 int
11823 main (void)
11824 {
11825 if ((signed char *) 0)
11826   return 0;
11827 if (sizeof (signed char))
11828   return 0;
11829   ;
11830   return 0;
11831 }
11832 _ACEOF
11833 rm -f conftest.$ac_objext
11834 if { (eval echo "$as_me:11834: \"$ac_compile\"") >&5
11835   (eval $ac_compile) 2>&5
11836   ac_status=$?
11837   echo "$as_me:11837: \$? = $ac_status" >&5
11838   (exit $ac_status); } &&
11839          { ac_try='test -s conftest.$ac_objext'
11840   { (eval echo "$as_me:11840: \"$ac_try\"") >&5
11841   (eval $ac_try) 2>&5
11842   ac_status=$?
11843   echo "$as_me:11843: \$? = $ac_status" >&5
11844   (exit $ac_status); }; }; then
11845   ac_cv_type_signed_char=yes
11846 else
11847   echo "$as_me: failed program was:" >&5
11848 cat conftest.$ac_ext >&5
11849 ac_cv_type_signed_char=no
11850 fi
11851 rm -f conftest.$ac_objext conftest.$ac_ext
11852 fi
11853 echo "$as_me:11853: result: $ac_cv_type_signed_char" >&5
11854 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11855
11856 echo "$as_me:11856: checking size of signed char" >&5
11857 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11858 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11859   echo $ECHO_N "(cached) $ECHO_C" >&6
11860 else
11861   if test "$ac_cv_type_signed_char" = yes; then
11862   if test "$cross_compiling" = yes; then
11863   # Depending upon the size, compute the lo and hi bounds.
11864 cat >conftest.$ac_ext <<_ACEOF
11865 #line 11865 "configure"
11866 #include "confdefs.h"
11867 $ac_includes_default
11868 int
11869 main (void)
11870 {
11871 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11872   ;
11873   return 0;
11874 }
11875 _ACEOF
11876 rm -f conftest.$ac_objext
11877 if { (eval echo "$as_me:11877: \"$ac_compile\"") >&5
11878   (eval $ac_compile) 2>&5
11879   ac_status=$?
11880   echo "$as_me:11880: \$? = $ac_status" >&5
11881   (exit $ac_status); } &&
11882          { ac_try='test -s conftest.$ac_objext'
11883   { (eval echo "$as_me:11883: \"$ac_try\"") >&5
11884   (eval $ac_try) 2>&5
11885   ac_status=$?
11886   echo "$as_me:11886: \$? = $ac_status" >&5
11887   (exit $ac_status); }; }; then
11888   ac_lo=0 ac_mid=0
11889   while :; do
11890     cat >conftest.$ac_ext <<_ACEOF
11891 #line 11891 "configure"
11892 #include "confdefs.h"
11893 $ac_includes_default
11894 int
11895 main (void)
11896 {
11897 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11898   ;
11899   return 0;
11900 }
11901 _ACEOF
11902 rm -f conftest.$ac_objext
11903 if { (eval echo "$as_me:11903: \"$ac_compile\"") >&5
11904   (eval $ac_compile) 2>&5
11905   ac_status=$?
11906   echo "$as_me:11906: \$? = $ac_status" >&5
11907   (exit $ac_status); } &&
11908          { ac_try='test -s conftest.$ac_objext'
11909   { (eval echo "$as_me:11909: \"$ac_try\"") >&5
11910   (eval $ac_try) 2>&5
11911   ac_status=$?
11912   echo "$as_me:11912: \$? = $ac_status" >&5
11913   (exit $ac_status); }; }; then
11914   ac_hi=$ac_mid; break
11915 else
11916   echo "$as_me: failed program was:" >&5
11917 cat conftest.$ac_ext >&5
11918 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11919 fi
11920 rm -f conftest.$ac_objext conftest.$ac_ext
11921   done
11922 else
11923   echo "$as_me: failed program was:" >&5
11924 cat conftest.$ac_ext >&5
11925 ac_hi=-1 ac_mid=-1
11926   while :; do
11927     cat >conftest.$ac_ext <<_ACEOF
11928 #line 11928 "configure"
11929 #include "confdefs.h"
11930 $ac_includes_default
11931 int
11932 main (void)
11933 {
11934 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11935   ;
11936   return 0;
11937 }
11938 _ACEOF
11939 rm -f conftest.$ac_objext
11940 if { (eval echo "$as_me:11940: \"$ac_compile\"") >&5
11941   (eval $ac_compile) 2>&5
11942   ac_status=$?
11943   echo "$as_me:11943: \$? = $ac_status" >&5
11944   (exit $ac_status); } &&
11945          { ac_try='test -s conftest.$ac_objext'
11946   { (eval echo "$as_me:11946: \"$ac_try\"") >&5
11947   (eval $ac_try) 2>&5
11948   ac_status=$?
11949   echo "$as_me:11949: \$? = $ac_status" >&5
11950   (exit $ac_status); }; }; then
11951   ac_lo=$ac_mid; break
11952 else
11953   echo "$as_me: failed program was:" >&5
11954 cat conftest.$ac_ext >&5
11955 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11956 fi
11957 rm -f conftest.$ac_objext conftest.$ac_ext
11958   done
11959 fi
11960 rm -f conftest.$ac_objext conftest.$ac_ext
11961 # Binary search between lo and hi bounds.
11962 while test "x$ac_lo" != "x$ac_hi"; do
11963   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11964   cat >conftest.$ac_ext <<_ACEOF
11965 #line 11965 "configure"
11966 #include "confdefs.h"
11967 $ac_includes_default
11968 int
11969 main (void)
11970 {
11971 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11972   ;
11973   return 0;
11974 }
11975 _ACEOF
11976 rm -f conftest.$ac_objext
11977 if { (eval echo "$as_me:11977: \"$ac_compile\"") >&5
11978   (eval $ac_compile) 2>&5
11979   ac_status=$?
11980   echo "$as_me:11980: \$? = $ac_status" >&5
11981   (exit $ac_status); } &&
11982          { ac_try='test -s conftest.$ac_objext'
11983   { (eval echo "$as_me:11983: \"$ac_try\"") >&5
11984   (eval $ac_try) 2>&5
11985   ac_status=$?
11986   echo "$as_me:11986: \$? = $ac_status" >&5
11987   (exit $ac_status); }; }; then
11988   ac_hi=$ac_mid
11989 else
11990   echo "$as_me: failed program was:" >&5
11991 cat conftest.$ac_ext >&5
11992 ac_lo=`expr $ac_mid + 1`
11993 fi
11994 rm -f conftest.$ac_objext conftest.$ac_ext
11995 done
11996 ac_cv_sizeof_signed_char=$ac_lo
11997 else
11998   if test "$cross_compiling" = yes; then
11999   { { echo "$as_me:11999: error: cannot run test program while cross compiling" >&5
12000 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12001    { (exit 1); exit 1; }; }
12002 else
12003   cat >conftest.$ac_ext <<_ACEOF
12004 #line 12004 "configure"
12005 #include "confdefs.h"
12006 $ac_includes_default
12007 int
12008 main (void)
12009 {
12010 FILE *f = fopen ("conftest.val", "w");
12011 if (!f)
12012   $ac_main_return (1);
12013 fprintf (f, "%d", (sizeof (signed char)));
12014 fclose (f);
12015   ;
12016   return 0;
12017 }
12018 _ACEOF
12019 rm -f conftest$ac_exeext
12020 if { (eval echo "$as_me:12020: \"$ac_link\"") >&5
12021   (eval $ac_link) 2>&5
12022   ac_status=$?
12023   echo "$as_me:12023: \$? = $ac_status" >&5
12024   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12025   { (eval echo "$as_me:12025: \"$ac_try\"") >&5
12026   (eval $ac_try) 2>&5
12027   ac_status=$?
12028   echo "$as_me:12028: \$? = $ac_status" >&5
12029   (exit $ac_status); }; }; then
12030   ac_cv_sizeof_signed_char=`cat conftest.val`
12031 else
12032   echo "$as_me: program exited with status $ac_status" >&5
12033 echo "$as_me: failed program was:" >&5
12034 cat conftest.$ac_ext >&5
12035 fi
12036 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12037 fi
12038 fi
12039 rm -f conftest.val
12040 else
12041   ac_cv_sizeof_signed_char=0
12042 fi
12043 fi
12044 echo "$as_me:12044: result: $ac_cv_sizeof_signed_char" >&5
12045 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12046 cat >>confdefs.h <<EOF
12047 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12048 EOF
12049
12050 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12051         NCURSES_SBOOL="signed char"
12052 else
12053         NCURSES_SBOOL="char"
12054 fi
12055 echo "$as_me:12055: checking if you want to use signed Boolean array in term.h" >&5
12056 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12057
12058 # Check whether --enable-signed-char or --disable-signed-char was given.
12059 if test "${enable_signed_char+set}" = set; then
12060   enableval="$enable_signed_char"
12061   with_signed_char=$enableval
12062 else
12063   with_signed_char=no
12064 fi;
12065 echo "$as_me:12065: result: $with_signed_char" >&5
12066 echo "${ECHO_T}$with_signed_char" >&6
12067 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12068
12069 ###   use option --with-tparm-arg to override tparm's argument type
12070 echo "$as_me:12070: checking for type of tparm args" >&5
12071 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
12072
12073 # Check whether --with-tparm-arg or --without-tparm-arg was given.
12074 if test "${with_tparm_arg+set}" = set; then
12075   withval="$with_tparm_arg"
12076   NCURSES_TPARM_ARG="$withval"
12077 else
12078   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
12079 fi;
12080 echo "$as_me:12080: result: $NCURSES_TPARM_ARG" >&5
12081 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
12082
12083 ### Enable compiling-in rcs id's
12084 echo "$as_me:12084: checking if RCS identifiers should be compiled-in" >&5
12085 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
12086
12087 # Check whether --with-rcs-ids or --without-rcs-ids was given.
12088 if test "${with_rcs_ids+set}" = set; then
12089   withval="$with_rcs_ids"
12090   with_rcs_ids=$withval
12091 else
12092   with_rcs_ids=no
12093 fi;
12094 echo "$as_me:12094: result: $with_rcs_ids" >&5
12095 echo "${ECHO_T}$with_rcs_ids" >&6
12096 test "x$with_rcs_ids" = xyes &&
12097 cat >>confdefs.h <<\EOF
12098 #define USE_RCS_IDS 1
12099 EOF
12100
12101 ###############################################################################
12102
12103 echo "$as_me:12103: checking format of man-pages" >&5
12104 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
12105
12106 # Check whether --with-manpage-format or --without-manpage-format was given.
12107 if test "${with_manpage_format+set}" = set; then
12108   withval="$with_manpage_format"
12109   MANPAGE_FORMAT=$withval
12110 else
12111   MANPAGE_FORMAT=unknown
12112 fi;
12113
12114 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
12115 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
12116
12117 cf_unknown=
12118
12119 case $MANPAGE_FORMAT in
12120 (unknown)
12121         if test -z "$MANPATH" ; then
12122                 MANPATH="/usr/man:/usr/share/man"
12123         fi
12124
12125         # look for the 'date' man-page (it's most likely to be installed!)
12126         MANPAGE_FORMAT=
12127         cf_preform=no
12128         cf_catonly=yes
12129         cf_example=date
12130
12131         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
12132         for cf_dir in $MANPATH; do
12133                 test -z "$cf_dir" && cf_dir=/usr/man
12134                 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
12135                 do
12136                         cf_test=`echo $cf_name | sed -e 's/*//'`
12137                         if test "x$cf_test" = "x$cf_name" ; then
12138
12139                                 case "$cf_name" in
12140                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
12141                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
12142                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
12143                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
12144                                 esac
12145
12146                                 case "$cf_name" in
12147                                 ($cf_dir/man*)
12148                                         cf_catonly=no
12149                                         ;;
12150                                 ($cf_dir/cat*)
12151                                         cf_preform=yes
12152                                         ;;
12153                                 esac
12154                                 break
12155                         fi
12156
12157                         # if we found a match in either man* or cat*, stop looking
12158                         if test -n "$MANPAGE_FORMAT" ; then
12159                                 cf_found=no
12160                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
12161                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
12162                                 case "$cf_name" in
12163                                 ($cf_dir/cat*)
12164                                         cf_found=yes
12165                                         ;;
12166                                 esac
12167                                 test $cf_found=yes && break
12168                         fi
12169                 done
12170                 # only check the first directory in $MANPATH where we find manpages
12171                 if test -n "$MANPAGE_FORMAT" ; then
12172                         break
12173                 fi
12174         done
12175         # if we did not find the example, just assume it is normal
12176         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
12177         IFS="$ac_save_ifs"
12178         ;;
12179 (*)
12180         for cf_option in $MANPAGE_FORMAT; do
12181         case $cf_option in
12182         (gzip|compress|BSDI|normal|formatted|catonly)
12183                 ;;
12184         (*)
12185                 cf_unknown="$cf_unknown $cf_option"
12186                 ;;
12187         esac
12188         done
12189         ;;
12190 esac
12191
12192 echo "$as_me:12192: result: $MANPAGE_FORMAT" >&5
12193 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
12194 if test -n "$cf_unknown" ; then
12195         { echo "$as_me:12195: WARNING: Unexpected manpage-format $cf_unknown" >&5
12196 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
12197 fi
12198
12199 echo "$as_me:12199: checking for manpage renaming" >&5
12200 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
12201
12202 # Check whether --with-manpage-renames or --without-manpage-renames was given.
12203 if test "${with_manpage_renames+set}" = set; then
12204   withval="$with_manpage_renames"
12205   MANPAGE_RENAMES=$withval
12206 else
12207   MANPAGE_RENAMES=yes
12208 fi;
12209
12210 case ".$MANPAGE_RENAMES" in
12211 (.no)
12212         ;;
12213 (.|.yes)
12214         # Debian 'man' program?
12215         if test -f /etc/debian_version ; then
12216                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
12217         else
12218                 MANPAGE_RENAMES=no
12219         fi
12220         ;;
12221 esac
12222
12223 if test "$MANPAGE_RENAMES" != no ; then
12224         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
12225                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
12226         elif test ! -f $MANPAGE_RENAMES ; then
12227                 { { echo "$as_me:12227: error: not a filename: $MANPAGE_RENAMES" >&5
12228 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
12229    { (exit 1); exit 1; }; }
12230         fi
12231
12232         test ! -d man && mkdir man
12233
12234         # Construct a sed-script to perform renaming within man-pages
12235         if test -n "$MANPAGE_RENAMES" ; then
12236                 test ! -d man && mkdir man
12237                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
12238         fi
12239 fi
12240
12241 echo "$as_me:12241: result: $MANPAGE_RENAMES" >&5
12242 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
12243
12244 echo "$as_me:12244: checking if manpage aliases will be installed" >&5
12245 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
12246
12247 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
12248 if test "${with_manpage_aliases+set}" = set; then
12249   withval="$with_manpage_aliases"
12250   MANPAGE_ALIASES=$withval
12251 else
12252   MANPAGE_ALIASES=yes
12253 fi;
12254
12255 echo "$as_me:12255: result: $MANPAGE_ALIASES" >&5
12256 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
12257
12258 case "x$LN_S" in
12259 (xln*)
12260         cf_use_symlinks=yes
12261         ;;
12262 (*)
12263         cf_use_symlinks=no
12264         ;;
12265 esac
12266
12267 MANPAGE_SYMLINKS=no
12268 if test "$MANPAGE_ALIASES" = yes ; then
12269 echo "$as_me:12269: checking if manpage symlinks should be used" >&5
12270 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
12271
12272 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
12273 if test "${with_manpage_symlinks+set}" = set; then
12274   withval="$with_manpage_symlinks"
12275   MANPAGE_SYMLINKS=$withval
12276 else
12277   MANPAGE_SYMLINKS=$cf_use_symlinks
12278 fi;
12279
12280 if test "$$cf_use_symlinks" = no; then
12281 if test "$MANPAGE_SYMLINKS" = yes ; then
12282         { echo "$as_me:12282: WARNING: cannot make symlinks" >&5
12283 echo "$as_me: WARNING: cannot make symlinks" >&2;}
12284         MANPAGE_SYMLINKS=no
12285 fi
12286 fi
12287
12288 echo "$as_me:12288: result: $MANPAGE_SYMLINKS" >&5
12289 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
12290 fi
12291
12292 echo "$as_me:12292: checking for manpage tbl" >&5
12293 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
12294
12295 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
12296 if test "${with_manpage_tbl+set}" = set; then
12297   withval="$with_manpage_tbl"
12298   MANPAGE_TBL=$withval
12299 else
12300   MANPAGE_TBL=no
12301 fi;
12302
12303 echo "$as_me:12303: result: $MANPAGE_TBL" >&5
12304 echo "${ECHO_T}$MANPAGE_TBL" >&6
12305
12306 if test "$prefix" = "NONE" ; then
12307         cf_prefix="$ac_default_prefix"
12308 else
12309         cf_prefix="$prefix"
12310 fi
12311
12312 case "$MANPAGE_FORMAT" in
12313 (*catonly*)
12314         cf_format=yes
12315         cf_inboth=no
12316         ;;
12317 (*formatted*)
12318         cf_format=yes
12319         cf_inboth=yes
12320         ;;
12321 (*)
12322         cf_format=no
12323         cf_inboth=no
12324         ;;
12325 esac
12326
12327 test ! -d man && mkdir man
12328
12329 cf_so_strip=
12330 cf_compress=
12331 case "$MANPAGE_FORMAT" in
12332 (*compress*)
12333         cf_so_strip="Z"
12334         cf_compress=compress
12335         ;;
12336 (*gzip*)
12337         cf_so_strip="gz"
12338         cf_compress=gzip
12339         ;;
12340 esac
12341
12342 cf_edit_man=./edit_man.sh
12343 cf_man_alias=`pwd`/man_alias.sed
12344
12345 cat >$cf_edit_man <<CF_EOF
12346 #! $SHELL
12347 # this script is generated by the configure-script CF_MAN_PAGES macro.
12348
12349 prefix="$cf_prefix"
12350 datarootdir="$datarootdir"
12351 datadir="$datadir"
12352
12353 NCURSES_MAJOR="$NCURSES_MAJOR"
12354 NCURSES_MINOR="$NCURSES_MINOR"
12355 NCURSES_PATCH="$NCURSES_PATCH"
12356
12357 NCURSES_OSPEED="$NCURSES_OSPEED"
12358 TERMINFO="$TERMINFO"
12359
12360 INSTALL="$INSTALL"
12361 INSTALL_DATA="$INSTALL_DATA"
12362
12363 transform="$program_transform_name"
12364
12365 TMP=\${TMPDIR:=/tmp}/man\$\$
12366 trap "rm -f \$TMP" 0 1 2 3 15
12367
12368 form=\$1
12369 shift || exit 1
12370
12371 verb=\$1
12372 shift || exit 1
12373
12374 mandir=\$1
12375 shift || exit 1
12376
12377 srcdir=\$1
12378 top_srcdir=\$srcdir/..
12379 shift || exit 1
12380
12381 if test "\$form" = normal ; then
12382         if test "$cf_format" = yes ; then
12383         if test "$cf_inboth" = no ; then
12384                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12385                 exit $?
12386         fi
12387         fi
12388         cf_subdir=\$mandir/man
12389         cf_tables=$MANPAGE_TBL
12390 else
12391         cf_subdir=\$mandir/cat
12392         cf_tables=yes
12393 fi
12394
12395 # process the list of source-files
12396 for i in \$* ; do
12397 case \$i in
12398 (*.orig|*.rej) ;;
12399 (*.[0-9]*)
12400         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
12401         if test \$verb = installing ; then
12402         if test ! -d \$cf_subdir\${section} ; then
12403                 mkdir -p \$cf_subdir\$section
12404         fi
12405         fi
12406
12407         # replace variables in man page
12408         if test ! -f $cf_man_alias ; then
12409 cat >>$cf_man_alias <<-CF_EOF2
12410                 s,@DATADIR@,\$datadir,g
12411                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
12412                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
12413                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
12414                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
12415                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
12416                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
12417 CF_EOF
12418
12419         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
12420         do
12421                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12422                 cf_name=`echo $cf_name|sed "$program_transform_name"`
12423 cat >>$cf_edit_man <<-CF_EOF
12424                 s,@$cf_NAME@,$cf_name,g
12425 CF_EOF
12426         done
12427
12428 cat >>$cf_edit_man <<CF_EOF
12429 CF_EOF2
12430                 echo "...made $cf_man_alias"
12431         fi
12432
12433         aliases=
12434         cf_source=\`basename \$i\`
12435         inalias=\$cf_source
12436         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
12437         if test ! -f \$inalias ; then
12438                 echo .. skipped \$cf_source
12439                 continue
12440         fi
12441 CF_EOF
12442
12443 if test "$MANPAGE_ALIASES" != no ; then
12444 cat >>$cf_edit_man <<CF_EOF
12445         nCurses=ignore.3x
12446         test $with_curses_h = yes && nCurses=ncurses.3x
12447         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
12448 CF_EOF
12449 fi
12450
12451 if test "$MANPAGE_RENAMES" = no ; then
12452 cat >>$cf_edit_man <<CF_EOF
12453         # perform program transformations for section 1 man pages
12454         if test \$section = 1 ; then
12455                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
12456         else
12457                 cf_target=\$cf_subdir\${section}/\$cf_source
12458         fi
12459 CF_EOF
12460 else
12461 cat >>$cf_edit_man <<CF_EOF
12462         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
12463         if test -z "\$cf_target" ; then
12464                 echo '? missing rename for '\$cf_source
12465                 cf_target="\$cf_source"
12466         fi
12467         cf_target="\$cf_subdir\${section}/\${cf_target}"
12468
12469 CF_EOF
12470 fi
12471
12472 cat >>$cf_edit_man <<CF_EOF
12473         sed     -f $cf_man_alias \\
12474 CF_EOF
12475
12476 if test -f $MANPAGE_RENAMES ; then
12477 cat >>$cf_edit_man <<CF_EOF
12478                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
12479 CF_EOF
12480 else
12481 cat >>$cf_edit_man <<CF_EOF
12482                 < \$i >\$TMP
12483 CF_EOF
12484 fi
12485
12486 cat >>$cf_edit_man <<CF_EOF
12487 if test \$cf_tables = yes ; then
12488         tbl \$TMP >\$TMP.out
12489         mv \$TMP.out \$TMP
12490 fi
12491 CF_EOF
12492
12493 if test $with_overwrite != yes ; then
12494 cat >>$cf_edit_man <<CF_EOF
12495         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
12496         mv \$TMP.out \$TMP
12497 CF_EOF
12498 fi
12499
12500 if test $with_curses_h != yes ; then
12501 cat >>$cf_edit_man <<CF_EOF
12502         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
12503         mv \$TMP.out \$TMP
12504 CF_EOF
12505 fi
12506
12507 cat >>$cf_edit_man <<CF_EOF
12508         if test \$form = format ; then
12509                 nroff -man \$TMP >\$TMP.out
12510                 mv \$TMP.out \$TMP
12511         fi
12512 CF_EOF
12513
12514 if test -n "$cf_compress" ; then
12515 cat >>$cf_edit_man <<CF_EOF
12516         if test \$verb = installing ; then
12517         if ( $cf_compress -f \$TMP )
12518         then
12519                 mv \$TMP.$cf_so_strip \$TMP
12520         fi
12521         fi
12522         cf_target="\$cf_target.$cf_so_strip"
12523 CF_EOF
12524 fi
12525
12526 case "$MANPAGE_FORMAT" in
12527 (*BSDI*)
12528 cat >>$cf_edit_man <<CF_EOF
12529         if test \$form = format ; then
12530                 # BSDI installs only .0 suffixes in the cat directories
12531                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
12532         fi
12533 CF_EOF
12534   ;;
12535 esac
12536
12537 cat >>$cf_edit_man <<CF_EOF
12538         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
12539         if test \$verb = installing ; then
12540                 echo \$verb \$cf_target
12541                 \$INSTALL_DATA \$TMP \$cf_target
12542                 test -d \$cf_subdir\${section} &&
12543                 test -n "\$aliases" && (
12544                         cd \$cf_subdir\${section} && (
12545                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
12546                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
12547                                 cf_target=\`basename \$cf_target\`
12548                                 for cf_alias in \$aliases
12549                                 do
12550                                         if test \$section = 1 ; then
12551                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12552                                         fi
12553
12554                                         if test "$MANPAGE_SYMLINKS" = yes ; then
12555                                                 if test -f \$cf_alias\${suffix} ; then
12556                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
12557                                                         then
12558                                                                 continue
12559                                                         fi
12560                                                 fi
12561                                                 echo .. \$verb alias \$cf_alias\${suffix}
12562 CF_EOF
12563 case "x$LN_S" in
12564 (*-f)
12565 cat >>$cf_edit_man <<CF_EOF
12566                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12567 CF_EOF
12568         ;;
12569 (*)
12570 cat >>$cf_edit_man <<CF_EOF
12571                                                 rm -f \$cf_alias\${suffix}
12572                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12573 CF_EOF
12574         ;;
12575 esac
12576 cat >>$cf_edit_man <<CF_EOF
12577                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12578                                                 echo ".so \$cf_source" >\$TMP
12579 CF_EOF
12580 if test -n "$cf_compress" ; then
12581 cat >>$cf_edit_man <<CF_EOF
12582                                                 if test -n "$cf_so_strip" ; then
12583                                                         $cf_compress -f \$TMP
12584                                                         mv \$TMP.$cf_so_strip \$TMP
12585                                                 fi
12586 CF_EOF
12587 fi
12588 cat >>$cf_edit_man <<CF_EOF
12589                                                 echo .. \$verb alias \$cf_alias\${suffix}
12590                                                 rm -f \$cf_alias\${suffix}
12591                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12592                                         fi
12593                                 done
12594                         )
12595                 )
12596         elif test \$verb = removing ; then
12597                 test -f \$cf_target && (
12598                         echo \$verb \$cf_target
12599                         rm -f \$cf_target
12600                 )
12601                 test -d \$cf_subdir\${section} &&
12602                 test -n "\$aliases" && (
12603                         cd \$cf_subdir\${section} && (
12604                                 for cf_alias in \$aliases
12605                                 do
12606                                         if test \$section = 1 ; then
12607                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12608                                         fi
12609
12610                                         echo .. \$verb alias \$cf_alias\${suffix}
12611                                         rm -f \$cf_alias\${suffix}
12612                                 done
12613                         )
12614                 )
12615         else
12616 #               echo ".hy 0"
12617                 cat \$TMP
12618         fi
12619         ;;
12620 esac
12621 done
12622
12623 if test $cf_inboth = yes ; then
12624 if test \$form != format ; then
12625         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12626 fi
12627 fi
12628
12629 exit 0
12630 CF_EOF
12631 chmod 755 $cf_edit_man
12632
12633 ###############################################################################
12634
12635 ### Note that some functions (such as const) are normally disabled anyway.
12636 echo "$as_me:12636: checking if you want to build with function extensions" >&5
12637 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12638
12639 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12640 if test "${enable_ext_funcs+set}" = set; then
12641   enableval="$enable_ext_funcs"
12642   with_ext_funcs=$enableval
12643 else
12644   with_ext_funcs=yes
12645 fi;
12646 echo "$as_me:12646: result: $with_ext_funcs" >&5
12647 echo "${ECHO_T}$with_ext_funcs" >&6
12648 if test "x$with_ext_funcs" = xyes ; then
12649         NCURSES_EXT_FUNCS=1
12650
12651 cat >>confdefs.h <<\EOF
12652 #define NCURSES_EXT_FUNCS 1
12653 EOF
12654
12655 cat >>confdefs.h <<\EOF
12656 #define HAVE_ASSUME_DEFAULT_COLORS 1
12657 EOF
12658
12659 cat >>confdefs.h <<\EOF
12660 #define HAVE_CURSES_VERSION 1
12661 EOF
12662
12663 cat >>confdefs.h <<\EOF
12664 #define HAVE_HAS_KEY 1
12665 EOF
12666
12667 cat >>confdefs.h <<\EOF
12668 #define HAVE_RESIZETERM 1
12669 EOF
12670
12671 cat >>confdefs.h <<\EOF
12672 #define HAVE_RESIZE_TERM 1
12673 EOF
12674
12675 cat >>confdefs.h <<\EOF
12676 #define HAVE_TERM_ENTRY_H 1
12677 EOF
12678
12679 cat >>confdefs.h <<\EOF
12680 #define HAVE_USE_DEFAULT_COLORS 1
12681 EOF
12682
12683 cat >>confdefs.h <<\EOF
12684 #define HAVE_USE_EXTENDED_NAMES 1
12685 EOF
12686
12687 cat >>confdefs.h <<\EOF
12688 #define HAVE_USE_SCREEN 1
12689 EOF
12690
12691 cat >>confdefs.h <<\EOF
12692 #define HAVE_USE_WINDOW 1
12693 EOF
12694
12695 cat >>confdefs.h <<\EOF
12696 #define HAVE_WRESIZE 1
12697 EOF
12698
12699         GENERATED_EXT_FUNCS=generated
12700         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12701 else
12702         NCURSES_EXT_FUNCS=0
12703         GENERATED_EXT_FUNCS=
12704 fi
12705
12706 echo "$as_me:12706: checking if you want to build with SCREEN extensions" >&5
12707 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12708
12709 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12710 if test "${enable_sp_funcs+set}" = set; then
12711   enableval="$enable_sp_funcs"
12712   with_sp_funcs=$enableval
12713 else
12714   with_sp_funcs=$cf_dft_ext_spfuncs
12715 fi;
12716 echo "$as_me:12716: result: $with_sp_funcs" >&5
12717 echo "${ECHO_T}$with_sp_funcs" >&6
12718 if test "x$with_sp_funcs" = xyes ; then
12719         NCURSES_SP_FUNCS=1
12720
12721 cat >>confdefs.h <<\EOF
12722 #define NCURSES_SP_FUNCS 1
12723 EOF
12724
12725 cat >>confdefs.h <<\EOF
12726 #define HAVE_TPUTS_SP 1
12727 EOF
12728
12729         GENERATED_SP_FUNCS=generated
12730 else
12731         NCURSES_SP_FUNCS=0
12732         GENERATED_SP_FUNCS=
12733 fi
12734
12735 echo "$as_me:12735: checking if you want to build with terminal-driver" >&5
12736 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12737
12738 # Check whether --enable-term-driver or --disable-term-driver was given.
12739 if test "${enable_term_driver+set}" = set; then
12740   enableval="$enable_term_driver"
12741   with_term_driver=$enableval
12742 else
12743   with_term_driver=no
12744 fi;
12745 echo "$as_me:12745: result: $with_term_driver" >&5
12746 echo "${ECHO_T}$with_term_driver" >&6
12747 if test "x$with_term_driver" = xyes ; then
12748
12749 cat >>confdefs.h <<\EOF
12750 #define USE_TERM_DRIVER 1
12751 EOF
12752
12753         if test "x$with_termlib" != xno ; then
12754                 { { echo "$as_me:12754: error: The term-driver option conflicts with the termlib option" >&5
12755 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12756    { (exit 1); exit 1; }; }
12757         fi
12758         if test "x$with_sp_funcs" != xyes ; then
12759                 { { echo "$as_me:12759: error: The term-driver option relies upon sp-funcs" >&5
12760 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12761    { (exit 1); exit 1; }; }
12762         fi
12763 fi
12764
12765 ###   use option --enable-const to turn on use of const beyond that in XSI.
12766 echo "$as_me:12766: checking for extended use of const keyword" >&5
12767 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12768
12769 # Check whether --enable-const or --disable-const was given.
12770 if test "${enable_const+set}" = set; then
12771   enableval="$enable_const"
12772   with_ext_const=$enableval
12773 else
12774   with_ext_const=$cf_dft_ext_const
12775 fi;
12776 echo "$as_me:12776: result: $with_ext_const" >&5
12777 echo "${ECHO_T}$with_ext_const" >&6
12778 NCURSES_CONST='/*nothing*/'
12779 if test "x$with_ext_const" = xyes ; then
12780         NCURSES_CONST=const
12781 fi
12782
12783 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12784 echo "$as_me:12784: checking if you want to use extended colors" >&5
12785 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12786
12787 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12788 if test "${enable_ext_colors+set}" = set; then
12789   enableval="$enable_ext_colors"
12790   with_ext_colors=$enableval
12791 else
12792   with_ext_colors=$cf_dft_ext_colors
12793 fi;
12794 echo "$as_me:12794: result: $with_ext_colors" >&5
12795 echo "${ECHO_T}$with_ext_colors" >&6
12796 NCURSES_EXT_COLORS=0
12797 if test "x$with_ext_colors" = xyes ; then
12798         if test "x$with_widec" != xyes ; then
12799                 { echo "$as_me:12799: WARNING: This option applies only to wide-character library" >&5
12800 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12801         else
12802                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12803
12804 if test "${with_abi_version+set}" != set; then
12805         case $cf_cv_rel_version in
12806         (5.*)
12807                 cf_cv_rel_version=6.0
12808                 cf_cv_abi_version=6
12809                 { echo "$as_me:12809: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12810 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12811                 ;;
12812         esac
12813 fi
12814
12815                 NCURSES_EXT_COLORS=1
12816
12817 cat >>confdefs.h <<\EOF
12818 #define NCURSES_EXT_COLORS 1
12819 EOF
12820
12821 cat >>confdefs.h <<\EOF
12822 #define HAVE_ALLOC_PAIR 1
12823 EOF
12824
12825 cat >>confdefs.h <<\EOF
12826 #define HAVE_INIT_EXTENDED_COLOR 1
12827 EOF
12828
12829 cat >>confdefs.h <<\EOF
12830 #define HAVE_RESET_COLOR_PAIRS 1
12831 EOF
12832
12833         fi
12834 fi
12835
12836 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12837 echo "$as_me:12837: checking if you want to use extended mouse encoding" >&5
12838 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12839
12840 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12841 if test "${enable_ext_mouse+set}" = set; then
12842   enableval="$enable_ext_mouse"
12843   with_ext_mouse=$enableval
12844 else
12845   with_ext_mouse=$cf_dft_ext_mouse
12846 fi;
12847 echo "$as_me:12847: result: $with_ext_mouse" >&5
12848 echo "${ECHO_T}$with_ext_mouse" >&6
12849 NCURSES_MOUSE_VERSION=1
12850 if test "x$with_ext_mouse" = xyes ; then
12851         NCURSES_MOUSE_VERSION=2
12852
12853 if test "${with_abi_version+set}" != set; then
12854         case $cf_cv_rel_version in
12855         (5.*)
12856                 cf_cv_rel_version=6.0
12857                 cf_cv_abi_version=6
12858                 { echo "$as_me:12858: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12859 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12860                 ;;
12861         esac
12862 fi
12863
12864 fi
12865
12866 ###   use option --enable-ext-putwin to turn on extended screendumps
12867 echo "$as_me:12867: checking if you want to use extended putwin/screendump" >&5
12868 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12869
12870 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12871 if test "${enable_ext_putwin+set}" = set; then
12872   enableval="$enable_ext_putwin"
12873   with_ext_putwin=$enableval
12874 else
12875   with_ext_putwin=$cf_dft_ext_putwin
12876 fi;
12877 echo "$as_me:12877: result: $with_ext_putwin" >&5
12878 echo "${ECHO_T}$with_ext_putwin" >&6
12879 if test "x$with_ext_putwin" = xyes ; then
12880
12881 cat >>confdefs.h <<\EOF
12882 #define NCURSES_EXT_PUTWIN 1
12883 EOF
12884
12885 fi
12886
12887 echo "$as_me:12887: checking if you want \$NCURSES_NO_PADDING code" >&5
12888 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12889
12890 # Check whether --enable-no-padding or --disable-no-padding was given.
12891 if test "${enable_no_padding+set}" = set; then
12892   enableval="$enable_no_padding"
12893   with_no_padding=$enableval
12894 else
12895   with_no_padding=$with_ext_funcs
12896 fi;
12897 echo "$as_me:12897: result: $with_no_padding" >&5
12898 echo "${ECHO_T}$with_no_padding" >&6
12899 test "x$with_no_padding" = xyes &&
12900 cat >>confdefs.h <<\EOF
12901 #define NCURSES_NO_PADDING 1
12902 EOF
12903
12904 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12905 echo "$as_me:12905: checking if you want SIGWINCH handler" >&5
12906 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12907
12908 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12909 if test "${enable_sigwinch+set}" = set; then
12910   enableval="$enable_sigwinch"
12911   with_sigwinch=$enableval
12912 else
12913   with_sigwinch=$with_ext_funcs
12914 fi;
12915 echo "$as_me:12915: result: $with_sigwinch" >&5
12916 echo "${ECHO_T}$with_sigwinch" >&6
12917 test "x$with_sigwinch" = xyes &&
12918 cat >>confdefs.h <<\EOF
12919 #define USE_SIGWINCH 1
12920 EOF
12921
12922 ###   use option --enable-tcap-names to allow user to define new capabilities
12923 echo "$as_me:12923: checking if you want user-definable terminal capabilities like termcap" >&5
12924 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12925
12926 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12927 if test "${enable_tcap_names+set}" = set; then
12928   enableval="$enable_tcap_names"
12929   with_tcap_names=$enableval
12930 else
12931   with_tcap_names=$with_ext_funcs
12932 fi;
12933 echo "$as_me:12933: result: $with_tcap_names" >&5
12934 echo "${ECHO_T}$with_tcap_names" >&6
12935 NCURSES_XNAMES=0
12936 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12937
12938 ##############################################################################
12939
12940 echo "$as_me:12940: checking if you want to link with the pthread library" >&5
12941 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12942
12943 # Check whether --with-pthread or --without-pthread was given.
12944 if test "${with_pthread+set}" = set; then
12945   withval="$with_pthread"
12946   with_pthread=$withval
12947 else
12948   with_pthread=no
12949 fi;
12950 echo "$as_me:12950: result: $with_pthread" >&5
12951 echo "${ECHO_T}$with_pthread" >&6
12952
12953 if test "$with_pthread" != no ; then
12954         echo "$as_me:12954: checking for pthread.h" >&5
12955 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12956 if test "${ac_cv_header_pthread_h+set}" = set; then
12957   echo $ECHO_N "(cached) $ECHO_C" >&6
12958 else
12959   cat >conftest.$ac_ext <<_ACEOF
12960 #line 12960 "configure"
12961 #include "confdefs.h"
12962 #include <pthread.h>
12963 _ACEOF
12964 if { (eval echo "$as_me:12964: \"$ac_cpp conftest.$ac_ext\"") >&5
12965   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12966   ac_status=$?
12967   egrep -v '^ *\+' conftest.er1 >conftest.err
12968   rm -f conftest.er1
12969   cat conftest.err >&5
12970   echo "$as_me:12970: \$? = $ac_status" >&5
12971   (exit $ac_status); } >/dev/null; then
12972   if test -s conftest.err; then
12973     ac_cpp_err=$ac_c_preproc_warn_flag
12974   else
12975     ac_cpp_err=
12976   fi
12977 else
12978   ac_cpp_err=yes
12979 fi
12980 if test -z "$ac_cpp_err"; then
12981   ac_cv_header_pthread_h=yes
12982 else
12983   echo "$as_me: failed program was:" >&5
12984   cat conftest.$ac_ext >&5
12985   ac_cv_header_pthread_h=no
12986 fi
12987 rm -f conftest.err conftest.$ac_ext
12988 fi
12989 echo "$as_me:12989: result: $ac_cv_header_pthread_h" >&5
12990 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12991 if test $ac_cv_header_pthread_h = yes; then
12992
12993 cat >>confdefs.h <<\EOF
12994 #define HAVE_PTHREADS_H 1
12995 EOF
12996
12997         for cf_lib_pthread in pthread c_r
12998         do
12999             echo "$as_me:12999: checking if we can link with the $cf_lib_pthread library" >&5
13000 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13001             cf_save_LIBS="$LIBS"
13002
13003 cf_add_libs="-l$cf_lib_pthread"
13004 # Filter out duplicates - this happens with badly-designed ".pc" files...
13005 for cf_add_1lib in $LIBS
13006 do
13007         for cf_add_2lib in $cf_add_libs
13008         do
13009                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13010                 then
13011                         cf_add_1lib=
13012                         break
13013                 fi
13014         done
13015         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13016 done
13017 LIBS="$cf_add_libs"
13018
13019             cat >conftest.$ac_ext <<_ACEOF
13020 #line 13020 "configure"
13021 #include "confdefs.h"
13022
13023 #include <pthread.h>
13024
13025 int
13026 main (void)
13027 {
13028
13029                 int rc = pthread_create(0,0,0,0);
13030                 int r2 = pthread_mutexattr_settype(0, 0);
13031
13032   ;
13033   return 0;
13034 }
13035 _ACEOF
13036 rm -f conftest.$ac_objext conftest$ac_exeext
13037 if { (eval echo "$as_me:13037: \"$ac_link\"") >&5
13038   (eval $ac_link) 2>&5
13039   ac_status=$?
13040   echo "$as_me:13040: \$? = $ac_status" >&5
13041   (exit $ac_status); } &&
13042          { ac_try='test -s conftest$ac_exeext'
13043   { (eval echo "$as_me:13043: \"$ac_try\"") >&5
13044   (eval $ac_try) 2>&5
13045   ac_status=$?
13046   echo "$as_me:13046: \$? = $ac_status" >&5
13047   (exit $ac_status); }; }; then
13048   with_pthread=yes
13049 else
13050   echo "$as_me: failed program was:" >&5
13051 cat conftest.$ac_ext >&5
13052 with_pthread=no
13053 fi
13054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13055             LIBS="$cf_save_LIBS"
13056             echo "$as_me:13056: result: $with_pthread" >&5
13057 echo "${ECHO_T}$with_pthread" >&6
13058             test "$with_pthread" = yes && break
13059         done
13060
13061         if test "$with_pthread" = yes ; then
13062
13063 cf_add_libs="-l$cf_lib_pthread"
13064 # Filter out duplicates - this happens with badly-designed ".pc" files...
13065 for cf_add_1lib in $LIBS
13066 do
13067         for cf_add_2lib in $cf_add_libs
13068         do
13069                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13070                 then
13071                         cf_add_1lib=
13072                         break
13073                 fi
13074         done
13075         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13076 done
13077 LIBS="$cf_add_libs"
13078
13079 cat >>confdefs.h <<\EOF
13080 #define HAVE_LIBPTHREADS 1
13081 EOF
13082
13083         else
13084             { { echo "$as_me:13084: error: Cannot link with pthread library" >&5
13085 echo "$as_me: error: Cannot link with pthread library" >&2;}
13086    { (exit 1); exit 1; }; }
13087         fi
13088
13089 fi
13090
13091 fi
13092
13093 if test "x$with_pthread" != xno; then
13094         echo "$as_me:13094: checking for pthread_kill" >&5
13095 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
13096 if test "${ac_cv_func_pthread_kill+set}" = set; then
13097   echo $ECHO_N "(cached) $ECHO_C" >&6
13098 else
13099   cat >conftest.$ac_ext <<_ACEOF
13100 #line 13100 "configure"
13101 #include "confdefs.h"
13102 /* System header to define __stub macros and hopefully few prototypes,
13103     which can conflict with char pthread_kill (); below.  */
13104 #include <assert.h>
13105 /* Override any gcc2 internal prototype to avoid an error.  */
13106 #ifdef __cplusplus
13107 extern "C"
13108 #endif
13109 /* We use char because int might match the return type of a gcc2
13110    builtin and then its argument prototype would still apply.  */
13111 char pthread_kill ();
13112 char (*f) ();
13113
13114 int
13115 main (void)
13116 {
13117 /* The GNU C library defines this for functions which it implements
13118     to always fail with ENOSYS.  Some functions are actually named
13119     something starting with __ and the normal name is an alias.  */
13120 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13121 choke me
13122 #else
13123 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13124 #endif
13125
13126   ;
13127   return 0;
13128 }
13129 _ACEOF
13130 rm -f conftest.$ac_objext conftest$ac_exeext
13131 if { (eval echo "$as_me:13131: \"$ac_link\"") >&5
13132   (eval $ac_link) 2>&5
13133   ac_status=$?
13134   echo "$as_me:13134: \$? = $ac_status" >&5
13135   (exit $ac_status); } &&
13136          { ac_try='test -s conftest$ac_exeext'
13137   { (eval echo "$as_me:13137: \"$ac_try\"") >&5
13138   (eval $ac_try) 2>&5
13139   ac_status=$?
13140   echo "$as_me:13140: \$? = $ac_status" >&5
13141   (exit $ac_status); }; }; then
13142   ac_cv_func_pthread_kill=yes
13143 else
13144   echo "$as_me: failed program was:" >&5
13145 cat conftest.$ac_ext >&5
13146 ac_cv_func_pthread_kill=no
13147 fi
13148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13149 fi
13150 echo "$as_me:13150: result: $ac_cv_func_pthread_kill" >&5
13151 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13152 if test $ac_cv_func_pthread_kill = yes; then
13153
13154                 echo "$as_me:13154: checking if you want to allow EINTR in wgetch with pthreads" >&5
13155 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13156
13157 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13158 if test "${enable_pthreads_eintr+set}" = set; then
13159   enableval="$enable_pthreads_eintr"
13160   use_pthreads_eintr=$enableval
13161 else
13162   use_pthreads_eintr=no
13163 fi;
13164                 echo "$as_me:13164: result: $use_pthreads_eintr" >&5
13165 echo "${ECHO_T}$use_pthreads_eintr" >&6
13166                 if test "x$use_pthreads_eintr" = xyes ; then
13167
13168 cat >>confdefs.h <<\EOF
13169 #define USE_PTHREADS_EINTR 1
13170 EOF
13171
13172                 fi
13173 fi
13174
13175         echo "$as_me:13175: checking if you want to use weak-symbols for pthreads" >&5
13176 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13177
13178 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13179 if test "${enable_weak_symbols+set}" = set; then
13180   enableval="$enable_weak_symbols"
13181   use_weak_symbols=$enableval
13182 else
13183   use_weak_symbols=no
13184 fi;
13185         echo "$as_me:13185: result: $use_weak_symbols" >&5
13186 echo "${ECHO_T}$use_weak_symbols" >&6
13187         if test "x$use_weak_symbols" = xyes ; then
13188
13189 echo "$as_me:13189: checking if $CC supports weak symbols" >&5
13190 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13191 if test "${cf_cv_weak_symbols+set}" = set; then
13192   echo $ECHO_N "(cached) $ECHO_C" >&6
13193 else
13194
13195 cat >conftest.$ac_ext <<_ACEOF
13196 #line 13196 "configure"
13197 #include "confdefs.h"
13198
13199 #include <stdio.h>
13200 int
13201 main (void)
13202 {
13203
13204 #if defined(__GNUC__)
13205 #  if defined __USE_ISOC99
13206 #    define _cat_pragma(exp)    _Pragma(#exp)
13207 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13208 #  else
13209 #    define _weak_pragma(exp)
13210 #  endif
13211 #  define _declare(name)        __extension__ extern __typeof__(name) name
13212 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13213 #endif
13214
13215 weak_symbol(fopen);
13216
13217   ;
13218   return 0;
13219 }
13220 _ACEOF
13221 rm -f conftest.$ac_objext
13222 if { (eval echo "$as_me:13222: \"$ac_compile\"") >&5
13223   (eval $ac_compile) 2>&5
13224   ac_status=$?
13225   echo "$as_me:13225: \$? = $ac_status" >&5
13226   (exit $ac_status); } &&
13227          { ac_try='test -s conftest.$ac_objext'
13228   { (eval echo "$as_me:13228: \"$ac_try\"") >&5
13229   (eval $ac_try) 2>&5
13230   ac_status=$?
13231   echo "$as_me:13231: \$? = $ac_status" >&5
13232   (exit $ac_status); }; }; then
13233   cf_cv_weak_symbols=yes
13234 else
13235   echo "$as_me: failed program was:" >&5
13236 cat conftest.$ac_ext >&5
13237 cf_cv_weak_symbols=no
13238 fi
13239 rm -f conftest.$ac_objext conftest.$ac_ext
13240
13241 fi
13242 echo "$as_me:13242: result: $cf_cv_weak_symbols" >&5
13243 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13244
13245         else
13246                 cf_cv_weak_symbols=no
13247         fi
13248
13249         if test "x$cf_cv_weak_symbols" = xyes ; then
13250
13251 cat >>confdefs.h <<\EOF
13252 #define USE_WEAK_SYMBOLS 1
13253 EOF
13254
13255         fi
13256 fi
13257
13258 PTHREAD=
13259 if test "x$with_pthread" = "xyes" ; then
13260
13261 cat >>confdefs.h <<\EOF
13262 #define USE_PTHREADS 1
13263 EOF
13264
13265         enable_reentrant=yes
13266         if test "x$cf_cv_weak_symbols" = xyes ; then
13267                 PTHREAD=-lpthread
13268         fi
13269 fi
13270
13271 # Reentrant code has to be opaque; there's little advantage to making ncurses
13272 # opaque outside of that, so there is no --enable-opaque option.  We can use
13273 # this option without --with-pthreads, but this will be always set for
13274 # pthreads.
13275 echo "$as_me:13275: checking if you want reentrant code" >&5
13276 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13277
13278 # Check whether --enable-reentrant or --disable-reentrant was given.
13279 if test "${enable_reentrant+set}" = set; then
13280   enableval="$enable_reentrant"
13281   with_reentrant=$enableval
13282 else
13283   with_reentrant=no
13284 fi;
13285 echo "$as_me:13285: result: $with_reentrant" >&5
13286 echo "${ECHO_T}$with_reentrant" >&6
13287 if test "x$with_reentrant" = xyes ; then
13288         cf_cv_enable_reentrant=1
13289         cf_cv_enable_opaque="NCURSES_INTERNALS"
13290         NCURSES_SIZE_T=int
13291         if test "x$cf_cv_weak_symbols" = xyes ; then
13292
13293 # remove pthread library from $LIBS
13294 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13295
13296 cf_add_libs="-lpthread"
13297 # Filter out duplicates - this happens with badly-designed ".pc" files...
13298 for cf_add_1lib in $TEST_LIBS
13299 do
13300         for cf_add_2lib in $cf_add_libs
13301         do
13302                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13303                 then
13304                         cf_add_1lib=
13305                         break
13306                 fi
13307         done
13308         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13309 done
13310 TEST_LIBS="$cf_add_libs"
13311
13312 cf_add_libs="-lpthread"
13313 # Filter out duplicates - this happens with badly-designed ".pc" files...
13314 for cf_add_1lib in $TEST_LIBS2
13315 do
13316         for cf_add_2lib in $cf_add_libs
13317         do
13318                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13319                 then
13320                         cf_add_1lib=
13321                         break
13322                 fi
13323         done
13324         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13325 done
13326 TEST_LIBS2="$cf_add_libs"
13327
13328         else
13329                 # when not using weak symbols but with_reentrant,
13330                 # add 't' to the library suffix on all platforms
13331                 # except cygwin, where we only do that if ALSO
13332                 # compiling with full thread support.
13333                 case "$host" in
13334                 (*cygwin* | *msys*)
13335                         if test "$with_pthread" = "yes" ; then
13336                                 if test "x$disable_lib_suffixes" = "xno" ; then
13337                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13338                                 fi
13339                         fi ;;
13340                 (*)
13341                         if test "x$disable_lib_suffixes" = "xno" ; then
13342                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13343                         fi
13344                         ;;
13345                 esac
13346         fi
13347
13348 cat >>confdefs.h <<\EOF
13349 #define USE_REENTRANT 1
13350 EOF
13351
13352 if test "${with_abi_version+set}" != set; then
13353         case $cf_cv_rel_version in
13354         (5.*)
13355                 cf_cv_rel_version=6.0
13356                 cf_cv_abi_version=6
13357                 { echo "$as_me:13357: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13358 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13359                 ;;
13360         esac
13361 fi
13362
13363 else
13364         cf_cv_enable_reentrant=0
13365         cf_cv_enable_opaque="NCURSES_OPAQUE"
13366         NCURSES_SIZE_T=short
13367 fi
13368
13369 echo "$as_me:13369: checking if you want opaque curses-library structures" >&5
13370 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13371
13372 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13373 if test "${enable_opaque_curses+set}" = set; then
13374   enableval="$enable_opaque_curses"
13375   test "$enableval" != yes && enableval=no
13376         if test "$enableval" != "no" ; then
13377     enable_opaque_curses=yes
13378         else
13379
13380          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13381          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13382
13383         fi
13384 else
13385   enableval=no
13386
13387          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13388          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13389
13390 fi;
13391 echo "$as_me:13391: result: $enable_opaque_curses" >&5
13392 echo "${ECHO_T}$enable_opaque_curses" >&6
13393
13394 test "$cf_cv_enable_reentrant" = 1 && \
13395 test "$enable_opaque_curses" = no && \
13396 { { echo "$as_me:13396: error: reentrant configuration requires opaque library" >&5
13397 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13398    { (exit 1); exit 1; }; }
13399
13400 echo "$as_me:13400: checking if you want opaque form-library structures" >&5
13401 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13402
13403 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13404 if test "${enable_opaque_form+set}" = set; then
13405   enableval="$enable_opaque_form"
13406   enable_opaque_form=yes
13407 else
13408   enable_opaque_form=no
13409 fi;
13410 echo "$as_me:13410: result: $enable_opaque_form" >&5
13411 echo "${ECHO_T}$enable_opaque_form" >&6
13412
13413 echo "$as_me:13413: checking if you want opaque menu-library structures" >&5
13414 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13415
13416 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13417 if test "${enable_opaque_menu+set}" = set; then
13418   enableval="$enable_opaque_menu"
13419   enable_opaque_menu=yes
13420 else
13421   enable_opaque_menu=no
13422 fi;
13423 echo "$as_me:13423: result: $enable_opaque_menu" >&5
13424 echo "${ECHO_T}$enable_opaque_menu" >&6
13425
13426 echo "$as_me:13426: checking if you want opaque panel-library structures" >&5
13427 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13428
13429 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13430 if test "${enable_opaque_panel+set}" = set; then
13431   enableval="$enable_opaque_panel"
13432   enable_opaque_panel=yes
13433 else
13434   enable_opaque_panel=no
13435 fi;
13436 echo "$as_me:13436: result: $enable_opaque_panel" >&5
13437 echo "${ECHO_T}$enable_opaque_panel" >&6
13438
13439 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13440 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13441 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13442 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13443
13444 ### Allow using a different wrap-prefix
13445 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13446         echo "$as_me:13446: checking for prefix used to wrap public variables" >&5
13447 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13448
13449 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13450 if test "${with_wrap_prefix+set}" = set; then
13451   withval="$with_wrap_prefix"
13452   NCURSES_WRAP_PREFIX=$withval
13453 else
13454   NCURSES_WRAP_PREFIX=_nc_
13455 fi;
13456         echo "$as_me:13456: result: $NCURSES_WRAP_PREFIX" >&5
13457 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13458 else
13459         NCURSES_WRAP_PREFIX=_nc_
13460 fi
13461
13462 cat >>confdefs.h <<EOF
13463 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13464 EOF
13465
13466 ###############################################################################
13467 # These options are relatively safe to experiment with.
13468
13469 echo "$as_me:13469: checking if you want all development code" >&5
13470 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13471
13472 # Check whether --with-develop or --without-develop was given.
13473 if test "${with_develop+set}" = set; then
13474   withval="$with_develop"
13475   with_develop=$withval
13476 else
13477   with_develop=no
13478 fi;
13479 echo "$as_me:13479: result: $with_develop" >&5
13480 echo "${ECHO_T}$with_develop" >&6
13481
13482 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13483 echo "$as_me:13483: checking if you want hard-tabs code" >&5
13484 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13485
13486 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13487 if test "${enable_hard_tabs+set}" = set; then
13488   enableval="$enable_hard_tabs"
13489
13490 else
13491   enable_hard_tabs=$with_develop
13492 fi;
13493 echo "$as_me:13493: result: $enable_hard_tabs" >&5
13494 echo "${ECHO_T}$enable_hard_tabs" >&6
13495 test "x$enable_hard_tabs" = xyes &&
13496 cat >>confdefs.h <<\EOF
13497 #define USE_HARD_TABS 1
13498 EOF
13499
13500 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13501 echo "$as_me:13501: checking if you want limited support for xmc" >&5
13502 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13503
13504 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13505 if test "${enable_xmc_glitch+set}" = set; then
13506   enableval="$enable_xmc_glitch"
13507
13508 else
13509   enable_xmc_glitch=$with_develop
13510 fi;
13511 echo "$as_me:13511: result: $enable_xmc_glitch" >&5
13512 echo "${ECHO_T}$enable_xmc_glitch" >&6
13513 test "x$enable_xmc_glitch" = xyes &&
13514 cat >>confdefs.h <<\EOF
13515 #define USE_XMC_SUPPORT 1
13516 EOF
13517
13518 ###############################################################################
13519 # These are just experimental, probably should not be in a package:
13520
13521 echo "$as_me:13521: checking if you do not want to assume colors are white-on-black" >&5
13522 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13523
13524 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13525 if test "${enable_assumed_color+set}" = set; then
13526   enableval="$enable_assumed_color"
13527   with_assumed_color=$enableval
13528 else
13529   with_assumed_color=yes
13530 fi;
13531 echo "$as_me:13531: result: $with_assumed_color" >&5
13532 echo "${ECHO_T}$with_assumed_color" >&6
13533 test "x$with_assumed_color" = xyes &&
13534 cat >>confdefs.h <<\EOF
13535 #define USE_ASSUMED_COLOR 1
13536 EOF
13537
13538 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13539 echo "$as_me:13539: checking if you want hashmap scrolling-optimization code" >&5
13540 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13541
13542 # Check whether --enable-hashmap or --disable-hashmap was given.
13543 if test "${enable_hashmap+set}" = set; then
13544   enableval="$enable_hashmap"
13545   with_hashmap=$enableval
13546 else
13547   with_hashmap=yes
13548 fi;
13549 echo "$as_me:13549: result: $with_hashmap" >&5
13550 echo "${ECHO_T}$with_hashmap" >&6
13551 test "x$with_hashmap" = xyes &&
13552 cat >>confdefs.h <<\EOF
13553 #define USE_HASHMAP 1
13554 EOF
13555
13556 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13557 echo "$as_me:13557: checking if you want colorfgbg code" >&5
13558 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13559
13560 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13561 if test "${enable_colorfgbg+set}" = set; then
13562   enableval="$enable_colorfgbg"
13563   with_colorfgbg=$enableval
13564 else
13565   with_colorfgbg=no
13566 fi;
13567 echo "$as_me:13567: result: $with_colorfgbg" >&5
13568 echo "${ECHO_T}$with_colorfgbg" >&6
13569 test "x$with_colorfgbg" = xyes &&
13570 cat >>confdefs.h <<\EOF
13571 #define USE_COLORFGBG 1
13572 EOF
13573
13574 ###   use option --enable-interop to turn on use of bindings used for interop
13575 echo "$as_me:13575: checking if you want interop bindings" >&5
13576 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13577
13578 # Check whether --enable-interop or --disable-interop was given.
13579 if test "${enable_interop+set}" = set; then
13580   enableval="$enable_interop"
13581   with_exp_interop=$enableval
13582 else
13583   with_exp_interop=$cf_dft_interop
13584 fi;
13585 echo "$as_me:13585: result: $with_exp_interop" >&5
13586 echo "${ECHO_T}$with_exp_interop" >&6
13587
13588 NCURSES_INTEROP_FUNCS=0
13589 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13590
13591 echo "$as_me:13591: checking if you want experimental safe-sprintf code" >&5
13592 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13593
13594 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13595 if test "${enable_safe_sprintf+set}" = set; then
13596   enableval="$enable_safe_sprintf"
13597   with_safe_sprintf=$enableval
13598 else
13599   with_safe_sprintf=no
13600 fi;
13601 echo "$as_me:13601: result: $with_safe_sprintf" >&5
13602 echo "${ECHO_T}$with_safe_sprintf" >&6
13603
13604 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13605 # when hashmap is used scroll hints are useless
13606 if test "$with_hashmap" = no ; then
13607 echo "$as_me:13607: checking if you want to experiment without scrolling-hints code" >&5
13608 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13609
13610 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13611 if test "${enable_scroll_hints+set}" = set; then
13612   enableval="$enable_scroll_hints"
13613   with_scroll_hints=$enableval
13614 else
13615   with_scroll_hints=yes
13616 fi;
13617 echo "$as_me:13617: result: $with_scroll_hints" >&5
13618 echo "${ECHO_T}$with_scroll_hints" >&6
13619 test "x$with_scroll_hints" = xyes &&
13620 cat >>confdefs.h <<\EOF
13621 #define USE_SCROLL_HINTS 1
13622 EOF
13623
13624 fi
13625
13626 echo "$as_me:13626: checking if you want wgetch-events code" >&5
13627 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13628
13629 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13630 if test "${enable_wgetch_events+set}" = set; then
13631   enableval="$enable_wgetch_events"
13632   with_wgetch_events=$enableval
13633 else
13634   with_wgetch_events=no
13635 fi;
13636 echo "$as_me:13636: result: $with_wgetch_events" >&5
13637 echo "${ECHO_T}$with_wgetch_events" >&6
13638 test "x$with_wgetch_events" = xyes &&
13639 cat >>confdefs.h <<\EOF
13640 #define NCURSES_WGETCH_EVENTS 1
13641 EOF
13642
13643 ###############################################################################
13644
13645 ###     use option --disable-echo to suppress full display compiling commands
13646
13647 echo "$as_me:13647: checking if you want to see long compiling messages" >&5
13648 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13649
13650 # Check whether --enable-echo or --disable-echo was given.
13651 if test "${enable_echo+set}" = set; then
13652   enableval="$enable_echo"
13653   test "$enableval" != no && enableval=yes
13654         if test "$enableval" != "yes" ; then
13655
13656         ECHO_LT='--silent'
13657         ECHO_LD='@echo linking $@;'
13658         RULE_CC='@echo compiling $<'
13659         SHOW_CC='@echo compiling $@'
13660         ECHO_CC='@'
13661
13662         else
13663
13664         ECHO_LT=''
13665         ECHO_LD=''
13666         RULE_CC=''
13667         SHOW_CC=''
13668         ECHO_CC=''
13669
13670         fi
13671 else
13672   enableval=yes
13673
13674         ECHO_LT=''
13675         ECHO_LD=''
13676         RULE_CC=''
13677         SHOW_CC=''
13678         ECHO_CC=''
13679
13680 fi;
13681 echo "$as_me:13681: result: $enableval" >&5
13682 echo "${ECHO_T}$enableval" >&6
13683
13684 if test "x$enable_echo" = xyes; then
13685         ECHO_LINK=
13686 else
13687         ECHO_LINK='@ echo linking $@ ... ;'
13688         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13689         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13690 fi
13691
13692 # --disable-stripping is used for debugging
13693
13694 echo "$as_me:13694: checking if you want to install stripped executables" >&5
13695 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
13696
13697 # Check whether --enable-stripping or --disable-stripping was given.
13698 if test "${enable_stripping+set}" = set; then
13699   enableval="$enable_stripping"
13700   test "$enableval" != no && enableval=yes
13701         if test "$enableval" != "yes" ; then
13702     with_stripping=no
13703         else
13704                 with_stripping=yes
13705         fi
13706 else
13707   enableval=yes
13708         with_stripping=yes
13709
13710 fi;
13711 echo "$as_me:13711: result: $with_stripping" >&5
13712 echo "${ECHO_T}$with_stripping" >&6
13713
13714 if test "$with_stripping" = yes
13715 then
13716         INSTALL_OPT_S="-s"
13717 else
13718         INSTALL_OPT_S=
13719 fi
13720
13721 echo "$as_me:13721: checking if install needs to be told about ownership" >&5
13722 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
13723 case `$ac_config_guess` in
13724 (*minix)
13725         with_install_o=yes
13726         ;;
13727 (*)
13728         with_install_o=no
13729         ;;
13730 esac
13731
13732 echo "$as_me:13732: result: $with_install_o" >&5
13733 echo "${ECHO_T}$with_install_o" >&6
13734 if test "x$with_install_o" = xyes
13735 then
13736         INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
13737 else
13738         INSTALL_OPT_O=
13739 fi
13740
13741 ###     use option --enable-warnings to turn on all gcc warnings
13742 echo "$as_me:13742: checking if you want to see compiler warnings" >&5
13743 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13744
13745 # Check whether --enable-warnings or --disable-warnings was given.
13746 if test "${enable_warnings+set}" = set; then
13747   enableval="$enable_warnings"
13748   with_warnings=$enableval
13749 fi;
13750 echo "$as_me:13750: result: $with_warnings" >&5
13751 echo "${ECHO_T}$with_warnings" >&6
13752
13753 if test "x$with_warnings" = "xyes"; then
13754
13755         ADAFLAGS="$ADAFLAGS -gnatg"
13756
13757 INTEL_COMPILER=no
13758
13759 if test "$GCC" = yes ; then
13760         case $host_os in
13761         (linux*|gnu*)
13762                 echo "$as_me:13762: checking if this is really Intel C compiler" >&5
13763 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13764                 cf_save_CFLAGS="$CFLAGS"
13765                 CFLAGS="$CFLAGS -no-gcc"
13766                 cat >conftest.$ac_ext <<_ACEOF
13767 #line 13767 "configure"
13768 #include "confdefs.h"
13769
13770 int
13771 main (void)
13772 {
13773
13774 #ifdef __INTEL_COMPILER
13775 #else
13776 make an error
13777 #endif
13778
13779   ;
13780   return 0;
13781 }
13782 _ACEOF
13783 rm -f conftest.$ac_objext
13784 if { (eval echo "$as_me:13784: \"$ac_compile\"") >&5
13785   (eval $ac_compile) 2>&5
13786   ac_status=$?
13787   echo "$as_me:13787: \$? = $ac_status" >&5
13788   (exit $ac_status); } &&
13789          { ac_try='test -s conftest.$ac_objext'
13790   { (eval echo "$as_me:13790: \"$ac_try\"") >&5
13791   (eval $ac_try) 2>&5
13792   ac_status=$?
13793   echo "$as_me:13793: \$? = $ac_status" >&5
13794   (exit $ac_status); }; }; then
13795   INTEL_COMPILER=yes
13796 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13797
13798 else
13799   echo "$as_me: failed program was:" >&5
13800 cat conftest.$ac_ext >&5
13801 fi
13802 rm -f conftest.$ac_objext conftest.$ac_ext
13803                 CFLAGS="$cf_save_CFLAGS"
13804                 echo "$as_me:13804: result: $INTEL_COMPILER" >&5
13805 echo "${ECHO_T}$INTEL_COMPILER" >&6
13806                 ;;
13807         esac
13808 fi
13809
13810 CLANG_COMPILER=no
13811
13812 if test "$GCC" = yes ; then
13813         echo "$as_me:13813: checking if this is really Clang C compiler" >&5
13814 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13815         cf_save_CFLAGS="$CFLAGS"
13816         CFLAGS="$CFLAGS -Qunused-arguments"
13817         cat >conftest.$ac_ext <<_ACEOF
13818 #line 13818 "configure"
13819 #include "confdefs.h"
13820
13821 int
13822 main (void)
13823 {
13824
13825 #ifdef __clang__
13826 #else
13827 make an error
13828 #endif
13829
13830   ;
13831   return 0;
13832 }
13833 _ACEOF
13834 rm -f conftest.$ac_objext
13835 if { (eval echo "$as_me:13835: \"$ac_compile\"") >&5
13836   (eval $ac_compile) 2>&5
13837   ac_status=$?
13838   echo "$as_me:13838: \$? = $ac_status" >&5
13839   (exit $ac_status); } &&
13840          { ac_try='test -s conftest.$ac_objext'
13841   { (eval echo "$as_me:13841: \"$ac_try\"") >&5
13842   (eval $ac_try) 2>&5
13843   ac_status=$?
13844   echo "$as_me:13844: \$? = $ac_status" >&5
13845   (exit $ac_status); }; }; then
13846   CLANG_COMPILER=yes
13847 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13848
13849 else
13850   echo "$as_me: failed program was:" >&5
13851 cat conftest.$ac_ext >&5
13852 fi
13853 rm -f conftest.$ac_objext conftest.$ac_ext
13854         CFLAGS="$cf_save_CFLAGS"
13855         echo "$as_me:13855: result: $CLANG_COMPILER" >&5
13856 echo "${ECHO_T}$CLANG_COMPILER" >&6
13857 fi
13858
13859 cat > conftest.$ac_ext <<EOF
13860 #line 13860 "${as_me:-configure}"
13861 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13862 EOF
13863
13864 if test "$INTEL_COMPILER" = yes
13865 then
13866 # The "-wdXXX" options suppress warnings:
13867 # remark #1419: external declaration in primary source file
13868 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13869 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13870 # remark #193: zero used for undefined preprocessing identifier
13871 # remark #593: variable "curs_sb_left_arrow" was set but never used
13872 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13873 # remark #869: parameter "tw" was never referenced
13874 # remark #981: operands are evaluated in unspecified order
13875 # warning #279: controlling expression is constant
13876
13877         { echo "$as_me:13877: checking for $CC warning options..." >&5
13878 echo "$as_me: checking for $CC warning options..." >&6;}
13879         cf_save_CFLAGS="$CFLAGS"
13880         EXTRA_CFLAGS="-Wall"
13881         for cf_opt in \
13882                 wd1419 \
13883                 wd1683 \
13884                 wd1684 \
13885                 wd193 \
13886                 wd593 \
13887                 wd279 \
13888                 wd810 \
13889                 wd869 \
13890                 wd981
13891         do
13892                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13893                 if { (eval echo "$as_me:13893: \"$ac_compile\"") >&5
13894   (eval $ac_compile) 2>&5
13895   ac_status=$?
13896   echo "$as_me:13896: \$? = $ac_status" >&5
13897   (exit $ac_status); }; then
13898                         test -n "$verbose" && echo "$as_me:13898: result: ... -$cf_opt" >&5
13899 echo "${ECHO_T}... -$cf_opt" >&6
13900                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13901                 fi
13902         done
13903         CFLAGS="$cf_save_CFLAGS"
13904
13905 elif test "$GCC" = yes
13906 then
13907         { echo "$as_me:13907: checking for $CC warning options..." >&5
13908 echo "$as_me: checking for $CC warning options..." >&6;}
13909         cf_save_CFLAGS="$CFLAGS"
13910         EXTRA_CFLAGS=
13911         cf_warn_CONST=""
13912         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13913         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13914         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13915         for cf_opt in W Wall \
13916                 Wbad-function-cast \
13917                 Wcast-align \
13918                 Wcast-qual \
13919                 Wdeclaration-after-statement \
13920                 Wextra \
13921                 Winline \
13922                 Wmissing-declarations \
13923                 Wmissing-prototypes \
13924                 Wnested-externs \
13925                 Wpointer-arith \
13926                 Wshadow \
13927                 Wstrict-prototypes \
13928                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13929         do
13930                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13931                 if { (eval echo "$as_me:13931: \"$ac_compile\"") >&5
13932   (eval $ac_compile) 2>&5
13933   ac_status=$?
13934   echo "$as_me:13934: \$? = $ac_status" >&5
13935   (exit $ac_status); }; then
13936                         test -n "$verbose" && echo "$as_me:13936: result: ... -$cf_opt" >&5
13937 echo "${ECHO_T}... -$cf_opt" >&6
13938                         case $cf_opt in
13939                         (Wcast-qual)
13940                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13941                                 ;;
13942                         (Winline)
13943                                 case $GCC_VERSION in
13944                                 ([34].*)
13945                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13946
13947 echo "${as_me:-configure}:13947: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13948
13949                                         continue;;
13950                                 esac
13951                                 ;;
13952                         (Wpointer-arith)
13953                                 case $GCC_VERSION in
13954                                 ([12].*)
13955                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13956
13957 echo "${as_me:-configure}:13957: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13958
13959                                         continue;;
13960                                 esac
13961                                 ;;
13962                         esac
13963                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13964                 fi
13965         done
13966         CFLAGS="$cf_save_CFLAGS"
13967 fi
13968 rm -rf conftest*
13969
13970         if test "x$cf_with_cxx" = xyes ; then
13971
13972 INTEL_CPLUSPLUS=no
13973
13974 if test "$GCC" = yes ; then
13975         case $host_os in
13976         (linux*|gnu*)
13977                 echo "$as_me:13977: checking if this is really Intel C++ compiler" >&5
13978 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13979                 cf_save_CFLAGS="$CXXFLAGS"
13980                 CXXFLAGS="$CXXFLAGS -no-gcc"
13981                 cat >conftest.$ac_ext <<_ACEOF
13982 #line 13982 "configure"
13983 #include "confdefs.h"
13984
13985 int
13986 main (void)
13987 {
13988
13989 #ifdef __INTEL_COMPILER
13990 #else
13991 make an error
13992 #endif
13993
13994   ;
13995   return 0;
13996 }
13997 _ACEOF
13998 rm -f conftest.$ac_objext
13999 if { (eval echo "$as_me:13999: \"$ac_compile\"") >&5
14000   (eval $ac_compile) 2>&5
14001   ac_status=$?
14002   echo "$as_me:14002: \$? = $ac_status" >&5
14003   (exit $ac_status); } &&
14004          { ac_try='test -s conftest.$ac_objext'
14005   { (eval echo "$as_me:14005: \"$ac_try\"") >&5
14006   (eval $ac_try) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); }; }; then
14010   INTEL_CPLUSPLUS=yes
14011 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14012
14013 else
14014   echo "$as_me: failed program was:" >&5
14015 cat conftest.$ac_ext >&5
14016 fi
14017 rm -f conftest.$ac_objext conftest.$ac_ext
14018                 CXXFLAGS="$cf_save_CFLAGS"
14019                 echo "$as_me:14019: result: $INTEL_CPLUSPLUS" >&5
14020 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
14021                 ;;
14022         esac
14023 fi
14024
14025 CLANG_CPLUSPLUS=no
14026
14027 if test "$GCC" = yes ; then
14028         echo "$as_me:14028: checking if this is really Clang C++ compiler" >&5
14029 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
14030         cf_save_CFLAGS="$CXXFLAGS"
14031         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
14032         cat >conftest.$ac_ext <<_ACEOF
14033 #line 14033 "configure"
14034 #include "confdefs.h"
14035
14036 int
14037 main (void)
14038 {
14039
14040 #ifdef __clang__
14041 #else
14042 make an error
14043 #endif
14044
14045   ;
14046   return 0;
14047 }
14048 _ACEOF
14049 rm -f conftest.$ac_objext
14050 if { (eval echo "$as_me:14050: \"$ac_compile\"") >&5
14051   (eval $ac_compile) 2>&5
14052   ac_status=$?
14053   echo "$as_me:14053: \$? = $ac_status" >&5
14054   (exit $ac_status); } &&
14055          { ac_try='test -s conftest.$ac_objext'
14056   { (eval echo "$as_me:14056: \"$ac_try\"") >&5
14057   (eval $ac_try) 2>&5
14058   ac_status=$?
14059   echo "$as_me:14059: \$? = $ac_status" >&5
14060   (exit $ac_status); }; }; then
14061   CLANG_CPLUSPLUS=yes
14062 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14063
14064 else
14065   echo "$as_me: failed program was:" >&5
14066 cat conftest.$ac_ext >&5
14067 fi
14068 rm -f conftest.$ac_objext conftest.$ac_ext
14069         CXXFLAGS="$cf_save_CFLAGS"
14070         echo "$as_me:14070: result: $CLANG_CPLUSPLUS" >&5
14071 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
14072 fi
14073
14074 ac_ext=cc
14075 ac_cpp='$CXXCPP $CPPFLAGS'
14076 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14077 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14078 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14079 ac_main_return=return
14080
14081 cat > conftest.$ac_ext <<EOF
14082 #line 14082 "configure"
14083 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14084 EOF
14085
14086 if test "$INTEL_CPLUSPLUS" = yes
14087 then
14088 # The "-wdXXX" options suppress warnings:
14089 # remark #1419: external declaration in primary source file
14090 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14091 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14092 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14093 # remark #193: zero used for undefined preprocessing identifier
14094 # remark #593: variable "curs_sb_left_arrow" was set but never used
14095 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14096 # remark #869: parameter "tw" was never referenced
14097 # remark #981: operands are evaluated in unspecified order
14098 # warning #269: invalid format string conversion
14099
14100         { echo "$as_me:14100: checking for $CC warning options..." >&5
14101 echo "$as_me: checking for $CC warning options..." >&6;}
14102         cf_save_CXXFLAGS="$CXXFLAGS"
14103         EXTRA_CXXFLAGS="-Wall"
14104         for cf_opt in \
14105                 wd1419 \
14106                 wd1682 \
14107                 wd1683 \
14108                 wd1684 \
14109                 wd193 \
14110                 wd279 \
14111                 wd593 \
14112                 wd810 \
14113                 wd869 \
14114                 wd981
14115         do
14116                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
14117                 if { (eval echo "$as_me:14117: \"$ac_compile\"") >&5
14118   (eval $ac_compile) 2>&5
14119   ac_status=$?
14120   echo "$as_me:14120: \$? = $ac_status" >&5
14121   (exit $ac_status); }; then
14122                         test -n "$verbose" && echo "$as_me:14122: result: ... -$cf_opt" >&5
14123 echo "${ECHO_T}... -$cf_opt" >&6
14124                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14125                 fi
14126         done
14127         CXXFLAGS="$cf_save_CXXFLAGS"
14128
14129 elif test "$GXX" = yes
14130 then
14131         { echo "$as_me:14131: checking for $CXX warning options..." >&5
14132 echo "$as_me: checking for $CXX warning options..." >&6;}
14133         cf_save_CXXFLAGS="$CXXFLAGS"
14134         EXTRA_CXXFLAGS="-W -Wall"
14135         cf_gxx_extra_warnings=""
14136         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
14137         case "$GCC_VERSION" in
14138         ([1-2].*)
14139                 ;;
14140         (*)
14141                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
14142                 ;;
14143         esac
14144         for cf_opt in \
14145                 Wabi \
14146                 fabi-version=0 \
14147                 Wextra \
14148                 Wignored-qualifiers \
14149                 Wlogical-op \
14150                 Woverloaded-virtual \
14151                 Wsign-promo \
14152                 Wsynth \
14153                 Wold-style-cast \
14154                 Wcast-align \
14155                 Wcast-qual \
14156                 Wpointer-arith \
14157                 Wshadow \
14158                 Wundef $cf_gxx_extra_warnings Wno-unused
14159         do
14160                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14161                 if { (eval echo "$as_me:14161: \"$ac_compile\"") >&5
14162   (eval $ac_compile) 2>&5
14163   ac_status=$?
14164   echo "$as_me:14164: \$? = $ac_status" >&5
14165   (exit $ac_status); }; then
14166                         test -n "$verbose" && echo "$as_me:14166: result: ... -$cf_opt" >&5
14167 echo "${ECHO_T}... -$cf_opt" >&6
14168                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14169                 else
14170                         test -n "$verbose" && echo "$as_me:14170: result: ... no -$cf_opt" >&5
14171 echo "${ECHO_T}... no -$cf_opt" >&6
14172                 fi
14173         done
14174         CXXFLAGS="$cf_save_CXXFLAGS"
14175 fi
14176
14177 rm -rf conftest*
14178 ac_ext=c
14179 ac_cpp='$CPP $CPPFLAGS'
14180 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14181 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14182 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14183 ac_main_return=return
14184
14185         fi
14186 fi
14187
14188 if test "$GCC" = yes
14189 then
14190 cat > conftest.i <<EOF
14191 #ifndef GCC_PRINTF
14192 #define GCC_PRINTF 0
14193 #endif
14194 #ifndef GCC_SCANF
14195 #define GCC_SCANF 0
14196 #endif
14197 #ifndef GCC_NORETURN
14198 #define GCC_NORETURN /* nothing */
14199 #endif
14200 #ifndef GCC_UNUSED
14201 #define GCC_UNUSED /* nothing */
14202 #endif
14203 EOF
14204 if test "$GCC" = yes
14205 then
14206         { echo "$as_me:14206: checking for $CC __attribute__ directives..." >&5
14207 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14208 cat > conftest.$ac_ext <<EOF
14209 #line 14209 "${as_me:-configure}"
14210 #include "confdefs.h"
14211 #include "conftest.h"
14212 #include "conftest.i"
14213 #if     GCC_PRINTF
14214 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14215 #else
14216 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14217 #endif
14218 #if     GCC_SCANF
14219 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14220 #else
14221 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14222 #endif
14223 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14224 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14225 extern void foo(void) GCC_NORETURN;
14226 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14227 EOF
14228         cf_printf_attribute=no
14229         cf_scanf_attribute=no
14230         for cf_attribute in scanf printf unused noreturn
14231         do
14232
14233 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14234
14235                 cf_directive="__attribute__(($cf_attribute))"
14236                 echo "checking for $CC $cf_directive" 1>&5
14237
14238                 case $cf_attribute in
14239                 (printf)
14240                         cf_printf_attribute=yes
14241                         cat >conftest.h <<EOF
14242 #define GCC_$cf_ATTRIBUTE 1
14243 EOF
14244                         ;;
14245                 (scanf)
14246                         cf_scanf_attribute=yes
14247                         cat >conftest.h <<EOF
14248 #define GCC_$cf_ATTRIBUTE 1
14249 EOF
14250                         ;;
14251                 (*)
14252                         cat >conftest.h <<EOF
14253 #define GCC_$cf_ATTRIBUTE $cf_directive
14254 EOF
14255                         ;;
14256                 esac
14257
14258                 if { (eval echo "$as_me:14258: \"$ac_compile\"") >&5
14259   (eval $ac_compile) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit $ac_status); }; then
14263                         test -n "$verbose" && echo "$as_me:14263: result: ... $cf_attribute" >&5
14264 echo "${ECHO_T}... $cf_attribute" >&6
14265                         cat conftest.h >>confdefs.h
14266                         case $cf_attribute in
14267                         (noreturn)
14268
14269 cat >>confdefs.h <<EOF
14270 #define GCC_NORETURN $cf_directive
14271 EOF
14272
14273                                 ;;
14274                         (printf)
14275                                 cf_value='/* nothing */'
14276                                 if test "$cf_printf_attribute" != no ; then
14277                                         cf_value='__attribute__((format(printf,fmt,var)))'
14278
14279 cat >>confdefs.h <<\EOF
14280 #define GCC_PRINTF 1
14281 EOF
14282
14283                                 fi
14284
14285 cat >>confdefs.h <<EOF
14286 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14287 EOF
14288
14289                                 ;;
14290                         (scanf)
14291                                 cf_value='/* nothing */'
14292                                 if test "$cf_scanf_attribute" != no ; then
14293                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14294
14295 cat >>confdefs.h <<\EOF
14296 #define GCC_SCANF 1
14297 EOF
14298
14299                                 fi
14300
14301 cat >>confdefs.h <<EOF
14302 #define GCC_SCANFLIKE(fmt,var) $cf_value
14303 EOF
14304
14305                                 ;;
14306                         (unused)
14307
14308 cat >>confdefs.h <<EOF
14309 #define GCC_UNUSED $cf_directive
14310 EOF
14311
14312                                 ;;
14313                         esac
14314                 fi
14315         done
14316 else
14317         fgrep define conftest.i >>confdefs.h
14318 fi
14319 rm -rf conftest*
14320 fi
14321
14322 echo "$as_me:14322: checking if you want to work around bogus compiler/loader warnings" >&5
14323 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14324
14325 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14326 if test "${enable_string_hacks+set}" = set; then
14327   enableval="$enable_string_hacks"
14328   with_string_hacks=$enableval
14329 else
14330   with_string_hacks=no
14331 fi;
14332 echo "$as_me:14332: result: $with_string_hacks" >&5
14333 echo "${ECHO_T}$with_string_hacks" >&6
14334
14335 if test "x$with_string_hacks" = "xyes"; then
14336
14337 cat >>confdefs.h <<\EOF
14338 #define USE_STRING_HACKS 1
14339 EOF
14340
14341         { echo "$as_me:14341: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14342 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14343         echo "$as_me:14343: checking for strlcat" >&5
14344 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14345 if test "${ac_cv_func_strlcat+set}" = set; then
14346   echo $ECHO_N "(cached) $ECHO_C" >&6
14347 else
14348   cat >conftest.$ac_ext <<_ACEOF
14349 #line 14349 "configure"
14350 #include "confdefs.h"
14351 /* System header to define __stub macros and hopefully few prototypes,
14352     which can conflict with char strlcat (); below.  */
14353 #include <assert.h>
14354 /* Override any gcc2 internal prototype to avoid an error.  */
14355 #ifdef __cplusplus
14356 extern "C"
14357 #endif
14358 /* We use char because int might match the return type of a gcc2
14359    builtin and then its argument prototype would still apply.  */
14360 char strlcat ();
14361 char (*f) ();
14362
14363 int
14364 main (void)
14365 {
14366 /* The GNU C library defines this for functions which it implements
14367     to always fail with ENOSYS.  Some functions are actually named
14368     something starting with __ and the normal name is an alias.  */
14369 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14370 choke me
14371 #else
14372 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14373 #endif
14374
14375   ;
14376   return 0;
14377 }
14378 _ACEOF
14379 rm -f conftest.$ac_objext conftest$ac_exeext
14380 if { (eval echo "$as_me:14380: \"$ac_link\"") >&5
14381   (eval $ac_link) 2>&5
14382   ac_status=$?
14383   echo "$as_me:14383: \$? = $ac_status" >&5
14384   (exit $ac_status); } &&
14385          { ac_try='test -s conftest$ac_exeext'
14386   { (eval echo "$as_me:14386: \"$ac_try\"") >&5
14387   (eval $ac_try) 2>&5
14388   ac_status=$?
14389   echo "$as_me:14389: \$? = $ac_status" >&5
14390   (exit $ac_status); }; }; then
14391   ac_cv_func_strlcat=yes
14392 else
14393   echo "$as_me: failed program was:" >&5
14394 cat conftest.$ac_ext >&5
14395 ac_cv_func_strlcat=no
14396 fi
14397 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14398 fi
14399 echo "$as_me:14399: result: $ac_cv_func_strlcat" >&5
14400 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14401 if test $ac_cv_func_strlcat = yes; then
14402
14403 cat >>confdefs.h <<\EOF
14404 #define HAVE_STRLCAT 1
14405 EOF
14406
14407 else
14408
14409                 echo "$as_me:14409: checking for strlcat in -lbsd" >&5
14410 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14411 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14412   echo $ECHO_N "(cached) $ECHO_C" >&6
14413 else
14414   ac_check_lib_save_LIBS=$LIBS
14415 LIBS="-lbsd  $LIBS"
14416 cat >conftest.$ac_ext <<_ACEOF
14417 #line 14417 "configure"
14418 #include "confdefs.h"
14419
14420 /* Override any gcc2 internal prototype to avoid an error.  */
14421 #ifdef __cplusplus
14422 extern "C"
14423 #endif
14424 /* We use char because int might match the return type of a gcc2
14425    builtin and then its argument prototype would still apply.  */
14426 char strlcat ();
14427 int
14428 main (void)
14429 {
14430 strlcat ();
14431   ;
14432   return 0;
14433 }
14434 _ACEOF
14435 rm -f conftest.$ac_objext conftest$ac_exeext
14436 if { (eval echo "$as_me:14436: \"$ac_link\"") >&5
14437   (eval $ac_link) 2>&5
14438   ac_status=$?
14439   echo "$as_me:14439: \$? = $ac_status" >&5
14440   (exit $ac_status); } &&
14441          { ac_try='test -s conftest$ac_exeext'
14442   { (eval echo "$as_me:14442: \"$ac_try\"") >&5
14443   (eval $ac_try) 2>&5
14444   ac_status=$?
14445   echo "$as_me:14445: \$? = $ac_status" >&5
14446   (exit $ac_status); }; }; then
14447   ac_cv_lib_bsd_strlcat=yes
14448 else
14449   echo "$as_me: failed program was:" >&5
14450 cat conftest.$ac_ext >&5
14451 ac_cv_lib_bsd_strlcat=no
14452 fi
14453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14454 LIBS=$ac_check_lib_save_LIBS
14455 fi
14456 echo "$as_me:14456: result: $ac_cv_lib_bsd_strlcat" >&5
14457 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14458 if test $ac_cv_lib_bsd_strlcat = yes; then
14459
14460 cf_add_libs="-lbsd"
14461 # Filter out duplicates - this happens with badly-designed ".pc" files...
14462 for cf_add_1lib in $LIBS
14463 do
14464         for cf_add_2lib in $cf_add_libs
14465         do
14466                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14467                 then
14468                         cf_add_1lib=
14469                         break
14470                 fi
14471         done
14472         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14473 done
14474 LIBS="$cf_add_libs"
14475
14476 for ac_header in bsd/string.h
14477 do
14478 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14479 echo "$as_me:14479: checking for $ac_header" >&5
14480 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14481 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14482   echo $ECHO_N "(cached) $ECHO_C" >&6
14483 else
14484   cat >conftest.$ac_ext <<_ACEOF
14485 #line 14485 "configure"
14486 #include "confdefs.h"
14487 #include <$ac_header>
14488 _ACEOF
14489 if { (eval echo "$as_me:14489: \"$ac_cpp conftest.$ac_ext\"") >&5
14490   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14491   ac_status=$?
14492   egrep -v '^ *\+' conftest.er1 >conftest.err
14493   rm -f conftest.er1
14494   cat conftest.err >&5
14495   echo "$as_me:14495: \$? = $ac_status" >&5
14496   (exit $ac_status); } >/dev/null; then
14497   if test -s conftest.err; then
14498     ac_cpp_err=$ac_c_preproc_warn_flag
14499   else
14500     ac_cpp_err=
14501   fi
14502 else
14503   ac_cpp_err=yes
14504 fi
14505 if test -z "$ac_cpp_err"; then
14506   eval "$as_ac_Header=yes"
14507 else
14508   echo "$as_me: failed program was:" >&5
14509   cat conftest.$ac_ext >&5
14510   eval "$as_ac_Header=no"
14511 fi
14512 rm -f conftest.err conftest.$ac_ext
14513 fi
14514 echo "$as_me:14514: result: `eval echo '${'$as_ac_Header'}'`" >&5
14515 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14516 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14517   cat >>confdefs.h <<EOF
14518 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14519 EOF
14520
14521 fi
14522 done
14523
14524 cat >>confdefs.h <<\EOF
14525 #define HAVE_STRLCAT 1
14526 EOF
14527
14528 fi
14529
14530 fi
14531
14532 for ac_func in strlcpy snprintf
14533 do
14534 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14535 echo "$as_me:14535: checking for $ac_func" >&5
14536 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14537 if eval "test \"\${$as_ac_var+set}\" = set"; then
14538   echo $ECHO_N "(cached) $ECHO_C" >&6
14539 else
14540   cat >conftest.$ac_ext <<_ACEOF
14541 #line 14541 "configure"
14542 #include "confdefs.h"
14543 /* System header to define __stub macros and hopefully few prototypes,
14544     which can conflict with char $ac_func (); below.  */
14545 #include <assert.h>
14546 /* Override any gcc2 internal prototype to avoid an error.  */
14547 #ifdef __cplusplus
14548 extern "C"
14549 #endif
14550 /* We use char because int might match the return type of a gcc2
14551    builtin and then its argument prototype would still apply.  */
14552 char $ac_func ();
14553 char (*f) ();
14554
14555 int
14556 main (void)
14557 {
14558 /* The GNU C library defines this for functions which it implements
14559     to always fail with ENOSYS.  Some functions are actually named
14560     something starting with __ and the normal name is an alias.  */
14561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14562 choke me
14563 #else
14564 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14565 #endif
14566
14567   ;
14568   return 0;
14569 }
14570 _ACEOF
14571 rm -f conftest.$ac_objext conftest$ac_exeext
14572 if { (eval echo "$as_me:14572: \"$ac_link\"") >&5
14573   (eval $ac_link) 2>&5
14574   ac_status=$?
14575   echo "$as_me:14575: \$? = $ac_status" >&5
14576   (exit $ac_status); } &&
14577          { ac_try='test -s conftest$ac_exeext'
14578   { (eval echo "$as_me:14578: \"$ac_try\"") >&5
14579   (eval $ac_try) 2>&5
14580   ac_status=$?
14581   echo "$as_me:14581: \$? = $ac_status" >&5
14582   (exit $ac_status); }; }; then
14583   eval "$as_ac_var=yes"
14584 else
14585   echo "$as_me: failed program was:" >&5
14586 cat conftest.$ac_ext >&5
14587 eval "$as_ac_var=no"
14588 fi
14589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14590 fi
14591 echo "$as_me:14591: result: `eval echo '${'$as_ac_var'}'`" >&5
14592 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14593 if test `eval echo '${'$as_ac_var'}'` = yes; then
14594   cat >>confdefs.h <<EOF
14595 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14596 EOF
14597
14598 fi
14599 done
14600
14601 fi
14602
14603 ###     use option --enable-assertions to turn on generation of assertion code
14604 echo "$as_me:14604: checking if you want to enable runtime assertions" >&5
14605 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14606
14607 # Check whether --enable-assertions or --disable-assertions was given.
14608 if test "${enable_assertions+set}" = set; then
14609   enableval="$enable_assertions"
14610   with_assertions=$enableval
14611 else
14612   with_assertions=no
14613 fi;
14614 echo "$as_me:14614: result: $with_assertions" >&5
14615 echo "${ECHO_T}$with_assertions" >&6
14616 if test -n "$GCC"
14617 then
14618         if test "$with_assertions" = no
14619         then
14620                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14621         else
14622
14623         ADAFLAGS="$ADAFLAGS -gnata"
14624
14625         fi
14626 fi
14627
14628 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14629
14630 echo "$as_me:14630: checking if you want to use dmalloc for testing" >&5
14631 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14632
14633 # Check whether --with-dmalloc or --without-dmalloc was given.
14634 if test "${with_dmalloc+set}" = set; then
14635   withval="$with_dmalloc"
14636
14637 cat >>confdefs.h <<EOF
14638 #define USE_DMALLOC 1
14639 EOF
14640
14641         : ${with_cflags:=-g}
14642         : ${with_no_leaks:=yes}
14643          with_dmalloc=yes
14644 else
14645   with_dmalloc=
14646 fi;
14647 echo "$as_me:14647: result: ${with_dmalloc:-no}" >&5
14648 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14649
14650 case .$with_cflags in
14651 (.*-g*)
14652         case .$CFLAGS in
14653         (.*-g*)
14654                 ;;
14655         (*)
14656
14657 cf_fix_cppflags=no
14658 cf_new_cflags=
14659 cf_new_cppflags=
14660 cf_new_extra_cppflags=
14661
14662 for cf_add_cflags in -g
14663 do
14664 case $cf_fix_cppflags in
14665 (no)
14666         case $cf_add_cflags in
14667         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14668                 case $cf_add_cflags in
14669                 (-D*)
14670                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14671
14672                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14673                                 && test -z "${cf_tst_cflags}" \
14674                                 && cf_fix_cppflags=yes
14675
14676                         if test $cf_fix_cppflags = yes ; then
14677
14678         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14679         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14680
14681                                 continue
14682                         elif test "${cf_tst_cflags}" = "\"'" ; then
14683
14684         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14685         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14686
14687                                 continue
14688                         fi
14689                         ;;
14690                 esac
14691                 case "$CPPFLAGS" in
14692                 (*$cf_add_cflags)
14693                         ;;
14694                 (*)
14695                         case $cf_add_cflags in
14696                         (-D*)
14697                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14698
14699 CPPFLAGS=`echo "$CPPFLAGS" | \
14700         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14701                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14702
14703                                 ;;
14704                         esac
14705
14706         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14707         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14708
14709                         ;;
14710                 esac
14711                 ;;
14712         (*)
14713
14714         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14715         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14716
14717                 ;;
14718         esac
14719         ;;
14720 (yes)
14721
14722         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14723         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14724
14725         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14726
14727         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14728                 && test -z "${cf_tst_cflags}" \
14729                 && cf_fix_cppflags=no
14730         ;;
14731 esac
14732 done
14733
14734 if test -n "$cf_new_cflags" ; then
14735
14736         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14737         CFLAGS="${CFLAGS}$cf_new_cflags"
14738
14739 fi
14740
14741 if test -n "$cf_new_cppflags" ; then
14742
14743         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14744         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14745
14746 fi
14747
14748 if test -n "$cf_new_extra_cppflags" ; then
14749
14750         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14751         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14752
14753 fi
14754
14755                 ;;
14756         esac
14757         ;;
14758 esac
14759
14760 if test "$with_dmalloc" = yes ; then
14761         echo "$as_me:14761: checking for dmalloc.h" >&5
14762 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14763 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14764   echo $ECHO_N "(cached) $ECHO_C" >&6
14765 else
14766   cat >conftest.$ac_ext <<_ACEOF
14767 #line 14767 "configure"
14768 #include "confdefs.h"
14769 #include <dmalloc.h>
14770 _ACEOF
14771 if { (eval echo "$as_me:14771: \"$ac_cpp conftest.$ac_ext\"") >&5
14772   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14773   ac_status=$?
14774   egrep -v '^ *\+' conftest.er1 >conftest.err
14775   rm -f conftest.er1
14776   cat conftest.err >&5
14777   echo "$as_me:14777: \$? = $ac_status" >&5
14778   (exit $ac_status); } >/dev/null; then
14779   if test -s conftest.err; then
14780     ac_cpp_err=$ac_c_preproc_warn_flag
14781   else
14782     ac_cpp_err=
14783   fi
14784 else
14785   ac_cpp_err=yes
14786 fi
14787 if test -z "$ac_cpp_err"; then
14788   ac_cv_header_dmalloc_h=yes
14789 else
14790   echo "$as_me: failed program was:" >&5
14791   cat conftest.$ac_ext >&5
14792   ac_cv_header_dmalloc_h=no
14793 fi
14794 rm -f conftest.err conftest.$ac_ext
14795 fi
14796 echo "$as_me:14796: result: $ac_cv_header_dmalloc_h" >&5
14797 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14798 if test $ac_cv_header_dmalloc_h = yes; then
14799
14800 echo "$as_me:14800: checking for dmalloc_debug in -ldmalloc" >&5
14801 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14802 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14803   echo $ECHO_N "(cached) $ECHO_C" >&6
14804 else
14805   ac_check_lib_save_LIBS=$LIBS
14806 LIBS="-ldmalloc  $LIBS"
14807 cat >conftest.$ac_ext <<_ACEOF
14808 #line 14808 "configure"
14809 #include "confdefs.h"
14810
14811 /* Override any gcc2 internal prototype to avoid an error.  */
14812 #ifdef __cplusplus
14813 extern "C"
14814 #endif
14815 /* We use char because int might match the return type of a gcc2
14816    builtin and then its argument prototype would still apply.  */
14817 char dmalloc_debug ();
14818 int
14819 main (void)
14820 {
14821 dmalloc_debug ();
14822   ;
14823   return 0;
14824 }
14825 _ACEOF
14826 rm -f conftest.$ac_objext conftest$ac_exeext
14827 if { (eval echo "$as_me:14827: \"$ac_link\"") >&5
14828   (eval $ac_link) 2>&5
14829   ac_status=$?
14830   echo "$as_me:14830: \$? = $ac_status" >&5
14831   (exit $ac_status); } &&
14832          { ac_try='test -s conftest$ac_exeext'
14833   { (eval echo "$as_me:14833: \"$ac_try\"") >&5
14834   (eval $ac_try) 2>&5
14835   ac_status=$?
14836   echo "$as_me:14836: \$? = $ac_status" >&5
14837   (exit $ac_status); }; }; then
14838   ac_cv_lib_dmalloc_dmalloc_debug=yes
14839 else
14840   echo "$as_me: failed program was:" >&5
14841 cat conftest.$ac_ext >&5
14842 ac_cv_lib_dmalloc_dmalloc_debug=no
14843 fi
14844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14845 LIBS=$ac_check_lib_save_LIBS
14846 fi
14847 echo "$as_me:14847: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14848 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14849 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14850   cat >>confdefs.h <<EOF
14851 #define HAVE_LIBDMALLOC 1
14852 EOF
14853
14854   LIBS="-ldmalloc $LIBS"
14855
14856 fi
14857
14858 fi
14859
14860 fi
14861
14862 echo "$as_me:14862: checking if you want to use dbmalloc for testing" >&5
14863 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14864
14865 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14866 if test "${with_dbmalloc+set}" = set; then
14867   withval="$with_dbmalloc"
14868
14869 cat >>confdefs.h <<EOF
14870 #define USE_DBMALLOC 1
14871 EOF
14872
14873         : ${with_cflags:=-g}
14874         : ${with_no_leaks:=yes}
14875          with_dbmalloc=yes
14876 else
14877   with_dbmalloc=
14878 fi;
14879 echo "$as_me:14879: result: ${with_dbmalloc:-no}" >&5
14880 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14881
14882 case .$with_cflags in
14883 (.*-g*)
14884         case .$CFLAGS in
14885         (.*-g*)
14886                 ;;
14887         (*)
14888
14889 cf_fix_cppflags=no
14890 cf_new_cflags=
14891 cf_new_cppflags=
14892 cf_new_extra_cppflags=
14893
14894 for cf_add_cflags in -g
14895 do
14896 case $cf_fix_cppflags in
14897 (no)
14898         case $cf_add_cflags in
14899         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14900                 case $cf_add_cflags in
14901                 (-D*)
14902                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14903
14904                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14905                                 && test -z "${cf_tst_cflags}" \
14906                                 && cf_fix_cppflags=yes
14907
14908                         if test $cf_fix_cppflags = yes ; then
14909
14910         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14911         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14912
14913                                 continue
14914                         elif test "${cf_tst_cflags}" = "\"'" ; then
14915
14916         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14917         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14918
14919                                 continue
14920                         fi
14921                         ;;
14922                 esac
14923                 case "$CPPFLAGS" in
14924                 (*$cf_add_cflags)
14925                         ;;
14926                 (*)
14927                         case $cf_add_cflags in
14928                         (-D*)
14929                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14930
14931 CPPFLAGS=`echo "$CPPFLAGS" | \
14932         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14933                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14934
14935                                 ;;
14936                         esac
14937
14938         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14939         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14940
14941                         ;;
14942                 esac
14943                 ;;
14944         (*)
14945
14946         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14947         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14948
14949                 ;;
14950         esac
14951         ;;
14952 (yes)
14953
14954         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14955         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14956
14957         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14958
14959         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14960                 && test -z "${cf_tst_cflags}" \
14961                 && cf_fix_cppflags=no
14962         ;;
14963 esac
14964 done
14965
14966 if test -n "$cf_new_cflags" ; then
14967
14968         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14969         CFLAGS="${CFLAGS}$cf_new_cflags"
14970
14971 fi
14972
14973 if test -n "$cf_new_cppflags" ; then
14974
14975         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14976         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14977
14978 fi
14979
14980 if test -n "$cf_new_extra_cppflags" ; then
14981
14982         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14983         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14984
14985 fi
14986
14987                 ;;
14988         esac
14989         ;;
14990 esac
14991
14992 if test "$with_dbmalloc" = yes ; then
14993         echo "$as_me:14993: checking for dbmalloc.h" >&5
14994 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14995 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14996   echo $ECHO_N "(cached) $ECHO_C" >&6
14997 else
14998   cat >conftest.$ac_ext <<_ACEOF
14999 #line 14999 "configure"
15000 #include "confdefs.h"
15001 #include <dbmalloc.h>
15002 _ACEOF
15003 if { (eval echo "$as_me:15003: \"$ac_cpp conftest.$ac_ext\"") >&5
15004   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15005   ac_status=$?
15006   egrep -v '^ *\+' conftest.er1 >conftest.err
15007   rm -f conftest.er1
15008   cat conftest.err >&5
15009   echo "$as_me:15009: \$? = $ac_status" >&5
15010   (exit $ac_status); } >/dev/null; then
15011   if test -s conftest.err; then
15012     ac_cpp_err=$ac_c_preproc_warn_flag
15013   else
15014     ac_cpp_err=
15015   fi
15016 else
15017   ac_cpp_err=yes
15018 fi
15019 if test -z "$ac_cpp_err"; then
15020   ac_cv_header_dbmalloc_h=yes
15021 else
15022   echo "$as_me: failed program was:" >&5
15023   cat conftest.$ac_ext >&5
15024   ac_cv_header_dbmalloc_h=no
15025 fi
15026 rm -f conftest.err conftest.$ac_ext
15027 fi
15028 echo "$as_me:15028: result: $ac_cv_header_dbmalloc_h" >&5
15029 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
15030 if test $ac_cv_header_dbmalloc_h = yes; then
15031
15032 echo "$as_me:15032: checking for debug_malloc in -ldbmalloc" >&5
15033 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
15034 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
15035   echo $ECHO_N "(cached) $ECHO_C" >&6
15036 else
15037   ac_check_lib_save_LIBS=$LIBS
15038 LIBS="-ldbmalloc  $LIBS"
15039 cat >conftest.$ac_ext <<_ACEOF
15040 #line 15040 "configure"
15041 #include "confdefs.h"
15042
15043 /* Override any gcc2 internal prototype to avoid an error.  */
15044 #ifdef __cplusplus
15045 extern "C"
15046 #endif
15047 /* We use char because int might match the return type of a gcc2
15048    builtin and then its argument prototype would still apply.  */
15049 char debug_malloc ();
15050 int
15051 main (void)
15052 {
15053 debug_malloc ();
15054   ;
15055   return 0;
15056 }
15057 _ACEOF
15058 rm -f conftest.$ac_objext conftest$ac_exeext
15059 if { (eval echo "$as_me:15059: \"$ac_link\"") >&5
15060   (eval $ac_link) 2>&5
15061   ac_status=$?
15062   echo "$as_me:15062: \$? = $ac_status" >&5
15063   (exit $ac_status); } &&
15064          { ac_try='test -s conftest$ac_exeext'
15065   { (eval echo "$as_me:15065: \"$ac_try\"") >&5
15066   (eval $ac_try) 2>&5
15067   ac_status=$?
15068   echo "$as_me:15068: \$? = $ac_status" >&5
15069   (exit $ac_status); }; }; then
15070   ac_cv_lib_dbmalloc_debug_malloc=yes
15071 else
15072   echo "$as_me: failed program was:" >&5
15073 cat conftest.$ac_ext >&5
15074 ac_cv_lib_dbmalloc_debug_malloc=no
15075 fi
15076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15077 LIBS=$ac_check_lib_save_LIBS
15078 fi
15079 echo "$as_me:15079: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
15080 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
15081 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
15082   cat >>confdefs.h <<EOF
15083 #define HAVE_LIBDBMALLOC 1
15084 EOF
15085
15086   LIBS="-ldbmalloc $LIBS"
15087
15088 fi
15089
15090 fi
15091
15092 fi
15093
15094 echo "$as_me:15094: checking if you want to use valgrind for testing" >&5
15095 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
15096
15097 # Check whether --with-valgrind or --without-valgrind was given.
15098 if test "${with_valgrind+set}" = set; then
15099   withval="$with_valgrind"
15100
15101 cat >>confdefs.h <<EOF
15102 #define USE_VALGRIND 1
15103 EOF
15104
15105         : ${with_cflags:=-g}
15106         : ${with_no_leaks:=yes}
15107          with_valgrind=yes
15108 else
15109   with_valgrind=
15110 fi;
15111 echo "$as_me:15111: result: ${with_valgrind:-no}" >&5
15112 echo "${ECHO_T}${with_valgrind:-no}" >&6
15113
15114 case .$with_cflags in
15115 (.*-g*)
15116         case .$CFLAGS in
15117         (.*-g*)
15118                 ;;
15119         (*)
15120
15121 cf_fix_cppflags=no
15122 cf_new_cflags=
15123 cf_new_cppflags=
15124 cf_new_extra_cppflags=
15125
15126 for cf_add_cflags in -g
15127 do
15128 case $cf_fix_cppflags in
15129 (no)
15130         case $cf_add_cflags in
15131         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15132                 case $cf_add_cflags in
15133                 (-D*)
15134                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15135
15136                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15137                                 && test -z "${cf_tst_cflags}" \
15138                                 && cf_fix_cppflags=yes
15139
15140                         if test $cf_fix_cppflags = yes ; then
15141
15142         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15143         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15144
15145                                 continue
15146                         elif test "${cf_tst_cflags}" = "\"'" ; then
15147
15148         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15149         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15150
15151                                 continue
15152                         fi
15153                         ;;
15154                 esac
15155                 case "$CPPFLAGS" in
15156                 (*$cf_add_cflags)
15157                         ;;
15158                 (*)
15159                         case $cf_add_cflags in
15160                         (-D*)
15161                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15162
15163 CPPFLAGS=`echo "$CPPFLAGS" | \
15164         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15165                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15166
15167                                 ;;
15168                         esac
15169
15170         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15171         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15172
15173                         ;;
15174                 esac
15175                 ;;
15176         (*)
15177
15178         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15179         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15180
15181                 ;;
15182         esac
15183         ;;
15184 (yes)
15185
15186         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15187         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15188
15189         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15190
15191         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15192                 && test -z "${cf_tst_cflags}" \
15193                 && cf_fix_cppflags=no
15194         ;;
15195 esac
15196 done
15197
15198 if test -n "$cf_new_cflags" ; then
15199
15200         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15201         CFLAGS="${CFLAGS}$cf_new_cflags"
15202
15203 fi
15204
15205 if test -n "$cf_new_cppflags" ; then
15206
15207         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15208         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15209
15210 fi
15211
15212 if test -n "$cf_new_extra_cppflags" ; then
15213
15214         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15215         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15216
15217 fi
15218
15219                 ;;
15220         esac
15221         ;;
15222 esac
15223
15224 echo "$as_me:15224: checking if you want to perform memory-leak testing" >&5
15225 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15226
15227 # Check whether --enable-leaks or --disable-leaks was given.
15228 if test "${enable_leaks+set}" = set; then
15229   enableval="$enable_leaks"
15230   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15231 else
15232   : ${with_no_leaks:=no}
15233 fi;
15234 echo "$as_me:15234: result: $with_no_leaks" >&5
15235 echo "${ECHO_T}$with_no_leaks" >&6
15236
15237 if test "$with_no_leaks" = yes ; then
15238
15239 cat >>confdefs.h <<\EOF
15240 #define NO_LEAKS 1
15241 EOF
15242
15243 cat >>confdefs.h <<\EOF
15244 #define YY_NO_LEAKS 1
15245 EOF
15246
15247 fi
15248
15249 cat >>confdefs.h <<\EOF
15250 #define HAVE_NC_ALLOC_H 1
15251 EOF
15252
15253 ###     use option --enable-expanded to generate certain macros as functions
15254
15255 # Check whether --enable-expanded or --disable-expanded was given.
15256 if test "${enable_expanded+set}" = set; then
15257   enableval="$enable_expanded"
15258   test "x$enableval" = xyes &&
15259 cat >>confdefs.h <<\EOF
15260 #define NCURSES_EXPANDED 1
15261 EOF
15262
15263 fi;
15264
15265 ###     use option --disable-macros to suppress macros in favor of functions
15266
15267 # Check whether --enable-macros or --disable-macros was given.
15268 if test "${enable_macros+set}" = set; then
15269   enableval="$enable_macros"
15270   test "$enableval" = no &&
15271 cat >>confdefs.h <<\EOF
15272 #define NCURSES_NOMACROS 1
15273 EOF
15274
15275 fi;
15276
15277 # Normally we only add trace() to the debug-library.  Allow this to be
15278 # extended to all models of the ncurses library:
15279 cf_all_traces=no
15280 case "$CFLAGS $CPPFLAGS" in
15281 (*-DTRACE*)
15282         cf_all_traces=yes
15283         ;;
15284 esac
15285
15286 echo "$as_me:15286: checking whether to add trace feature to all models" >&5
15287 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15288
15289 # Check whether --with-trace or --without-trace was given.
15290 if test "${with_trace+set}" = set; then
15291   withval="$with_trace"
15292   cf_with_trace=$withval
15293 else
15294   cf_with_trace=$cf_all_traces
15295 fi;
15296 echo "$as_me:15296: result: $cf_with_trace" >&5
15297 echo "${ECHO_T}$cf_with_trace" >&6
15298
15299 if test "x$cf_with_trace" = xyes ; then
15300         LIB_TRACING=all
15301         ADA_TRACE=TRUE
15302
15303 cf_fix_cppflags=no
15304 cf_new_cflags=
15305 cf_new_cppflags=
15306 cf_new_extra_cppflags=
15307
15308 for cf_add_cflags in -DTRACE
15309 do
15310 case $cf_fix_cppflags in
15311 (no)
15312         case $cf_add_cflags in
15313         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15314                 case $cf_add_cflags in
15315                 (-D*)
15316                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15317
15318                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15319                                 && test -z "${cf_tst_cflags}" \
15320                                 && cf_fix_cppflags=yes
15321
15322                         if test $cf_fix_cppflags = yes ; then
15323
15324         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15325         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15326
15327                                 continue
15328                         elif test "${cf_tst_cflags}" = "\"'" ; then
15329
15330         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15331         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15332
15333                                 continue
15334                         fi
15335                         ;;
15336                 esac
15337                 case "$CPPFLAGS" in
15338                 (*$cf_add_cflags)
15339                         ;;
15340                 (*)
15341                         case $cf_add_cflags in
15342                         (-D*)
15343                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15344
15345 CPPFLAGS=`echo "$CPPFLAGS" | \
15346         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15347                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15348
15349                                 ;;
15350                         esac
15351
15352         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15353         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15354
15355                         ;;
15356                 esac
15357                 ;;
15358         (*)
15359
15360         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15361         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15362
15363                 ;;
15364         esac
15365         ;;
15366 (yes)
15367
15368         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15369         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15370
15371         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15372
15373         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15374                 && test -z "${cf_tst_cflags}" \
15375                 && cf_fix_cppflags=no
15376         ;;
15377 esac
15378 done
15379
15380 if test -n "$cf_new_cflags" ; then
15381
15382         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15383         CFLAGS="${CFLAGS}$cf_new_cflags"
15384
15385 fi
15386
15387 if test -n "$cf_new_cppflags" ; then
15388
15389         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15390         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15391
15392 fi
15393
15394 if test -n "$cf_new_extra_cppflags" ; then
15395
15396         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15397         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15398
15399 fi
15400
15401 cat >>confdefs.h <<\EOF
15402 #define HAVE__TRACEF 1
15403 EOF
15404
15405 else
15406         LIB_TRACING=DEBUG
15407         ADA_TRACE=FALSE
15408 fi
15409
15410 echo "$as_me:15410: checking if we want to use GNAT projects" >&5
15411 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15412
15413 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15414 if test "${enable_gnat_projects+set}" = set; then
15415   enableval="$enable_gnat_projects"
15416   test "$enableval" != no && enableval=yes
15417         if test "$enableval" != "yes" ; then
15418     enable_gnat_projects=no
15419         else
15420                 enable_gnat_projects=yes
15421         fi
15422 else
15423   enableval=yes
15424         enable_gnat_projects=yes
15425
15426 fi;
15427 echo "$as_me:15427: result: $enable_gnat_projects" >&5
15428 echo "${ECHO_T}$enable_gnat_projects" >&6
15429
15430 ###     Checks for libraries.
15431 case $cf_cv_system_name in
15432 (*mingw32*|*mingw64*)
15433         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15434         LIBS=" -lpsapi $LIBS"
15435         ;;
15436 (*)
15437 echo "$as_me:15437: checking for gettimeofday" >&5
15438 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15439 if test "${ac_cv_func_gettimeofday+set}" = set; then
15440   echo $ECHO_N "(cached) $ECHO_C" >&6
15441 else
15442   cat >conftest.$ac_ext <<_ACEOF
15443 #line 15443 "configure"
15444 #include "confdefs.h"
15445 /* System header to define __stub macros and hopefully few prototypes,
15446     which can conflict with char gettimeofday (); below.  */
15447 #include <assert.h>
15448 /* Override any gcc2 internal prototype to avoid an error.  */
15449 #ifdef __cplusplus
15450 extern "C"
15451 #endif
15452 /* We use char because int might match the return type of a gcc2
15453    builtin and then its argument prototype would still apply.  */
15454 char gettimeofday ();
15455 char (*f) ();
15456
15457 int
15458 main (void)
15459 {
15460 /* The GNU C library defines this for functions which it implements
15461     to always fail with ENOSYS.  Some functions are actually named
15462     something starting with __ and the normal name is an alias.  */
15463 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15464 choke me
15465 #else
15466 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15467 #endif
15468
15469   ;
15470   return 0;
15471 }
15472 _ACEOF
15473 rm -f conftest.$ac_objext conftest$ac_exeext
15474 if { (eval echo "$as_me:15474: \"$ac_link\"") >&5
15475   (eval $ac_link) 2>&5
15476   ac_status=$?
15477   echo "$as_me:15477: \$? = $ac_status" >&5
15478   (exit $ac_status); } &&
15479          { ac_try='test -s conftest$ac_exeext'
15480   { (eval echo "$as_me:15480: \"$ac_try\"") >&5
15481   (eval $ac_try) 2>&5
15482   ac_status=$?
15483   echo "$as_me:15483: \$? = $ac_status" >&5
15484   (exit $ac_status); }; }; then
15485   ac_cv_func_gettimeofday=yes
15486 else
15487   echo "$as_me: failed program was:" >&5
15488 cat conftest.$ac_ext >&5
15489 ac_cv_func_gettimeofday=no
15490 fi
15491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15492 fi
15493 echo "$as_me:15493: result: $ac_cv_func_gettimeofday" >&5
15494 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15495 if test $ac_cv_func_gettimeofday = yes; then
15496
15497 cat >>confdefs.h <<\EOF
15498 #define HAVE_GETTIMEOFDAY 1
15499 EOF
15500
15501 else
15502
15503 echo "$as_me:15503: checking for gettimeofday in -lbsd" >&5
15504 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15505 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15506   echo $ECHO_N "(cached) $ECHO_C" >&6
15507 else
15508   ac_check_lib_save_LIBS=$LIBS
15509 LIBS="-lbsd  $LIBS"
15510 cat >conftest.$ac_ext <<_ACEOF
15511 #line 15511 "configure"
15512 #include "confdefs.h"
15513
15514 /* Override any gcc2 internal prototype to avoid an error.  */
15515 #ifdef __cplusplus
15516 extern "C"
15517 #endif
15518 /* We use char because int might match the return type of a gcc2
15519    builtin and then its argument prototype would still apply.  */
15520 char gettimeofday ();
15521 int
15522 main (void)
15523 {
15524 gettimeofday ();
15525   ;
15526   return 0;
15527 }
15528 _ACEOF
15529 rm -f conftest.$ac_objext conftest$ac_exeext
15530 if { (eval echo "$as_me:15530: \"$ac_link\"") >&5
15531   (eval $ac_link) 2>&5
15532   ac_status=$?
15533   echo "$as_me:15533: \$? = $ac_status" >&5
15534   (exit $ac_status); } &&
15535          { ac_try='test -s conftest$ac_exeext'
15536   { (eval echo "$as_me:15536: \"$ac_try\"") >&5
15537   (eval $ac_try) 2>&5
15538   ac_status=$?
15539   echo "$as_me:15539: \$? = $ac_status" >&5
15540   (exit $ac_status); }; }; then
15541   ac_cv_lib_bsd_gettimeofday=yes
15542 else
15543   echo "$as_me: failed program was:" >&5
15544 cat conftest.$ac_ext >&5
15545 ac_cv_lib_bsd_gettimeofday=no
15546 fi
15547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15548 LIBS=$ac_check_lib_save_LIBS
15549 fi
15550 echo "$as_me:15550: result: $ac_cv_lib_bsd_gettimeofday" >&5
15551 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15552 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15553
15554 cat >>confdefs.h <<\EOF
15555 #define HAVE_GETTIMEOFDAY 1
15556 EOF
15557
15558 cf_add_libs="-lbsd"
15559 # Filter out duplicates - this happens with badly-designed ".pc" files...
15560 for cf_add_1lib in $LIBS
15561 do
15562         for cf_add_2lib in $cf_add_libs
15563         do
15564                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15565                 then
15566                         cf_add_1lib=
15567                         break
15568                 fi
15569         done
15570         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15571 done
15572 LIBS="$cf_add_libs"
15573
15574 fi
15575
15576 fi
15577         ;;
15578 esac
15579
15580 echo "$as_me:15580: checking if -lm needed for math functions" >&5
15581 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15582 if test "${cf_cv_need_libm+set}" = set; then
15583   echo $ECHO_N "(cached) $ECHO_C" >&6
15584 else
15585
15586         cat >conftest.$ac_ext <<_ACEOF
15587 #line 15587 "configure"
15588 #include "confdefs.h"
15589
15590         #include <stdio.h>
15591         #include <stdlib.h>
15592         #include <math.h>
15593
15594 int
15595 main (void)
15596 {
15597 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15598   ;
15599   return 0;
15600 }
15601 _ACEOF
15602 rm -f conftest.$ac_objext conftest$ac_exeext
15603 if { (eval echo "$as_me:15603: \"$ac_link\"") >&5
15604   (eval $ac_link) 2>&5
15605   ac_status=$?
15606   echo "$as_me:15606: \$? = $ac_status" >&5
15607   (exit $ac_status); } &&
15608          { ac_try='test -s conftest$ac_exeext'
15609   { (eval echo "$as_me:15609: \"$ac_try\"") >&5
15610   (eval $ac_try) 2>&5
15611   ac_status=$?
15612   echo "$as_me:15612: \$? = $ac_status" >&5
15613   (exit $ac_status); }; }; then
15614   cf_cv_need_libm=no
15615 else
15616   echo "$as_me: failed program was:" >&5
15617 cat conftest.$ac_ext >&5
15618 cf_cv_need_libm=yes
15619 fi
15620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15621 fi
15622 echo "$as_me:15622: result: $cf_cv_need_libm" >&5
15623 echo "${ECHO_T}$cf_cv_need_libm" >&6
15624 if test "$cf_cv_need_libm" = yes
15625 then
15626 MATH_LIB=-lm
15627 fi
15628
15629 ###     Checks for header files.
15630 echo "$as_me:15630: checking for ANSI C header files" >&5
15631 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15632 if test "${ac_cv_header_stdc+set}" = set; then
15633   echo $ECHO_N "(cached) $ECHO_C" >&6
15634 else
15635   cat >conftest.$ac_ext <<_ACEOF
15636 #line 15636 "configure"
15637 #include "confdefs.h"
15638 #include <stdlib.h>
15639 #include <stdarg.h>
15640 #include <string.h>
15641 #include <float.h>
15642
15643 _ACEOF
15644 if { (eval echo "$as_me:15644: \"$ac_cpp conftest.$ac_ext\"") >&5
15645   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15646   ac_status=$?
15647   egrep -v '^ *\+' conftest.er1 >conftest.err
15648   rm -f conftest.er1
15649   cat conftest.err >&5
15650   echo "$as_me:15650: \$? = $ac_status" >&5
15651   (exit $ac_status); } >/dev/null; then
15652   if test -s conftest.err; then
15653     ac_cpp_err=$ac_c_preproc_warn_flag
15654   else
15655     ac_cpp_err=
15656   fi
15657 else
15658   ac_cpp_err=yes
15659 fi
15660 if test -z "$ac_cpp_err"; then
15661   ac_cv_header_stdc=yes
15662 else
15663   echo "$as_me: failed program was:" >&5
15664   cat conftest.$ac_ext >&5
15665   ac_cv_header_stdc=no
15666 fi
15667 rm -f conftest.err conftest.$ac_ext
15668
15669 if test $ac_cv_header_stdc = yes; then
15670   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15671   cat >conftest.$ac_ext <<_ACEOF
15672 #line 15672 "configure"
15673 #include "confdefs.h"
15674 #include <string.h>
15675
15676 _ACEOF
15677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15678   egrep "memchr" >/dev/null 2>&1; then
15679   :
15680 else
15681   ac_cv_header_stdc=no
15682 fi
15683 rm -rf conftest*
15684
15685 fi
15686
15687 if test $ac_cv_header_stdc = yes; then
15688   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15689   cat >conftest.$ac_ext <<_ACEOF
15690 #line 15690 "configure"
15691 #include "confdefs.h"
15692 #include <stdlib.h>
15693
15694 _ACEOF
15695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15696   egrep "free" >/dev/null 2>&1; then
15697   :
15698 else
15699   ac_cv_header_stdc=no
15700 fi
15701 rm -rf conftest*
15702
15703 fi
15704
15705 if test $ac_cv_header_stdc = yes; then
15706   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15707   if test "$cross_compiling" = yes; then
15708   :
15709 else
15710   cat >conftest.$ac_ext <<_ACEOF
15711 #line 15711 "configure"
15712 #include "confdefs.h"
15713 #include <ctype.h>
15714 #if ((' ' & 0x0FF) == 0x020)
15715 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15716 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15717 #else
15718 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15719                      || ('j' <= (c) && (c) <= 'r') \
15720                      || ('s' <= (c) && (c) <= 'z'))
15721 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15722 #endif
15723
15724 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15725 int
15726 main (void)
15727 {
15728   int i;
15729   for (i = 0; i < 256; i++)
15730     if (XOR (islower (i), ISLOWER (i))
15731         || toupper (i) != TOUPPER (i))
15732       $ac_main_return(2);
15733   $ac_main_return (0);
15734 }
15735 _ACEOF
15736 rm -f conftest$ac_exeext
15737 if { (eval echo "$as_me:15737: \"$ac_link\"") >&5
15738   (eval $ac_link) 2>&5
15739   ac_status=$?
15740   echo "$as_me:15740: \$? = $ac_status" >&5
15741   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15742   { (eval echo "$as_me:15742: \"$ac_try\"") >&5
15743   (eval $ac_try) 2>&5
15744   ac_status=$?
15745   echo "$as_me:15745: \$? = $ac_status" >&5
15746   (exit $ac_status); }; }; then
15747   :
15748 else
15749   echo "$as_me: program exited with status $ac_status" >&5
15750 echo "$as_me: failed program was:" >&5
15751 cat conftest.$ac_ext >&5
15752 ac_cv_header_stdc=no
15753 fi
15754 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15755 fi
15756 fi
15757 fi
15758 echo "$as_me:15758: result: $ac_cv_header_stdc" >&5
15759 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15760 if test $ac_cv_header_stdc = yes; then
15761
15762 cat >>confdefs.h <<\EOF
15763 #define STDC_HEADERS 1
15764 EOF
15765
15766 fi
15767
15768 ac_header_dirent=no
15769 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15770   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15771 echo "$as_me:15771: checking for $ac_hdr that defines DIR" >&5
15772 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15773 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15774   echo $ECHO_N "(cached) $ECHO_C" >&6
15775 else
15776   cat >conftest.$ac_ext <<_ACEOF
15777 #line 15777 "configure"
15778 #include "confdefs.h"
15779 #include <sys/types.h>
15780 #include <$ac_hdr>
15781
15782 int
15783 main (void)
15784 {
15785 if ((DIR *) 0)
15786 return 0;
15787   ;
15788   return 0;
15789 }
15790 _ACEOF
15791 rm -f conftest.$ac_objext
15792 if { (eval echo "$as_me:15792: \"$ac_compile\"") >&5
15793   (eval $ac_compile) 2>&5
15794   ac_status=$?
15795   echo "$as_me:15795: \$? = $ac_status" >&5
15796   (exit $ac_status); } &&
15797          { ac_try='test -s conftest.$ac_objext'
15798   { (eval echo "$as_me:15798: \"$ac_try\"") >&5
15799   (eval $ac_try) 2>&5
15800   ac_status=$?
15801   echo "$as_me:15801: \$? = $ac_status" >&5
15802   (exit $ac_status); }; }; then
15803   eval "$as_ac_Header=yes"
15804 else
15805   echo "$as_me: failed program was:" >&5
15806 cat conftest.$ac_ext >&5
15807 eval "$as_ac_Header=no"
15808 fi
15809 rm -f conftest.$ac_objext conftest.$ac_ext
15810 fi
15811 echo "$as_me:15811: result: `eval echo '${'$as_ac_Header'}'`" >&5
15812 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15813 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15814   cat >>confdefs.h <<EOF
15815 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15816 EOF
15817
15818 ac_header_dirent=$ac_hdr; break
15819 fi
15820
15821 done
15822 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15823 if test $ac_header_dirent = dirent.h; then
15824   echo "$as_me:15824: checking for opendir in -ldir" >&5
15825 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15826 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15827   echo $ECHO_N "(cached) $ECHO_C" >&6
15828 else
15829   ac_check_lib_save_LIBS=$LIBS
15830 LIBS="-ldir  $LIBS"
15831 cat >conftest.$ac_ext <<_ACEOF
15832 #line 15832 "configure"
15833 #include "confdefs.h"
15834
15835 /* Override any gcc2 internal prototype to avoid an error.  */
15836 #ifdef __cplusplus
15837 extern "C"
15838 #endif
15839 /* We use char because int might match the return type of a gcc2
15840    builtin and then its argument prototype would still apply.  */
15841 char opendir ();
15842 int
15843 main (void)
15844 {
15845 opendir ();
15846   ;
15847   return 0;
15848 }
15849 _ACEOF
15850 rm -f conftest.$ac_objext conftest$ac_exeext
15851 if { (eval echo "$as_me:15851: \"$ac_link\"") >&5
15852   (eval $ac_link) 2>&5
15853   ac_status=$?
15854   echo "$as_me:15854: \$? = $ac_status" >&5
15855   (exit $ac_status); } &&
15856          { ac_try='test -s conftest$ac_exeext'
15857   { (eval echo "$as_me:15857: \"$ac_try\"") >&5
15858   (eval $ac_try) 2>&5
15859   ac_status=$?
15860   echo "$as_me:15860: \$? = $ac_status" >&5
15861   (exit $ac_status); }; }; then
15862   ac_cv_lib_dir_opendir=yes
15863 else
15864   echo "$as_me: failed program was:" >&5
15865 cat conftest.$ac_ext >&5
15866 ac_cv_lib_dir_opendir=no
15867 fi
15868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15869 LIBS=$ac_check_lib_save_LIBS
15870 fi
15871 echo "$as_me:15871: result: $ac_cv_lib_dir_opendir" >&5
15872 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15873 if test $ac_cv_lib_dir_opendir = yes; then
15874   LIBS="$LIBS -ldir"
15875 fi
15876
15877 else
15878   echo "$as_me:15878: checking for opendir in -lx" >&5
15879 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15880 if test "${ac_cv_lib_x_opendir+set}" = set; then
15881   echo $ECHO_N "(cached) $ECHO_C" >&6
15882 else
15883   ac_check_lib_save_LIBS=$LIBS
15884 LIBS="-lx  $LIBS"
15885 cat >conftest.$ac_ext <<_ACEOF
15886 #line 15886 "configure"
15887 #include "confdefs.h"
15888
15889 /* Override any gcc2 internal prototype to avoid an error.  */
15890 #ifdef __cplusplus
15891 extern "C"
15892 #endif
15893 /* We use char because int might match the return type of a gcc2
15894    builtin and then its argument prototype would still apply.  */
15895 char opendir ();
15896 int
15897 main (void)
15898 {
15899 opendir ();
15900   ;
15901   return 0;
15902 }
15903 _ACEOF
15904 rm -f conftest.$ac_objext conftest$ac_exeext
15905 if { (eval echo "$as_me:15905: \"$ac_link\"") >&5
15906   (eval $ac_link) 2>&5
15907   ac_status=$?
15908   echo "$as_me:15908: \$? = $ac_status" >&5
15909   (exit $ac_status); } &&
15910          { ac_try='test -s conftest$ac_exeext'
15911   { (eval echo "$as_me:15911: \"$ac_try\"") >&5
15912   (eval $ac_try) 2>&5
15913   ac_status=$?
15914   echo "$as_me:15914: \$? = $ac_status" >&5
15915   (exit $ac_status); }; }; then
15916   ac_cv_lib_x_opendir=yes
15917 else
15918   echo "$as_me: failed program was:" >&5
15919 cat conftest.$ac_ext >&5
15920 ac_cv_lib_x_opendir=no
15921 fi
15922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15923 LIBS=$ac_check_lib_save_LIBS
15924 fi
15925 echo "$as_me:15925: result: $ac_cv_lib_x_opendir" >&5
15926 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15927 if test $ac_cv_lib_x_opendir = yes; then
15928   LIBS="$LIBS -lx"
15929 fi
15930
15931 fi
15932
15933 echo "$as_me:15933: checking whether time.h and sys/time.h may both be included" >&5
15934 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15935 if test "${ac_cv_header_time+set}" = set; then
15936   echo $ECHO_N "(cached) $ECHO_C" >&6
15937 else
15938   cat >conftest.$ac_ext <<_ACEOF
15939 #line 15939 "configure"
15940 #include "confdefs.h"
15941 #include <sys/types.h>
15942 #include <sys/time.h>
15943 #include <time.h>
15944
15945 int
15946 main (void)
15947 {
15948 if ((struct tm *) 0)
15949 return 0;
15950   ;
15951   return 0;
15952 }
15953 _ACEOF
15954 rm -f conftest.$ac_objext
15955 if { (eval echo "$as_me:15955: \"$ac_compile\"") >&5
15956   (eval $ac_compile) 2>&5
15957   ac_status=$?
15958   echo "$as_me:15958: \$? = $ac_status" >&5
15959   (exit $ac_status); } &&
15960          { ac_try='test -s conftest.$ac_objext'
15961   { (eval echo "$as_me:15961: \"$ac_try\"") >&5
15962   (eval $ac_try) 2>&5
15963   ac_status=$?
15964   echo "$as_me:15964: \$? = $ac_status" >&5
15965   (exit $ac_status); }; }; then
15966   ac_cv_header_time=yes
15967 else
15968   echo "$as_me: failed program was:" >&5
15969 cat conftest.$ac_ext >&5
15970 ac_cv_header_time=no
15971 fi
15972 rm -f conftest.$ac_objext conftest.$ac_ext
15973 fi
15974 echo "$as_me:15974: result: $ac_cv_header_time" >&5
15975 echo "${ECHO_T}$ac_cv_header_time" >&6
15976 if test $ac_cv_header_time = yes; then
15977
15978 cat >>confdefs.h <<\EOF
15979 #define TIME_WITH_SYS_TIME 1
15980 EOF
15981
15982 fi
15983
15984 cf_regex_func=no
15985
15986 cf_regex_libs="regex re"
15987 case $host_os in
15988 (mingw*)
15989         cf_regex_libs="gnurx $cf_regex_libs"
15990         ;;
15991 esac
15992
15993 echo "$as_me:15993: checking for regcomp" >&5
15994 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15995 if test "${ac_cv_func_regcomp+set}" = set; then
15996   echo $ECHO_N "(cached) $ECHO_C" >&6
15997 else
15998   cat >conftest.$ac_ext <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16001 /* System header to define __stub macros and hopefully few prototypes,
16002     which can conflict with char regcomp (); below.  */
16003 #include <assert.h>
16004 /* Override any gcc2 internal prototype to avoid an error.  */
16005 #ifdef __cplusplus
16006 extern "C"
16007 #endif
16008 /* We use char because int might match the return type of a gcc2
16009    builtin and then its argument prototype would still apply.  */
16010 char regcomp ();
16011 char (*f) ();
16012
16013 int
16014 main (void)
16015 {
16016 /* The GNU C library defines this for functions which it implements
16017     to always fail with ENOSYS.  Some functions are actually named
16018     something starting with __ and the normal name is an alias.  */
16019 #if defined (__stub_regcomp) || defined (__stub___regcomp)
16020 choke me
16021 #else
16022 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16023 #endif
16024
16025   ;
16026   return 0;
16027 }
16028 _ACEOF
16029 rm -f conftest.$ac_objext conftest$ac_exeext
16030 if { (eval echo "$as_me:16030: \"$ac_link\"") >&5
16031   (eval $ac_link) 2>&5
16032   ac_status=$?
16033   echo "$as_me:16033: \$? = $ac_status" >&5
16034   (exit $ac_status); } &&
16035          { ac_try='test -s conftest$ac_exeext'
16036   { (eval echo "$as_me:16036: \"$ac_try\"") >&5
16037   (eval $ac_try) 2>&5
16038   ac_status=$?
16039   echo "$as_me:16039: \$? = $ac_status" >&5
16040   (exit $ac_status); }; }; then
16041   ac_cv_func_regcomp=yes
16042 else
16043   echo "$as_me: failed program was:" >&5
16044 cat conftest.$ac_ext >&5
16045 ac_cv_func_regcomp=no
16046 fi
16047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16048 fi
16049 echo "$as_me:16049: result: $ac_cv_func_regcomp" >&5
16050 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
16051 if test $ac_cv_func_regcomp = yes; then
16052   cf_regex_func=regcomp
16053 else
16054
16055         for cf_regex_lib in $cf_regex_libs
16056         do
16057                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
16058 echo "$as_me:16058: checking for regcomp in -l$cf_regex_lib" >&5
16059 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
16060 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16061   echo $ECHO_N "(cached) $ECHO_C" >&6
16062 else
16063   ac_check_lib_save_LIBS=$LIBS
16064 LIBS="-l$cf_regex_lib  $LIBS"
16065 cat >conftest.$ac_ext <<_ACEOF
16066 #line 16066 "configure"
16067 #include "confdefs.h"
16068
16069 /* Override any gcc2 internal prototype to avoid an error.  */
16070 #ifdef __cplusplus
16071 extern "C"
16072 #endif
16073 /* We use char because int might match the return type of a gcc2
16074    builtin and then its argument prototype would still apply.  */
16075 char regcomp ();
16076 int
16077 main (void)
16078 {
16079 regcomp ();
16080   ;
16081   return 0;
16082 }
16083 _ACEOF
16084 rm -f conftest.$ac_objext conftest$ac_exeext
16085 if { (eval echo "$as_me:16085: \"$ac_link\"") >&5
16086   (eval $ac_link) 2>&5
16087   ac_status=$?
16088   echo "$as_me:16088: \$? = $ac_status" >&5
16089   (exit $ac_status); } &&
16090          { ac_try='test -s conftest$ac_exeext'
16091   { (eval echo "$as_me:16091: \"$ac_try\"") >&5
16092   (eval $ac_try) 2>&5
16093   ac_status=$?
16094   echo "$as_me:16094: \$? = $ac_status" >&5
16095   (exit $ac_status); }; }; then
16096   eval "$as_ac_Lib=yes"
16097 else
16098   echo "$as_me: failed program was:" >&5
16099 cat conftest.$ac_ext >&5
16100 eval "$as_ac_Lib=no"
16101 fi
16102 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16103 LIBS=$ac_check_lib_save_LIBS
16104 fi
16105 echo "$as_me:16105: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16106 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16107 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16108
16109 cf_add_libs="-l$cf_regex_lib"
16110 # Filter out duplicates - this happens with badly-designed ".pc" files...
16111 for cf_add_1lib in $LIBS
16112 do
16113         for cf_add_2lib in $cf_add_libs
16114         do
16115                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16116                 then
16117                         cf_add_1lib=
16118                         break
16119                 fi
16120         done
16121         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16122 done
16123 LIBS="$cf_add_libs"
16124
16125                                 cf_regex_func=regcomp
16126                                 break
16127 fi
16128
16129         done
16130
16131 fi
16132
16133 if test "$cf_regex_func" = no ; then
16134         echo "$as_me:16134: checking for compile" >&5
16135 echo $ECHO_N "checking for compile... $ECHO_C" >&6
16136 if test "${ac_cv_func_compile+set}" = set; then
16137   echo $ECHO_N "(cached) $ECHO_C" >&6
16138 else
16139   cat >conftest.$ac_ext <<_ACEOF
16140 #line 16140 "configure"
16141 #include "confdefs.h"
16142 /* System header to define __stub macros and hopefully few prototypes,
16143     which can conflict with char compile (); below.  */
16144 #include <assert.h>
16145 /* Override any gcc2 internal prototype to avoid an error.  */
16146 #ifdef __cplusplus
16147 extern "C"
16148 #endif
16149 /* We use char because int might match the return type of a gcc2
16150    builtin and then its argument prototype would still apply.  */
16151 char compile ();
16152 char (*f) ();
16153
16154 int
16155 main (void)
16156 {
16157 /* The GNU C library defines this for functions which it implements
16158     to always fail with ENOSYS.  Some functions are actually named
16159     something starting with __ and the normal name is an alias.  */
16160 #if defined (__stub_compile) || defined (__stub___compile)
16161 choke me
16162 #else
16163 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16164 #endif
16165
16166   ;
16167   return 0;
16168 }
16169 _ACEOF
16170 rm -f conftest.$ac_objext conftest$ac_exeext
16171 if { (eval echo "$as_me:16171: \"$ac_link\"") >&5
16172   (eval $ac_link) 2>&5
16173   ac_status=$?
16174   echo "$as_me:16174: \$? = $ac_status" >&5
16175   (exit $ac_status); } &&
16176          { ac_try='test -s conftest$ac_exeext'
16177   { (eval echo "$as_me:16177: \"$ac_try\"") >&5
16178   (eval $ac_try) 2>&5
16179   ac_status=$?
16180   echo "$as_me:16180: \$? = $ac_status" >&5
16181   (exit $ac_status); }; }; then
16182   ac_cv_func_compile=yes
16183 else
16184   echo "$as_me: failed program was:" >&5
16185 cat conftest.$ac_ext >&5
16186 ac_cv_func_compile=no
16187 fi
16188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16189 fi
16190 echo "$as_me:16190: result: $ac_cv_func_compile" >&5
16191 echo "${ECHO_T}$ac_cv_func_compile" >&6
16192 if test $ac_cv_func_compile = yes; then
16193   cf_regex_func=compile
16194 else
16195
16196                 echo "$as_me:16196: checking for compile in -lgen" >&5
16197 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16198 if test "${ac_cv_lib_gen_compile+set}" = set; then
16199   echo $ECHO_N "(cached) $ECHO_C" >&6
16200 else
16201   ac_check_lib_save_LIBS=$LIBS
16202 LIBS="-lgen  $LIBS"
16203 cat >conftest.$ac_ext <<_ACEOF
16204 #line 16204 "configure"
16205 #include "confdefs.h"
16206
16207 /* Override any gcc2 internal prototype to avoid an error.  */
16208 #ifdef __cplusplus
16209 extern "C"
16210 #endif
16211 /* We use char because int might match the return type of a gcc2
16212    builtin and then its argument prototype would still apply.  */
16213 char compile ();
16214 int
16215 main (void)
16216 {
16217 compile ();
16218   ;
16219   return 0;
16220 }
16221 _ACEOF
16222 rm -f conftest.$ac_objext conftest$ac_exeext
16223 if { (eval echo "$as_me:16223: \"$ac_link\"") >&5
16224   (eval $ac_link) 2>&5
16225   ac_status=$?
16226   echo "$as_me:16226: \$? = $ac_status" >&5
16227   (exit $ac_status); } &&
16228          { ac_try='test -s conftest$ac_exeext'
16229   { (eval echo "$as_me:16229: \"$ac_try\"") >&5
16230   (eval $ac_try) 2>&5
16231   ac_status=$?
16232   echo "$as_me:16232: \$? = $ac_status" >&5
16233   (exit $ac_status); }; }; then
16234   ac_cv_lib_gen_compile=yes
16235 else
16236   echo "$as_me: failed program was:" >&5
16237 cat conftest.$ac_ext >&5
16238 ac_cv_lib_gen_compile=no
16239 fi
16240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16241 LIBS=$ac_check_lib_save_LIBS
16242 fi
16243 echo "$as_me:16243: result: $ac_cv_lib_gen_compile" >&5
16244 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16245 if test $ac_cv_lib_gen_compile = yes; then
16246
16247 cf_add_libs="-lgen"
16248 # Filter out duplicates - this happens with badly-designed ".pc" files...
16249 for cf_add_1lib in $LIBS
16250 do
16251         for cf_add_2lib in $cf_add_libs
16252         do
16253                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16254                 then
16255                         cf_add_1lib=
16256                         break
16257                 fi
16258         done
16259         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16260 done
16261 LIBS="$cf_add_libs"
16262
16263                                 cf_regex_func=compile
16264 fi
16265
16266 fi
16267
16268 fi
16269
16270 if test "$cf_regex_func" = no ; then
16271         { echo "$as_me:16271: WARNING: cannot find regular expression library" >&5
16272 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16273 fi
16274
16275 echo "$as_me:16275: checking for regular-expression headers" >&5
16276 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16277 if test "${cf_cv_regex_hdrs+set}" = set; then
16278   echo $ECHO_N "(cached) $ECHO_C" >&6
16279 else
16280
16281 cf_cv_regex_hdrs=no
16282 case $cf_regex_func in
16283 (compile)
16284         for cf_regex_hdr in regexp.h regexpr.h
16285         do
16286                 cat >conftest.$ac_ext <<_ACEOF
16287 #line 16287 "configure"
16288 #include "confdefs.h"
16289 #include <$cf_regex_hdr>
16290 int
16291 main (void)
16292 {
16293
16294                         char *p = compile("", "", "", 0);
16295                         int x = step("", "");
16296
16297   ;
16298   return 0;
16299 }
16300 _ACEOF
16301 rm -f conftest.$ac_objext conftest$ac_exeext
16302 if { (eval echo "$as_me:16302: \"$ac_link\"") >&5
16303   (eval $ac_link) 2>&5
16304   ac_status=$?
16305   echo "$as_me:16305: \$? = $ac_status" >&5
16306   (exit $ac_status); } &&
16307          { ac_try='test -s conftest$ac_exeext'
16308   { (eval echo "$as_me:16308: \"$ac_try\"") >&5
16309   (eval $ac_try) 2>&5
16310   ac_status=$?
16311   echo "$as_me:16311: \$? = $ac_status" >&5
16312   (exit $ac_status); }; }; then
16313
16314                         cf_cv_regex_hdrs=$cf_regex_hdr
16315                         break
16316
16317 else
16318   echo "$as_me: failed program was:" >&5
16319 cat conftest.$ac_ext >&5
16320 fi
16321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16322         done
16323         ;;
16324 (*)
16325         for cf_regex_hdr in regex.h
16326         do
16327                 cat >conftest.$ac_ext <<_ACEOF
16328 #line 16328 "configure"
16329 #include "confdefs.h"
16330 #include <sys/types.h>
16331 #include <$cf_regex_hdr>
16332 int
16333 main (void)
16334 {
16335
16336                         regex_t *p;
16337                         int x = regcomp(p, "", 0);
16338                         int y = regexec(p, "", 0, 0, 0);
16339                         regfree(p);
16340
16341   ;
16342   return 0;
16343 }
16344 _ACEOF
16345 rm -f conftest.$ac_objext conftest$ac_exeext
16346 if { (eval echo "$as_me:16346: \"$ac_link\"") >&5
16347   (eval $ac_link) 2>&5
16348   ac_status=$?
16349   echo "$as_me:16349: \$? = $ac_status" >&5
16350   (exit $ac_status); } &&
16351          { ac_try='test -s conftest$ac_exeext'
16352   { (eval echo "$as_me:16352: \"$ac_try\"") >&5
16353   (eval $ac_try) 2>&5
16354   ac_status=$?
16355   echo "$as_me:16355: \$? = $ac_status" >&5
16356   (exit $ac_status); }; }; then
16357
16358                         cf_cv_regex_hdrs=$cf_regex_hdr
16359                         break
16360
16361 else
16362   echo "$as_me: failed program was:" >&5
16363 cat conftest.$ac_ext >&5
16364 fi
16365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16366         done
16367         ;;
16368 esac
16369
16370 fi
16371 echo "$as_me:16371: result: $cf_cv_regex_hdrs" >&5
16372 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16373
16374 case $cf_cv_regex_hdrs in
16375         (no)            { echo "$as_me:16375: WARNING: no regular expression header found" >&5
16376 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16377         (regex.h)
16378 cat >>confdefs.h <<\EOF
16379 #define HAVE_REGEX_H_FUNCS 1
16380 EOF
16381  ;;
16382         (regexp.h)
16383 cat >>confdefs.h <<\EOF
16384 #define HAVE_REGEXP_H_FUNCS 1
16385 EOF
16386  ;;
16387         (regexpr.h)
16388 cat >>confdefs.h <<\EOF
16389 #define HAVE_REGEXPR_H_FUNCS 1
16390 EOF
16391  ;;
16392 esac
16393
16394 for ac_header in \
16395 fcntl.h \
16396 getopt.h \
16397 limits.h \
16398 locale.h \
16399 math.h \
16400 poll.h \
16401 sys/bsdtypes.h \
16402 sys/ioctl.h \
16403 sys/param.h \
16404 sys/poll.h \
16405 sys/select.h \
16406 sys/time.h \
16407 sys/times.h \
16408 ttyent.h \
16409 unistd.h \
16410 wctype.h \
16411
16412 do
16413 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16414 echo "$as_me:16414: checking for $ac_header" >&5
16415 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16416 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16417   echo $ECHO_N "(cached) $ECHO_C" >&6
16418 else
16419   cat >conftest.$ac_ext <<_ACEOF
16420 #line 16420 "configure"
16421 #include "confdefs.h"
16422 #include <$ac_header>
16423 _ACEOF
16424 if { (eval echo "$as_me:16424: \"$ac_cpp conftest.$ac_ext\"") >&5
16425   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16426   ac_status=$?
16427   egrep -v '^ *\+' conftest.er1 >conftest.err
16428   rm -f conftest.er1
16429   cat conftest.err >&5
16430   echo "$as_me:16430: \$? = $ac_status" >&5
16431   (exit $ac_status); } >/dev/null; then
16432   if test -s conftest.err; then
16433     ac_cpp_err=$ac_c_preproc_warn_flag
16434   else
16435     ac_cpp_err=
16436   fi
16437 else
16438   ac_cpp_err=yes
16439 fi
16440 if test -z "$ac_cpp_err"; then
16441   eval "$as_ac_Header=yes"
16442 else
16443   echo "$as_me: failed program was:" >&5
16444   cat conftest.$ac_ext >&5
16445   eval "$as_ac_Header=no"
16446 fi
16447 rm -f conftest.err conftest.$ac_ext
16448 fi
16449 echo "$as_me:16449: result: `eval echo '${'$as_ac_Header'}'`" >&5
16450 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16451 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16452   cat >>confdefs.h <<EOF
16453 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16454 EOF
16455
16456 fi
16457 done
16458
16459 for ac_header in unistd.h getopt.h
16460 do
16461 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16462 echo "$as_me:16462: checking for $ac_header" >&5
16463 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16464 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16465   echo $ECHO_N "(cached) $ECHO_C" >&6
16466 else
16467   cat >conftest.$ac_ext <<_ACEOF
16468 #line 16468 "configure"
16469 #include "confdefs.h"
16470 #include <$ac_header>
16471 _ACEOF
16472 if { (eval echo "$as_me:16472: \"$ac_cpp conftest.$ac_ext\"") >&5
16473   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16474   ac_status=$?
16475   egrep -v '^ *\+' conftest.er1 >conftest.err
16476   rm -f conftest.er1
16477   cat conftest.err >&5
16478   echo "$as_me:16478: \$? = $ac_status" >&5
16479   (exit $ac_status); } >/dev/null; then
16480   if test -s conftest.err; then
16481     ac_cpp_err=$ac_c_preproc_warn_flag
16482   else
16483     ac_cpp_err=
16484   fi
16485 else
16486   ac_cpp_err=yes
16487 fi
16488 if test -z "$ac_cpp_err"; then
16489   eval "$as_ac_Header=yes"
16490 else
16491   echo "$as_me: failed program was:" >&5
16492   cat conftest.$ac_ext >&5
16493   eval "$as_ac_Header=no"
16494 fi
16495 rm -f conftest.err conftest.$ac_ext
16496 fi
16497 echo "$as_me:16497: result: `eval echo '${'$as_ac_Header'}'`" >&5
16498 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16499 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16500   cat >>confdefs.h <<EOF
16501 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16502 EOF
16503
16504 fi
16505 done
16506
16507 echo "$as_me:16507: checking for header declaring getopt variables" >&5
16508 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16509 if test "${cf_cv_getopt_header+set}" = set; then
16510   echo $ECHO_N "(cached) $ECHO_C" >&6
16511 else
16512
16513 cf_cv_getopt_header=none
16514 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16515 do
16516 cat >conftest.$ac_ext <<_ACEOF
16517 #line 16517 "configure"
16518 #include "confdefs.h"
16519
16520 #include <$cf_header>
16521 int
16522 main (void)
16523 {
16524 int x = optind; char *y = optarg
16525   ;
16526   return 0;
16527 }
16528 _ACEOF
16529 rm -f conftest.$ac_objext
16530 if { (eval echo "$as_me:16530: \"$ac_compile\"") >&5
16531   (eval $ac_compile) 2>&5
16532   ac_status=$?
16533   echo "$as_me:16533: \$? = $ac_status" >&5
16534   (exit $ac_status); } &&
16535          { ac_try='test -s conftest.$ac_objext'
16536   { (eval echo "$as_me:16536: \"$ac_try\"") >&5
16537   (eval $ac_try) 2>&5
16538   ac_status=$?
16539   echo "$as_me:16539: \$? = $ac_status" >&5
16540   (exit $ac_status); }; }; then
16541   cf_cv_getopt_header=$cf_header
16542  break
16543 else
16544   echo "$as_me: failed program was:" >&5
16545 cat conftest.$ac_ext >&5
16546 fi
16547 rm -f conftest.$ac_objext conftest.$ac_ext
16548 done
16549
16550 fi
16551 echo "$as_me:16551: result: $cf_cv_getopt_header" >&5
16552 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16553 if test $cf_cv_getopt_header != none ; then
16554
16555 cat >>confdefs.h <<\EOF
16556 #define HAVE_GETOPT_HEADER 1
16557 EOF
16558
16559 fi
16560 if test $cf_cv_getopt_header = getopt.h ; then
16561
16562 cat >>confdefs.h <<\EOF
16563 #define NEED_GETOPT_H 1
16564 EOF
16565
16566 fi
16567
16568 # check for ISC (this may also define _POSIX_SOURCE)
16569 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16570 if test "x$ISC" = xyes ; then
16571
16572 echo "$as_me:16572: checking for main in -lcposix" >&5
16573 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16574 if test "${ac_cv_lib_cposix_main+set}" = set; then
16575   echo $ECHO_N "(cached) $ECHO_C" >&6
16576 else
16577   ac_check_lib_save_LIBS=$LIBS
16578 LIBS="-lcposix  $LIBS"
16579 cat >conftest.$ac_ext <<_ACEOF
16580 #line 16580 "configure"
16581 #include "confdefs.h"
16582
16583 int
16584 main (void)
16585 {
16586 main ();
16587   ;
16588   return 0;
16589 }
16590 _ACEOF
16591 rm -f conftest.$ac_objext conftest$ac_exeext
16592 if { (eval echo "$as_me:16592: \"$ac_link\"") >&5
16593   (eval $ac_link) 2>&5
16594   ac_status=$?
16595   echo "$as_me:16595: \$? = $ac_status" >&5
16596   (exit $ac_status); } &&
16597          { ac_try='test -s conftest$ac_exeext'
16598   { (eval echo "$as_me:16598: \"$ac_try\"") >&5
16599   (eval $ac_try) 2>&5
16600   ac_status=$?
16601   echo "$as_me:16601: \$? = $ac_status" >&5
16602   (exit $ac_status); }; }; then
16603   ac_cv_lib_cposix_main=yes
16604 else
16605   echo "$as_me: failed program was:" >&5
16606 cat conftest.$ac_ext >&5
16607 ac_cv_lib_cposix_main=no
16608 fi
16609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16610 LIBS=$ac_check_lib_save_LIBS
16611 fi
16612 echo "$as_me:16612: result: $ac_cv_lib_cposix_main" >&5
16613 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16614 if test $ac_cv_lib_cposix_main = yes; then
16615   cat >>confdefs.h <<EOF
16616 #define HAVE_LIBCPOSIX 1
16617 EOF
16618
16619   LIBS="-lcposix $LIBS"
16620
16621 fi
16622
16623         echo "$as_me:16623: checking for bzero in -linet" >&5
16624 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16625 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16626   echo $ECHO_N "(cached) $ECHO_C" >&6
16627 else
16628   ac_check_lib_save_LIBS=$LIBS
16629 LIBS="-linet  $LIBS"
16630 cat >conftest.$ac_ext <<_ACEOF
16631 #line 16631 "configure"
16632 #include "confdefs.h"
16633
16634 /* Override any gcc2 internal prototype to avoid an error.  */
16635 #ifdef __cplusplus
16636 extern "C"
16637 #endif
16638 /* We use char because int might match the return type of a gcc2
16639    builtin and then its argument prototype would still apply.  */
16640 char bzero ();
16641 int
16642 main (void)
16643 {
16644 bzero ();
16645   ;
16646   return 0;
16647 }
16648 _ACEOF
16649 rm -f conftest.$ac_objext conftest$ac_exeext
16650 if { (eval echo "$as_me:16650: \"$ac_link\"") >&5
16651   (eval $ac_link) 2>&5
16652   ac_status=$?
16653   echo "$as_me:16653: \$? = $ac_status" >&5
16654   (exit $ac_status); } &&
16655          { ac_try='test -s conftest$ac_exeext'
16656   { (eval echo "$as_me:16656: \"$ac_try\"") >&5
16657   (eval $ac_try) 2>&5
16658   ac_status=$?
16659   echo "$as_me:16659: \$? = $ac_status" >&5
16660   (exit $ac_status); }; }; then
16661   ac_cv_lib_inet_bzero=yes
16662 else
16663   echo "$as_me: failed program was:" >&5
16664 cat conftest.$ac_ext >&5
16665 ac_cv_lib_inet_bzero=no
16666 fi
16667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16668 LIBS=$ac_check_lib_save_LIBS
16669 fi
16670 echo "$as_me:16670: result: $ac_cv_lib_inet_bzero" >&5
16671 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16672 if test $ac_cv_lib_inet_bzero = yes; then
16673
16674 cf_add_libs="-linet"
16675 # Filter out duplicates - this happens with badly-designed ".pc" files...
16676 for cf_add_1lib in $LIBS
16677 do
16678         for cf_add_2lib in $cf_add_libs
16679         do
16680                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16681                 then
16682                         cf_add_1lib=
16683                         break
16684                 fi
16685         done
16686         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16687 done
16688 LIBS="$cf_add_libs"
16689
16690 fi
16691 fi
16692
16693 echo "$as_me:16693: checking if sys/time.h works with sys/select.h" >&5
16694 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16695 if test "${cf_cv_sys_time_select+set}" = set; then
16696   echo $ECHO_N "(cached) $ECHO_C" >&6
16697 else
16698
16699 cat >conftest.$ac_ext <<_ACEOF
16700 #line 16700 "configure"
16701 #include "confdefs.h"
16702
16703 #include <sys/types.h>
16704 #ifdef HAVE_SYS_TIME_H
16705 #include <sys/time.h>
16706 #endif
16707 #ifdef HAVE_SYS_SELECT_H
16708 #include <sys/select.h>
16709 #endif
16710
16711 int
16712 main (void)
16713 {
16714
16715   ;
16716   return 0;
16717 }
16718 _ACEOF
16719 rm -f conftest.$ac_objext
16720 if { (eval echo "$as_me:16720: \"$ac_compile\"") >&5
16721   (eval $ac_compile) 2>&5
16722   ac_status=$?
16723   echo "$as_me:16723: \$? = $ac_status" >&5
16724   (exit $ac_status); } &&
16725          { ac_try='test -s conftest.$ac_objext'
16726   { (eval echo "$as_me:16726: \"$ac_try\"") >&5
16727   (eval $ac_try) 2>&5
16728   ac_status=$?
16729   echo "$as_me:16729: \$? = $ac_status" >&5
16730   (exit $ac_status); }; }; then
16731   cf_cv_sys_time_select=yes
16732 else
16733   echo "$as_me: failed program was:" >&5
16734 cat conftest.$ac_ext >&5
16735 cf_cv_sys_time_select=no
16736 fi
16737 rm -f conftest.$ac_objext conftest.$ac_ext
16738
16739 fi
16740
16741 echo "$as_me:16741: result: $cf_cv_sys_time_select" >&5
16742 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16743 test "$cf_cv_sys_time_select" = yes &&
16744 cat >>confdefs.h <<\EOF
16745 #define HAVE_SYS_TIME_SELECT 1
16746 EOF
16747
16748 ###     checks for compiler characteristics
16749 ac_ext=c
16750 ac_cpp='$CPP $CPPFLAGS'
16751 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16752 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16753 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16754 ac_main_return=return
16755
16756 echo "$as_me:16756: checking for an ANSI C-conforming const" >&5
16757 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16758 if test "${ac_cv_c_const+set}" = set; then
16759   echo $ECHO_N "(cached) $ECHO_C" >&6
16760 else
16761   cat >conftest.$ac_ext <<_ACEOF
16762 #line 16762 "configure"
16763 #include "confdefs.h"
16764
16765 int
16766 main (void)
16767 {
16768 /* FIXME: Include the comments suggested by Paul. */
16769 #ifndef __cplusplus
16770   /* Ultrix mips cc rejects this.  */
16771   typedef int charset[2];
16772   const charset x;
16773   /* SunOS 4.1.1 cc rejects this.  */
16774   char const *const *ccp;
16775   char **p;
16776   /* NEC SVR4.0.2 mips cc rejects this.  */
16777   struct point {int x, y;};
16778   static struct point const zero = {0,0};
16779   /* AIX XL C 1.02.0.0 rejects this.
16780      It does not let you subtract one const X* pointer from another in
16781      an arm of an if-expression whose if-part is not a constant
16782      expression */
16783   const char *g = "string";
16784   ccp = &g + (g ? g-g : 0);
16785   /* HPUX 7.0 cc rejects these. */
16786   ++ccp;
16787   p = (char**) ccp;
16788   ccp = (char const *const *) p;
16789   { /* SCO 3.2v4 cc rejects this.  */
16790     char *t;
16791     char const *s = 0 ? (char *) 0 : (char const *) 0;
16792
16793     *t++ = 0;
16794   }
16795   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16796     int x[] = {25, 17};
16797     const int *foo = &x[0];
16798     ++foo;
16799   }
16800   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16801     typedef const int *iptr;
16802     iptr p = 0;
16803     ++p;
16804   }
16805   { /* AIX XL C 1.02.0.0 rejects this saying
16806        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16807     struct s { int j; const int *ap[3]; };
16808     struct s *b; b->j = 5;
16809   }
16810   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16811     const int foo = 10;
16812   }
16813 #endif
16814
16815   ;
16816   return 0;
16817 }
16818 _ACEOF
16819 rm -f conftest.$ac_objext
16820 if { (eval echo "$as_me:16820: \"$ac_compile\"") >&5
16821   (eval $ac_compile) 2>&5
16822   ac_status=$?
16823   echo "$as_me:16823: \$? = $ac_status" >&5
16824   (exit $ac_status); } &&
16825          { ac_try='test -s conftest.$ac_objext'
16826   { (eval echo "$as_me:16826: \"$ac_try\"") >&5
16827   (eval $ac_try) 2>&5
16828   ac_status=$?
16829   echo "$as_me:16829: \$? = $ac_status" >&5
16830   (exit $ac_status); }; }; then
16831   ac_cv_c_const=yes
16832 else
16833   echo "$as_me: failed program was:" >&5
16834 cat conftest.$ac_ext >&5
16835 ac_cv_c_const=no
16836 fi
16837 rm -f conftest.$ac_objext conftest.$ac_ext
16838 fi
16839 echo "$as_me:16839: result: $ac_cv_c_const" >&5
16840 echo "${ECHO_T}$ac_cv_c_const" >&6
16841 if test $ac_cv_c_const = no; then
16842
16843 cat >>confdefs.h <<\EOF
16844 #define const
16845 EOF
16846
16847 fi
16848
16849 echo "$as_me:16849: checking for inline" >&5
16850 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16851 if test "${ac_cv_c_inline+set}" = set; then
16852   echo $ECHO_N "(cached) $ECHO_C" >&6
16853 else
16854   ac_cv_c_inline=no
16855 for ac_kw in inline __inline__ __inline; do
16856   cat >conftest.$ac_ext <<_ACEOF
16857 #line 16857 "configure"
16858 #include "confdefs.h"
16859 #ifndef __cplusplus
16860 static $ac_kw int static_foo () {return 0; }
16861 $ac_kw int foo () {return 0; }
16862 #endif
16863
16864 _ACEOF
16865 rm -f conftest.$ac_objext
16866 if { (eval echo "$as_me:16866: \"$ac_compile\"") >&5
16867   (eval $ac_compile) 2>&5
16868   ac_status=$?
16869   echo "$as_me:16869: \$? = $ac_status" >&5
16870   (exit $ac_status); } &&
16871          { ac_try='test -s conftest.$ac_objext'
16872   { (eval echo "$as_me:16872: \"$ac_try\"") >&5
16873   (eval $ac_try) 2>&5
16874   ac_status=$?
16875   echo "$as_me:16875: \$? = $ac_status" >&5
16876   (exit $ac_status); }; }; then
16877   ac_cv_c_inline=$ac_kw; break
16878 else
16879   echo "$as_me: failed program was:" >&5
16880 cat conftest.$ac_ext >&5
16881 fi
16882 rm -f conftest.$ac_objext conftest.$ac_ext
16883 done
16884
16885 fi
16886 echo "$as_me:16886: result: $ac_cv_c_inline" >&5
16887 echo "${ECHO_T}$ac_cv_c_inline" >&6
16888 case $ac_cv_c_inline in
16889   inline | yes) ;;
16890   no)
16891 cat >>confdefs.h <<\EOF
16892 #define inline
16893 EOF
16894  ;;
16895   *)  cat >>confdefs.h <<EOF
16896 #define inline $ac_cv_c_inline
16897 EOF
16898  ;;
16899 esac
16900
16901 NCURSES_INLINE=
16902 if test "$ac_cv_c_inline" != no ; then
16903         NCURSES_INLINE=inline
16904         if test "$INTEL_COMPILER" = yes
16905         then
16906                 :
16907         elif test "$CLANG_COMPILER" = yes
16908         then
16909                 :
16910         elif test "$GCC" = yes
16911         then
16912                 echo "$as_me:16912: checking if $CC supports options to tune inlining" >&5
16913 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16914 if test "${cf_cv_gcc_inline+set}" = set; then
16915   echo $ECHO_N "(cached) $ECHO_C" >&6
16916 else
16917
16918                 cf_save_CFLAGS=$CFLAGS
16919                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16920                 cat >conftest.$ac_ext <<_ACEOF
16921 #line 16921 "configure"
16922 #include "confdefs.h"
16923 inline int foo(void) { return 1; }
16924 int
16925 main (void)
16926 {
16927 ${cf_cv_main_return:-return} foo()
16928   ;
16929   return 0;
16930 }
16931 _ACEOF
16932 rm -f conftest.$ac_objext
16933 if { (eval echo "$as_me:16933: \"$ac_compile\"") >&5
16934   (eval $ac_compile) 2>&5
16935   ac_status=$?
16936   echo "$as_me:16936: \$? = $ac_status" >&5
16937   (exit $ac_status); } &&
16938          { ac_try='test -s conftest.$ac_objext'
16939   { (eval echo "$as_me:16939: \"$ac_try\"") >&5
16940   (eval $ac_try) 2>&5
16941   ac_status=$?
16942   echo "$as_me:16942: \$? = $ac_status" >&5
16943   (exit $ac_status); }; }; then
16944   cf_cv_gcc_inline=yes
16945 else
16946   echo "$as_me: failed program was:" >&5
16947 cat conftest.$ac_ext >&5
16948 cf_cv_gcc_inline=no
16949 fi
16950 rm -f conftest.$ac_objext conftest.$ac_ext
16951                 CFLAGS=$cf_save_CFLAGS
16952
16953 fi
16954 echo "$as_me:16954: result: $cf_cv_gcc_inline" >&5
16955 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16956                 if test "$cf_cv_gcc_inline" = yes ; then
16957
16958 cf_fix_cppflags=no
16959 cf_new_cflags=
16960 cf_new_cppflags=
16961 cf_new_extra_cppflags=
16962
16963 for cf_add_cflags in --param max-inline-insns-single=1200
16964 do
16965 case $cf_fix_cppflags in
16966 (no)
16967         case $cf_add_cflags in
16968         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16969                 case $cf_add_cflags in
16970                 (-D*)
16971                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16972
16973                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16974                                 && test -z "${cf_tst_cflags}" \
16975                                 && cf_fix_cppflags=yes
16976
16977                         if test $cf_fix_cppflags = yes ; then
16978
16979         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16980         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16981
16982                                 continue
16983                         elif test "${cf_tst_cflags}" = "\"'" ; then
16984
16985         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16986         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16987
16988                                 continue
16989                         fi
16990                         ;;
16991                 esac
16992                 case "$CPPFLAGS" in
16993                 (*$cf_add_cflags)
16994                         ;;
16995                 (*)
16996                         case $cf_add_cflags in
16997                         (-D*)
16998                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16999
17000 CPPFLAGS=`echo "$CPPFLAGS" | \
17001         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17002                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17003
17004                                 ;;
17005                         esac
17006
17007         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17008         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17009
17010                         ;;
17011                 esac
17012                 ;;
17013         (*)
17014
17015         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17016         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17017
17018                 ;;
17019         esac
17020         ;;
17021 (yes)
17022
17023         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17024         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17025
17026         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17027
17028         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17029                 && test -z "${cf_tst_cflags}" \
17030                 && cf_fix_cppflags=no
17031         ;;
17032 esac
17033 done
17034
17035 if test -n "$cf_new_cflags" ; then
17036
17037         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17038         CFLAGS="${CFLAGS}$cf_new_cflags"
17039
17040 fi
17041
17042 if test -n "$cf_new_cppflags" ; then
17043
17044         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17045         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17046
17047 fi
17048
17049 if test -n "$cf_new_extra_cppflags" ; then
17050
17051         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17052         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17053
17054 fi
17055
17056                 fi
17057         fi
17058 fi
17059
17060 echo "$as_me:17060: checking for signal global datatype" >&5
17061 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
17062 if test "${cf_cv_sig_atomic_t+set}" = set; then
17063   echo $ECHO_N "(cached) $ECHO_C" >&6
17064 else
17065
17066         for cf_type in \
17067                 "volatile sig_atomic_t" \
17068                 "sig_atomic_t" \
17069                 "int"
17070         do
17071         cat >conftest.$ac_ext <<_ACEOF
17072 #line 17072 "configure"
17073 #include "confdefs.h"
17074
17075 #include <sys/types.h>
17076 #include <signal.h>
17077 #include <stdio.h>
17078
17079 extern $cf_type x;
17080 $cf_type x;
17081 static void handler(int sig)
17082 {
17083         x = 5;
17084 }
17085 int
17086 main (void)
17087 {
17088 signal(SIGINT, handler);
17089                  x = 1
17090   ;
17091   return 0;
17092 }
17093 _ACEOF
17094 rm -f conftest.$ac_objext
17095 if { (eval echo "$as_me:17095: \"$ac_compile\"") >&5
17096   (eval $ac_compile) 2>&5
17097   ac_status=$?
17098   echo "$as_me:17098: \$? = $ac_status" >&5
17099   (exit $ac_status); } &&
17100          { ac_try='test -s conftest.$ac_objext'
17101   { (eval echo "$as_me:17101: \"$ac_try\"") >&5
17102   (eval $ac_try) 2>&5
17103   ac_status=$?
17104   echo "$as_me:17104: \$? = $ac_status" >&5
17105   (exit $ac_status); }; }; then
17106   cf_cv_sig_atomic_t=$cf_type
17107 else
17108   echo "$as_me: failed program was:" >&5
17109 cat conftest.$ac_ext >&5
17110 cf_cv_sig_atomic_t=no
17111 fi
17112 rm -f conftest.$ac_objext conftest.$ac_ext
17113                 test "$cf_cv_sig_atomic_t" != no && break
17114         done
17115
17116 fi
17117
17118 echo "$as_me:17118: result: $cf_cv_sig_atomic_t" >&5
17119 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
17120 test "$cf_cv_sig_atomic_t" != no &&
17121 cat >>confdefs.h <<EOF
17122 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
17123 EOF
17124
17125 if test $NCURSES_CHTYPE = auto ; then
17126
17127 echo "$as_me:17127: checking for type of chtype" >&5
17128 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
17129 if test "${cf_cv_typeof_chtype+set}" = set; then
17130   echo $ECHO_N "(cached) $ECHO_C" >&6
17131 else
17132
17133                 if test "$cross_compiling" = yes; then
17134   cf_cv_typeof_chtype=long
17135 else
17136   cat >conftest.$ac_ext <<_ACEOF
17137 #line 17137 "configure"
17138 #include "confdefs.h"
17139
17140 #define WANT_BITS 31
17141 #include <stdio.h>
17142 int main(void)
17143 {
17144         FILE *fp = fopen("cf_test.out", "w");
17145         if (fp != 0) {
17146                 char *result = "long";
17147                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
17148                         int n;
17149                         unsigned int x, y;
17150                         for (n = 0; n < WANT_BITS; n++) {
17151                                 x = (1 << n);
17152                                 y = (x >> n);
17153                                 if (y != 1 || x == 0) {
17154                                         x = 0;
17155                                         break;
17156                                 }
17157                         }
17158                         /*
17159                          * If x is nonzero, an int is big enough for the bits
17160                          * that we want.
17161                          */
17162                         result = (x != 0) ? "int" : "long";
17163                 }
17164                 fputs(result, fp);
17165                 fclose(fp);
17166         }
17167         ${cf_cv_main_return:-return}(0);
17168 }
17169
17170 _ACEOF
17171 rm -f conftest$ac_exeext
17172 if { (eval echo "$as_me:17172: \"$ac_link\"") >&5
17173   (eval $ac_link) 2>&5
17174   ac_status=$?
17175   echo "$as_me:17175: \$? = $ac_status" >&5
17176   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17177   { (eval echo "$as_me:17177: \"$ac_try\"") >&5
17178   (eval $ac_try) 2>&5
17179   ac_status=$?
17180   echo "$as_me:17180: \$? = $ac_status" >&5
17181   (exit $ac_status); }; }; then
17182   cf_cv_typeof_chtype=`cat cf_test.out`
17183 else
17184   echo "$as_me: program exited with status $ac_status" >&5
17185 echo "$as_me: failed program was:" >&5
17186 cat conftest.$ac_ext >&5
17187 cf_cv_typeof_chtype=long
17188 fi
17189 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17190 fi
17191                 rm -f cf_test.out
17192
17193 fi
17194
17195 echo "$as_me:17195: result: $cf_cv_typeof_chtype" >&5
17196 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17197
17198 cat >>confdefs.h <<EOF
17199 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17200 EOF
17201
17202 else
17203         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17204 fi
17205 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17206
17207 echo "$as_me:17207: checking if unsigned literals are legal" >&5
17208 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17209 if test "${cf_cv_unsigned_literals+set}" = set; then
17210   echo $ECHO_N "(cached) $ECHO_C" >&6
17211 else
17212
17213         cat >conftest.$ac_ext <<_ACEOF
17214 #line 17214 "configure"
17215 #include "confdefs.h"
17216
17217 int
17218 main (void)
17219 {
17220 long x = 1L + 1UL + 1U + 1
17221   ;
17222   return 0;
17223 }
17224 _ACEOF
17225 rm -f conftest.$ac_objext
17226 if { (eval echo "$as_me:17226: \"$ac_compile\"") >&5
17227   (eval $ac_compile) 2>&5
17228   ac_status=$?
17229   echo "$as_me:17229: \$? = $ac_status" >&5
17230   (exit $ac_status); } &&
17231          { ac_try='test -s conftest.$ac_objext'
17232   { (eval echo "$as_me:17232: \"$ac_try\"") >&5
17233   (eval $ac_try) 2>&5
17234   ac_status=$?
17235   echo "$as_me:17235: \$? = $ac_status" >&5
17236   (exit $ac_status); }; }; then
17237   cf_cv_unsigned_literals=yes
17238 else
17239   echo "$as_me: failed program was:" >&5
17240 cat conftest.$ac_ext >&5
17241 cf_cv_unsigned_literals=no
17242 fi
17243 rm -f conftest.$ac_objext conftest.$ac_ext
17244
17245 fi
17246
17247 echo "$as_me:17247: result: $cf_cv_unsigned_literals" >&5
17248 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17249
17250 cf_cv_1UL="1"
17251 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17252 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17253
17254 if test $NCURSES_MMASK_T = auto ; then
17255         cf_cv_typeof_mmask_t=long
17256 else
17257         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17258 fi
17259 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17260
17261 ###     Checks for external-data
17262
17263 echo "$as_me:17263: checking if external errno is declared" >&5
17264 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17265 if test "${cf_cv_dcl_errno+set}" = set; then
17266   echo $ECHO_N "(cached) $ECHO_C" >&6
17267 else
17268
17269         cat >conftest.$ac_ext <<_ACEOF
17270 #line 17270 "configure"
17271 #include "confdefs.h"
17272
17273 #ifdef HAVE_STDLIB_H
17274 #include <stdlib.h>
17275 #endif
17276 #include <stdio.h>
17277 #include <sys/types.h>
17278 #include <errno.h>
17279 int
17280 main (void)
17281 {
17282 int x = (int) errno
17283   ;
17284   return 0;
17285 }
17286 _ACEOF
17287 rm -f conftest.$ac_objext
17288 if { (eval echo "$as_me:17288: \"$ac_compile\"") >&5
17289   (eval $ac_compile) 2>&5
17290   ac_status=$?
17291   echo "$as_me:17291: \$? = $ac_status" >&5
17292   (exit $ac_status); } &&
17293          { ac_try='test -s conftest.$ac_objext'
17294   { (eval echo "$as_me:17294: \"$ac_try\"") >&5
17295   (eval $ac_try) 2>&5
17296   ac_status=$?
17297   echo "$as_me:17297: \$? = $ac_status" >&5
17298   (exit $ac_status); }; }; then
17299   cf_cv_dcl_errno=yes
17300 else
17301   echo "$as_me: failed program was:" >&5
17302 cat conftest.$ac_ext >&5
17303 cf_cv_dcl_errno=no
17304 fi
17305 rm -f conftest.$ac_objext conftest.$ac_ext
17306
17307 fi
17308 echo "$as_me:17308: result: $cf_cv_dcl_errno" >&5
17309 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17310
17311 if test "$cf_cv_dcl_errno" = no ; then
17312
17313 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17314
17315         cat >>confdefs.h <<EOF
17316 #define $cf_result 1
17317 EOF
17318
17319 fi
17320
17321 # It's possible (for near-UNIX clones) that the data doesn't exist
17322
17323 echo "$as_me:17323: checking if external errno exists" >&5
17324 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17325 if test "${cf_cv_have_errno+set}" = set; then
17326   echo $ECHO_N "(cached) $ECHO_C" >&6
17327 else
17328
17329         cat >conftest.$ac_ext <<_ACEOF
17330 #line 17330 "configure"
17331 #include "confdefs.h"
17332
17333 #undef errno
17334 extern int errno;
17335
17336 int
17337 main (void)
17338 {
17339 errno = 2
17340   ;
17341   return 0;
17342 }
17343 _ACEOF
17344 rm -f conftest.$ac_objext conftest$ac_exeext
17345 if { (eval echo "$as_me:17345: \"$ac_link\"") >&5
17346   (eval $ac_link) 2>&5
17347   ac_status=$?
17348   echo "$as_me:17348: \$? = $ac_status" >&5
17349   (exit $ac_status); } &&
17350          { ac_try='test -s conftest$ac_exeext'
17351   { (eval echo "$as_me:17351: \"$ac_try\"") >&5
17352   (eval $ac_try) 2>&5
17353   ac_status=$?
17354   echo "$as_me:17354: \$? = $ac_status" >&5
17355   (exit $ac_status); }; }; then
17356   cf_cv_have_errno=yes
17357 else
17358   echo "$as_me: failed program was:" >&5
17359 cat conftest.$ac_ext >&5
17360 cf_cv_have_errno=no
17361 fi
17362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17363
17364 fi
17365 echo "$as_me:17365: result: $cf_cv_have_errno" >&5
17366 echo "${ECHO_T}$cf_cv_have_errno" >&6
17367
17368 if test "$cf_cv_have_errno" = yes ; then
17369
17370 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17371
17372         cat >>confdefs.h <<EOF
17373 #define $cf_result 1
17374 EOF
17375
17376 fi
17377
17378 echo "$as_me:17378: checking if data-only library module links" >&5
17379 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17380 if test "${cf_cv_link_dataonly+set}" = set; then
17381   echo $ECHO_N "(cached) $ECHO_C" >&6
17382 else
17383
17384         rm -f conftest.a
17385         cat >conftest.$ac_ext <<EOF
17386 #line 17386 "configure"
17387 int     testdata[3] = { 123, 456, 789 };
17388 EOF
17389         if { (eval echo "$as_me:17389: \"$ac_compile\"") >&5
17390   (eval $ac_compile) 2>&5
17391   ac_status=$?
17392   echo "$as_me:17392: \$? = $ac_status" >&5
17393   (exit $ac_status); } ; then
17394                 mv conftest.o data.o && \
17395                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17396         fi
17397         rm -f conftest.$ac_ext data.o
17398         cat >conftest.$ac_ext <<EOF
17399 #line 17399 "configure"
17400 int     testfunc(void)
17401 {
17402 #if defined(NeXT)
17403         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17404 #else
17405         extern int testdata[3];
17406         return testdata[0] == 123
17407            &&  testdata[1] == 456
17408            &&  testdata[2] == 789;
17409 #endif
17410 }
17411 EOF
17412         if { (eval echo "$as_me:17412: \"$ac_compile\"") >&5
17413   (eval $ac_compile) 2>&5
17414   ac_status=$?
17415   echo "$as_me:17415: \$? = $ac_status" >&5
17416   (exit $ac_status); }; then
17417                 mv conftest.o func.o && \
17418                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17419         fi
17420         rm -f conftest.$ac_ext func.o
17421         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17422         cf_saveLIBS="$LIBS"
17423         LIBS="conftest.a $LIBS"
17424         if test "$cross_compiling" = yes; then
17425   cf_cv_link_dataonly=unknown
17426 else
17427   cat >conftest.$ac_ext <<_ACEOF
17428 #line 17428 "configure"
17429 #include "confdefs.h"
17430
17431         int main(void)
17432         {
17433                 extern int testfunc();
17434                 ${cf_cv_main_return:-return} (!testfunc());
17435         }
17436
17437 _ACEOF
17438 rm -f conftest$ac_exeext
17439 if { (eval echo "$as_me:17439: \"$ac_link\"") >&5
17440   (eval $ac_link) 2>&5
17441   ac_status=$?
17442   echo "$as_me:17442: \$? = $ac_status" >&5
17443   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17444   { (eval echo "$as_me:17444: \"$ac_try\"") >&5
17445   (eval $ac_try) 2>&5
17446   ac_status=$?
17447   echo "$as_me:17447: \$? = $ac_status" >&5
17448   (exit $ac_status); }; }; then
17449   cf_cv_link_dataonly=yes
17450 else
17451   echo "$as_me: program exited with status $ac_status" >&5
17452 echo "$as_me: failed program was:" >&5
17453 cat conftest.$ac_ext >&5
17454 cf_cv_link_dataonly=no
17455 fi
17456 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17457 fi
17458         LIBS="$cf_saveLIBS"
17459
17460 fi
17461
17462 echo "$as_me:17462: result: $cf_cv_link_dataonly" >&5
17463 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17464
17465 if test "$cf_cv_link_dataonly" = no ; then
17466
17467 cat >>confdefs.h <<\EOF
17468 #define BROKEN_LINKER 1
17469 EOF
17470
17471         BROKEN_LINKER=1
17472 fi
17473
17474 ###     Checks for library functions.
17475
17476 for ac_func in \
17477 getcwd \
17478 getegid \
17479 geteuid \
17480 getopt \
17481 getttynam \
17482 issetugid \
17483 poll \
17484 putenv \
17485 remove \
17486 select \
17487 setbuf \
17488 setbuffer \
17489 setenv \
17490 setvbuf \
17491 sigaction \
17492 sigvec \
17493 strdup \
17494 strstr \
17495 tcgetpgrp \
17496 tdestroy \
17497 times \
17498 tsearch \
17499 vsnprintf \
17500
17501 do
17502 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17503 echo "$as_me:17503: checking for $ac_func" >&5
17504 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17505 if eval "test \"\${$as_ac_var+set}\" = set"; then
17506   echo $ECHO_N "(cached) $ECHO_C" >&6
17507 else
17508   cat >conftest.$ac_ext <<_ACEOF
17509 #line 17509 "configure"
17510 #include "confdefs.h"
17511 /* System header to define __stub macros and hopefully few prototypes,
17512     which can conflict with char $ac_func (); below.  */
17513 #include <assert.h>
17514 /* Override any gcc2 internal prototype to avoid an error.  */
17515 #ifdef __cplusplus
17516 extern "C"
17517 #endif
17518 /* We use char because int might match the return type of a gcc2
17519    builtin and then its argument prototype would still apply.  */
17520 char $ac_func ();
17521 char (*f) ();
17522
17523 int
17524 main (void)
17525 {
17526 /* The GNU C library defines this for functions which it implements
17527     to always fail with ENOSYS.  Some functions are actually named
17528     something starting with __ and the normal name is an alias.  */
17529 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17530 choke me
17531 #else
17532 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17533 #endif
17534
17535   ;
17536   return 0;
17537 }
17538 _ACEOF
17539 rm -f conftest.$ac_objext conftest$ac_exeext
17540 if { (eval echo "$as_me:17540: \"$ac_link\"") >&5
17541   (eval $ac_link) 2>&5
17542   ac_status=$?
17543   echo "$as_me:17543: \$? = $ac_status" >&5
17544   (exit $ac_status); } &&
17545          { ac_try='test -s conftest$ac_exeext'
17546   { (eval echo "$as_me:17546: \"$ac_try\"") >&5
17547   (eval $ac_try) 2>&5
17548   ac_status=$?
17549   echo "$as_me:17549: \$? = $ac_status" >&5
17550   (exit $ac_status); }; }; then
17551   eval "$as_ac_var=yes"
17552 else
17553   echo "$as_me: failed program was:" >&5
17554 cat conftest.$ac_ext >&5
17555 eval "$as_ac_var=no"
17556 fi
17557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17558 fi
17559 echo "$as_me:17559: result: `eval echo '${'$as_ac_var'}'`" >&5
17560 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17561 if test `eval echo '${'$as_ac_var'}'` = yes; then
17562   cat >>confdefs.h <<EOF
17563 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17564 EOF
17565
17566 fi
17567 done
17568
17569 if test "x$ac_cv_func_getopt" = xno && \
17570    test "x$cf_with_progs$cf_with_tests" != xnono; then
17571         { { echo "$as_me:17571: error: getopt is required for building programs" >&5
17572 echo "$as_me: error: getopt is required for building programs" >&2;}
17573    { (exit 1); exit 1; }; }
17574 fi
17575
17576 if test "x$with_safe_sprintf" = xyes
17577 then
17578         if test "x$ac_cv_func_vsnprintf" = xyes
17579         then
17580                 { echo "$as_me:17580: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
17581 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
17582         else
17583
17584 cat >>confdefs.h <<\EOF
17585 #define USE_SAFE_SPRINTF 1
17586 EOF
17587
17588         fi
17589 fi
17590
17591 if test "x$with_getcap" = "xyes" ; then
17592
17593 echo "$as_me:17593: checking for terminal-capability database functions" >&5
17594 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17595 if test "${cf_cv_cgetent+set}" = set; then
17596   echo $ECHO_N "(cached) $ECHO_C" >&6
17597 else
17598
17599 cat >conftest.$ac_ext <<_ACEOF
17600 #line 17600 "configure"
17601 #include "confdefs.h"
17602
17603 #include <stdlib.h>
17604 int
17605 main (void)
17606 {
17607
17608         char temp[128];
17609         char *buf = temp;
17610         char *db_array = temp;
17611         cgetent(&buf, &db_array, "vt100");
17612         cgetcap(buf, "tc", '=');
17613         cgetmatch(buf, "tc");
17614
17615   ;
17616   return 0;
17617 }
17618 _ACEOF
17619 rm -f conftest.$ac_objext conftest$ac_exeext
17620 if { (eval echo "$as_me:17620: \"$ac_link\"") >&5
17621   (eval $ac_link) 2>&5
17622   ac_status=$?
17623   echo "$as_me:17623: \$? = $ac_status" >&5
17624   (exit $ac_status); } &&
17625          { ac_try='test -s conftest$ac_exeext'
17626   { (eval echo "$as_me:17626: \"$ac_try\"") >&5
17627   (eval $ac_try) 2>&5
17628   ac_status=$?
17629   echo "$as_me:17629: \$? = $ac_status" >&5
17630   (exit $ac_status); }; }; then
17631   cf_cv_cgetent=yes
17632 else
17633   echo "$as_me: failed program was:" >&5
17634 cat conftest.$ac_ext >&5
17635 cf_cv_cgetent=no
17636 fi
17637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17638
17639 fi
17640 echo "$as_me:17640: result: $cf_cv_cgetent" >&5
17641 echo "${ECHO_T}$cf_cv_cgetent" >&6
17642
17643 if test "$cf_cv_cgetent" = yes
17644 then
17645
17646 cat >>confdefs.h <<\EOF
17647 #define HAVE_BSD_CGETENT 1
17648 EOF
17649
17650 echo "$as_me:17650: checking if cgetent uses const parameter" >&5
17651 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17652 if test "${cf_cv_cgetent_const+set}" = set; then
17653   echo $ECHO_N "(cached) $ECHO_C" >&6
17654 else
17655
17656 cat >conftest.$ac_ext <<_ACEOF
17657 #line 17657 "configure"
17658 #include "confdefs.h"
17659
17660 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17661 #include <stdlib.h>
17662 int
17663 main (void)
17664 {
17665
17666         char temp[128];
17667         char *buf = temp;
17668 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17669         const char *db_array = temp;
17670         cgetent(&buf, &db_array, "vt100");
17671 #endif
17672         cgetcap(buf, "tc", '=');
17673         cgetmatch(buf, "tc");
17674
17675   ;
17676   return 0;
17677 }
17678 _ACEOF
17679 rm -f conftest.$ac_objext conftest$ac_exeext
17680 if { (eval echo "$as_me:17680: \"$ac_link\"") >&5
17681   (eval $ac_link) 2>&5
17682   ac_status=$?
17683   echo "$as_me:17683: \$? = $ac_status" >&5
17684   (exit $ac_status); } &&
17685          { ac_try='test -s conftest$ac_exeext'
17686   { (eval echo "$as_me:17686: \"$ac_try\"") >&5
17687   (eval $ac_try) 2>&5
17688   ac_status=$?
17689   echo "$as_me:17689: \$? = $ac_status" >&5
17690   (exit $ac_status); }; }; then
17691   cf_cv_cgetent_const=yes
17692 else
17693   echo "$as_me: failed program was:" >&5
17694 cat conftest.$ac_ext >&5
17695 cf_cv_cgetent_const=no
17696 fi
17697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17698
17699 fi
17700 echo "$as_me:17700: result: $cf_cv_cgetent_const" >&5
17701 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17702         if test "$cf_cv_cgetent_const" = yes
17703         then
17704
17705 cat >>confdefs.h <<EOF
17706 #define CGETENT_CONST const
17707 EOF
17708
17709         fi
17710 fi
17711
17712 fi
17713
17714 echo "$as_me:17714: checking for isascii" >&5
17715 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17716 if test "${cf_cv_have_isascii+set}" = set; then
17717   echo $ECHO_N "(cached) $ECHO_C" >&6
17718 else
17719
17720         cat >conftest.$ac_ext <<_ACEOF
17721 #line 17721 "configure"
17722 #include "confdefs.h"
17723 #include <ctype.h>
17724 int
17725 main (void)
17726 {
17727 int x = isascii(' ')
17728   ;
17729   return 0;
17730 }
17731 _ACEOF
17732 rm -f conftest.$ac_objext conftest$ac_exeext
17733 if { (eval echo "$as_me:17733: \"$ac_link\"") >&5
17734   (eval $ac_link) 2>&5
17735   ac_status=$?
17736   echo "$as_me:17736: \$? = $ac_status" >&5
17737   (exit $ac_status); } &&
17738          { ac_try='test -s conftest$ac_exeext'
17739   { (eval echo "$as_me:17739: \"$ac_try\"") >&5
17740   (eval $ac_try) 2>&5
17741   ac_status=$?
17742   echo "$as_me:17742: \$? = $ac_status" >&5
17743   (exit $ac_status); }; }; then
17744   cf_cv_have_isascii=yes
17745 else
17746   echo "$as_me: failed program was:" >&5
17747 cat conftest.$ac_ext >&5
17748 cf_cv_have_isascii=no
17749 fi
17750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17751
17752 fi
17753 echo "$as_me:17753: result: $cf_cv_have_isascii" >&5
17754 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17755 test "$cf_cv_have_isascii" = yes &&
17756 cat >>confdefs.h <<\EOF
17757 #define HAVE_ISASCII 1
17758 EOF
17759
17760 if test "$ac_cv_func_sigaction" = yes; then
17761 echo "$as_me:17761: checking whether sigaction needs _POSIX_SOURCE" >&5
17762 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17763 cat >conftest.$ac_ext <<_ACEOF
17764 #line 17764 "configure"
17765 #include "confdefs.h"
17766
17767 #include <sys/types.h>
17768 #include <signal.h>
17769 int
17770 main (void)
17771 {
17772 struct sigaction act
17773   ;
17774   return 0;
17775 }
17776 _ACEOF
17777 rm -f conftest.$ac_objext
17778 if { (eval echo "$as_me:17778: \"$ac_compile\"") >&5
17779   (eval $ac_compile) 2>&5
17780   ac_status=$?
17781   echo "$as_me:17781: \$? = $ac_status" >&5
17782   (exit $ac_status); } &&
17783          { ac_try='test -s conftest.$ac_objext'
17784   { (eval echo "$as_me:17784: \"$ac_try\"") >&5
17785   (eval $ac_try) 2>&5
17786   ac_status=$?
17787   echo "$as_me:17787: \$? = $ac_status" >&5
17788   (exit $ac_status); }; }; then
17789   sigact_bad=no
17790 else
17791   echo "$as_me: failed program was:" >&5
17792 cat conftest.$ac_ext >&5
17793
17794 cat >conftest.$ac_ext <<_ACEOF
17795 #line 17795 "configure"
17796 #include "confdefs.h"
17797
17798 #define _POSIX_SOURCE
17799 #include <sys/types.h>
17800 #include <signal.h>
17801 int
17802 main (void)
17803 {
17804 struct sigaction act
17805   ;
17806   return 0;
17807 }
17808 _ACEOF
17809 rm -f conftest.$ac_objext
17810 if { (eval echo "$as_me:17810: \"$ac_compile\"") >&5
17811   (eval $ac_compile) 2>&5
17812   ac_status=$?
17813   echo "$as_me:17813: \$? = $ac_status" >&5
17814   (exit $ac_status); } &&
17815          { ac_try='test -s conftest.$ac_objext'
17816   { (eval echo "$as_me:17816: \"$ac_try\"") >&5
17817   (eval $ac_try) 2>&5
17818   ac_status=$?
17819   echo "$as_me:17819: \$? = $ac_status" >&5
17820   (exit $ac_status); }; }; then
17821   sigact_bad=yes
17822
17823 cat >>confdefs.h <<\EOF
17824 #define _POSIX_SOURCE 1
17825 EOF
17826
17827 else
17828   echo "$as_me: failed program was:" >&5
17829 cat conftest.$ac_ext >&5
17830 sigact_bad=unknown
17831 fi
17832 rm -f conftest.$ac_objext conftest.$ac_ext
17833 fi
17834 rm -f conftest.$ac_objext conftest.$ac_ext
17835 echo "$as_me:17835: result: $sigact_bad" >&5
17836 echo "${ECHO_T}$sigact_bad" >&6
17837 fi
17838
17839 echo "$as_me:17839: checking if nanosleep really works" >&5
17840 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17841 if test "${cf_cv_func_nanosleep+set}" = set; then
17842   echo $ECHO_N "(cached) $ECHO_C" >&6
17843 else
17844
17845 if test "$cross_compiling" = yes; then
17846   cf_cv_func_nanosleep=unknown
17847 else
17848   cat >conftest.$ac_ext <<_ACEOF
17849 #line 17849 "configure"
17850 #include "confdefs.h"
17851
17852 #include <stdio.h>
17853 #include <errno.h>
17854 #include <time.h>
17855
17856 #ifdef HAVE_SYS_TIME_H
17857 #include <sys/time.h>
17858 #endif
17859
17860 int main(void) {
17861         struct timespec ts1, ts2;
17862         int code;
17863         ts1.tv_sec  = 0;
17864         ts1.tv_nsec = 750000000;
17865         ts2.tv_sec  = 0;
17866         ts2.tv_nsec = 0;
17867         errno = 0;
17868         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17869         ${cf_cv_main_return:-return}(code != 0);
17870 }
17871
17872 _ACEOF
17873 rm -f conftest$ac_exeext
17874 if { (eval echo "$as_me:17874: \"$ac_link\"") >&5
17875   (eval $ac_link) 2>&5
17876   ac_status=$?
17877   echo "$as_me:17877: \$? = $ac_status" >&5
17878   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17879   { (eval echo "$as_me:17879: \"$ac_try\"") >&5
17880   (eval $ac_try) 2>&5
17881   ac_status=$?
17882   echo "$as_me:17882: \$? = $ac_status" >&5
17883   (exit $ac_status); }; }; then
17884   cf_cv_func_nanosleep=yes
17885 else
17886   echo "$as_me: program exited with status $ac_status" >&5
17887 echo "$as_me: failed program was:" >&5
17888 cat conftest.$ac_ext >&5
17889 cf_cv_func_nanosleep=no
17890 fi
17891 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17892 fi
17893 fi
17894 echo "$as_me:17894: result: $cf_cv_func_nanosleep" >&5
17895 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17896
17897 test "$cf_cv_func_nanosleep" = "yes" &&
17898 cat >>confdefs.h <<\EOF
17899 #define HAVE_NANOSLEEP 1
17900 EOF
17901
17902 for ac_header in \
17903 termio.h \
17904 termios.h \
17905 unistd.h \
17906
17907 do
17908 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17909 echo "$as_me:17909: checking for $ac_header" >&5
17910 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17911 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17912   echo $ECHO_N "(cached) $ECHO_C" >&6
17913 else
17914   cat >conftest.$ac_ext <<_ACEOF
17915 #line 17915 "configure"
17916 #include "confdefs.h"
17917 #include <$ac_header>
17918 _ACEOF
17919 if { (eval echo "$as_me:17919: \"$ac_cpp conftest.$ac_ext\"") >&5
17920   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17921   ac_status=$?
17922   egrep -v '^ *\+' conftest.er1 >conftest.err
17923   rm -f conftest.er1
17924   cat conftest.err >&5
17925   echo "$as_me:17925: \$? = $ac_status" >&5
17926   (exit $ac_status); } >/dev/null; then
17927   if test -s conftest.err; then
17928     ac_cpp_err=$ac_c_preproc_warn_flag
17929   else
17930     ac_cpp_err=
17931   fi
17932 else
17933   ac_cpp_err=yes
17934 fi
17935 if test -z "$ac_cpp_err"; then
17936   eval "$as_ac_Header=yes"
17937 else
17938   echo "$as_me: failed program was:" >&5
17939   cat conftest.$ac_ext >&5
17940   eval "$as_ac_Header=no"
17941 fi
17942 rm -f conftest.err conftest.$ac_ext
17943 fi
17944 echo "$as_me:17944: result: `eval echo '${'$as_ac_Header'}'`" >&5
17945 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17946 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17947   cat >>confdefs.h <<EOF
17948 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17949 EOF
17950
17951 fi
17952 done
17953
17954 if test "$ISC" = yes ; then
17955
17956 for ac_header in sys/termio.h
17957 do
17958 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17959 echo "$as_me:17959: checking for $ac_header" >&5
17960 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17961 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17962   echo $ECHO_N "(cached) $ECHO_C" >&6
17963 else
17964   cat >conftest.$ac_ext <<_ACEOF
17965 #line 17965 "configure"
17966 #include "confdefs.h"
17967 #include <$ac_header>
17968 _ACEOF
17969 if { (eval echo "$as_me:17969: \"$ac_cpp conftest.$ac_ext\"") >&5
17970   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17971   ac_status=$?
17972   egrep -v '^ *\+' conftest.er1 >conftest.err
17973   rm -f conftest.er1
17974   cat conftest.err >&5
17975   echo "$as_me:17975: \$? = $ac_status" >&5
17976   (exit $ac_status); } >/dev/null; then
17977   if test -s conftest.err; then
17978     ac_cpp_err=$ac_c_preproc_warn_flag
17979   else
17980     ac_cpp_err=
17981   fi
17982 else
17983   ac_cpp_err=yes
17984 fi
17985 if test -z "$ac_cpp_err"; then
17986   eval "$as_ac_Header=yes"
17987 else
17988   echo "$as_me: failed program was:" >&5
17989   cat conftest.$ac_ext >&5
17990   eval "$as_ac_Header=no"
17991 fi
17992 rm -f conftest.err conftest.$ac_ext
17993 fi
17994 echo "$as_me:17994: result: `eval echo '${'$as_ac_Header'}'`" >&5
17995 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17996 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17997   cat >>confdefs.h <<EOF
17998 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17999 EOF
18000
18001 fi
18002 done
18003
18004 fi
18005 if test "$ac_cv_header_termios_h" = yes ; then
18006         case "$CFLAGS $CPPFLAGS" in
18007         (*-D_POSIX_SOURCE*)
18008                 termios_bad=dunno ;;
18009         (*)     termios_bad=maybe ;;
18010         esac
18011         if test "$termios_bad" = maybe ; then
18012         echo "$as_me:18012: checking whether termios.h needs _POSIX_SOURCE" >&5
18013 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
18014         cat >conftest.$ac_ext <<_ACEOF
18015 #line 18015 "configure"
18016 #include "confdefs.h"
18017 #include <termios.h>
18018 int
18019 main (void)
18020 {
18021 struct termios foo; int x = foo.c_iflag
18022   ;
18023   return 0;
18024 }
18025 _ACEOF
18026 rm -f conftest.$ac_objext
18027 if { (eval echo "$as_me:18027: \"$ac_compile\"") >&5
18028   (eval $ac_compile) 2>&5
18029   ac_status=$?
18030   echo "$as_me:18030: \$? = $ac_status" >&5
18031   (exit $ac_status); } &&
18032          { ac_try='test -s conftest.$ac_objext'
18033   { (eval echo "$as_me:18033: \"$ac_try\"") >&5
18034   (eval $ac_try) 2>&5
18035   ac_status=$?
18036   echo "$as_me:18036: \$? = $ac_status" >&5
18037   (exit $ac_status); }; }; then
18038   termios_bad=no
18039 else
18040   echo "$as_me: failed program was:" >&5
18041 cat conftest.$ac_ext >&5
18042
18043                 cat >conftest.$ac_ext <<_ACEOF
18044 #line 18044 "configure"
18045 #include "confdefs.h"
18046
18047 #define _POSIX_SOURCE
18048 #include <termios.h>
18049 int
18050 main (void)
18051 {
18052 struct termios foo; int x = foo.c_iflag
18053   ;
18054   return 0;
18055 }
18056 _ACEOF
18057 rm -f conftest.$ac_objext
18058 if { (eval echo "$as_me:18058: \"$ac_compile\"") >&5
18059   (eval $ac_compile) 2>&5
18060   ac_status=$?
18061   echo "$as_me:18061: \$? = $ac_status" >&5
18062   (exit $ac_status); } &&
18063          { ac_try='test -s conftest.$ac_objext'
18064   { (eval echo "$as_me:18064: \"$ac_try\"") >&5
18065   (eval $ac_try) 2>&5
18066   ac_status=$?
18067   echo "$as_me:18067: \$? = $ac_status" >&5
18068   (exit $ac_status); }; }; then
18069   termios_bad=unknown
18070 else
18071   echo "$as_me: failed program was:" >&5
18072 cat conftest.$ac_ext >&5
18073 termios_bad=yes
18074 cat >>confdefs.h <<\EOF
18075 #define _POSIX_SOURCE 1
18076 EOF
18077
18078 fi
18079 rm -f conftest.$ac_objext conftest.$ac_ext
18080
18081 fi
18082 rm -f conftest.$ac_objext conftest.$ac_ext
18083         echo "$as_me:18083: result: $termios_bad" >&5
18084 echo "${ECHO_T}$termios_bad" >&6
18085         fi
18086 fi
18087
18088 echo "$as_me:18088: checking for tcgetattr" >&5
18089 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
18090 if test "${cf_cv_have_tcgetattr+set}" = set; then
18091   echo $ECHO_N "(cached) $ECHO_C" >&6
18092 else
18093
18094 cat >conftest.$ac_ext <<_ACEOF
18095 #line 18095 "configure"
18096 #include "confdefs.h"
18097
18098 #include <sys/types.h>
18099 #ifdef HAVE_UNISTD_H
18100 #include <unistd.h>
18101 #endif
18102 #ifdef HAVE_TERMIOS_H
18103 #include <termios.h>
18104 #define TTY struct termios
18105 #else
18106 #ifdef HAVE_TERMIO_H
18107 #include <termio.h>
18108 #define TTY struct termio
18109 #endif
18110 #endif
18111
18112 int
18113 main (void)
18114 {
18115
18116 TTY foo;
18117 tcgetattr(1, &foo);
18118   ;
18119   return 0;
18120 }
18121 _ACEOF
18122 rm -f conftest.$ac_objext conftest$ac_exeext
18123 if { (eval echo "$as_me:18123: \"$ac_link\"") >&5
18124   (eval $ac_link) 2>&5
18125   ac_status=$?
18126   echo "$as_me:18126: \$? = $ac_status" >&5
18127   (exit $ac_status); } &&
18128          { ac_try='test -s conftest$ac_exeext'
18129   { (eval echo "$as_me:18129: \"$ac_try\"") >&5
18130   (eval $ac_try) 2>&5
18131   ac_status=$?
18132   echo "$as_me:18132: \$? = $ac_status" >&5
18133   (exit $ac_status); }; }; then
18134   cf_cv_have_tcgetattr=yes
18135 else
18136   echo "$as_me: failed program was:" >&5
18137 cat conftest.$ac_ext >&5
18138 cf_cv_have_tcgetattr=no
18139 fi
18140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18141 fi
18142 echo "$as_me:18142: result: $cf_cv_have_tcgetattr" >&5
18143 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
18144 test "$cf_cv_have_tcgetattr" = yes &&
18145 cat >>confdefs.h <<\EOF
18146 #define HAVE_TCGETATTR 1
18147 EOF
18148
18149 echo "$as_me:18149: checking for vsscanf function or workaround" >&5
18150 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
18151 if test "${cf_cv_func_vsscanf+set}" = set; then
18152   echo $ECHO_N "(cached) $ECHO_C" >&6
18153 else
18154
18155 cat >conftest.$ac_ext <<_ACEOF
18156 #line 18156 "configure"
18157 #include "confdefs.h"
18158
18159 #include <stdarg.h>
18160 #include <stdio.h>
18161 int
18162 main (void)
18163 {
18164
18165         va_list ap;
18166         vsscanf("from", "%d", ap)
18167   ;
18168   return 0;
18169 }
18170 _ACEOF
18171 rm -f conftest.$ac_objext conftest$ac_exeext
18172 if { (eval echo "$as_me:18172: \"$ac_link\"") >&5
18173   (eval $ac_link) 2>&5
18174   ac_status=$?
18175   echo "$as_me:18175: \$? = $ac_status" >&5
18176   (exit $ac_status); } &&
18177          { ac_try='test -s conftest$ac_exeext'
18178   { (eval echo "$as_me:18178: \"$ac_try\"") >&5
18179   (eval $ac_try) 2>&5
18180   ac_status=$?
18181   echo "$as_me:18181: \$? = $ac_status" >&5
18182   (exit $ac_status); }; }; then
18183   cf_cv_func_vsscanf=vsscanf
18184 else
18185   echo "$as_me: failed program was:" >&5
18186 cat conftest.$ac_ext >&5
18187
18188 cat >conftest.$ac_ext <<_ACEOF
18189 #line 18189 "configure"
18190 #include "confdefs.h"
18191
18192 #include <stdarg.h>
18193 #include <stdio.h>
18194 int
18195 main (void)
18196 {
18197
18198         FILE strbuf;
18199         char *str = "from";
18200
18201         strbuf._flag = _IOREAD;
18202         strbuf._ptr = strbuf._base = (unsigned char *) str;
18203         strbuf._cnt = strlen(str);
18204         strbuf._file = _NFILE;
18205         return (vfscanf(&strbuf, "%d", ap))
18206   ;
18207   return 0;
18208 }
18209 _ACEOF
18210 rm -f conftest.$ac_objext conftest$ac_exeext
18211 if { (eval echo "$as_me:18211: \"$ac_link\"") >&5
18212   (eval $ac_link) 2>&5
18213   ac_status=$?
18214   echo "$as_me:18214: \$? = $ac_status" >&5
18215   (exit $ac_status); } &&
18216          { ac_try='test -s conftest$ac_exeext'
18217   { (eval echo "$as_me:18217: \"$ac_try\"") >&5
18218   (eval $ac_try) 2>&5
18219   ac_status=$?
18220   echo "$as_me:18220: \$? = $ac_status" >&5
18221   (exit $ac_status); }; }; then
18222   cf_cv_func_vsscanf=vfscanf
18223 else
18224   echo "$as_me: failed program was:" >&5
18225 cat conftest.$ac_ext >&5
18226
18227 cat >conftest.$ac_ext <<_ACEOF
18228 #line 18228 "configure"
18229 #include "confdefs.h"
18230
18231 #include <stdarg.h>
18232 #include <stdio.h>
18233 int
18234 main (void)
18235 {
18236
18237         FILE strbuf;
18238         char *str = "from";
18239
18240         strbuf._flag = _IOREAD;
18241         strbuf._ptr = strbuf._base = (unsigned char *) str;
18242         strbuf._cnt = strlen(str);
18243         strbuf._file = _NFILE;
18244         return (_doscan(&strbuf, "%d", ap))
18245   ;
18246   return 0;
18247 }
18248 _ACEOF
18249 rm -f conftest.$ac_objext conftest$ac_exeext
18250 if { (eval echo "$as_me:18250: \"$ac_link\"") >&5
18251   (eval $ac_link) 2>&5
18252   ac_status=$?
18253   echo "$as_me:18253: \$? = $ac_status" >&5
18254   (exit $ac_status); } &&
18255          { ac_try='test -s conftest$ac_exeext'
18256   { (eval echo "$as_me:18256: \"$ac_try\"") >&5
18257   (eval $ac_try) 2>&5
18258   ac_status=$?
18259   echo "$as_me:18259: \$? = $ac_status" >&5
18260   (exit $ac_status); }; }; then
18261   cf_cv_func_vsscanf=_doscan
18262 else
18263   echo "$as_me: failed program was:" >&5
18264 cat conftest.$ac_ext >&5
18265
18266 cf_cv_func_vsscanf=no
18267 fi
18268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18269 fi
18270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18271 fi
18272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18273 fi
18274 echo "$as_me:18274: result: $cf_cv_func_vsscanf" >&5
18275 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18276
18277 case $cf_cv_func_vsscanf in
18278 (vsscanf)
18279 cat >>confdefs.h <<\EOF
18280 #define HAVE_VSSCANF 1
18281 EOF
18282 ;;
18283 (vfscanf)
18284 cat >>confdefs.h <<\EOF
18285 #define HAVE_VFSCANF 1
18286 EOF
18287 ;;
18288 (_doscan)
18289 cat >>confdefs.h <<\EOF
18290 #define HAVE__DOSCAN 1
18291 EOF
18292 ;;
18293 esac
18294
18295 for ac_header in \
18296 unistd.h \
18297
18298 do
18299 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18300 echo "$as_me:18300: checking for $ac_header" >&5
18301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18302 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18303   echo $ECHO_N "(cached) $ECHO_C" >&6
18304 else
18305   cat >conftest.$ac_ext <<_ACEOF
18306 #line 18306 "configure"
18307 #include "confdefs.h"
18308 #include <$ac_header>
18309 _ACEOF
18310 if { (eval echo "$as_me:18310: \"$ac_cpp conftest.$ac_ext\"") >&5
18311   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18312   ac_status=$?
18313   egrep -v '^ *\+' conftest.er1 >conftest.err
18314   rm -f conftest.er1
18315   cat conftest.err >&5
18316   echo "$as_me:18316: \$? = $ac_status" >&5
18317   (exit $ac_status); } >/dev/null; then
18318   if test -s conftest.err; then
18319     ac_cpp_err=$ac_c_preproc_warn_flag
18320   else
18321     ac_cpp_err=
18322   fi
18323 else
18324   ac_cpp_err=yes
18325 fi
18326 if test -z "$ac_cpp_err"; then
18327   eval "$as_ac_Header=yes"
18328 else
18329   echo "$as_me: failed program was:" >&5
18330   cat conftest.$ac_ext >&5
18331   eval "$as_ac_Header=no"
18332 fi
18333 rm -f conftest.err conftest.$ac_ext
18334 fi
18335 echo "$as_me:18335: result: `eval echo '${'$as_ac_Header'}'`" >&5
18336 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18337 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18338   cat >>confdefs.h <<EOF
18339 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18340 EOF
18341
18342 fi
18343 done
18344
18345 echo "$as_me:18345: checking for working mkstemp" >&5
18346 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18347 if test "${cf_cv_func_mkstemp+set}" = set; then
18348   echo $ECHO_N "(cached) $ECHO_C" >&6
18349 else
18350
18351 rm -rf conftest*
18352 if test "$cross_compiling" = yes; then
18353   cf_cv_func_mkstemp=maybe
18354 else
18355   cat >conftest.$ac_ext <<_ACEOF
18356 #line 18356 "configure"
18357 #include "confdefs.h"
18358
18359 #include <sys/types.h>
18360 #ifdef HAVE_UNISTD_H
18361 #include <unistd.h>
18362 #endif
18363 #include <stdlib.h>
18364 #include <stdio.h>
18365 #include <string.h>
18366 #include <sys/stat.h>
18367 int main(void)
18368 {
18369         char *tmpl = "conftestXXXXXX";
18370         char name[2][80];
18371         int n;
18372         int result = 0;
18373         int fd;
18374         struct stat sb;
18375
18376         umask(077);
18377         for (n = 0; n < 2; ++n) {
18378                 strcpy(name[n], tmpl);
18379                 if ((fd = mkstemp(name[n])) >= 0) {
18380                         if (!strcmp(name[n], tmpl)
18381                          || stat(name[n], &sb) != 0
18382                          || (sb.st_mode & S_IFMT) != S_IFREG
18383                          || (sb.st_mode & 077) != 0) {
18384                                 result = 1;
18385                         }
18386                         close(fd);
18387                 }
18388         }
18389         if (result == 0
18390          && !strcmp(name[0], name[1]))
18391                 result = 1;
18392         ${cf_cv_main_return:-return}(result);
18393 }
18394
18395 _ACEOF
18396 rm -f conftest$ac_exeext
18397 if { (eval echo "$as_me:18397: \"$ac_link\"") >&5
18398   (eval $ac_link) 2>&5
18399   ac_status=$?
18400   echo "$as_me:18400: \$? = $ac_status" >&5
18401   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18402   { (eval echo "$as_me:18402: \"$ac_try\"") >&5
18403   (eval $ac_try) 2>&5
18404   ac_status=$?
18405   echo "$as_me:18405: \$? = $ac_status" >&5
18406   (exit $ac_status); }; }; then
18407   cf_cv_func_mkstemp=yes
18408
18409 else
18410   echo "$as_me: program exited with status $ac_status" >&5
18411 echo "$as_me: failed program was:" >&5
18412 cat conftest.$ac_ext >&5
18413 cf_cv_func_mkstemp=no
18414
18415 fi
18416 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18417 fi
18418
18419 fi
18420 echo "$as_me:18420: result: $cf_cv_func_mkstemp" >&5
18421 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18422 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18423         echo "$as_me:18423: checking for mkstemp" >&5
18424 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18425 if test "${ac_cv_func_mkstemp+set}" = set; then
18426   echo $ECHO_N "(cached) $ECHO_C" >&6
18427 else
18428   cat >conftest.$ac_ext <<_ACEOF
18429 #line 18429 "configure"
18430 #include "confdefs.h"
18431 /* System header to define __stub macros and hopefully few prototypes,
18432     which can conflict with char mkstemp (); below.  */
18433 #include <assert.h>
18434 /* Override any gcc2 internal prototype to avoid an error.  */
18435 #ifdef __cplusplus
18436 extern "C"
18437 #endif
18438 /* We use char because int might match the return type of a gcc2
18439    builtin and then its argument prototype would still apply.  */
18440 char mkstemp ();
18441 char (*f) ();
18442
18443 int
18444 main (void)
18445 {
18446 /* The GNU C library defines this for functions which it implements
18447     to always fail with ENOSYS.  Some functions are actually named
18448     something starting with __ and the normal name is an alias.  */
18449 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18450 choke me
18451 #else
18452 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18453 #endif
18454
18455   ;
18456   return 0;
18457 }
18458 _ACEOF
18459 rm -f conftest.$ac_objext conftest$ac_exeext
18460 if { (eval echo "$as_me:18460: \"$ac_link\"") >&5
18461   (eval $ac_link) 2>&5
18462   ac_status=$?
18463   echo "$as_me:18463: \$? = $ac_status" >&5
18464   (exit $ac_status); } &&
18465          { ac_try='test -s conftest$ac_exeext'
18466   { (eval echo "$as_me:18466: \"$ac_try\"") >&5
18467   (eval $ac_try) 2>&5
18468   ac_status=$?
18469   echo "$as_me:18469: \$? = $ac_status" >&5
18470   (exit $ac_status); }; }; then
18471   ac_cv_func_mkstemp=yes
18472 else
18473   echo "$as_me: failed program was:" >&5
18474 cat conftest.$ac_ext >&5
18475 ac_cv_func_mkstemp=no
18476 fi
18477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18478 fi
18479 echo "$as_me:18479: result: $ac_cv_func_mkstemp" >&5
18480 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18481
18482 fi
18483 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18484
18485 cat >>confdefs.h <<\EOF
18486 #define HAVE_MKSTEMP 1
18487 EOF
18488
18489 fi
18490
18491 # setup for prototype of fallback for vsscanf()
18492
18493 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18494         HAVE_VSSCANF=1
18495 else
18496         HAVE_VSSCANF=0
18497 fi
18498
18499 if test "x$cross_compiling" = xyes ; then
18500         { echo "$as_me:18500: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18501 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18502 else
18503         echo "$as_me:18503: checking whether setvbuf arguments are reversed" >&5
18504 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18505 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18506   echo $ECHO_N "(cached) $ECHO_C" >&6
18507 else
18508   if test "$cross_compiling" = yes; then
18509   { { echo "$as_me:18509: error: cannot run test program while cross compiling" >&5
18510 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18511    { (exit 1); exit 1; }; }
18512 else
18513   cat >conftest.$ac_ext <<_ACEOF
18514 #line 18514 "configure"
18515 #include "confdefs.h"
18516 #include <stdio.h>
18517 /* If setvbuf has the reversed format, exit 0. */
18518 int
18519 main (void)
18520 {
18521   /* This call has the arguments reversed.
18522      A reversed system may check and see that the address of main
18523      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18524   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18525     $ac_main_return(1);
18526   putc('\r', stdout);
18527   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18528 }
18529 _ACEOF
18530 rm -f conftest$ac_exeext
18531 if { (eval echo "$as_me:18531: \"$ac_link\"") >&5
18532   (eval $ac_link) 2>&5
18533   ac_status=$?
18534   echo "$as_me:18534: \$? = $ac_status" >&5
18535   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18536   { (eval echo "$as_me:18536: \"$ac_try\"") >&5
18537   (eval $ac_try) 2>&5
18538   ac_status=$?
18539   echo "$as_me:18539: \$? = $ac_status" >&5
18540   (exit $ac_status); }; }; then
18541   ac_cv_func_setvbuf_reversed=yes
18542 else
18543   echo "$as_me: program exited with status $ac_status" >&5
18544 echo "$as_me: failed program was:" >&5
18545 cat conftest.$ac_ext >&5
18546 ac_cv_func_setvbuf_reversed=no
18547 fi
18548 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18549 fi
18550 rm -f core core.* *.core
18551 fi
18552 echo "$as_me:18552: result: $ac_cv_func_setvbuf_reversed" >&5
18553 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18554 if test $ac_cv_func_setvbuf_reversed = yes; then
18555
18556 cat >>confdefs.h <<\EOF
18557 #define SETVBUF_REVERSED 1
18558 EOF
18559
18560 fi
18561
18562 fi
18563 echo "$as_me:18563: checking for intptr_t" >&5
18564 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18565 if test "${ac_cv_type_intptr_t+set}" = set; then
18566   echo $ECHO_N "(cached) $ECHO_C" >&6
18567 else
18568   cat >conftest.$ac_ext <<_ACEOF
18569 #line 18569 "configure"
18570 #include "confdefs.h"
18571 $ac_includes_default
18572 int
18573 main (void)
18574 {
18575 if ((intptr_t *) 0)
18576   return 0;
18577 if (sizeof (intptr_t))
18578   return 0;
18579   ;
18580   return 0;
18581 }
18582 _ACEOF
18583 rm -f conftest.$ac_objext
18584 if { (eval echo "$as_me:18584: \"$ac_compile\"") >&5
18585   (eval $ac_compile) 2>&5
18586   ac_status=$?
18587   echo "$as_me:18587: \$? = $ac_status" >&5
18588   (exit $ac_status); } &&
18589          { ac_try='test -s conftest.$ac_objext'
18590   { (eval echo "$as_me:18590: \"$ac_try\"") >&5
18591   (eval $ac_try) 2>&5
18592   ac_status=$?
18593   echo "$as_me:18593: \$? = $ac_status" >&5
18594   (exit $ac_status); }; }; then
18595   ac_cv_type_intptr_t=yes
18596 else
18597   echo "$as_me: failed program was:" >&5
18598 cat conftest.$ac_ext >&5
18599 ac_cv_type_intptr_t=no
18600 fi
18601 rm -f conftest.$ac_objext conftest.$ac_ext
18602 fi
18603 echo "$as_me:18603: result: $ac_cv_type_intptr_t" >&5
18604 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18605 if test $ac_cv_type_intptr_t = yes; then
18606   :
18607 else
18608
18609 cat >>confdefs.h <<EOF
18610 #define intptr_t long
18611 EOF
18612
18613 fi
18614
18615 echo "$as_me:18615: checking for ssize_t" >&5
18616 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18617 if test "${ac_cv_type_ssize_t+set}" = set; then
18618   echo $ECHO_N "(cached) $ECHO_C" >&6
18619 else
18620   cat >conftest.$ac_ext <<_ACEOF
18621 #line 18621 "configure"
18622 #include "confdefs.h"
18623 $ac_includes_default
18624 int
18625 main (void)
18626 {
18627 if ((ssize_t *) 0)
18628   return 0;
18629 if (sizeof (ssize_t))
18630   return 0;
18631   ;
18632   return 0;
18633 }
18634 _ACEOF
18635 rm -f conftest.$ac_objext
18636 if { (eval echo "$as_me:18636: \"$ac_compile\"") >&5
18637   (eval $ac_compile) 2>&5
18638   ac_status=$?
18639   echo "$as_me:18639: \$? = $ac_status" >&5
18640   (exit $ac_status); } &&
18641          { ac_try='test -s conftest.$ac_objext'
18642   { (eval echo "$as_me:18642: \"$ac_try\"") >&5
18643   (eval $ac_try) 2>&5
18644   ac_status=$?
18645   echo "$as_me:18645: \$? = $ac_status" >&5
18646   (exit $ac_status); }; }; then
18647   ac_cv_type_ssize_t=yes
18648 else
18649   echo "$as_me: failed program was:" >&5
18650 cat conftest.$ac_ext >&5
18651 ac_cv_type_ssize_t=no
18652 fi
18653 rm -f conftest.$ac_objext conftest.$ac_ext
18654 fi
18655 echo "$as_me:18655: result: $ac_cv_type_ssize_t" >&5
18656 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18657 if test $ac_cv_type_ssize_t = yes; then
18658   :
18659 else
18660
18661 cat >>confdefs.h <<EOF
18662 #define ssize_t int
18663 EOF
18664
18665 fi
18666
18667 echo "$as_me:18667: checking for type sigaction_t" >&5
18668 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18669 if test "${cf_cv_type_sigaction+set}" = set; then
18670   echo $ECHO_N "(cached) $ECHO_C" >&6
18671 else
18672
18673         cat >conftest.$ac_ext <<_ACEOF
18674 #line 18674 "configure"
18675 #include "confdefs.h"
18676
18677 #include <signal.h>
18678 int
18679 main (void)
18680 {
18681 sigaction_t x
18682   ;
18683   return 0;
18684 }
18685 _ACEOF
18686 rm -f conftest.$ac_objext
18687 if { (eval echo "$as_me:18687: \"$ac_compile\"") >&5
18688   (eval $ac_compile) 2>&5
18689   ac_status=$?
18690   echo "$as_me:18690: \$? = $ac_status" >&5
18691   (exit $ac_status); } &&
18692          { ac_try='test -s conftest.$ac_objext'
18693   { (eval echo "$as_me:18693: \"$ac_try\"") >&5
18694   (eval $ac_try) 2>&5
18695   ac_status=$?
18696   echo "$as_me:18696: \$? = $ac_status" >&5
18697   (exit $ac_status); }; }; then
18698   cf_cv_type_sigaction=yes
18699 else
18700   echo "$as_me: failed program was:" >&5
18701 cat conftest.$ac_ext >&5
18702 cf_cv_type_sigaction=no
18703 fi
18704 rm -f conftest.$ac_objext conftest.$ac_ext
18705 fi
18706
18707 echo "$as_me:18707: result: $cf_cv_type_sigaction" >&5
18708 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18709 test "$cf_cv_type_sigaction" = yes &&
18710 cat >>confdefs.h <<\EOF
18711 #define HAVE_TYPE_SIGACTION 1
18712 EOF
18713
18714 echo "$as_me:18714: checking declaration of size-change" >&5
18715 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18716 if test "${cf_cv_sizechange+set}" = set; then
18717   echo $ECHO_N "(cached) $ECHO_C" >&6
18718 else
18719
18720         cf_cv_sizechange=unknown
18721         cf_save_CPPFLAGS="$CPPFLAGS"
18722
18723 for cf_opts in "" "NEED_PTEM_H"
18724 do
18725
18726         CPPFLAGS="$cf_save_CPPFLAGS"
18727         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18728         cat >conftest.$ac_ext <<_ACEOF
18729 #line 18729 "configure"
18730 #include "confdefs.h"
18731 #include <sys/types.h>
18732 #ifdef HAVE_TERMIOS_H
18733 #include <termios.h>
18734 #else
18735 #ifdef HAVE_TERMIO_H
18736 #include <termio.h>
18737 #endif
18738 #endif
18739 #ifdef NEED_PTEM_H
18740 /* This is a workaround for SCO:  they neglected to define struct winsize in
18741  * termios.h -- it's only in termio.h and ptem.h
18742  */
18743 #include        <sys/stream.h>
18744 #include        <sys/ptem.h>
18745 #endif
18746 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18747 #include <sys/ioctl.h>
18748 #endif
18749
18750 int
18751 main (void)
18752 {
18753
18754 #ifdef TIOCGSIZE
18755         struct ttysize win;     /* FIXME: what system is this? */
18756         int y = win.ts_lines;
18757         int x = win.ts_cols;
18758 #else
18759 #ifdef TIOCGWINSZ
18760         struct winsize win;
18761         int y = win.ws_row;
18762         int x = win.ws_col;
18763 #else
18764         no TIOCGSIZE or TIOCGWINSZ
18765 #endif /* TIOCGWINSZ */
18766 #endif /* TIOCGSIZE */
18767
18768   ;
18769   return 0;
18770 }
18771 _ACEOF
18772 rm -f conftest.$ac_objext
18773 if { (eval echo "$as_me:18773: \"$ac_compile\"") >&5
18774   (eval $ac_compile) 2>&5
18775   ac_status=$?
18776   echo "$as_me:18776: \$? = $ac_status" >&5
18777   (exit $ac_status); } &&
18778          { ac_try='test -s conftest.$ac_objext'
18779   { (eval echo "$as_me:18779: \"$ac_try\"") >&5
18780   (eval $ac_try) 2>&5
18781   ac_status=$?
18782   echo "$as_me:18782: \$? = $ac_status" >&5
18783   (exit $ac_status); }; }; then
18784   cf_cv_sizechange=yes
18785 else
18786   echo "$as_me: failed program was:" >&5
18787 cat conftest.$ac_ext >&5
18788 cf_cv_sizechange=no
18789 fi
18790 rm -f conftest.$ac_objext conftest.$ac_ext
18791
18792         CPPFLAGS="$cf_save_CPPFLAGS"
18793         if test "$cf_cv_sizechange" = yes ; then
18794                 echo "size-change succeeded ($cf_opts)" >&5
18795                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18796                 break
18797         fi
18798 done
18799
18800 fi
18801 echo "$as_me:18801: result: $cf_cv_sizechange" >&5
18802 echo "${ECHO_T}$cf_cv_sizechange" >&6
18803 if test "$cf_cv_sizechange" != no ; then
18804
18805 cat >>confdefs.h <<\EOF
18806 #define HAVE_SIZECHANGE 1
18807 EOF
18808
18809         case $cf_cv_sizechange in
18810         (NEED*)
18811                 cat >>confdefs.h <<EOF
18812 #define $cf_cv_sizechange  1
18813 EOF
18814
18815                 ;;
18816         esac
18817 fi
18818
18819 echo "$as_me:18819: checking for memmove" >&5
18820 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18821 if test "${ac_cv_func_memmove+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 memmove (); 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 memmove ();
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_memmove) || defined (__stub___memmove)
18846 choke me
18847 #else
18848 f = memmove; /* 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_memmove=yes
18868 else
18869   echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18871 ac_cv_func_memmove=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_memmove" >&5
18876 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18877 if test $ac_cv_func_memmove = yes; then
18878   :
18879 else
18880
18881 echo "$as_me:18881: checking for bcopy" >&5
18882 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18883 if test "${ac_cv_func_bcopy+set}" = set; then
18884   echo $ECHO_N "(cached) $ECHO_C" >&6
18885 else
18886   cat >conftest.$ac_ext <<_ACEOF
18887 #line 18887 "configure"
18888 #include "confdefs.h"
18889 /* System header to define __stub macros and hopefully few prototypes,
18890     which can conflict with char bcopy (); below.  */
18891 #include <assert.h>
18892 /* Override any gcc2 internal prototype to avoid an error.  */
18893 #ifdef __cplusplus
18894 extern "C"
18895 #endif
18896 /* We use char because int might match the return type of a gcc2
18897    builtin and then its argument prototype would still apply.  */
18898 char bcopy ();
18899 char (*f) ();
18900
18901 int
18902 main (void)
18903 {
18904 /* The GNU C library defines this for functions which it implements
18905     to always fail with ENOSYS.  Some functions are actually named
18906     something starting with __ and the normal name is an alias.  */
18907 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18908 choke me
18909 #else
18910 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18911 #endif
18912
18913   ;
18914   return 0;
18915 }
18916 _ACEOF
18917 rm -f conftest.$ac_objext conftest$ac_exeext
18918 if { (eval echo "$as_me:18918: \"$ac_link\"") >&5
18919   (eval $ac_link) 2>&5
18920   ac_status=$?
18921   echo "$as_me:18921: \$? = $ac_status" >&5
18922   (exit $ac_status); } &&
18923          { ac_try='test -s conftest$ac_exeext'
18924   { (eval echo "$as_me:18924: \"$ac_try\"") >&5
18925   (eval $ac_try) 2>&5
18926   ac_status=$?
18927   echo "$as_me:18927: \$? = $ac_status" >&5
18928   (exit $ac_status); }; }; then
18929   ac_cv_func_bcopy=yes
18930 else
18931   echo "$as_me: failed program was:" >&5
18932 cat conftest.$ac_ext >&5
18933 ac_cv_func_bcopy=no
18934 fi
18935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18936 fi
18937 echo "$as_me:18937: result: $ac_cv_func_bcopy" >&5
18938 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18939 if test $ac_cv_func_bcopy = yes; then
18940
18941         echo "$as_me:18941: checking if bcopy does overlapping moves" >&5
18942 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18943 if test "${cf_cv_good_bcopy+set}" = set; then
18944   echo $ECHO_N "(cached) $ECHO_C" >&6
18945 else
18946
18947                 if test "$cross_compiling" = yes; then
18948   cf_cv_good_bcopy=unknown
18949 else
18950   cat >conftest.$ac_ext <<_ACEOF
18951 #line 18951 "configure"
18952 #include "confdefs.h"
18953
18954 int main(void) {
18955         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18956         char temp[40];
18957         bcopy(data, temp, sizeof(data));
18958         bcopy(temp+10, temp, 15);
18959         bcopy(temp+5, temp+15, 10);
18960         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18961 }
18962
18963 _ACEOF
18964 rm -f conftest$ac_exeext
18965 if { (eval echo "$as_me:18965: \"$ac_link\"") >&5
18966   (eval $ac_link) 2>&5
18967   ac_status=$?
18968   echo "$as_me:18968: \$? = $ac_status" >&5
18969   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18970   { (eval echo "$as_me:18970: \"$ac_try\"") >&5
18971   (eval $ac_try) 2>&5
18972   ac_status=$?
18973   echo "$as_me:18973: \$? = $ac_status" >&5
18974   (exit $ac_status); }; }; then
18975   cf_cv_good_bcopy=yes
18976 else
18977   echo "$as_me: program exited with status $ac_status" >&5
18978 echo "$as_me: failed program was:" >&5
18979 cat conftest.$ac_ext >&5
18980 cf_cv_good_bcopy=no
18981 fi
18982 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18983 fi
18984
18985 fi
18986 echo "$as_me:18986: result: $cf_cv_good_bcopy" >&5
18987 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18988
18989 else
18990   cf_cv_good_bcopy=no
18991 fi
18992
18993         if test "$cf_cv_good_bcopy" = yes ; then
18994
18995 cat >>confdefs.h <<\EOF
18996 #define USE_OK_BCOPY 1
18997 EOF
18998
18999         else
19000
19001 cat >>confdefs.h <<\EOF
19002 #define USE_MY_MEMMOVE 1
19003 EOF
19004
19005         fi
19006
19007 fi
19008
19009 tty 2>&1 >/dev/null || {
19010 for ac_func in posix_openpt
19011 do
19012 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19013 echo "$as_me:19013: checking for $ac_func" >&5
19014 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19015 if eval "test \"\${$as_ac_var+set}\" = set"; then
19016   echo $ECHO_N "(cached) $ECHO_C" >&6
19017 else
19018   cat >conftest.$ac_ext <<_ACEOF
19019 #line 19019 "configure"
19020 #include "confdefs.h"
19021 /* System header to define __stub macros and hopefully few prototypes,
19022     which can conflict with char $ac_func (); below.  */
19023 #include <assert.h>
19024 /* Override any gcc2 internal prototype to avoid an error.  */
19025 #ifdef __cplusplus
19026 extern "C"
19027 #endif
19028 /* We use char because int might match the return type of a gcc2
19029    builtin and then its argument prototype would still apply.  */
19030 char $ac_func ();
19031 char (*f) ();
19032
19033 int
19034 main (void)
19035 {
19036 /* The GNU C library defines this for functions which it implements
19037     to always fail with ENOSYS.  Some functions are actually named
19038     something starting with __ and the normal name is an alias.  */
19039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19040 choke me
19041 #else
19042 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19043 #endif
19044
19045   ;
19046   return 0;
19047 }
19048 _ACEOF
19049 rm -f conftest.$ac_objext conftest$ac_exeext
19050 if { (eval echo "$as_me:19050: \"$ac_link\"") >&5
19051   (eval $ac_link) 2>&5
19052   ac_status=$?
19053   echo "$as_me:19053: \$? = $ac_status" >&5
19054   (exit $ac_status); } &&
19055          { ac_try='test -s conftest$ac_exeext'
19056   { (eval echo "$as_me:19056: \"$ac_try\"") >&5
19057   (eval $ac_try) 2>&5
19058   ac_status=$?
19059   echo "$as_me:19059: \$? = $ac_status" >&5
19060   (exit $ac_status); }; }; then
19061   eval "$as_ac_var=yes"
19062 else
19063   echo "$as_me: failed program was:" >&5
19064 cat conftest.$ac_ext >&5
19065 eval "$as_ac_var=no"
19066 fi
19067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19068 fi
19069 echo "$as_me:19069: result: `eval echo '${'$as_ac_var'}'`" >&5
19070 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19071 if test `eval echo '${'$as_ac_var'}'` = yes; then
19072   cat >>confdefs.h <<EOF
19073 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19074 EOF
19075
19076 fi
19077 done
19078  }
19079 echo "$as_me:19079: checking if poll really works" >&5
19080 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
19081 if test "${cf_cv_working_poll+set}" = set; then
19082   echo $ECHO_N "(cached) $ECHO_C" >&6
19083 else
19084
19085 if test "$cross_compiling" = yes; then
19086   cf_cv_working_poll=unknown
19087 else
19088   cat >conftest.$ac_ext <<_ACEOF
19089 #line 19089 "configure"
19090 #include "confdefs.h"
19091
19092 #include <stdlib.h>
19093 #include <stdio.h>
19094 #include <unistd.h>
19095 #include <fcntl.h>
19096 #ifdef HAVE_POLL_H
19097 #include <poll.h>
19098 #else
19099 #include <sys/poll.h>
19100 #endif
19101 int main(void) {
19102         struct pollfd myfds;
19103         int ret;
19104
19105         /* check for Darwin bug with respect to "devices" */
19106         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
19107         if (myfds.fd < 0)
19108                 myfds.fd = 0;
19109         myfds.events = POLLIN;
19110         myfds.revents = 0;
19111
19112         ret = poll(&myfds, 1, 100);
19113
19114         if (ret < 0 || (myfds.revents & POLLNVAL)) {
19115                 ret = -1;
19116         } else {
19117                 int fd = 0;
19118                 if (!isatty(fd)) {
19119                         fd = open("/dev/tty", 2);       /* O_RDWR */
19120                 }
19121 #ifdef HAVE_POSIX_OPENPT
19122                 if (fd < 0) {
19123                         fd = posix_openpt(O_RDWR);
19124                 }
19125 #endif
19126
19127                 if (fd >= 0) {
19128                         /* also check with standard input */
19129                         myfds.fd = fd;
19130                         myfds.events = POLLIN;
19131                         myfds.revents = 0;
19132                         ret = poll(&myfds, 1, 100);
19133                 } else {
19134                         ret = -1;
19135                 }
19136         }
19137         ${cf_cv_main_return:-return}(ret < 0);
19138 }
19139 _ACEOF
19140 rm -f conftest$ac_exeext
19141 if { (eval echo "$as_me:19141: \"$ac_link\"") >&5
19142   (eval $ac_link) 2>&5
19143   ac_status=$?
19144   echo "$as_me:19144: \$? = $ac_status" >&5
19145   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19146   { (eval echo "$as_me:19146: \"$ac_try\"") >&5
19147   (eval $ac_try) 2>&5
19148   ac_status=$?
19149   echo "$as_me:19149: \$? = $ac_status" >&5
19150   (exit $ac_status); }; }; then
19151   cf_cv_working_poll=yes
19152 else
19153   echo "$as_me: program exited with status $ac_status" >&5
19154 echo "$as_me: failed program was:" >&5
19155 cat conftest.$ac_ext >&5
19156 cf_cv_working_poll=no
19157 fi
19158 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19159 fi
19160 fi
19161 echo "$as_me:19161: result: $cf_cv_working_poll" >&5
19162 echo "${ECHO_T}$cf_cv_working_poll" >&6
19163 test "$cf_cv_working_poll" = "yes" &&
19164 cat >>confdefs.h <<\EOF
19165 #define HAVE_WORKING_POLL 1
19166 EOF
19167
19168 echo "$as_me:19168: checking for va_copy" >&5
19169 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
19170 if test "${cf_cv_have_va_copy+set}" = set; then
19171   echo $ECHO_N "(cached) $ECHO_C" >&6
19172 else
19173
19174 cat >conftest.$ac_ext <<_ACEOF
19175 #line 19175 "configure"
19176 #include "confdefs.h"
19177
19178 #include <stdarg.h>
19179
19180 int
19181 main (void)
19182 {
19183
19184         static va_list dst;
19185         static va_list src;
19186         va_copy(dst, src)
19187   ;
19188   return 0;
19189 }
19190 _ACEOF
19191 rm -f conftest.$ac_objext conftest$ac_exeext
19192 if { (eval echo "$as_me:19192: \"$ac_link\"") >&5
19193   (eval $ac_link) 2>&5
19194   ac_status=$?
19195   echo "$as_me:19195: \$? = $ac_status" >&5
19196   (exit $ac_status); } &&
19197          { ac_try='test -s conftest$ac_exeext'
19198   { (eval echo "$as_me:19198: \"$ac_try\"") >&5
19199   (eval $ac_try) 2>&5
19200   ac_status=$?
19201   echo "$as_me:19201: \$? = $ac_status" >&5
19202   (exit $ac_status); }; }; then
19203   cf_cv_have_va_copy=yes
19204 else
19205   echo "$as_me: failed program was:" >&5
19206 cat conftest.$ac_ext >&5
19207 cf_cv_have_va_copy=no
19208 fi
19209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19210 fi
19211 echo "$as_me:19211: result: $cf_cv_have_va_copy" >&5
19212 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19213
19214 test "$cf_cv_have_va_copy" = yes &&
19215 cat >>confdefs.h <<\EOF
19216 #define HAVE_VA_COPY 1
19217 EOF
19218
19219 echo "$as_me:19219: checking for __va_copy" >&5
19220 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19221 if test "${cf_cv_have___va_copy+set}" = set; then
19222   echo $ECHO_N "(cached) $ECHO_C" >&6
19223 else
19224
19225 cat >conftest.$ac_ext <<_ACEOF
19226 #line 19226 "configure"
19227 #include "confdefs.h"
19228
19229 #include <stdarg.h>
19230
19231 int
19232 main (void)
19233 {
19234
19235         static va_list dst;
19236         static va_list src;
19237         __va_copy(dst, src)
19238   ;
19239   return 0;
19240 }
19241 _ACEOF
19242 rm -f conftest.$ac_objext conftest$ac_exeext
19243 if { (eval echo "$as_me:19243: \"$ac_link\"") >&5
19244   (eval $ac_link) 2>&5
19245   ac_status=$?
19246   echo "$as_me:19246: \$? = $ac_status" >&5
19247   (exit $ac_status); } &&
19248          { ac_try='test -s conftest$ac_exeext'
19249   { (eval echo "$as_me:19249: \"$ac_try\"") >&5
19250   (eval $ac_try) 2>&5
19251   ac_status=$?
19252   echo "$as_me:19252: \$? = $ac_status" >&5
19253   (exit $ac_status); }; }; then
19254   cf_cv_have___va_copy=yes
19255 else
19256   echo "$as_me: failed program was:" >&5
19257 cat conftest.$ac_ext >&5
19258 cf_cv_have___va_copy=no
19259 fi
19260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19261 fi
19262 echo "$as_me:19262: result: $cf_cv_have___va_copy" >&5
19263 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19264
19265 test "$cf_cv_have___va_copy" = yes &&
19266 cat >>confdefs.h <<\EOF
19267 #define HAVE___VA_COPY 1
19268 EOF
19269
19270 echo "$as_me:19270: checking for pid_t" >&5
19271 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19272 if test "${ac_cv_type_pid_t+set}" = set; then
19273   echo $ECHO_N "(cached) $ECHO_C" >&6
19274 else
19275   cat >conftest.$ac_ext <<_ACEOF
19276 #line 19276 "configure"
19277 #include "confdefs.h"
19278 $ac_includes_default
19279 int
19280 main (void)
19281 {
19282 if ((pid_t *) 0)
19283   return 0;
19284 if (sizeof (pid_t))
19285   return 0;
19286   ;
19287   return 0;
19288 }
19289 _ACEOF
19290 rm -f conftest.$ac_objext
19291 if { (eval echo "$as_me:19291: \"$ac_compile\"") >&5
19292   (eval $ac_compile) 2>&5
19293   ac_status=$?
19294   echo "$as_me:19294: \$? = $ac_status" >&5
19295   (exit $ac_status); } &&
19296          { ac_try='test -s conftest.$ac_objext'
19297   { (eval echo "$as_me:19297: \"$ac_try\"") >&5
19298   (eval $ac_try) 2>&5
19299   ac_status=$?
19300   echo "$as_me:19300: \$? = $ac_status" >&5
19301   (exit $ac_status); }; }; then
19302   ac_cv_type_pid_t=yes
19303 else
19304   echo "$as_me: failed program was:" >&5
19305 cat conftest.$ac_ext >&5
19306 ac_cv_type_pid_t=no
19307 fi
19308 rm -f conftest.$ac_objext conftest.$ac_ext
19309 fi
19310 echo "$as_me:19310: result: $ac_cv_type_pid_t" >&5
19311 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19312 if test $ac_cv_type_pid_t = yes; then
19313   :
19314 else
19315
19316 cat >>confdefs.h <<EOF
19317 #define pid_t int
19318 EOF
19319
19320 fi
19321
19322 for ac_header in unistd.h vfork.h
19323 do
19324 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19325 echo "$as_me:19325: checking for $ac_header" >&5
19326 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19328   echo $ECHO_N "(cached) $ECHO_C" >&6
19329 else
19330   cat >conftest.$ac_ext <<_ACEOF
19331 #line 19331 "configure"
19332 #include "confdefs.h"
19333 #include <$ac_header>
19334 _ACEOF
19335 if { (eval echo "$as_me:19335: \"$ac_cpp conftest.$ac_ext\"") >&5
19336   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19337   ac_status=$?
19338   egrep -v '^ *\+' conftest.er1 >conftest.err
19339   rm -f conftest.er1
19340   cat conftest.err >&5
19341   echo "$as_me:19341: \$? = $ac_status" >&5
19342   (exit $ac_status); } >/dev/null; then
19343   if test -s conftest.err; then
19344     ac_cpp_err=$ac_c_preproc_warn_flag
19345   else
19346     ac_cpp_err=
19347   fi
19348 else
19349   ac_cpp_err=yes
19350 fi
19351 if test -z "$ac_cpp_err"; then
19352   eval "$as_ac_Header=yes"
19353 else
19354   echo "$as_me: failed program was:" >&5
19355   cat conftest.$ac_ext >&5
19356   eval "$as_ac_Header=no"
19357 fi
19358 rm -f conftest.err conftest.$ac_ext
19359 fi
19360 echo "$as_me:19360: result: `eval echo '${'$as_ac_Header'}'`" >&5
19361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19362 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19363   cat >>confdefs.h <<EOF
19364 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19365 EOF
19366
19367 fi
19368 done
19369
19370 for ac_func in fork vfork
19371 do
19372 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19373 echo "$as_me:19373: checking for $ac_func" >&5
19374 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19375 if eval "test \"\${$as_ac_var+set}\" = set"; then
19376   echo $ECHO_N "(cached) $ECHO_C" >&6
19377 else
19378   cat >conftest.$ac_ext <<_ACEOF
19379 #line 19379 "configure"
19380 #include "confdefs.h"
19381 /* System header to define __stub macros and hopefully few prototypes,
19382     which can conflict with char $ac_func (); below.  */
19383 #include <assert.h>
19384 /* Override any gcc2 internal prototype to avoid an error.  */
19385 #ifdef __cplusplus
19386 extern "C"
19387 #endif
19388 /* We use char because int might match the return type of a gcc2
19389    builtin and then its argument prototype would still apply.  */
19390 char $ac_func ();
19391 char (*f) ();
19392
19393 int
19394 main (void)
19395 {
19396 /* The GNU C library defines this for functions which it implements
19397     to always fail with ENOSYS.  Some functions are actually named
19398     something starting with __ and the normal name is an alias.  */
19399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19400 choke me
19401 #else
19402 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19403 #endif
19404
19405   ;
19406   return 0;
19407 }
19408 _ACEOF
19409 rm -f conftest.$ac_objext conftest$ac_exeext
19410 if { (eval echo "$as_me:19410: \"$ac_link\"") >&5
19411   (eval $ac_link) 2>&5
19412   ac_status=$?
19413   echo "$as_me:19413: \$? = $ac_status" >&5
19414   (exit $ac_status); } &&
19415          { ac_try='test -s conftest$ac_exeext'
19416   { (eval echo "$as_me:19416: \"$ac_try\"") >&5
19417   (eval $ac_try) 2>&5
19418   ac_status=$?
19419   echo "$as_me:19419: \$? = $ac_status" >&5
19420   (exit $ac_status); }; }; then
19421   eval "$as_ac_var=yes"
19422 else
19423   echo "$as_me: failed program was:" >&5
19424 cat conftest.$ac_ext >&5
19425 eval "$as_ac_var=no"
19426 fi
19427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19428 fi
19429 echo "$as_me:19429: result: `eval echo '${'$as_ac_var'}'`" >&5
19430 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19431 if test `eval echo '${'$as_ac_var'}'` = yes; then
19432   cat >>confdefs.h <<EOF
19433 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19434 EOF
19435
19436 fi
19437 done
19438
19439 ac_cv_func_fork_works=$ac_cv_func_fork
19440 if test "x$ac_cv_func_fork" = xyes; then
19441   echo "$as_me:19441: checking for working fork" >&5
19442 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19443 if test "${ac_cv_func_fork_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_fork_works=cross
19448 else
19449   cat >conftest.$ac_ext <<_ACEOF
19450 /* By Rüdiger Kuhlmann. */
19451       #include <sys/types.h>
19452       #if HAVE_UNISTD_H
19453       # include <unistd.h>
19454       #endif
19455       /* Some systems only have a dummy stub for fork() */
19456       int main (void)
19457       {
19458         if (fork() < 0)
19459           $ac_main_return (1);
19460         $ac_main_return (0);
19461       }
19462 _ACEOF
19463 rm -f conftest$ac_exeext
19464 if { (eval echo "$as_me:19464: \"$ac_link\"") >&5
19465   (eval $ac_link) 2>&5
19466   ac_status=$?
19467   echo "$as_me:19467: \$? = $ac_status" >&5
19468   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19469   { (eval echo "$as_me:19469: \"$ac_try\"") >&5
19470   (eval $ac_try) 2>&5
19471   ac_status=$?
19472   echo "$as_me:19472: \$? = $ac_status" >&5
19473   (exit $ac_status); }; }; then
19474   ac_cv_func_fork_works=yes
19475 else
19476   echo "$as_me: program exited with status $ac_status" >&5
19477 echo "$as_me: failed program was:" >&5
19478 cat conftest.$ac_ext >&5
19479 ac_cv_func_fork_works=no
19480 fi
19481 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19482 fi
19483 fi
19484 echo "$as_me:19484: result: $ac_cv_func_fork_works" >&5
19485 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19486
19487 fi
19488 if test "x$ac_cv_func_fork_works" = xcross; then
19489   case $host in
19490     *-*-amigaos* | *-*-msdosdjgpp*)
19491       # Override, as these systems have only a dummy fork() stub
19492       ac_cv_func_fork_works=no
19493       ;;
19494     *)
19495       ac_cv_func_fork_works=yes
19496       ;;
19497   esac
19498   { echo "$as_me:19498: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19499 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19500 fi
19501 ac_cv_func_vfork_works=$ac_cv_func_vfork
19502 if test "x$ac_cv_func_vfork" = xyes; then
19503   echo "$as_me:19503: checking for working vfork" >&5
19504 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19505 if test "${ac_cv_func_vfork_works+set}" = set; then
19506   echo $ECHO_N "(cached) $ECHO_C" >&6
19507 else
19508   if test "$cross_compiling" = yes; then
19509   ac_cv_func_vfork_works=cross
19510 else
19511   cat >conftest.$ac_ext <<_ACEOF
19512 #line 19512 "configure"
19513 #include "confdefs.h"
19514 /* Thanks to Paul Eggert for this test.  */
19515 #include <stdio.h>
19516 #include <sys/types.h>
19517 #include <sys/stat.h>
19518 #if HAVE_UNISTD_H
19519 # include <unistd.h>
19520 #endif
19521 #if HAVE_VFORK_H
19522 # include <vfork.h>
19523 #endif
19524 /* On some sparc systems, changes by the child to local and incoming
19525    argument registers are propagated back to the parent.  The compiler
19526    is told about this with #include <vfork.h>, but some compilers
19527    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19528    static variable whose address is put into a register that is
19529    clobbered by the vfork.  */
19530 static
19531 #ifdef __cplusplus
19532 sparc_address_test (int arg)
19533 # else
19534 sparc_address_test (arg) int arg;
19535 #endif
19536 {
19537   static pid_t child;
19538   if (!child) {
19539     child = vfork ();
19540     if (child < 0) {
19541       perror ("vfork");
19542       _exit(2);
19543     }
19544     if (!child) {
19545       arg = getpid();
19546       write(-1, "", 0);
19547       _exit (arg);
19548     }
19549   }
19550 }
19551
19552 int
19553 main (void)
19554 {
19555   pid_t parent = getpid ();
19556   pid_t child;
19557
19558   sparc_address_test ();
19559
19560   child = vfork ();
19561
19562   if (child == 0) {
19563     /* Here is another test for sparc vfork register problems.  This
19564        test uses lots of local variables, at least as many local
19565        variables as main has allocated so far including compiler
19566        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19567        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19568        reuse the register of parent for one of the local variables,
19569        since it will think that parent can't possibly be used any more
19570        in this routine.  Assigning to the local variable will thus
19571        munge parent in the parent process.  */
19572     pid_t
19573       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19574       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19575     /* Convince the compiler that p..p7 are live; otherwise, it might
19576        use the same hardware register for all 8 local variables.  */
19577     if (p != p1 || p != p2 || p != p3 || p != p4
19578         || p != p5 || p != p6 || p != p7)
19579       _exit(1);
19580
19581     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19582        from child file descriptors.  If the child closes a descriptor
19583        before it execs or exits, this munges the parent's descriptor
19584        as well.  Test for this by closing stdout in the child.  */
19585     _exit(close(fileno(stdout)) != 0);
19586   } else {
19587     int status;
19588     struct stat st;
19589
19590     while (wait(&status) != child)
19591       ;
19592     $ac_main_return(
19593          /* Was there some problem with vforking?  */
19594          child < 0
19595
19596          /* Did the child fail?  (This shouldn't happen.)  */
19597          || status
19598
19599          /* Did the vfork/compiler bug occur?  */
19600          || parent != getpid()
19601
19602          /* Did the file descriptor bug occur?  */
19603          || fstat(fileno(stdout), &st) != 0
19604          );
19605   }
19606 }
19607 _ACEOF
19608 rm -f conftest$ac_exeext
19609 if { (eval echo "$as_me:19609: \"$ac_link\"") >&5
19610   (eval $ac_link) 2>&5
19611   ac_status=$?
19612   echo "$as_me:19612: \$? = $ac_status" >&5
19613   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19614   { (eval echo "$as_me:19614: \"$ac_try\"") >&5
19615   (eval $ac_try) 2>&5
19616   ac_status=$?
19617   echo "$as_me:19617: \$? = $ac_status" >&5
19618   (exit $ac_status); }; }; then
19619   ac_cv_func_vfork_works=yes
19620 else
19621   echo "$as_me: program exited with status $ac_status" >&5
19622 echo "$as_me: failed program was:" >&5
19623 cat conftest.$ac_ext >&5
19624 ac_cv_func_vfork_works=no
19625 fi
19626 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19627 fi
19628 fi
19629 echo "$as_me:19629: result: $ac_cv_func_vfork_works" >&5
19630 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19631
19632 fi;
19633 if test "x$ac_cv_func_fork_works" = xcross; then
19634   ac_cv_func_vfork_works=ac_cv_func_vfork
19635   { echo "$as_me:19635: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19636 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19637 fi
19638
19639 if test "x$ac_cv_func_vfork_works" = xyes; then
19640
19641 cat >>confdefs.h <<\EOF
19642 #define HAVE_WORKING_VFORK 1
19643 EOF
19644
19645 else
19646
19647 cat >>confdefs.h <<\EOF
19648 #define vfork fork
19649 EOF
19650
19651 fi
19652 if test "x$ac_cv_func_fork_works" = xyes; then
19653
19654 cat >>confdefs.h <<\EOF
19655 #define HAVE_WORKING_FORK 1
19656 EOF
19657
19658 fi
19659
19660 # special check for test/ditto.c
19661
19662 echo "$as_me:19662: checking for openpty in -lutil" >&5
19663 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19664 if test "${ac_cv_lib_util_openpty+set}" = set; then
19665   echo $ECHO_N "(cached) $ECHO_C" >&6
19666 else
19667   ac_check_lib_save_LIBS=$LIBS
19668 LIBS="-lutil  $LIBS"
19669 cat >conftest.$ac_ext <<_ACEOF
19670 #line 19670 "configure"
19671 #include "confdefs.h"
19672
19673 /* Override any gcc2 internal prototype to avoid an error.  */
19674 #ifdef __cplusplus
19675 extern "C"
19676 #endif
19677 /* We use char because int might match the return type of a gcc2
19678    builtin and then its argument prototype would still apply.  */
19679 char openpty ();
19680 int
19681 main (void)
19682 {
19683 openpty ();
19684   ;
19685   return 0;
19686 }
19687 _ACEOF
19688 rm -f conftest.$ac_objext conftest$ac_exeext
19689 if { (eval echo "$as_me:19689: \"$ac_link\"") >&5
19690   (eval $ac_link) 2>&5
19691   ac_status=$?
19692   echo "$as_me:19692: \$? = $ac_status" >&5
19693   (exit $ac_status); } &&
19694          { ac_try='test -s conftest$ac_exeext'
19695   { (eval echo "$as_me:19695: \"$ac_try\"") >&5
19696   (eval $ac_try) 2>&5
19697   ac_status=$?
19698   echo "$as_me:19698: \$? = $ac_status" >&5
19699   (exit $ac_status); }; }; then
19700   ac_cv_lib_util_openpty=yes
19701 else
19702   echo "$as_me: failed program was:" >&5
19703 cat conftest.$ac_ext >&5
19704 ac_cv_lib_util_openpty=no
19705 fi
19706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19707 LIBS=$ac_check_lib_save_LIBS
19708 fi
19709 echo "$as_me:19709: result: $ac_cv_lib_util_openpty" >&5
19710 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19711 if test $ac_cv_lib_util_openpty = yes; then
19712   cf_cv_lib_util=yes
19713 else
19714   cf_cv_lib_util=no
19715 fi
19716
19717 echo "$as_me:19717: checking for openpty header" >&5
19718 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19719 if test "${cf_cv_func_openpty+set}" = set; then
19720   echo $ECHO_N "(cached) $ECHO_C" >&6
19721 else
19722
19723         cf_save_LIBS="$LIBS"
19724         test $cf_cv_lib_util = yes && {
19725 cf_add_libs="-lutil"
19726 # Filter out duplicates - this happens with badly-designed ".pc" files...
19727 for cf_add_1lib in $LIBS
19728 do
19729         for cf_add_2lib in $cf_add_libs
19730         do
19731                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19732                 then
19733                         cf_add_1lib=
19734                         break
19735                 fi
19736         done
19737         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19738 done
19739 LIBS="$cf_add_libs"
19740  }
19741         for cf_header in pty.h libutil.h util.h
19742         do
19743         cat >conftest.$ac_ext <<_ACEOF
19744 #line 19744 "configure"
19745 #include "confdefs.h"
19746
19747 #include <$cf_header>
19748
19749 int
19750 main (void)
19751 {
19752
19753         int x = openpty((int *)0, (int *)0, (char *)0,
19754                                    (struct termios *)0, (struct winsize *)0);
19755
19756   ;
19757   return 0;
19758 }
19759 _ACEOF
19760 rm -f conftest.$ac_objext conftest$ac_exeext
19761 if { (eval echo "$as_me:19761: \"$ac_link\"") >&5
19762   (eval $ac_link) 2>&5
19763   ac_status=$?
19764   echo "$as_me:19764: \$? = $ac_status" >&5
19765   (exit $ac_status); } &&
19766          { ac_try='test -s conftest$ac_exeext'
19767   { (eval echo "$as_me:19767: \"$ac_try\"") >&5
19768   (eval $ac_try) 2>&5
19769   ac_status=$?
19770   echo "$as_me:19770: \$? = $ac_status" >&5
19771   (exit $ac_status); }; }; then
19772
19773                 cf_cv_func_openpty=$cf_header
19774                 break
19775
19776 else
19777   echo "$as_me: failed program was:" >&5
19778 cat conftest.$ac_ext >&5
19779
19780                 cf_cv_func_openpty=no
19781
19782 fi
19783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19784         done
19785         LIBS="$cf_save_LIBS"
19786
19787 fi
19788 echo "$as_me:19788: result: $cf_cv_func_openpty" >&5
19789 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19790
19791 if test "$cf_cv_func_openpty" != no ; then
19792
19793 cat >>confdefs.h <<EOF
19794 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19795 EOF
19796
19797 cat >>confdefs.h <<\EOF
19798 #define USE_XTERM_PTY 1
19799 EOF
19800
19801         if test "x$cf_cv_lib_util" = xyes ; then
19802
19803 cf_add_libs="-lutil"
19804 # Filter out duplicates - this happens with badly-designed ".pc" files...
19805 for cf_add_1lib in $TEST_LIBS
19806 do
19807         for cf_add_2lib in $cf_add_libs
19808         do
19809                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19810                 then
19811                         cf_add_1lib=
19812                         break
19813                 fi
19814         done
19815         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19816 done
19817 TEST_LIBS="$cf_add_libs"
19818
19819         fi
19820 fi
19821
19822 if test "$with_hashed_db" != no ; then
19823
19824 cat >>confdefs.h <<\EOF
19825 #define USE_HASHED_DB 1
19826 EOF
19827
19828 case $with_hashed_db in
19829 (yes|*able*)
19830         ;;
19831 (*)
19832         if test -d "$with_hashed_db" ; then
19833
19834 if test -n "$with_hashed_db/include" ; then
19835   for cf_add_incdir in $with_hashed_db/include
19836   do
19837         while test $cf_add_incdir != /usr/include
19838         do
19839           if test -d $cf_add_incdir
19840           then
19841                 cf_have_incdir=no
19842                 if test -n "$CFLAGS$CPPFLAGS" ; then
19843                   # a loop is needed to ensure we can add subdirs of existing dirs
19844                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19845                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19846                           cf_have_incdir=yes; break
19847                         fi
19848                   done
19849                 fi
19850
19851                 if test "$cf_have_incdir" = no ; then
19852                   if test "$cf_add_incdir" = /usr/local/include ; then
19853                         if test "$GCC" = yes
19854                         then
19855                           cf_save_CPPFLAGS=$CPPFLAGS
19856                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19857                           cat >conftest.$ac_ext <<_ACEOF
19858 #line 19858 "configure"
19859 #include "confdefs.h"
19860 #include <stdio.h>
19861 int
19862 main (void)
19863 {
19864 printf("Hello")
19865   ;
19866   return 0;
19867 }
19868 _ACEOF
19869 rm -f conftest.$ac_objext
19870 if { (eval echo "$as_me:19870: \"$ac_compile\"") >&5
19871   (eval $ac_compile) 2>&5
19872   ac_status=$?
19873   echo "$as_me:19873: \$? = $ac_status" >&5
19874   (exit $ac_status); } &&
19875          { ac_try='test -s conftest.$ac_objext'
19876   { (eval echo "$as_me:19876: \"$ac_try\"") >&5
19877   (eval $ac_try) 2>&5
19878   ac_status=$?
19879   echo "$as_me:19879: \$? = $ac_status" >&5
19880   (exit $ac_status); }; }; then
19881   :
19882 else
19883   echo "$as_me: failed program was:" >&5
19884 cat conftest.$ac_ext >&5
19885 cf_have_incdir=yes
19886 fi
19887 rm -f conftest.$ac_objext conftest.$ac_ext
19888                           CPPFLAGS=$cf_save_CPPFLAGS
19889                         fi
19890                   fi
19891                 fi
19892
19893                 if test "$cf_have_incdir" = no ; then
19894                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19895
19896 echo "${as_me:-configure}:19896: testing adding $cf_add_incdir to include-path ..." 1>&5
19897
19898                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19899
19900                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19901                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19902                   cf_add_incdir="$cf_top_incdir"
19903                 else
19904                   break
19905                 fi
19906           else
19907                 break
19908           fi
19909         done
19910   done
19911 fi
19912
19913 if test -n "$with_hashed_db/lib" ; then
19914         for cf_add_libdir in $with_hashed_db/lib
19915         do
19916                 if test $cf_add_libdir = /usr/lib ; then
19917                         :
19918                 elif test -d $cf_add_libdir
19919                 then
19920                         cf_have_libdir=no
19921                         if test -n "$LDFLAGS$LIBS" ; then
19922                                 # a loop is needed to ensure we can add subdirs of existing dirs
19923                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19924                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19925                                                 cf_have_libdir=yes; break
19926                                         fi
19927                                 done
19928                         fi
19929                         if test "$cf_have_libdir" = no ; then
19930                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19931
19932 echo "${as_me:-configure}:19932: testing adding $cf_add_libdir to library-path ..." 1>&5
19933
19934                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19935                         fi
19936                 fi
19937         done
19938 fi
19939
19940         else
19941                 case "$with_hashed_db" in
19942                 (./*|../*|/*)
19943                         { echo "$as_me:19943: WARNING: no such directory $with_hashed_db" >&5
19944 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19945                         ;;
19946                 (*)
19947
19948 cf_search=
19949
19950 test "x$prefix" != "xNONE" && \
19951 test -d "$prefix" && \
19952  {
19953         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19954         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19955         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19956         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19957         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19958         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19959 }
19960
19961 for cf_subdir_prefix in \
19962         /usr \
19963         /usr/local \
19964         /usr/pkg \
19965         /opt \
19966         /opt/local \
19967         $HOME
19968 do
19969
19970 test "x$cf_subdir_prefix" != "x$prefix" && \
19971 test -d "$cf_subdir_prefix" && \
19972 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19973         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19974         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19975         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19976         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19977         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19978         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"
19979 }
19980
19981 done
19982
19983         for cf_item in $cf_search
19984         do
19985                 case $cf_item in
19986                 (*/$with_hashed_db)
19987
19988 if test -n "$cf_item" ; then
19989   for cf_add_incdir in $cf_item
19990   do
19991         while test $cf_add_incdir != /usr/include
19992         do
19993           if test -d $cf_add_incdir
19994           then
19995                 cf_have_incdir=no
19996                 if test -n "$CFLAGS$CPPFLAGS" ; then
19997                   # a loop is needed to ensure we can add subdirs of existing dirs
19998                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19999                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20000                           cf_have_incdir=yes; break
20001                         fi
20002                   done
20003                 fi
20004
20005                 if test "$cf_have_incdir" = no ; then
20006                   if test "$cf_add_incdir" = /usr/local/include ; then
20007                         if test "$GCC" = yes
20008                         then
20009                           cf_save_CPPFLAGS=$CPPFLAGS
20010                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20011                           cat >conftest.$ac_ext <<_ACEOF
20012 #line 20012 "configure"
20013 #include "confdefs.h"
20014 #include <stdio.h>
20015 int
20016 main (void)
20017 {
20018 printf("Hello")
20019   ;
20020   return 0;
20021 }
20022 _ACEOF
20023 rm -f conftest.$ac_objext
20024 if { (eval echo "$as_me:20024: \"$ac_compile\"") >&5
20025   (eval $ac_compile) 2>&5
20026   ac_status=$?
20027   echo "$as_me:20027: \$? = $ac_status" >&5
20028   (exit $ac_status); } &&
20029          { ac_try='test -s conftest.$ac_objext'
20030   { (eval echo "$as_me:20030: \"$ac_try\"") >&5
20031   (eval $ac_try) 2>&5
20032   ac_status=$?
20033   echo "$as_me:20033: \$? = $ac_status" >&5
20034   (exit $ac_status); }; }; then
20035   :
20036 else
20037   echo "$as_me: failed program was:" >&5
20038 cat conftest.$ac_ext >&5
20039 cf_have_incdir=yes
20040 fi
20041 rm -f conftest.$ac_objext conftest.$ac_ext
20042                           CPPFLAGS=$cf_save_CPPFLAGS
20043                         fi
20044                   fi
20045                 fi
20046
20047                 if test "$cf_have_incdir" = no ; then
20048                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20049
20050 echo "${as_me:-configure}:20050: testing adding $cf_add_incdir to include-path ..." 1>&5
20051
20052                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20053
20054                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20055                   test "$cf_top_incdir" = "$cf_add_incdir" && break
20056                   cf_add_incdir="$cf_top_incdir"
20057                 else
20058                   break
20059                 fi
20060           else
20061                 break
20062           fi
20063         done
20064   done
20065 fi
20066
20067                         ;;
20068                 esac
20069         done
20070
20071 cf_search=
20072
20073 test "x$prefix" != "xNONE" && \
20074 test -d "$prefix" && \
20075  {
20076         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
20077         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
20078         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
20079         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
20080         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
20081         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
20082 }
20083
20084 for cf_subdir_prefix in \
20085         /usr \
20086         /usr/local \
20087         /usr/pkg \
20088         /opt \
20089         /opt/local \
20090         $HOME
20091 do
20092
20093 test "x$cf_subdir_prefix" != "x$prefix" && \
20094 test -d "$cf_subdir_prefix" && \
20095 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20096         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
20097         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
20098         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
20099         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
20100         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
20101         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"
20102 }
20103
20104 done
20105
20106         for cf_item in $cf_search
20107         do
20108                 case $cf_item in
20109                 (*/$with_hashed_db)
20110
20111 if test -n "$cf_item" ; then
20112         for cf_add_libdir in $cf_item
20113         do
20114                 if test $cf_add_libdir = /usr/lib ; then
20115                         :
20116                 elif test -d $cf_add_libdir
20117                 then
20118                         cf_have_libdir=no
20119                         if test -n "$LDFLAGS$LIBS" ; then
20120                                 # a loop is needed to ensure we can add subdirs of existing dirs
20121                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20122                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20123                                                 cf_have_libdir=yes; break
20124                                         fi
20125                                 done
20126                         fi
20127                         if test "$cf_have_libdir" = no ; then
20128                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20129
20130 echo "${as_me:-configure}:20130: testing adding $cf_add_libdir to library-path ..." 1>&5
20131
20132                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20133                         fi
20134                 fi
20135         done
20136 fi
20137
20138                         ;;
20139                 esac
20140         done
20141
20142                         ;;
20143                 esac
20144         fi
20145 esac
20146
20147 echo "$as_me:20147: checking for db.h" >&5
20148 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
20149 if test "${ac_cv_header_db_h+set}" = set; then
20150   echo $ECHO_N "(cached) $ECHO_C" >&6
20151 else
20152   cat >conftest.$ac_ext <<_ACEOF
20153 #line 20153 "configure"
20154 #include "confdefs.h"
20155 #include <db.h>
20156 _ACEOF
20157 if { (eval echo "$as_me:20157: \"$ac_cpp conftest.$ac_ext\"") >&5
20158   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20159   ac_status=$?
20160   egrep -v '^ *\+' conftest.er1 >conftest.err
20161   rm -f conftest.er1
20162   cat conftest.err >&5
20163   echo "$as_me:20163: \$? = $ac_status" >&5
20164   (exit $ac_status); } >/dev/null; then
20165   if test -s conftest.err; then
20166     ac_cpp_err=$ac_c_preproc_warn_flag
20167   else
20168     ac_cpp_err=
20169   fi
20170 else
20171   ac_cpp_err=yes
20172 fi
20173 if test -z "$ac_cpp_err"; then
20174   ac_cv_header_db_h=yes
20175 else
20176   echo "$as_me: failed program was:" >&5
20177   cat conftest.$ac_ext >&5
20178   ac_cv_header_db_h=no
20179 fi
20180 rm -f conftest.err conftest.$ac_ext
20181 fi
20182 echo "$as_me:20182: result: $ac_cv_header_db_h" >&5
20183 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20184 if test $ac_cv_header_db_h = yes; then
20185
20186 echo "$as_me:20186: checking for version of db" >&5
20187 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20188 if test "${cf_cv_hashed_db_version+set}" = set; then
20189   echo $ECHO_N "(cached) $ECHO_C" >&6
20190 else
20191
20192 cf_cv_hashed_db_version=unknown
20193
20194 for cf_db_version in 1 2 3 4 5 6
20195 do
20196
20197 echo "${as_me:-configure}:20197: testing checking for db version $cf_db_version ..." 1>&5
20198
20199         cat >conftest.$ac_ext <<_ACEOF
20200 #line 20200 "configure"
20201 #include "confdefs.h"
20202
20203 $ac_includes_default
20204 #include <db.h>
20205
20206 #ifdef DB_VERSION_MAJOR
20207         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20208 #if $cf_db_version == DB_VERSION_MAJOR
20209         /* ok */
20210 #else
20211         make an error
20212 #endif
20213 #else
20214 #if $cf_db_version == 1
20215         /* ok: assuming this is DB 1.8.5 */
20216 #else
20217         make an error
20218 #endif
20219 #endif
20220
20221 int
20222 main (void)
20223 {
20224 DBT *foo = 0
20225   ;
20226   return 0;
20227 }
20228 _ACEOF
20229 rm -f conftest.$ac_objext
20230 if { (eval echo "$as_me:20230: \"$ac_compile\"") >&5
20231   (eval $ac_compile) 2>&5
20232   ac_status=$?
20233   echo "$as_me:20233: \$? = $ac_status" >&5
20234   (exit $ac_status); } &&
20235          { ac_try='test -s conftest.$ac_objext'
20236   { (eval echo "$as_me:20236: \"$ac_try\"") >&5
20237   (eval $ac_try) 2>&5
20238   ac_status=$?
20239   echo "$as_me:20239: \$? = $ac_status" >&5
20240   (exit $ac_status); }; }; then
20241
20242         cf_cv_hashed_db_version=$cf_db_version
20243         break
20244
20245 else
20246   echo "$as_me: failed program was:" >&5
20247 cat conftest.$ac_ext >&5
20248 fi
20249 rm -f conftest.$ac_objext conftest.$ac_ext
20250 done
20251
20252 fi
20253 echo "$as_me:20253: result: $cf_cv_hashed_db_version" >&5
20254 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20255
20256 if test "$cf_cv_hashed_db_version" = unknown ; then
20257         { { echo "$as_me:20257: error: Cannot determine version of db" >&5
20258 echo "$as_me: error: Cannot determine version of db" >&2;}
20259    { (exit 1); exit 1; }; }
20260 else
20261
20262 echo "$as_me:20262: checking for db libraries" >&5
20263 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20264 if test "${cf_cv_hashed_db_libs+set}" = set; then
20265   echo $ECHO_N "(cached) $ECHO_C" >&6
20266 else
20267
20268 cf_cv_hashed_db_libs=unknown
20269 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20270 do
20271         cf_save_libs="$LIBS"
20272         if test -n "$cf_db_libs"; then
20273
20274 cf_add_libs="-l$cf_db_libs"
20275 # Filter out duplicates - this happens with badly-designed ".pc" files...
20276 for cf_add_1lib in $LIBS
20277 do
20278         for cf_add_2lib in $cf_add_libs
20279         do
20280                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20281                 then
20282                         cf_add_1lib=
20283                         break
20284                 fi
20285         done
20286         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20287 done
20288 LIBS="$cf_add_libs"
20289
20290         fi
20291
20292 echo "${as_me:-configure}:20292: testing checking for library "$cf_db_libs" ..." 1>&5
20293
20294         cat >conftest.$ac_ext <<_ACEOF
20295 #line 20295 "configure"
20296 #include "confdefs.h"
20297
20298 $ac_includes_default
20299 #include <db.h>
20300
20301 int
20302 main (void)
20303 {
20304
20305         char *path = "/tmp/foo";
20306 #ifdef DB_VERSION_MAJOR
20307 #if DB_VERSION_MAJOR >= 4
20308         DB *result = 0;
20309         db_create(&result, NULL, 0);
20310         result->open(result,
20311                 NULL,
20312                 path,
20313                 path,
20314                 DB_HASH,
20315                 DB_CREATE,
20316                 0644);
20317 #elif DB_VERSION_MAJOR >= 3
20318         DB *result = 0;
20319         db_create(&result, NULL, 0);
20320         result->open(result,
20321                 path,
20322                 path,
20323                 DB_HASH,
20324                 DB_CREATE,
20325                 0644);
20326 #elif DB_VERSION_MAJOR >= 2
20327         DB *result = 0;
20328         db_open(path,
20329                 DB_HASH,
20330                 DB_CREATE,
20331                 0644,
20332                 (DB_ENV *) 0,
20333                 (DB_INFO *) 0,
20334                 &result);
20335 #endif /* DB_VERSION_MAJOR */
20336 #else
20337         DB *result = dbopen(path,
20338                      2,
20339                      0644,
20340                      DB_HASH,
20341                      0);
20342 #endif
20343         ${cf_cv_main_return:-return}(result != 0)
20344
20345   ;
20346   return 0;
20347 }
20348 _ACEOF
20349 rm -f conftest.$ac_objext conftest$ac_exeext
20350 if { (eval echo "$as_me:20350: \"$ac_link\"") >&5
20351   (eval $ac_link) 2>&5
20352   ac_status=$?
20353   echo "$as_me:20353: \$? = $ac_status" >&5
20354   (exit $ac_status); } &&
20355          { ac_try='test -s conftest$ac_exeext'
20356   { (eval echo "$as_me:20356: \"$ac_try\"") >&5
20357   (eval $ac_try) 2>&5
20358   ac_status=$?
20359   echo "$as_me:20359: \$? = $ac_status" >&5
20360   (exit $ac_status); }; }; then
20361
20362         if test -n "$cf_db_libs" ; then
20363                 cf_cv_hashed_db_libs=$cf_db_libs
20364         else
20365                 cf_cv_hashed_db_libs=default
20366         fi
20367         LIBS="$cf_save_libs"
20368         break
20369
20370 else
20371   echo "$as_me: failed program was:" >&5
20372 cat conftest.$ac_ext >&5
20373 fi
20374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20375         LIBS="$cf_save_libs"
20376 done
20377
20378 fi
20379 echo "$as_me:20379: result: $cf_cv_hashed_db_libs" >&5
20380 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20381
20382         if test "$cf_cv_hashed_db_libs" = unknown ; then
20383                 { { echo "$as_me:20383: error: Cannot determine library for db" >&5
20384 echo "$as_me: error: Cannot determine library for db" >&2;}
20385    { (exit 1); exit 1; }; }
20386         elif test "$cf_cv_hashed_db_libs" != default ; then
20387
20388 cf_add_libs="-l$cf_cv_hashed_db_libs"
20389 # Filter out duplicates - this happens with badly-designed ".pc" files...
20390 for cf_add_1lib in $LIBS
20391 do
20392         for cf_add_2lib in $cf_add_libs
20393         do
20394                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20395                 then
20396                         cf_add_1lib=
20397                         break
20398                 fi
20399         done
20400         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20401 done
20402 LIBS="$cf_add_libs"
20403
20404         fi
20405 fi
20406
20407 else
20408
20409         { { echo "$as_me:20409: error: Cannot find db.h" >&5
20410 echo "$as_me: error: Cannot find db.h" >&2;}
20411    { (exit 1); exit 1; }; }
20412
20413 fi
20414
20415 fi
20416
20417 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20418         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20419         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20420 fi
20421
20422 # Just in case, check if the C compiler has a bool type.
20423
20424 echo "$as_me:20424: checking if we should include stdbool.h" >&5
20425 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20426
20427 if test "${cf_cv_header_stdbool_h+set}" = set; then
20428   echo $ECHO_N "(cached) $ECHO_C" >&6
20429 else
20430
20431         cat >conftest.$ac_ext <<_ACEOF
20432 #line 20432 "configure"
20433 #include "confdefs.h"
20434
20435 int
20436 main (void)
20437 {
20438 bool foo = false
20439   ;
20440   return 0;
20441 }
20442 _ACEOF
20443 rm -f conftest.$ac_objext
20444 if { (eval echo "$as_me:20444: \"$ac_compile\"") >&5
20445   (eval $ac_compile) 2>&5
20446   ac_status=$?
20447   echo "$as_me:20447: \$? = $ac_status" >&5
20448   (exit $ac_status); } &&
20449          { ac_try='test -s conftest.$ac_objext'
20450   { (eval echo "$as_me:20450: \"$ac_try\"") >&5
20451   (eval $ac_try) 2>&5
20452   ac_status=$?
20453   echo "$as_me:20453: \$? = $ac_status" >&5
20454   (exit $ac_status); }; }; then
20455   cf_cv_header_stdbool_h=0
20456 else
20457   echo "$as_me: failed program was:" >&5
20458 cat conftest.$ac_ext >&5
20459 cat >conftest.$ac_ext <<_ACEOF
20460 #line 20460 "configure"
20461 #include "confdefs.h"
20462
20463 #ifndef __BEOS__
20464 #include <stdbool.h>
20465 #endif
20466
20467 int
20468 main (void)
20469 {
20470 bool foo = false
20471   ;
20472   return 0;
20473 }
20474 _ACEOF
20475 rm -f conftest.$ac_objext
20476 if { (eval echo "$as_me:20476: \"$ac_compile\"") >&5
20477   (eval $ac_compile) 2>&5
20478   ac_status=$?
20479   echo "$as_me:20479: \$? = $ac_status" >&5
20480   (exit $ac_status); } &&
20481          { ac_try='test -s conftest.$ac_objext'
20482   { (eval echo "$as_me:20482: \"$ac_try\"") >&5
20483   (eval $ac_try) 2>&5
20484   ac_status=$?
20485   echo "$as_me:20485: \$? = $ac_status" >&5
20486   (exit $ac_status); }; }; then
20487   cf_cv_header_stdbool_h=1
20488 else
20489   echo "$as_me: failed program was:" >&5
20490 cat conftest.$ac_ext >&5
20491 cf_cv_header_stdbool_h=0
20492 fi
20493 rm -f conftest.$ac_objext conftest.$ac_ext
20494 fi
20495 rm -f conftest.$ac_objext conftest.$ac_ext
20496 fi
20497
20498 if test "$cf_cv_header_stdbool_h" = 1
20499 then    echo "$as_me:20499: result: yes" >&5
20500 echo "${ECHO_T}yes" >&6
20501 else    echo "$as_me:20501: result: no" >&5
20502 echo "${ECHO_T}no" >&6
20503 fi
20504
20505 echo "$as_me:20505: checking for builtin bool type" >&5
20506 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20507
20508 if test "${cf_cv_cc_bool_type+set}" = set; then
20509   echo $ECHO_N "(cached) $ECHO_C" >&6
20510 else
20511
20512         cat >conftest.$ac_ext <<_ACEOF
20513 #line 20513 "configure"
20514 #include "confdefs.h"
20515
20516 #include <stdio.h>
20517 #include <sys/types.h>
20518
20519 int
20520 main (void)
20521 {
20522 bool x = false
20523   ;
20524   return 0;
20525 }
20526 _ACEOF
20527 rm -f conftest.$ac_objext
20528 if { (eval echo "$as_me:20528: \"$ac_compile\"") >&5
20529   (eval $ac_compile) 2>&5
20530   ac_status=$?
20531   echo "$as_me:20531: \$? = $ac_status" >&5
20532   (exit $ac_status); } &&
20533          { ac_try='test -s conftest.$ac_objext'
20534   { (eval echo "$as_me:20534: \"$ac_try\"") >&5
20535   (eval $ac_try) 2>&5
20536   ac_status=$?
20537   echo "$as_me:20537: \$? = $ac_status" >&5
20538   (exit $ac_status); }; }; then
20539   cf_cv_cc_bool_type=1
20540 else
20541   echo "$as_me: failed program was:" >&5
20542 cat conftest.$ac_ext >&5
20543 cf_cv_cc_bool_type=0
20544 fi
20545 rm -f conftest.$ac_objext conftest.$ac_ext
20546
20547 fi
20548
20549 if test "$cf_cv_cc_bool_type" = 1
20550 then    echo "$as_me:20550: result: yes" >&5
20551 echo "${ECHO_T}yes" >&6
20552 else    echo "$as_me:20552: result: no" >&5
20553 echo "${ECHO_T}no" >&6
20554 fi
20555
20556 # Check for C++ compiler characteristics (and ensure that it's there!)
20557 if test -n "$CXX" ; then
20558         ac_ext=cc
20559 ac_cpp='$CXXCPP $CPPFLAGS'
20560 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20561 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20562 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20563 ac_main_return=return
20564
20565 if test -n "$GXX" ; then
20566
20567         cf_save="$LIBS"
20568         LIBS="$LIBS $CXXLIBS"
20569         echo "$as_me:20569: checking if we already have C++ library" >&5
20570 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20571         cat >conftest.$ac_ext <<_ACEOF
20572 #line 20572 "configure"
20573 #include "confdefs.h"
20574
20575                         #include <iostream>
20576 int
20577 main (void)
20578 {
20579
20580                         std::cout << "Hello World!" << std::endl;
20581   ;
20582   return 0;
20583 }
20584 _ACEOF
20585 rm -f conftest.$ac_objext conftest$ac_exeext
20586 if { (eval echo "$as_me:20586: \"$ac_link\"") >&5
20587   (eval $ac_link) 2>&5
20588   ac_status=$?
20589   echo "$as_me:20589: \$? = $ac_status" >&5
20590   (exit $ac_status); } &&
20591          { ac_try='test -s conftest$ac_exeext'
20592   { (eval echo "$as_me:20592: \"$ac_try\"") >&5
20593   (eval $ac_try) 2>&5
20594   ac_status=$?
20595   echo "$as_me:20595: \$? = $ac_status" >&5
20596   (exit $ac_status); }; }; then
20597   cf_have_libstdcpp=yes
20598 else
20599   echo "$as_me: failed program was:" >&5
20600 cat conftest.$ac_ext >&5
20601 cf_have_libstdcpp=no
20602 fi
20603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20604         echo "$as_me:20604: result: $cf_have_libstdcpp" >&5
20605 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20606         LIBS="$cf_save"
20607
20608         if test $cf_have_libstdcpp != yes
20609         then
20610                 case $cf_cv_system_name in
20611                 (os2*)
20612                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20613                                 cf_stdcpp_libname=stdcpp
20614                         else
20615                                 cf_stdcpp_libname=stdc++
20616                         fi
20617                         ;;
20618                 (*)
20619                         cf_stdcpp_libname=stdc++
20620                         ;;
20621                 esac
20622
20623                 echo "$as_me:20623: checking for library $cf_stdcpp_libname" >&5
20624 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20625 if test "${cf_cv_libstdcpp+set}" = set; then
20626   echo $ECHO_N "(cached) $ECHO_C" >&6
20627 else
20628
20629                         cf_save="$LIBS"
20630                         LIBS="$LIBS $CXXLIBS"
20631
20632 cf_add_libs="-l$cf_stdcpp_libname"
20633 # Filter out duplicates - this happens with badly-designed ".pc" files...
20634 for cf_add_1lib in $LIBS
20635 do
20636         for cf_add_2lib in $cf_add_libs
20637         do
20638                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20639                 then
20640                         cf_add_1lib=
20641                         break
20642                 fi
20643         done
20644         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20645 done
20646 LIBS="$cf_add_libs"
20647
20648                 cat >conftest.$ac_ext <<_ACEOF
20649 #line 20649 "configure"
20650 #include "confdefs.h"
20651
20652                                 #include <iostream>
20653 int
20654 main (void)
20655 {
20656
20657                                 std::cout << "Hello World!" << std::endl;
20658   ;
20659   return 0;
20660 }
20661 _ACEOF
20662 rm -f conftest.$ac_objext conftest$ac_exeext
20663 if { (eval echo "$as_me:20663: \"$ac_link\"") >&5
20664   (eval $ac_link) 2>&5
20665   ac_status=$?
20666   echo "$as_me:20666: \$? = $ac_status" >&5
20667   (exit $ac_status); } &&
20668          { ac_try='test -s conftest$ac_exeext'
20669   { (eval echo "$as_me:20669: \"$ac_try\"") >&5
20670   (eval $ac_try) 2>&5
20671   ac_status=$?
20672   echo "$as_me:20672: \$? = $ac_status" >&5
20673   (exit $ac_status); }; }; then
20674   cf_cv_libstdcpp=yes
20675 else
20676   echo "$as_me: failed program was:" >&5
20677 cat conftest.$ac_ext >&5
20678 cf_cv_libstdcpp=no
20679 fi
20680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20681                         LIBS="$cf_save"
20682
20683 fi
20684 echo "$as_me:20684: result: $cf_cv_libstdcpp" >&5
20685 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20686                 test "$cf_cv_libstdcpp" = yes && {
20687 cf_add_libs="-l$cf_stdcpp_libname"
20688 # Filter out duplicates - this happens with badly-designed ".pc" files...
20689 for cf_add_1lib in $CXXLIBS
20690 do
20691         for cf_add_2lib in $cf_add_libs
20692         do
20693                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20694                 then
20695                         cf_add_1lib=
20696                         break
20697                 fi
20698         done
20699         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20700 done
20701 CXXLIBS="$cf_add_libs"
20702  }
20703         fi
20704 fi
20705
20706         echo "$as_me:20706: checking whether $CXX understands -c and -o together" >&5
20707 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20708 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20709   echo $ECHO_N "(cached) $ECHO_C" >&6
20710 else
20711
20712 cat > conftest.$ac_ext <<CF_EOF
20713 int main(void)
20714 {
20715         ${cf_cv_main_return:-return}(0);
20716 }
20717 CF_EOF
20718 # We do the test twice because some compilers refuse to overwrite an
20719 # existing .o file with -o, though they will create one.
20720 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20721 if { (eval echo "$as_me:20721: \"$ac_try\"") >&5
20722   (eval $ac_try) 2>&5
20723   ac_status=$?
20724   echo "$as_me:20724: \$? = $ac_status" >&5
20725   (exit $ac_status); } &&
20726   test -f conftest2.$ac_objext && { (eval echo "$as_me:20726: \"$ac_try\"") >&5
20727   (eval $ac_try) 2>&5
20728   ac_status=$?
20729   echo "$as_me:20729: \$? = $ac_status" >&5
20730   (exit $ac_status); };
20731 then
20732   eval cf_cv_prog_CXX_c_o=yes
20733 else
20734   eval cf_cv_prog_CXX_c_o=no
20735 fi
20736 rm -rf conftest*
20737
20738 fi
20739 if test $cf_cv_prog_CXX_c_o = yes; then
20740   echo "$as_me:20740: result: yes" >&5
20741 echo "${ECHO_T}yes" >&6
20742 else
20743   echo "$as_me:20743: result: no" >&5
20744 echo "${ECHO_T}no" >&6
20745 fi
20746
20747         case $GXX_VERSION in
20748         (1*|2.0-6*)
20749                 cf_cxx_library=yes
20750                 ;;
20751         (*-2.7*|2.7*)
20752
20753 cf_cxx_library=unknown
20754 case $cf_cv_system_name in
20755 (os2*)
20756         cf_gpp_libname=gpp
20757         ;;
20758 (*)
20759         cf_gpp_libname=g++
20760         ;;
20761 esac
20762 if test "$GXX" = yes; then
20763         echo "$as_me:20763: checking for lib$cf_gpp_libname" >&5
20764 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20765         cf_save="$LIBS"
20766
20767 cf_add_libs="-l$cf_gpp_libname"
20768 # Filter out duplicates - this happens with badly-designed ".pc" files...
20769 for cf_add_1lib in $LIBS
20770 do
20771         for cf_add_2lib in $cf_add_libs
20772         do
20773                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20774                 then
20775                         cf_add_1lib=
20776                         break
20777                 fi
20778         done
20779         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20780 done
20781 LIBS="$cf_add_libs"
20782
20783         cat >conftest.$ac_ext <<_ACEOF
20784 #line 20784 "configure"
20785 #include "confdefs.h"
20786
20787 #include <$cf_gpp_libname/builtin.h>
20788
20789 int
20790 main (void)
20791 {
20792 two_arg_error_handler_t foo2 = lib_error_handler
20793   ;
20794   return 0;
20795 }
20796 _ACEOF
20797 rm -f conftest.$ac_objext conftest$ac_exeext
20798 if { (eval echo "$as_me:20798: \"$ac_link\"") >&5
20799   (eval $ac_link) 2>&5
20800   ac_status=$?
20801   echo "$as_me:20801: \$? = $ac_status" >&5
20802   (exit $ac_status); } &&
20803          { ac_try='test -s conftest$ac_exeext'
20804   { (eval echo "$as_me:20804: \"$ac_try\"") >&5
20805   (eval $ac_try) 2>&5
20806   ac_status=$?
20807   echo "$as_me:20807: \$? = $ac_status" >&5
20808   (exit $ac_status); }; }; then
20809   cf_cxx_library=yes
20810
20811 cf_add_libs="-l$cf_gpp_libname"
20812 # Filter out duplicates - this happens with badly-designed ".pc" files...
20813 for cf_add_1lib in $CXXLIBS
20814 do
20815         for cf_add_2lib in $cf_add_libs
20816         do
20817                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20818                 then
20819                         cf_add_1lib=
20820                         break
20821                 fi
20822         done
20823         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20824 done
20825 CXXLIBS="$cf_add_libs"
20826
20827          if test "$cf_gpp_libname" = cpp ; then
20828
20829 cat >>confdefs.h <<\EOF
20830 #define HAVE_GPP_BUILTIN_H 1
20831 EOF
20832
20833          else
20834
20835 cat >>confdefs.h <<\EOF
20836 #define HAVE_GXX_BUILTIN_H 1
20837 EOF
20838
20839          fi
20840 else
20841   echo "$as_me: failed program was:" >&5
20842 cat conftest.$ac_ext >&5
20843 cat >conftest.$ac_ext <<_ACEOF
20844 #line 20844 "configure"
20845 #include "confdefs.h"
20846
20847 #include <builtin.h>
20848
20849 int
20850 main (void)
20851 {
20852 two_arg_error_handler_t foo2 = lib_error_handler
20853   ;
20854   return 0;
20855 }
20856 _ACEOF
20857 rm -f conftest.$ac_objext conftest$ac_exeext
20858 if { (eval echo "$as_me:20858: \"$ac_link\"") >&5
20859   (eval $ac_link) 2>&5
20860   ac_status=$?
20861   echo "$as_me:20861: \$? = $ac_status" >&5
20862   (exit $ac_status); } &&
20863          { ac_try='test -s conftest$ac_exeext'
20864   { (eval echo "$as_me:20864: \"$ac_try\"") >&5
20865   (eval $ac_try) 2>&5
20866   ac_status=$?
20867   echo "$as_me:20867: \$? = $ac_status" >&5
20868   (exit $ac_status); }; }; then
20869   cf_cxx_library=yes
20870
20871 cf_add_libs="-l$cf_gpp_libname"
20872 # Filter out duplicates - this happens with badly-designed ".pc" files...
20873 for cf_add_1lib in $CXXLIBS
20874 do
20875         for cf_add_2lib in $cf_add_libs
20876         do
20877                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20878                 then
20879                         cf_add_1lib=
20880                         break
20881                 fi
20882         done
20883         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20884 done
20885 CXXLIBS="$cf_add_libs"
20886
20887 cat >>confdefs.h <<\EOF
20888 #define HAVE_BUILTIN_H 1
20889 EOF
20890
20891 else
20892   echo "$as_me: failed program was:" >&5
20893 cat conftest.$ac_ext >&5
20894 cf_cxx_library=no
20895 fi
20896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20897 fi
20898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20899         LIBS="$cf_save"
20900         echo "$as_me:20900: result: $cf_cxx_library" >&5
20901 echo "${ECHO_T}$cf_cxx_library" >&6
20902 fi
20903
20904                 ;;
20905         (*)
20906                 cf_cxx_library=no
20907                 ;;
20908         esac
20909
20910         ac_ext=cc
20911 ac_cpp='$CXXCPP $CPPFLAGS'
20912 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20913 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20914 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20915 ac_main_return=return
20916 echo "$as_me:20916: checking how to run the C++ preprocessor" >&5
20917 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20918 if test -z "$CXXCPP"; then
20919   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20920   echo $ECHO_N "(cached) $ECHO_C" >&6
20921 else
20922       # Double quotes because CXXCPP needs to be expanded
20923     for CXXCPP in "$CXX -E" "/lib/cpp"
20924     do
20925       ac_preproc_ok=false
20926 for ac_cxx_preproc_warn_flag in '' yes
20927 do
20928   # Use a header file that comes with gcc, so configuring glibc
20929   # with a fresh cross-compiler works.
20930   # On the NeXT, cc -E runs the code through the compiler's parser,
20931   # not just through cpp. "Syntax error" is here to catch this case.
20932   cat >conftest.$ac_ext <<_ACEOF
20933 #line 20933 "configure"
20934 #include "confdefs.h"
20935 #include <assert.h>
20936                      Syntax error
20937 _ACEOF
20938 if { (eval echo "$as_me:20938: \"$ac_cpp conftest.$ac_ext\"") >&5
20939   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20940   ac_status=$?
20941   egrep -v '^ *\+' conftest.er1 >conftest.err
20942   rm -f conftest.er1
20943   cat conftest.err >&5
20944   echo "$as_me:20944: \$? = $ac_status" >&5
20945   (exit $ac_status); } >/dev/null; then
20946   if test -s conftest.err; then
20947     ac_cpp_err=$ac_cxx_preproc_warn_flag
20948   else
20949     ac_cpp_err=
20950   fi
20951 else
20952   ac_cpp_err=yes
20953 fi
20954 if test -z "$ac_cpp_err"; then
20955   :
20956 else
20957   echo "$as_me: failed program was:" >&5
20958   cat conftest.$ac_ext >&5
20959   # Broken: fails on valid input.
20960 continue
20961 fi
20962 rm -f conftest.err conftest.$ac_ext
20963
20964   # OK, works on sane cases.  Now check whether non-existent headers
20965   # can be detected and how.
20966   cat >conftest.$ac_ext <<_ACEOF
20967 #line 20967 "configure"
20968 #include "confdefs.h"
20969 #include <ac_nonexistent.h>
20970 _ACEOF
20971 if { (eval echo "$as_me:20971: \"$ac_cpp conftest.$ac_ext\"") >&5
20972   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20973   ac_status=$?
20974   egrep -v '^ *\+' conftest.er1 >conftest.err
20975   rm -f conftest.er1
20976   cat conftest.err >&5
20977   echo "$as_me:20977: \$? = $ac_status" >&5
20978   (exit $ac_status); } >/dev/null; then
20979   if test -s conftest.err; then
20980     ac_cpp_err=$ac_cxx_preproc_warn_flag
20981   else
20982     ac_cpp_err=
20983   fi
20984 else
20985   ac_cpp_err=yes
20986 fi
20987 if test -z "$ac_cpp_err"; then
20988   # Broken: success on invalid input.
20989 continue
20990 else
20991   echo "$as_me: failed program was:" >&5
20992   cat conftest.$ac_ext >&5
20993   # Passes both tests.
20994 ac_preproc_ok=:
20995 break
20996 fi
20997 rm -f conftest.err conftest.$ac_ext
20998
20999 done
21000 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21001 rm -f conftest.err conftest.$ac_ext
21002 if $ac_preproc_ok; then
21003   break
21004 fi
21005
21006     done
21007     ac_cv_prog_CXXCPP=$CXXCPP
21008
21009 fi
21010   CXXCPP=$ac_cv_prog_CXXCPP
21011 else
21012   ac_cv_prog_CXXCPP=$CXXCPP
21013 fi
21014 echo "$as_me:21014: result: $CXXCPP" >&5
21015 echo "${ECHO_T}$CXXCPP" >&6
21016 ac_preproc_ok=false
21017 for ac_cxx_preproc_warn_flag in '' yes
21018 do
21019   # Use a header file that comes with gcc, so configuring glibc
21020   # with a fresh cross-compiler works.
21021   # On the NeXT, cc -E runs the code through the compiler's parser,
21022   # not just through cpp. "Syntax error" is here to catch this case.
21023   cat >conftest.$ac_ext <<_ACEOF
21024 #line 21024 "configure"
21025 #include "confdefs.h"
21026 #include <assert.h>
21027                      Syntax error
21028 _ACEOF
21029 if { (eval echo "$as_me:21029: \"$ac_cpp conftest.$ac_ext\"") >&5
21030   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21031   ac_status=$?
21032   egrep -v '^ *\+' conftest.er1 >conftest.err
21033   rm -f conftest.er1
21034   cat conftest.err >&5
21035   echo "$as_me:21035: \$? = $ac_status" >&5
21036   (exit $ac_status); } >/dev/null; then
21037   if test -s conftest.err; then
21038     ac_cpp_err=$ac_cxx_preproc_warn_flag
21039   else
21040     ac_cpp_err=
21041   fi
21042 else
21043   ac_cpp_err=yes
21044 fi
21045 if test -z "$ac_cpp_err"; then
21046   :
21047 else
21048   echo "$as_me: failed program was:" >&5
21049   cat conftest.$ac_ext >&5
21050   # Broken: fails on valid input.
21051 continue
21052 fi
21053 rm -f conftest.err conftest.$ac_ext
21054
21055   # OK, works on sane cases.  Now check whether non-existent headers
21056   # can be detected and how.
21057   cat >conftest.$ac_ext <<_ACEOF
21058 #line 21058 "configure"
21059 #include "confdefs.h"
21060 #include <ac_nonexistent.h>
21061 _ACEOF
21062 if { (eval echo "$as_me:21062: \"$ac_cpp conftest.$ac_ext\"") >&5
21063   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21064   ac_status=$?
21065   egrep -v '^ *\+' conftest.er1 >conftest.err
21066   rm -f conftest.er1
21067   cat conftest.err >&5
21068   echo "$as_me:21068: \$? = $ac_status" >&5
21069   (exit $ac_status); } >/dev/null; then
21070   if test -s conftest.err; then
21071     ac_cpp_err=$ac_cxx_preproc_warn_flag
21072   else
21073     ac_cpp_err=
21074   fi
21075 else
21076   ac_cpp_err=yes
21077 fi
21078 if test -z "$ac_cpp_err"; then
21079   # Broken: success on invalid input.
21080 continue
21081 else
21082   echo "$as_me: failed program was:" >&5
21083   cat conftest.$ac_ext >&5
21084   # Passes both tests.
21085 ac_preproc_ok=:
21086 break
21087 fi
21088 rm -f conftest.err conftest.$ac_ext
21089
21090 done
21091 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21092 rm -f conftest.err conftest.$ac_ext
21093 if $ac_preproc_ok; then
21094   :
21095 else
21096   { { echo "$as_me:21096: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
21097 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
21098    { (exit 1); exit 1; }; }
21099 fi
21100
21101 ac_ext=cc
21102 ac_cpp='$CXXCPP $CPPFLAGS'
21103 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21104 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21105 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21106 ac_main_return=return
21107
21108 for ac_header in typeinfo
21109 do
21110 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21111 echo "$as_me:21111: checking for $ac_header" >&5
21112 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21114   echo $ECHO_N "(cached) $ECHO_C" >&6
21115 else
21116   cat >conftest.$ac_ext <<_ACEOF
21117 #line 21117 "configure"
21118 #include "confdefs.h"
21119 #include <$ac_header>
21120 _ACEOF
21121 if { (eval echo "$as_me:21121: \"$ac_cpp conftest.$ac_ext\"") >&5
21122   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21123   ac_status=$?
21124   egrep -v '^ *\+' conftest.er1 >conftest.err
21125   rm -f conftest.er1
21126   cat conftest.err >&5
21127   echo "$as_me:21127: \$? = $ac_status" >&5
21128   (exit $ac_status); } >/dev/null; then
21129   if test -s conftest.err; then
21130     ac_cpp_err=$ac_cxx_preproc_warn_flag
21131   else
21132     ac_cpp_err=
21133   fi
21134 else
21135   ac_cpp_err=yes
21136 fi
21137 if test -z "$ac_cpp_err"; then
21138   eval "$as_ac_Header=yes"
21139 else
21140   echo "$as_me: failed program was:" >&5
21141   cat conftest.$ac_ext >&5
21142   eval "$as_ac_Header=no"
21143 fi
21144 rm -f conftest.err conftest.$ac_ext
21145 fi
21146 echo "$as_me:21146: result: `eval echo '${'$as_ac_Header'}'`" >&5
21147 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21148 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21149   cat >>confdefs.h <<EOF
21150 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21151 EOF
21152
21153 fi
21154 done
21155
21156 for ac_header in iostream
21157 do
21158 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21159 echo "$as_me:21159: checking for $ac_header" >&5
21160 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21162   echo $ECHO_N "(cached) $ECHO_C" >&6
21163 else
21164   cat >conftest.$ac_ext <<_ACEOF
21165 #line 21165 "configure"
21166 #include "confdefs.h"
21167 #include <$ac_header>
21168 _ACEOF
21169 if { (eval echo "$as_me:21169: \"$ac_cpp conftest.$ac_ext\"") >&5
21170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21171   ac_status=$?
21172   egrep -v '^ *\+' conftest.er1 >conftest.err
21173   rm -f conftest.er1
21174   cat conftest.err >&5
21175   echo "$as_me:21175: \$? = $ac_status" >&5
21176   (exit $ac_status); } >/dev/null; then
21177   if test -s conftest.err; then
21178     ac_cpp_err=$ac_cxx_preproc_warn_flag
21179   else
21180     ac_cpp_err=
21181   fi
21182 else
21183   ac_cpp_err=yes
21184 fi
21185 if test -z "$ac_cpp_err"; then
21186   eval "$as_ac_Header=yes"
21187 else
21188   echo "$as_me: failed program was:" >&5
21189   cat conftest.$ac_ext >&5
21190   eval "$as_ac_Header=no"
21191 fi
21192 rm -f conftest.err conftest.$ac_ext
21193 fi
21194 echo "$as_me:21194: result: `eval echo '${'$as_ac_Header'}'`" >&5
21195 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21196 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21197   cat >>confdefs.h <<EOF
21198 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21199 EOF
21200
21201 fi
21202 done
21203
21204 if test x"$ac_cv_header_iostream" = xyes ; then
21205         echo "$as_me:21205: checking if iostream uses std-namespace" >&5
21206 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21207         cat >conftest.$ac_ext <<_ACEOF
21208 #line 21208 "configure"
21209 #include "confdefs.h"
21210
21211 #include <iostream>
21212 using std::endl;
21213 using std::cerr;
21214 int
21215 main (void)
21216 {
21217
21218 cerr << "testing" << endl;
21219
21220   ;
21221   return 0;
21222 }
21223 _ACEOF
21224 rm -f conftest.$ac_objext
21225 if { (eval echo "$as_me:21225: \"$ac_compile\"") >&5
21226   (eval $ac_compile) 2>&5
21227   ac_status=$?
21228   echo "$as_me:21228: \$? = $ac_status" >&5
21229   (exit $ac_status); } &&
21230          { ac_try='test -s conftest.$ac_objext'
21231   { (eval echo "$as_me:21231: \"$ac_try\"") >&5
21232   (eval $ac_try) 2>&5
21233   ac_status=$?
21234   echo "$as_me:21234: \$? = $ac_status" >&5
21235   (exit $ac_status); }; }; then
21236   cf_iostream_namespace=yes
21237 else
21238   echo "$as_me: failed program was:" >&5
21239 cat conftest.$ac_ext >&5
21240 cf_iostream_namespace=no
21241 fi
21242 rm -f conftest.$ac_objext conftest.$ac_ext
21243         echo "$as_me:21243: result: $cf_iostream_namespace" >&5
21244 echo "${ECHO_T}$cf_iostream_namespace" >&6
21245         if test "$cf_iostream_namespace" = yes ; then
21246
21247 cat >>confdefs.h <<\EOF
21248 #define IOSTREAM_NAMESPACE 1
21249 EOF
21250
21251         fi
21252 fi
21253
21254 echo "$as_me:21254: checking if we should include stdbool.h" >&5
21255 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21256
21257 if test "${cf_cv_header_stdbool_h+set}" = set; then
21258   echo $ECHO_N "(cached) $ECHO_C" >&6
21259 else
21260
21261         cat >conftest.$ac_ext <<_ACEOF
21262 #line 21262 "configure"
21263 #include "confdefs.h"
21264
21265 int
21266 main (void)
21267 {
21268 bool foo = false
21269   ;
21270   return 0;
21271 }
21272 _ACEOF
21273 rm -f conftest.$ac_objext
21274 if { (eval echo "$as_me:21274: \"$ac_compile\"") >&5
21275   (eval $ac_compile) 2>&5
21276   ac_status=$?
21277   echo "$as_me:21277: \$? = $ac_status" >&5
21278   (exit $ac_status); } &&
21279          { ac_try='test -s conftest.$ac_objext'
21280   { (eval echo "$as_me:21280: \"$ac_try\"") >&5
21281   (eval $ac_try) 2>&5
21282   ac_status=$?
21283   echo "$as_me:21283: \$? = $ac_status" >&5
21284   (exit $ac_status); }; }; then
21285   cf_cv_header_stdbool_h=0
21286 else
21287   echo "$as_me: failed program was:" >&5
21288 cat conftest.$ac_ext >&5
21289 cat >conftest.$ac_ext <<_ACEOF
21290 #line 21290 "configure"
21291 #include "confdefs.h"
21292
21293 #ifndef __BEOS__
21294 #include <stdbool.h>
21295 #endif
21296
21297 int
21298 main (void)
21299 {
21300 bool foo = false
21301   ;
21302   return 0;
21303 }
21304 _ACEOF
21305 rm -f conftest.$ac_objext
21306 if { (eval echo "$as_me:21306: \"$ac_compile\"") >&5
21307   (eval $ac_compile) 2>&5
21308   ac_status=$?
21309   echo "$as_me:21309: \$? = $ac_status" >&5
21310   (exit $ac_status); } &&
21311          { ac_try='test -s conftest.$ac_objext'
21312   { (eval echo "$as_me:21312: \"$ac_try\"") >&5
21313   (eval $ac_try) 2>&5
21314   ac_status=$?
21315   echo "$as_me:21315: \$? = $ac_status" >&5
21316   (exit $ac_status); }; }; then
21317   cf_cv_header_stdbool_h=1
21318 else
21319   echo "$as_me: failed program was:" >&5
21320 cat conftest.$ac_ext >&5
21321 cf_cv_header_stdbool_h=0
21322 fi
21323 rm -f conftest.$ac_objext conftest.$ac_ext
21324 fi
21325 rm -f conftest.$ac_objext conftest.$ac_ext
21326 fi
21327
21328 if test "$cf_cv_header_stdbool_h" = 1
21329 then    echo "$as_me:21329: result: yes" >&5
21330 echo "${ECHO_T}yes" >&6
21331 else    echo "$as_me:21331: result: no" >&5
21332 echo "${ECHO_T}no" >&6
21333 fi
21334
21335 echo "$as_me:21335: checking for builtin bool type" >&5
21336 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21337
21338 if test "${cf_cv_builtin_bool+set}" = set; then
21339   echo $ECHO_N "(cached) $ECHO_C" >&6
21340 else
21341
21342         cat >conftest.$ac_ext <<_ACEOF
21343 #line 21343 "configure"
21344 #include "confdefs.h"
21345
21346 #include <stdio.h>
21347 #include <sys/types.h>
21348
21349 int
21350 main (void)
21351 {
21352 bool x = false
21353   ;
21354   return 0;
21355 }
21356 _ACEOF
21357 rm -f conftest.$ac_objext
21358 if { (eval echo "$as_me:21358: \"$ac_compile\"") >&5
21359   (eval $ac_compile) 2>&5
21360   ac_status=$?
21361   echo "$as_me:21361: \$? = $ac_status" >&5
21362   (exit $ac_status); } &&
21363          { ac_try='test -s conftest.$ac_objext'
21364   { (eval echo "$as_me:21364: \"$ac_try\"") >&5
21365   (eval $ac_try) 2>&5
21366   ac_status=$?
21367   echo "$as_me:21367: \$? = $ac_status" >&5
21368   (exit $ac_status); }; }; then
21369   cf_cv_builtin_bool=1
21370 else
21371   echo "$as_me: failed program was:" >&5
21372 cat conftest.$ac_ext >&5
21373 cf_cv_builtin_bool=0
21374 fi
21375 rm -f conftest.$ac_objext conftest.$ac_ext
21376
21377 fi
21378
21379 if test "$cf_cv_builtin_bool" = 1
21380 then    echo "$as_me:21380: result: yes" >&5
21381 echo "${ECHO_T}yes" >&6
21382 else    echo "$as_me:21382: result: no" >&5
21383 echo "${ECHO_T}no" >&6
21384 fi
21385
21386 echo "$as_me:21386: checking for size of bool" >&5
21387 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21388 if test "${cf_cv_type_of_bool+set}" = set; then
21389   echo $ECHO_N "(cached) $ECHO_C" >&6
21390 else
21391
21392         rm -f cf_test.out
21393         if test "$cross_compiling" = yes; then
21394   cf_cv_type_of_bool=unknown
21395 else
21396   cat >conftest.$ac_ext <<_ACEOF
21397 #line 21397 "configure"
21398 #include "confdefs.h"
21399
21400 #include <stdlib.h>
21401 #include <stdio.h>
21402
21403 #if defined(__cplusplus)
21404
21405 #ifdef HAVE_GXX_BUILTIN_H
21406 #include <g++/builtin.h>
21407 #elif HAVE_GPP_BUILTIN_H
21408 #include <gpp/builtin.h>
21409 #elif HAVE_BUILTIN_H
21410 #include <builtin.h>
21411 #endif
21412
21413 #else
21414
21415 #if $cf_cv_header_stdbool_h
21416 #include <stdbool.h>
21417 #endif
21418
21419 #endif
21420
21421 int main(void)
21422 {
21423         FILE *fp = fopen("cf_test.out", "w");
21424         if (fp != 0) {
21425                 bool x = true;
21426                 if ((bool)(-x) >= 0)
21427                         fputs("unsigned ", fp);
21428                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21429                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21430                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21431                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21432                 fclose(fp);
21433         }
21434         ${cf_cv_main_return:-return}(0);
21435 }
21436
21437 _ACEOF
21438 rm -f conftest$ac_exeext
21439 if { (eval echo "$as_me:21439: \"$ac_link\"") >&5
21440   (eval $ac_link) 2>&5
21441   ac_status=$?
21442   echo "$as_me:21442: \$? = $ac_status" >&5
21443   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21444   { (eval echo "$as_me:21444: \"$ac_try\"") >&5
21445   (eval $ac_try) 2>&5
21446   ac_status=$?
21447   echo "$as_me:21447: \$? = $ac_status" >&5
21448   (exit $ac_status); }; }; then
21449   cf_cv_type_of_bool=`cat cf_test.out`
21450                  if test -z "$cf_cv_type_of_bool"; then
21451                    cf_cv_type_of_bool=unknown
21452                  fi
21453 else
21454   echo "$as_me: program exited with status $ac_status" >&5
21455 echo "$as_me: failed program was:" >&5
21456 cat conftest.$ac_ext >&5
21457 cf_cv_type_of_bool=unknown
21458 fi
21459 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21460 fi
21461
21462 fi
21463
21464         rm -f cf_test.out
21465 echo "$as_me:21465: result: $cf_cv_type_of_bool" >&5
21466 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21467 if test "$cf_cv_type_of_bool" = unknown ; then
21468         case .$NCURSES_BOOL in
21469         (.auto|.) NCURSES_BOOL=unsigned;;
21470         esac
21471         { echo "$as_me:21471: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21472 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21473         cf_cv_type_of_bool=$NCURSES_BOOL
21474 fi
21475
21476 echo "$as_me:21476: checking for special defines needed for etip.h" >&5
21477 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21478 cf_save_CXXFLAGS="$CXXFLAGS"
21479 cf_result="none"
21480
21481 # etip.h includes ncurses.h which includes ncurses_dll.h
21482 # But ncurses_dll.h is generated - fix here.
21483 test -d include || mkdir include
21484 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
21485
21486 for cf_math in "" MATH_H
21487 do
21488 for cf_excp in "" MATH_EXCEPTION
21489 do
21490         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21491         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21492         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21493 cat >conftest.$ac_ext <<_ACEOF
21494 #line 21494 "configure"
21495 #include "confdefs.h"
21496
21497 #include <etip.h.in>
21498
21499 int
21500 main (void)
21501 {
21502
21503   ;
21504   return 0;
21505 }
21506 _ACEOF
21507 rm -f conftest.$ac_objext
21508 if { (eval echo "$as_me:21508: \"$ac_compile\"") >&5
21509   (eval $ac_compile) 2>&5
21510   ac_status=$?
21511   echo "$as_me:21511: \$? = $ac_status" >&5
21512   (exit $ac_status); } &&
21513          { ac_try='test -s conftest.$ac_objext'
21514   { (eval echo "$as_me:21514: \"$ac_try\"") >&5
21515   (eval $ac_try) 2>&5
21516   ac_status=$?
21517   echo "$as_me:21517: \$? = $ac_status" >&5
21518   (exit $ac_status); }; }; then
21519
21520         test -n "$cf_math" && cat >>confdefs.h <<EOF
21521 #define ETIP_NEEDS_${cf_math} 1
21522 EOF
21523
21524         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21525 #define ETIP_NEEDS_${cf_excp} 1
21526 EOF
21527
21528         cf_result="$cf_math $cf_excp"
21529         break 2
21530
21531 else
21532   echo "$as_me: failed program was:" >&5
21533 cat conftest.$ac_ext >&5
21534 fi
21535 rm -f conftest.$ac_objext conftest.$ac_ext
21536 done
21537 done
21538 echo "$as_me:21538: result: $cf_result" >&5
21539 echo "${ECHO_T}$cf_result" >&6
21540 CXXFLAGS="$cf_save_CXXFLAGS"
21541
21542 if test -n "$CXX"; then
21543 echo "$as_me:21543: checking if $CXX accepts parameter initialization" >&5
21544 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21545 if test "${cf_cv_cpp_param_init+set}" = set; then
21546   echo $ECHO_N "(cached) $ECHO_C" >&6
21547 else
21548
21549         ac_ext=cc
21550 ac_cpp='$CXXCPP $CPPFLAGS'
21551 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21552 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21553 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21554 ac_main_return=return
21555
21556         if test "$cross_compiling" = yes; then
21557   cf_cv_cpp_param_init=unknown
21558 else
21559   cat >conftest.$ac_ext <<_ACEOF
21560 #line 21560 "configure"
21561 #include "confdefs.h"
21562
21563 class TEST {
21564 private:
21565         int value;
21566 public:
21567         TEST(int x = 1);
21568         ~TEST();
21569 };
21570
21571 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21572 {
21573         value = x;
21574 }
21575 int main(void) { }
21576
21577 _ACEOF
21578 rm -f conftest$ac_exeext
21579 if { (eval echo "$as_me:21579: \"$ac_link\"") >&5
21580   (eval $ac_link) 2>&5
21581   ac_status=$?
21582   echo "$as_me:21582: \$? = $ac_status" >&5
21583   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21584   { (eval echo "$as_me:21584: \"$ac_try\"") >&5
21585   (eval $ac_try) 2>&5
21586   ac_status=$?
21587   echo "$as_me:21587: \$? = $ac_status" >&5
21588   (exit $ac_status); }; }; then
21589   cf_cv_cpp_param_init=yes
21590 else
21591   echo "$as_me: program exited with status $ac_status" >&5
21592 echo "$as_me: failed program was:" >&5
21593 cat conftest.$ac_ext >&5
21594 cf_cv_cpp_param_init=no
21595 fi
21596 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21597 fi
21598         ac_ext=cc
21599 ac_cpp='$CXXCPP $CPPFLAGS'
21600 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21601 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21602 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21603 ac_main_return=return
21604
21605 fi
21606 echo "$as_me:21606: result: $cf_cv_cpp_param_init" >&5
21607 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21608 fi
21609 test "$cf_cv_cpp_param_init" = yes &&
21610 cat >>confdefs.h <<\EOF
21611 #define CPP_HAS_PARAM_INIT 1
21612 EOF
21613
21614 if test -n "$CXX"; then
21615
21616 echo "$as_me:21616: checking if $CXX accepts static_cast" >&5
21617 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21618 if test "${cf_cv_cpp_static_cast+set}" = set; then
21619   echo $ECHO_N "(cached) $ECHO_C" >&6
21620 else
21621
21622         ac_ext=cc
21623 ac_cpp='$CXXCPP $CPPFLAGS'
21624 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21625 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21626 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21627 ac_main_return=return
21628
21629         cat >conftest.$ac_ext <<_ACEOF
21630 #line 21630 "configure"
21631 #include "confdefs.h"
21632
21633 class NCursesPanel
21634 {
21635 public:
21636   NCursesPanel(int nlines,
21637                int ncols,
21638                int begin_y = 0,
21639                int begin_x = 0)
21640   {
21641   }
21642   NCursesPanel();
21643   ~NCursesPanel();
21644 };
21645
21646 template<class T> class NCursesUserPanel : public NCursesPanel
21647 {
21648 public:
21649   NCursesUserPanel (int nlines,
21650                     int ncols,
21651                     int begin_y = 0,
21652                     int begin_x = 0,
21653                     const T* p_UserData = static_cast<T*>(0))
21654     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21655   {
21656   };
21657   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21658   {
21659   };
21660
21661   virtual ~NCursesUserPanel() {};
21662 };
21663
21664 int
21665 main (void)
21666 {
21667
21668         const char* p_UserData = static_cast<char*>(0)
21669   ;
21670   return 0;
21671 }
21672 _ACEOF
21673 rm -f conftest.$ac_objext
21674 if { (eval echo "$as_me:21674: \"$ac_compile\"") >&5
21675   (eval $ac_compile) 2>&5
21676   ac_status=$?
21677   echo "$as_me:21677: \$? = $ac_status" >&5
21678   (exit $ac_status); } &&
21679          { ac_try='test -s conftest.$ac_objext'
21680   { (eval echo "$as_me:21680: \"$ac_try\"") >&5
21681   (eval $ac_try) 2>&5
21682   ac_status=$?
21683   echo "$as_me:21683: \$? = $ac_status" >&5
21684   (exit $ac_status); }; }; then
21685   cf_cv_cpp_static_cast=yes
21686 else
21687   echo "$as_me: failed program was:" >&5
21688 cat conftest.$ac_ext >&5
21689 cf_cv_cpp_static_cast=no
21690 fi
21691 rm -f conftest.$ac_objext conftest.$ac_ext
21692
21693         ac_ext=cc
21694 ac_cpp='$CXXCPP $CPPFLAGS'
21695 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21696 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21697 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21698 ac_main_return=return
21699
21700 fi
21701 echo "$as_me:21701: result: $cf_cv_cpp_static_cast" >&5
21702 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21703
21704 fi
21705
21706 test "$cf_cv_cpp_static_cast" = yes &&
21707 cat >>confdefs.h <<\EOF
21708 #define CPP_HAS_STATIC_CAST 1
21709 EOF
21710
21711         CXX_AR='$(AR)'
21712         CXX_ARFLAGS='$(ARFLAGS)'
21713         case $cf_cv_system_name in
21714         (irix*)
21715             if test "$GXX" != yes ; then
21716                 CXX_AR='$(CXX)'
21717                 CXX_ARFLAGS='-ar -o'
21718             fi
21719             ;;
21720         (sco3.2v5*)
21721             CXXLDFLAGS="-u main"
21722             ;;
21723         (solaris2*)
21724             if test "$GXX" != yes ; then
21725                 CXX_AR='$(CXX)'
21726                 CXX_ARFLAGS='-xar -o'
21727             fi
21728             ;;
21729         esac
21730
21731 else
21732         cf_cxx_library=no
21733         cf_cv_builtin_bool=1
21734
21735         # Just because we are not configuring against C++ right now does not
21736         # mean that a user will not want to use C++.  Some distributors disable
21737         # the C++ portion of this configuration as a shortcut (or just to avoid
21738         # compiling the demo in the c++ directory).  So we need a reasonable
21739         # default for the 'bool' type.
21740         #
21741         # Caveat: since the storage of the bool type is not standardized, it
21742         # may change.
21743
21744         if test "$NCURSES_BOOL" != auto ; then
21745                 cf_cv_type_of_bool=$NCURSES_BOOL
21746                 cf_cv_header_stdbool_h=0
21747         else
21748                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21749
21750 echo "$as_me:21750: checking for size of bool" >&5
21751 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21752 if test "${cf_cv_type_of_bool+set}" = set; then
21753   echo $ECHO_N "(cached) $ECHO_C" >&6
21754 else
21755
21756         rm -f cf_test.out
21757         if test "$cross_compiling" = yes; then
21758   cf_cv_type_of_bool=unknown
21759 else
21760   cat >conftest.$ac_ext <<_ACEOF
21761 #line 21761 "configure"
21762 #include "confdefs.h"
21763
21764 #include <stdlib.h>
21765 #include <stdio.h>
21766
21767 #if defined(__cplusplus)
21768
21769 #ifdef HAVE_GXX_BUILTIN_H
21770 #include <g++/builtin.h>
21771 #elif HAVE_GPP_BUILTIN_H
21772 #include <gpp/builtin.h>
21773 #elif HAVE_BUILTIN_H
21774 #include <builtin.h>
21775 #endif
21776
21777 #else
21778
21779 #if $cf_cv_header_stdbool_h
21780 #include <stdbool.h>
21781 #endif
21782
21783 #endif
21784
21785 int main(void)
21786 {
21787         FILE *fp = fopen("cf_test.out", "w");
21788         if (fp != 0) {
21789                 bool x = true;
21790                 if ((bool)(-x) >= 0)
21791                         fputs("unsigned ", fp);
21792                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21793                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21794                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21795                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21796                 fclose(fp);
21797         }
21798         ${cf_cv_main_return:-return}(0);
21799 }
21800
21801 _ACEOF
21802 rm -f conftest$ac_exeext
21803 if { (eval echo "$as_me:21803: \"$ac_link\"") >&5
21804   (eval $ac_link) 2>&5
21805   ac_status=$?
21806   echo "$as_me:21806: \$? = $ac_status" >&5
21807   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21808   { (eval echo "$as_me:21808: \"$ac_try\"") >&5
21809   (eval $ac_try) 2>&5
21810   ac_status=$?
21811   echo "$as_me:21811: \$? = $ac_status" >&5
21812   (exit $ac_status); }; }; then
21813   cf_cv_type_of_bool=`cat cf_test.out`
21814                  if test -z "$cf_cv_type_of_bool"; then
21815                    cf_cv_type_of_bool=unknown
21816                  fi
21817 else
21818   echo "$as_me: program exited with status $ac_status" >&5
21819 echo "$as_me: failed program was:" >&5
21820 cat conftest.$ac_ext >&5
21821 cf_cv_type_of_bool=unknown
21822 fi
21823 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21824 fi
21825
21826 fi
21827
21828         rm -f cf_test.out
21829 echo "$as_me:21829: result: $cf_cv_type_of_bool" >&5
21830 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21831 if test "$cf_cv_type_of_bool" = unknown ; then
21832         case .$NCURSES_BOOL in
21833         (.auto|.) NCURSES_BOOL=unsigned;;
21834         esac
21835         { echo "$as_me:21835: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21836 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21837         cf_cv_type_of_bool=$NCURSES_BOOL
21838 fi
21839
21840                 else
21841                         echo "$as_me:21841: checking for fallback type of bool" >&5
21842 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21843                         case "$host_cpu" in
21844                         (i?86)  cf_cv_type_of_bool=char ;;
21845                         (*)     cf_cv_type_of_bool=int  ;;
21846                         esac
21847                         echo "$as_me:21847: result: $cf_cv_type_of_bool" >&5
21848 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21849                 fi
21850         fi
21851 fi
21852
21853 # If the C compiler did not declare bool, and we did not determine that the C++
21854 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21855 # ncurses library use the same type as C++ bool.  Note that this allows one to
21856 # specify the type of bool in a configure-script option and postpone
21857 # integration with the C++ compiler provided that the types are compatible.
21858 USE_CXX_BOOL=1
21859 if test $cf_cv_cc_bool_type = 1
21860 then
21861         # oops: C has a bool.  Unlikely, but C++ could differ.
21862         USE_CXX_BOOL=0
21863 elif test $cf_cv_builtin_bool = 0
21864 then
21865         # C++ has no bool
21866         USE_CXX_BOOL=0
21867 else
21868         # this is the normal case
21869         USE_CXX_BOOL='defined(__cplusplus)'
21870 fi
21871
21872 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21873
21874         if test "$cf_with_ada" != "no" ; then
21875                 if test "$with_libtool" != "no"; then
21876                         { echo "$as_me:21876: WARNING: libtool does not support Ada - disabling feature" >&5
21877 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21878                         cf_with_ada=no
21879                 fi
21880         fi
21881
21882         if test "$cf_with_ada" != "no" ; then
21883
21884 cf_ada_make=gnatmake
21885 cf_ada_config="#"
21886 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21887 set dummy $cf_ada_make; ac_word=$2
21888 echo "$as_me:21888: checking for $ac_word" >&5
21889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21890 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
21891   echo $ECHO_N "(cached) $ECHO_C" >&6
21892 else
21893   if test -n "$gnatmake_exists"; then
21894   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
21895 else
21896   ac_save_IFS=$IFS; IFS=$ac_path_separator
21897 ac_dummy="$PATH"
21898 for ac_dir in $ac_dummy; do
21899   IFS=$ac_save_IFS
21900   test -z "$ac_dir" && ac_dir=.
21901   $as_executable_p "$ac_dir/$ac_word" || continue
21902 ac_cv_prog_gnatmake_exists="yes"
21903 echo "$as_me:21903: found $ac_dir/$ac_word" >&5
21904 break
21905 done
21906
21907   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
21908 fi
21909 fi
21910 gnatmake_exists=$ac_cv_prog_gnatmake_exists
21911 if test -n "$gnatmake_exists"; then
21912   echo "$as_me:21912: result: $gnatmake_exists" >&5
21913 echo "${ECHO_T}$gnatmake_exists" >&6
21914 else
21915   echo "$as_me:21915: result: no" >&5
21916 echo "${ECHO_T}no" >&6
21917 fi
21918
21919 if test "$ac_cv_prog_gnatmake_exists" = no; then
21920         cf_ada_make=
21921         cf_cv_prog_gnat_correct=no
21922 else
21923         # Extract the first word of "gprconfig", so it can be a program name with args.
21924 set dummy gprconfig; ac_word=$2
21925 echo "$as_me:21925: checking for $ac_word" >&5
21926 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21927 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
21928   echo $ECHO_N "(cached) $ECHO_C" >&6
21929 else
21930   if test -n "$gprconfig_exists"; then
21931   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
21932 else
21933   ac_save_IFS=$IFS; IFS=$ac_path_separator
21934 ac_dummy="$PATH"
21935 for ac_dir in $ac_dummy; do
21936   IFS=$ac_save_IFS
21937   test -z "$ac_dir" && ac_dir=.
21938   $as_executable_p "$ac_dir/$ac_word" || continue
21939 ac_cv_prog_gprconfig_exists="yes"
21940 echo "$as_me:21940: found $ac_dir/$ac_word" >&5
21941 break
21942 done
21943
21944   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
21945 fi
21946 fi
21947 gprconfig_exists=$ac_cv_prog_gprconfig_exists
21948 if test -n "$gprconfig_exists"; then
21949   echo "$as_me:21949: result: $gprconfig_exists" >&5
21950 echo "${ECHO_T}$gprconfig_exists" >&6
21951 else
21952   echo "$as_me:21952: result: no" >&5
21953 echo "${ECHO_T}no" >&6
21954 fi
21955
21956         if test "$ac_cv_prog_gprconfig_exists" = yes
21957         then
21958                 rm -rf conftest* *~conftest*
21959                 if mkdir conftest.src
21960                 then
21961                         cf_ada_config=""
21962                         cd conftest.src
21963                         for cf_gprconfig in Ada C
21964                         do
21965                                 echo "$as_me:21965: checking for gprconfig name for $cf_gprconfig" >&5
21966 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
21967                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
21968                                 if test -n "$cf_gprconfig_value"
21969                                 then
21970                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
21971                                         echo "$as_me:21971: result: $cf_gprconfig_value" >&5
21972 echo "${ECHO_T}$cf_gprconfig_value" >&6
21973                                 else
21974                                         echo "$as_me:21974: result: missing" >&5
21975 echo "${ECHO_T}missing" >&6
21976                                         cf_ada_config="#"
21977                                         break
21978                                 fi
21979                         done
21980                         cd ..
21981                         rm -rf conftest* *~conftest*
21982                 fi
21983         else
21984                 # gprconfig is newer than gnatmake; we can continue...
21985                 cf_ada_config="##"
21986         fi
21987         if test "x$cf_ada_config" != "x#"
21988         then
21989
21990 echo "$as_me:21990: checking for gnat version" >&5
21991 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21992 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21993         grep '[0-9].[0-9][0-9]*' |\
21994         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21995 echo "$as_me:21995: result: $cf_gnat_version" >&5
21996 echo "${ECHO_T}$cf_gnat_version" >&6
21997
21998 case $cf_gnat_version in
21999 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
22000         cf_cv_prog_gnat_correct=yes
22001         ;;
22002 (*)
22003         { echo "$as_me:22003: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
22004 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
22005         cf_cv_prog_gnat_correct=no
22006         ;;
22007 esac
22008
22009                 # Extract the first word of "m4", so it can be a program name with args.
22010 set dummy m4; ac_word=$2
22011 echo "$as_me:22011: checking for $ac_word" >&5
22012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22013 if test "${ac_cv_prog_M4_exists+set}" = set; then
22014   echo $ECHO_N "(cached) $ECHO_C" >&6
22015 else
22016   if test -n "$M4_exists"; then
22017   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
22018 else
22019   ac_save_IFS=$IFS; IFS=$ac_path_separator
22020 ac_dummy="$PATH"
22021 for ac_dir in $ac_dummy; do
22022   IFS=$ac_save_IFS
22023   test -z "$ac_dir" && ac_dir=.
22024   $as_executable_p "$ac_dir/$ac_word" || continue
22025 ac_cv_prog_M4_exists="yes"
22026 echo "$as_me:22026: found $ac_dir/$ac_word" >&5
22027 break
22028 done
22029
22030   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
22031 fi
22032 fi
22033 M4_exists=$ac_cv_prog_M4_exists
22034 if test -n "$M4_exists"; then
22035   echo "$as_me:22035: result: $M4_exists" >&5
22036 echo "${ECHO_T}$M4_exists" >&6
22037 else
22038   echo "$as_me:22038: result: no" >&5
22039 echo "${ECHO_T}no" >&6
22040 fi
22041
22042                 if test "$ac_cv_prog_M4_exists" = no; then
22043                         cf_cv_prog_gnat_correct=no
22044                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
22045                 fi
22046                 if test "$cf_cv_prog_gnat_correct" = yes; then
22047                         echo "$as_me:22047: checking if GNAT works" >&5
22048 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
22049
22050 rm -rf conftest* *~conftest*
22051 cat >>conftest.ads <<CF_EOF
22052 procedure conftest;
22053 CF_EOF
22054 cat >>conftest.adb <<CF_EOF
22055 with Text_IO;
22056 with GNAT.OS_Lib;
22057 procedure conftest is
22058 begin
22059    Text_IO.Put ("Hello World");
22060    Text_IO.New_Line;
22061    GNAT.OS_Lib.OS_Exit (0);
22062 end conftest;
22063 CF_EOF
22064 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22065    if ( ./conftest 1>&5 2>&1 ) ; then
22066       cf_cv_prog_gnat_correct=yes
22067    else
22068       cf_cv_prog_gnat_correct=no
22069    fi
22070 else
22071    cf_cv_prog_gnat_correct=no
22072 fi
22073 rm -rf conftest* *~conftest*
22074
22075                         echo "$as_me:22075: result: $cf_cv_prog_gnat_correct" >&5
22076 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
22077                 fi
22078         else
22079                 cf_cv_prog_gnat_correct=no
22080         fi
22081 fi
22082
22083                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
22084
22085         ADAFLAGS="$ADAFLAGS -gnatpn"
22086
22087         echo "$as_me:22087: checking optimization options for ADAFLAGS" >&5
22088 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
22089         case "$CFLAGS" in
22090         (*-g*)
22091
22092         ADAFLAGS="$ADAFLAGS -g"
22093
22094                 ;;
22095         esac
22096         case "$CFLAGS" in
22097         (*-O*)
22098                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
22099
22100         ADAFLAGS="$ADAFLAGS $cf_O_flag"
22101
22102                 ;;
22103         esac
22104         echo "$as_me:22104: result: $ADAFLAGS" >&5
22105 echo "${ECHO_T}$ADAFLAGS" >&6
22106
22107 echo "$as_me:22107: checking if GNATPREP supports -T option" >&5
22108 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
22109 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
22110   echo $ECHO_N "(cached) $ECHO_C" >&6
22111 else
22112
22113 cf_cv_gnatprep_opt_t=no
22114 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
22115
22116 fi
22117 echo "$as_me:22117: result: $cf_cv_gnatprep_opt_t" >&5
22118 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
22119 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
22120
22121 echo "$as_me:22121: checking if GNAT supports generics" >&5
22122 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
22123 case $cf_gnat_version in
22124 (3.[1-9]*|[4-9].*)
22125         cf_gnat_generics=yes
22126         ;;
22127 (*)
22128         cf_gnat_generics=no
22129         ;;
22130 esac
22131 echo "$as_me:22131: result: $cf_gnat_generics" >&5
22132 echo "${ECHO_T}$cf_gnat_generics" >&6
22133
22134 if test "$cf_gnat_generics" = yes
22135 then
22136         cf_compile_generics=generics
22137         cf_generic_objects="\${GENOBJS}"
22138 else
22139         cf_compile_generics=
22140         cf_generic_objects=
22141 fi
22142
22143 echo "$as_me:22143: checking if GNAT supports SIGINT" >&5
22144 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
22145 if test "${cf_cv_gnat_sigint+set}" = set; then
22146   echo $ECHO_N "(cached) $ECHO_C" >&6
22147 else
22148
22149 rm -rf conftest* *~conftest*
22150 cat >>conftest.ads <<CF_EOF
22151 with Ada.Interrupts.Names;
22152
22153 package ConfTest is
22154
22155    pragma Warnings (Off);  --  the next pragma exists since 3.11p
22156    pragma Unreserve_All_Interrupts;
22157    pragma Warnings (On);
22158
22159    protected Process is
22160       procedure Stop;
22161       function Continue return Boolean;
22162       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
22163    private
22164       Done : Boolean := False;
22165    end Process;
22166
22167 end ConfTest;
22168 CF_EOF
22169 cat >>conftest.adb <<CF_EOF
22170 package body ConfTest is
22171    protected body Process is
22172       procedure Stop is
22173       begin
22174          Done := True;
22175       end Stop;
22176       function Continue return Boolean is
22177       begin
22178          return not Done;
22179       end Continue;
22180    end Process;
22181 end ConfTest;
22182 CF_EOF
22183 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22184       cf_cv_gnat_sigint=yes
22185 else
22186    cf_cv_gnat_sigint=no
22187 fi
22188 rm -rf conftest* *~conftest*
22189
22190 fi
22191 echo "$as_me:22191: result: $cf_cv_gnat_sigint" >&5
22192 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
22193
22194 if test $cf_cv_gnat_sigint = yes ; then
22195         USE_GNAT_SIGINT=""
22196 else
22197         USE_GNAT_SIGINT="#"
22198 fi
22199
22200 cf_gnat_libraries=no
22201 cf_gnat_projects=no
22202
22203 if test "$enable_gnat_projects" != no ; then
22204 echo "$as_me:22204: checking if GNAT supports project files" >&5
22205 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
22206 case $cf_gnat_version in
22207 (3.[0-9]*)
22208         ;;
22209 (*)
22210         case $cf_cv_system_name in
22211         (cygwin*|msys*)
22212                 ;;
22213         (*)
22214                 rm -rf conftest* *~conftest*
22215                 if mkdir conftest.src conftest.bin conftest.lib
22216                 then
22217                         cd conftest.src
22218                         rm -rf conftest* *~conftest*
22219                         cat >>library.gpr <<CF_EOF
22220 project Library is
22221   Kind := External ("LIB_KIND");
22222   for Library_Name use "ConfTest";
22223   for Object_Dir use ".";
22224   for Library_ALI_Dir use External("LIBRARY_DIR");
22225   for Library_Version use External ("SONAME");
22226   for Library_Kind use Kind;
22227   for Library_Dir use External("BUILD_DIR");
22228   Source_Dir := External ("SOURCE_DIR");
22229   for Source_Dirs use (Source_Dir);
22230 end Library;
22231 CF_EOF
22232                         cat >>confpackage.ads <<CF_EOF
22233 package ConfPackage is
22234    procedure conftest;
22235 end ConfPackage;
22236 CF_EOF
22237                         cat >>confpackage.adb <<CF_EOF
22238 with Text_IO;
22239 package body ConfPackage is
22240    procedure conftest is
22241    begin
22242       Text_IO.Put ("Hello World");
22243       Text_IO.New_Line;
22244    end conftest;
22245 end ConfPackage;
22246 CF_EOF
22247                         if ( $cf_ada_make $ADAFLAGS \
22248                                         -Plibrary.gpr \
22249                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22250                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22251                                         -XSOURCE_DIR=`pwd` \
22252                                         -XSONAME=libConfTest.so.1 \
22253                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
22254                                 cf_gnat_projects=yes
22255                         fi
22256                         cd ..
22257                 fi
22258                 if test -f conftest.lib/confpackage.ali
22259                 then
22260                         cf_gnat_libraries=yes
22261                 fi
22262                 rm -rf conftest* *~conftest*
22263                 ;;
22264         esac
22265         ;;
22266 esac
22267 echo "$as_me:22267: result: $cf_gnat_projects" >&5
22268 echo "${ECHO_T}$cf_gnat_projects" >&6
22269 fi # enable_gnat_projects
22270
22271 if test $cf_gnat_projects = yes
22272 then
22273         echo "$as_me:22273: checking if GNAT supports libraries" >&5
22274 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22275         echo "$as_me:22275: result: $cf_gnat_libraries" >&5
22276 echo "${ECHO_T}$cf_gnat_libraries" >&6
22277 fi
22278
22279 if test "$cf_gnat_projects" = yes
22280 then
22281         USE_OLD_MAKERULES="#"
22282         USE_GNAT_PROJECTS=""
22283 else
22284         USE_OLD_MAKERULES=""
22285         USE_GNAT_PROJECTS="#"
22286 fi
22287
22288 if test "$cf_gnat_libraries" = yes
22289 then
22290         USE_GNAT_LIBRARIES=""
22291 else
22292         USE_GNAT_LIBRARIES="#"
22293 fi
22294
22295 echo "$as_me:22295: checking for ada-compiler" >&5
22296 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22297
22298 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22299 if test "${with_ada_compiler+set}" = set; then
22300   withval="$with_ada_compiler"
22301   cf_ada_compiler=$withval
22302 else
22303   cf_ada_compiler=gnatmake
22304 fi;
22305
22306 echo "$as_me:22306: result: $cf_ada_compiler" >&5
22307 echo "${ECHO_T}$cf_ada_compiler" >&6
22308
22309                         cf_ada_package=terminal_interface
22310
22311 echo "$as_me:22311: checking for ada-include" >&5
22312 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22313
22314 # Check whether --with-ada-include or --without-ada-include was given.
22315 if test "${with_ada_include+set}" = set; then
22316   withval="$with_ada_include"
22317
22318 else
22319   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22320 fi; if test -n "$prefix/share/ada/adainclude" ; then
22321
22322 if test "x$prefix" != xNONE; then
22323         cf_path_syntax="$prefix"
22324 else
22325         cf_path_syntax="$ac_default_prefix"
22326 fi
22327
22328 case ".$withval" in
22329 (.\$\(*\)*|.\'*\'*)
22330         ;;
22331 (..|./*|.\\*)
22332         ;;
22333 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22334         ;;
22335 (.\${*prefix}*|.\${*dir}*)
22336         eval withval="$withval"
22337         case ".$withval" in
22338         (.NONE/*)
22339                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22340                 ;;
22341         esac
22342         ;;
22343 (.no|.NONE/*)
22344         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22345         ;;
22346 (*)
22347         { { echo "$as_me:22347: error: expected a pathname, not \"$withval\"" >&5
22348 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22349    { (exit 1); exit 1; }; }
22350         ;;
22351 esac
22352
22353 fi
22354 eval ADA_INCLUDE="$withval"
22355
22356 echo "$as_me:22356: result: $ADA_INCLUDE" >&5
22357 echo "${ECHO_T}$ADA_INCLUDE" >&6
22358
22359 echo "$as_me:22359: checking for ada-objects" >&5
22360 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22361
22362 # Check whether --with-ada-objects or --without-ada-objects was given.
22363 if test "${with_ada_objects+set}" = set; then
22364   withval="$with_ada_objects"
22365
22366 else
22367   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22368 fi; if test -n "$prefix/lib/ada/adalib" ; then
22369
22370 if test "x$prefix" != xNONE; then
22371         cf_path_syntax="$prefix"
22372 else
22373         cf_path_syntax="$ac_default_prefix"
22374 fi
22375
22376 case ".$withval" in
22377 (.\$\(*\)*|.\'*\'*)
22378         ;;
22379 (..|./*|.\\*)
22380         ;;
22381 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22382         ;;
22383 (.\${*prefix}*|.\${*dir}*)
22384         eval withval="$withval"
22385         case ".$withval" in
22386         (.NONE/*)
22387                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22388                 ;;
22389         esac
22390         ;;
22391 (.no|.NONE/*)
22392         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22393         ;;
22394 (*)
22395         { { echo "$as_me:22395: error: expected a pathname, not \"$withval\"" >&5
22396 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22397    { (exit 1); exit 1; }; }
22398         ;;
22399 esac
22400
22401 fi
22402 eval ADA_OBJECTS="$withval"
22403
22404 echo "$as_me:22404: result: $ADA_OBJECTS" >&5
22405 echo "${ECHO_T}$ADA_OBJECTS" >&6
22406
22407 echo "$as_me:22407: checking if an Ada95 shared-library should be built" >&5
22408 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22409
22410 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22411 if test "${with_ada_sharedlib+set}" = set; then
22412   withval="$with_ada_sharedlib"
22413   with_ada_sharedlib=$withval
22414 else
22415   with_ada_sharedlib=no
22416 fi;
22417 echo "$as_me:22417: result: $with_ada_sharedlib" >&5
22418 echo "${ECHO_T}$with_ada_sharedlib" >&6
22419
22420 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22421 MAKE_ADA_SHAREDLIB="#"
22422
22423 if test "x$with_ada_sharedlib" != xno
22424 then
22425         MAKE_ADA_SHAREDLIB=
22426         if test "x$with_ada_sharedlib" != xyes
22427         then
22428                 ADA_SHAREDLIB="$with_ada_sharedlib"
22429         fi
22430 fi
22431
22432                 fi
22433         fi
22434 else
22435         cf_with_ada=no
22436 fi
22437
22438 # do this "late" to avoid conflict with header-checks
22439 if test "x$with_widec" = xyes ; then
22440         echo "$as_me:22440: checking for wchar_t" >&5
22441 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22442 if test "${ac_cv_type_wchar_t+set}" = set; then
22443   echo $ECHO_N "(cached) $ECHO_C" >&6
22444 else
22445   cat >conftest.$ac_ext <<_ACEOF
22446 #line 22446 "configure"
22447 #include "confdefs.h"
22448 $ac_includes_default
22449 int
22450 main (void)
22451 {
22452 if ((wchar_t *) 0)
22453   return 0;
22454 if (sizeof (wchar_t))
22455   return 0;
22456   ;
22457   return 0;
22458 }
22459 _ACEOF
22460 rm -f conftest.$ac_objext
22461 if { (eval echo "$as_me:22461: \"$ac_compile\"") >&5
22462   (eval $ac_compile) 2>&5
22463   ac_status=$?
22464   echo "$as_me:22464: \$? = $ac_status" >&5
22465   (exit $ac_status); } &&
22466          { ac_try='test -s conftest.$ac_objext'
22467   { (eval echo "$as_me:22467: \"$ac_try\"") >&5
22468   (eval $ac_try) 2>&5
22469   ac_status=$?
22470   echo "$as_me:22470: \$? = $ac_status" >&5
22471   (exit $ac_status); }; }; then
22472   ac_cv_type_wchar_t=yes
22473 else
22474   echo "$as_me: failed program was:" >&5
22475 cat conftest.$ac_ext >&5
22476 ac_cv_type_wchar_t=no
22477 fi
22478 rm -f conftest.$ac_objext conftest.$ac_ext
22479 fi
22480 echo "$as_me:22480: result: $ac_cv_type_wchar_t" >&5
22481 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22482
22483 echo "$as_me:22483: checking size of wchar_t" >&5
22484 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22485 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22486   echo $ECHO_N "(cached) $ECHO_C" >&6
22487 else
22488   if test "$ac_cv_type_wchar_t" = yes; then
22489   if test "$cross_compiling" = yes; then
22490   # Depending upon the size, compute the lo and hi bounds.
22491 cat >conftest.$ac_ext <<_ACEOF
22492 #line 22492 "configure"
22493 #include "confdefs.h"
22494 $ac_includes_default
22495 int
22496 main (void)
22497 {
22498 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22499   ;
22500   return 0;
22501 }
22502 _ACEOF
22503 rm -f conftest.$ac_objext
22504 if { (eval echo "$as_me:22504: \"$ac_compile\"") >&5
22505   (eval $ac_compile) 2>&5
22506   ac_status=$?
22507   echo "$as_me:22507: \$? = $ac_status" >&5
22508   (exit $ac_status); } &&
22509          { ac_try='test -s conftest.$ac_objext'
22510   { (eval echo "$as_me:22510: \"$ac_try\"") >&5
22511   (eval $ac_try) 2>&5
22512   ac_status=$?
22513   echo "$as_me:22513: \$? = $ac_status" >&5
22514   (exit $ac_status); }; }; then
22515   ac_lo=0 ac_mid=0
22516   while :; do
22517     cat >conftest.$ac_ext <<_ACEOF
22518 #line 22518 "configure"
22519 #include "confdefs.h"
22520 $ac_includes_default
22521 int
22522 main (void)
22523 {
22524 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22525   ;
22526   return 0;
22527 }
22528 _ACEOF
22529 rm -f conftest.$ac_objext
22530 if { (eval echo "$as_me:22530: \"$ac_compile\"") >&5
22531   (eval $ac_compile) 2>&5
22532   ac_status=$?
22533   echo "$as_me:22533: \$? = $ac_status" >&5
22534   (exit $ac_status); } &&
22535          { ac_try='test -s conftest.$ac_objext'
22536   { (eval echo "$as_me:22536: \"$ac_try\"") >&5
22537   (eval $ac_try) 2>&5
22538   ac_status=$?
22539   echo "$as_me:22539: \$? = $ac_status" >&5
22540   (exit $ac_status); }; }; then
22541   ac_hi=$ac_mid; break
22542 else
22543   echo "$as_me: failed program was:" >&5
22544 cat conftest.$ac_ext >&5
22545 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22546 fi
22547 rm -f conftest.$ac_objext conftest.$ac_ext
22548   done
22549 else
22550   echo "$as_me: failed program was:" >&5
22551 cat conftest.$ac_ext >&5
22552 ac_hi=-1 ac_mid=-1
22553   while :; do
22554     cat >conftest.$ac_ext <<_ACEOF
22555 #line 22555 "configure"
22556 #include "confdefs.h"
22557 $ac_includes_default
22558 int
22559 main (void)
22560 {
22561 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22562   ;
22563   return 0;
22564 }
22565 _ACEOF
22566 rm -f conftest.$ac_objext
22567 if { (eval echo "$as_me:22567: \"$ac_compile\"") >&5
22568   (eval $ac_compile) 2>&5
22569   ac_status=$?
22570   echo "$as_me:22570: \$? = $ac_status" >&5
22571   (exit $ac_status); } &&
22572          { ac_try='test -s conftest.$ac_objext'
22573   { (eval echo "$as_me:22573: \"$ac_try\"") >&5
22574   (eval $ac_try) 2>&5
22575   ac_status=$?
22576   echo "$as_me:22576: \$? = $ac_status" >&5
22577   (exit $ac_status); }; }; then
22578   ac_lo=$ac_mid; break
22579 else
22580   echo "$as_me: failed program was:" >&5
22581 cat conftest.$ac_ext >&5
22582 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22583 fi
22584 rm -f conftest.$ac_objext conftest.$ac_ext
22585   done
22586 fi
22587 rm -f conftest.$ac_objext conftest.$ac_ext
22588 # Binary search between lo and hi bounds.
22589 while test "x$ac_lo" != "x$ac_hi"; do
22590   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22591   cat >conftest.$ac_ext <<_ACEOF
22592 #line 22592 "configure"
22593 #include "confdefs.h"
22594 $ac_includes_default
22595 int
22596 main (void)
22597 {
22598 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22599   ;
22600   return 0;
22601 }
22602 _ACEOF
22603 rm -f conftest.$ac_objext
22604 if { (eval echo "$as_me:22604: \"$ac_compile\"") >&5
22605   (eval $ac_compile) 2>&5
22606   ac_status=$?
22607   echo "$as_me:22607: \$? = $ac_status" >&5
22608   (exit $ac_status); } &&
22609          { ac_try='test -s conftest.$ac_objext'
22610   { (eval echo "$as_me:22610: \"$ac_try\"") >&5
22611   (eval $ac_try) 2>&5
22612   ac_status=$?
22613   echo "$as_me:22613: \$? = $ac_status" >&5
22614   (exit $ac_status); }; }; then
22615   ac_hi=$ac_mid
22616 else
22617   echo "$as_me: failed program was:" >&5
22618 cat conftest.$ac_ext >&5
22619 ac_lo=`expr $ac_mid + 1`
22620 fi
22621 rm -f conftest.$ac_objext conftest.$ac_ext
22622 done
22623 ac_cv_sizeof_wchar_t=$ac_lo
22624 else
22625   if test "$cross_compiling" = yes; then
22626   { { echo "$as_me:22626: error: cannot run test program while cross compiling" >&5
22627 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22628    { (exit 1); exit 1; }; }
22629 else
22630   cat >conftest.$ac_ext <<_ACEOF
22631 #line 22631 "configure"
22632 #include "confdefs.h"
22633 $ac_includes_default
22634 int
22635 main (void)
22636 {
22637 FILE *f = fopen ("conftest.val", "w");
22638 if (!f)
22639   $ac_main_return (1);
22640 fprintf (f, "%d", (sizeof (wchar_t)));
22641 fclose (f);
22642   ;
22643   return 0;
22644 }
22645 _ACEOF
22646 rm -f conftest$ac_exeext
22647 if { (eval echo "$as_me:22647: \"$ac_link\"") >&5
22648   (eval $ac_link) 2>&5
22649   ac_status=$?
22650   echo "$as_me:22650: \$? = $ac_status" >&5
22651   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22652   { (eval echo "$as_me:22652: \"$ac_try\"") >&5
22653   (eval $ac_try) 2>&5
22654   ac_status=$?
22655   echo "$as_me:22655: \$? = $ac_status" >&5
22656   (exit $ac_status); }; }; then
22657   ac_cv_sizeof_wchar_t=`cat conftest.val`
22658 else
22659   echo "$as_me: program exited with status $ac_status" >&5
22660 echo "$as_me: failed program was:" >&5
22661 cat conftest.$ac_ext >&5
22662 fi
22663 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22664 fi
22665 fi
22666 rm -f conftest.val
22667 else
22668   ac_cv_sizeof_wchar_t=0
22669 fi
22670 fi
22671 echo "$as_me:22671: result: $ac_cv_sizeof_wchar_t" >&5
22672 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22673 cat >>confdefs.h <<EOF
22674 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22675 EOF
22676
22677 fi
22678
22679 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22680 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22681 ###
22682 ### ticlib modules may be a separate library, otherwise contained in termlib.
22683 ### termlib modules may be a separate library, otherwise contained in ncurses.
22684 ###
22685 ### The of "+" or " " between the tokens controls the way the script
22686 ### chooses to split module lists into libraries.
22687 ###
22688 ### (see CF_LIB_RULES).
22689 echo "$as_me:22689: checking for library subsets" >&5
22690 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22691 LIB_SUBSETS=
22692
22693 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22694         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22695         if test "$with_ticlib" != no ; then
22696                 LIB_SUBSETS="${LIB_SUBSETS} "
22697         else
22698                 LIB_SUBSETS="${LIB_SUBSETS}+"
22699         fi
22700 fi
22701
22702 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22703 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22704
22705 if test "$with_termlib" != no ; then
22706         LIB_SUBSETS="${LIB_SUBSETS} "
22707 else
22708         LIB_SUBSETS="${LIB_SUBSETS}+"
22709 fi
22710
22711 LIB_SUBSETS="${LIB_SUBSETS}base"
22712
22713 # Most term-driver calls are to tinfo, but some like init_pair are to the
22714 # base library (so it resides in base).
22715 if test "$with_term_driver" != no ; then
22716         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22717         case $cf_cv_system_name in
22718         (*mingw32*|*mingw64*)
22719                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22720                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22721                 ;;
22722         (*)
22723                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22724                 ;;
22725         esac
22726 fi
22727
22728 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22729 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22730
22731 echo "$as_me:22731: result: $LIB_SUBSETS" >&5
22732 echo "${ECHO_T}$LIB_SUBSETS" >&6
22733
22734 ### Construct the list of include-directories to be generated
22735
22736 if test "$srcdir" != "."; then
22737         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22738 fi
22739 CPPFLAGS="-I../include $CPPFLAGS"
22740 if test "$srcdir" != "."; then
22741         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22742 fi
22743 CPPFLAGS="-I. $CPPFLAGS"
22744
22745 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22746 if test "$srcdir" != "."; then
22747         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22748 fi
22749 if test "$GCC" != yes; then
22750         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22751 elif test "$includedir" != "/usr/include"; then
22752         if test "$includedir" = '${prefix}/include' ; then
22753                 if test x$prefix != x/usr ; then
22754                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22755                 fi
22756         else
22757                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22758         fi
22759 fi
22760
22761 ### Build up pieces for makefile rules
22762 echo "$as_me:22762: checking default library suffix" >&5
22763 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22764
22765         case $DFT_LWR_MODEL in
22766         (libtool) DFT_ARG_SUFFIX=''   ;;
22767         (normal)  DFT_ARG_SUFFIX=''   ;;
22768         (debug)   DFT_ARG_SUFFIX='_g' ;;
22769         (profile) DFT_ARG_SUFFIX='_p' ;;
22770         (shared)  DFT_ARG_SUFFIX=''   ;;
22771         esac
22772         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22773 echo "$as_me:22773: result: $DFT_ARG_SUFFIX" >&5
22774 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22775
22776 echo "$as_me:22776: checking default library-dependency suffix" >&5
22777 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22778
22779         case X$DFT_LWR_MODEL in
22780         (Xlibtool)
22781                 DFT_LIB_SUFFIX='.la'
22782                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22783                 ;;
22784         (Xdebug)
22785                 DFT_LIB_SUFFIX='_g.a'
22786                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22787                 ;;
22788         (Xprofile)
22789                 DFT_LIB_SUFFIX='_p.a'
22790                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22791                 ;;
22792         (Xshared)
22793                 case $cf_cv_system_name in
22794                 (aix[5-7]*)
22795                         DFT_LIB_SUFFIX='.so'
22796                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22797                         ;;
22798                 (cygwin*|msys*|mingw*)
22799                         DFT_LIB_SUFFIX='.dll'
22800                         DFT_DEP_SUFFIX='.dll.a'
22801                         ;;
22802                 (darwin*)
22803                         DFT_LIB_SUFFIX='.dylib'
22804                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22805                         ;;
22806                 (hpux*)
22807                         case $target in
22808                         (ia64*)
22809                                 DFT_LIB_SUFFIX='.so'
22810                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22811                                 ;;
22812                         (*)
22813                                 DFT_LIB_SUFFIX='.sl'
22814                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22815                                 ;;
22816                         esac
22817                         ;;
22818                 (*)
22819                         DFT_LIB_SUFFIX='.so'
22820                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22821                         ;;
22822                 esac
22823                 ;;
22824         (*)
22825                 DFT_LIB_SUFFIX='.a'
22826                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22827                 ;;
22828         esac
22829         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22830         then
22831                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22832                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22833         fi
22834 echo "$as_me:22834: result: $DFT_DEP_SUFFIX" >&5
22835 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22836
22837 echo "$as_me:22837: checking default object directory" >&5
22838 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22839
22840         case $DFT_LWR_MODEL in
22841         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22842         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22843         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22844         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22845         (shared)
22846                 case $cf_cv_system_name in
22847                 (cygwin|msys)
22848                         DFT_OBJ_SUBDIR='objects' ;;
22849                 (*)
22850                         DFT_OBJ_SUBDIR='obj_s' ;;
22851                 esac
22852         esac
22853 echo "$as_me:22853: result: $DFT_OBJ_SUBDIR" >&5
22854 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22855
22856 if test "x$cf_with_cxx" = xyes ; then
22857 echo "$as_me:22857: checking c++ library-dependency suffix" >&5
22858 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22859 if test "$with_libtool" != "no"; then
22860         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22861         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22862 elif test "$with_shared_cxx" != "no"; then
22863         # also for g++ users...
22864         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22865 else
22866         # we normally make a static library because C/C++ library rules differ
22867
22868         case Xnormal in
22869         (Xlibtool)
22870                 CXX_LIB_SUFFIX='.la'
22871                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22872                 ;;
22873         (Xdebug)
22874                 CXX_LIB_SUFFIX='_g.a'
22875                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22876                 ;;
22877         (Xprofile)
22878                 CXX_LIB_SUFFIX='_p.a'
22879                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22880                 ;;
22881         (Xshared)
22882                 case $cf_cv_system_name in
22883                 (aix[5-7]*)
22884                         CXX_LIB_SUFFIX='.so'
22885                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22886                         ;;
22887                 (cygwin*|msys*|mingw*)
22888                         CXX_LIB_SUFFIX='.dll'
22889                         CXX_DEP_SUFFIX='.dll.a'
22890                         ;;
22891                 (darwin*)
22892                         CXX_LIB_SUFFIX='.dylib'
22893                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22894                         ;;
22895                 (hpux*)
22896                         case $target in
22897                         (ia64*)
22898                                 CXX_LIB_SUFFIX='.so'
22899                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22900                                 ;;
22901                         (*)
22902                                 CXX_LIB_SUFFIX='.sl'
22903                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22904                                 ;;
22905                         esac
22906                         ;;
22907                 (*)
22908                         CXX_LIB_SUFFIX='.so'
22909                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22910                         ;;
22911                 esac
22912                 ;;
22913         (*)
22914                 CXX_LIB_SUFFIX='.a'
22915                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22916                 ;;
22917         esac
22918         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22919         then
22920                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22921                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22922         fi
22923
22924 fi
22925 echo "$as_me:22925: result: $CXX_LIB_SUFFIX" >&5
22926 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22927
22928 fi
22929
22930 # do not want -ldl in build except as needed for -lncurses dependency
22931 if test "x$with_dlsym" = xyes ; then
22932 if test $DFT_LWR_MODEL = shared || \
22933    test $DFT_LWR_MODEL = libtool ; then
22934
22935 # remove dl library from $LIBS
22936 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22937
22938 fi
22939 fi
22940 ### Set up low-level terminfo dependencies for makefiles.
22941
22942 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22943 # do not need libdl
22944 TICS_LIST=
22945 if test "x$with_dlsym" = xyes ; then
22946
22947 # remove dl library from $SHLIB_LIST
22948 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22949
22950 fi
22951
22952 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22953 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22954 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22955 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22956 then
22957         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22958 fi
22959
22960 if test "$with_ticlib" != no ; then
22961
22962         if test "x$with_ticlib" != xyes ; then
22963                 TICS_NAME=$with_ticlib
22964                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22965                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22966                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22967                 TICS_LIB_SUFFIX="${with_ticlib}"
22968         else
22969                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22970                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22971                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22972                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22973         fi
22974         TICS_LDFLAGS="-L${LIB_DIR}"
22975         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22976 else
22977         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22978         TICS_LDFLAGS="-L${LIB_DIR}"
22979         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22980 fi
22981
22982 if test "$with_termlib" != no ; then
22983
22984         if test "x$with_termlib" != xyes ; then
22985                 TINFO_NAME=$with_termlib
22986                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22987                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22988                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22989                 TINFO_LIB_SUFFIX="${with_termlib}"
22990         else
22991                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22992                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22993                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22994                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22995         fi
22996
22997         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22998         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22999         if test "$DFT_LWR_MODEL" = "libtool"; then
23000                 TEST_ARGS="${TEST_DEPS}"
23001                 TEST_ARG2="${TEST_DEP2}"
23002                 TINFO_LDFLAGS="-L${LIB_DIR}"
23003                 TINFO_LIBS="$TEST_ARGS"
23004                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
23005                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
23006         else
23007                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
23008                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
23009                 if test "x$with_term_driver" != xno ; then
23010                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23011                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
23012                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23013                 else
23014                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23015                         TINFO_LIBS="$TEST_ARGS"
23016                 fi
23017                 TINFO_LDFLAGS="-L${LIB_DIR}"
23018                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23019         fi
23020 else
23021         # the next lines are needed for linking libtic over libncurses
23022         TINFO_NAME=${LIB_NAME}
23023         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23024         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
23025         if test "x$with_tic_depends" = xyes ; then
23026                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23027         else
23028                 TICS_LIST="$SHLIB_LIST"
23029         fi
23030
23031         TINFO_LDFLAGS="-L${LIB_DIR}"
23032         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23033 fi
23034
23035 if test "$DFT_LWR_MODEL" = shared ; then
23036         case $cf_cv_system_name in
23037         (cygwin*|msys*)
23038                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
23039                 TINFO_SUFFIX=.dll
23040                 ;;
23041         esac
23042 fi
23043
23044 if test "x$with_dlsym" = xyes ; then
23045
23046 # remove dl library from $TICS_LIST
23047 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
23048
23049 fi
23050
23051 if test "$DFT_LWR_MODEL" = "libtool"; then
23052         OBJEXT=lo
23053 fi
23054
23055 # needed for Ada95
23056 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
23057
23058 case $DFT_LWR_MODEL in
23059 (normal|debug|profile)
23060
23061 if test "$GCC" = yes ; then
23062         case $cf_cv_system_name in
23063         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
23064                 LDFLAGS_STATIC=
23065                 LDFLAGS_SHARED=
23066                 ;;
23067         (*)     # normally, except when broken
23068                 LDFLAGS_STATIC=-static
23069                 LDFLAGS_SHARED=-dynamic
23070                 ;;
23071         esac
23072 else
23073         case $cf_cv_system_name in
23074         (aix[4-7]*)     # from ld manpage
23075                 LDFLAGS_STATIC=-bstatic
23076                 LDFLAGS_SHARED=-bdynamic
23077                 ;;
23078         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
23079                 # We could also use just "archive" and "shared".
23080                 LDFLAGS_STATIC=-Wl,-a,archive_shared
23081                 LDFLAGS_SHARED=-Wl,-a,shared_archive
23082                 ;;
23083         (irix*)         # from ld manpage IRIX64
23084                 LDFLAGS_STATIC=-Bstatic
23085                 LDFLAGS_SHARED=-Bdynamic
23086                 ;;
23087         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
23088                 # alternative "-oldstyle_liblookup" (not in cc manpage)
23089                 LDFLAGS_STATIC=-noso
23090                 LDFLAGS_SHARED=-so_archive
23091                 ;;
23092         (solaris2*)
23093                 LDFLAGS_STATIC=-Bstatic
23094                 LDFLAGS_SHARED=-Bdynamic
23095                 ;;
23096         esac
23097 fi
23098
23099 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
23100 then
23101         echo "$as_me:23101: checking if linker supports switching between static/dynamic" >&5
23102 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
23103
23104         rm -f libconftest.a
23105         cat >conftest.$ac_ext <<EOF
23106 #line 23106 "configure"
23107 #include <stdio.h>
23108 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
23109 EOF
23110         if { (eval echo "$as_me:23110: \"$ac_compile\"") >&5
23111   (eval $ac_compile) 2>&5
23112   ac_status=$?
23113   echo "$as_me:23113: \$? = $ac_status" >&5
23114   (exit $ac_status); } ; then
23115                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
23116                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
23117         fi
23118         rm -f conftest.*
23119
23120         cf_save_LIBS="$LIBS"
23121
23122         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
23123         cat >conftest.$ac_ext <<_ACEOF
23124 #line 23124 "configure"
23125 #include "confdefs.h"
23126
23127 #line 23127 "configure"
23128 #include <stdio.h>
23129 int cf_ldflags_static(FILE *fp);
23130
23131 int
23132 main (void)
23133 {
23134
23135         return cf_ldflags_static(stdin);
23136
23137   ;
23138   return 0;
23139 }
23140 _ACEOF
23141 rm -f conftest.$ac_objext conftest$ac_exeext
23142 if { (eval echo "$as_me:23142: \"$ac_link\"") >&5
23143   (eval $ac_link) 2>&5
23144   ac_status=$?
23145   echo "$as_me:23145: \$? = $ac_status" >&5
23146   (exit $ac_status); } &&
23147          { ac_try='test -s conftest$ac_exeext'
23148   { (eval echo "$as_me:23148: \"$ac_try\"") >&5
23149   (eval $ac_try) 2>&5
23150   ac_status=$?
23151   echo "$as_me:23151: \$? = $ac_status" >&5
23152   (exit $ac_status); }; }; then
23153
23154         # some linkers simply ignore the -dynamic
23155         case x`file conftest$ac_exeext 2>/dev/null` in
23156         (*static*)
23157                 cf_ldflags_static=no
23158                 ;;
23159         (*)
23160                 cf_ldflags_static=yes
23161                 ;;
23162         esac
23163
23164 else
23165   echo "$as_me: failed program was:" >&5
23166 cat conftest.$ac_ext >&5
23167 cf_ldflags_static=no
23168 fi
23169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23170
23171         rm -f libconftest.*
23172         LIBS="$cf_save_LIBS"
23173
23174         echo "$as_me:23174: result: $cf_ldflags_static" >&5
23175 echo "${ECHO_T}$cf_ldflags_static" >&6
23176
23177         if test $cf_ldflags_static != yes
23178         then
23179                 LDFLAGS_STATIC=
23180                 LDFLAGS_SHARED=
23181         fi
23182 else
23183         LDFLAGS_STATIC=
23184         LDFLAGS_SHARED=
23185 fi
23186
23187         ;;
23188 esac
23189
23190 echo "$as_me:23190: checking where we will install curses.h" >&5
23191 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
23192
23193 includesubdir=
23194 if test "$with_overwrite" = no && \
23195  ( test "x$includedir" = 'x${prefix}/include' || \
23196    test "x$includedir" = "x${prefix}/include" )
23197 then
23198         includesubdir="/ncurses${USE_LIB_SUFFIX}"
23199 fi
23200 echo "$as_me:23200: result: ${includedir}${includesubdir}" >&5
23201 echo "${ECHO_T}${includedir}${includesubdir}" >&6
23202
23203 ### Resolve a conflict between normal and wide-curses by forcing applications
23204 ### that will need libutf8 to add it to their configure script.
23205 if test "$with_overwrite" != no ; then
23206 if test "$NCURSES_LIBUTF8" = 1 ; then
23207         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
23208         { echo "$as_me:23208: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
23209 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
23210 fi
23211 fi
23212 WITH_OVERWRITE=$with_overwrite
23213
23214 # used to separate tack out of the tree
23215 NCURSES_TREE=
23216
23217 ### predefined stuff for the test programs
23218
23219 cat >>confdefs.h <<\EOF
23220 #define HAVE_SLK_COLOR 1
23221 EOF
23222
23223 ### Construct the list of subdirectories for which we'll customize makefiles
23224 ### with the appropriate compile-rules.
23225
23226 echo "$as_me:23226: checking for src modules" >&5
23227 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
23228
23229 # dependencies and linker-arguments for test-programs
23230 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
23231 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
23232 if test "$DFT_LWR_MODEL" = "libtool"; then
23233         TEST_ARGS="${TEST_DEPS}"
23234         TEST_ARG2="${TEST_DEP2}"
23235 else
23236         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23237         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
23238 fi
23239
23240 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
23241 cf_cv_src_modules=
23242 for cf_dir in $modules_to_build
23243 do
23244         if test -f $srcdir/$cf_dir/modules; then
23245
23246                 # We may/may not have tack in the distribution, though the
23247                 # makefile is.
23248                 if test $cf_dir = tack ; then
23249                         if test "x$cf_with_tack" != "xyes"; then
23250                                 continue
23251                         fi
23252                 fi
23253
23254                 if test -z "$cf_cv_src_modules"; then
23255                         cf_cv_src_modules=$cf_dir
23256                 else
23257                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23258                 fi
23259
23260                 # Make the ncurses_cfg.h file record the library interface files as
23261                 # well.  These are header files that are the same name as their
23262                 # directory.  Ncurses is the only library that does not follow
23263                 # that pattern.
23264                 if test $cf_dir = tack ; then
23265                         continue
23266                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23267
23268 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23269
23270                         cat >>confdefs.h <<EOF
23271 #define HAVE_${cf_have_include}_H 1
23272 EOF
23273
23274                         cat >>confdefs.h <<EOF
23275 #define HAVE_LIB${cf_have_include} 1
23276 EOF
23277
23278                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23279                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23280                         if test "$DFT_LWR_MODEL" = "libtool"; then
23281                                 TEST_ARGS="${TEST_DEPS}"
23282                                 TEST_ARG2="${TEST_DEP2}"
23283                         else
23284                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23285                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23286                         fi
23287                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23288                 fi
23289         fi
23290 done
23291 echo "$as_me:23291: result: $cf_cv_src_modules" >&5
23292 echo "${ECHO_T}$cf_cv_src_modules" >&6
23293
23294 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23295 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23296
23297 SRC_SUBDIRS=
23298 if test "x$cf_with_manpages" != xno ; then
23299         SRC_SUBDIRS="$SRC_SUBDIRS man"
23300 fi
23301 SRC_SUBDIRS="$SRC_SUBDIRS include"
23302 for cf_dir in $cf_cv_src_modules
23303 do
23304         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23305 done
23306 if test "x$cf_with_tests" != "xno" ; then
23307         SRC_SUBDIRS="$SRC_SUBDIRS test"
23308 fi
23309 # always make this, to install the ncurses-config script
23310 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23311 if test "$cf_with_cxx_binding" != no; then
23312         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23313         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23314 fi
23315
23316 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23317 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23318
23319 ADA_SUBDIRS=
23320 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23321         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23322         ADA_SUBDIRS="gen src"
23323         if test "x$cf_with_tests" != "xno" ; then
23324                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23325         fi
23326 fi
23327
23328 SUB_MAKEFILES=
23329 for cf_dir in $SRC_SUBDIRS
23330 do
23331         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23332 done
23333
23334 if test -n "$ADA_SUBDIRS"; then
23335         for cf_dir in $ADA_SUBDIRS
23336         do
23337                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23338         done
23339
23340 fi
23341
23342 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23343    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23344    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23345 fi
23346
23347 DIRS_TO_MAKE="lib"
23348 for cf_item in $cf_list_models
23349 do
23350
23351         case $cf_item in
23352         (libtool) cf_subdir='obj_lo'  ;;
23353         (normal)  cf_subdir='objects' ;;
23354         (debug)   cf_subdir='obj_g' ;;
23355         (profile) cf_subdir='obj_p' ;;
23356         (shared)
23357                 case $cf_cv_system_name in
23358                 (cygwin|msys)
23359                         cf_subdir='objects' ;;
23360                 (*)
23361                         cf_subdir='obj_s' ;;
23362                 esac
23363         esac
23364
23365         for cf_item2 in $DIRS_TO_MAKE
23366         do
23367                 test $cf_item2 = $cf_subdir && break
23368         done
23369         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23370 done
23371 for cf_dir in $DIRS_TO_MAKE
23372 do
23373         test ! -d $cf_dir && mkdir $cf_dir
23374 done
23375
23376 # symbols that differ when compiling Ada95 by itself.
23377 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23378
23379 # values to use as strings
23380
23381 cat >>confdefs.h <<EOF
23382 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23383 EOF
23384
23385 cat >>confdefs.h <<EOF
23386 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23387 EOF
23388
23389 ### Now that we're done running tests, add the compiler-warnings, if any
23390
23391 cf_fix_cppflags=no
23392 cf_new_cflags=
23393 cf_new_cppflags=
23394 cf_new_extra_cppflags=
23395
23396 for cf_add_cflags in $EXTRA_CFLAGS
23397 do
23398 case $cf_fix_cppflags in
23399 (no)
23400         case $cf_add_cflags in
23401         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23402                 case $cf_add_cflags in
23403                 (-D*)
23404                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23405
23406                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23407                                 && test -z "${cf_tst_cflags}" \
23408                                 && cf_fix_cppflags=yes
23409
23410                         if test $cf_fix_cppflags = yes ; then
23411
23412         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23413         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23414
23415                                 continue
23416                         elif test "${cf_tst_cflags}" = "\"'" ; then
23417
23418         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23419         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23420
23421                                 continue
23422                         fi
23423                         ;;
23424                 esac
23425                 case "$CPPFLAGS" in
23426                 (*$cf_add_cflags)
23427                         ;;
23428                 (*)
23429                         case $cf_add_cflags in
23430                         (-D*)
23431                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23432
23433 CPPFLAGS=`echo "$CPPFLAGS" | \
23434         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23435                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23436
23437                                 ;;
23438                         esac
23439
23440         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23441         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23442
23443                         ;;
23444                 esac
23445                 ;;
23446         (*)
23447
23448         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23449         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23450
23451                 ;;
23452         esac
23453         ;;
23454 (yes)
23455
23456         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23457         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23458
23459         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23460
23461         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23462                 && test -z "${cf_tst_cflags}" \
23463                 && cf_fix_cppflags=no
23464         ;;
23465 esac
23466 done
23467
23468 if test -n "$cf_new_cflags" ; then
23469
23470         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23471         CFLAGS="${CFLAGS}$cf_new_cflags"
23472
23473 fi
23474
23475 if test -n "$cf_new_cppflags" ; then
23476
23477         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23478         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23479
23480 fi
23481
23482 if test -n "$cf_new_extra_cppflags" ; then
23483
23484         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23485         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23486
23487 fi
23488
23489 ### Define substitutions for header files to avoid name-pollution
23490
23491 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23492         HAVE_TCGETATTR=1
23493 else
23494         HAVE_TCGETATTR=0
23495 fi
23496
23497 if test "x$ac_cv_header_stdint_h" = xyes ; then
23498         HAVE_STDINT_H=1
23499 else
23500         HAVE_STDINT_H=0
23501 fi
23502
23503 if test "x$ac_cv_header_termio_h" = xyes ; then
23504         HAVE_TERMIO_H=1
23505 else
23506         HAVE_TERMIO_H=0
23507 fi
23508
23509 if test "x$ac_cv_header_termios_h" = xyes ; then
23510         HAVE_TERMIOS_H=1
23511 else
23512         HAVE_TERMIOS_H=0
23513 fi
23514
23515 ################################################################################
23516 test "x$use_database" = xyes && \
23517 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23518
23519 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23520 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23521
23522 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23523 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23524 fi
23525
23526 # Extract the first word of "tic", so it can be a program name with args.
23527 set dummy tic; ac_word=$2
23528 echo "$as_me:23528: checking for $ac_word" >&5
23529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23530 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23531   echo $ECHO_N "(cached) $ECHO_C" >&6
23532 else
23533   case $TIC_PATH in
23534   [\\/]* | ?:[\\/]*)
23535   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23536   ;;
23537   *)
23538   ac_save_IFS=$IFS; IFS=$ac_path_separator
23539 ac_dummy="$PATH:/usr/local/ncurses/bin"
23540 for ac_dir in $ac_dummy; do
23541   IFS=$ac_save_IFS
23542   test -z "$ac_dir" && ac_dir=.
23543   if $as_executable_p "$ac_dir/$ac_word"; then
23544    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23545    echo "$as_me:23545: found $ac_dir/$ac_word" >&5
23546    break
23547 fi
23548 done
23549
23550   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23551   ;;
23552 esac
23553 fi
23554 TIC_PATH=$ac_cv_path_TIC_PATH
23555
23556 if test -n "$TIC_PATH"; then
23557   echo "$as_me:23557: result: $TIC_PATH" >&5
23558 echo "${ECHO_T}$TIC_PATH" >&6
23559 else
23560   echo "$as_me:23560: result: no" >&5
23561 echo "${ECHO_T}no" >&6
23562 fi
23563
23564 if test -n "$FALLBACK_LIST"
23565 then
23566         if test "$TIC_PATH" = unknown
23567         then
23568                 { echo "$as_me:23568: WARNING: no tic program found for fallbacks" >&5
23569 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23570         fi
23571 fi
23572
23573 if test "x$cf_with_tests" != xno ; then
23574         MAKE_TESTS=
23575 else
23576         MAKE_TESTS="#"
23577 fi
23578
23579 ADAHTML_DIR=../../doc/html/ada
23580
23581 # these could be configurable, but are not currently
23582 PANEL_NAME=panel
23583 MENU_NAME=menu
23584 FORM_NAME=form
23585 CXX_NAME=ncurses++
23586
23587 # workaround for OS/2 (20151017)
23588 case $cf_cv_system_name in
23589 (os2*)
23590         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23591         ;;
23592 (*)
23593         LIBTOOL_OPTS_CXX=
23594         ;;
23595 esac
23596
23597 # workaround for g++ versus Solaris (20131116)
23598 case $cf_cv_system_name in
23599 (solaris2*)
23600         case "x$CPPFLAGS" in
23601         (*-D_XOPEN_SOURCE_EXTENDED*)
23602                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23603
23604 echo "${as_me:-configure}:23604: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23605
23606                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23607                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23608                 ;;
23609         esac
23610         ;;
23611 esac
23612
23613 # Help to automatically enable the extended curses features when using either
23614 # the *-config or the ".pc" files by adding defines.
23615 echo "$as_me:23615: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23616 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23617 PKG_CFLAGS=
23618 for cf_loop1 in $CPPFLAGS_after_XOPEN
23619 do
23620         cf_found=no
23621         for cf_loop2 in $CPPFLAGS_before_XOPEN
23622         do
23623                 if test "x$cf_loop1" = "x$cf_loop2"
23624                 then
23625                         cf_found=yes
23626                         break
23627                 fi
23628         done
23629         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23630 done
23631 echo "$as_me:23631: result: $PKG_CFLAGS" >&5
23632 echo "${ECHO_T}$PKG_CFLAGS" >&6
23633
23634 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23635 case "x$NCURSES_OSPEED" in
23636 (*short*)
23637         cf_compatible=1
23638         ;;
23639 (*)
23640         cf_compatible=0
23641         ;;
23642 esac
23643
23644 cat >>confdefs.h <<EOF
23645 #define NCURSES_OSPEED_COMPAT $cf_compatible
23646 EOF
23647
23648 case "x$cf_cv_typeof_chtype" in
23649 (xshort|xint|xlong)
23650         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23651         ;;
23652 esac
23653
23654 case "x$cf_cv_typeof_mmask_t" in
23655 (xshort|xint|xlong)
23656         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23657         ;;
23658 esac
23659
23660 # substitute into misc/Makefile to suppress
23661 # (un)install.data from the
23662 # (un)install rules.
23663 if test "x$cf_with_db_install" = "xno"; then
23664         MISC_INSTALL_DATA=
23665         MISC_UNINSTALL_DATA=
23666 else
23667         MISC_INSTALL_DATA=install.data
23668         MISC_UNINSTALL_DATA=uninstall.data
23669 fi
23670
23671 SUB_SCRIPTS=
23672
23673 if test -n "$PACKAGE"
23674 then
23675         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23676         export PACKAGE
23677         echo "package: $PACKAGE"
23678 fi
23679
23680 UNALTERED_SYMS=
23681 cf_filter_syms=no
23682
23683 if test -n "$RESULTING_SYMS"
23684 then
23685         cf_filter_syms=$cf_dft_filter_syms
23686         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23687
23688 echo "${as_me:-configure}:23688: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23689
23690 fi
23691
23692 if test "x$WILDCARD_SYMS" = xno
23693 then
23694         cf_filter_syms=yes
23695 fi
23696
23697 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23698
23699 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23700 if test $cf_filter_syms = yes
23701 then
23702         RESULTING_SYMS=resulting.map
23703 fi
23704
23705 if test "x$cross_compiling" = xyes ; then
23706         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23707         CHECK_BUILD="#"
23708 else
23709         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23710         CHECK_BUILD=
23711 fi
23712
23713 cat >>confdefs.h <<\EOF
23714 #define HAVE_CURSES_DATA_BOOLNAMES 1
23715 EOF
23716
23717 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"
23718 ac_config_commands="$ac_config_commands default"
23719 cat >confcache <<\_ACEOF
23720 # This file is a shell script that caches the results of configure
23721 # tests run on this system so they can be shared between configure
23722 # scripts and configure runs, see configure's option --config-cache.
23723 # It is not useful on other systems.  If it contains results you don't
23724 # want to keep, you may remove or edit it.
23725 #
23726 # config.status only pays attention to the cache file if you give it
23727 # the --recheck option to rerun configure.
23728 #
23729 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23730 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23731 # following values.
23732
23733 _ACEOF
23734
23735 # The following way of writing the cache mishandles newlines in values,
23736 # but we know of no workaround that is simple, portable, and efficient.
23737 # So, don't put newlines in cache variables' values.
23738 # Ultrix sh set writes to stderr and can't be redirected directly,
23739 # and sets the high bit in the cache file unless we assign to the vars.
23740 {
23741   (set) 2>&1 |
23742     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23743     *ac_space=\ *)
23744       # `set' does not quote correctly, so add quotes (double-quote
23745       # substitution turns \\\\ into \\, and sed turns \\ into \).
23746       sed -n \
23747         "s/'/'\\\\''/g;
23748           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23749       ;;
23750     *)
23751       # `set' quotes correctly as required by POSIX, so do not add quotes.
23752       sed -n \
23753         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23754       ;;
23755     esac;
23756 } |
23757   sed '
23758      t clear
23759      : clear
23760      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23761      t end
23762      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23763      : end' >>confcache
23764 if cmp -s $cache_file confcache; then :; else
23765   if test -w $cache_file; then
23766     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23767     cat confcache >$cache_file
23768   else
23769     echo "not updating unwritable cache $cache_file"
23770   fi
23771 fi
23772 rm -f confcache
23773
23774 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23775 # Let make expand exec_prefix.
23776 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23777
23778 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23779 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23780 # trailing colons and then remove the whole line if VPATH becomes empty
23781 # (actually we leave an empty line to preserve line numbers).
23782 if test "x$srcdir" = x.; then
23783   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23784 s/:*\$(srcdir):*/:/;
23785 s/:*\${srcdir}:*/:/;
23786 s/:*@srcdir@:*/:/;
23787 s/^\([^=]*=[    ]*\):*/\1/;
23788 s/:*$//;
23789 s/^[^=]*=[      ]*$//;
23790 }'
23791 fi
23792
23793 DEFS=-DHAVE_CONFIG_H
23794
23795 : ${CONFIG_STATUS=./config.status}
23796 ac_clean_files_save=$ac_clean_files
23797 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23798 { echo "$as_me:23798: creating $CONFIG_STATUS" >&5
23799 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23800 cat >$CONFIG_STATUS <<_ACEOF
23801 #! $SHELL
23802 # Generated automatically by configure.
23803 # Run this file to recreate the current configuration.
23804 # Compiler output produced by configure, useful for debugging
23805 # configure, is in config.log if it exists.
23806
23807 debug=false
23808 SHELL=\${CONFIG_SHELL-$SHELL}
23809 ac_cs_invocation="\$0 \$@"
23810
23811 _ACEOF
23812
23813 cat >>$CONFIG_STATUS <<\_ACEOF
23814 # Be Bourne compatible
23815 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23816   emulate sh
23817   NULLCMD=:
23818 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23819   set -o posix
23820 fi
23821
23822 # Name of the executable.
23823 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23824
23825 if expr a : '\(a\)' >/dev/null 2>&1; then
23826   as_expr=expr
23827 else
23828   as_expr=false
23829 fi
23830
23831 rm -f conf$$ conf$$.exe conf$$.file
23832 echo >conf$$.file
23833 if ln -s conf$$.file conf$$ 2>/dev/null; then
23834   # We could just check for DJGPP; but this test a) works b) is more generic
23835   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23836   if test -f conf$$.exe; then
23837     # Don't use ln at all; we don't have any links
23838     as_ln_s='cp -p'
23839   else
23840     as_ln_s='ln -s'
23841   fi
23842 elif ln conf$$.file conf$$ 2>/dev/null; then
23843   as_ln_s=ln
23844 else
23845   as_ln_s='cp -p'
23846 fi
23847 rm -f conf$$ conf$$.exe conf$$.file
23848
23849 as_executable_p="test -f"
23850
23851 # Support unset when possible.
23852 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23853   as_unset=unset
23854 else
23855   as_unset=false
23856 fi
23857
23858 # NLS nuisances.
23859 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23860 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23861 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23862 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23863 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23864 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23865 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23866 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23867
23868 # IFS
23869 # We need space, tab and new line, in precisely that order.
23870 as_nl='
23871 '
23872 IFS="   $as_nl"
23873
23874 # CDPATH.
23875 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23876
23877 exec 6>&1
23878
23879 _ACEOF
23880
23881 # Files that config.status was made for.
23882 if test -n "$ac_config_files"; then
23883   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23884 fi
23885
23886 if test -n "$ac_config_headers"; then
23887   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23888 fi
23889
23890 if test -n "$ac_config_links"; then
23891   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23892 fi
23893
23894 if test -n "$ac_config_commands"; then
23895   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23896 fi
23897
23898 cat >>$CONFIG_STATUS <<\EOF
23899
23900 ac_cs_usage="\
23901 \`$as_me' instantiates files from templates according to the
23902 current configuration.
23903
23904 Usage: $0 [OPTIONS] [FILE]...
23905
23906   -h, --help       print this help, then exit
23907   -V, --version    print version number, then exit
23908   -d, --debug      don't remove temporary files
23909       --recheck    update $as_me by reconfiguring in the same conditions
23910   --file=FILE[:TEMPLATE]
23911                    instantiate the configuration file FILE
23912   --header=FILE[:TEMPLATE]
23913                    instantiate the configuration header FILE
23914
23915 Configuration files:
23916 $config_files
23917
23918 Configuration headers:
23919 $config_headers
23920
23921 Configuration commands:
23922 $config_commands
23923
23924 Report bugs to <dickey@invisible-island.net>."
23925 EOF
23926
23927 cat >>$CONFIG_STATUS <<EOF
23928 ac_cs_version="\\
23929 config.status
23930 configured by $0, generated by GNU Autoconf 2.52.20170501,
23931   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23932
23933 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23934 Free Software Foundation, Inc.
23935 This config.status script is free software; the Free Software Foundation
23936 gives unlimited permission to copy, distribute and modify it."
23937 srcdir=$srcdir
23938 INSTALL="$INSTALL"
23939 EOF
23940
23941 cat >>$CONFIG_STATUS <<\EOF
23942 # If no file are specified by the user, then we need to provide default
23943 # value.  By we need to know if files were specified by the user.
23944 ac_need_defaults=:
23945 while test $# != 0
23946 do
23947   case $1 in
23948   --*=*)
23949     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23950     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23951     shift
23952     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23953     shift
23954     ;;
23955   -*);;
23956   *) # This is not an option, so the user has probably given explicit
23957      # arguments.
23958      ac_need_defaults=false;;
23959   esac
23960
23961   case $1 in
23962   # Handling of the options.
23963 EOF
23964 cat >>$CONFIG_STATUS <<EOF
23965   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23966     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23967     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23968 EOF
23969 cat >>$CONFIG_STATUS <<\EOF
23970   --version | --vers* | -V )
23971     echo "$ac_cs_version"; exit 0 ;;
23972   --he | --h)
23973     # Conflict between --help and --header
23974     { { echo "$as_me:23974: error: ambiguous option: $1
23975 Try \`$0 --help' for more information." >&5
23976 echo "$as_me: error: ambiguous option: $1
23977 Try \`$0 --help' for more information." >&2;}
23978    { (exit 1); exit 1; }; };;
23979   --help | --hel | -h )
23980     echo "$ac_cs_usage"; exit 0 ;;
23981   --debug | --d* | -d )
23982     debug=: ;;
23983   --file | --fil | --fi | --f )
23984     shift
23985     CONFIG_FILES="$CONFIG_FILES $1"
23986     ac_need_defaults=false;;
23987   --header | --heade | --head | --hea )
23988     shift
23989     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23990     ac_need_defaults=false;;
23991
23992   # This is an error.
23993   -*) { { echo "$as_me:23993: error: unrecognized option: $1
23994 Try \`$0 --help' for more information." >&5
23995 echo "$as_me: error: unrecognized option: $1
23996 Try \`$0 --help' for more information." >&2;}
23997    { (exit 1); exit 1; }; } ;;
23998
23999   *) ac_config_targets="$ac_config_targets $1" ;;
24000
24001   esac
24002   shift
24003 done
24004
24005 exec 5>>config.log
24006 cat >&5 << _ACEOF
24007
24008 ## ----------------------- ##
24009 ## Running config.status.  ##
24010 ## ----------------------- ##
24011
24012 This file was extended by $as_me 2.52.20170501, executed with
24013   CONFIG_FILES    = $CONFIG_FILES
24014   CONFIG_HEADERS  = $CONFIG_HEADERS
24015   CONFIG_LINKS    = $CONFIG_LINKS
24016   CONFIG_COMMANDS = $CONFIG_COMMANDS
24017   > $ac_cs_invocation
24018 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24019
24020 _ACEOF
24021 EOF
24022
24023 cat >>$CONFIG_STATUS <<EOF
24024 #
24025 # INIT-COMMANDS section.
24026 #
24027
24028 ### Special initialization commands, used to pass information from the
24029 ### configuration-run into config.status
24030
24031 AWK="$AWK"
24032 ALTERNATE_SYMS="$ALTERNATE_SYMS"
24033 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
24034 DFT_LWR_MODEL="$DFT_LWR_MODEL"
24035 ECHO_LD="$ECHO_LD"
24036 EXTRA_SUFFIX="$EXTRA_SUFFIX"
24037 LDCONFIG="$LDCONFIG"
24038 LIBTOOL_VERSION="$LIBTOOL_VERSION"
24039 LIB_NAME="$LIB_NAME"
24040 LIB_PREFIX="$LIB_PREFIX"
24041 LIB_SUBSETS="$LIB_SUBSETS"
24042 LIB_SUFFIX="$LIB_SUFFIX"
24043 LIB_TRACING="$LIB_TRACING"
24044 LN_S="$LN_S"
24045 MAKE_TERMINFO="$MAKE_TERMINFO"
24046 NCURSES_MAJOR="$NCURSES_MAJOR"
24047 NCURSES_MINOR="$NCURSES_MINOR"
24048 NCURSES_OSPEED="$NCURSES_OSPEED"
24049 NCURSES_PATCH="$NCURSES_PATCH"
24050 SRC_SUBDIRS="$SRC_SUBDIRS"
24051 TERMINFO="$TERMINFO"
24052 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
24053 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
24054 TICS_NAME="$TICS_NAME"
24055 TICS_SUFFIX="$TICS_SUFFIX"
24056 TIC_PATH="$TIC_PATH"
24057 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
24058 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
24059 TINFO_NAME="$TINFO_NAME"
24060 TINFO_SUFFIX="$TINFO_SUFFIX"
24061 UNALTERED_SYMS="$UNALTERED_SYMS"
24062 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
24063 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
24064 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
24065 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
24066 WILDCARD_SYMS="$WILDCARD_SYMS"
24067 WITH_CURSES_H="$with_curses_h"
24068 WITH_ECHO="${enable_echo:=yes}"
24069 WITH_OVERWRITE="$with_overwrite"
24070 cf_LIST_MODELS="$cf_list_models"
24071 cf_cv_abi_version="$cf_cv_abi_version"
24072 cf_cv_do_relink="$cf_cv_do_relink"
24073 cf_cv_do_symlinks="$cf_cv_do_symlinks"
24074 cf_cv_enable_lp64="$cf_cv_enable_lp64"
24075 cf_cv_enable_opaque="$cf_cv_enable_opaque"
24076 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
24077 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
24078 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
24079 cf_cv_rel_version="$cf_cv_rel_version"
24080 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
24081 cf_cv_shared_soname='$cf_cv_shared_soname'
24082 cf_cv_shlib_version="$cf_cv_shlib_version"
24083 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
24084 cf_cv_system_name="$cf_cv_system_name"
24085 cf_cv_term_driver="$with_term_driver"
24086 cf_with_ada="$cf_with_ada"
24087 cf_with_cxx_binding="$cf_with_cxx_binding"
24088 cf_with_db_install="$cf_with_db_install"
24089 cf_with_manpages="$cf_with_manpages"
24090 cf_with_tests="$cf_with_tests"
24091 host="$host"
24092 target="$target"
24093 with_shared_cxx="$with_shared_cxx"
24094
24095 EOF
24096
24097 cat >>$CONFIG_STATUS <<\EOF
24098 for ac_config_target in $ac_config_targets
24099 do
24100   case "$ac_config_target" in
24101   # Handling of arguments.
24102   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
24103   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
24104   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
24105   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
24106   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
24107   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
24108   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
24109   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24110   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24111   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
24112   *) { { echo "$as_me:24112: error: invalid argument: $ac_config_target" >&5
24113 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24114    { (exit 1); exit 1; }; };;
24115   esac
24116 done
24117
24118 # If the user did not use the arguments to specify the items to instantiate,
24119 # then the envvar interface is used.  Set only those that are not.
24120 # We use the long form for the default assignment because of an extremely
24121 # bizarre bug on SunOS 4.1.3.
24122 if $ac_need_defaults; then
24123   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24124   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24125   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24126 fi
24127
24128 # Create a temporary directory, and hook for its removal unless debugging.
24129 $debug ||
24130 {
24131   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24132   trap '{ (exit 1); exit 1; }' 1 2 13 15
24133 }
24134
24135 # Create a (secure) tmp directory for tmp files.
24136 : ${TMPDIR=/tmp}
24137 {
24138   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24139   test -n "$tmp" && test -d "$tmp"
24140 }  ||
24141 {
24142   tmp=$TMPDIR/cs$$-$RANDOM
24143   (umask 077 && mkdir $tmp)
24144 } ||
24145 {
24146    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24147    { (exit 1); exit 1; }
24148 }
24149
24150 EOF
24151
24152 cat >>$CONFIG_STATUS <<EOF
24153
24154 #
24155 # CONFIG_FILES section.
24156 #
24157
24158 # No need to generate the scripts if there are no CONFIG_FILES.
24159 # This happens for instance when ./config.status config.h
24160 if test -n "\$CONFIG_FILES"; then
24161   # Protect against being on the right side of a sed subst in config.status.
24162   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24163    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24164 s,@SHELL@,$SHELL,;t t
24165 s,@exec_prefix@,$exec_prefix,;t t
24166 s,@prefix@,$prefix,;t t
24167 s,@program_transform_name@,$program_transform_name,;t t
24168 s,@bindir@,$bindir,;t t
24169 s,@sbindir@,$sbindir,;t t
24170 s,@libexecdir@,$libexecdir,;t t
24171 s,@datarootdir@,$datarootdir,;t t
24172 s,@datadir@,$datadir,;t t
24173 s,@sysconfdir@,$sysconfdir,;t t
24174 s,@sharedstatedir@,$sharedstatedir,;t t
24175 s,@localstatedir@,$localstatedir,;t t
24176 s,@libdir@,$libdir,;t t
24177 s,@includedir@,$includedir,;t t
24178 s,@oldincludedir@,$oldincludedir,;t t
24179 s,@infodir@,$infodir,;t t
24180 s,@mandir@,$mandir,;t t
24181 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24182 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24183 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24184 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24185 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24186 s,@build_alias@,$build_alias,;t t
24187 s,@host_alias@,$host_alias,;t t
24188 s,@target_alias@,$target_alias,;t t
24189 s,@ECHO_C@,$ECHO_C,;t t
24190 s,@ECHO_N@,$ECHO_N,;t t
24191 s,@ECHO_T@,$ECHO_T,;t t
24192 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24193 s,@DEFS@,$DEFS,;t t
24194 s,@LIBS@,$LIBS,;t t
24195 s,@top_builddir@,$top_builddir,;t t
24196 s,@EGREP@,$EGREP,;t t
24197 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
24198 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
24199 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
24200 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24201 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24202 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
24203 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
24204 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
24205 s,@VERSION@,$VERSION,;t t
24206 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
24207 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
24208 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
24209 s,@PACKAGE@,$PACKAGE,;t t
24210 s,@build@,$build,;t t
24211 s,@build_cpu@,$build_cpu,;t t
24212 s,@build_vendor@,$build_vendor,;t t
24213 s,@build_os@,$build_os,;t t
24214 s,@host@,$host,;t t
24215 s,@host_cpu@,$host_cpu,;t t
24216 s,@host_vendor@,$host_vendor,;t t
24217 s,@host_os@,$host_os,;t t
24218 s,@target@,$target,;t t
24219 s,@target_cpu@,$target_cpu,;t t
24220 s,@target_vendor@,$target_vendor,;t t
24221 s,@target_os@,$target_os,;t t
24222 s,@CC@,$CC,;t t
24223 s,@CFLAGS@,$CFLAGS,;t t
24224 s,@LDFLAGS@,$LDFLAGS,;t t
24225 s,@CPPFLAGS@,$CPPFLAGS,;t t
24226 s,@ac_ct_CC@,$ac_ct_CC,;t t
24227 s,@EXEEXT@,$EXEEXT,;t t
24228 s,@OBJEXT@,$OBJEXT,;t t
24229 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24230 s,@CPP@,$CPP,;t t
24231 s,@LDCONFIG@,$LDCONFIG,;t t
24232 s,@CXX@,$CXX,;t t
24233 s,@CXXFLAGS@,$CXXFLAGS,;t t
24234 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
24235 s,@AWK@,$AWK,;t t
24236 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24237 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24238 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24239 s,@LINT@,$LINT,;t t
24240 s,@LINT_OPTS@,$LINT_OPTS,;t t
24241 s,@LN_S@,$LN_S,;t t
24242 s,@cf_config_suffix@,$cf_config_suffix,;t t
24243 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24244 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24245 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
24246 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24247 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24248 s,@SET_MAKE@,$SET_MAKE,;t t
24249 s,@CTAGS@,$CTAGS,;t t
24250 s,@ETAGS@,$ETAGS,;t t
24251 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24252 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24253 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24254 s,@RANLIB@,$RANLIB,;t t
24255 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24256 s,@LD@,$LD,;t t
24257 s,@ac_ct_LD@,$ac_ct_LD,;t t
24258 s,@AR@,$AR,;t t
24259 s,@ac_ct_AR@,$ac_ct_AR,;t t
24260 s,@NM@,$NM,;t t
24261 s,@ac_ct_NM@,$ac_ct_NM,;t t
24262 s,@ARFLAGS@,$ARFLAGS,;t t
24263 s,@DESTDIR@,$DESTDIR,;t t
24264 s,@BUILD_CC@,$BUILD_CC,;t t
24265 s,@BUILD_CPP@,$BUILD_CPP,;t t
24266 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24267 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24268 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24269 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24270 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24271 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24272 s,@cf_list_models@,$cf_list_models,;t t
24273 s,@ABI_VERSION@,$ABI_VERSION,;t t
24274 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24275 s,@LIBTOOL@,$LIBTOOL,;t t
24276 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24277 s,@LT_UNDEF@,$LT_UNDEF,;t t
24278 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24279 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24280 s,@LIB_CREATE@,$LIB_CREATE,;t t
24281 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24282 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24283 s,@LIB_PREP@,$LIB_PREP,;t t
24284 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24285 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24286 s,@LIB_LINK@,$LIB_LINK,;t t
24287 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24288 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24289 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24290 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24291 s,@TICS_NAME@,$TICS_NAME,;t t
24292 s,@TINFO_NAME@,$TINFO_NAME,;t t
24293 s,@LIB_NAME@,$LIB_NAME,;t t
24294 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24295 s,@CC_G_OPT@,$CC_G_OPT,;t t
24296 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24297 s,@LD_MODEL@,$LD_MODEL,;t t
24298 s,@shlibdir@,$shlibdir,;t t
24299 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24300 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24301 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24302 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24303 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24304 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24305 s,@LINK_PROGS@,$LINK_PROGS,;t t
24306 s,@LINK_TESTS@,$LINK_TESTS,;t t
24307 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24308 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24309 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24310 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24311 s,@RPATH_LIST@,$RPATH_LIST,;t t
24312 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24313 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24314 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24315 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24316 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24317 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24318 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24319 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24320 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24321 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24322 s,@XTERM_KBS@,$XTERM_KBS,;t t
24323 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24324 s,@TERMINFO@,$TERMINFO,;t t
24325 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24326 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24327 s,@TERMPATH@,$TERMPATH,;t t
24328 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24329 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24330 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24331 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24332 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24333 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24334 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24335 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24336 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24337 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24338 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24339 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24340 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24341 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24342 s,@RGB_PATH@,$RGB_PATH,;t t
24343 s,@no_x11_rgb@,$no_x11_rgb,;t t
24344 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24345 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24346 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24347 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24348 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24349 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24350 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24351 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24352 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24353 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24354 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24355 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24356 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24357 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24358 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24359 s,@PTHREAD@,$PTHREAD,;t t
24360 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24361 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24362 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24363 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24364 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24365 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24366 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24367 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24368 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24369 s,@ECHO_LT@,$ECHO_LT,;t t
24370 s,@ECHO_LD@,$ECHO_LD,;t t
24371 s,@RULE_CC@,$RULE_CC,;t t
24372 s,@SHOW_CC@,$SHOW_CC,;t t
24373 s,@ECHO_CC@,$ECHO_CC,;t t
24374 s,@ECHO_LINK@,$ECHO_LINK,;t t
24375 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
24376 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
24377 s,@ADAFLAGS@,$ADAFLAGS,;t t
24378 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24379 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24380 s,@ADA_TRACE@,$ADA_TRACE,;t t
24381 s,@MATH_LIB@,$MATH_LIB,;t t
24382 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24383 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24384 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24385 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24386 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24387 s,@TEST_LIBS@,$TEST_LIBS,;t t
24388 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24389 s,@CXXCPP@,$CXXCPP,;t t
24390 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24391 s,@CXX_AR@,$CXX_AR,;t t
24392 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24393 s,@CXXLIBS@,$CXXLIBS,;t t
24394 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24395 s,@gnatmake_exists@,$gnatmake_exists,;t t
24396 s,@gprconfig_exists@,$gprconfig_exists,;t t
24397 s,@M4_exists@,$M4_exists,;t t
24398 s,@cf_ada_make@,$cf_ada_make,;t t
24399 s,@cf_ada_config@,$cf_ada_config,;t t
24400 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
24401 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
24402 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24403 s,@cf_compile_generics@,$cf_compile_generics,;t t
24404 s,@cf_generic_objects@,$cf_generic_objects,;t t
24405 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24406 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24407 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24408 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24409 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24410 s,@cf_ada_package@,$cf_ada_package,;t t
24411 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24412 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24413 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24414 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24415 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24416 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24417 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24418 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24419 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24420 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24421 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24422 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24423 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24424 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24425 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24426 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24427 s,@TICS_LIBS@,$TICS_LIBS,;t t
24428 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24429 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24430 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24431 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24432 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24433 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24434 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24435 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24436 s,@includesubdir@,$includesubdir,;t t
24437 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24438 s,@TICS_LIST@,$TICS_LIST,;t t
24439 s,@TINFO_LIST@,$TINFO_LIST,;t t
24440 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24441 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24442 s,@TEST_ARGS@,$TEST_ARGS,;t t
24443 s,@TEST_DEPS@,$TEST_DEPS,;t t
24444 s,@TEST_ARG2@,$TEST_ARG2,;t t
24445 s,@TEST_DEP2@,$TEST_DEP2,;t t
24446 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24447 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24448 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24449 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24450 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24451 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24452 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24453 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24454 s,@cross_compiling@,$cross_compiling,;t t
24455 s,@TIC_PATH@,$TIC_PATH,;t t
24456 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24457 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24458 s,@PANEL_NAME@,$PANEL_NAME,;t t
24459 s,@MENU_NAME@,$MENU_NAME,;t t
24460 s,@FORM_NAME@,$FORM_NAME,;t t
24461 s,@CXX_NAME@,$CXX_NAME,;t t
24462 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24463 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24464 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24465 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24466 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24467 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24468 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24469 CEOF
24470
24471 EOF
24472
24473   cat >>$CONFIG_STATUS <<\EOF
24474   # Split the substitutions into bite-sized pieces for seds with
24475   # small command number limits, like on Digital OSF/1 and HP-UX.
24476   ac_max_sed_lines=48
24477   ac_sed_frag=1 # Number of current file.
24478   ac_beg=1 # First line for current file.
24479   ac_end=$ac_max_sed_lines # Line after last line for current file.
24480   ac_more_lines=:
24481   ac_sed_cmds=
24482   while $ac_more_lines; do
24483     if test $ac_beg -gt 1; then
24484       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24485     else
24486       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24487     fi
24488     if test ! -s $tmp/subs.frag; then
24489       ac_more_lines=false
24490     else
24491       # The purpose of the label and of the branching condition is to
24492       # speed up the sed processing (if there are no `@' at all, there
24493       # is no need to browse any of the substitutions).
24494       # These are the two extra sed commands mentioned above.
24495       (echo ':t
24496   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24497       # It is possible to make a multiline substitution using escaped newlines.
24498       # Ensure that we do not split the substitution between script fragments.
24499       ac_BEG=$ac_end
24500       ac_END=`expr $ac_end + $ac_max_sed_lines`
24501       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24502       if test -s $tmp/subs.next; then
24503         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24504         if test ! -s $tmp/subs.edit; then
24505           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24506           if test ! -s $tmp/subs.edit; then
24507             if test $ac_beg -gt 1; then
24508               ac_end=`expr $ac_end - 1`
24509               continue
24510             fi
24511           fi
24512         fi
24513       fi
24514
24515       if test -z "$ac_sed_cmds"; then
24516         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24517       else
24518         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24519       fi
24520       ac_sed_frag=`expr $ac_sed_frag + 1`
24521       ac_beg=$ac_end
24522       ac_end=`expr $ac_end + $ac_max_sed_lines`
24523     fi
24524   done
24525   if test -z "$ac_sed_cmds"; then
24526     ac_sed_cmds=cat
24527   fi
24528 fi # test -n "$CONFIG_FILES"
24529
24530 EOF
24531 cat >>$CONFIG_STATUS <<\EOF
24532 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24533   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24534   case $ac_file in
24535   - | *:- | *:-:* ) # input from stdin
24536         cat >$tmp/stdin
24537         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24538         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24539   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24540         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24541   * )   ac_file_in=$ac_file.in ;;
24542   esac
24543
24544   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24545   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24546          X"$ac_file" : 'X\(//\)[^/]' \| \
24547          X"$ac_file" : 'X\(//\)$' \| \
24548          X"$ac_file" : 'X\(/\)' \| \
24549          .     : '\(.\)' 2>/dev/null ||
24550 echo X"$ac_file" |
24551     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24552           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24553           /^X\(\/\/\)$/{ s//\1/; q; }
24554           /^X\(\/\).*/{ s//\1/; q; }
24555           s/.*/./; q'`
24556   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24557     { case "$ac_dir" in
24558   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24559   *)                      as_incr_dir=.;;
24560 esac
24561 as_dummy="$ac_dir"
24562 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24563   case $as_mkdir_dir in
24564     # Skip DOS drivespec
24565     ?:) as_incr_dir=$as_mkdir_dir ;;
24566     *)
24567       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24568       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24569     ;;
24570   esac
24571 done; }
24572
24573     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24574     # A "../" for each directory in $ac_dir_suffix.
24575     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24576   else
24577     ac_dir_suffix= ac_dots=
24578   fi
24579
24580   case $srcdir in
24581   .)  ac_srcdir=.
24582       if test -z "$ac_dots"; then
24583          ac_top_srcdir=.
24584       else
24585          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24586       fi ;;
24587   [\\/]* | ?:[\\/]* )
24588       ac_srcdir=$srcdir$ac_dir_suffix;
24589       ac_top_srcdir=$srcdir ;;
24590   *) # Relative path.
24591     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24592     ac_top_srcdir=$ac_dots$srcdir ;;
24593   esac
24594
24595   case $INSTALL in
24596   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24597   *) ac_INSTALL=$ac_dots$INSTALL ;;
24598   esac
24599
24600   if test x"$ac_file" != x-; then
24601     { echo "$as_me:24601: creating $ac_file" >&5
24602 echo "$as_me: creating $ac_file" >&6;}
24603     rm -f "$ac_file"
24604   fi
24605   # Let's still pretend it is `configure' which instantiates (i.e., don't
24606   # use $as_me), people would be surprised to read:
24607   #    /* config.h.  Generated automatically by config.status.  */
24608   configure_input="Generated automatically from `echo $ac_file_in |
24609                                                  sed 's,.*/,,'` by configure."
24610
24611   # First look for the input files in the build tree, otherwise in the
24612   # src tree.
24613   ac_file_inputs=`IFS=:
24614     for f in $ac_file_in; do
24615       case $f in
24616       -) echo $tmp/stdin ;;
24617       [\\/$]*)
24618          # Absolute (can't be DOS-style, as IFS=:)
24619          test -f "$f" || { { echo "$as_me:24619: error: cannot find input file: $f" >&5
24620 echo "$as_me: error: cannot find input file: $f" >&2;}
24621    { (exit 1); exit 1; }; }
24622          echo $f;;
24623       *) # Relative
24624          if test -f "$f"; then
24625            # Build tree
24626            echo $f
24627          elif test -f "$srcdir/$f"; then
24628            # Source tree
24629            echo $srcdir/$f
24630          else
24631            # /dev/null tree
24632            { { echo "$as_me:24632: error: cannot find input file: $f" >&5
24633 echo "$as_me: error: cannot find input file: $f" >&2;}
24634    { (exit 1); exit 1; }; }
24635          fi;;
24636       esac
24637     done` || { (exit 1); exit 1; }
24638 EOF
24639 cat >>$CONFIG_STATUS <<\EOF
24640   ac_warn_datarootdir=no
24641   if test x"$ac_file" != x-; then
24642     for ac_item in $ac_file_inputs
24643     do
24644       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24645       if test -n "$ac_seen"; then
24646         ac_used=`grep '@datarootdir@' $ac_item`
24647         if test -z "$ac_used"; then
24648           { echo "$as_me:24648: WARNING: datarootdir was used implicitly but not set:
24649 $ac_seen" >&5
24650 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24651 $ac_seen" >&2;}
24652           ac_warn_datarootdir=yes
24653         fi
24654       fi
24655       ac_seen=`grep '${datarootdir}' $ac_item`
24656       if test -n "$ac_seen"; then
24657         { echo "$as_me:24657: WARNING: datarootdir was used explicitly but not set:
24658 $ac_seen" >&5
24659 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24660 $ac_seen" >&2;}
24661         ac_warn_datarootdir=yes
24662       fi
24663     done
24664   fi
24665
24666 if test "x$ac_warn_datarootdir" = xyes; then
24667   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24668 fi
24669
24670 EOF
24671 cat >>$CONFIG_STATUS <<EOF
24672   sed "$ac_vpsub
24673 $extrasub
24674 EOF
24675 cat >>$CONFIG_STATUS <<\EOF
24676 :t
24677 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24678 s,@configure_input@,$configure_input,;t t
24679 s,@srcdir@,$ac_srcdir,;t t
24680 s,@top_srcdir@,$ac_top_srcdir,;t t
24681 s,@INSTALL@,$ac_INSTALL,;t t
24682 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24683   rm -f $tmp/stdin
24684   if test x"$ac_file" != x-; then
24685     cp $tmp/out $ac_file
24686
24687     for ac_name in prefix exec_prefix datarootdir
24688     do
24689         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24690         if test -n "$ac_seen"; then
24691             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24692             if test -z "$ac_init"; then
24693               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24694               { echo "$as_me:24694: WARNING: Variable $ac_name is used but was not set:
24695 $ac_seen" >&5
24696 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24697 $ac_seen" >&2;}
24698             fi
24699         fi
24700     done
24701     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24702     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24703     if test -s $tmp/out; then
24704       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24705       { echo "$as_me:24705: WARNING: Some variables may not be substituted:
24706 $ac_seen" >&5
24707 echo "$as_me: WARNING: Some variables may not be substituted:
24708 $ac_seen" >&2;}
24709     fi
24710   else
24711     cat $tmp/out
24712   fi
24713   rm -f $tmp/out
24714
24715 done
24716 EOF
24717 cat >>$CONFIG_STATUS <<\EOF
24718
24719 #
24720 # CONFIG_HEADER section.
24721 #
24722
24723 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24724 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24725 #
24726 # ac_d sets the value in "#define NAME VALUE" lines.
24727 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24728 ac_dB='[        ].*$,\1#\2'
24729 ac_dC=' '
24730 ac_dD=',;t'
24731 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24732 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24733 ac_iB='\([      ]\),\1#\2define\3'
24734 ac_iC=' '
24735 ac_iD='\4,;t'
24736 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24737 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24738 ac_uB='$,\1#\2define\3'
24739 ac_uC=' '
24740 ac_uD=',;t'
24741
24742 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24743   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24744   case $ac_file in
24745   - | *:- | *:-:* ) # input from stdin
24746         cat >$tmp/stdin
24747         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24748         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24749   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24750         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24751   * )   ac_file_in=$ac_file.in ;;
24752   esac
24753
24754   test x"$ac_file" != x- && { echo "$as_me:24754: creating $ac_file" >&5
24755 echo "$as_me: creating $ac_file" >&6;}
24756
24757   # First look for the input files in the build tree, otherwise in the
24758   # src tree.
24759   ac_file_inputs=`IFS=:
24760     for f in $ac_file_in; do
24761       case $f in
24762       -) echo $tmp/stdin ;;
24763       [\\/$]*)
24764          # Absolute (can't be DOS-style, as IFS=:)
24765          test -f "$f" || { { echo "$as_me:24765: error: cannot find input file: $f" >&5
24766 echo "$as_me: error: cannot find input file: $f" >&2;}
24767    { (exit 1); exit 1; }; }
24768          echo $f;;
24769       *) # Relative
24770          if test -f "$f"; then
24771            # Build tree
24772            echo $f
24773          elif test -f "$srcdir/$f"; then
24774            # Source tree
24775            echo $srcdir/$f
24776          else
24777            # /dev/null tree
24778            { { echo "$as_me:24778: error: cannot find input file: $f" >&5
24779 echo "$as_me: error: cannot find input file: $f" >&2;}
24780    { (exit 1); exit 1; }; }
24781          fi;;
24782       esac
24783     done` || { (exit 1); exit 1; }
24784   # Remove the trailing spaces.
24785   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24786
24787 EOF
24788
24789 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24790 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24791 # be either 'cat' or 'sort'.
24792 cat confdefs.h | uniq >conftest.vals
24793
24794 # Break up conftest.vals because some shells have a limit on
24795 # the size of here documents, and old seds have small limits too.
24796
24797 rm -f conftest.tail
24798 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24799 while grep . conftest.vals >/dev/null
24800 do
24801   # Write chunks of a limited-size here document to conftest.frag.
24802   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24803   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24804   echo 'CEOF' >> $CONFIG_STATUS
24805   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24806   rm -f conftest.vals
24807   mv conftest.tail conftest.vals
24808 done
24809 rm -f conftest.vals
24810
24811 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24812 # marker @DEFS@.
24813 echo '  cat >> conftest.edit <<CEOF
24814 /@DEFS@/r conftest.frag
24815 /@DEFS@/d
24816 CEOF
24817 sed -f conftest.edit $tmp/in > $tmp/out
24818 rm -f $tmp/in
24819 mv $tmp/out $tmp/in
24820 rm -f conftest.edit conftest.frag
24821 ' >> $CONFIG_STATUS
24822
24823 cat >>$CONFIG_STATUS <<\EOF
24824   # Let's still pretend it is `configure' which instantiates (i.e., don't
24825   # use $as_me), people would be surprised to read:
24826   #    /* config.h.  Generated automatically by config.status.  */
24827   if test x"$ac_file" = x-; then
24828     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24829   else
24830     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24831   fi
24832   cat $tmp/in >>$tmp/config.h
24833   rm -f $tmp/in
24834   if test x"$ac_file" != x-; then
24835     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24836       { echo "$as_me:24836: $ac_file is unchanged" >&5
24837 echo "$as_me: $ac_file is unchanged" >&6;}
24838     else
24839       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24840          X"$ac_file" : 'X\(//\)[^/]' \| \
24841          X"$ac_file" : 'X\(//\)$' \| \
24842          X"$ac_file" : 'X\(/\)' \| \
24843          .     : '\(.\)' 2>/dev/null ||
24844 echo X"$ac_file" |
24845     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24846           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24847           /^X\(\/\/\)$/{ s//\1/; q; }
24848           /^X\(\/\).*/{ s//\1/; q; }
24849           s/.*/./; q'`
24850       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24851         { case "$ac_dir" in
24852   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24853   *)                      as_incr_dir=.;;
24854 esac
24855 as_dummy="$ac_dir"
24856 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24857   case $as_mkdir_dir in
24858     # Skip DOS drivespec
24859     ?:) as_incr_dir=$as_mkdir_dir ;;
24860     *)
24861       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24862       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24863     ;;
24864   esac
24865 done; }
24866
24867       fi
24868       rm -f $ac_file
24869       mv $tmp/config.h $ac_file
24870     fi
24871   else
24872     cat $tmp/config.h
24873     rm -f $tmp/config.h
24874   fi
24875 done
24876 EOF
24877 cat >>$CONFIG_STATUS <<\EOF
24878 #
24879 # CONFIG_COMMANDS section.
24880 #
24881 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24882   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24883   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24884
24885   case $ac_dest in
24886     default )
24887 if test "x$cf_with_tests" != xno ; then
24888
24889 for cf_dir in test
24890 do
24891         if test ! -d $srcdir/$cf_dir; then
24892                 continue
24893         elif test -f $srcdir/$cf_dir/programs; then
24894                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24895         fi
24896 done
24897
24898 fi
24899
24900 cf_prefix=$LIB_PREFIX
24901
24902 case $cf_cv_shlib_version in
24903 (cygdll|msysdll|mingw)
24904         TINFO_NAME=$TINFO_ARG_SUFFIX
24905         TINFO_SUFFIX=.dll
24906         ;;
24907 esac
24908
24909 if test -n "$TINFO_SUFFIX" ; then
24910         case $TINFO_SUFFIX in
24911         (tw*)
24912                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24913                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24914                 ;;
24915         (t*)
24916                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24917                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24918                 ;;
24919         (w*)
24920                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24921                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24922                 ;;
24923         esac
24924 fi
24925
24926 for cf_dir in $SRC_SUBDIRS
24927 do
24928         if test ! -d $srcdir/$cf_dir ; then
24929                 continue
24930         elif test -f $srcdir/$cf_dir/modules; then
24931
24932                 SHARED_LIB=
24933                 Libs_To_Make=
24934                 cf_awk_program=
24935                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24936                 then
24937                         cf_awk_program="$cf_awk_program\
24938 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24939 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24940 "
24941                 fi
24942
24943                 if test "x$WILDCARD_SYMS" = xno
24944                 then
24945                         cf_awk_program="$cf_awk_program\
24946 /[      ]_\\*;/ { skip=1; next; }\
24947 "
24948                 fi
24949
24950                 if test "x$cf_awk_program" != "x"
24951                 then
24952                         cat >>$cf_dir/Makefile <<CF_EOF
24953
24954 # Generated by CF_LIB_RULES
24955 resulting.map: $UNALTERED_SYMS
24956         $AWK 'BEGIN { skip = 1; last=""; } \
24957 $cf_awk_program \
24958 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24959  skip = 0; last = \$\$0; } \
24960 END { print last; }' < $UNALTERED_SYMS >\$@
24961
24962 distclean::
24963         rm -f resulting.map
24964 CF_EOF
24965                 fi
24966
24967                 for cf_item in $cf_LIST_MODELS
24968                 do
24969
24970         case X$cf_item in
24971         (Xlibtool)
24972                 cf_suffix='.la'
24973                 cf_depsuf=$cf_suffix
24974                 ;;
24975         (Xdebug)
24976                 cf_suffix='_g.a'
24977                 cf_depsuf=$cf_suffix
24978                 ;;
24979         (Xprofile)
24980                 cf_suffix='_p.a'
24981                 cf_depsuf=$cf_suffix
24982                 ;;
24983         (Xshared)
24984                 case $cf_cv_system_name in
24985                 (aix[5-7]*)
24986                         cf_suffix='.so'
24987                         cf_depsuf=$cf_suffix
24988                         ;;
24989                 (cygwin*|msys*|mingw*)
24990                         cf_suffix='.dll'
24991                         cf_depsuf='.dll.a'
24992                         ;;
24993                 (darwin*)
24994                         cf_suffix='.dylib'
24995                         cf_depsuf=$cf_suffix
24996                         ;;
24997                 (hpux*)
24998                         case $target in
24999                         (ia64*)
25000                                 cf_suffix='.so'
25001                                 cf_depsuf=$cf_suffix
25002                                 ;;
25003                         (*)
25004                                 cf_suffix='.sl'
25005                                 cf_depsuf=$cf_suffix
25006                                 ;;
25007                         esac
25008                         ;;
25009                 (*)
25010                         cf_suffix='.so'
25011                         cf_depsuf=$cf_suffix
25012                         ;;
25013                 esac
25014                 ;;
25015         (*)
25016                 cf_suffix='.a'
25017                 cf_depsuf=$cf_suffix
25018                 ;;
25019         esac
25020         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25021         then
25022                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25023                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25024         fi
25025
25026                         cf_libname=$cf_dir
25027                         test "$cf_dir" = c++ && cf_libname=ncurses++
25028                         if test $cf_item = shared ; then
25029                                 if test -n "${LIB_SUFFIX}"
25030                                 then
25031                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25032                                 else
25033                                         cf_shared_suffix="$cf_suffix"
25034                                 fi
25035                                 if test "$cf_cv_do_symlinks" = yes ; then
25036                                         cf_version_name=
25037
25038                                         case "$cf_cv_shlib_version" in
25039                                         (rel)
25040                                                 cf_version_name=REL_VERSION
25041                                                 ;;
25042                                         (abi)
25043                                                 cf_version_name=ABI_VERSION
25044                                                 ;;
25045                                         esac
25046
25047                                         if test -n "$cf_version_name"
25048                                         then
25049                                                 case "$cf_cv_system_name" in
25050                                                 (darwin*)
25051                                                         # "w", etc?
25052                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
25053                                                         ;;
25054                                                 (*)
25055                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
25056                                                         ;;
25057                                                 esac
25058                                         fi
25059                                         if test -n "${USE_LIB_SUFFIX}"
25060                                         then
25061                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25062                                         else
25063                                                 cf_shared_suffix="$cf_suffix"
25064                                         fi
25065                                 fi
25066                                 # cygwin needs import library, and has unique naming convention
25067                                 # use autodetected ${cf_prefix} for import lib and static lib, but
25068                                 # use 'cyg' prefix for shared lib.
25069                                 case $cf_cv_shlib_version in
25070                                 (cygdll)
25071                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25072                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
25073                                         ;;
25074                                 (msysdll)
25075                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25076                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
25077                                         ;;
25078                                 (mingw)
25079                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25080                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
25081                                         ;;
25082                                 (*)
25083                                         cf_add_lib=
25084                                         ;;
25085                                 esac
25086                                 if test -n "$cf_add_lib"
25087                                 then
25088                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25089                                         continue
25090                                 fi
25091                         fi
25092                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
25093                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25094                 done
25095
25096                 if test $cf_dir = ncurses ; then
25097                         cf_subsets="$LIB_SUBSETS"
25098                         cf_r_parts="$cf_subsets"
25099                         cf_liblist="$Libs_To_Make"
25100
25101                         while test -n "$cf_r_parts"
25102                         do
25103                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
25104                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
25105                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
25106                                         cf_add_lib=
25107                                         case $cf_l_parts in
25108                                         (*termlib*)
25109                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
25110                                                 ;;
25111                                         (*ticlib*)
25112                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
25113                                                 ;;
25114                                         (*)
25115                                                 break
25116                                                 ;;
25117                                         esac
25118                                         if test -n "$cf_add_lib"; then
25119                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
25120                                         fi
25121                                 else
25122                                         break
25123                                 fi
25124                         done
25125                 else
25126                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
25127                 fi
25128
25129                 if test $cf_dir = c++; then
25130                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
25131                                 cf_list=
25132                                 for cf_item in $Libs_To_Make
25133                                 do
25134                                         case $cf_item in
25135                                         (*.a)
25136                                                 ;;
25137                                         (*)
25138                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
25139                                                 ;;
25140                                         esac
25141                                         for cf_test in $cf_list
25142                                         do
25143                                                 if test "$cf_test" = "$cf_item"
25144                                                 then
25145                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
25146                                                         cf_item=
25147                                                         break
25148                                                 fi
25149                                         done
25150                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
25151                                 done
25152                                 Libs_To_Make="$cf_list"
25153                         fi
25154                 fi
25155
25156                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
25157                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
25158                         $cf_dir/Makefile >$cf_dir/Makefile.out
25159                 mv $cf_dir/Makefile.out $cf_dir/Makefile
25160
25161                 $AWK -f $srcdir/mk-0th.awk \
25162                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
25163                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25164
25165                 for cf_subset in $cf_subsets
25166                 do
25167                         cf_subdirs=
25168                         for cf_item in $cf_LIST_MODELS
25169                         do
25170
25171                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
25172
25173 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25174
25175                         CXX_MODEL=$cf_ITEM
25176                         if test "$CXX_MODEL" = SHARED; then
25177                                 case $cf_cv_shlib_version in
25178                                 (cygdll|msysdll|mingw)
25179                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
25180
25181 echo "${as_me:-configure}:25181: testing overriding CXX_MODEL to SHARED ..." 1>&5
25182
25183                                         with_shared_cxx=yes
25184                                         ;;
25185                                 (*)
25186                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
25187                                         ;;
25188                                 esac
25189                         fi
25190
25191         case X$cf_item in
25192         (Xlibtool)
25193                 cf_suffix='.la'
25194                 cf_depsuf=$cf_suffix
25195                 ;;
25196         (Xdebug)
25197                 cf_suffix='_g.a'
25198                 cf_depsuf=$cf_suffix
25199                 ;;
25200         (Xprofile)
25201                 cf_suffix='_p.a'
25202                 cf_depsuf=$cf_suffix
25203                 ;;
25204         (Xshared)
25205                 case $cf_cv_system_name in
25206                 (aix[5-7]*)
25207                         cf_suffix='.so'
25208                         cf_depsuf=$cf_suffix
25209                         ;;
25210                 (cygwin*|msys*|mingw*)
25211                         cf_suffix='.dll'
25212                         cf_depsuf='.dll.a'
25213                         ;;
25214                 (darwin*)
25215                         cf_suffix='.dylib'
25216                         cf_depsuf=$cf_suffix
25217                         ;;
25218                 (hpux*)
25219                         case $target in
25220                         (ia64*)
25221                                 cf_suffix='.so'
25222                                 cf_depsuf=$cf_suffix
25223                                 ;;
25224                         (*)
25225                                 cf_suffix='.sl'
25226                                 cf_depsuf=$cf_suffix
25227                                 ;;
25228                         esac
25229                         ;;
25230                 (*)
25231                         cf_suffix='.so'
25232                         cf_depsuf=$cf_suffix
25233                         ;;
25234                 esac
25235                 ;;
25236         (*)
25237                 cf_suffix='.a'
25238                 cf_depsuf=$cf_suffix
25239                 ;;
25240         esac
25241         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25242         then
25243                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25244                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25245         fi
25246
25247         case $cf_item in
25248         (libtool) cf_subdir='obj_lo'  ;;
25249         (normal)  cf_subdir='objects' ;;
25250         (debug)   cf_subdir='obj_g' ;;
25251         (profile) cf_subdir='obj_p' ;;
25252         (shared)
25253                 case $cf_cv_system_name in
25254                 (cygwin|msys)
25255                         cf_subdir='objects' ;;
25256                 (*)
25257                         cf_subdir='obj_s' ;;
25258                 esac
25259         esac
25260
25261                         # Test for case where we build libtinfo with a different name.
25262                         cf_libname=$cf_dir
25263                         if test $cf_dir = ncurses ; then
25264                                 case $cf_subset in
25265                                 (*base*)
25266                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25267                                         ;;
25268                                 (*termlib*)
25269                                         cf_libname=$TINFO_LIB_SUFFIX
25270                                         ;;
25271                                 (ticlib*)
25272                                         cf_libname=$TICS_LIB_SUFFIX
25273                                         ;;
25274                                 esac
25275                         elif test $cf_dir = c++ ; then
25276                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25277                         else
25278                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25279                         fi
25280                         if test -n "${USE_ARG_SUFFIX}" ; then
25281                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25282                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25283                         fi
25284
25285                         # These dependencies really are for development, not
25286                         # builds, but they are useful in porting, too.
25287                         cf_depend="../include/ncurses_cfg.h"
25288                         if test "$srcdir" = "."; then
25289                                 cf_reldir="."
25290                         else
25291                                 cf_reldir="\${srcdir}"
25292                         fi
25293
25294                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25295                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25296                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25297                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25298                         fi
25299
25300                         cf_dir_suffix=
25301                         old_cf_suffix="$cf_suffix"
25302                         if test "$cf_cv_shlib_version_infix" = yes ; then
25303                         if test -n "$USE_LIB_SUFFIX" ; then
25304                                 case $USE_LIB_SUFFIX in
25305                                 (tw*)
25306                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25307                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25308                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25309                                         ;;
25310                                 (t*)
25311                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25312                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25313                                         cf_dir_suffix=t$EXTRA_SUFFIX
25314                                         ;;
25315                                 (w*)
25316                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25317                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25318                                         cf_dir_suffix=w$EXTRA_SUFFIX
25319                                         ;;
25320                                 (*)
25321                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25322                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25323                                         cf_dir_suffix=$EXTRA_SUFFIX
25324                                         ;;
25325                                 esac
25326                         fi
25327                         fi
25328
25329                         $AWK -f $srcdir/mk-1st.awk \
25330                                 name=${cf_libname}${cf_dir_suffix} \
25331                                 traces=$LIB_TRACING \
25332                                 MODEL=$cf_ITEM \
25333                                 CXX_MODEL=$CXX_MODEL \
25334                                 model=$cf_subdir \
25335                                 prefix=$cf_prefix \
25336                                 suffix=$cf_suffix \
25337                                 subset=$cf_subset \
25338                                 driver=$cf_cv_term_driver \
25339                                 SymLink="$LN_S" \
25340                                 TermlibRoot=$TINFO_NAME \
25341                                 TermlibSuffix=$TINFO_SUFFIX \
25342                                 ShlibVer=$cf_cv_shlib_version \
25343                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25344                                 ReLink=${cf_cv_do_relink:-no} \
25345                                 DoLinks=$cf_cv_do_symlinks \
25346                                 rmSoLocs=$cf_cv_rm_so_locs \
25347                                 ldconfig="$LDCONFIG" \
25348                                 overwrite=$WITH_OVERWRITE \
25349                                 depend="$cf_depend" \
25350                                 host="$host" \
25351                                 libtool_version="$LIBTOOL_VERSION" \
25352                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25353
25354                         cf_suffix="$old_cf_suffix"
25355
25356                         for cf_subdir2 in $cf_subdirs lib
25357                         do
25358                                 test $cf_subdir = $cf_subdir2 && break
25359                         done
25360                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25361                         $AWK -f $srcdir/mk-2nd.awk \
25362                                 name=$cf_dir \
25363                                 traces=$LIB_TRACING \
25364                                 MODEL=$cf_ITEM \
25365                                 model=$cf_subdir \
25366                                 subset=$cf_subset \
25367                                 srcdir=$srcdir \
25368                                 echo=$WITH_ECHO \
25369                                 crenames=$cf_cv_prog_CC_c_o \
25370                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25371                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25372                         cf_subdirs="$cf_subdirs $cf_subdir"
25373                         done
25374                 done
25375         fi
25376
25377         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25378 done
25379
25380 for cf_dir in $SRC_SUBDIRS
25381 do
25382         if test ! -d $srcdir/$cf_dir ; then
25383                 continue
25384         fi
25385
25386         if test -f $cf_dir/Makefile ; then
25387                 case "$cf_dir" in
25388                 (Ada95)
25389                         echo 'libs \' >> Makefile
25390                         echo 'install.libs \' >> Makefile
25391                         echo 'uninstall.libs ::' >> Makefile
25392                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25393                         ;;
25394                 esac
25395         fi
25396
25397         if test -f $srcdir/$cf_dir/modules; then
25398                 echo >> Makefile
25399                 if test -f $srcdir/$cf_dir/headers; then
25400 cat >> Makefile <<CF_EOF
25401 install.includes \\
25402 uninstall.includes \\
25403 CF_EOF
25404                 fi
25405 if test "$cf_dir" != "c++" ; then
25406 echo 'lint \' >> Makefile
25407 fi
25408 cat >> Makefile <<CF_EOF
25409 libs \\
25410 lintlib \\
25411 install.libs \\
25412 uninstall.libs \\
25413 install.$cf_dir \\
25414 uninstall.$cf_dir ::
25415         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25416 CF_EOF
25417         elif test -f $srcdir/$cf_dir/headers; then
25418 cat >> Makefile <<CF_EOF
25419
25420 libs \\
25421 install.libs \\
25422 uninstall.libs \\
25423 install.includes \\
25424 uninstall.includes ::
25425         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25426 CF_EOF
25427 fi
25428 done
25429
25430 if test "x$cf_with_db_install" = xyes; then
25431 cat >> Makefile <<CF_EOF
25432
25433 install.libs uninstall.libs \\
25434 install.data uninstall.data ::
25435 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25436 CF_EOF
25437 else
25438 cat >> Makefile <<CF_EOF
25439
25440 install.libs uninstall.libs ::
25441         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25442 CF_EOF
25443 fi
25444
25445 if test "x$cf_with_manpages" = xyes; then
25446 cat >> Makefile <<CF_EOF
25447
25448 install.man \\
25449 uninstall.man ::
25450         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25451 CF_EOF
25452 fi
25453
25454 cat >> Makefile <<CF_EOF
25455
25456 distclean ::
25457         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25458         rm -f headers.sh headers.sed mk_shared_lib.sh
25459         rm -f edit_man.* man_alias.*
25460         rm -rf \${DIRS_TO_MAKE}
25461 CF_EOF
25462
25463 # Special case: tack's manpage lives in its own directory.
25464 if test "x$cf_with_manpages" = xyes; then
25465 if test "x$cf_with_tack" = "xyes"; then
25466 cat >> Makefile <<CF_EOF
25467
25468 install.man \\
25469 uninstall.man ::
25470         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25471 CF_EOF
25472 fi
25473 fi
25474
25475 rm -f headers.sed headers.sh
25476
25477 echo creating headers.sh
25478 cat >headers.sh <<CF_EOF
25479 #! $SHELL
25480 # This shell script is generated by the 'configure' script.  It is invoked in a
25481 # subdirectory of the build tree.  It generates a sed-script in the parent
25482 # directory that is used to adjust includes for header files that reside in a
25483 # subdirectory of /usr/include, etc.
25484 PRG=""
25485 while test \$# != 3
25486 do
25487 PRG="\$PRG \$1"; shift
25488 done
25489 DST=\$1
25490 REF=\$2
25491 SRC=\$3
25492 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25493 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25494 echo installing \$SRC in \$DST
25495 CF_EOF
25496
25497 if test $WITH_CURSES_H = yes; then
25498         cat >>headers.sh <<CF_EOF
25499 case \$DST in
25500 (/*/include/*)
25501         END=\`basename \$DST\`
25502         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25503         do
25504                 NAME=\`basename \$i\`
25505                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25506         done
25507         ;;
25508 (*)
25509         echo "" >> \$TMPSED
25510         ;;
25511 esac
25512 CF_EOF
25513
25514 else
25515         cat >>headers.sh <<CF_EOF
25516 case \$DST in
25517 (/*/include/*)
25518         END=\`basename \$DST\`
25519         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25520         do
25521                 NAME=\`basename \$i\`
25522                 if test "\$NAME" = "curses.h"
25523                 then
25524                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25525                         NAME=ncurses.h
25526                 fi
25527                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25528         done
25529         ;;
25530 (*)
25531         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25532         ;;
25533 esac
25534 CF_EOF
25535 fi
25536 cat >>headers.sh <<CF_EOF
25537 rm -f \$TMPSRC
25538 sed -f \$TMPSED \$SRC > \$TMPSRC
25539 NAME=\`basename \$SRC\`
25540 CF_EOF
25541 if test $WITH_CURSES_H != yes; then
25542         cat >>headers.sh <<CF_EOF
25543 test "\$NAME" = "curses.h" && NAME=ncurses.h
25544 CF_EOF
25545 fi
25546 cat >>headers.sh <<CF_EOF
25547 # Just in case someone gzip'd manpages, remove the conflicting copy.
25548 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25549
25550 eval \$PRG \$TMPSRC \$DST/\$NAME
25551 rm -f \$TMPSRC \$TMPSED
25552 CF_EOF
25553
25554 chmod 0755 headers.sh
25555
25556 for cf_dir in $SRC_SUBDIRS
25557 do
25558         if test ! -d $srcdir/$cf_dir ; then
25559                 continue
25560         fi
25561
25562         if test -f $srcdir/$cf_dir/headers; then
25563                 $AWK -f $srcdir/mk-hdr.awk \
25564                         subset="$LIB_SUBSETS" \
25565                         compat="$WITH_CURSES_H" \
25566                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25567         fi
25568
25569         if test -f $srcdir/$cf_dir/modules; then
25570                 if test "$cf_dir" != "c++" ; then
25571                         cat >>$cf_dir/Makefile <<"CF_EOF"
25572 depend : ${AUTO_SRC}
25573         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25574
25575 # DO NOT DELETE THIS LINE -- make depend depends on it.
25576 CF_EOF
25577                 fi
25578         fi
25579 done
25580
25581 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25582 if test -z "$USE_OLD_MAKERULES" ; then
25583         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25584 fi
25585 fi
25586  ;;
25587   esac
25588 done
25589 EOF
25590
25591 cat >>$CONFIG_STATUS <<\EOF
25592
25593 { (exit 0); exit 0; }
25594 EOF
25595 chmod +x $CONFIG_STATUS
25596 ac_clean_files=$ac_clean_files_save
25597
25598 # configure is writing to config.log, and then calls config.status.
25599 # config.status does its own redirection, appending to config.log.
25600 # Unfortunately, on DOS this fails, as config.log is still kept open
25601 # by configure, so config.status won't be able to write to it; its
25602 # output is simply discarded.  So we exec the FD to /dev/null,
25603 # effectively closing config.log, so it can be properly (re)opened and
25604 # appended to by config.status.  When coming back to configure, we
25605 # need to make the FD available again.
25606 if test "$no_create" != yes; then
25607   ac_cs_success=:
25608   exec 5>/dev/null
25609   $SHELL $CONFIG_STATUS || ac_cs_success=false
25610   exec 5>>config.log
25611   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25612   # would make configure fail if this is the last instruction.
25613   $ac_cs_success || { (exit 1); exit 1; }
25614 fi
25615 ${MAKE:-make} preinstall