]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20180120
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.653 .
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   --with-tparm-arg=TYPE   override parameter type of tparm
787   --with-rcs-ids          compile-in RCS identifiers
788 Options to Specify How Manpages are Installed:
789   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
790                           optionally formatted/catonly, e.g., gzip,formatted
791   --with-manpage-renames  specify manpage-renaming
792   --with-manpage-aliases  specify manpage-aliases using .so
793   --with-manpage-symlinks specify manpage-aliases using symlinks
794   --with-manpage-tbl      specify manpage processing with tbl
795 Extensions:
796   --disable-ext-funcs     disable function-extensions
797   --enable-sp-funcs       enable SCREEN-extensions
798   --enable-term-driver    enable terminal-driver
799   --enable-const          compile with extra/non-standard const
800   --enable-ext-colors     compile for 256-color support
801   --enable-ext-mouse      compile for extended mouse-encoding
802   --enable-ext-putwin     compile with extended putwin/screendump
803   --enable-no-padding     compile with $NCURSES_NO_PADDING code
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --enable-sigwinch       compile with SIGWINCH handler
806   --enable-tcap-names     compile with user-definable terminal capabilities
807   --with-pthread          use POSIX thread library
808   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
809   --enable-weak-symbols   enable weak-symbols for pthreads
810   --enable-reentrant      compile with reentrant code
811   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
812   --enable-opaque-form    make form-library structures "opaque"
813   --enable-opaque-menu    make menu-library structures "opaque"
814   --enable-opaque-panel   make panel-library structures "opaque"
815   --with-wrap-prefix=XXX  override prefix used for public variables
816 Development Code:
817   --without-develop       disable development options
818   --enable-hard-tabs      compile with hard-tabs code
819   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
820 Experimental Code:
821   --disable-assumed-color do not assume anything about default-colors
822   --disable-hashmap       compile without hashmap scrolling-optimization
823   --enable-colorfgbg      compile-in experimental $COLORFGBG code
824   --enable-interop        compile-in interop bindings
825   --enable-safe-sprintf   compile with experimental safe-sprintf code
826   --disable-scroll-hints  compile without scroll-hints code
827   --enable-wgetch-events  compile with wgetch-events code
828 Testing/development Options:
829   --disable-echo          do not display "compiling" commands
830   --disable-stripping     do not strip installed executables
831   --enable-warnings       build: turn on GCC compiler warnings
832   --enable-string-hacks   work around bogus compiler/loader warnings
833   --enable-assertions     test: turn on generation of assertion code
834   --with-dmalloc          test: use Gray Watson's dmalloc library
835   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
836   --with-valgrind         test: use valgrind
837   --disable-leaks         test: free permanent memory, analyze leaks
838   --enable-expanded       test: generate functions for certain macros
839   --disable-macros        test: use functions rather than macros
840   --with-trace            test: add trace() function to all models of ncurses
841   --disable-gnat-projects test: disable GNAT projects even if usable
842 Ada95 Binding Options:
843   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
844   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
845   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
846   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
847
848 Some influential environment variables:
849   CC          C compiler command
850   CFLAGS      C compiler flags
851   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
852               nonstandard directory <lib dir>
853   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
854               headers in a nonstandard directory <include dir>
855   CPP         C preprocessor
856   CXX         C++ compiler command
857   CXXFLAGS    C++ compiler flags
858   CXXCPP      C++ preprocessor
859
860 Use these variables to override the choices made by `configure' or to help
861 it to find libraries and programs with nonstandard names/locations.
862
863 EOF
864 fi
865
866 if test "$ac_init_help" = "recursive"; then
867   # If there are subdirs, report their specific --help.
868   ac_popdir=`pwd`
869   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
870     cd $ac_subdir
871     # A "../" for each directory in /$ac_subdir.
872     ac_dots=`echo $ac_subdir |
873              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
874
875     case $srcdir in
876     .) # No --srcdir option.  We are building in place.
877       ac_sub_srcdir=$srcdir ;;
878     [\\/]* | ?:[\\/]* ) # Absolute path.
879       ac_sub_srcdir=$srcdir/$ac_subdir ;;
880     *) # Relative path.
881       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
882     esac
883
884     # Check for guested configure; otherwise get Cygnus style configure.
885     if test -f $ac_sub_srcdir/configure.gnu; then
886       echo
887       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
888     elif test -f $ac_sub_srcdir/configure; then
889       echo
890       $SHELL $ac_sub_srcdir/configure  --help=recursive
891     elif test -f $ac_sub_srcdir/configure.ac ||
892            test -f $ac_sub_srcdir/configure.in; then
893       echo
894       $ac_configure --help
895     else
896       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
897     fi
898     cd $ac_popdir
899   done
900 fi
901
902 test -n "$ac_init_help" && exit 0
903 if $ac_init_version; then
904   cat <<\EOF
905
906 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
907 Free Software Foundation, Inc.
908 This configure script is free software; the Free Software Foundation
909 gives unlimited permission to copy, distribute and modify it.
910 EOF
911   exit 0
912 fi
913 exec 5>config.log
914 cat >&5 <<EOF
915 This file contains any messages produced by compilers while
916 running configure, to aid debugging if configure makes a mistake.
917
918 It was created by $as_me, which was
919 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
920
921   $ $0 $@
922
923 EOF
924 {
925 cat <<_ASUNAME
926 ## ---------- ##
927 ## Platform.  ##
928 ## ---------- ##
929
930 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
931 uname -m = `(uname -m) 2>/dev/null || echo unknown`
932 uname -r = `(uname -r) 2>/dev/null || echo unknown`
933 uname -s = `(uname -s) 2>/dev/null || echo unknown`
934 uname -v = `(uname -v) 2>/dev/null || echo unknown`
935
936 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
937 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
938
939 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
940 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
941 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
942 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
943 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
944 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
945 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
946
947 PATH = $PATH
948
949 _ASUNAME
950 } >&5
951
952 cat >&5 <<EOF
953 ## ------------ ##
954 ## Core tests.  ##
955 ## ------------ ##
956
957 EOF
958
959 # Keep a trace of the command line.
960 # Strip out --no-create and --no-recursion so they do not pile up.
961 # Also quote any args containing shell meta-characters.
962 ac_configure_args=
963 ac_sep=
964 for ac_arg
965 do
966   case $ac_arg in
967   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
968   | --no-cr | --no-c) ;;
969   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
970   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
971   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
972     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
973     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
974     ac_sep=" " ;;
975   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
976      ac_sep=" " ;;
977   esac
978   # Get rid of the leading space.
979 done
980
981 # When interrupted or exit'd, cleanup temporary files, and complete
982 # config.log.  We remove comments because anyway the quotes in there
983 # would cause problems or look ugly.
984 trap 'exit_status=$?
985   # Save into config.log some information that might help in debugging.
986   echo >&5
987   echo "## ----------------- ##" >&5
988   echo "## Cache variables.  ##" >&5
989   echo "## ----------------- ##" >&5
990   echo >&5
991   # The following way of writing the cache mishandles newlines in values,
992 {
993   (set) 2>&1 |
994     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
995     *ac_space=\ *)
996       sed -n \
997         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
998           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
999       ;;
1000     *)
1001       sed -n \
1002         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1003       ;;
1004     esac;
1005 } >&5
1006   sed "/^$/d" confdefs.h >conftest.log
1007   if test -s conftest.log; then
1008     echo >&5
1009     echo "## ------------ ##" >&5
1010     echo "## confdefs.h.  ##" >&5
1011     echo "## ------------ ##" >&5
1012     echo >&5
1013     cat conftest.log >&5
1014   fi
1015   (echo; echo) >&5
1016   test "$ac_signal" != 0 &&
1017     echo "$as_me: caught signal $ac_signal" >&5
1018   echo "$as_me: exit $exit_status" >&5
1019   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1020     exit $exit_status
1021      ' 0
1022 for ac_signal in 1 2 13 15; do
1023   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1024 done
1025 ac_signal=0
1026
1027 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1028 rm -rf conftest* confdefs.h
1029 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1030 echo >confdefs.h
1031
1032 # Let the site file select an alternate cache file if it wants to.
1033 # Prefer explicitly selected file to automatically selected ones.
1034 if test -z "$CONFIG_SITE"; then
1035   if test "x$prefix" != xNONE; then
1036     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1037   else
1038     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1039   fi
1040 fi
1041 for ac_site_file in $CONFIG_SITE; do
1042   if test -r "$ac_site_file"; then
1043     { echo "$as_me:1043: loading site script $ac_site_file" >&5
1044 echo "$as_me: loading site script $ac_site_file" >&6;}
1045     cat "$ac_site_file" >&5
1046     . "$ac_site_file"
1047   fi
1048 done
1049
1050 if test -r "$cache_file"; then
1051   # Some versions of bash will fail to source /dev/null (special
1052   # files actually), so we avoid doing that.
1053   if test -f "$cache_file"; then
1054     { echo "$as_me:1054: loading cache $cache_file" >&5
1055 echo "$as_me: loading cache $cache_file" >&6;}
1056     case $cache_file in
1057       [\\/]* | ?:[\\/]* ) . $cache_file;;
1058       *)                      . ./$cache_file;;
1059     esac
1060   fi
1061 else
1062   { echo "$as_me:1062: creating cache $cache_file" >&5
1063 echo "$as_me: creating cache $cache_file" >&6;}
1064   >$cache_file
1065 fi
1066
1067 # Check that the precious variables saved in the cache have kept the same
1068 # value.
1069 ac_cache_corrupted=false
1070 for ac_var in `(set) 2>&1 |
1071                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1072   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1073   eval ac_new_set=\$ac_env_${ac_var}_set
1074   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1075   eval ac_new_val="\$ac_env_${ac_var}_value"
1076   case $ac_old_set,$ac_new_set in
1077     set,)
1078       { echo "$as_me:1078: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1079 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1080       ac_cache_corrupted=: ;;
1081     ,set)
1082       { echo "$as_me:1082: error: \`$ac_var' was not set in the previous run" >&5
1083 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1084       ac_cache_corrupted=: ;;
1085     ,);;
1086     *)
1087       if test "x$ac_old_val" != "x$ac_new_val"; then
1088         { echo "$as_me:1088: error: \`$ac_var' has changed since the previous run:" >&5
1089 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1090         { echo "$as_me:1090:   former value:  $ac_old_val" >&5
1091 echo "$as_me:   former value:  $ac_old_val" >&2;}
1092         { echo "$as_me:1092:   current value: $ac_new_val" >&5
1093 echo "$as_me:   current value: $ac_new_val" >&2;}
1094         ac_cache_corrupted=:
1095       fi;;
1096   esac
1097   # Pass precious variables to config.status.  It doesn't matter if
1098   # we pass some twice (in addition to the command line arguments).
1099   if test "$ac_new_set" = set; then
1100     case $ac_new_val in
1101     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1102       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1103       ac_configure_args="$ac_configure_args '$ac_arg'"
1104       ;;
1105     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1106        ;;
1107     esac
1108   fi
1109 done
1110 if $ac_cache_corrupted; then
1111   { echo "$as_me:1111: error: changes in the environment can compromise the build" >&5
1112 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1113   { { echo "$as_me:1113: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1114 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1115    { (exit 1); exit 1; }; }
1116 fi
1117
1118 ac_ext=c
1119 ac_cpp='$CPP $CPPFLAGS'
1120 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1121 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1122 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1123 ac_main_return=return
1124
1125 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1126   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1127                    ECHO_T='     ' ;;
1128   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1129   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1130 esac
1131 echo "#! $SHELL" >conftest.sh
1132 echo  "exit 0"   >>conftest.sh
1133 chmod +x conftest.sh
1134 if { (echo "$as_me:1134: PATH=\".;.\"; conftest.sh") >&5
1135   (PATH=".;."; conftest.sh) 2>&5
1136   ac_status=$?
1137   echo "$as_me:1137: \$? = $ac_status" >&5
1138   (exit $ac_status); }; then
1139   ac_path_separator=';'
1140 else
1141   ac_path_separator=:
1142 fi
1143 PATH_SEPARATOR="$ac_path_separator"
1144 rm -f conftest.sh
1145
1146 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1147
1148 top_builddir=`pwd`
1149
1150 echo "$as_me:1150: checking for egrep" >&5
1151 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1152 if test "${ac_cv_prog_egrep+set}" = set; then
1153   echo $ECHO_N "(cached) $ECHO_C" >&6
1154 else
1155   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1156                 then ac_cv_prog_egrep='grep -E'
1157                 else ac_cv_prog_egrep='egrep'
1158         fi
1159 fi
1160 echo "$as_me:1160: result: $ac_cv_prog_egrep" >&5
1161 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1162         EGREP=$ac_cv_prog_egrep
1163
1164         test -z "$EGREP" && { { echo "$as_me:1164: error: No egrep program found" >&5
1165 echo "$as_me: error: No egrep program found" >&2;}
1166    { (exit 1); exit 1; }; }
1167
1168 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1169 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1170 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1171 cf_cv_abi_version=${NCURSES_MAJOR}
1172 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1173 cf_cv_timestamp=`date`
1174 echo "$as_me:1174: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1175 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1176
1177 if test -f $srcdir/VERSION ; then
1178         echo "$as_me:1178: checking for package version" >&5
1179 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1180
1181         # if there are not enough fields, cut returns the last one...
1182         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1183         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1184         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1185
1186         # this is how CF_BUNDLED_INTL uses $VERSION:
1187         VERSION="$cf_field1"
1188
1189         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1190         test -z "$VERSION_MAJOR" && { { echo "$as_me:1190: error: missing major-version" >&5
1191 echo "$as_me: error: missing major-version" >&2;}
1192    { (exit 1); exit 1; }; }
1193
1194         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1195         test -z "$VERSION_MINOR" && { { echo "$as_me:1195: error: missing minor-version" >&5
1196 echo "$as_me: error: missing minor-version" >&2;}
1197    { (exit 1); exit 1; }; }
1198
1199         echo "$as_me:1199: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1200 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1201
1202         echo "$as_me:1202: checking for package patch date" >&5
1203 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1204         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1205         case .$VERSION_PATCH in
1206         (.)
1207                 { { echo "$as_me:1207: error: missing patch-date $VERSION_PATCH" >&5
1208 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1209    { (exit 1); exit 1; }; }
1210                 ;;
1211         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1212                 ;;
1213         (*)
1214                 { { echo "$as_me:1214: error: illegal patch-date $VERSION_PATCH" >&5
1215 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1216    { (exit 1); exit 1; }; }
1217                 ;;
1218         esac
1219         echo "$as_me:1219: result: $VERSION_PATCH" >&5
1220 echo "${ECHO_T}$VERSION_PATCH" >&6
1221 else
1222         { { echo "$as_me:1222: error: did not find $srcdir/VERSION" >&5
1223 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1224    { (exit 1); exit 1; }; }
1225 fi
1226
1227 # show the actual data that we have for versions:
1228 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1229
1230 echo "${as_me:-configure}:1230: testing ABI VERSION $VERSION ..." 1>&5
1231
1232 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1233
1234 echo "${as_me:-configure}:1234: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1235
1236 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1237
1238 echo "${as_me:-configure}:1238: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1239
1240 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1241
1242 echo "${as_me:-configure}:1242: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1243
1244         cf_PACKAGE=NCURSES
1245         PACKAGE=ncurses
1246
1247 cat >>confdefs.h <<EOF
1248 #define PACKAGE "$PACKAGE"
1249 EOF
1250
1251 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1252
1253         cat >>confdefs.h <<EOF
1254 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1255 EOF
1256
1257         cat >>confdefs.h <<EOF
1258 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1259 EOF
1260
1261 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1262
1263 # Check whether --with-rel-version or --without-rel-version was given.
1264 if test "${with_rel_version+set}" = set; then
1265   withval="$with_rel_version"
1266   { echo "$as_me:1266: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1267 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1268  cf_cv_rel_version=$withval
1269 fi;
1270
1271  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1272  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1273
1274 if test -n "$NCURSES_MAJOR" ; then
1275   case $NCURSES_MAJOR in
1276   ([0-9]*)
1277         ;;
1278   (*)
1279         { { echo "$as_me:1279: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1280 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1281    { (exit 1); exit 1; }; }
1282         ;;
1283   esac
1284 else
1285   { { echo "$as_me:1285: error: Release major-version value is empty" >&5
1286 echo "$as_me: error: Release major-version value is empty" >&2;}
1287    { (exit 1); exit 1; }; }
1288 fi
1289
1290 if test -n "$NCURSES_MINOR" ; then
1291   case $NCURSES_MINOR in
1292   ([0-9]*)
1293         ;;
1294   (*)
1295         { { echo "$as_me:1295: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1296 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1297    { (exit 1); exit 1; }; }
1298         ;;
1299   esac
1300 else
1301   { { echo "$as_me:1301: error: Release minor-version value is empty" >&5
1302 echo "$as_me: error: Release minor-version value is empty" >&2;}
1303    { (exit 1); exit 1; }; }
1304 fi
1305
1306 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1307
1308 # Check whether --with-abi-version or --without-abi-version was given.
1309 if test "${with_abi_version+set}" = set; then
1310   withval="$with_abi_version"
1311
1312         if test "x$cf_cv_abi_version" != "x$withval"
1313         then
1314                 { echo "$as_me:1314: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1315 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1316                 case $cf_cv_rel_version in
1317                 (5.*)
1318                         cf_cv_rel_version=$withval.0
1319                         ;;
1320                 (6.*)
1321                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1322                         ;;
1323                 esac
1324         fi
1325         cf_cv_abi_version=$withval
1326 fi;
1327
1328 if test -n "$cf_cv_abi_version" ; then
1329   case $cf_cv_abi_version in
1330   ([0-9]*)
1331         ;;
1332   (*)
1333         { { echo "$as_me:1333: error: ABI version is not a number: $cf_cv_abi_version" >&5
1334 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1335    { (exit 1); exit 1; }; }
1336         ;;
1337   esac
1338 else
1339   { { echo "$as_me:1339: error: ABI version value is empty" >&5
1340 echo "$as_me: error: ABI version value is empty" >&2;}
1341    { (exit 1); exit 1; }; }
1342 fi
1343
1344 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1345 then
1346         case $cf_cv_rel_version in
1347         (5.*)
1348                 cf_cv_rel_version=$with_abi_version.0
1349                 ;;
1350         esac
1351 fi
1352
1353 ac_aux_dir=
1354 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1355   if test -f $ac_dir/install-sh; then
1356     ac_aux_dir=$ac_dir
1357     ac_install_sh="$ac_aux_dir/install-sh -c"
1358     break
1359   elif test -f $ac_dir/install.sh; then
1360     ac_aux_dir=$ac_dir
1361     ac_install_sh="$ac_aux_dir/install.sh -c"
1362     break
1363   elif test -f $ac_dir/shtool; then
1364     ac_aux_dir=$ac_dir
1365     ac_install_sh="$ac_aux_dir/shtool install -c"
1366     break
1367   fi
1368 done
1369 if test -z "$ac_aux_dir"; then
1370   { { echo "$as_me:1370: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1371 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1372    { (exit 1); exit 1; }; }
1373 fi
1374 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1375 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1376 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1377
1378 # Make sure we can run config.sub.
1379 $ac_config_sub sun4 >/dev/null 2>&1 ||
1380   { { echo "$as_me:1380: error: cannot run $ac_config_sub" >&5
1381 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1382    { (exit 1); exit 1; }; }
1383
1384 echo "$as_me:1384: checking build system type" >&5
1385 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1386 if test "${ac_cv_build+set}" = set; then
1387   echo $ECHO_N "(cached) $ECHO_C" >&6
1388 else
1389   ac_cv_build_alias=$build_alias
1390 test -z "$ac_cv_build_alias" &&
1391   ac_cv_build_alias=`$ac_config_guess`
1392 test -z "$ac_cv_build_alias" &&
1393   { { echo "$as_me:1393: error: cannot guess build type; you must specify one" >&5
1394 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1395    { (exit 1); exit 1; }; }
1396 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1397   { { echo "$as_me:1397: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1398 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1399    { (exit 1); exit 1; }; }
1400
1401 fi
1402 echo "$as_me:1402: result: $ac_cv_build" >&5
1403 echo "${ECHO_T}$ac_cv_build" >&6
1404 build=$ac_cv_build
1405 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1406 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1407 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1408
1409 echo "$as_me:1409: checking host system type" >&5
1410 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1411 if test "${ac_cv_host+set}" = set; then
1412   echo $ECHO_N "(cached) $ECHO_C" >&6
1413 else
1414   ac_cv_host_alias=$host_alias
1415 test -z "$ac_cv_host_alias" &&
1416   ac_cv_host_alias=$ac_cv_build_alias
1417 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1418   { { echo "$as_me:1418: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1419 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1420    { (exit 1); exit 1; }; }
1421
1422 fi
1423 echo "$as_me:1423: result: $ac_cv_host" >&5
1424 echo "${ECHO_T}$ac_cv_host" >&6
1425 host=$ac_cv_host
1426 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1427 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1428 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1429
1430 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1431         echo "$as_me:1431: checking target system type" >&5
1432 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1433 if test "${ac_cv_target+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   ac_cv_target_alias=$target_alias
1437 test "x$ac_cv_target_alias" = "x" &&
1438   ac_cv_target_alias=$ac_cv_host_alias
1439 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1440   { { echo "$as_me:1440: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1441 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1442    { (exit 1); exit 1; }; }
1443
1444 fi
1445 echo "$as_me:1445: result: $ac_cv_target" >&5
1446 echo "${ECHO_T}$ac_cv_target" >&6
1447 target=$ac_cv_target
1448 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1449 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1450 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1451
1452 # The aliases save the names the user supplied, while $host etc.
1453 # will get canonicalized.
1454 test -n "$target_alias" &&
1455   test "$program_prefix$program_suffix$program_transform_name" = \
1456     NONENONEs,x,x, &&
1457   program_prefix=${target_alias}-
1458         system_name="$host_os"
1459 else
1460         system_name="`(uname -s -r) 2>/dev/null`"
1461         if test -z "$system_name" ; then
1462                 system_name="`(hostname) 2>/dev/null`"
1463         fi
1464 fi
1465 test -n "$system_name" &&
1466 cat >>confdefs.h <<EOF
1467 #define SYSTEM_NAME "$system_name"
1468 EOF
1469
1470 if test "${cf_cv_system_name+set}" = set; then
1471   echo $ECHO_N "(cached) $ECHO_C" >&6
1472 else
1473   cf_cv_system_name="$system_name"
1474 fi
1475
1476 test -z "$system_name" && system_name="$cf_cv_system_name"
1477 test -n "$cf_cv_system_name" && echo "$as_me:1477: result: Configuring for $cf_cv_system_name" >&5
1478 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1479
1480 if test ".$system_name" != ".$cf_cv_system_name" ; then
1481         echo "$as_me:1481: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1482 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1483         { { echo "$as_me:1483: error: \"Please remove config.cache and try again.\"" >&5
1484 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1485    { (exit 1); exit 1; }; }
1486 fi
1487
1488 # Check whether --with-system-type or --without-system-type was given.
1489 if test "${with_system_type+set}" = set; then
1490   withval="$with_system_type"
1491   { echo "$as_me:1491: WARNING: overriding system type to $withval" >&5
1492 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1493         cf_cv_system_name=$withval
1494         host_os=$withval
1495
1496 fi;
1497
1498 ###     Save the given $CFLAGS to allow user-override.
1499 cf_user_CFLAGS="$CFLAGS"
1500
1501 ###     Default install-location
1502
1503 echo "$as_me:1503: checking for prefix" >&5
1504 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1505 if test "x$prefix" = "xNONE" ; then
1506         case "$cf_cv_system_name" in
1507                 # non-vendor systems don't have a conflict
1508         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1509                 prefix=/usr
1510                 ;;
1511         (*)     prefix=$ac_default_prefix
1512                 ;;
1513         esac
1514 fi
1515 echo "$as_me:1515: result: $prefix" >&5
1516 echo "${ECHO_T}$prefix" >&6
1517
1518 if test "x$prefix" = "xNONE" ; then
1519 echo "$as_me:1519: checking for default include-directory" >&5
1520 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1521 test -n "$verbose" && echo 1>&6
1522 for cf_symbol in \
1523         $includedir \
1524         $includedir/ncurses \
1525         $prefix/include \
1526         $prefix/include/ncurses \
1527         /usr/local/include \
1528         /usr/local/include/ncurses \
1529         /usr/include \
1530         /usr/include/ncurses
1531 do
1532         cf_dir=`eval echo $cf_symbol`
1533         if test -f $cf_dir/curses.h ; then
1534         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1535                 includedir="$cf_symbol"
1536                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1537                 break
1538         fi
1539         fi
1540         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1541 done
1542 echo "$as_me:1542: result: $includedir" >&5
1543 echo "${ECHO_T}$includedir" >&6
1544 fi
1545
1546 ### Defaults for ncurses ABI
1547
1548 case x$cf_cv_abi_version in
1549 (x[6789])
1550         cf_dft_ext_colors=yes
1551         cf_dft_ext_const=yes
1552         cf_dft_ext_mouse=yes
1553         cf_dft_ext_putwin=yes
1554         cf_dft_ext_spfuncs=yes
1555         cf_dft_filter_syms=yes
1556         cf_dft_chtype=uint32_t
1557         cf_dft_mmask_t=uint32_t
1558         cf_dft_interop=yes
1559         cf_dft_tparm_arg=intptr_t
1560         cf_dft_with_lp64=yes
1561         ;;
1562 (*)
1563         cf_dft_ext_colors=no
1564         cf_dft_ext_const=no
1565         cf_dft_ext_mouse=no
1566         cf_dft_ext_putwin=no
1567         cf_dft_ext_spfuncs=no
1568         cf_dft_filter_syms=no
1569         cf_dft_chtype=auto
1570         cf_dft_mmask_t=auto
1571         cf_dft_interop=no
1572         cf_dft_tparm_arg=long
1573         cf_dft_with_lp64=no
1574         ;;
1575 esac
1576
1577 ###     Checks for programs.
1578
1579 # Check whether --with-ada or --without-ada was given.
1580 if test "${with_ada+set}" = set; then
1581   withval="$with_ada"
1582   cf_with_ada=$withval
1583 else
1584   cf_with_ada=yes
1585 fi;
1586 if test "x$cf_with_ada" = xyes
1587 then
1588         cf_PROG_CC="gnatgcc gcc cc"
1589 else
1590         cf_PROG_CC="gcc cc"
1591 fi
1592
1593 ac_ext=c
1594 ac_cpp='$CPP $CPPFLAGS'
1595 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1596 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1597 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1598 ac_main_return=return
1599 if test -n "$ac_tool_prefix"; then
1600   for ac_prog in $cf_PROG_CC
1601   do
1602     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1603 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1604 echo "$as_me:1604: checking for $ac_word" >&5
1605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1606 if test "${ac_cv_prog_CC+set}" = set; then
1607   echo $ECHO_N "(cached) $ECHO_C" >&6
1608 else
1609   if test -n "$CC"; then
1610   ac_cv_prog_CC="$CC" # Let the user override the test.
1611 else
1612   ac_save_IFS=$IFS; IFS=$ac_path_separator
1613 ac_dummy="$PATH"
1614 for ac_dir in $ac_dummy; do
1615   IFS=$ac_save_IFS
1616   test -z "$ac_dir" && ac_dir=.
1617   $as_executable_p "$ac_dir/$ac_word" || continue
1618 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1619 echo "$as_me:1619: found $ac_dir/$ac_word" >&5
1620 break
1621 done
1622
1623 fi
1624 fi
1625 CC=$ac_cv_prog_CC
1626 if test -n "$CC"; then
1627   echo "$as_me:1627: result: $CC" >&5
1628 echo "${ECHO_T}$CC" >&6
1629 else
1630   echo "$as_me:1630: result: no" >&5
1631 echo "${ECHO_T}no" >&6
1632 fi
1633
1634     test -n "$CC" && break
1635   done
1636 fi
1637 if test -z "$CC"; then
1638   ac_ct_CC=$CC
1639   for ac_prog in $cf_PROG_CC
1640 do
1641   # Extract the first word of "$ac_prog", so it can be a program name with args.
1642 set dummy $ac_prog; ac_word=$2
1643 echo "$as_me:1643: checking for $ac_word" >&5
1644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1645 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1646   echo $ECHO_N "(cached) $ECHO_C" >&6
1647 else
1648   if test -n "$ac_ct_CC"; then
1649   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1650 else
1651   ac_save_IFS=$IFS; IFS=$ac_path_separator
1652 ac_dummy="$PATH"
1653 for ac_dir in $ac_dummy; do
1654   IFS=$ac_save_IFS
1655   test -z "$ac_dir" && ac_dir=.
1656   $as_executable_p "$ac_dir/$ac_word" || continue
1657 ac_cv_prog_ac_ct_CC="$ac_prog"
1658 echo "$as_me:1658: found $ac_dir/$ac_word" >&5
1659 break
1660 done
1661
1662 fi
1663 fi
1664 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1665 if test -n "$ac_ct_CC"; then
1666   echo "$as_me:1666: result: $ac_ct_CC" >&5
1667 echo "${ECHO_T}$ac_ct_CC" >&6
1668 else
1669   echo "$as_me:1669: result: no" >&5
1670 echo "${ECHO_T}no" >&6
1671 fi
1672
1673   test -n "$ac_ct_CC" && break
1674 done
1675
1676   CC=$ac_ct_CC
1677 fi
1678
1679 test -z "$CC" && { { echo "$as_me:1679: error: no acceptable cc found in \$PATH" >&5
1680 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1681    { (exit 1); exit 1; }; }
1682
1683 # Provide some information about the compiler.
1684 echo "$as_me:1684:" \
1685      "checking for C compiler version" >&5
1686 ac_compiler=`set X $ac_compile; echo $2`
1687 { (eval echo "$as_me:1687: \"$ac_compiler --version </dev/null >&5\"") >&5
1688   (eval $ac_compiler --version </dev/null >&5) 2>&5
1689   ac_status=$?
1690   echo "$as_me:1690: \$? = $ac_status" >&5
1691   (exit $ac_status); }
1692 { (eval echo "$as_me:1692: \"$ac_compiler -v </dev/null >&5\"") >&5
1693   (eval $ac_compiler -v </dev/null >&5) 2>&5
1694   ac_status=$?
1695   echo "$as_me:1695: \$? = $ac_status" >&5
1696   (exit $ac_status); }
1697 { (eval echo "$as_me:1697: \"$ac_compiler -V </dev/null >&5\"") >&5
1698   (eval $ac_compiler -V </dev/null >&5) 2>&5
1699   ac_status=$?
1700   echo "$as_me:1700: \$? = $ac_status" >&5
1701   (exit $ac_status); }
1702
1703 cat >conftest.$ac_ext <<_ACEOF
1704 #line 1704 "configure"
1705 #include "confdefs.h"
1706
1707 int
1708 main (void)
1709 {
1710
1711   ;
1712   return 0;
1713 }
1714 _ACEOF
1715 ac_clean_files_save=$ac_clean_files
1716 ac_clean_files="$ac_clean_files a.out a.exe"
1717 # Try to create an executable without -o first, disregard a.out.
1718 # It will help us diagnose broken compilers, and finding out an intuition
1719 # of exeext.
1720 echo "$as_me:1720: checking for C compiler default output" >&5
1721 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1722 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1723 if { (eval echo "$as_me:1723: \"$ac_link_default\"") >&5
1724   (eval $ac_link_default) 2>&5
1725   ac_status=$?
1726   echo "$as_me:1726: \$? = $ac_status" >&5
1727   (exit $ac_status); }; then
1728   # Find the output, starting from the most likely.  This scheme is
1729 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1730 # resort.
1731 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1732                 ls a.out conftest 2>/dev/null;
1733                 ls a.* conftest.* 2>/dev/null`; do
1734   case $ac_file in
1735     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1736     a.out ) # We found the default executable, but exeext='' is most
1737             # certainly right.
1738             break;;
1739     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1740           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1741           export ac_cv_exeext
1742           break;;
1743     * ) break;;
1744   esac
1745 done
1746 else
1747   echo "$as_me: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1749 { { echo "$as_me:1749: error: C compiler cannot create executables" >&5
1750 echo "$as_me: error: C compiler cannot create executables" >&2;}
1751    { (exit 77); exit 77; }; }
1752 fi
1753
1754 ac_exeext=$ac_cv_exeext
1755 echo "$as_me:1755: result: $ac_file" >&5
1756 echo "${ECHO_T}$ac_file" >&6
1757
1758 # Check the compiler produces executables we can run.  If not, either
1759 # the compiler is broken, or we cross compile.
1760 echo "$as_me:1760: checking whether the C compiler works" >&5
1761 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1762 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1763 # If not cross compiling, check that we can run a simple program.
1764 if test "$cross_compiling" != yes; then
1765   if { ac_try='./$ac_file'
1766   { (eval echo "$as_me:1766: \"$ac_try\"") >&5
1767   (eval $ac_try) 2>&5
1768   ac_status=$?
1769   echo "$as_me:1769: \$? = $ac_status" >&5
1770   (exit $ac_status); }; }; then
1771     cross_compiling=no
1772   else
1773     if test "$cross_compiling" = maybe; then
1774         cross_compiling=yes
1775     else
1776         { { echo "$as_me:1776: error: cannot run C compiled programs.
1777 If you meant to cross compile, use \`--host'." >&5
1778 echo "$as_me: error: cannot run C compiled programs.
1779 If you meant to cross compile, use \`--host'." >&2;}
1780    { (exit 1); exit 1; }; }
1781     fi
1782   fi
1783 fi
1784 echo "$as_me:1784: result: yes" >&5
1785 echo "${ECHO_T}yes" >&6
1786
1787 rm -f a.out a.exe conftest$ac_cv_exeext
1788 ac_clean_files=$ac_clean_files_save
1789 # Check the compiler produces executables we can run.  If not, either
1790 # the compiler is broken, or we cross compile.
1791 echo "$as_me:1791: checking whether we are cross compiling" >&5
1792 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1793 echo "$as_me:1793: result: $cross_compiling" >&5
1794 echo "${ECHO_T}$cross_compiling" >&6
1795
1796 echo "$as_me:1796: checking for executable suffix" >&5
1797 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1798 if { (eval echo "$as_me:1798: \"$ac_link\"") >&5
1799   (eval $ac_link) 2>&5
1800   ac_status=$?
1801   echo "$as_me:1801: \$? = $ac_status" >&5
1802   (exit $ac_status); }; then
1803   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1804 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1805 # work properly (i.e., refer to `conftest.exe'), while it won't with
1806 # `rm'.
1807 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1808   case $ac_file in
1809     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1810     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1811           export ac_cv_exeext
1812           break;;
1813     * ) break;;
1814   esac
1815 done
1816 else
1817   { { echo "$as_me:1817: error: cannot compute EXEEXT: cannot compile and link" >&5
1818 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1819    { (exit 1); exit 1; }; }
1820 fi
1821
1822 rm -f conftest$ac_cv_exeext
1823 echo "$as_me:1823: result: $ac_cv_exeext" >&5
1824 echo "${ECHO_T}$ac_cv_exeext" >&6
1825
1826 rm -f conftest.$ac_ext
1827 EXEEXT=$ac_cv_exeext
1828 ac_exeext=$EXEEXT
1829 echo "$as_me:1829: checking for object suffix" >&5
1830 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1831 if test "${ac_cv_objext+set}" = set; then
1832   echo $ECHO_N "(cached) $ECHO_C" >&6
1833 else
1834   cat >conftest.$ac_ext <<_ACEOF
1835 #line 1835 "configure"
1836 #include "confdefs.h"
1837
1838 int
1839 main (void)
1840 {
1841
1842   ;
1843   return 0;
1844 }
1845 _ACEOF
1846 rm -f conftest.o conftest.obj
1847 if { (eval echo "$as_me:1847: \"$ac_compile\"") >&5
1848   (eval $ac_compile) 2>&5
1849   ac_status=$?
1850   echo "$as_me:1850: \$? = $ac_status" >&5
1851   (exit $ac_status); }; then
1852   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1853   case $ac_file in
1854     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1855     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1856        break;;
1857   esac
1858 done
1859 else
1860   echo "$as_me: failed program was:" >&5
1861 cat conftest.$ac_ext >&5
1862 { { echo "$as_me:1862: error: cannot compute OBJEXT: cannot compile" >&5
1863 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1864    { (exit 1); exit 1; }; }
1865 fi
1866
1867 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1868 fi
1869 echo "$as_me:1869: result: $ac_cv_objext" >&5
1870 echo "${ECHO_T}$ac_cv_objext" >&6
1871 OBJEXT=$ac_cv_objext
1872 ac_objext=$OBJEXT
1873 echo "$as_me:1873: checking whether we are using the GNU C compiler" >&5
1874 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1875 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1876   echo $ECHO_N "(cached) $ECHO_C" >&6
1877 else
1878   cat >conftest.$ac_ext <<_ACEOF
1879 #line 1879 "configure"
1880 #include "confdefs.h"
1881
1882 int
1883 main (void)
1884 {
1885 #ifndef __GNUC__
1886        choke me
1887 #endif
1888
1889   ;
1890   return 0;
1891 }
1892 _ACEOF
1893 rm -f conftest.$ac_objext
1894 if { (eval echo "$as_me:1894: \"$ac_compile\"") >&5
1895   (eval $ac_compile) 2>&5
1896   ac_status=$?
1897   echo "$as_me:1897: \$? = $ac_status" >&5
1898   (exit $ac_status); } &&
1899          { ac_try='test -s conftest.$ac_objext'
1900   { (eval echo "$as_me:1900: \"$ac_try\"") >&5
1901   (eval $ac_try) 2>&5
1902   ac_status=$?
1903   echo "$as_me:1903: \$? = $ac_status" >&5
1904   (exit $ac_status); }; }; then
1905   ac_compiler_gnu=yes
1906 else
1907   echo "$as_me: failed program was:" >&5
1908 cat conftest.$ac_ext >&5
1909 ac_compiler_gnu=no
1910 fi
1911 rm -f conftest.$ac_objext conftest.$ac_ext
1912 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1913
1914 fi
1915 echo "$as_me:1915: result: $ac_cv_c_compiler_gnu" >&5
1916 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1917 GCC=`test $ac_compiler_gnu = yes && echo yes`
1918 ac_test_CFLAGS=${CFLAGS+set}
1919 ac_save_CFLAGS=$CFLAGS
1920 CFLAGS="-g"
1921 echo "$as_me:1921: checking whether $CC accepts -g" >&5
1922 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1923 if test "${ac_cv_prog_cc_g+set}" = set; then
1924   echo $ECHO_N "(cached) $ECHO_C" >&6
1925 else
1926   cat >conftest.$ac_ext <<_ACEOF
1927 #line 1927 "configure"
1928 #include "confdefs.h"
1929
1930 int
1931 main (void)
1932 {
1933
1934   ;
1935   return 0;
1936 }
1937 _ACEOF
1938 rm -f conftest.$ac_objext
1939 if { (eval echo "$as_me:1939: \"$ac_compile\"") >&5
1940   (eval $ac_compile) 2>&5
1941   ac_status=$?
1942   echo "$as_me:1942: \$? = $ac_status" >&5
1943   (exit $ac_status); } &&
1944          { ac_try='test -s conftest.$ac_objext'
1945   { (eval echo "$as_me:1945: \"$ac_try\"") >&5
1946   (eval $ac_try) 2>&5
1947   ac_status=$?
1948   echo "$as_me:1948: \$? = $ac_status" >&5
1949   (exit $ac_status); }; }; then
1950   ac_cv_prog_cc_g=yes
1951 else
1952   echo "$as_me: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1954 ac_cv_prog_cc_g=no
1955 fi
1956 rm -f conftest.$ac_objext conftest.$ac_ext
1957 fi
1958 echo "$as_me:1958: result: $ac_cv_prog_cc_g" >&5
1959 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1960 if test "$ac_test_CFLAGS" = set; then
1961   CFLAGS=$ac_save_CFLAGS
1962 elif test $ac_cv_prog_cc_g = yes; then
1963   if test "$GCC" = yes; then
1964     CFLAGS="-g -O2"
1965   else
1966     CFLAGS="-g"
1967   fi
1968 else
1969   if test "$GCC" = yes; then
1970     CFLAGS="-O2"
1971   else
1972     CFLAGS=
1973   fi
1974 fi
1975 # Some people use a C++ compiler to compile C.  Since we use `exit',
1976 # in C++ we need to declare it.  In case someone uses the same compiler
1977 # for both compiling C and C++ we need to have the C++ compiler decide
1978 # the declaration of exit, since it's the most demanding environment.
1979 cat >conftest.$ac_ext <<_ACEOF
1980 #ifndef __cplusplus
1981   choke me
1982 #endif
1983 _ACEOF
1984 rm -f conftest.$ac_objext
1985 if { (eval echo "$as_me:1985: \"$ac_compile\"") >&5
1986   (eval $ac_compile) 2>&5
1987   ac_status=$?
1988   echo "$as_me:1988: \$? = $ac_status" >&5
1989   (exit $ac_status); } &&
1990          { ac_try='test -s conftest.$ac_objext'
1991   { (eval echo "$as_me:1991: \"$ac_try\"") >&5
1992   (eval $ac_try) 2>&5
1993   ac_status=$?
1994   echo "$as_me:1994: \$? = $ac_status" >&5
1995   (exit $ac_status); }; }; then
1996   for ac_declaration in \
1997    ''\
1998    '#include <stdlib.h>' \
1999    'extern "C" void std::exit (int) throw (); using std::exit;' \
2000    'extern "C" void std::exit (int); using std::exit;' \
2001    'extern "C" void exit (int) throw ();' \
2002    'extern "C" void exit (int);' \
2003    'void exit (int);'
2004 do
2005   cat >conftest.$ac_ext <<_ACEOF
2006 #line 2006 "configure"
2007 #include "confdefs.h"
2008 #include <stdlib.h>
2009 $ac_declaration
2010 int
2011 main (void)
2012 {
2013 exit (42);
2014   ;
2015   return 0;
2016 }
2017 _ACEOF
2018 rm -f conftest.$ac_objext
2019 if { (eval echo "$as_me:2019: \"$ac_compile\"") >&5
2020   (eval $ac_compile) 2>&5
2021   ac_status=$?
2022   echo "$as_me:2022: \$? = $ac_status" >&5
2023   (exit $ac_status); } &&
2024          { ac_try='test -s conftest.$ac_objext'
2025   { (eval echo "$as_me:2025: \"$ac_try\"") >&5
2026   (eval $ac_try) 2>&5
2027   ac_status=$?
2028   echo "$as_me:2028: \$? = $ac_status" >&5
2029   (exit $ac_status); }; }; then
2030   :
2031 else
2032   echo "$as_me: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2034 continue
2035 fi
2036 rm -f conftest.$ac_objext conftest.$ac_ext
2037   cat >conftest.$ac_ext <<_ACEOF
2038 #line 2038 "configure"
2039 #include "confdefs.h"
2040 $ac_declaration
2041 int
2042 main (void)
2043 {
2044 exit (42);
2045   ;
2046   return 0;
2047 }
2048 _ACEOF
2049 rm -f conftest.$ac_objext
2050 if { (eval echo "$as_me:2050: \"$ac_compile\"") >&5
2051   (eval $ac_compile) 2>&5
2052   ac_status=$?
2053   echo "$as_me:2053: \$? = $ac_status" >&5
2054   (exit $ac_status); } &&
2055          { ac_try='test -s conftest.$ac_objext'
2056   { (eval echo "$as_me:2056: \"$ac_try\"") >&5
2057   (eval $ac_try) 2>&5
2058   ac_status=$?
2059   echo "$as_me:2059: \$? = $ac_status" >&5
2060   (exit $ac_status); }; }; then
2061   break
2062 else
2063   echo "$as_me: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 fi
2066 rm -f conftest.$ac_objext conftest.$ac_ext
2067 done
2068 rm -rf conftest*
2069 if test -n "$ac_declaration"; then
2070   echo '#ifdef __cplusplus' >>confdefs.h
2071   echo $ac_declaration      >>confdefs.h
2072   echo '#endif'             >>confdefs.h
2073 fi
2074
2075 else
2076   echo "$as_me: failed program was:" >&5
2077 cat conftest.$ac_ext >&5
2078 fi
2079 rm -f conftest.$ac_objext conftest.$ac_ext
2080 ac_ext=c
2081 ac_cpp='$CPP $CPPFLAGS'
2082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2085 ac_main_return=return
2086
2087 GCC_VERSION=none
2088 if test "$GCC" = yes ; then
2089         echo "$as_me:2089: checking version of $CC" >&5
2090 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2091         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.].*//'`"
2092         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2093         echo "$as_me:2093: result: $GCC_VERSION" >&5
2094 echo "${ECHO_T}$GCC_VERSION" >&6
2095 fi
2096
2097 echo "$as_me:2097: checking for $CC option to accept ANSI C" >&5
2098 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2099 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2100   echo $ECHO_N "(cached) $ECHO_C" >&6
2101 else
2102   ac_cv_prog_cc_stdc=no
2103 ac_save_CC=$CC
2104 cat >conftest.$ac_ext <<_ACEOF
2105 #line 2105 "configure"
2106 #include "confdefs.h"
2107 #include <stdarg.h>
2108 #include <stdio.h>
2109 #include <sys/types.h>
2110 #include <sys/stat.h>
2111 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2112 struct buf { int x; };
2113 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2114 static char *e (p, i)
2115      char **p;
2116      int i;
2117 {
2118   return p[i];
2119 }
2120 static char *f (char * (*g) (char **, int), char **p, ...)
2121 {
2122   char *s;
2123   va_list v;
2124   va_start (v,p);
2125   s = g (p, va_arg (v,int));
2126   va_end (v);
2127   return s;
2128 }
2129 int test (int i, double x);
2130 struct s1 {int (*f) (int a);};
2131 struct s2 {int (*f) (double a);};
2132 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2133 int argc;
2134 char **argv;
2135 int
2136 main (void)
2137 {
2138 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2139   ;
2140   return 0;
2141 }
2142 _ACEOF
2143 # Don't try gcc -ansi; that turns off useful extensions and
2144 # breaks some systems' header files.
2145 # AIX                   -qlanglvl=ansi
2146 # Ultrix and OSF/1      -std1
2147 # HP-UX 10.20 and later -Ae
2148 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2149 # SVR4                  -Xc -D__EXTENSIONS__
2150 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2151 do
2152   CC="$ac_save_CC $ac_arg"
2153   rm -f conftest.$ac_objext
2154 if { (eval echo "$as_me:2154: \"$ac_compile\"") >&5
2155   (eval $ac_compile) 2>&5
2156   ac_status=$?
2157   echo "$as_me:2157: \$? = $ac_status" >&5
2158   (exit $ac_status); } &&
2159          { ac_try='test -s conftest.$ac_objext'
2160   { (eval echo "$as_me:2160: \"$ac_try\"") >&5
2161   (eval $ac_try) 2>&5
2162   ac_status=$?
2163   echo "$as_me:2163: \$? = $ac_status" >&5
2164   (exit $ac_status); }; }; then
2165   ac_cv_prog_cc_stdc=$ac_arg
2166 break
2167 else
2168   echo "$as_me: failed program was:" >&5
2169 cat conftest.$ac_ext >&5
2170 fi
2171 rm -f conftest.$ac_objext
2172 done
2173 rm -f conftest.$ac_ext conftest.$ac_objext
2174 CC=$ac_save_CC
2175
2176 fi
2177
2178 case "x$ac_cv_prog_cc_stdc" in
2179   x|xno)
2180     echo "$as_me:2180: result: none needed" >&5
2181 echo "${ECHO_T}none needed" >&6 ;;
2182   *)
2183     echo "$as_me:2183: result: $ac_cv_prog_cc_stdc" >&5
2184 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2185     CC="$CC $ac_cv_prog_cc_stdc" ;;
2186 esac
2187
2188 # This should have been defined by AC_PROG_CC
2189 : ${CC:=cc}
2190
2191 echo "$as_me:2191: checking \$CC variable" >&5
2192 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2193 case "$CC" in
2194 (*[\ \  ]-*)
2195         echo "$as_me:2195: result: broken" >&5
2196 echo "${ECHO_T}broken" >&6
2197         { echo "$as_me:2197: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2198 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2199         # humor him...
2200         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2201         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2202         CC="$cf_prog"
2203         for cf_arg in $cf_flags
2204         do
2205                 case "x$cf_arg" in
2206                 (x-[IUDfgOW]*)
2207
2208 cf_fix_cppflags=no
2209 cf_new_cflags=
2210 cf_new_cppflags=
2211 cf_new_extra_cppflags=
2212
2213 for cf_add_cflags in $cf_arg
2214 do
2215 case $cf_fix_cppflags in
2216 (no)
2217         case $cf_add_cflags in
2218         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2219                 case $cf_add_cflags in
2220                 (-D*)
2221                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2222
2223                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2224                                 && test -z "${cf_tst_cflags}" \
2225                                 && cf_fix_cppflags=yes
2226
2227                         if test $cf_fix_cppflags = yes ; then
2228
2229         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2230         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2231
2232                                 continue
2233                         elif test "${cf_tst_cflags}" = "\"'" ; then
2234
2235         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2236         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2237
2238                                 continue
2239                         fi
2240                         ;;
2241                 esac
2242                 case "$CPPFLAGS" in
2243                 (*$cf_add_cflags)
2244                         ;;
2245                 (*)
2246                         case $cf_add_cflags in
2247                         (-D*)
2248                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2249
2250 CPPFLAGS=`echo "$CPPFLAGS" | \
2251         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2252                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2253
2254                                 ;;
2255                         esac
2256
2257         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2258         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2259
2260                         ;;
2261                 esac
2262                 ;;
2263         (*)
2264
2265         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2266         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2267
2268                 ;;
2269         esac
2270         ;;
2271 (yes)
2272
2273         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2274         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2275
2276         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2277
2278         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2279                 && test -z "${cf_tst_cflags}" \
2280                 && cf_fix_cppflags=no
2281         ;;
2282 esac
2283 done
2284
2285 if test -n "$cf_new_cflags" ; then
2286
2287         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2288         CFLAGS="${CFLAGS}$cf_new_cflags"
2289
2290 fi
2291
2292 if test -n "$cf_new_cppflags" ; then
2293
2294         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2295         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2296
2297 fi
2298
2299 if test -n "$cf_new_extra_cppflags" ; then
2300
2301         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2302         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2303
2304 fi
2305
2306                         ;;
2307                 (*)
2308                         CC="$CC $cf_arg"
2309                         ;;
2310                 esac
2311         done
2312         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2313
2314 echo "${as_me:-configure}:2314: testing resulting CC: '$CC' ..." 1>&5
2315
2316         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2317
2318 echo "${as_me:-configure}:2318: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2319
2320         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2321
2322 echo "${as_me:-configure}:2322: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2323
2324         ;;
2325 (*)
2326         echo "$as_me:2326: result: ok" >&5
2327 echo "${ECHO_T}ok" >&6
2328         ;;
2329 esac
2330
2331 ac_ext=c
2332 ac_cpp='$CPP $CPPFLAGS'
2333 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2334 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2335 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2336 ac_main_return=return
2337 echo "$as_me:2337: checking how to run the C preprocessor" >&5
2338 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2339 # On Suns, sometimes $CPP names a directory.
2340 if test -n "$CPP" && test -d "$CPP"; then
2341   CPP=
2342 fi
2343 if test -z "$CPP"; then
2344   if test "${ac_cv_prog_CPP+set}" = set; then
2345   echo $ECHO_N "(cached) $ECHO_C" >&6
2346 else
2347       # Double quotes because CPP needs to be expanded
2348     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2349     do
2350       ac_preproc_ok=false
2351 for ac_c_preproc_warn_flag in '' yes
2352 do
2353   # Use a header file that comes with gcc, so configuring glibc
2354   # with a fresh cross-compiler works.
2355   # On the NeXT, cc -E runs the code through the compiler's parser,
2356   # not just through cpp. "Syntax error" is here to catch this case.
2357   cat >conftest.$ac_ext <<_ACEOF
2358 #line 2358 "configure"
2359 #include "confdefs.h"
2360 #include <assert.h>
2361                      Syntax error
2362 _ACEOF
2363 if { (eval echo "$as_me:2363: \"$ac_cpp conftest.$ac_ext\"") >&5
2364   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2365   ac_status=$?
2366   egrep -v '^ *\+' conftest.er1 >conftest.err
2367   rm -f conftest.er1
2368   cat conftest.err >&5
2369   echo "$as_me:2369: \$? = $ac_status" >&5
2370   (exit $ac_status); } >/dev/null; then
2371   if test -s conftest.err; then
2372     ac_cpp_err=$ac_c_preproc_warn_flag
2373   else
2374     ac_cpp_err=
2375   fi
2376 else
2377   ac_cpp_err=yes
2378 fi
2379 if test -z "$ac_cpp_err"; then
2380   :
2381 else
2382   echo "$as_me: failed program was:" >&5
2383   cat conftest.$ac_ext >&5
2384   # Broken: fails on valid input.
2385 continue
2386 fi
2387 rm -f conftest.err conftest.$ac_ext
2388
2389   # OK, works on sane cases.  Now check whether non-existent headers
2390   # can be detected and how.
2391   cat >conftest.$ac_ext <<_ACEOF
2392 #line 2392 "configure"
2393 #include "confdefs.h"
2394 #include <ac_nonexistent.h>
2395 _ACEOF
2396 if { (eval echo "$as_me:2396: \"$ac_cpp conftest.$ac_ext\"") >&5
2397   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2398   ac_status=$?
2399   egrep -v '^ *\+' conftest.er1 >conftest.err
2400   rm -f conftest.er1
2401   cat conftest.err >&5
2402   echo "$as_me:2402: \$? = $ac_status" >&5
2403   (exit $ac_status); } >/dev/null; then
2404   if test -s conftest.err; then
2405     ac_cpp_err=$ac_c_preproc_warn_flag
2406   else
2407     ac_cpp_err=
2408   fi
2409 else
2410   ac_cpp_err=yes
2411 fi
2412 if test -z "$ac_cpp_err"; then
2413   # Broken: success on invalid input.
2414 continue
2415 else
2416   echo "$as_me: failed program was:" >&5
2417   cat conftest.$ac_ext >&5
2418   # Passes both tests.
2419 ac_preproc_ok=:
2420 break
2421 fi
2422 rm -f conftest.err conftest.$ac_ext
2423
2424 done
2425 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2426 rm -f conftest.err conftest.$ac_ext
2427 if $ac_preproc_ok; then
2428   break
2429 fi
2430
2431     done
2432     ac_cv_prog_CPP=$CPP
2433
2434 fi
2435   CPP=$ac_cv_prog_CPP
2436 else
2437   ac_cv_prog_CPP=$CPP
2438 fi
2439 echo "$as_me:2439: result: $CPP" >&5
2440 echo "${ECHO_T}$CPP" >&6
2441 ac_preproc_ok=false
2442 for ac_c_preproc_warn_flag in '' yes
2443 do
2444   # Use a header file that comes with gcc, so configuring glibc
2445   # with a fresh cross-compiler works.
2446   # On the NeXT, cc -E runs the code through the compiler's parser,
2447   # not just through cpp. "Syntax error" is here to catch this case.
2448   cat >conftest.$ac_ext <<_ACEOF
2449 #line 2449 "configure"
2450 #include "confdefs.h"
2451 #include <assert.h>
2452                      Syntax error
2453 _ACEOF
2454 if { (eval echo "$as_me:2454: \"$ac_cpp conftest.$ac_ext\"") >&5
2455   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2456   ac_status=$?
2457   egrep -v '^ *\+' conftest.er1 >conftest.err
2458   rm -f conftest.er1
2459   cat conftest.err >&5
2460   echo "$as_me:2460: \$? = $ac_status" >&5
2461   (exit $ac_status); } >/dev/null; then
2462   if test -s conftest.err; then
2463     ac_cpp_err=$ac_c_preproc_warn_flag
2464   else
2465     ac_cpp_err=
2466   fi
2467 else
2468   ac_cpp_err=yes
2469 fi
2470 if test -z "$ac_cpp_err"; then
2471   :
2472 else
2473   echo "$as_me: failed program was:" >&5
2474   cat conftest.$ac_ext >&5
2475   # Broken: fails on valid input.
2476 continue
2477 fi
2478 rm -f conftest.err conftest.$ac_ext
2479
2480   # OK, works on sane cases.  Now check whether non-existent headers
2481   # can be detected and how.
2482   cat >conftest.$ac_ext <<_ACEOF
2483 #line 2483 "configure"
2484 #include "confdefs.h"
2485 #include <ac_nonexistent.h>
2486 _ACEOF
2487 if { (eval echo "$as_me:2487: \"$ac_cpp conftest.$ac_ext\"") >&5
2488   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2489   ac_status=$?
2490   egrep -v '^ *\+' conftest.er1 >conftest.err
2491   rm -f conftest.er1
2492   cat conftest.err >&5
2493   echo "$as_me:2493: \$? = $ac_status" >&5
2494   (exit $ac_status); } >/dev/null; then
2495   if test -s conftest.err; then
2496     ac_cpp_err=$ac_c_preproc_warn_flag
2497   else
2498     ac_cpp_err=
2499   fi
2500 else
2501   ac_cpp_err=yes
2502 fi
2503 if test -z "$ac_cpp_err"; then
2504   # Broken: success on invalid input.
2505 continue
2506 else
2507   echo "$as_me: failed program was:" >&5
2508   cat conftest.$ac_ext >&5
2509   # Passes both tests.
2510 ac_preproc_ok=:
2511 break
2512 fi
2513 rm -f conftest.err conftest.$ac_ext
2514
2515 done
2516 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2517 rm -f conftest.err conftest.$ac_ext
2518 if $ac_preproc_ok; then
2519   :
2520 else
2521   { { echo "$as_me:2521: error: C preprocessor \"$CPP\" fails sanity check" >&5
2522 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2523    { (exit 1); exit 1; }; }
2524 fi
2525
2526 ac_ext=c
2527 ac_cpp='$CPP $CPPFLAGS'
2528 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2529 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2530 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2531 ac_main_return=return
2532
2533 if test $ac_cv_c_compiler_gnu = yes; then
2534     echo "$as_me:2534: checking whether $CC needs -traditional" >&5
2535 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2536 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2537   echo $ECHO_N "(cached) $ECHO_C" >&6
2538 else
2539     ac_pattern="Autoconf.*'x'"
2540   cat >conftest.$ac_ext <<_ACEOF
2541 #line 2541 "configure"
2542 #include "confdefs.h"
2543 #include <sgtty.h>
2544 int Autoconf = TIOCGETP;
2545 _ACEOF
2546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2547   egrep "$ac_pattern" >/dev/null 2>&1; then
2548   ac_cv_prog_gcc_traditional=yes
2549 else
2550   ac_cv_prog_gcc_traditional=no
2551 fi
2552 rm -rf conftest*
2553
2554   if test $ac_cv_prog_gcc_traditional = no; then
2555     cat >conftest.$ac_ext <<_ACEOF
2556 #line 2556 "configure"
2557 #include "confdefs.h"
2558 #include <termio.h>
2559 int Autoconf = TCGETA;
2560 _ACEOF
2561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2562   egrep "$ac_pattern" >/dev/null 2>&1; then
2563   ac_cv_prog_gcc_traditional=yes
2564 fi
2565 rm -rf conftest*
2566
2567   fi
2568 fi
2569 echo "$as_me:2569: result: $ac_cv_prog_gcc_traditional" >&5
2570 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2571   if test $ac_cv_prog_gcc_traditional = yes; then
2572     CC="$CC -traditional"
2573   fi
2574 fi
2575
2576 echo "$as_me:2576: checking whether $CC understands -c and -o together" >&5
2577 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2578 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2579   echo $ECHO_N "(cached) $ECHO_C" >&6
2580 else
2581
2582 cat > conftest.$ac_ext <<CF_EOF
2583 int main(void)
2584 {
2585         ${cf_cv_main_return:-return}(0);
2586 }
2587 CF_EOF
2588 # We do the test twice because some compilers refuse to overwrite an
2589 # existing .o file with -o, though they will create one.
2590 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2591 if { (eval echo "$as_me:2591: \"$ac_try\"") >&5
2592   (eval $ac_try) 2>&5
2593   ac_status=$?
2594   echo "$as_me:2594: \$? = $ac_status" >&5
2595   (exit $ac_status); } &&
2596   test -f conftest2.$ac_objext && { (eval echo "$as_me:2596: \"$ac_try\"") >&5
2597   (eval $ac_try) 2>&5
2598   ac_status=$?
2599   echo "$as_me:2599: \$? = $ac_status" >&5
2600   (exit $ac_status); };
2601 then
2602   eval cf_cv_prog_CC_c_o=yes
2603 else
2604   eval cf_cv_prog_CC_c_o=no
2605 fi
2606 rm -rf conftest*
2607
2608 fi
2609 if test $cf_cv_prog_CC_c_o = yes; then
2610   echo "$as_me:2610: result: yes" >&5
2611 echo "${ECHO_T}yes" >&6
2612 else
2613   echo "$as_me:2613: result: no" >&5
2614 echo "${ECHO_T}no" >&6
2615 fi
2616
2617 if test "$cross_compiling" = yes ; then
2618         LDCONFIG=:
2619 else
2620         case "$cf_cv_system_name" in
2621         (dragonfly*|mirbsd*|freebsd*)
2622                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2623                 ;;
2624         (*) LDPATH=$PATH:/sbin:/usr/sbin
2625                 # Extract the first word of "ldconfig", so it can be a program name with args.
2626 set dummy ldconfig; ac_word=$2
2627 echo "$as_me:2627: checking for $ac_word" >&5
2628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2629 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2630   echo $ECHO_N "(cached) $ECHO_C" >&6
2631 else
2632   case $LDCONFIG in
2633   [\\/]* | ?:[\\/]*)
2634   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2635   ;;
2636   *)
2637   ac_save_IFS=$IFS; IFS=$ac_path_separator
2638 ac_dummy="$LDPATH"
2639 for ac_dir in $ac_dummy; do
2640   IFS=$ac_save_IFS
2641   test -z "$ac_dir" && ac_dir=.
2642   if $as_executable_p "$ac_dir/$ac_word"; then
2643    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2644    echo "$as_me:2644: found $ac_dir/$ac_word" >&5
2645    break
2646 fi
2647 done
2648
2649   ;;
2650 esac
2651 fi
2652 LDCONFIG=$ac_cv_path_LDCONFIG
2653
2654 if test -n "$LDCONFIG"; then
2655   echo "$as_me:2655: result: $LDCONFIG" >&5
2656 echo "${ECHO_T}$LDCONFIG" >&6
2657 else
2658   echo "$as_me:2658: result: no" >&5
2659 echo "${ECHO_T}no" >&6
2660 fi
2661
2662                 ;;
2663         esac
2664 fi
2665
2666 echo "$as_me:2666: checking if you want to ensure bool is consistent with C++" >&5
2667 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2668
2669 # Check whether --with-cxx or --without-cxx was given.
2670 if test "${with_cxx+set}" = set; then
2671   withval="$with_cxx"
2672   cf_with_cxx=$withval
2673 else
2674   cf_with_cxx=yes
2675 fi;
2676 echo "$as_me:2676: result: $cf_with_cxx" >&5
2677 echo "${ECHO_T}$cf_with_cxx" >&6
2678 if test "X$cf_with_cxx" = Xno ; then
2679         CXX=""
2680         GXX=""
2681 else
2682         # with autoconf 2.13, we can change the error to a warning:
2683                 ac_ext=cc
2684 ac_cpp='$CXXCPP $CPPFLAGS'
2685 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2688 ac_main_return=return
2689 if test -n "$ac_tool_prefix"; then
2690   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2691   do
2692     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2693 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2694 echo "$as_me:2694: checking for $ac_word" >&5
2695 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2696 if test "${ac_cv_prog_CXX+set}" = set; then
2697   echo $ECHO_N "(cached) $ECHO_C" >&6
2698 else
2699   if test -n "$CXX"; then
2700   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2701 else
2702   ac_save_IFS=$IFS; IFS=$ac_path_separator
2703 ac_dummy="$PATH"
2704 for ac_dir in $ac_dummy; do
2705   IFS=$ac_save_IFS
2706   test -z "$ac_dir" && ac_dir=.
2707   $as_executable_p "$ac_dir/$ac_word" || continue
2708 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2709 echo "$as_me:2709: found $ac_dir/$ac_word" >&5
2710 break
2711 done
2712
2713 fi
2714 fi
2715 CXX=$ac_cv_prog_CXX
2716 if test -n "$CXX"; then
2717   echo "$as_me:2717: result: $CXX" >&5
2718 echo "${ECHO_T}$CXX" >&6
2719 else
2720   echo "$as_me:2720: result: no" >&5
2721 echo "${ECHO_T}no" >&6
2722 fi
2723
2724     test -n "$CXX" && break
2725   done
2726 fi
2727 if test -z "$CXX"; then
2728   ac_ct_CXX=$CXX
2729   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2730 do
2731   # Extract the first word of "$ac_prog", so it can be a program name with args.
2732 set dummy $ac_prog; ac_word=$2
2733 echo "$as_me:2733: checking for $ac_word" >&5
2734 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2735 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2736   echo $ECHO_N "(cached) $ECHO_C" >&6
2737 else
2738   if test -n "$ac_ct_CXX"; then
2739   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2740 else
2741   ac_save_IFS=$IFS; IFS=$ac_path_separator
2742 ac_dummy="$PATH"
2743 for ac_dir in $ac_dummy; do
2744   IFS=$ac_save_IFS
2745   test -z "$ac_dir" && ac_dir=.
2746   $as_executable_p "$ac_dir/$ac_word" || continue
2747 ac_cv_prog_ac_ct_CXX="$ac_prog"
2748 echo "$as_me:2748: found $ac_dir/$ac_word" >&5
2749 break
2750 done
2751
2752 fi
2753 fi
2754 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2755 if test -n "$ac_ct_CXX"; then
2756   echo "$as_me:2756: result: $ac_ct_CXX" >&5
2757 echo "${ECHO_T}$ac_ct_CXX" >&6
2758 else
2759   echo "$as_me:2759: result: no" >&5
2760 echo "${ECHO_T}no" >&6
2761 fi
2762
2763   test -n "$ac_ct_CXX" && break
2764 done
2765 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2766
2767   CXX=$ac_ct_CXX
2768 fi
2769
2770 # Provide some information about the compiler.
2771 echo "$as_me:2771:" \
2772      "checking for C++ compiler version" >&5
2773 ac_compiler=`set X $ac_compile; echo $2`
2774 { (eval echo "$as_me:2774: \"$ac_compiler --version </dev/null >&5\"") >&5
2775   (eval $ac_compiler --version </dev/null >&5) 2>&5
2776   ac_status=$?
2777   echo "$as_me:2777: \$? = $ac_status" >&5
2778   (exit $ac_status); }
2779 { (eval echo "$as_me:2779: \"$ac_compiler -v </dev/null >&5\"") >&5
2780   (eval $ac_compiler -v </dev/null >&5) 2>&5
2781   ac_status=$?
2782   echo "$as_me:2782: \$? = $ac_status" >&5
2783   (exit $ac_status); }
2784 { (eval echo "$as_me:2784: \"$ac_compiler -V </dev/null >&5\"") >&5
2785   (eval $ac_compiler -V </dev/null >&5) 2>&5
2786   ac_status=$?
2787   echo "$as_me:2787: \$? = $ac_status" >&5
2788   (exit $ac_status); }
2789
2790 echo "$as_me:2790: checking whether we are using the GNU C++ compiler" >&5
2791 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2792 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2793   echo $ECHO_N "(cached) $ECHO_C" >&6
2794 else
2795   cat >conftest.$ac_ext <<_ACEOF
2796 #line 2796 "configure"
2797 #include "confdefs.h"
2798
2799 int
2800 main (void)
2801 {
2802 #ifndef __GNUC__
2803        choke me
2804 #endif
2805
2806   ;
2807   return 0;
2808 }
2809 _ACEOF
2810 rm -f conftest.$ac_objext
2811 if { (eval echo "$as_me:2811: \"$ac_compile\"") >&5
2812   (eval $ac_compile) 2>&5
2813   ac_status=$?
2814   echo "$as_me:2814: \$? = $ac_status" >&5
2815   (exit $ac_status); } &&
2816          { ac_try='test -s conftest.$ac_objext'
2817   { (eval echo "$as_me:2817: \"$ac_try\"") >&5
2818   (eval $ac_try) 2>&5
2819   ac_status=$?
2820   echo "$as_me:2820: \$? = $ac_status" >&5
2821   (exit $ac_status); }; }; then
2822   ac_compiler_gnu=yes
2823 else
2824   echo "$as_me: failed program was:" >&5
2825 cat conftest.$ac_ext >&5
2826 ac_compiler_gnu=no
2827 fi
2828 rm -f conftest.$ac_objext conftest.$ac_ext
2829 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2830
2831 fi
2832 echo "$as_me:2832: result: $ac_cv_cxx_compiler_gnu" >&5
2833 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2834 GXX=`test $ac_compiler_gnu = yes && echo yes`
2835 ac_test_CXXFLAGS=${CXXFLAGS+set}
2836 ac_save_CXXFLAGS=$CXXFLAGS
2837 CXXFLAGS="-g"
2838 echo "$as_me:2838: checking whether $CXX accepts -g" >&5
2839 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2840 if test "${ac_cv_prog_cxx_g+set}" = set; then
2841   echo $ECHO_N "(cached) $ECHO_C" >&6
2842 else
2843   cat >conftest.$ac_ext <<_ACEOF
2844 #line 2844 "configure"
2845 #include "confdefs.h"
2846
2847 int
2848 main (void)
2849 {
2850
2851   ;
2852   return 0;
2853 }
2854 _ACEOF
2855 rm -f conftest.$ac_objext
2856 if { (eval echo "$as_me:2856: \"$ac_compile\"") >&5
2857   (eval $ac_compile) 2>&5
2858   ac_status=$?
2859   echo "$as_me:2859: \$? = $ac_status" >&5
2860   (exit $ac_status); } &&
2861          { ac_try='test -s conftest.$ac_objext'
2862   { (eval echo "$as_me:2862: \"$ac_try\"") >&5
2863   (eval $ac_try) 2>&5
2864   ac_status=$?
2865   echo "$as_me:2865: \$? = $ac_status" >&5
2866   (exit $ac_status); }; }; then
2867   ac_cv_prog_cxx_g=yes
2868 else
2869   echo "$as_me: failed program was:" >&5
2870 cat conftest.$ac_ext >&5
2871 ac_cv_prog_cxx_g=no
2872 fi
2873 rm -f conftest.$ac_objext conftest.$ac_ext
2874 fi
2875 echo "$as_me:2875: result: $ac_cv_prog_cxx_g" >&5
2876 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2877 if test "$ac_test_CXXFLAGS" = set; then
2878   CXXFLAGS=$ac_save_CXXFLAGS
2879 elif test $ac_cv_prog_cxx_g = yes; then
2880   if test "$GXX" = yes; then
2881     CXXFLAGS="-g -O2"
2882   else
2883     CXXFLAGS="-g"
2884   fi
2885 else
2886   if test "$GXX" = yes; then
2887     CXXFLAGS="-O2"
2888   else
2889     CXXFLAGS=
2890   fi
2891 fi
2892 for ac_declaration in \
2893    ''\
2894    '#include <stdlib.h>' \
2895    'extern "C" void std::exit (int) throw (); using std::exit;' \
2896    'extern "C" void std::exit (int); using std::exit;' \
2897    'extern "C" void exit (int) throw ();' \
2898    'extern "C" void exit (int);' \
2899    'void exit (int);'
2900 do
2901   cat >conftest.$ac_ext <<_ACEOF
2902 #line 2902 "configure"
2903 #include "confdefs.h"
2904 #include <stdlib.h>
2905 $ac_declaration
2906 int
2907 main (void)
2908 {
2909 exit (42);
2910   ;
2911   return 0;
2912 }
2913 _ACEOF
2914 rm -f conftest.$ac_objext
2915 if { (eval echo "$as_me:2915: \"$ac_compile\"") >&5
2916   (eval $ac_compile) 2>&5
2917   ac_status=$?
2918   echo "$as_me:2918: \$? = $ac_status" >&5
2919   (exit $ac_status); } &&
2920          { ac_try='test -s conftest.$ac_objext'
2921   { (eval echo "$as_me:2921: \"$ac_try\"") >&5
2922   (eval $ac_try) 2>&5
2923   ac_status=$?
2924   echo "$as_me:2924: \$? = $ac_status" >&5
2925   (exit $ac_status); }; }; then
2926   :
2927 else
2928   echo "$as_me: failed program was:" >&5
2929 cat conftest.$ac_ext >&5
2930 continue
2931 fi
2932 rm -f conftest.$ac_objext conftest.$ac_ext
2933   cat >conftest.$ac_ext <<_ACEOF
2934 #line 2934 "configure"
2935 #include "confdefs.h"
2936 $ac_declaration
2937 int
2938 main (void)
2939 {
2940 exit (42);
2941   ;
2942   return 0;
2943 }
2944 _ACEOF
2945 rm -f conftest.$ac_objext
2946 if { (eval echo "$as_me:2946: \"$ac_compile\"") >&5
2947   (eval $ac_compile) 2>&5
2948   ac_status=$?
2949   echo "$as_me:2949: \$? = $ac_status" >&5
2950   (exit $ac_status); } &&
2951          { ac_try='test -s conftest.$ac_objext'
2952   { (eval echo "$as_me:2952: \"$ac_try\"") >&5
2953   (eval $ac_try) 2>&5
2954   ac_status=$?
2955   echo "$as_me:2955: \$? = $ac_status" >&5
2956   (exit $ac_status); }; }; then
2957   break
2958 else
2959   echo "$as_me: failed program was:" >&5
2960 cat conftest.$ac_ext >&5
2961 fi
2962 rm -f conftest.$ac_objext conftest.$ac_ext
2963 done
2964 rm -rf conftest*
2965 if test -n "$ac_declaration"; then
2966   echo '#ifdef __cplusplus' >>confdefs.h
2967   echo $ac_declaration      >>confdefs.h
2968   echo '#endif'             >>confdefs.h
2969 fi
2970
2971 ac_ext=c
2972 ac_cpp='$CPP $CPPFLAGS'
2973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2976 ac_main_return=return
2977
2978         ac_ext=cc
2979 ac_cpp='$CXXCPP $CPPFLAGS'
2980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2983 ac_main_return=return
2984
2985         if test "x$cf_with_cxx" != xno
2986         then
2987                 # Several of the C++ configurations do not work, particularly when
2988                 # cross-compiling (20140913 -TD)
2989                 echo "$as_me:2989: checking if $CXX works" >&5
2990 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2991
2992                 save_CPPFLAGS="$CPPFLAGS"
2993                 eval cf_includedir=${includedir}
2994                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2995
2996 cat >conftest.$ac_ext <<_ACEOF
2997 #line 2997 "configure"
2998 #include "confdefs.h"
2999
3000 #include <stdlib.h>
3001 #include <stdio.h>
3002
3003 int
3004 main (void)
3005 {
3006
3007                 printf("Hello world!\n")
3008
3009   ;
3010   return 0;
3011 }
3012 _ACEOF
3013 rm -f conftest.$ac_objext
3014 if { (eval echo "$as_me:3014: \"$ac_compile\"") >&5
3015   (eval $ac_compile) 2>&5
3016   ac_status=$?
3017   echo "$as_me:3017: \$? = $ac_status" >&5
3018   (exit $ac_status); } &&
3019          { ac_try='test -s conftest.$ac_objext'
3020   { (eval echo "$as_me:3020: \"$ac_try\"") >&5
3021   (eval $ac_try) 2>&5
3022   ac_status=$?
3023   echo "$as_me:3023: \$? = $ac_status" >&5
3024   (exit $ac_status); }; }; then
3025   cf_cxx_works=yes
3026 else
3027   echo "$as_me: failed program was:" >&5
3028 cat conftest.$ac_ext >&5
3029 cf_cxx_works=no
3030 fi
3031 rm -f conftest.$ac_objext conftest.$ac_ext
3032                 CPPFLAGS="$save_CPPFLAGS"
3033
3034                 echo "$as_me:3034: result: $cf_cxx_works" >&5
3035 echo "${ECHO_T}$cf_cxx_works" >&6
3036                 if test "x$cf_cxx_works" = xno
3037                 then
3038                         { echo "$as_me:3038: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3039 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3040                         cf_with_cxx=no; CXX=""; GXX="";
3041                 fi
3042         fi
3043         ac_ext=c
3044 ac_cpp='$CPP $CPPFLAGS'
3045 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3046 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3047 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3048 ac_main_return=return
3049
3050         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3051         if test "$CXX" = "g++" ; then
3052                 # Extract the first word of "g++", so it can be a program name with args.
3053 set dummy g++; ac_word=$2
3054 echo "$as_me:3054: checking for $ac_word" >&5
3055 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3056 if test "${ac_cv_path_CXX+set}" = set; then
3057   echo $ECHO_N "(cached) $ECHO_C" >&6
3058 else
3059   case $CXX in
3060   [\\/]* | ?:[\\/]*)
3061   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3062   ;;
3063   *)
3064   ac_save_IFS=$IFS; IFS=$ac_path_separator
3065 ac_dummy="$PATH"
3066 for ac_dir in $ac_dummy; do
3067   IFS=$ac_save_IFS
3068   test -z "$ac_dir" && ac_dir=.
3069   if $as_executable_p "$ac_dir/$ac_word"; then
3070    ac_cv_path_CXX="$ac_dir/$ac_word"
3071    echo "$as_me:3071: found $ac_dir/$ac_word" >&5
3072    break
3073 fi
3074 done
3075
3076   ;;
3077 esac
3078 fi
3079 CXX=$ac_cv_path_CXX
3080
3081 if test -n "$CXX"; then
3082   echo "$as_me:3082: result: $CXX" >&5
3083 echo "${ECHO_T}$CXX" >&6
3084 else
3085   echo "$as_me:3085: result: no" >&5
3086 echo "${ECHO_T}no" >&6
3087 fi
3088
3089         fi
3090         case "x$CXX" in
3091         (x|xg++)
3092                 { echo "$as_me:3092: WARNING: You don't have any C++ compiler, too bad" >&5
3093 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3094                 cf_with_cxx=no; CXX=""; GXX="";
3095                 ;;
3096         esac
3097 fi
3098
3099 GXX_VERSION=none
3100 if test "$GXX" = yes; then
3101         echo "$as_me:3101: checking version of ${CXX:-g++}" >&5
3102 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3103         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3104         if test -z "$GXX_VERSION"
3105         then
3106                 GXX_VERSION=unknown
3107                 GXX=no
3108         fi
3109         echo "$as_me:3109: result: $GXX_VERSION" >&5
3110 echo "${ECHO_T}$GXX_VERSION" >&6
3111 fi
3112
3113 case $GXX_VERSION in
3114 (1*|2.[0-6]*)
3115         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3116         # cf_cxx_library=no
3117         { echo "$as_me:3117: WARNING: templates do not work" >&5
3118 echo "$as_me: WARNING: templates do not work" >&2;}
3119         ;;
3120 esac
3121
3122 echo "$as_me:3122: checking if you want to build C++ binding and demo" >&5
3123 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3124
3125 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3126 if test "${with_cxx_binding+set}" = set; then
3127   withval="$with_cxx_binding"
3128   cf_with_cxx_binding=$withval
3129 else
3130   cf_with_cxx_binding=$cf_with_cxx
3131 fi;
3132 echo "$as_me:3132: result: $cf_with_cxx_binding" >&5
3133 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3134
3135 echo "$as_me:3135: checking if you want to build with Ada95" >&5
3136 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3137 echo "$as_me:3137: result: $cf_with_ada" >&5
3138 echo "${ECHO_T}$cf_with_ada" >&6
3139
3140 echo "$as_me:3140: checking if you want to install terminal database" >&5
3141 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3142
3143 # Check whether --enable-db-install or --disable-db-install was given.
3144 if test "${enable_db_install+set}" = set; then
3145   enableval="$enable_db_install"
3146   cf_with_db_install=$enableval
3147 else
3148   cf_with_db_install=yes
3149 fi;
3150 echo "$as_me:3150: result: $cf_with_db_install" >&5
3151 echo "${ECHO_T}$cf_with_db_install" >&6
3152
3153 echo "$as_me:3153: checking if you want to install manpages" >&5
3154 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3155
3156 # Check whether --with-manpages or --without-manpages was given.
3157 if test "${with_manpages+set}" = set; then
3158   withval="$with_manpages"
3159   cf_with_manpages=$withval
3160 else
3161   cf_with_manpages=yes
3162 fi;
3163 echo "$as_me:3163: result: $cf_with_manpages" >&5
3164 echo "${ECHO_T}$cf_with_manpages" >&6
3165
3166 echo "$as_me:3166: checking if you want to build programs such as tic" >&5
3167 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3168
3169 # Check whether --with-progs or --without-progs was given.
3170 if test "${with_progs+set}" = set; then
3171   withval="$with_progs"
3172   cf_with_progs=$withval
3173 else
3174   cf_with_progs=yes
3175 fi;
3176 echo "$as_me:3176: result: $cf_with_progs" >&5
3177 echo "${ECHO_T}$cf_with_progs" >&6
3178
3179 if test -f $srcdir/tack/tack.h; then
3180         if test "x$cross_compiling" = xyes ; then
3181                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3182
3183 echo "${as_me:-configure}:3183: testing ignoring tack because we are cross-compiling ..." 1>&5
3184
3185                 cf_with_tack=no
3186         else
3187                 echo "$as_me:3187: checking if you want to build the tack program" >&5
3188 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3189
3190 # Check whether --with-tack or --without-tack was given.
3191 if test "${with_tack+set}" = set; then
3192   withval="$with_tack"
3193   cf_with_tack=$withval
3194 else
3195   cf_with_tack=$cf_with_progs
3196 fi;
3197                 echo "$as_me:3197: result: $cf_with_tack" >&5
3198 echo "${ECHO_T}$cf_with_tack" >&6
3199         fi
3200 else
3201         cf_with_tack=no
3202 fi
3203
3204 echo "$as_me:3204: checking if you want to build test-programs" >&5
3205 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3206
3207 # Check whether --with-tests or --without-tests was given.
3208 if test "${with_tests+set}" = set; then
3209   withval="$with_tests"
3210   cf_with_tests=$withval
3211 else
3212   cf_with_tests=yes
3213 fi;
3214 echo "$as_me:3214: result: $cf_with_tests" >&5
3215 echo "${ECHO_T}$cf_with_tests" >&6
3216
3217 echo "$as_me:3217: checking if you wish to install curses.h" >&5
3218 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3219
3220 # Check whether --with-curses-h or --without-curses-h was given.
3221 if test "${with_curses_h+set}" = set; then
3222   withval="$with_curses_h"
3223   with_curses_h=$withval
3224 else
3225   with_curses_h=yes
3226 fi;
3227 echo "$as_me:3227: result: $with_curses_h" >&5
3228 echo "${ECHO_T}$with_curses_h" >&6
3229
3230 modules_to_build="ncurses"
3231 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3232 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3233 modules_to_build="$modules_to_build panel menu form"
3234
3235 test "$program_prefix" != NONE &&
3236   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3237 # Use a double $ so make ignores it.
3238 test "$program_suffix" != NONE &&
3239   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3240 # Double any \ or $.  echo might interpret backslashes.
3241 # By default was `s,x,x', remove it if useless.
3242 cat <<\_ACEOF >conftest.sed
3243 s/[\\$]/&&/g;s/;s,x,x,$//
3244 _ACEOF
3245 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3246 rm conftest.sed
3247
3248 for ac_prog in mawk gawk nawk awk
3249 do
3250   # Extract the first word of "$ac_prog", so it can be a program name with args.
3251 set dummy $ac_prog; ac_word=$2
3252 echo "$as_me:3252: checking for $ac_word" >&5
3253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3254 if test "${ac_cv_prog_AWK+set}" = set; then
3255   echo $ECHO_N "(cached) $ECHO_C" >&6
3256 else
3257   if test -n "$AWK"; then
3258   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3259 else
3260   ac_save_IFS=$IFS; IFS=$ac_path_separator
3261 ac_dummy="$PATH"
3262 for ac_dir in $ac_dummy; do
3263   IFS=$ac_save_IFS
3264   test -z "$ac_dir" && ac_dir=.
3265   $as_executable_p "$ac_dir/$ac_word" || continue
3266 ac_cv_prog_AWK="$ac_prog"
3267 echo "$as_me:3267: found $ac_dir/$ac_word" >&5
3268 break
3269 done
3270
3271 fi
3272 fi
3273 AWK=$ac_cv_prog_AWK
3274 if test -n "$AWK"; then
3275   echo "$as_me:3275: result: $AWK" >&5
3276 echo "${ECHO_T}$AWK" >&6
3277 else
3278   echo "$as_me:3278: result: no" >&5
3279 echo "${ECHO_T}no" >&6
3280 fi
3281
3282   test -n "$AWK" && break
3283 done
3284
3285 test -z "$AWK" && { { echo "$as_me:3285: error: No awk program found" >&5
3286 echo "$as_me: error: No awk program found" >&2;}
3287    { (exit 1); exit 1; }; }
3288
3289 echo "$as_me:3289: checking for egrep" >&5
3290 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3291 if test "${ac_cv_prog_egrep+set}" = set; then
3292   echo $ECHO_N "(cached) $ECHO_C" >&6
3293 else
3294   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3295                 then ac_cv_prog_egrep='grep -E'
3296                 else ac_cv_prog_egrep='egrep'
3297         fi
3298 fi
3299 echo "$as_me:3299: result: $ac_cv_prog_egrep" >&5
3300 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3301         EGREP=$ac_cv_prog_egrep
3302
3303         test -z "$EGREP" && { { echo "$as_me:3303: error: No egrep program found" >&5
3304 echo "$as_me: error: No egrep program found" >&2;}
3305    { (exit 1); exit 1; }; }
3306
3307 # Find a good install program.  We prefer a C program (faster),
3308 # so one script is as good as another.  But avoid the broken or
3309 # incompatible versions:
3310 # SysV /etc/install, /usr/sbin/install
3311 # SunOS /usr/etc/install
3312 # IRIX /sbin/install
3313 # AIX /bin/install
3314 # AmigaOS /C/install, which installs bootblocks on floppy discs
3315 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3316 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3317 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3318 # ./install, which can be erroneously created by make from ./install.sh.
3319 echo "$as_me:3319: checking for a BSD compatible install" >&5
3320 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3321 if test -z "$INSTALL"; then
3322 if test "${ac_cv_path_install+set}" = set; then
3323   echo $ECHO_N "(cached) $ECHO_C" >&6
3324 else
3325     ac_save_IFS=$IFS; IFS=$ac_path_separator
3326   for ac_dir in $PATH; do
3327     IFS=$ac_save_IFS
3328     # Account for people who put trailing slashes in PATH elements.
3329     case $ac_dir/ in
3330     / | ./ | .// | /cC/* \
3331     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3332     | /usr/ucb/* ) ;;
3333     *)
3334       # OSF1 and SCO ODT 3.0 have their own names for install.
3335       # Don't use installbsd from OSF since it installs stuff as root
3336       # by default.
3337       for ac_prog in ginstall scoinst install; do
3338         if $as_executable_p "$ac_dir/$ac_prog"; then
3339           if test $ac_prog = install &&
3340             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3341             # AIX install.  It has an incompatible calling convention.
3342             :
3343           elif test $ac_prog = install &&
3344             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3345             # program-specific install script used by HP pwplus--don't use.
3346             :
3347           else
3348             ac_cv_path_install="$ac_dir/$ac_prog -c"
3349             break 2
3350           fi
3351         fi
3352       done
3353       ;;
3354     esac
3355   done
3356
3357 fi
3358   if test "${ac_cv_path_install+set}" = set; then
3359     INSTALL=$ac_cv_path_install
3360   else
3361     # As a last resort, use the slow shell script.  We don't cache a
3362     # path for INSTALL within a source directory, because that will
3363     # break other packages using the cache if that directory is
3364     # removed, or if the path is relative.
3365     INSTALL=$ac_install_sh
3366   fi
3367 fi
3368 echo "$as_me:3368: result: $INSTALL" >&5
3369 echo "${ECHO_T}$INSTALL" >&6
3370
3371 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3372 # It thinks the first close brace ends the variable substitution.
3373 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3374
3375 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3376
3377 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3378
3379 case $INSTALL in
3380 (/*)
3381         ;;
3382 (*)
3383         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3384         test -z "$cf_dir" && cf_dir=.
3385         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3386         ;;
3387 esac
3388
3389 for ac_prog in lint cppcheck splint
3390 do
3391   # Extract the first word of "$ac_prog", so it can be a program name with args.
3392 set dummy $ac_prog; ac_word=$2
3393 echo "$as_me:3393: checking for $ac_word" >&5
3394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3395 if test "${ac_cv_prog_LINT+set}" = set; then
3396   echo $ECHO_N "(cached) $ECHO_C" >&6
3397 else
3398   if test -n "$LINT"; then
3399   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3400 else
3401   ac_save_IFS=$IFS; IFS=$ac_path_separator
3402 ac_dummy="$PATH"
3403 for ac_dir in $ac_dummy; do
3404   IFS=$ac_save_IFS
3405   test -z "$ac_dir" && ac_dir=.
3406   $as_executable_p "$ac_dir/$ac_word" || continue
3407 ac_cv_prog_LINT="$ac_prog"
3408 echo "$as_me:3408: found $ac_dir/$ac_word" >&5
3409 break
3410 done
3411
3412 fi
3413 fi
3414 LINT=$ac_cv_prog_LINT
3415 if test -n "$LINT"; then
3416   echo "$as_me:3416: result: $LINT" >&5
3417 echo "${ECHO_T}$LINT" >&6
3418 else
3419   echo "$as_me:3419: result: no" >&5
3420 echo "${ECHO_T}no" >&6
3421 fi
3422
3423   test -n "$LINT" && break
3424 done
3425
3426 echo "$as_me:3426: checking whether ln -s works" >&5
3427 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3428 LN_S=$as_ln_s
3429 if test "$LN_S" = "ln -s"; then
3430   echo "$as_me:3430: result: yes" >&5
3431 echo "${ECHO_T}yes" >&6
3432 else
3433   echo "$as_me:3433: result: no, using $LN_S" >&5
3434 echo "${ECHO_T}no, using $LN_S" >&6
3435 fi
3436
3437 echo "$as_me:3437: checking if $LN_S -f options work" >&5
3438 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3439
3440 rm -f conf$$.src conf$$dst
3441 echo >conf$$.dst
3442 echo first >conf$$.src
3443 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3444         cf_prog_ln_sf=yes
3445 else
3446         cf_prog_ln_sf=no
3447 fi
3448 rm -f conf$$.dst conf$$src
3449 echo "$as_me:3449: result: $cf_prog_ln_sf" >&5
3450 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3451
3452 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3453
3454 echo "$as_me:3454: checking for long file names" >&5
3455 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3456 if test "${ac_cv_sys_long_file_names+set}" = set; then
3457   echo $ECHO_N "(cached) $ECHO_C" >&6
3458 else
3459   ac_cv_sys_long_file_names=yes
3460 # Test for long file names in all the places we know might matter:
3461 #      .                the current directory, where building will happen
3462 #      $prefix/lib      where we will be installing things
3463 #      $exec_prefix/lib likewise
3464 # eval it to expand exec_prefix.
3465 #      $TMPDIR          if set, where it might want to write temporary files
3466 # if $TMPDIR is not set:
3467 #      /tmp             where it might want to write temporary files
3468 #      /var/tmp         likewise
3469 #      /usr/tmp         likewise
3470 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3471   ac_tmpdirs=$TMPDIR
3472 else
3473   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3474 fi
3475 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3476   test -d $ac_dir || continue
3477   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3478   ac_xdir=$ac_dir/cf$$
3479   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3480   ac_tf1=$ac_xdir/conftest9012345
3481   ac_tf2=$ac_xdir/conftest9012346
3482   (echo 1 >$ac_tf1) 2>/dev/null
3483   (echo 2 >$ac_tf2) 2>/dev/null
3484   ac_val=`cat $ac_tf1 2>/dev/null`
3485   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3486     ac_cv_sys_long_file_names=no
3487     rm -rf $ac_xdir 2>/dev/null
3488     break
3489   fi
3490   rm -rf $ac_xdir 2>/dev/null
3491 done
3492 fi
3493 echo "$as_me:3493: result: $ac_cv_sys_long_file_names" >&5
3494 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3495 if test $ac_cv_sys_long_file_names = yes; then
3496
3497 cat >>confdefs.h <<\EOF
3498 #define HAVE_LONG_FILE_NAMES 1
3499 EOF
3500
3501 fi
3502
3503 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3504 # of package conflict.
3505 cf_config_suffix=
3506
3507 # Check whether --with-config-suffix or --without-config-suffix was given.
3508 if test "${with_config_suffix+set}" = set; then
3509   withval="$with_config_suffix"
3510   case "x$withval" in
3511         (xyes|xno)
3512                 { echo "$as_me:3512: WARNING: expected a value for config-suffix option" >&5
3513 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3514                 ;;
3515         (*)     cf_config_suffix="$withval"
3516                 ;;
3517         esac
3518 fi;
3519
3520 # If we find pkg-config, check if we should install the ".pc" files.
3521
3522 echo "$as_me:3522: checking if you want to use pkg-config" >&5
3523 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3524
3525 # Check whether --with-pkg-config or --without-pkg-config was given.
3526 if test "${with_pkg_config+set}" = set; then
3527   withval="$with_pkg_config"
3528   cf_pkg_config=$withval
3529 else
3530   cf_pkg_config=yes
3531 fi;
3532 echo "$as_me:3532: result: $cf_pkg_config" >&5
3533 echo "${ECHO_T}$cf_pkg_config" >&6
3534
3535 case $cf_pkg_config in
3536 (no)
3537         PKG_CONFIG=none
3538         ;;
3539 (yes)
3540
3541 if test -n "$ac_tool_prefix"; then
3542   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3543 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3544 echo "$as_me:3544: checking for $ac_word" >&5
3545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3546 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3547   echo $ECHO_N "(cached) $ECHO_C" >&6
3548 else
3549   case $PKG_CONFIG in
3550   [\\/]* | ?:[\\/]*)
3551   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3552   ;;
3553   *)
3554   ac_save_IFS=$IFS; IFS=$ac_path_separator
3555 ac_dummy="$PATH"
3556 for ac_dir in $ac_dummy; do
3557   IFS=$ac_save_IFS
3558   test -z "$ac_dir" && ac_dir=.
3559   if $as_executable_p "$ac_dir/$ac_word"; then
3560    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3561    echo "$as_me:3561: found $ac_dir/$ac_word" >&5
3562    break
3563 fi
3564 done
3565
3566   ;;
3567 esac
3568 fi
3569 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3570
3571 if test -n "$PKG_CONFIG"; then
3572   echo "$as_me:3572: result: $PKG_CONFIG" >&5
3573 echo "${ECHO_T}$PKG_CONFIG" >&6
3574 else
3575   echo "$as_me:3575: result: no" >&5
3576 echo "${ECHO_T}no" >&6
3577 fi
3578
3579 fi
3580 if test -z "$ac_cv_path_PKG_CONFIG"; then
3581   ac_pt_PKG_CONFIG=$PKG_CONFIG
3582   # Extract the first word of "pkg-config", so it can be a program name with args.
3583 set dummy pkg-config; ac_word=$2
3584 echo "$as_me:3584: checking for $ac_word" >&5
3585 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3586 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3587   echo $ECHO_N "(cached) $ECHO_C" >&6
3588 else
3589   case $ac_pt_PKG_CONFIG in
3590   [\\/]* | ?:[\\/]*)
3591   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3592   ;;
3593   *)
3594   ac_save_IFS=$IFS; IFS=$ac_path_separator
3595 ac_dummy="$PATH"
3596 for ac_dir in $ac_dummy; do
3597   IFS=$ac_save_IFS
3598   test -z "$ac_dir" && ac_dir=.
3599   if $as_executable_p "$ac_dir/$ac_word"; then
3600    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3601    echo "$as_me:3601: found $ac_dir/$ac_word" >&5
3602    break
3603 fi
3604 done
3605
3606   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3607   ;;
3608 esac
3609 fi
3610 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3611
3612 if test -n "$ac_pt_PKG_CONFIG"; then
3613   echo "$as_me:3613: result: $ac_pt_PKG_CONFIG" >&5
3614 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3615 else
3616   echo "$as_me:3616: result: no" >&5
3617 echo "${ECHO_T}no" >&6
3618 fi
3619
3620   PKG_CONFIG=$ac_pt_PKG_CONFIG
3621 else
3622   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3623 fi
3624
3625         ;;
3626 (*)
3627         PKG_CONFIG=$withval
3628         ;;
3629 esac
3630
3631 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3632 if test "$PKG_CONFIG" != none ; then
3633
3634 if test "x$prefix" != xNONE; then
3635         cf_path_syntax="$prefix"
3636 else
3637         cf_path_syntax="$ac_default_prefix"
3638 fi
3639
3640 case ".$PKG_CONFIG" in
3641 (.\$\(*\)*|.\'*\'*)
3642         ;;
3643 (..|./*|.\\*)
3644         ;;
3645 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3646         ;;
3647 (.\${*prefix}*|.\${*dir}*)
3648         eval PKG_CONFIG="$PKG_CONFIG"
3649         case ".$PKG_CONFIG" in
3650         (.NONE/*)
3651                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3652                 ;;
3653         esac
3654         ;;
3655 (.no|.NONE/*)
3656         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3657         ;;
3658 (*)
3659         { { echo "$as_me:3659: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3660 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3661    { (exit 1); exit 1; }; }
3662         ;;
3663 esac
3664
3665 elif test "x$cf_pkg_config" != xno ; then
3666         { echo "$as_me:3666: WARNING: pkg-config is not installed" >&5
3667 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3668 fi
3669
3670 case $PKG_CONFIG in
3671 (no|none|yes)
3672         echo "$as_me:3672: checking for pkg-config library directory" >&5
3673 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3674         ;;
3675 (*)
3676         echo "$as_me:3676: checking for $PKG_CONFIG library directory" >&5
3677 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3678         ;;
3679 esac
3680
3681 PKG_CONFIG_LIBDIR=no
3682
3683 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3684 if test "${with_pkg_config_libdir+set}" = set; then
3685   withval="$with_pkg_config_libdir"
3686   PKG_CONFIG_LIBDIR=$withval
3687 else
3688   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3689 fi;
3690
3691 case x$PKG_CONFIG_LIBDIR in
3692 (x/*)
3693         ;;
3694 (xyes)
3695         # Look for the library directory using the same prefix as the executable
3696         if test "x$PKG_CONFIG" = xnone
3697         then
3698                 cf_path=$prefix
3699         else
3700                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3701         fi
3702
3703         # If you don't like using the default architecture, you have to specify the
3704         # intended library directory and corresponding compiler/linker options.
3705         #
3706         # This case allows for Debian's 2014-flavor of multiarch, along with the
3707         # most common variations before that point.  Some other variants spell the
3708         # directory differently, e.g., "pkg-config", and put it in unusual places.
3709         # pkg-config has always been poorly standardized, which is ironic...
3710         case x`(arch) 2>/dev/null` in
3711         (*64)
3712                 cf_search_path="\
3713                         $cf_path/lib/*64-linux-gnu \
3714                         $cf_path/share \
3715                         $cf_path/lib64 \
3716                         $cf_path/lib32 \
3717                         $cf_path/lib"
3718                 ;;
3719         (*)
3720                 cf_search_path="\
3721                         $cf_path/lib/*-linux-gnu \
3722                         $cf_path/share \
3723                         $cf_path/lib32 \
3724                         $cf_path/lib \
3725                         $cf_path/libdata"
3726                 ;;
3727         esac
3728
3729         test -n "$verbose" && echo "    list..." 1>&6
3730
3731 echo "${as_me:-configure}:3731: testing list... ..." 1>&5
3732
3733         for cf_config in $cf_search_path
3734         do
3735                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3736
3737 echo "${as_me:-configure}:3737: testing checking $cf_config/pkgconfig ..." 1>&5
3738
3739                 if test -d $cf_config/pkgconfig
3740                 then
3741                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3742                         echo "$as_me:3742: checking done" >&5
3743 echo $ECHO_N "checking done... $ECHO_C" >&6
3744                         break
3745                 fi
3746         done
3747         ;;
3748 (*)
3749         ;;
3750 esac
3751
3752 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3753         echo "$as_me:3753: result: $PKG_CONFIG_LIBDIR" >&5
3754 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3755 fi
3756
3757 if test "x$PKG_CONFIG" != xnone
3758 then
3759         echo "$as_me:3759: checking if we should install .pc files for $PKG_CONFIG" >&5
3760 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3761 else
3762         echo "$as_me:3762: checking if we should install .pc files" >&5
3763 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3764 fi
3765
3766 # Check whether --enable-pc-files or --disable-pc-files was given.
3767 if test "${enable_pc_files+set}" = set; then
3768   enableval="$enable_pc_files"
3769   enable_pc_files=$enableval
3770 else
3771   enable_pc_files=no
3772 fi;
3773 echo "$as_me:3773: result: $enable_pc_files" >&5
3774 echo "${ECHO_T}$enable_pc_files" >&6
3775
3776 if test "x$enable_pc_files" != xno
3777 then
3778         MAKE_PC_FILES=
3779         case "x$PKG_CONFIG_LIBDIR" in
3780         (xno|xyes)
3781                 { echo "$as_me:3781: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3782 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3783                 ;;
3784         (*)
3785
3786 if test "x$prefix" != xNONE; then
3787         cf_path_syntax="$prefix"
3788 else
3789         cf_path_syntax="$ac_default_prefix"
3790 fi
3791
3792 case ".$PKG_CONFIG_LIBDIR" in
3793 (.\$\(*\)*|.\'*\'*)
3794         ;;
3795 (..|./*|.\\*)
3796         ;;
3797 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3798         ;;
3799 (.\${*prefix}*|.\${*dir}*)
3800         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3801         case ".$PKG_CONFIG_LIBDIR" in
3802         (.NONE/*)
3803                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3804                 ;;
3805         esac
3806         ;;
3807 (.no|.NONE/*)
3808         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3809         ;;
3810 (*)
3811         { { echo "$as_me:3811: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3812 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3813    { (exit 1); exit 1; }; }
3814         ;;
3815 esac
3816
3817                 ;;
3818         esac
3819 else
3820         MAKE_PC_FILES="#"
3821 fi
3822
3823 if test -z "$MAKE_PC_FILES"
3824 then
3825         echo "$as_me:3825: checking for suffix to add to pc-files" >&5
3826 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3827
3828 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3829 if test "${with_pc_suffix+set}" = set; then
3830   withval="$with_pc_suffix"
3831   case "x$withval" in
3832         (xyes|xno)
3833                 PC_MODULE_SUFFIX=
3834                 ;;
3835         (*)     PC_MODULE_SUFFIX="$withval"
3836                 ;;
3837         esac
3838 fi;
3839         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3840         echo "$as_me:3840: result: $PC_MODULE_SUFFIX" >&5
3841 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3842         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3843
3844 fi
3845
3846 echo "$as_me:3846: checking if we should assume mixed-case filenames" >&5
3847 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3848
3849 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3850 if test "${enable_mixed_case+set}" = set; then
3851   enableval="$enable_mixed_case"
3852   enable_mixedcase=$enableval
3853 else
3854   enable_mixedcase=auto
3855 fi;
3856 echo "$as_me:3856: result: $enable_mixedcase" >&5
3857 echo "${ECHO_T}$enable_mixedcase" >&6
3858 if test "$enable_mixedcase" = "auto" ; then
3859
3860 echo "$as_me:3860: checking if filesystem supports mixed-case filenames" >&5
3861 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3862 if test "${cf_cv_mixedcase+set}" = set; then
3863   echo $ECHO_N "(cached) $ECHO_C" >&6
3864 else
3865
3866 if test "$cross_compiling" = yes ; then
3867         case $target_alias in
3868         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3869                 cf_cv_mixedcase=no
3870                 ;;
3871         (*)
3872                 cf_cv_mixedcase=yes
3873                 ;;
3874         esac
3875 else
3876         rm -f conftest CONFTEST
3877         echo test >conftest
3878         if test -f CONFTEST ; then
3879                 cf_cv_mixedcase=no
3880         else
3881                 cf_cv_mixedcase=yes
3882         fi
3883         rm -f conftest CONFTEST
3884 fi
3885
3886 fi
3887 echo "$as_me:3887: result: $cf_cv_mixedcase" >&5
3888 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3889 test "$cf_cv_mixedcase" = yes &&
3890 cat >>confdefs.h <<\EOF
3891 #define MIXEDCASE_FILENAMES 1
3892 EOF
3893
3894 else
3895         cf_cv_mixedcase=$enable_mixedcase
3896         if test "x$enable_mixedcase" = "xyes" ; then
3897
3898 cat >>confdefs.h <<\EOF
3899 #define MIXEDCASE_FILENAMES 1
3900 EOF
3901
3902         fi
3903 fi
3904
3905 # do this after mixed-case option (tags/TAGS is not as important as tic).
3906 echo "$as_me:3906: checking whether ${MAKE-make} sets \${MAKE}" >&5
3907 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3908 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3909 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3910   echo $ECHO_N "(cached) $ECHO_C" >&6
3911 else
3912   cat >conftest.make <<\EOF
3913 all:
3914         @echo 'ac_maketemp="${MAKE}"'
3915 EOF
3916 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3917 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3918 if test -n "$ac_maketemp"; then
3919   eval ac_cv_prog_make_${ac_make}_set=yes
3920 else
3921   eval ac_cv_prog_make_${ac_make}_set=no
3922 fi
3923 rm -f conftest.make
3924 fi
3925 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3926   echo "$as_me:3926: result: yes" >&5
3927 echo "${ECHO_T}yes" >&6
3928   SET_MAKE=
3929 else
3930   echo "$as_me:3930: result: no" >&5
3931 echo "${ECHO_T}no" >&6
3932   SET_MAKE="MAKE=${MAKE-make}"
3933 fi
3934
3935 for ac_prog in exctags ctags
3936 do
3937   # Extract the first word of "$ac_prog", so it can be a program name with args.
3938 set dummy $ac_prog; ac_word=$2
3939 echo "$as_me:3939: checking for $ac_word" >&5
3940 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3941 if test "${ac_cv_prog_CTAGS+set}" = set; then
3942   echo $ECHO_N "(cached) $ECHO_C" >&6
3943 else
3944   if test -n "$CTAGS"; then
3945   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3946 else
3947   ac_save_IFS=$IFS; IFS=$ac_path_separator
3948 ac_dummy="$PATH"
3949 for ac_dir in $ac_dummy; do
3950   IFS=$ac_save_IFS
3951   test -z "$ac_dir" && ac_dir=.
3952   $as_executable_p "$ac_dir/$ac_word" || continue
3953 ac_cv_prog_CTAGS="$ac_prog"
3954 echo "$as_me:3954: found $ac_dir/$ac_word" >&5
3955 break
3956 done
3957
3958 fi
3959 fi
3960 CTAGS=$ac_cv_prog_CTAGS
3961 if test -n "$CTAGS"; then
3962   echo "$as_me:3962: result: $CTAGS" >&5
3963 echo "${ECHO_T}$CTAGS" >&6
3964 else
3965   echo "$as_me:3965: result: no" >&5
3966 echo "${ECHO_T}no" >&6
3967 fi
3968
3969   test -n "$CTAGS" && break
3970 done
3971
3972 for ac_prog in exetags etags
3973 do
3974   # Extract the first word of "$ac_prog", so it can be a program name with args.
3975 set dummy $ac_prog; ac_word=$2
3976 echo "$as_me:3976: checking for $ac_word" >&5
3977 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3978 if test "${ac_cv_prog_ETAGS+set}" = set; then
3979   echo $ECHO_N "(cached) $ECHO_C" >&6
3980 else
3981   if test -n "$ETAGS"; then
3982   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3983 else
3984   ac_save_IFS=$IFS; IFS=$ac_path_separator
3985 ac_dummy="$PATH"
3986 for ac_dir in $ac_dummy; do
3987   IFS=$ac_save_IFS
3988   test -z "$ac_dir" && ac_dir=.
3989   $as_executable_p "$ac_dir/$ac_word" || continue
3990 ac_cv_prog_ETAGS="$ac_prog"
3991 echo "$as_me:3991: found $ac_dir/$ac_word" >&5
3992 break
3993 done
3994
3995 fi
3996 fi
3997 ETAGS=$ac_cv_prog_ETAGS
3998 if test -n "$ETAGS"; then
3999   echo "$as_me:3999: result: $ETAGS" >&5
4000 echo "${ECHO_T}$ETAGS" >&6
4001 else
4002   echo "$as_me:4002: result: no" >&5
4003 echo "${ECHO_T}no" >&6
4004 fi
4005
4006   test -n "$ETAGS" && break
4007 done
4008
4009 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4010 set dummy ${CTAGS:-ctags}; ac_word=$2
4011 echo "$as_me:4011: checking for $ac_word" >&5
4012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4013 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4014   echo $ECHO_N "(cached) $ECHO_C" >&6
4015 else
4016   if test -n "$MAKE_LOWER_TAGS"; then
4017   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4018 else
4019   ac_save_IFS=$IFS; IFS=$ac_path_separator
4020 ac_dummy="$PATH"
4021 for ac_dir in $ac_dummy; do
4022   IFS=$ac_save_IFS
4023   test -z "$ac_dir" && ac_dir=.
4024   $as_executable_p "$ac_dir/$ac_word" || continue
4025 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4026 echo "$as_me:4026: found $ac_dir/$ac_word" >&5
4027 break
4028 done
4029
4030   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4031 fi
4032 fi
4033 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4034 if test -n "$MAKE_LOWER_TAGS"; then
4035   echo "$as_me:4035: result: $MAKE_LOWER_TAGS" >&5
4036 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4037 else
4038   echo "$as_me:4038: result: no" >&5
4039 echo "${ECHO_T}no" >&6
4040 fi
4041
4042 if test "$cf_cv_mixedcase" = yes ; then
4043         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4044 set dummy ${ETAGS:-etags}; ac_word=$2
4045 echo "$as_me:4045: checking for $ac_word" >&5
4046 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4047 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4048   echo $ECHO_N "(cached) $ECHO_C" >&6
4049 else
4050   if test -n "$MAKE_UPPER_TAGS"; then
4051   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4052 else
4053   ac_save_IFS=$IFS; IFS=$ac_path_separator
4054 ac_dummy="$PATH"
4055 for ac_dir in $ac_dummy; do
4056   IFS=$ac_save_IFS
4057   test -z "$ac_dir" && ac_dir=.
4058   $as_executable_p "$ac_dir/$ac_word" || continue
4059 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4060 echo "$as_me:4060: found $ac_dir/$ac_word" >&5
4061 break
4062 done
4063
4064   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4065 fi
4066 fi
4067 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4068 if test -n "$MAKE_UPPER_TAGS"; then
4069   echo "$as_me:4069: result: $MAKE_UPPER_TAGS" >&5
4070 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4071 else
4072   echo "$as_me:4072: result: no" >&5
4073 echo "${ECHO_T}no" >&6
4074 fi
4075
4076 else
4077         MAKE_UPPER_TAGS=no
4078 fi
4079
4080 if test "$MAKE_UPPER_TAGS" = yes ; then
4081         MAKE_UPPER_TAGS=
4082 else
4083         MAKE_UPPER_TAGS="#"
4084 fi
4085
4086 if test "$MAKE_LOWER_TAGS" = yes ; then
4087         MAKE_LOWER_TAGS=
4088 else
4089         MAKE_LOWER_TAGS="#"
4090 fi
4091
4092 echo "$as_me:4092: checking for makeflags variable" >&5
4093 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4094 if test "${cf_cv_makeflags+set}" = set; then
4095   echo $ECHO_N "(cached) $ECHO_C" >&6
4096 else
4097
4098         cf_cv_makeflags=''
4099         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4100         do
4101                 cat >cf_makeflags.tmp <<CF_EOF
4102 SHELL = $SHELL
4103 all :
4104         @ echo '.$cf_option'
4105 CF_EOF
4106                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4107                 case "$cf_result" in
4108                 (.*k|.*kw)
4109                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4110                         case "$cf_result" in
4111                         (.*CC=*)        cf_cv_makeflags=
4112                                 ;;
4113                         (*)     cf_cv_makeflags=$cf_option
4114                                 ;;
4115                         esac
4116                         break
4117                         ;;
4118                 (.-)    ;;
4119                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4120                         ;;
4121                 esac
4122         done
4123         rm -f cf_makeflags.tmp
4124
4125 fi
4126 echo "$as_me:4126: result: $cf_cv_makeflags" >&5
4127 echo "${ECHO_T}$cf_cv_makeflags" >&6
4128
4129 if test -n "$ac_tool_prefix"; then
4130   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4131 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4132 echo "$as_me:4132: checking for $ac_word" >&5
4133 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4134 if test "${ac_cv_prog_RANLIB+set}" = set; then
4135   echo $ECHO_N "(cached) $ECHO_C" >&6
4136 else
4137   if test -n "$RANLIB"; then
4138   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4139 else
4140   ac_save_IFS=$IFS; IFS=$ac_path_separator
4141 ac_dummy="$PATH"
4142 for ac_dir in $ac_dummy; do
4143   IFS=$ac_save_IFS
4144   test -z "$ac_dir" && ac_dir=.
4145   $as_executable_p "$ac_dir/$ac_word" || continue
4146 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4147 echo "$as_me:4147: found $ac_dir/$ac_word" >&5
4148 break
4149 done
4150
4151 fi
4152 fi
4153 RANLIB=$ac_cv_prog_RANLIB
4154 if test -n "$RANLIB"; then
4155   echo "$as_me:4155: result: $RANLIB" >&5
4156 echo "${ECHO_T}$RANLIB" >&6
4157 else
4158   echo "$as_me:4158: result: no" >&5
4159 echo "${ECHO_T}no" >&6
4160 fi
4161
4162 fi
4163 if test -z "$ac_cv_prog_RANLIB"; then
4164   ac_ct_RANLIB=$RANLIB
4165   # Extract the first word of "ranlib", so it can be a program name with args.
4166 set dummy ranlib; ac_word=$2
4167 echo "$as_me:4167: checking for $ac_word" >&5
4168 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4169 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4170   echo $ECHO_N "(cached) $ECHO_C" >&6
4171 else
4172   if test -n "$ac_ct_RANLIB"; then
4173   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4174 else
4175   ac_save_IFS=$IFS; IFS=$ac_path_separator
4176 ac_dummy="$PATH"
4177 for ac_dir in $ac_dummy; do
4178   IFS=$ac_save_IFS
4179   test -z "$ac_dir" && ac_dir=.
4180   $as_executable_p "$ac_dir/$ac_word" || continue
4181 ac_cv_prog_ac_ct_RANLIB="ranlib"
4182 echo "$as_me:4182: found $ac_dir/$ac_word" >&5
4183 break
4184 done
4185
4186   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4187 fi
4188 fi
4189 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4190 if test -n "$ac_ct_RANLIB"; then
4191   echo "$as_me:4191: result: $ac_ct_RANLIB" >&5
4192 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4193 else
4194   echo "$as_me:4194: result: no" >&5
4195 echo "${ECHO_T}no" >&6
4196 fi
4197
4198   RANLIB=$ac_ct_RANLIB
4199 else
4200   RANLIB="$ac_cv_prog_RANLIB"
4201 fi
4202
4203 if test -n "$ac_tool_prefix"; then
4204   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4205 set dummy ${ac_tool_prefix}ld; ac_word=$2
4206 echo "$as_me:4206: checking for $ac_word" >&5
4207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4208 if test "${ac_cv_prog_LD+set}" = set; then
4209   echo $ECHO_N "(cached) $ECHO_C" >&6
4210 else
4211   if test -n "$LD"; then
4212   ac_cv_prog_LD="$LD" # Let the user override the test.
4213 else
4214   ac_save_IFS=$IFS; IFS=$ac_path_separator
4215 ac_dummy="$PATH"
4216 for ac_dir in $ac_dummy; do
4217   IFS=$ac_save_IFS
4218   test -z "$ac_dir" && ac_dir=.
4219   $as_executable_p "$ac_dir/$ac_word" || continue
4220 ac_cv_prog_LD="${ac_tool_prefix}ld"
4221 echo "$as_me:4221: found $ac_dir/$ac_word" >&5
4222 break
4223 done
4224
4225 fi
4226 fi
4227 LD=$ac_cv_prog_LD
4228 if test -n "$LD"; then
4229   echo "$as_me:4229: result: $LD" >&5
4230 echo "${ECHO_T}$LD" >&6
4231 else
4232   echo "$as_me:4232: result: no" >&5
4233 echo "${ECHO_T}no" >&6
4234 fi
4235
4236 fi
4237 if test -z "$ac_cv_prog_LD"; then
4238   ac_ct_LD=$LD
4239   # Extract the first word of "ld", so it can be a program name with args.
4240 set dummy ld; ac_word=$2
4241 echo "$as_me:4241: checking for $ac_word" >&5
4242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4243 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4244   echo $ECHO_N "(cached) $ECHO_C" >&6
4245 else
4246   if test -n "$ac_ct_LD"; then
4247   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4248 else
4249   ac_save_IFS=$IFS; IFS=$ac_path_separator
4250 ac_dummy="$PATH"
4251 for ac_dir in $ac_dummy; do
4252   IFS=$ac_save_IFS
4253   test -z "$ac_dir" && ac_dir=.
4254   $as_executable_p "$ac_dir/$ac_word" || continue
4255 ac_cv_prog_ac_ct_LD="ld"
4256 echo "$as_me:4256: found $ac_dir/$ac_word" >&5
4257 break
4258 done
4259
4260   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4261 fi
4262 fi
4263 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4264 if test -n "$ac_ct_LD"; then
4265   echo "$as_me:4265: result: $ac_ct_LD" >&5
4266 echo "${ECHO_T}$ac_ct_LD" >&6
4267 else
4268   echo "$as_me:4268: result: no" >&5
4269 echo "${ECHO_T}no" >&6
4270 fi
4271
4272   LD=$ac_ct_LD
4273 else
4274   LD="$ac_cv_prog_LD"
4275 fi
4276
4277 if test -n "$ac_tool_prefix"; then
4278   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4279 set dummy ${ac_tool_prefix}ar; ac_word=$2
4280 echo "$as_me:4280: checking for $ac_word" >&5
4281 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4282 if test "${ac_cv_prog_AR+set}" = set; then
4283   echo $ECHO_N "(cached) $ECHO_C" >&6
4284 else
4285   if test -n "$AR"; then
4286   ac_cv_prog_AR="$AR" # Let the user override the test.
4287 else
4288   ac_save_IFS=$IFS; IFS=$ac_path_separator
4289 ac_dummy="$PATH"
4290 for ac_dir in $ac_dummy; do
4291   IFS=$ac_save_IFS
4292   test -z "$ac_dir" && ac_dir=.
4293   $as_executable_p "$ac_dir/$ac_word" || continue
4294 ac_cv_prog_AR="${ac_tool_prefix}ar"
4295 echo "$as_me:4295: found $ac_dir/$ac_word" >&5
4296 break
4297 done
4298
4299 fi
4300 fi
4301 AR=$ac_cv_prog_AR
4302 if test -n "$AR"; then
4303   echo "$as_me:4303: result: $AR" >&5
4304 echo "${ECHO_T}$AR" >&6
4305 else
4306   echo "$as_me:4306: result: no" >&5
4307 echo "${ECHO_T}no" >&6
4308 fi
4309
4310 fi
4311 if test -z "$ac_cv_prog_AR"; then
4312   ac_ct_AR=$AR
4313   # Extract the first word of "ar", so it can be a program name with args.
4314 set dummy ar; ac_word=$2
4315 echo "$as_me:4315: checking for $ac_word" >&5
4316 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4317 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4318   echo $ECHO_N "(cached) $ECHO_C" >&6
4319 else
4320   if test -n "$ac_ct_AR"; then
4321   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4322 else
4323   ac_save_IFS=$IFS; IFS=$ac_path_separator
4324 ac_dummy="$PATH"
4325 for ac_dir in $ac_dummy; do
4326   IFS=$ac_save_IFS
4327   test -z "$ac_dir" && ac_dir=.
4328   $as_executable_p "$ac_dir/$ac_word" || continue
4329 ac_cv_prog_ac_ct_AR="ar"
4330 echo "$as_me:4330: found $ac_dir/$ac_word" >&5
4331 break
4332 done
4333
4334   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4335 fi
4336 fi
4337 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4338 if test -n "$ac_ct_AR"; then
4339   echo "$as_me:4339: result: $ac_ct_AR" >&5
4340 echo "${ECHO_T}$ac_ct_AR" >&6
4341 else
4342   echo "$as_me:4342: result: no" >&5
4343 echo "${ECHO_T}no" >&6
4344 fi
4345
4346   AR=$ac_ct_AR
4347 else
4348   AR="$ac_cv_prog_AR"
4349 fi
4350
4351 if test -n "$ac_tool_prefix"; then
4352   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4353 set dummy ${ac_tool_prefix}nm; ac_word=$2
4354 echo "$as_me:4354: checking for $ac_word" >&5
4355 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4356 if test "${ac_cv_prog_NM+set}" = set; then
4357   echo $ECHO_N "(cached) $ECHO_C" >&6
4358 else
4359   if test -n "$NM"; then
4360   ac_cv_prog_NM="$NM" # Let the user override the test.
4361 else
4362   ac_save_IFS=$IFS; IFS=$ac_path_separator
4363 ac_dummy="$PATH"
4364 for ac_dir in $ac_dummy; do
4365   IFS=$ac_save_IFS
4366   test -z "$ac_dir" && ac_dir=.
4367   $as_executable_p "$ac_dir/$ac_word" || continue
4368 ac_cv_prog_NM="${ac_tool_prefix}nm"
4369 echo "$as_me:4369: found $ac_dir/$ac_word" >&5
4370 break
4371 done
4372
4373 fi
4374 fi
4375 NM=$ac_cv_prog_NM
4376 if test -n "$NM"; then
4377   echo "$as_me:4377: result: $NM" >&5
4378 echo "${ECHO_T}$NM" >&6
4379 else
4380   echo "$as_me:4380: result: no" >&5
4381 echo "${ECHO_T}no" >&6
4382 fi
4383
4384 fi
4385 if test -z "$ac_cv_prog_NM"; then
4386   ac_ct_NM=$NM
4387   # Extract the first word of "nm", so it can be a program name with args.
4388 set dummy nm; ac_word=$2
4389 echo "$as_me:4389: checking for $ac_word" >&5
4390 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4391 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4392   echo $ECHO_N "(cached) $ECHO_C" >&6
4393 else
4394   if test -n "$ac_ct_NM"; then
4395   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4396 else
4397   ac_save_IFS=$IFS; IFS=$ac_path_separator
4398 ac_dummy="$PATH"
4399 for ac_dir in $ac_dummy; do
4400   IFS=$ac_save_IFS
4401   test -z "$ac_dir" && ac_dir=.
4402   $as_executable_p "$ac_dir/$ac_word" || continue
4403 ac_cv_prog_ac_ct_NM="nm"
4404 echo "$as_me:4404: found $ac_dir/$ac_word" >&5
4405 break
4406 done
4407
4408   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4409 fi
4410 fi
4411 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4412 if test -n "$ac_ct_NM"; then
4413   echo "$as_me:4413: result: $ac_ct_NM" >&5
4414 echo "${ECHO_T}$ac_ct_NM" >&6
4415 else
4416   echo "$as_me:4416: result: no" >&5
4417 echo "${ECHO_T}no" >&6
4418 fi
4419
4420   NM=$ac_ct_NM
4421 else
4422   NM="$ac_cv_prog_NM"
4423 fi
4424
4425 if test -n "$ac_tool_prefix"; then
4426   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4427 set dummy ${ac_tool_prefix}ar; ac_word=$2
4428 echo "$as_me:4428: checking for $ac_word" >&5
4429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4430 if test "${ac_cv_prog_AR+set}" = set; then
4431   echo $ECHO_N "(cached) $ECHO_C" >&6
4432 else
4433   if test -n "$AR"; then
4434   ac_cv_prog_AR="$AR" # Let the user override the test.
4435 else
4436   ac_save_IFS=$IFS; IFS=$ac_path_separator
4437 ac_dummy="$PATH"
4438 for ac_dir in $ac_dummy; do
4439   IFS=$ac_save_IFS
4440   test -z "$ac_dir" && ac_dir=.
4441   $as_executable_p "$ac_dir/$ac_word" || continue
4442 ac_cv_prog_AR="${ac_tool_prefix}ar"
4443 echo "$as_me:4443: found $ac_dir/$ac_word" >&5
4444 break
4445 done
4446
4447 fi
4448 fi
4449 AR=$ac_cv_prog_AR
4450 if test -n "$AR"; then
4451   echo "$as_me:4451: result: $AR" >&5
4452 echo "${ECHO_T}$AR" >&6
4453 else
4454   echo "$as_me:4454: result: no" >&5
4455 echo "${ECHO_T}no" >&6
4456 fi
4457
4458 fi
4459 if test -z "$ac_cv_prog_AR"; then
4460   ac_ct_AR=$AR
4461   # Extract the first word of "ar", so it can be a program name with args.
4462 set dummy ar; ac_word=$2
4463 echo "$as_me:4463: checking for $ac_word" >&5
4464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4465 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4466   echo $ECHO_N "(cached) $ECHO_C" >&6
4467 else
4468   if test -n "$ac_ct_AR"; then
4469   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4470 else
4471   ac_save_IFS=$IFS; IFS=$ac_path_separator
4472 ac_dummy="$PATH"
4473 for ac_dir in $ac_dummy; do
4474   IFS=$ac_save_IFS
4475   test -z "$ac_dir" && ac_dir=.
4476   $as_executable_p "$ac_dir/$ac_word" || continue
4477 ac_cv_prog_ac_ct_AR="ar"
4478 echo "$as_me:4478: found $ac_dir/$ac_word" >&5
4479 break
4480 done
4481
4482   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4483 fi
4484 fi
4485 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4486 if test -n "$ac_ct_AR"; then
4487   echo "$as_me:4487: result: $ac_ct_AR" >&5
4488 echo "${ECHO_T}$ac_ct_AR" >&6
4489 else
4490   echo "$as_me:4490: result: no" >&5
4491 echo "${ECHO_T}no" >&6
4492 fi
4493
4494   AR=$ac_ct_AR
4495 else
4496   AR="$ac_cv_prog_AR"
4497 fi
4498
4499 echo "$as_me:4499: checking for options to update archives" >&5
4500 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4501 if test "${cf_cv_ar_flags+set}" = set; then
4502   echo $ECHO_N "(cached) $ECHO_C" >&6
4503 else
4504
4505         cf_cv_ar_flags=unknown
4506         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4507         do
4508
4509                 # check if $ARFLAGS already contains this choice
4510                 if test "x$ARFLAGS" != "x" ; then
4511                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4512                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4513                                 cf_cv_ar_flags=
4514                                 break
4515                         fi
4516                 fi
4517
4518                 rm -f conftest.$ac_cv_objext
4519                 rm -f conftest.a
4520
4521                 cat >conftest.$ac_ext <<EOF
4522 #line 4522 "configure"
4523 int     testdata[3] = { 123, 456, 789 };
4524 EOF
4525                 if { (eval echo "$as_me:4525: \"$ac_compile\"") >&5
4526   (eval $ac_compile) 2>&5
4527   ac_status=$?
4528   echo "$as_me:4528: \$? = $ac_status" >&5
4529   (exit $ac_status); } ; then
4530                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4531                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4532                         if test -f conftest.a ; then
4533                                 cf_cv_ar_flags=$cf_ar_flags
4534                                 break
4535                         fi
4536                 else
4537                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4538
4539 echo "${as_me:-configure}:4539: testing cannot compile test-program ..." 1>&5
4540
4541                         break
4542                 fi
4543         done
4544         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4545
4546 fi
4547 echo "$as_me:4547: result: $cf_cv_ar_flags" >&5
4548 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4549
4550 if test -n "$ARFLAGS" ; then
4551         if test -n "$cf_cv_ar_flags" ; then
4552                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4553         fi
4554 else
4555         ARFLAGS=$cf_cv_ar_flags
4556 fi
4557
4558 echo "$as_me:4558: checking if you have specified an install-prefix" >&5
4559 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4560
4561 # Check whether --with-install-prefix or --without-install-prefix was given.
4562 if test "${with_install_prefix+set}" = set; then
4563   withval="$with_install_prefix"
4564   case "x$withval" in
4565         (xyes|xno)
4566                 ;;
4567         (*)     DESTDIR="$withval"
4568                 ;;
4569         esac
4570 fi;
4571 echo "$as_me:4571: result: $DESTDIR" >&5
4572 echo "${ECHO_T}$DESTDIR" >&6
4573
4574 ###############################################################################
4575
4576 # If we're cross-compiling, allow the user to override the tools and their
4577 # options.  The configure script is oriented toward identifying the host
4578 # compiler, etc., but we need a build compiler to generate parts of the source.
4579
4580 if test "$cross_compiling" = yes ; then
4581
4582         # defaults that we might want to override
4583         : ${BUILD_CFLAGS:=''}
4584         : ${BUILD_CPPFLAGS:=''}
4585         : ${BUILD_LDFLAGS:=''}
4586         : ${BUILD_LIBS:=''}
4587         : ${BUILD_EXEEXT:='$x'}
4588         : ${BUILD_OBJEXT:='o'}
4589
4590 # Check whether --with-build-cc or --without-build-cc was given.
4591 if test "${with_build_cc+set}" = set; then
4592   withval="$with_build_cc"
4593   BUILD_CC="$withval"
4594 else
4595   for ac_prog in gcc clang c99 c89 cc cl
4596 do
4597   # Extract the first word of "$ac_prog", so it can be a program name with args.
4598 set dummy $ac_prog; ac_word=$2
4599 echo "$as_me:4599: checking for $ac_word" >&5
4600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4601 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4602   echo $ECHO_N "(cached) $ECHO_C" >&6
4603 else
4604   if test -n "$BUILD_CC"; then
4605   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4606 else
4607   ac_save_IFS=$IFS; IFS=$ac_path_separator
4608 ac_dummy="$PATH"
4609 for ac_dir in $ac_dummy; do
4610   IFS=$ac_save_IFS
4611   test -z "$ac_dir" && ac_dir=.
4612   $as_executable_p "$ac_dir/$ac_word" || continue
4613 ac_cv_prog_BUILD_CC="$ac_prog"
4614 echo "$as_me:4614: found $ac_dir/$ac_word" >&5
4615 break
4616 done
4617
4618 fi
4619 fi
4620 BUILD_CC=$ac_cv_prog_BUILD_CC
4621 if test -n "$BUILD_CC"; then
4622   echo "$as_me:4622: result: $BUILD_CC" >&5
4623 echo "${ECHO_T}$BUILD_CC" >&6
4624 else
4625   echo "$as_me:4625: result: no" >&5
4626 echo "${ECHO_T}no" >&6
4627 fi
4628
4629   test -n "$BUILD_CC" && break
4630 done
4631 test -n "$BUILD_CC" || BUILD_CC="none"
4632
4633 fi;
4634         echo "$as_me:4634: checking for native build C compiler" >&5
4635 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4636         echo "$as_me:4636: result: $BUILD_CC" >&5
4637 echo "${ECHO_T}$BUILD_CC" >&6
4638
4639         echo "$as_me:4639: checking for native build C preprocessor" >&5
4640 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4641
4642 # Check whether --with-build-cpp or --without-build-cpp was given.
4643 if test "${with_build_cpp+set}" = set; then
4644   withval="$with_build_cpp"
4645   BUILD_CPP="$withval"
4646 else
4647   BUILD_CPP='${BUILD_CC} -E'
4648 fi;
4649         echo "$as_me:4649: result: $BUILD_CPP" >&5
4650 echo "${ECHO_T}$BUILD_CPP" >&6
4651
4652         echo "$as_me:4652: checking for native build C flags" >&5
4653 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4654
4655 # Check whether --with-build-cflags or --without-build-cflags was given.
4656 if test "${with_build_cflags+set}" = set; then
4657   withval="$with_build_cflags"
4658   BUILD_CFLAGS="$withval"
4659 fi;
4660         echo "$as_me:4660: result: $BUILD_CFLAGS" >&5
4661 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4662
4663         echo "$as_me:4663: checking for native build C preprocessor-flags" >&5
4664 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4665
4666 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4667 if test "${with_build_cppflags+set}" = set; then
4668   withval="$with_build_cppflags"
4669   BUILD_CPPFLAGS="$withval"
4670 fi;
4671         echo "$as_me:4671: result: $BUILD_CPPFLAGS" >&5
4672 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4673
4674         echo "$as_me:4674: checking for native build linker-flags" >&5
4675 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4676
4677 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4678 if test "${with_build_ldflags+set}" = set; then
4679   withval="$with_build_ldflags"
4680   BUILD_LDFLAGS="$withval"
4681 fi;
4682         echo "$as_me:4682: result: $BUILD_LDFLAGS" >&5
4683 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4684
4685         echo "$as_me:4685: checking for native build linker-libraries" >&5
4686 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4687
4688 # Check whether --with-build-libs or --without-build-libs was given.
4689 if test "${with_build_libs+set}" = set; then
4690   withval="$with_build_libs"
4691   BUILD_LIBS="$withval"
4692 fi;
4693         echo "$as_me:4693: result: $BUILD_LIBS" >&5
4694 echo "${ECHO_T}$BUILD_LIBS" >&6
4695
4696         # this assumes we're on Unix.
4697         BUILD_EXEEXT=
4698         BUILD_OBJEXT=o
4699
4700         : ${BUILD_CC:='${CC}'}
4701
4702         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4703                 { { echo "$as_me:4703: error: Cross-build requires two compilers.
4704 Use --with-build-cc to specify the native compiler." >&5
4705 echo "$as_me: error: Cross-build requires two compilers.
4706 Use --with-build-cc to specify the native compiler." >&2;}
4707    { (exit 1); exit 1; }; }
4708         fi
4709
4710 else
4711         : ${BUILD_CC:='${CC}'}
4712         : ${BUILD_CPP:='${CPP}'}
4713         : ${BUILD_CFLAGS:='${CFLAGS}'}
4714         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4715         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4716         : ${BUILD_LIBS:='${LIBS}'}
4717         : ${BUILD_EXEEXT:='$x'}
4718         : ${BUILD_OBJEXT:='o'}
4719 fi
4720
4721 ###############################################################################
4722
4723 ### Options to allow the user to specify the set of libraries which are used.
4724 ### Use "--without-normal --with-shared" to allow the default model to be
4725 ### shared, for example.
4726 cf_list_models=""
4727
4728 echo "$as_me:4728: checking if libtool -version-number should be used" >&5
4729 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4730
4731 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4732 if test "${enable_libtool_version+set}" = set; then
4733   enableval="$enable_libtool_version"
4734   test "$enableval" != no && enableval=yes
4735         if test "$enableval" != "yes" ; then
4736     cf_libtool_version=no
4737         else
4738                 cf_libtool_version=yes
4739         fi
4740 else
4741   enableval=yes
4742         cf_libtool_version=yes
4743
4744 fi;
4745 echo "$as_me:4745: result: $cf_libtool_version" >&5
4746 echo "${ECHO_T}$cf_libtool_version" >&6
4747
4748 if test "$cf_libtool_version" = yes ; then
4749         LIBTOOL_VERSION="-version-number"
4750 else
4751         LIBTOOL_VERSION="-version-info"
4752         case "x$VERSION" in
4753         (x)
4754                 { echo "$as_me:4754: WARNING: VERSION was not set" >&5
4755 echo "$as_me: WARNING: VERSION was not set" >&2;}
4756                 ;;
4757         (x*.*.*)
4758                 ABI_VERSION="$VERSION"
4759                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4760
4761 echo "${as_me:-configure}:4761: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4762
4763                 ;;
4764         (x*:*:*)
4765                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4766                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4767
4768 echo "${as_me:-configure}:4768: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4769
4770                 ;;
4771         (*)
4772                 { echo "$as_me:4772: WARNING: unexpected VERSION value: $VERSION" >&5
4773 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4774                 ;;
4775         esac
4776 fi
4777
4778 LIBTOOL=
4779
4780 # common library maintenance symbols that are convenient for libtool scripts:
4781 LIB_CREATE='${AR} -cr'
4782 LIB_OBJECT='${OBJECTS}'
4783 LIB_SUFFIX=.a
4784 LIB_PREP="$RANLIB"
4785
4786 # symbols used to prop libtool up to enable it to determine what it should be
4787 # doing:
4788 LIB_CLEAN=
4789 LIB_COMPILE=
4790 LIB_LINK='${CC}'
4791 LIB_INSTALL=
4792 LIB_UNINSTALL=
4793
4794 echo "$as_me:4794: checking if you want to build libraries with libtool" >&5
4795 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4796
4797 # Check whether --with-libtool or --without-libtool was given.
4798 if test "${with_libtool+set}" = set; then
4799   withval="$with_libtool"
4800   with_libtool=$withval
4801 else
4802   with_libtool=no
4803 fi;
4804 echo "$as_me:4804: result: $with_libtool" >&5
4805 echo "${ECHO_T}$with_libtool" >&6
4806 if test "$with_libtool" != "no"; then
4807
4808         if test "$with_libtool" != "yes" ; then
4809
4810 if test "x$prefix" != xNONE; then
4811         cf_path_syntax="$prefix"
4812 else
4813         cf_path_syntax="$ac_default_prefix"
4814 fi
4815
4816 case ".$with_libtool" in
4817 (.\$\(*\)*|.\'*\'*)
4818         ;;
4819 (..|./*|.\\*)
4820         ;;
4821 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4822         ;;
4823 (.\${*prefix}*|.\${*dir}*)
4824         eval with_libtool="$with_libtool"
4825         case ".$with_libtool" in
4826         (.NONE/*)
4827                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4828                 ;;
4829         esac
4830         ;;
4831 (.no|.NONE/*)
4832         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4833         ;;
4834 (*)
4835         { { echo "$as_me:4835: error: expected a pathname, not \"$with_libtool\"" >&5
4836 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4837    { (exit 1); exit 1; }; }
4838         ;;
4839 esac
4840
4841                 LIBTOOL=$with_libtool
4842         else
4843                 if test -n "$ac_tool_prefix"; then
4844   for ac_prog in libtool glibtool
4845   do
4846     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4847 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4848 echo "$as_me:4848: checking for $ac_word" >&5
4849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4850 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4851   echo $ECHO_N "(cached) $ECHO_C" >&6
4852 else
4853   if test -n "$LIBTOOL"; then
4854   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4855 else
4856   ac_save_IFS=$IFS; IFS=$ac_path_separator
4857 ac_dummy="$PATH"
4858 for ac_dir in $ac_dummy; do
4859   IFS=$ac_save_IFS
4860   test -z "$ac_dir" && ac_dir=.
4861   $as_executable_p "$ac_dir/$ac_word" || continue
4862 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4863 echo "$as_me:4863: found $ac_dir/$ac_word" >&5
4864 break
4865 done
4866
4867 fi
4868 fi
4869 LIBTOOL=$ac_cv_prog_LIBTOOL
4870 if test -n "$LIBTOOL"; then
4871   echo "$as_me:4871: result: $LIBTOOL" >&5
4872 echo "${ECHO_T}$LIBTOOL" >&6
4873 else
4874   echo "$as_me:4874: result: no" >&5
4875 echo "${ECHO_T}no" >&6
4876 fi
4877
4878     test -n "$LIBTOOL" && break
4879   done
4880 fi
4881 if test -z "$LIBTOOL"; then
4882   ac_ct_LIBTOOL=$LIBTOOL
4883   for ac_prog in libtool glibtool
4884 do
4885   # Extract the first word of "$ac_prog", so it can be a program name with args.
4886 set dummy $ac_prog; ac_word=$2
4887 echo "$as_me:4887: checking for $ac_word" >&5
4888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4889 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4890   echo $ECHO_N "(cached) $ECHO_C" >&6
4891 else
4892   if test -n "$ac_ct_LIBTOOL"; then
4893   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4894 else
4895   ac_save_IFS=$IFS; IFS=$ac_path_separator
4896 ac_dummy="$PATH"
4897 for ac_dir in $ac_dummy; do
4898   IFS=$ac_save_IFS
4899   test -z "$ac_dir" && ac_dir=.
4900   $as_executable_p "$ac_dir/$ac_word" || continue
4901 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4902 echo "$as_me:4902: found $ac_dir/$ac_word" >&5
4903 break
4904 done
4905
4906 fi
4907 fi
4908 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4909 if test -n "$ac_ct_LIBTOOL"; then
4910   echo "$as_me:4910: result: $ac_ct_LIBTOOL" >&5
4911 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4912 else
4913   echo "$as_me:4913: result: no" >&5
4914 echo "${ECHO_T}no" >&6
4915 fi
4916
4917   test -n "$ac_ct_LIBTOOL" && break
4918 done
4919 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4920
4921   LIBTOOL=$ac_ct_LIBTOOL
4922 fi
4923
4924 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4925 then
4926         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.].*//'`
4927 else
4928         cf_cv_libtool_version=
4929 fi
4930 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4931
4932                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4933                 then
4934
4935 unset ac_cv_prog_ac_ct_LIBTOOL
4936 unset ac_ct_LIBTOOL
4937 unset LIBTOOL
4938
4939                         if test -n "$ac_tool_prefix"; then
4940   for ac_prog in glibtool
4941   do
4942     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4943 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4944 echo "$as_me:4944: checking for $ac_word" >&5
4945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4946 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4947   echo $ECHO_N "(cached) $ECHO_C" >&6
4948 else
4949   if test -n "$LIBTOOL"; then
4950   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4951 else
4952   ac_save_IFS=$IFS; IFS=$ac_path_separator
4953 ac_dummy="$PATH"
4954 for ac_dir in $ac_dummy; do
4955   IFS=$ac_save_IFS
4956   test -z "$ac_dir" && ac_dir=.
4957   $as_executable_p "$ac_dir/$ac_word" || continue
4958 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4959 echo "$as_me:4959: found $ac_dir/$ac_word" >&5
4960 break
4961 done
4962
4963 fi
4964 fi
4965 LIBTOOL=$ac_cv_prog_LIBTOOL
4966 if test -n "$LIBTOOL"; then
4967   echo "$as_me:4967: result: $LIBTOOL" >&5
4968 echo "${ECHO_T}$LIBTOOL" >&6
4969 else
4970   echo "$as_me:4970: result: no" >&5
4971 echo "${ECHO_T}no" >&6
4972 fi
4973
4974     test -n "$LIBTOOL" && break
4975   done
4976 fi
4977 if test -z "$LIBTOOL"; then
4978   ac_ct_LIBTOOL=$LIBTOOL
4979   for ac_prog in glibtool
4980 do
4981   # Extract the first word of "$ac_prog", so it can be a program name with args.
4982 set dummy $ac_prog; ac_word=$2
4983 echo "$as_me:4983: checking for $ac_word" >&5
4984 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4985 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4986   echo $ECHO_N "(cached) $ECHO_C" >&6
4987 else
4988   if test -n "$ac_ct_LIBTOOL"; then
4989   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4990 else
4991   ac_save_IFS=$IFS; IFS=$ac_path_separator
4992 ac_dummy="$PATH"
4993 for ac_dir in $ac_dummy; do
4994   IFS=$ac_save_IFS
4995   test -z "$ac_dir" && ac_dir=.
4996   $as_executable_p "$ac_dir/$ac_word" || continue
4997 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4998 echo "$as_me:4998: found $ac_dir/$ac_word" >&5
4999 break
5000 done
5001
5002 fi
5003 fi
5004 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5005 if test -n "$ac_ct_LIBTOOL"; then
5006   echo "$as_me:5006: result: $ac_ct_LIBTOOL" >&5
5007 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5008 else
5009   echo "$as_me:5009: result: no" >&5
5010 echo "${ECHO_T}no" >&6
5011 fi
5012
5013   test -n "$ac_ct_LIBTOOL" && break
5014 done
5015 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5016
5017   LIBTOOL=$ac_ct_LIBTOOL
5018 fi
5019
5020 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5021 then
5022         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.].*//'`
5023 else
5024         cf_cv_libtool_version=
5025 fi
5026 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5027
5028                 fi
5029         fi
5030         if test -z "$LIBTOOL" ; then
5031                 { { echo "$as_me:5031: error: Cannot find libtool" >&5
5032 echo "$as_me: error: Cannot find libtool" >&2;}
5033    { (exit 1); exit 1; }; }
5034         fi
5035         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5036         LIB_OBJECT='${OBJECTS:.o=.lo}'
5037         LIB_SUFFIX=.la
5038         LIB_CLEAN='${LIBTOOL} --mode=clean'
5039         LIB_COMPILE='${LIBTOOL} --mode=compile'
5040         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5041         LIB_INSTALL='${LIBTOOL} --mode=install'
5042         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5043         LIB_PREP=:
5044
5045 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5046 then
5047         echo "$as_me:5047: checking version of $LIBTOOL" >&5
5048 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5049
5050 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5051 then
5052         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.].*//'`
5053 else
5054         cf_cv_libtool_version=
5055 fi
5056 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5057
5058         echo "$as_me:5058: result: $cf_cv_libtool_version" >&5
5059 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5060         if test -z "$cf_cv_libtool_version" ; then
5061                 { { echo "$as_me:5061: error: This is not GNU libtool" >&5
5062 echo "$as_me: error: This is not GNU libtool" >&2;}
5063    { (exit 1); exit 1; }; }
5064         fi
5065 else
5066         { { echo "$as_me:5066: error: GNU libtool has not been found" >&5
5067 echo "$as_me: error: GNU libtool has not been found" >&2;}
5068    { (exit 1); exit 1; }; }
5069 fi
5070
5071         # special hack to add -no-undefined (which libtool should do for itself)
5072         LT_UNDEF=
5073         case "$cf_cv_system_name" in
5074         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5075                 LT_UNDEF=-no-undefined
5076                 ;;
5077         esac
5078
5079         # special hack to add --tag option for C++ compiler
5080         case $cf_cv_libtool_version in
5081         (1.[5-9]*|[2-9].[0-9.a-z]*)
5082                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5083                 LIBTOOL="$LIBTOOL --tag=CC"
5084                 ;;
5085         (*)
5086                 LIBTOOL_CXX="$LIBTOOL"
5087                 ;;
5088         esac
5089 else
5090         LIBTOOL=""
5091         LIBTOOL_CXX=""
5092 fi
5093
5094 test -z "$LIBTOOL" && ECHO_LT=
5095
5096 if test "$with_libtool" != "no" ; then
5097
5098 cf_list_models="$cf_list_models libtool"
5099
5100 else
5101
5102 echo "$as_me:5102: checking if you want to build shared libraries" >&5
5103 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5104
5105 # Check whether --with-shared or --without-shared was given.
5106 if test "${with_shared+set}" = set; then
5107   withval="$with_shared"
5108   with_shared=$withval
5109 else
5110   with_shared=no
5111 fi;
5112 echo "$as_me:5112: result: $with_shared" >&5
5113 echo "${ECHO_T}$with_shared" >&6
5114 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5115
5116 echo "$as_me:5116: checking if you want to build static libraries" >&5
5117 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5118
5119 # Check whether --with-normal or --without-normal was given.
5120 if test "${with_normal+set}" = set; then
5121   withval="$with_normal"
5122   with_normal=$withval
5123 else
5124   with_normal=yes
5125 fi;
5126 echo "$as_me:5126: result: $with_normal" >&5
5127 echo "${ECHO_T}$with_normal" >&6
5128 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5129
5130 echo "$as_me:5130: checking if you want to build debug libraries" >&5
5131 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5132
5133 # Check whether --with-debug or --without-debug was given.
5134 if test "${with_debug+set}" = set; then
5135   withval="$with_debug"
5136   with_debug=$withval
5137 else
5138   with_debug=yes
5139 fi;
5140 echo "$as_me:5140: result: $with_debug" >&5
5141 echo "${ECHO_T}$with_debug" >&6
5142 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5143
5144 echo "$as_me:5144: checking if you want to build profiling libraries" >&5
5145 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5146
5147 # Check whether --with-profile or --without-profile was given.
5148 if test "${with_profile+set}" = set; then
5149   withval="$with_profile"
5150   with_profile=$withval
5151 else
5152   with_profile=no
5153 fi;
5154 echo "$as_me:5154: result: $with_profile" >&5
5155 echo "${ECHO_T}$with_profile" >&6
5156 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5157
5158 fi
5159
5160 if test "X$cf_with_cxx_binding" != Xno; then
5161 if test "x$with_shared" = "xyes"; then
5162 echo "$as_me:5162: checking if you want to build C++ shared libraries" >&5
5163 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5164
5165 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5166 if test "${with_cxx_shared+set}" = set; then
5167   withval="$with_cxx_shared"
5168   with_shared_cxx=$withval
5169 else
5170   with_shared_cxx=no
5171 fi;
5172 echo "$as_me:5172: result: $with_shared_cxx" >&5
5173 echo "${ECHO_T}$with_shared_cxx" >&6
5174 fi
5175 fi
5176
5177 ###############################################################################
5178
5179 echo "$as_me:5179: checking for specified models" >&5
5180 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5181 test -z "$cf_list_models" && cf_list_models=normal
5182 test "$with_libtool" != "no" && cf_list_models=libtool
5183 echo "$as_me:5183: result: $cf_list_models" >&5
5184 echo "${ECHO_T}$cf_list_models" >&6
5185
5186 ### Use the first model as the default, and save its suffix for use in building
5187 ### up test-applications.
5188 echo "$as_me:5188: checking for default model" >&5
5189 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5190 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5191 echo "$as_me:5191: result: $DFT_LWR_MODEL" >&5
5192 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5193
5194 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5195
5196 TICS_NAME=tic
5197
5198 TINFO_NAME=tinfo
5199
5200 LIB_NAME=ncurses
5201
5202 LIB_DIR=../lib
5203 LIB_2ND=../../lib
5204
5205 echo "$as_me:5205: checking if you want to have a library-prefix" >&5
5206 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5207
5208 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5209 if test "${with_lib_prefix+set}" = set; then
5210   withval="$with_lib_prefix"
5211   with_lib_prefix=$withval
5212 else
5213   with_lib_prefix=auto
5214 fi;
5215 echo "$as_me:5215: result: $with_lib_prefix" >&5
5216 echo "${ECHO_T}$with_lib_prefix" >&6
5217
5218 if test $with_lib_prefix = auto
5219 then
5220
5221         case $cf_cv_system_name in
5222         (OS/2*|os2*)
5223                 if test "$DFT_LWR_MODEL" = libtool; then
5224                         LIB_PREFIX='lib'
5225                 else
5226                         LIB_PREFIX=''
5227                 fi
5228                 ;;
5229         (*)     LIB_PREFIX='lib'
5230                 ;;
5231         esac
5232 cf_prefix=$LIB_PREFIX
5233
5234 elif test $with_lib_prefix = no
5235 then
5236         LIB_PREFIX=
5237 else
5238         LIB_PREFIX=$with_lib_prefix
5239 fi
5240
5241 LIB_SUFFIX=
5242
5243         echo "$as_me:5243: checking for PATH separator" >&5
5244 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5245         case $cf_cv_system_name in
5246         (os2*)  PATH_SEPARATOR=';'  ;;
5247         (*)     ${PATH_SEPARATOR:=':'}  ;;
5248         esac
5249
5250         echo "$as_me:5250: result: $PATH_SEPARATOR" >&5
5251 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5252
5253 ###############################################################################
5254
5255 echo "$as_me:5255: checking if you want to build a separate terminfo library" >&5
5256 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5257
5258 # Check whether --with-termlib or --without-termlib was given.
5259 if test "${with_termlib+set}" = set; then
5260   withval="$with_termlib"
5261   with_termlib=$withval
5262 else
5263   with_termlib=no
5264 fi;
5265 echo "$as_me:5265: result: $with_termlib" >&5
5266 echo "${ECHO_T}$with_termlib" >&6
5267
5268 echo "$as_me:5268: checking if you want to build a separate tic library" >&5
5269 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5270
5271 # Check whether --with-ticlib or --without-ticlib was given.
5272 if test "${with_ticlib+set}" = set; then
5273   withval="$with_ticlib"
5274   with_ticlib=$withval
5275 else
5276   with_ticlib=no
5277 fi;
5278 echo "$as_me:5278: result: $with_ticlib" >&5
5279 echo "${ECHO_T}$with_ticlib" >&6
5280
5281 ### Checks for special libraries, must be done up-front.
5282 SHLIB_LIST=""
5283
5284 echo "$as_me:5284: checking if you want to link with the GPM mouse library" >&5
5285 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5286
5287 # Check whether --with-gpm or --without-gpm was given.
5288 if test "${with_gpm+set}" = set; then
5289   withval="$with_gpm"
5290   with_gpm=$withval
5291 else
5292   with_gpm=maybe
5293 fi;
5294 echo "$as_me:5294: result: $with_gpm" >&5
5295 echo "${ECHO_T}$with_gpm" >&6
5296
5297 if test "$with_gpm" != no ; then
5298         echo "$as_me:5298: checking for gpm.h" >&5
5299 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5300 if test "${ac_cv_header_gpm_h+set}" = set; then
5301   echo $ECHO_N "(cached) $ECHO_C" >&6
5302 else
5303   cat >conftest.$ac_ext <<_ACEOF
5304 #line 5304 "configure"
5305 #include "confdefs.h"
5306 #include <gpm.h>
5307 _ACEOF
5308 if { (eval echo "$as_me:5308: \"$ac_cpp conftest.$ac_ext\"") >&5
5309   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5310   ac_status=$?
5311   egrep -v '^ *\+' conftest.er1 >conftest.err
5312   rm -f conftest.er1
5313   cat conftest.err >&5
5314   echo "$as_me:5314: \$? = $ac_status" >&5
5315   (exit $ac_status); } >/dev/null; then
5316   if test -s conftest.err; then
5317     ac_cpp_err=$ac_c_preproc_warn_flag
5318   else
5319     ac_cpp_err=
5320   fi
5321 else
5322   ac_cpp_err=yes
5323 fi
5324 if test -z "$ac_cpp_err"; then
5325   ac_cv_header_gpm_h=yes
5326 else
5327   echo "$as_me: failed program was:" >&5
5328   cat conftest.$ac_ext >&5
5329   ac_cv_header_gpm_h=no
5330 fi
5331 rm -f conftest.err conftest.$ac_ext
5332 fi
5333 echo "$as_me:5333: result: $ac_cv_header_gpm_h" >&5
5334 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5335 if test $ac_cv_header_gpm_h = yes; then
5336
5337 cat >>confdefs.h <<\EOF
5338 #define HAVE_GPM_H 1
5339 EOF
5340
5341                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5342                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5343
5344 echo "${as_me:-configure}:5344: testing assuming we really have GPM library ..." 1>&5
5345
5346 cat >>confdefs.h <<\EOF
5347 #define HAVE_LIBGPM 1
5348 EOF
5349
5350                         with_gpm=yes
5351                 else
5352                         echo "$as_me:5352: checking for Gpm_Open in -lgpm" >&5
5353 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5354 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5355   echo $ECHO_N "(cached) $ECHO_C" >&6
5356 else
5357   ac_check_lib_save_LIBS=$LIBS
5358 LIBS="-lgpm  $LIBS"
5359 cat >conftest.$ac_ext <<_ACEOF
5360 #line 5360 "configure"
5361 #include "confdefs.h"
5362
5363 /* Override any gcc2 internal prototype to avoid an error.  */
5364 #ifdef __cplusplus
5365 extern "C"
5366 #endif
5367 /* We use char because int might match the return type of a gcc2
5368    builtin and then its argument prototype would still apply.  */
5369 char Gpm_Open ();
5370 int
5371 main (void)
5372 {
5373 Gpm_Open ();
5374   ;
5375   return 0;
5376 }
5377 _ACEOF
5378 rm -f conftest.$ac_objext conftest$ac_exeext
5379 if { (eval echo "$as_me:5379: \"$ac_link\"") >&5
5380   (eval $ac_link) 2>&5
5381   ac_status=$?
5382   echo "$as_me:5382: \$? = $ac_status" >&5
5383   (exit $ac_status); } &&
5384          { ac_try='test -s conftest$ac_exeext'
5385   { (eval echo "$as_me:5385: \"$ac_try\"") >&5
5386   (eval $ac_try) 2>&5
5387   ac_status=$?
5388   echo "$as_me:5388: \$? = $ac_status" >&5
5389   (exit $ac_status); }; }; then
5390   ac_cv_lib_gpm_Gpm_Open=yes
5391 else
5392   echo "$as_me: failed program was:" >&5
5393 cat conftest.$ac_ext >&5
5394 ac_cv_lib_gpm_Gpm_Open=no
5395 fi
5396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5397 LIBS=$ac_check_lib_save_LIBS
5398 fi
5399 echo "$as_me:5399: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5400 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5401 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5402   with_gpm=yes
5403 else
5404
5405                                 if test "$with_gpm" = maybe; then
5406                                         { echo "$as_me:5406: WARNING: Cannot link with GPM library" >&5
5407 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5408                                         with_gpm=no
5409                                 else
5410                                         { { echo "$as_me:5410: error: Cannot link with GPM library" >&5
5411 echo "$as_me: error: Cannot link with GPM library" >&2;}
5412    { (exit 1); exit 1; }; }
5413                                 fi
5414
5415 fi
5416
5417                 fi
5418
5419 else
5420
5421                 test "$with_gpm" != maybe && { echo "$as_me:5421: WARNING: Cannot find GPM header" >&5
5422 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5423                 with_gpm=no
5424
5425 fi
5426
5427 fi
5428
5429 if test "$with_gpm" != no ; then
5430         echo "$as_me:5430: checking if you want to load GPM dynamically" >&5
5431 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5432
5433 # Check whether --with-dlsym or --without-dlsym was given.
5434 if test "${with_dlsym+set}" = set; then
5435   withval="$with_dlsym"
5436   with_dlsym=$withval
5437 else
5438   with_dlsym=yes
5439 fi;
5440         echo "$as_me:5440: result: $with_dlsym" >&5
5441 echo "${ECHO_T}$with_dlsym" >&6
5442         if test "x$with_dlsym" = xyes ; then
5443
5444 cf_have_dlsym=no
5445 echo "$as_me:5445: checking for dlsym" >&5
5446 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5447 if test "${ac_cv_func_dlsym+set}" = set; then
5448   echo $ECHO_N "(cached) $ECHO_C" >&6
5449 else
5450   cat >conftest.$ac_ext <<_ACEOF
5451 #line 5451 "configure"
5452 #include "confdefs.h"
5453 /* System header to define __stub macros and hopefully few prototypes,
5454     which can conflict with char dlsym (); below.  */
5455 #include <assert.h>
5456 /* Override any gcc2 internal prototype to avoid an error.  */
5457 #ifdef __cplusplus
5458 extern "C"
5459 #endif
5460 /* We use char because int might match the return type of a gcc2
5461    builtin and then its argument prototype would still apply.  */
5462 char dlsym ();
5463 char (*f) ();
5464
5465 int
5466 main (void)
5467 {
5468 /* The GNU C library defines this for functions which it implements
5469     to always fail with ENOSYS.  Some functions are actually named
5470     something starting with __ and the normal name is an alias.  */
5471 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5472 choke me
5473 #else
5474 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5475 #endif
5476
5477   ;
5478   return 0;
5479 }
5480 _ACEOF
5481 rm -f conftest.$ac_objext conftest$ac_exeext
5482 if { (eval echo "$as_me:5482: \"$ac_link\"") >&5
5483   (eval $ac_link) 2>&5
5484   ac_status=$?
5485   echo "$as_me:5485: \$? = $ac_status" >&5
5486   (exit $ac_status); } &&
5487          { ac_try='test -s conftest$ac_exeext'
5488   { (eval echo "$as_me:5488: \"$ac_try\"") >&5
5489   (eval $ac_try) 2>&5
5490   ac_status=$?
5491   echo "$as_me:5491: \$? = $ac_status" >&5
5492   (exit $ac_status); }; }; then
5493   ac_cv_func_dlsym=yes
5494 else
5495   echo "$as_me: failed program was:" >&5
5496 cat conftest.$ac_ext >&5
5497 ac_cv_func_dlsym=no
5498 fi
5499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5500 fi
5501 echo "$as_me:5501: result: $ac_cv_func_dlsym" >&5
5502 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5503 if test $ac_cv_func_dlsym = yes; then
5504   cf_have_dlsym=yes
5505 else
5506
5507 cf_have_libdl=no
5508 echo "$as_me:5508: checking for dlsym in -ldl" >&5
5509 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5510 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5511   echo $ECHO_N "(cached) $ECHO_C" >&6
5512 else
5513   ac_check_lib_save_LIBS=$LIBS
5514 LIBS="-ldl  $LIBS"
5515 cat >conftest.$ac_ext <<_ACEOF
5516 #line 5516 "configure"
5517 #include "confdefs.h"
5518
5519 /* Override any gcc2 internal prototype to avoid an error.  */
5520 #ifdef __cplusplus
5521 extern "C"
5522 #endif
5523 /* We use char because int might match the return type of a gcc2
5524    builtin and then its argument prototype would still apply.  */
5525 char dlsym ();
5526 int
5527 main (void)
5528 {
5529 dlsym ();
5530   ;
5531   return 0;
5532 }
5533 _ACEOF
5534 rm -f conftest.$ac_objext conftest$ac_exeext
5535 if { (eval echo "$as_me:5535: \"$ac_link\"") >&5
5536   (eval $ac_link) 2>&5
5537   ac_status=$?
5538   echo "$as_me:5538: \$? = $ac_status" >&5
5539   (exit $ac_status); } &&
5540          { ac_try='test -s conftest$ac_exeext'
5541   { (eval echo "$as_me:5541: \"$ac_try\"") >&5
5542   (eval $ac_try) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); }; }; then
5546   ac_cv_lib_dl_dlsym=yes
5547 else
5548   echo "$as_me: failed program was:" >&5
5549 cat conftest.$ac_ext >&5
5550 ac_cv_lib_dl_dlsym=no
5551 fi
5552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5553 LIBS=$ac_check_lib_save_LIBS
5554 fi
5555 echo "$as_me:5555: result: $ac_cv_lib_dl_dlsym" >&5
5556 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5557 if test $ac_cv_lib_dl_dlsym = yes; then
5558
5559         cf_have_dlsym=yes
5560         cf_have_libdl=yes
5561 fi
5562
5563 fi
5564
5565 if test "$cf_have_dlsym" = yes ; then
5566         test "$cf_have_libdl" = yes && {
5567 cf_add_libs="-ldl"
5568 # Filter out duplicates - this happens with badly-designed ".pc" files...
5569 for cf_add_1lib in $LIBS
5570 do
5571         for cf_add_2lib in $cf_add_libs
5572         do
5573                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5574                 then
5575                         cf_add_1lib=
5576                         break
5577                 fi
5578         done
5579         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5580 done
5581 LIBS="$cf_add_libs"
5582  }
5583
5584         echo "$as_me:5584: checking whether able to link to dl*() functions" >&5
5585 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5586         cat >conftest.$ac_ext <<_ACEOF
5587 #line 5587 "configure"
5588 #include "confdefs.h"
5589 #include <dlfcn.h>
5590 int
5591 main (void)
5592 {
5593
5594                 void *obj;
5595                 if ((obj = dlopen("filename", 0)) != 0) {
5596                         if (dlsym(obj, "symbolname") == 0) {
5597                         dlclose(obj);
5598                         }
5599                 }
5600   ;
5601   return 0;
5602 }
5603 _ACEOF
5604 rm -f conftest.$ac_objext conftest$ac_exeext
5605 if { (eval echo "$as_me:5605: \"$ac_link\"") >&5
5606   (eval $ac_link) 2>&5
5607   ac_status=$?
5608   echo "$as_me:5608: \$? = $ac_status" >&5
5609   (exit $ac_status); } &&
5610          { ac_try='test -s conftest$ac_exeext'
5611   { (eval echo "$as_me:5611: \"$ac_try\"") >&5
5612   (eval $ac_try) 2>&5
5613   ac_status=$?
5614   echo "$as_me:5614: \$? = $ac_status" >&5
5615   (exit $ac_status); }; }; then
5616
5617 cat >>confdefs.h <<\EOF
5618 #define HAVE_LIBDL 1
5619 EOF
5620
5621 else
5622   echo "$as_me: failed program was:" >&5
5623 cat conftest.$ac_ext >&5
5624
5625                 { { echo "$as_me:5625: error: Cannot link test program for libdl" >&5
5626 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5627    { (exit 1); exit 1; }; }
5628 fi
5629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5630         echo "$as_me:5630: result: ok" >&5
5631 echo "${ECHO_T}ok" >&6
5632 else
5633         { { echo "$as_me:5633: error: Cannot find dlsym function" >&5
5634 echo "$as_me: error: Cannot find dlsym function" >&2;}
5635    { (exit 1); exit 1; }; }
5636 fi
5637
5638                 if test "x$with_gpm" != xyes ; then
5639                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5640
5641 echo "${as_me:-configure}:5641: testing assuming soname for gpm is $with_gpm ..." 1>&5
5642
5643                         cf_cv_gpm_soname="$with_gpm"
5644                 else
5645
5646 echo "$as_me:5646: checking for soname of gpm library" >&5
5647 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5648 if test "${cf_cv_gpm_soname+set}" = set; then
5649   echo $ECHO_N "(cached) $ECHO_C" >&6
5650 else
5651
5652 cf_cv_gpm_soname=unknown
5653 if test "$cross_compiling" != yes ; then
5654 cat >conftest.$ac_ext <<CF_EOF
5655 #include <gpm.h>
5656 int main(void)
5657 {
5658 if (Gpm_Open(0,0)) Gpm_Close();
5659         ${cf_cv_main_return:-return}(0);
5660 }
5661 CF_EOF
5662 cf_save_LIBS="$LIBS"
5663
5664 cf_add_libs="-lgpm"
5665 # Filter out duplicates - this happens with badly-designed ".pc" files...
5666 for cf_add_1lib in $LIBS
5667 do
5668         for cf_add_2lib in $cf_add_libs
5669         do
5670                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5671                 then
5672                         cf_add_1lib=
5673                         break
5674                 fi
5675         done
5676         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5677 done
5678 LIBS="$cf_add_libs"
5679
5680         if { (eval echo "$as_me:5680: \"$ac_compile\"") >&5
5681   (eval $ac_compile) 2>&5
5682   ac_status=$?
5683   echo "$as_me:5683: \$? = $ac_status" >&5
5684   (exit $ac_status); } ; then
5685                 if { (eval echo "$as_me:5685: \"$ac_link\"") >&5
5686   (eval $ac_link) 2>&5
5687   ac_status=$?
5688   echo "$as_me:5688: \$? = $ac_status" >&5
5689   (exit $ac_status); } ; then
5690                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5691                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5692                 fi
5693         fi
5694 rm -rf conftest*
5695 LIBS="$cf_save_LIBS"
5696 fi
5697
5698 fi
5699 echo "$as_me:5699: result: $cf_cv_gpm_soname" >&5
5700 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5701
5702                 fi
5703                 test "$cf_cv_gpm_soname" != "unknown" &&
5704 cat >>confdefs.h <<EOF
5705 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5706 EOF
5707
5708                 SHLIB_LIST="-ldl $SHLIB_LIST"
5709         else
5710                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5711
5712 cf_add_libs="-lgpm"
5713 # Filter out duplicates - this happens with badly-designed ".pc" files...
5714 for cf_add_1lib in $TEST_LIBS
5715 do
5716         for cf_add_2lib in $cf_add_libs
5717         do
5718                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5719                 then
5720                         cf_add_1lib=
5721                         break
5722                 fi
5723         done
5724         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5725 done
5726 TEST_LIBS="$cf_add_libs"
5727
5728         fi
5729
5730 cat >>confdefs.h <<\EOF
5731 #define HAVE_LIBGPM 1
5732 EOF
5733
5734 echo "$as_me:5734: checking for Gpm_Wgetch in -lgpm" >&5
5735 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5736 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5737   echo $ECHO_N "(cached) $ECHO_C" >&6
5738 else
5739   ac_check_lib_save_LIBS=$LIBS
5740 LIBS="-lgpm  $LIBS"
5741 cat >conftest.$ac_ext <<_ACEOF
5742 #line 5742 "configure"
5743 #include "confdefs.h"
5744
5745 /* Override any gcc2 internal prototype to avoid an error.  */
5746 #ifdef __cplusplus
5747 extern "C"
5748 #endif
5749 /* We use char because int might match the return type of a gcc2
5750    builtin and then its argument prototype would still apply.  */
5751 char Gpm_Wgetch ();
5752 int
5753 main (void)
5754 {
5755 Gpm_Wgetch ();
5756   ;
5757   return 0;
5758 }
5759 _ACEOF
5760 rm -f conftest.$ac_objext conftest$ac_exeext
5761 if { (eval echo "$as_me:5761: \"$ac_link\"") >&5
5762   (eval $ac_link) 2>&5
5763   ac_status=$?
5764   echo "$as_me:5764: \$? = $ac_status" >&5
5765   (exit $ac_status); } &&
5766          { ac_try='test -s conftest$ac_exeext'
5767   { (eval echo "$as_me:5767: \"$ac_try\"") >&5
5768   (eval $ac_try) 2>&5
5769   ac_status=$?
5770   echo "$as_me:5770: \$? = $ac_status" >&5
5771   (exit $ac_status); }; }; then
5772   ac_cv_lib_gpm_Gpm_Wgetch=yes
5773 else
5774   echo "$as_me: failed program was:" >&5
5775 cat conftest.$ac_ext >&5
5776 ac_cv_lib_gpm_Gpm_Wgetch=no
5777 fi
5778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5779 LIBS=$ac_check_lib_save_LIBS
5780 fi
5781 echo "$as_me:5781: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5782 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5783 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5784
5785 echo "$as_me:5785: checking if GPM is weakly bound to curses library" >&5
5786 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5787 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5788   echo $ECHO_N "(cached) $ECHO_C" >&6
5789 else
5790
5791 cf_cv_check_gpm_wgetch=unknown
5792 if test "$cross_compiling" != yes ; then
5793
5794 cat >conftest.$ac_ext <<CF_EOF
5795 #include <gpm.h>
5796 int main(void)
5797 {
5798         Gpm_Wgetch();
5799         ${cf_cv_main_return:-return}(0);
5800 }
5801 CF_EOF
5802
5803         cf_save_LIBS="$LIBS"
5804         # This only works if we can look at the symbol table.  If a shared
5805         # library is stripped for install, we cannot use that.  So we're forced
5806         # to rely on the static library, noting that some packagers may not
5807         # include it.
5808         LIBS="-static -lgpm -dynamic $LIBS"
5809         if { (eval echo "$as_me:5809: \"$ac_compile\"") >&5
5810   (eval $ac_compile) 2>&5
5811   ac_status=$?
5812   echo "$as_me:5812: \$? = $ac_status" >&5
5813   (exit $ac_status); } ; then
5814                 if { (eval echo "$as_me:5814: \"$ac_link\"") >&5
5815   (eval $ac_link) 2>&5
5816   ac_status=$?
5817   echo "$as_me:5817: \$? = $ac_status" >&5
5818   (exit $ac_status); } ; then
5819                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5820                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5821                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5822                 fi
5823         fi
5824         rm -rf conftest*
5825         LIBS="$cf_save_LIBS"
5826 fi
5827
5828 fi
5829 echo "$as_me:5829: result: $cf_cv_check_gpm_wgetch" >&5
5830 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5831
5832 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5833         { echo "$as_me:5833: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5834 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5835 fi
5836
5837 fi
5838
5839 fi
5840
5841 # not everyone has "test -c"
5842 if test -c /dev/sysmouse 2>/dev/null ; then
5843 echo "$as_me:5843: checking if you want to use sysmouse" >&5
5844 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5845
5846 # Check whether --with-sysmouse or --without-sysmouse was given.
5847 if test "${with_sysmouse+set}" = set; then
5848   withval="$with_sysmouse"
5849   cf_with_sysmouse=$withval
5850 else
5851   cf_with_sysmouse=maybe
5852 fi;
5853         if test "$cf_with_sysmouse" != no ; then
5854         cat >conftest.$ac_ext <<_ACEOF
5855 #line 5855 "configure"
5856 #include "confdefs.h"
5857
5858 #include <osreldate.h>
5859 #if (__FreeBSD_version >= 400017)
5860 #include <sys/consio.h>
5861 #include <sys/fbio.h>
5862 #else
5863 #include <machine/console.h>
5864 #endif
5865
5866 int
5867 main (void)
5868 {
5869
5870         struct mouse_info the_mouse;
5871         ioctl(0, CONS_MOUSECTL, &the_mouse);
5872
5873   ;
5874   return 0;
5875 }
5876 _ACEOF
5877 rm -f conftest.$ac_objext
5878 if { (eval echo "$as_me:5878: \"$ac_compile\"") >&5
5879   (eval $ac_compile) 2>&5
5880   ac_status=$?
5881   echo "$as_me:5881: \$? = $ac_status" >&5
5882   (exit $ac_status); } &&
5883          { ac_try='test -s conftest.$ac_objext'
5884   { (eval echo "$as_me:5884: \"$ac_try\"") >&5
5885   (eval $ac_try) 2>&5
5886   ac_status=$?
5887   echo "$as_me:5887: \$? = $ac_status" >&5
5888   (exit $ac_status); }; }; then
5889   cf_with_sysmouse=yes
5890 else
5891   echo "$as_me: failed program was:" >&5
5892 cat conftest.$ac_ext >&5
5893 cf_with_sysmouse=no
5894 fi
5895 rm -f conftest.$ac_objext conftest.$ac_ext
5896         fi
5897 echo "$as_me:5897: result: $cf_with_sysmouse" >&5
5898 echo "${ECHO_T}$cf_with_sysmouse" >&6
5899 test "$cf_with_sysmouse" = yes &&
5900 cat >>confdefs.h <<\EOF
5901 #define USE_SYSMOUSE 1
5902 EOF
5903
5904 fi
5905
5906 if test X"$CC_G_OPT" = X"" ; then
5907         CC_G_OPT='-g'
5908         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5909 fi
5910
5911 if test X"$CXX_G_OPT" = X"" ; then
5912         CXX_G_OPT='-g'
5913         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5914 fi
5915
5916 echo "$as_me:5916: checking for default loader flags" >&5
5917 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5918 case $DFT_LWR_MODEL in
5919 (libtool) LD_MODEL=''   ;;
5920 (normal)  LD_MODEL=''   ;;
5921 (debug)   LD_MODEL=$CC_G_OPT ;;
5922 (profile) LD_MODEL='-pg';;
5923 (shared)  LD_MODEL=''   ;;
5924 esac
5925 echo "$as_me:5925: result: $LD_MODEL" >&5
5926 echo "${ECHO_T}$LD_MODEL" >&6
5927
5928 case $DFT_LWR_MODEL in
5929 (shared)
5930
5931 echo "$as_me:5931: checking if rpath option should be used" >&5
5932 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5933
5934 # Check whether --enable-rpath or --disable-rpath was given.
5935 if test "${enable_rpath+set}" = set; then
5936   enableval="$enable_rpath"
5937   cf_cv_enable_rpath=$enableval
5938 else
5939   cf_cv_enable_rpath=no
5940 fi;
5941 echo "$as_me:5941: result: $cf_cv_enable_rpath" >&5
5942 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5943
5944 echo "$as_me:5944: checking if shared libraries should be relinked during install" >&5
5945 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5946
5947 # Check whether --enable-relink or --disable-relink was given.
5948 if test "${enable_relink+set}" = set; then
5949   enableval="$enable_relink"
5950   cf_cv_do_relink=$enableval
5951 else
5952   cf_cv_do_relink=yes
5953 fi;
5954 echo "$as_me:5954: result: $cf_cv_do_relink" >&5
5955 echo "${ECHO_T}$cf_cv_do_relink" >&6
5956         ;;
5957 esac
5958
5959 # we will build libraries one-level down.
5960 rel_builddir=..
5961
5962 LD_RPATH_OPT=
5963 echo "$as_me:5963: checking for an rpath option" >&5
5964 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5965 case $cf_cv_system_name in
5966 (irix*)
5967         if test "$GCC" = yes; then
5968                 LD_RPATH_OPT="-Wl,-rpath,"
5969         else
5970                 LD_RPATH_OPT="-rpath "
5971         fi
5972         ;;
5973 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5974         LD_RPATH_OPT="-Wl,-rpath,"
5975         ;;
5976 (openbsd[2-9].*|mirbsd*)
5977         LD_RPATH_OPT="-Wl,-rpath,"
5978         ;;
5979 (dragonfly*)
5980         LD_RPATH_OPT="-rpath "
5981         ;;
5982 (netbsd*)
5983         LD_RPATH_OPT="-Wl,-rpath,"
5984         ;;
5985 (osf*|mls+*)
5986         LD_RPATH_OPT="-rpath "
5987         ;;
5988 (solaris2*)
5989         LD_RPATH_OPT="-R"
5990         ;;
5991 (*)
5992         ;;
5993 esac
5994 echo "$as_me:5994: result: $LD_RPATH_OPT" >&5
5995 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5996
5997 case "x$LD_RPATH_OPT" in
5998 (x-R*)
5999         echo "$as_me:5999: checking if we need a space after rpath option" >&5
6000 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6001         cf_save_LIBS="$LIBS"
6002
6003 cf_add_libs="${LD_RPATH_OPT}$libdir"
6004 # Filter out duplicates - this happens with badly-designed ".pc" files...
6005 for cf_add_1lib in $LIBS
6006 do
6007         for cf_add_2lib in $cf_add_libs
6008         do
6009                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6010                 then
6011                         cf_add_1lib=
6012                         break
6013                 fi
6014         done
6015         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6016 done
6017 LIBS="$cf_add_libs"
6018
6019         cat >conftest.$ac_ext <<_ACEOF
6020 #line 6020 "configure"
6021 #include "confdefs.h"
6022
6023 int
6024 main (void)
6025 {
6026
6027   ;
6028   return 0;
6029 }
6030 _ACEOF
6031 rm -f conftest.$ac_objext conftest$ac_exeext
6032 if { (eval echo "$as_me:6032: \"$ac_link\"") >&5
6033   (eval $ac_link) 2>&5
6034   ac_status=$?
6035   echo "$as_me:6035: \$? = $ac_status" >&5
6036   (exit $ac_status); } &&
6037          { ac_try='test -s conftest$ac_exeext'
6038   { (eval echo "$as_me:6038: \"$ac_try\"") >&5
6039   (eval $ac_try) 2>&5
6040   ac_status=$?
6041   echo "$as_me:6041: \$? = $ac_status" >&5
6042   (exit $ac_status); }; }; then
6043   cf_rpath_space=no
6044 else
6045   echo "$as_me: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047 cf_rpath_space=yes
6048 fi
6049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6050         LIBS="$cf_save_LIBS"
6051         echo "$as_me:6051: result: $cf_rpath_space" >&5
6052 echo "${ECHO_T}$cf_rpath_space" >&6
6053         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6054         ;;
6055 esac
6056
6057         RM_SHARED_OPTS=
6058         LOCAL_LDFLAGS=
6059         LOCAL_LDFLAGS2=
6060         LD_SHARED_OPTS=
6061         INSTALL_LIB="-m 644"
6062         : ${rel_builddir:=.}
6063
6064         shlibdir=$libdir
6065
6066         MAKE_DLLS="#"
6067
6068         cf_cv_do_symlinks=no
6069         cf_ld_rpath_opt=
6070         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6071
6072         echo "$as_me:6072: checking if release/abi version should be used for shared libs" >&5
6073 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6074
6075 # Check whether --with-shlib-version or --without-shlib-version was given.
6076 if test "${with_shlib_version+set}" = set; then
6077   withval="$with_shlib_version"
6078   test -z "$withval" && withval=auto
6079         case $withval in
6080         (yes)
6081                 cf_cv_shlib_version=auto
6082                 ;;
6083         (rel|abi|auto)
6084                 cf_cv_shlib_version=$withval
6085                 ;;
6086         (*)
6087                 echo "$as_me:6087: result: $withval" >&5
6088 echo "${ECHO_T}$withval" >&6
6089                 { { echo "$as_me:6089: error: option value must be one of: rel, abi, or auto" >&5
6090 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6091    { (exit 1); exit 1; }; }
6092                 ;;
6093         esac
6094
6095 else
6096   cf_cv_shlib_version=auto
6097 fi;
6098         echo "$as_me:6098: result: $cf_cv_shlib_version" >&5
6099 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6100
6101         cf_cv_rm_so_locs=no
6102         cf_try_cflags=
6103
6104         # Some less-capable ports of gcc support only -fpic
6105         CC_SHARED_OPTS=
6106
6107         cf_try_fPIC=no
6108         if test "$GCC" = yes
6109         then
6110                 cf_try_fPIC=yes
6111         else
6112                 case $cf_cv_system_name in
6113                 (*linux*)       # e.g., PGI compiler
6114                         cf_try_fPIC=yes
6115                         ;;
6116                 esac
6117         fi
6118
6119         if test "$cf_try_fPIC" = yes
6120         then
6121                 echo "$as_me:6121: checking which $CC option to use" >&5
6122 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6123                 cf_save_CFLAGS="$CFLAGS"
6124                 for CC_SHARED_OPTS in -fPIC -fpic ''
6125                 do
6126                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6127                         cat >conftest.$ac_ext <<_ACEOF
6128 #line 6128 "configure"
6129 #include "confdefs.h"
6130 #include <stdio.h>
6131 int
6132 main (void)
6133 {
6134 int x = 1
6135   ;
6136   return 0;
6137 }
6138 _ACEOF
6139 rm -f conftest.$ac_objext
6140 if { (eval echo "$as_me:6140: \"$ac_compile\"") >&5
6141   (eval $ac_compile) 2>&5
6142   ac_status=$?
6143   echo "$as_me:6143: \$? = $ac_status" >&5
6144   (exit $ac_status); } &&
6145          { ac_try='test -s conftest.$ac_objext'
6146   { (eval echo "$as_me:6146: \"$ac_try\"") >&5
6147   (eval $ac_try) 2>&5
6148   ac_status=$?
6149   echo "$as_me:6149: \$? = $ac_status" >&5
6150   (exit $ac_status); }; }; then
6151   break
6152 else
6153   echo "$as_me: failed program was:" >&5
6154 cat conftest.$ac_ext >&5
6155 fi
6156 rm -f conftest.$ac_objext conftest.$ac_ext
6157                 done
6158                 echo "$as_me:6158: result: $CC_SHARED_OPTS" >&5
6159 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6160                 CFLAGS="$cf_save_CFLAGS"
6161         fi
6162
6163         cf_cv_shlib_version_infix=no
6164
6165         case $cf_cv_system_name in
6166         (aix4.3-9*|aix[5-7]*)
6167                 if test "$GCC" = yes; then
6168                         CC_SHARED_OPTS='-Wl,-brtl'
6169                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6170                 else
6171                         CC_SHARED_OPTS='-brtl'
6172                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6173                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6174                 fi
6175                 ;;
6176         (beos*)
6177                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6178                 ;;
6179         (cygwin*)
6180                 CC_SHARED_OPTS=
6181                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6182                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6183                 cf_cv_shlib_version=cygdll
6184                 cf_cv_shlib_version_infix=cygdll
6185                 shlibdir=$bindir
6186                 MAKE_DLLS=
6187                 cat >mk_shared_lib.sh <<-CF_EOF
6188                 #!$SHELL
6189                 SHARED_LIB=\$1
6190                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6191                 shift
6192                 cat <<-EOF
6193                 Linking shared library
6194                 ** SHARED_LIB \$SHARED_LIB
6195                 ** IMPORT_LIB \$IMPORT_LIB
6196 EOF
6197                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6198 CF_EOF
6199                 chmod +x mk_shared_lib.sh
6200                 ;;
6201         (msys*)
6202                 CC_SHARED_OPTS=
6203                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6204                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6205                 cf_cv_shlib_version=msysdll
6206                 cf_cv_shlib_version_infix=msysdll
6207                 shlibdir=$bindir
6208                 MAKE_DLLS=
6209                 cat >mk_shared_lib.sh <<-CF_EOF
6210                 #!$SHELL
6211                 SHARED_LIB=\$1
6212                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6213                 shift
6214                 cat <<-EOF
6215                 Linking shared library
6216                 ** SHARED_LIB \$SHARED_LIB
6217                 ** IMPORT_LIB \$IMPORT_LIB
6218 EOF
6219                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6220 CF_EOF
6221                 chmod +x mk_shared_lib.sh
6222                 ;;
6223         (darwin*)
6224                 cf_try_cflags="no-cpp-precomp"
6225                 CC_SHARED_OPTS="-dynamic"
6226                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6227                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6228                 cf_cv_shlib_version_infix=yes
6229                 echo "$as_me:6229: checking if ld -search_paths_first works" >&5
6230 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6231 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6232   echo $ECHO_N "(cached) $ECHO_C" >&6
6233 else
6234
6235                         cf_save_LDFLAGS=$LDFLAGS
6236                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6237                         cat >conftest.$ac_ext <<_ACEOF
6238 #line 6238 "configure"
6239 #include "confdefs.h"
6240
6241 int
6242 main (void)
6243 {
6244 int i;
6245   ;
6246   return 0;
6247 }
6248 _ACEOF
6249 rm -f conftest.$ac_objext conftest$ac_exeext
6250 if { (eval echo "$as_me:6250: \"$ac_link\"") >&5
6251   (eval $ac_link) 2>&5
6252   ac_status=$?
6253   echo "$as_me:6253: \$? = $ac_status" >&5
6254   (exit $ac_status); } &&
6255          { ac_try='test -s conftest$ac_exeext'
6256   { (eval echo "$as_me:6256: \"$ac_try\"") >&5
6257   (eval $ac_try) 2>&5
6258   ac_status=$?
6259   echo "$as_me:6259: \$? = $ac_status" >&5
6260   (exit $ac_status); }; }; then
6261   cf_cv_ldflags_search_paths_first=yes
6262 else
6263   echo "$as_me: failed program was:" >&5
6264 cat conftest.$ac_ext >&5
6265 cf_cv_ldflags_search_paths_first=no
6266 fi
6267 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6268                                 LDFLAGS=$cf_save_LDFLAGS
6269 fi
6270 echo "$as_me:6270: result: $cf_cv_ldflags_search_paths_first" >&5
6271 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6272                 if test $cf_cv_ldflags_search_paths_first = yes; then
6273                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6274                 fi
6275                 ;;
6276         (hpux[7-8]*)
6277                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6278                 if test "$GCC" != yes; then
6279                         CC_SHARED_OPTS='+Z'
6280                 fi
6281                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6282                 INSTALL_LIB="-m 555"
6283                 ;;
6284         (hpux*)
6285                 # (tested with gcc 2.7.2 -- I don't have c89)
6286                 if test "$GCC" = yes; then
6287                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6288                 else
6289                         CC_SHARED_OPTS='+Z'
6290                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6291                 fi
6292                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6293                 # HP-UX shared libraries must be executable, and should be
6294                 # readonly to exploit a quirk in the memory manager.
6295                 INSTALL_LIB="-m 555"
6296                 ;;
6297         (interix*)
6298                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6299                 if test "$cf_cv_shlib_version" = rel; then
6300                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6301                 else
6302                         cf_shared_soname='`basename $@`'
6303                 fi
6304                 CC_SHARED_OPTS=
6305                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6306                 ;;
6307         (irix*)
6308                 if test "$cf_cv_enable_rpath" = yes ; then
6309                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6310                 fi
6311                 # tested with IRIX 5.2 and 'cc'.
6312                 if test "$GCC" != yes; then
6313                         CC_SHARED_OPTS='-KPIC'
6314                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6315                 else
6316                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6317                 fi
6318                 cf_cv_rm_so_locs=yes
6319                 ;;
6320         (linux*|gnu*|k*bsd*-gnu)
6321                 if test "$DFT_LWR_MODEL" = "shared" ; then
6322                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6323                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6324                 fi
6325                 if test "$cf_cv_enable_rpath" = yes ; then
6326                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6327                 fi
6328
6329         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6330         if test "$cf_cv_shlib_version" = rel; then
6331                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6332         else
6333                 cf_cv_shared_soname='`basename $@`'
6334         fi
6335
6336                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6337                 ;;
6338         (mingw*)
6339                 cf_cv_shlib_version=mingw
6340                 cf_cv_shlib_version_infix=mingw
6341                 shlibdir=$bindir
6342                 MAKE_DLLS=
6343                 if test "$DFT_LWR_MODEL" = "shared" ; then
6344                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6345                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6346                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6347                 fi
6348                 CC_SHARED_OPTS=
6349                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6350                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6351                 cat >mk_shared_lib.sh <<-CF_EOF
6352                 #!$SHELL
6353                 SHARED_LIB=\$1
6354                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6355                 shift
6356                 cat <<-EOF
6357                 Linking shared library
6358                 ** SHARED_LIB \$SHARED_LIB
6359                 ** IMPORT_LIB \$IMPORT_LIB
6360 EOF
6361                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6362 CF_EOF
6363                 chmod +x mk_shared_lib.sh
6364                 ;;
6365         (openbsd[2-9].*|mirbsd*)
6366                 if test "$DFT_LWR_MODEL" = "shared" ; then
6367                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6368                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6369                 fi
6370                 if test "$cf_cv_enable_rpath" = yes ; then
6371                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6372                 fi
6373                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6374
6375         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6376         if test "$cf_cv_shlib_version" = rel; then
6377                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6378         else
6379                 cf_cv_shared_soname='`basename $@`'
6380         fi
6381
6382                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6383                 ;;
6384         (nto-qnx*|openbsd*|freebsd[12].*)
6385                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6386                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6387                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6388                 ;;
6389         (dragonfly*|freebsd*)
6390                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6391                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6392                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6393                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6394                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6395                 fi
6396
6397         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6398         if test "$cf_cv_shlib_version" = rel; then
6399                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6400         else
6401                 cf_cv_shared_soname='`basename $@`'
6402         fi
6403
6404                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6405                 ;;
6406         (netbsd*)
6407                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6408                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6409                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6410                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6411                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6412                         if test "$cf_cv_shlib_version" = auto; then
6413                         if test -f /usr/libexec/ld.elf_so; then
6414                                 cf_cv_shlib_version=abi
6415                         else
6416                                 cf_cv_shlib_version=rel
6417                         fi
6418                         fi
6419
6420         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6421         if test "$cf_cv_shlib_version" = rel; then
6422                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6423         else
6424                 cf_cv_shared_soname='`basename $@`'
6425         fi
6426
6427                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6428                 else
6429                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6430                 fi
6431                 ;;
6432         (osf*|mls+*)
6433                 # tested with OSF/1 V3.2 and 'cc'
6434                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6435                 # link with shared libs).
6436                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6437                 case $host_os in
6438                 (osf4*)
6439                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6440                         ;;
6441                 esac
6442                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6443                 if test "$DFT_LWR_MODEL" = "shared" ; then
6444                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6445                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6446                 fi
6447                 cf_cv_rm_so_locs=yes
6448                 ;;
6449         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6450                 # tested with osr5.0.5
6451                 if test "$GCC" != yes; then
6452                         CC_SHARED_OPTS='-belf -KPIC'
6453                 fi
6454                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6455                 if test "$cf_cv_enable_rpath" = yes ; then
6456                         # only way is to set LD_RUN_PATH but no switch for it
6457                         RUN_PATH=$libdir
6458                 fi
6459                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6460                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6461                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6462                 ;;
6463         (sunos4*)
6464                 # tested with SunOS 4.1.1 and gcc 2.7.0
6465                 if test "$GCC" != yes; then
6466                         CC_SHARED_OPTS='-KPIC'
6467                 fi
6468                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6469                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6470                 ;;
6471         (solaris2*)
6472                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6473                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6474                 if test "$DFT_LWR_MODEL" = "shared" ; then
6475                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6476                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6477                 fi
6478                 if test "$cf_cv_enable_rpath" = yes ; then
6479                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6480                 fi
6481
6482         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6483         if test "$cf_cv_shlib_version" = rel; then
6484                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6485         else
6486                 cf_cv_shared_soname='`basename $@`'
6487         fi
6488
6489                 if test "$GCC" != yes; then
6490                         cf_save_CFLAGS="$CFLAGS"
6491                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6492                         do
6493                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6494                                 cat >conftest.$ac_ext <<_ACEOF
6495 #line 6495 "configure"
6496 #include "confdefs.h"
6497 #include <stdio.h>
6498 int
6499 main (void)
6500 {
6501 printf("Hello\n");
6502   ;
6503   return 0;
6504 }
6505 _ACEOF
6506 rm -f conftest.$ac_objext
6507 if { (eval echo "$as_me:6507: \"$ac_compile\"") >&5
6508   (eval $ac_compile) 2>&5
6509   ac_status=$?
6510   echo "$as_me:6510: \$? = $ac_status" >&5
6511   (exit $ac_status); } &&
6512          { ac_try='test -s conftest.$ac_objext'
6513   { (eval echo "$as_me:6513: \"$ac_try\"") >&5
6514   (eval $ac_try) 2>&5
6515   ac_status=$?
6516   echo "$as_me:6516: \$? = $ac_status" >&5
6517   (exit $ac_status); }; }; then
6518   break
6519 else
6520   echo "$as_me: failed program was:" >&5
6521 cat conftest.$ac_ext >&5
6522 fi
6523 rm -f conftest.$ac_objext conftest.$ac_ext
6524                         done
6525                         CFLAGS="$cf_save_CFLAGS"
6526                         CC_SHARED_OPTS=$cf_shared_opts
6527                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6528                 else
6529                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6530                 fi
6531                 ;;
6532         (sysv5uw7*|unix_sv*)
6533                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6534                 if test "$GCC" != yes; then
6535                         CC_SHARED_OPTS='-KPIC'
6536                 fi
6537                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6538                 ;;
6539         (*)
6540                 CC_SHARED_OPTS='unknown'
6541                 MK_SHARED_LIB='echo unknown'
6542                 ;;
6543         esac
6544
6545         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6546         case "$cf_cv_shlib_version" in
6547         (rel|abi)
6548                 case "$MK_SHARED_LIB" in
6549                 (*'-o $@')
6550                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6551                         ;;
6552                 (*)
6553                         { echo "$as_me:6553: WARNING: ignored --with-shlib-version" >&5
6554 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6555                         ;;
6556                 esac
6557                 ;;
6558         esac
6559
6560         if test -n "$cf_try_cflags"
6561         then
6562 cat > conftest.$ac_ext <<EOF
6563 #line 6563 "${as_me:-configure}"
6564 #include <stdio.h>
6565 int main(int argc, char *argv[])
6566 {
6567         printf("hello\n");
6568         return (argv[argc-1] == 0) ;
6569 }
6570 EOF
6571                 cf_save_CFLAGS="$CFLAGS"
6572                 for cf_opt in $cf_try_cflags
6573                 do
6574                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6575                         echo "$as_me:6575: checking if CFLAGS option -$cf_opt works" >&5
6576 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6577                         if { (eval echo "$as_me:6577: \"$ac_compile\"") >&5
6578   (eval $ac_compile) 2>&5
6579   ac_status=$?
6580   echo "$as_me:6580: \$? = $ac_status" >&5
6581   (exit $ac_status); }; then
6582                                 echo "$as_me:6582: result: yes" >&5
6583 echo "${ECHO_T}yes" >&6
6584                                 cf_save_CFLAGS="$CFLAGS"
6585                         else
6586                                 echo "$as_me:6586: result: no" >&5
6587 echo "${ECHO_T}no" >&6
6588                         fi
6589                 done
6590                 CFLAGS="$cf_save_CFLAGS"
6591         fi
6592
6593         # RPATH_LIST is a colon-separated list of directories
6594         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6595         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6596
6597         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6598
6599         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6600
6601 echo "${as_me:-configure}:6601: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6602
6603         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6604
6605 echo "${as_me:-configure}:6605: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6606
6607 for model in $cf_list_models; do
6608         case $model in
6609         (libtool)
6610
6611 echo "$as_me:6611: checking for additional libtool options" >&5
6612 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6613
6614 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6615 if test "${with_libtool_opts+set}" = set; then
6616   withval="$with_libtool_opts"
6617   with_libtool_opts=$withval
6618 else
6619   with_libtool_opts=no
6620 fi;
6621 echo "$as_me:6621: result: $with_libtool_opts" >&5
6622 echo "${ECHO_T}$with_libtool_opts" >&6
6623
6624 case .$with_libtool_opts in
6625 (.yes|.no|.)
6626         ;;
6627 (*)
6628         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6629         ;;
6630 esac
6631
6632 echo "$as_me:6632: checking if exported-symbols file should be used" >&5
6633 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6634
6635 # Check whether --with-export-syms or --without-export-syms was given.
6636 if test "${with_export_syms+set}" = set; then
6637   withval="$with_export_syms"
6638   with_export_syms=$withval
6639 else
6640   with_export_syms=no
6641 fi;
6642 if test "x$with_export_syms" = xyes
6643 then
6644         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6645
6646 fi
6647 echo "$as_me:6647: result: $with_export_syms" >&5
6648 echo "${ECHO_T}$with_export_syms" >&6
6649 if test "x$with_export_syms" != xno
6650 then
6651         EXPORT_SYMS="-export-symbols $with_export_syms"
6652
6653 fi
6654
6655                 ;;
6656         (shared)
6657                 if test "$CC_SHARED_OPTS" = "unknown"; then
6658                         { { echo "$as_me:6658: error: Shared libraries are not supported in this version" >&5
6659 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6660    { (exit 1); exit 1; }; }
6661                 fi
6662                 # workaround for inept transition to PIE vs PIC...
6663                 echo "$as_me:6663: checking if current CFLAGS link properly" >&5
6664 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6665                 cat >conftest.$ac_ext <<_ACEOF
6666 #line 6666 "configure"
6667 #include "confdefs.h"
6668 #include <stdio.h>
6669 int
6670 main (void)
6671 {
6672 printf("Hello work\n");
6673   ;
6674   return 0;
6675 }
6676 _ACEOF
6677 rm -f conftest.$ac_objext conftest$ac_exeext
6678 if { (eval echo "$as_me:6678: \"$ac_link\"") >&5
6679   (eval $ac_link) 2>&5
6680   ac_status=$?
6681   echo "$as_me:6681: \$? = $ac_status" >&5
6682   (exit $ac_status); } &&
6683          { ac_try='test -s conftest$ac_exeext'
6684   { (eval echo "$as_me:6684: \"$ac_try\"") >&5
6685   (eval $ac_try) 2>&5
6686   ac_status=$?
6687   echo "$as_me:6687: \$? = $ac_status" >&5
6688   (exit $ac_status); }; }; then
6689   cf_cflags_work=yes
6690 else
6691   echo "$as_me: failed program was:" >&5
6692 cat conftest.$ac_ext >&5
6693 cf_cflags_work=no
6694 fi
6695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6696                 echo "$as_me:6696: result: $cf_cflags_work" >&5
6697 echo "${ECHO_T}$cf_cflags_work" >&6
6698                 if test "$cf_cflags_work" = no
6699                 then
6700                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6701
6702 echo "${as_me:-configure}:6702: testing try to work around by appending shared-options ..." 1>&5
6703
6704                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6705                 fi
6706
6707 echo "$as_me:6707: checking if versioned-symbols file should be used" >&5
6708 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6709
6710 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6711 if test "${with_versioned_syms+set}" = set; then
6712   withval="$with_versioned_syms"
6713   with_versioned_syms=$withval
6714 else
6715   with_versioned_syms=no
6716 fi;
6717 if test "x$with_versioned_syms" = xyes
6718 then
6719         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6720
6721 fi
6722 echo "$as_me:6722: result: $with_versioned_syms" >&5
6723 echo "${ECHO_T}$with_versioned_syms" >&6
6724
6725 RESULTING_SYMS=
6726 VERSIONED_SYMS=
6727 WILDCARD_SYMS=
6728
6729 if test "x$with_versioned_syms" != xno
6730 then
6731         RESULTING_SYMS=$with_versioned_syms
6732         case "x$MK_SHARED_LIB" in
6733         (*-Wl,*)
6734                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6735                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6736                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6737
6738 echo "${as_me:-configure}:6738: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6739
6740                 ;;
6741         (*-dy\ *)
6742                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6743                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6744                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6745
6746 echo "${as_me:-configure}:6746: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6747
6748                 ;;
6749         (*)
6750                 { echo "$as_me:6750: WARNING: this system does not support versioned-symbols" >&5
6751 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6752                 ;;
6753         esac
6754
6755         # Linux ld can selectively override scope, e.g., of symbols beginning with
6756         # "_" by first declaring some as global, and then using a wildcard to
6757         # declare the others as local.  Some other loaders cannot do this.  Check
6758         # by constructing a (very) simple shared library and inspecting its
6759         # symbols.
6760         if test "x$VERSIONED_SYMS" != "x"
6761         then
6762                 echo "$as_me:6762: checking if wildcards can be used to selectively omit symbols" >&5
6763 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6764                 WILDCARD_SYMS=no
6765
6766                 # make sources
6767                 rm -f conftest.*
6768
6769                 cat >conftest.ver <<EOF
6770 module_1.0 {
6771 global:
6772         globalf1;
6773 local:
6774         localf1;
6775 };
6776 module_2.0 {
6777 global:
6778         globalf2;
6779 local:
6780         localf2;
6781         _*;
6782 } module_1.0;
6783 submodule_1.0 {
6784 global:
6785         subglobalf1;
6786         _ismissing;
6787 local:
6788         sublocalf1;
6789 };
6790 submodule_2.0 {
6791 global:
6792         subglobalf2;
6793 local:
6794         sublocalf2;
6795         _*;
6796 } submodule_1.0;
6797 EOF
6798                 cat >conftest.$ac_ext <<EOF
6799 #line 6799 "configure"
6800 int     _ismissing(void) { return 1; }
6801 int     _localf1(void) { return 1; }
6802 int     _localf2(void) { return 2; }
6803 int     globalf1(void) { return 1; }
6804 int     globalf2(void) { return 2; }
6805 int     _sublocalf1(void) { return 1; }
6806 int     _sublocalf2(void) { return 2; }
6807 int     subglobalf1(void) { return 1; }
6808 int     subglobalf2(void) { return 2; }
6809 EOF
6810                 cat >conftest.mk <<EOF
6811 CC=${CC}
6812 CFLAGS=${CFLAGS}
6813 CPPFLAGS=${CPPFLAGS}
6814 LDFLAGS=${LDFLAGS}
6815 LIBS=${LIBS}
6816 VERSIONED_SYMS=${VERSIONED_SYMS}
6817 RESULTING_SYMS=conftest.ver
6818 MK_SHARED_LIB=${MK_SHARED_LIB}
6819 conftest.so: conftest.$ac_cv_objext
6820                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6821 EOF
6822
6823                 # compile source, make library
6824                 if make -f conftest.mk 2>&5 >/dev/null
6825                 then
6826                         # test for missing symbol in either Data or Text section
6827                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6828                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6829                 fi
6830                 echo "$as_me:6830: result: $WILDCARD_SYMS" >&5
6831 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6832                 rm -f conftest.*
6833         fi
6834 fi
6835
6836                 ;;
6837         esac
6838 done
6839
6840 # pretend that ncurses==ncursesw==ncursest
6841 echo "$as_me:6841: checking if you want to disable library suffixes" >&5
6842 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6843
6844 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6845 if test "${enable_lib_suffixes+set}" = set; then
6846   enableval="$enable_lib_suffixes"
6847   test "$enableval" != no && enableval=yes
6848         if test "$enableval" != "yes" ; then
6849     disable_lib_suffixes=yes
6850         else
6851                 disable_lib_suffixes=no
6852         fi
6853 else
6854   enableval=yes
6855         disable_lib_suffixes=no
6856
6857 fi;
6858 echo "$as_me:6858: result: $disable_lib_suffixes" >&5
6859 echo "${ECHO_T}$disable_lib_suffixes" >&6
6860
6861 ### If we're building with rpath, try to link non-standard libs that way too.
6862 if test "$DFT_LWR_MODEL" = "shared"; then
6863
6864 echo "$as_me:6864: checking if rpath-hack should be disabled" >&5
6865 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6866
6867 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6868 if test "${enable_rpath_hack+set}" = set; then
6869   enableval="$enable_rpath_hack"
6870   test "$enableval" != no && enableval=yes
6871         if test "$enableval" != "yes" ; then
6872     cf_disable_rpath_hack=yes
6873         else
6874                 cf_disable_rpath_hack=no
6875         fi
6876 else
6877   enableval=yes
6878         cf_disable_rpath_hack=no
6879
6880 fi;
6881 echo "$as_me:6881: result: $cf_disable_rpath_hack" >&5
6882 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6883 if test "$cf_disable_rpath_hack" = no ; then
6884
6885 echo "$as_me:6885: checking for updated LDFLAGS" >&5
6886 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6887 if test -n "$LD_RPATH_OPT" ; then
6888         echo "$as_me:6888: result: maybe" >&5
6889 echo "${ECHO_T}maybe" >&6
6890
6891         for ac_prog in ldd
6892 do
6893   # Extract the first word of "$ac_prog", so it can be a program name with args.
6894 set dummy $ac_prog; ac_word=$2
6895 echo "$as_me:6895: checking for $ac_word" >&5
6896 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6897 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6898   echo $ECHO_N "(cached) $ECHO_C" >&6
6899 else
6900   if test -n "$cf_ldd_prog"; then
6901   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6902 else
6903   ac_save_IFS=$IFS; IFS=$ac_path_separator
6904 ac_dummy="$PATH"
6905 for ac_dir in $ac_dummy; do
6906   IFS=$ac_save_IFS
6907   test -z "$ac_dir" && ac_dir=.
6908   $as_executable_p "$ac_dir/$ac_word" || continue
6909 ac_cv_prog_cf_ldd_prog="$ac_prog"
6910 echo "$as_me:6910: found $ac_dir/$ac_word" >&5
6911 break
6912 done
6913
6914 fi
6915 fi
6916 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6917 if test -n "$cf_ldd_prog"; then
6918   echo "$as_me:6918: result: $cf_ldd_prog" >&5
6919 echo "${ECHO_T}$cf_ldd_prog" >&6
6920 else
6921   echo "$as_me:6921: result: no" >&5
6922 echo "${ECHO_T}no" >&6
6923 fi
6924
6925   test -n "$cf_ldd_prog" && break
6926 done
6927 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6928
6929         cf_rpath_list="/usr/lib /lib"
6930         if test "$cf_ldd_prog" != no
6931         then
6932                 cf_rpath_oops=
6933
6934 cat >conftest.$ac_ext <<_ACEOF
6935 #line 6935 "configure"
6936 #include "confdefs.h"
6937 #include <stdio.h>
6938 int
6939 main (void)
6940 {
6941 printf("Hello");
6942   ;
6943   return 0;
6944 }
6945 _ACEOF
6946 rm -f conftest.$ac_objext conftest$ac_exeext
6947 if { (eval echo "$as_me:6947: \"$ac_link\"") >&5
6948   (eval $ac_link) 2>&5
6949   ac_status=$?
6950   echo "$as_me:6950: \$? = $ac_status" >&5
6951   (exit $ac_status); } &&
6952          { ac_try='test -s conftest$ac_exeext'
6953   { (eval echo "$as_me:6953: \"$ac_try\"") >&5
6954   (eval $ac_try) 2>&5
6955   ac_status=$?
6956   echo "$as_me:6956: \$? = $ac_status" >&5
6957   (exit $ac_status); }; }; then
6958   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6959                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6960 else
6961   echo "$as_me: failed program was:" >&5
6962 cat conftest.$ac_ext >&5
6963 fi
6964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6965
6966                 # If we passed the link-test, but get a "not found" on a given library,
6967                 # this could be due to inept reconfiguration of gcc to make it only
6968                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6969                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6970                 # /usr/local libraries.
6971                 if test -n "$cf_rpath_oops"
6972                 then
6973                         for cf_rpath_src in $cf_rpath_oops
6974                         do
6975                                 for cf_rpath_dir in \
6976                                         /usr/local \
6977                                         /usr/pkg \
6978                                         /opt/sfw
6979                                 do
6980                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6981                                         then
6982                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6983
6984 echo "${as_me:-configure}:6984: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6985
6986                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6987                                                 break
6988                                         fi
6989                                 done
6990                         done
6991                 fi
6992         fi
6993
6994         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6995
6996 echo "${as_me:-configure}:6996: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6997
6998 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6999
7000 echo "${as_me:-configure}:7000: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7001
7002 cf_rpath_dst=
7003 for cf_rpath_src in $LDFLAGS
7004 do
7005         case $cf_rpath_src in
7006         (-L*)
7007
7008                 # check if this refers to a directory which we will ignore
7009                 cf_rpath_skip=no
7010                 if test -n "$cf_rpath_list"
7011                 then
7012                         for cf_rpath_item in $cf_rpath_list
7013                         do
7014                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7015                                 then
7016                                         cf_rpath_skip=yes
7017                                         break
7018                                 fi
7019                         done
7020                 fi
7021
7022                 if test "$cf_rpath_skip" = no
7023                 then
7024                         # transform the option
7025                         if test "$LD_RPATH_OPT" = "-R " ; then
7026                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7027                         else
7028                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7029                         fi
7030
7031                         # if we have not already added this, add it now
7032                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7033                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7034                         then
7035                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7036
7037 echo "${as_me:-configure}:7037: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7038
7039                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7040                         fi
7041                 fi
7042                 ;;
7043         esac
7044         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7045 done
7046 LDFLAGS=$cf_rpath_dst
7047
7048 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7049
7050 echo "${as_me:-configure}:7050: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7051
7052 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7053
7054 echo "${as_me:-configure}:7054: testing ...checking LIBS $LIBS ..." 1>&5
7055
7056 cf_rpath_dst=
7057 for cf_rpath_src in $LIBS
7058 do
7059         case $cf_rpath_src in
7060         (-L*)
7061
7062                 # check if this refers to a directory which we will ignore
7063                 cf_rpath_skip=no
7064                 if test -n "$cf_rpath_list"
7065                 then
7066                         for cf_rpath_item in $cf_rpath_list
7067                         do
7068                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7069                                 then
7070                                         cf_rpath_skip=yes
7071                                         break
7072                                 fi
7073                         done
7074                 fi
7075
7076                 if test "$cf_rpath_skip" = no
7077                 then
7078                         # transform the option
7079                         if test "$LD_RPATH_OPT" = "-R " ; then
7080                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7081                         else
7082                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7083                         fi
7084
7085                         # if we have not already added this, add it now
7086                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7087                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7088                         then
7089                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7090
7091 echo "${as_me:-configure}:7091: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7092
7093                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7094                         fi
7095                 fi
7096                 ;;
7097         esac
7098         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7099 done
7100 LIBS=$cf_rpath_dst
7101
7102 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7103
7104 echo "${as_me:-configure}:7104: testing ...checked LIBS $LIBS ..." 1>&5
7105
7106         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7107
7108 echo "${as_me:-configure}:7108: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7109
7110 else
7111         echo "$as_me:7111: result: no" >&5
7112 echo "${ECHO_T}no" >&6
7113 fi
7114
7115 fi
7116
7117 fi
7118
7119 ###############################################################################
7120
7121 ###     use option --with-extra-suffix to append suffix to headers and libraries
7122 echo "$as_me:7122: checking if you wish to append extra suffix to header/library paths" >&5
7123 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7124 EXTRA_SUFFIX=
7125
7126 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7127 if test "${with_extra_suffix+set}" = set; then
7128   withval="$with_extra_suffix"
7129   case x$withval in
7130         (no)
7131                 ;;
7132         (xyes|x)
7133                 EXTRA_SUFFIX=$cf_cv_abi_version
7134                 ;;
7135         (*)
7136                 EXTRA_SUFFIX=$withval
7137                 ;;
7138         esac
7139
7140 fi;
7141 echo "$as_me:7141: result: $EXTRA_SUFFIX" >&5
7142 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7143
7144 ###     use option --disable-overwrite to leave out the link to -lcurses
7145 echo "$as_me:7145: checking if you wish to install ncurses overwriting curses" >&5
7146 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7147
7148 # Check whether --enable-overwrite or --disable-overwrite was given.
7149 if test "${enable_overwrite+set}" = set; then
7150   enableval="$enable_overwrite"
7151   with_overwrite=$enableval
7152 else
7153   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7154 fi;
7155 echo "$as_me:7155: result: $with_overwrite" >&5
7156 echo "${ECHO_T}$with_overwrite" >&6
7157
7158 echo "$as_me:7158: checking if external terminfo-database is used" >&5
7159 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7160
7161 # Check whether --enable-database or --disable-database was given.
7162 if test "${enable_database+set}" = set; then
7163   enableval="$enable_database"
7164   use_database=$enableval
7165 else
7166   use_database=yes
7167 fi;
7168 echo "$as_me:7168: result: $use_database" >&5
7169 echo "${ECHO_T}$use_database" >&6
7170
7171 case $host_os in
7172 (os2*)
7173         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7174         ;;
7175 (*)
7176         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7177         ;;
7178 esac
7179
7180 NCURSES_USE_DATABASE=0
7181 if test "$use_database" != no ; then
7182         NCURSES_USE_DATABASE=1
7183
7184         echo "$as_me:7184: checking which terminfo source-file will be installed" >&5
7185 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7186
7187 # Check whether --with-database or --without-database was given.
7188 if test "${with_database+set}" = set; then
7189   withval="$with_database"
7190   TERMINFO_SRC=$withval
7191 fi;
7192         echo "$as_me:7192: result: $TERMINFO_SRC" >&5
7193 echo "${ECHO_T}$TERMINFO_SRC" >&6
7194
7195         echo "$as_me:7195: checking whether to use hashed database instead of directory/tree" >&5
7196 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7197
7198 # Check whether --with-hashed-db or --without-hashed-db was given.
7199 if test "${with_hashed_db+set}" = set; then
7200   withval="$with_hashed_db"
7201
7202 else
7203   with_hashed_db=no
7204 fi;
7205         echo "$as_me:7205: result: $with_hashed_db" >&5
7206 echo "${ECHO_T}$with_hashed_db" >&6
7207 else
7208         with_hashed_db=no
7209 fi
7210
7211 echo "$as_me:7211: checking for list of fallback descriptions" >&5
7212 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7213
7214 # Check whether --with-fallbacks or --without-fallbacks was given.
7215 if test "${with_fallbacks+set}" = set; then
7216   withval="$with_fallbacks"
7217   with_fallback=$withval
7218 else
7219   with_fallback=
7220 fi;
7221 echo "$as_me:7221: result: $with_fallback" >&5
7222 echo "${ECHO_T}$with_fallback" >&6
7223 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7224
7225 echo "$as_me:7225: checking if you want modern xterm or antique" >&5
7226 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7227
7228 # Check whether --with-xterm-new or --without-xterm-new was given.
7229 if test "${with_xterm_new+set}" = set; then
7230   withval="$with_xterm_new"
7231   with_xterm_new=$withval
7232 else
7233   with_xterm_new=yes
7234 fi;
7235 case $with_xterm_new in
7236 (no) with_xterm_new=xterm-old;;
7237 (*)      with_xterm_new=xterm-new;;
7238 esac
7239 echo "$as_me:7239: result: $with_xterm_new" >&5
7240 echo "${ECHO_T}$with_xterm_new" >&6
7241 WHICH_XTERM=$with_xterm_new
7242
7243 echo "$as_me:7243: checking if xterm backspace sends BS or DEL" >&5
7244 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7245
7246 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7247 if test "${with_xterm_kbs+set}" = set; then
7248   withval="$with_xterm_kbs"
7249   with_xterm_kbs=$withval
7250 else
7251   with_xterm_kbs=BS
7252 fi;
7253 case x$with_xterm_kbs in
7254 (xyes|xno|xBS|xbs|x8)
7255         with_xterm_kbs=BS
7256         ;;
7257 (xDEL|xdel|x127)
7258         with_xterm_kbs=DEL
7259         ;;
7260 (*)
7261         with_xterm_kbs=$withval
7262         ;;
7263 esac
7264 echo "$as_me:7264: result: $with_xterm_kbs" >&5
7265 echo "${ECHO_T}$with_xterm_kbs" >&6
7266 XTERM_KBS=$with_xterm_kbs
7267
7268 MAKE_TERMINFO=
7269 if test "$use_database" = no ; then
7270         TERMINFO="${datadir}/terminfo"
7271         MAKE_TERMINFO="#"
7272 else
7273
7274 echo "$as_me:7274: checking for list of terminfo directories" >&5
7275 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7276
7277 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7278 if test "${with_terminfo_dirs+set}" = set; then
7279   withval="$with_terminfo_dirs"
7280
7281 else
7282   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7283 fi;
7284 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7285 cf_dst_path=
7286 for cf_src_path in $withval
7287 do
7288
7289 if test "x$prefix" != xNONE; then
7290         cf_path_syntax="$prefix"
7291 else
7292         cf_path_syntax="$ac_default_prefix"
7293 fi
7294
7295 case ".$cf_src_path" in
7296 (.\$\(*\)*|.\'*\'*)
7297         ;;
7298 (..|./*|.\\*)
7299         ;;
7300 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7301         ;;
7302 (.\${*prefix}*|.\${*dir}*)
7303         eval cf_src_path="$cf_src_path"
7304         case ".$cf_src_path" in
7305         (.NONE/*)
7306                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7307                 ;;
7308         esac
7309         ;;
7310 (.no|.NONE/*)
7311         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7312         ;;
7313 (*)
7314         { { echo "$as_me:7314: error: expected a pathname, not \"$cf_src_path\"" >&5
7315 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7316    { (exit 1); exit 1; }; }
7317         ;;
7318 esac
7319
7320   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7321   cf_dst_path="${cf_dst_path}${cf_src_path}"
7322 done
7323 IFS="$ac_save_ifs"
7324
7325 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7326 # so we have to check/work around.  We do prefer the result of "eval"...
7327 eval cf_dst_eval="$cf_dst_path"
7328 case "x$cf_dst_eval" in
7329 (xNONE*)
7330         TERMINFO_DIRS=$cf_dst_path
7331         ;;
7332 (*)
7333         TERMINFO_DIRS="$cf_dst_eval"
7334         ;;
7335 esac
7336
7337 echo "$as_me:7337: result: $TERMINFO_DIRS" >&5
7338 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7339 test -n "$TERMINFO_DIRS" &&
7340 cat >>confdefs.h <<EOF
7341 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7342 EOF
7343
7344 echo "$as_me:7344: checking for default terminfo directory" >&5
7345 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7346
7347 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7348 if test "${with_default_terminfo_dir+set}" = set; then
7349   withval="$with_default_terminfo_dir"
7350
7351 else
7352   withval="${TERMINFO:-${datadir}/terminfo}"
7353 fi; if test -n "${datadir}/terminfo" ; then
7354
7355 if test "x$prefix" != xNONE; then
7356         cf_path_syntax="$prefix"
7357 else
7358         cf_path_syntax="$ac_default_prefix"
7359 fi
7360
7361 case ".$withval" in
7362 (.\$\(*\)*|.\'*\'*)
7363         ;;
7364 (..|./*|.\\*)
7365         ;;
7366 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7367         ;;
7368 (.\${*prefix}*|.\${*dir}*)
7369         eval withval="$withval"
7370         case ".$withval" in
7371         (.NONE/*)
7372                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7373                 ;;
7374         esac
7375         ;;
7376 (.no|.NONE/*)
7377         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7378         ;;
7379 (*)
7380         { { echo "$as_me:7380: error: expected a pathname, not \"$withval\"" >&5
7381 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7382    { (exit 1); exit 1; }; }
7383         ;;
7384 esac
7385
7386 fi
7387 eval TERMINFO="$withval"
7388
7389 echo "$as_me:7389: result: $TERMINFO" >&5
7390 echo "${ECHO_T}$TERMINFO" >&6
7391
7392 cat >>confdefs.h <<EOF
7393 #define TERMINFO "$TERMINFO"
7394 EOF
7395
7396 fi
7397
7398 ###     use option --disable-big-core to make tic run on small machines
7399 ###     We need 4Mb, check if we can allocate 50% more than that.
7400 echo "$as_me:7400: checking if big-core option selected" >&5
7401 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7402
7403 # Check whether --enable-big-core or --disable-big-core was given.
7404 if test "${enable_big_core+set}" = set; then
7405   enableval="$enable_big_core"
7406   with_big_core=$enableval
7407 else
7408   if test "$cross_compiling" = yes; then
7409   with_big_core=no
7410 else
7411   cat >conftest.$ac_ext <<_ACEOF
7412 #line 7412 "configure"
7413 #include "confdefs.h"
7414
7415 #include <stdlib.h>
7416 #include <string.h>
7417 int main() {
7418         unsigned long n = 6000000L;
7419         char *s = malloc(n);
7420         if (s != 0)
7421                 s[0] = s[n-1] = 0;
7422         ${cf_cv_main_return:-return}(s == 0);
7423 }
7424 _ACEOF
7425 rm -f conftest$ac_exeext
7426 if { (eval echo "$as_me:7426: \"$ac_link\"") >&5
7427   (eval $ac_link) 2>&5
7428   ac_status=$?
7429   echo "$as_me:7429: \$? = $ac_status" >&5
7430   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7431   { (eval echo "$as_me:7431: \"$ac_try\"") >&5
7432   (eval $ac_try) 2>&5
7433   ac_status=$?
7434   echo "$as_me:7434: \$? = $ac_status" >&5
7435   (exit $ac_status); }; }; then
7436   with_big_core=yes
7437 else
7438   echo "$as_me: program exited with status $ac_status" >&5
7439 echo "$as_me: failed program was:" >&5
7440 cat conftest.$ac_ext >&5
7441 with_big_core=no
7442 fi
7443 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7444 fi
7445 fi;
7446 echo "$as_me:7446: result: $with_big_core" >&5
7447 echo "${ECHO_T}$with_big_core" >&6
7448 test "x$with_big_core" = "xyes" &&
7449 cat >>confdefs.h <<\EOF
7450 #define HAVE_BIG_CORE 1
7451 EOF
7452
7453 ### ISO C only guarantees 512-char strings, we have tables which load faster
7454 ### when constructed using "big" strings.  More than the C compiler, the awk
7455 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7456 echo "$as_me:7456: checking if big-strings option selected" >&5
7457 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7458
7459 # Check whether --enable-big-strings or --disable-big-strings was given.
7460 if test "${enable_big_strings+set}" = set; then
7461   enableval="$enable_big_strings"
7462   with_big_strings=$enableval
7463 else
7464
7465         case x$AWK in
7466         (x)
7467                 eval with_big_strings=no
7468                 ;;
7469         (*)
7470                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7471                         | $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
7472                         eval with_big_strings=yes
7473                 else
7474                         eval with_big_strings=no
7475                 fi
7476                 ;;
7477         esac
7478
7479 fi;
7480 echo "$as_me:7480: result: $with_big_strings" >&5
7481 echo "${ECHO_T}$with_big_strings" >&6
7482
7483 USE_BIG_STRINGS=0
7484 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7485
7486 ###     use option --enable-termcap to compile in the termcap fallback support
7487 echo "$as_me:7487: checking if you want termcap-fallback support" >&5
7488 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7489
7490 # Check whether --enable-termcap or --disable-termcap was given.
7491 if test "${enable_termcap+set}" = set; then
7492   enableval="$enable_termcap"
7493   with_termcap=$enableval
7494 else
7495   with_termcap=no
7496 fi;
7497 echo "$as_me:7497: result: $with_termcap" >&5
7498 echo "${ECHO_T}$with_termcap" >&6
7499
7500 NCURSES_USE_TERMCAP=0
7501 if test "x$with_termcap" != "xyes" ; then
7502         if test "$use_database" = no ; then
7503                 if test -z "$with_fallback" ; then
7504                         { { echo "$as_me:7504: error: You have disabled the database w/o specifying fallbacks" >&5
7505 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7506    { (exit 1); exit 1; }; }
7507                 fi
7508         fi
7509
7510 cat >>confdefs.h <<\EOF
7511 #define PURE_TERMINFO 1
7512 EOF
7513
7514 else
7515
7516         if test "$with_ticlib" != no ; then
7517                 { { echo "$as_me:7517: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7518 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7519    { (exit 1); exit 1; }; }
7520         fi
7521
7522         NCURSES_USE_TERMCAP=1
7523         echo "$as_me:7523: checking for list of termcap files" >&5
7524 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7525
7526 # Check whether --with-termpath or --without-termpath was given.
7527 if test "${with_termpath+set}" = set; then
7528   withval="$with_termpath"
7529
7530 else
7531   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7532 fi;
7533 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7534 cf_dst_path=
7535 for cf_src_path in $withval
7536 do
7537
7538 if test "x$prefix" != xNONE; then
7539         cf_path_syntax="$prefix"
7540 else
7541         cf_path_syntax="$ac_default_prefix"
7542 fi
7543
7544 case ".$cf_src_path" in
7545 (.\$\(*\)*|.\'*\'*)
7546         ;;
7547 (..|./*|.\\*)
7548         ;;
7549 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7550         ;;
7551 (.\${*prefix}*|.\${*dir}*)
7552         eval cf_src_path="$cf_src_path"
7553         case ".$cf_src_path" in
7554         (.NONE/*)
7555                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7556                 ;;
7557         esac
7558         ;;
7559 (.no|.NONE/*)
7560         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7561         ;;
7562 (*)
7563         { { echo "$as_me:7563: error: expected a pathname, not \"$cf_src_path\"" >&5
7564 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7565    { (exit 1); exit 1; }; }
7566         ;;
7567 esac
7568
7569   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7570   cf_dst_path="${cf_dst_path}${cf_src_path}"
7571 done
7572 IFS="$ac_save_ifs"
7573
7574 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7575 # so we have to check/work around.  We do prefer the result of "eval"...
7576 eval cf_dst_eval="$cf_dst_path"
7577 case "x$cf_dst_eval" in
7578 (xNONE*)
7579         TERMPATH=$cf_dst_path
7580         ;;
7581 (*)
7582         TERMPATH="$cf_dst_eval"
7583         ;;
7584 esac
7585
7586         echo "$as_me:7586: result: $TERMPATH" >&5
7587 echo "${ECHO_T}$TERMPATH" >&6
7588         test -n "$TERMPATH" &&
7589 cat >>confdefs.h <<EOF
7590 #define TERMPATH "$TERMPATH"
7591 EOF
7592
7593         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7594         echo "$as_me:7594: checking if fast termcap-loader is needed" >&5
7595 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7596
7597 # Check whether --enable-getcap or --disable-getcap was given.
7598 if test "${enable_getcap+set}" = set; then
7599   enableval="$enable_getcap"
7600   with_getcap=$enableval
7601 else
7602   with_getcap=no
7603 fi;
7604         echo "$as_me:7604: result: $with_getcap" >&5
7605 echo "${ECHO_T}$with_getcap" >&6
7606         test "x$with_getcap" = "xyes" &&
7607 cat >>confdefs.h <<\EOF
7608 #define USE_GETCAP 1
7609 EOF
7610
7611         echo "$as_me:7611: checking if translated termcaps will be cached in ~/.terminfo" >&5
7612 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7613
7614 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7615 if test "${enable_getcap_cache+set}" = set; then
7616   enableval="$enable_getcap_cache"
7617   with_getcap_cache=$enableval
7618 else
7619   with_getcap_cache=no
7620 fi;
7621         echo "$as_me:7621: result: $with_getcap_cache" >&5
7622 echo "${ECHO_T}$with_getcap_cache" >&6
7623         test "x$with_getcap_cache" = "xyes" &&
7624 cat >>confdefs.h <<\EOF
7625 #define USE_GETCAP_CACHE 1
7626 EOF
7627
7628 fi
7629
7630 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7631 echo "$as_me:7631: checking if ~/.terminfo is wanted" >&5
7632 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7633
7634 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7635 if test "${enable_home_terminfo+set}" = set; then
7636   enableval="$enable_home_terminfo"
7637   with_home_terminfo=$enableval
7638 else
7639   with_home_terminfo=yes
7640 fi;
7641 echo "$as_me:7641: result: $with_home_terminfo" >&5
7642 echo "${ECHO_T}$with_home_terminfo" >&6
7643 test "x$with_home_terminfo" = "xyes" &&
7644 cat >>confdefs.h <<\EOF
7645 #define USE_HOME_TERMINFO 1
7646 EOF
7647
7648 echo "$as_me:7648: checking if you want to use restricted environment when running as root" >&5
7649 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7650
7651 # Check whether --enable-root-environ or --disable-root-environ was given.
7652 if test "${enable_root_environ+set}" = set; then
7653   enableval="$enable_root_environ"
7654   with_root_environ=$enableval
7655 else
7656   with_root_environ=yes
7657 fi;
7658 echo "$as_me:7658: result: $with_root_environ" >&5
7659 echo "${ECHO_T}$with_root_environ" >&6
7660 test "x$with_root_environ" = xyes &&
7661 cat >>confdefs.h <<\EOF
7662 #define USE_ROOT_ENVIRON 1
7663 EOF
7664
7665 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7666 ###   to reduce storage requirements for the terminfo database.
7667
7668 for ac_header in \
7669 unistd.h \
7670
7671 do
7672 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7673 echo "$as_me:7673: checking for $ac_header" >&5
7674 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7675 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7676   echo $ECHO_N "(cached) $ECHO_C" >&6
7677 else
7678   cat >conftest.$ac_ext <<_ACEOF
7679 #line 7679 "configure"
7680 #include "confdefs.h"
7681 #include <$ac_header>
7682 _ACEOF
7683 if { (eval echo "$as_me:7683: \"$ac_cpp conftest.$ac_ext\"") >&5
7684   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7685   ac_status=$?
7686   egrep -v '^ *\+' conftest.er1 >conftest.err
7687   rm -f conftest.er1
7688   cat conftest.err >&5
7689   echo "$as_me:7689: \$? = $ac_status" >&5
7690   (exit $ac_status); } >/dev/null; then
7691   if test -s conftest.err; then
7692     ac_cpp_err=$ac_c_preproc_warn_flag
7693   else
7694     ac_cpp_err=
7695   fi
7696 else
7697   ac_cpp_err=yes
7698 fi
7699 if test -z "$ac_cpp_err"; then
7700   eval "$as_ac_Header=yes"
7701 else
7702   echo "$as_me: failed program was:" >&5
7703   cat conftest.$ac_ext >&5
7704   eval "$as_ac_Header=no"
7705 fi
7706 rm -f conftest.err conftest.$ac_ext
7707 fi
7708 echo "$as_me:7708: result: `eval echo '${'$as_ac_Header'}'`" >&5
7709 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7710 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7711   cat >>confdefs.h <<EOF
7712 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7713 EOF
7714
7715 fi
7716 done
7717
7718 for ac_func in \
7719         remove \
7720         unlink
7721 do
7722 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7723 echo "$as_me:7723: checking for $ac_func" >&5
7724 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7725 if eval "test \"\${$as_ac_var+set}\" = set"; then
7726   echo $ECHO_N "(cached) $ECHO_C" >&6
7727 else
7728   cat >conftest.$ac_ext <<_ACEOF
7729 #line 7729 "configure"
7730 #include "confdefs.h"
7731 /* System header to define __stub macros and hopefully few prototypes,
7732     which can conflict with char $ac_func (); below.  */
7733 #include <assert.h>
7734 /* Override any gcc2 internal prototype to avoid an error.  */
7735 #ifdef __cplusplus
7736 extern "C"
7737 #endif
7738 /* We use char because int might match the return type of a gcc2
7739    builtin and then its argument prototype would still apply.  */
7740 char $ac_func ();
7741 char (*f) ();
7742
7743 int
7744 main (void)
7745 {
7746 /* The GNU C library defines this for functions which it implements
7747     to always fail with ENOSYS.  Some functions are actually named
7748     something starting with __ and the normal name is an alias.  */
7749 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7750 choke me
7751 #else
7752 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7753 #endif
7754
7755   ;
7756   return 0;
7757 }
7758 _ACEOF
7759 rm -f conftest.$ac_objext conftest$ac_exeext
7760 if { (eval echo "$as_me:7760: \"$ac_link\"") >&5
7761   (eval $ac_link) 2>&5
7762   ac_status=$?
7763   echo "$as_me:7763: \$? = $ac_status" >&5
7764   (exit $ac_status); } &&
7765          { ac_try='test -s conftest$ac_exeext'
7766   { (eval echo "$as_me:7766: \"$ac_try\"") >&5
7767   (eval $ac_try) 2>&5
7768   ac_status=$?
7769   echo "$as_me:7769: \$? = $ac_status" >&5
7770   (exit $ac_status); }; }; then
7771   eval "$as_ac_var=yes"
7772 else
7773   echo "$as_me: failed program was:" >&5
7774 cat conftest.$ac_ext >&5
7775 eval "$as_ac_var=no"
7776 fi
7777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7778 fi
7779 echo "$as_me:7779: result: `eval echo '${'$as_ac_var'}'`" >&5
7780 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7781 if test `eval echo '${'$as_ac_var'}'` = yes; then
7782   cat >>confdefs.h <<EOF
7783 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7784 EOF
7785
7786 fi
7787 done
7788
7789 if test "$cross_compiling" = yes ; then
7790
7791 for ac_func in \
7792                 link \
7793                 symlink
7794 do
7795 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7796 echo "$as_me:7796: checking for $ac_func" >&5
7797 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7798 if eval "test \"\${$as_ac_var+set}\" = set"; then
7799   echo $ECHO_N "(cached) $ECHO_C" >&6
7800 else
7801   cat >conftest.$ac_ext <<_ACEOF
7802 #line 7802 "configure"
7803 #include "confdefs.h"
7804 /* System header to define __stub macros and hopefully few prototypes,
7805     which can conflict with char $ac_func (); below.  */
7806 #include <assert.h>
7807 /* Override any gcc2 internal prototype to avoid an error.  */
7808 #ifdef __cplusplus
7809 extern "C"
7810 #endif
7811 /* We use char because int might match the return type of a gcc2
7812    builtin and then its argument prototype would still apply.  */
7813 char $ac_func ();
7814 char (*f) ();
7815
7816 int
7817 main (void)
7818 {
7819 /* The GNU C library defines this for functions which it implements
7820     to always fail with ENOSYS.  Some functions are actually named
7821     something starting with __ and the normal name is an alias.  */
7822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7823 choke me
7824 #else
7825 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7826 #endif
7827
7828   ;
7829   return 0;
7830 }
7831 _ACEOF
7832 rm -f conftest.$ac_objext conftest$ac_exeext
7833 if { (eval echo "$as_me:7833: \"$ac_link\"") >&5
7834   (eval $ac_link) 2>&5
7835   ac_status=$?
7836   echo "$as_me:7836: \$? = $ac_status" >&5
7837   (exit $ac_status); } &&
7838          { ac_try='test -s conftest$ac_exeext'
7839   { (eval echo "$as_me:7839: \"$ac_try\"") >&5
7840   (eval $ac_try) 2>&5
7841   ac_status=$?
7842   echo "$as_me:7842: \$? = $ac_status" >&5
7843   (exit $ac_status); }; }; then
7844   eval "$as_ac_var=yes"
7845 else
7846   echo "$as_me: failed program was:" >&5
7847 cat conftest.$ac_ext >&5
7848 eval "$as_ac_var=no"
7849 fi
7850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7851 fi
7852 echo "$as_me:7852: result: `eval echo '${'$as_ac_var'}'`" >&5
7853 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7854 if test `eval echo '${'$as_ac_var'}'` = yes; then
7855   cat >>confdefs.h <<EOF
7856 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7857 EOF
7858
7859 fi
7860 done
7861
7862 else
7863         echo "$as_me:7863: checking if link/symlink functions work" >&5
7864 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7865 if test "${cf_cv_link_funcs+set}" = set; then
7866   echo $ECHO_N "(cached) $ECHO_C" >&6
7867 else
7868
7869                 cf_cv_link_funcs=
7870                 for cf_func in link symlink ; do
7871                         if test "$cross_compiling" = yes; then
7872
7873                         eval 'ac_cv_func_'$cf_func'=error'
7874 else
7875   cat >conftest.$ac_ext <<_ACEOF
7876 #line 7876 "configure"
7877 #include "confdefs.h"
7878
7879 #include <sys/types.h>
7880 #include <sys/stat.h>
7881 #ifdef HAVE_UNISTD_H
7882 #include <unistd.h>
7883 #endif
7884 int main(void)
7885 {
7886         int fail = 0;
7887         char *src = "config.log";
7888         char *dst = "conftest.chk";
7889         struct stat src_sb;
7890         struct stat dst_sb;
7891
7892         stat(src, &src_sb);
7893         fail = ($cf_func("config.log", "conftest.chk") < 0)
7894             || (stat(dst, &dst_sb) < 0)
7895             || (dst_sb.st_mtime != src_sb.st_mtime);
7896 #ifdef HAVE_UNLINK
7897         unlink(dst);
7898 #else
7899         remove(dst);
7900 #endif
7901         ${cf_cv_main_return:-return} (fail);
7902 }
7903
7904 _ACEOF
7905 rm -f conftest$ac_exeext
7906 if { (eval echo "$as_me:7906: \"$ac_link\"") >&5
7907   (eval $ac_link) 2>&5
7908   ac_status=$?
7909   echo "$as_me:7909: \$? = $ac_status" >&5
7910   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7911   { (eval echo "$as_me:7911: \"$ac_try\"") >&5
7912   (eval $ac_try) 2>&5
7913   ac_status=$?
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit $ac_status); }; }; then
7916
7917                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7918                         eval 'ac_cv_func_'$cf_func'=yes'
7919 else
7920   echo "$as_me: program exited with status $ac_status" >&5
7921 echo "$as_me: failed program was:" >&5
7922 cat conftest.$ac_ext >&5
7923
7924                         eval 'ac_cv_func_'$cf_func'=no'
7925 fi
7926 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7927 fi
7928                 done
7929                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7930
7931 fi
7932 echo "$as_me:7932: result: $cf_cv_link_funcs" >&5
7933 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7934         test "$ac_cv_func_link"    = yes &&
7935 cat >>confdefs.h <<\EOF
7936 #define HAVE_LINK 1
7937 EOF
7938
7939         test "$ac_cv_func_symlink" = yes &&
7940 cat >>confdefs.h <<\EOF
7941 #define HAVE_SYMLINK 1
7942 EOF
7943
7944 fi
7945
7946 with_links=no
7947 with_symlinks=no
7948
7949 # soft links (symbolic links) are useful for some systems where hard links do
7950 # not work, or to make it simpler to copy terminfo trees around.
7951 if test "x$ac_cv_func_symlink" = xyes ; then
7952         echo "$as_me:7952: checking if tic should use symbolic links" >&5
7953 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7954
7955 # Check whether --enable-symlinks or --disable-symlinks was given.
7956 if test "${enable_symlinks+set}" = set; then
7957   enableval="$enable_symlinks"
7958   with_symlinks=$enableval
7959 else
7960   with_symlinks=no
7961 fi;
7962         echo "$as_me:7962: result: $with_symlinks" >&5
7963 echo "${ECHO_T}$with_symlinks" >&6
7964 fi
7965
7966 # If we have hard links and did not choose to use soft links instead, there is
7967 # no reason to make this choice optional - use the hard links.
7968 if test "$with_symlinks" = no ; then
7969         echo "$as_me:7969: checking if tic should use hard links" >&5
7970 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7971         if test "x$ac_cv_func_link" = xyes ; then
7972                 with_links=yes
7973         else
7974                 with_links=no
7975         fi
7976         echo "$as_me:7976: result: $with_links" >&5
7977 echo "${ECHO_T}$with_links" >&6
7978 fi
7979
7980 test "x$with_links" = xyes &&
7981 cat >>confdefs.h <<\EOF
7982 #define USE_LINKS 1
7983 EOF
7984
7985 test "x$with_symlinks" = xyes &&
7986 cat >>confdefs.h <<\EOF
7987 #define USE_SYMLINKS 1
7988 EOF
7989
7990 ###   use option --enable-broken-linker to force on use of broken-linker support
7991 echo "$as_me:7991: checking if you want broken-linker support code" >&5
7992 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7993
7994 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7995 if test "${enable_broken_linker+set}" = set; then
7996   enableval="$enable_broken_linker"
7997   with_broken_linker=$enableval
7998 else
7999   with_broken_linker=${BROKEN_LINKER:-no}
8000 fi;
8001 echo "$as_me:8001: result: $with_broken_linker" >&5
8002 echo "${ECHO_T}$with_broken_linker" >&6
8003
8004 BROKEN_LINKER=0
8005 if test "x$with_broken_linker" = xyes ; then
8006
8007 cat >>confdefs.h <<\EOF
8008 #define BROKEN_LINKER 1
8009 EOF
8010
8011         BROKEN_LINKER=1
8012 elif test "$DFT_LWR_MODEL" = shared ; then
8013         case $cf_cv_system_name in
8014         (cygwin*)
8015
8016 cat >>confdefs.h <<\EOF
8017 #define BROKEN_LINKER 1
8018 EOF
8019
8020                 BROKEN_LINKER=1
8021                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8022
8023 echo "${as_me:-configure}:8023: testing cygwin linker is broken anyway ..." 1>&5
8024
8025                 ;;
8026         esac
8027 fi
8028
8029 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8030 echo "$as_me:8030: checking if tputs should process BSD-style prefix padding" >&5
8031 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8032
8033 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8034 if test "${enable_bsdpad+set}" = set; then
8035   enableval="$enable_bsdpad"
8036   with_bsdpad=$enableval
8037 else
8038   with_bsdpad=no
8039 fi;
8040 echo "$as_me:8040: result: $with_bsdpad" >&5
8041 echo "${ECHO_T}$with_bsdpad" >&6
8042 test "x$with_bsdpad" = xyes &&
8043 cat >>confdefs.h <<\EOF
8044 #define BSD_TPUTS 1
8045 EOF
8046
8047 ###   use option --enable-widec to turn on use of wide-character support
8048 NCURSES_CH_T=chtype
8049 NCURSES_LIBUTF8=0
8050
8051 NEED_WCHAR_H=0
8052 NCURSES_MBSTATE_T=0
8053 NCURSES_WCHAR_T=0
8054 NCURSES_WINT_T=0
8055
8056 # Check to define _XOPEN_SOURCE "automatically"
8057 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8058
8059 cf_XOPEN_SOURCE=500
8060 cf_POSIX_C_SOURCE=199506L
8061 cf_xopen_source=
8062
8063 case $host_os in
8064 (aix[4-7]*)
8065         cf_xopen_source="-D_ALL_SOURCE"
8066         ;;
8067 (msys)
8068         cf_XOPEN_SOURCE=600
8069         ;;
8070 (darwin[0-8].*)
8071         cf_xopen_source="-D_APPLE_C_SOURCE"
8072         ;;
8073 (darwin*)
8074         cf_xopen_source="-D_DARWIN_C_SOURCE"
8075         cf_XOPEN_SOURCE=
8076         ;;
8077 (freebsd*|dragonfly*)
8078         # 5.x headers associate
8079         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8080         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8081         cf_POSIX_C_SOURCE=200112L
8082         cf_XOPEN_SOURCE=600
8083         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8084         ;;
8085 (hpux11*)
8086         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8087         ;;
8088 (hpux*)
8089         cf_xopen_source="-D_HPUX_SOURCE"
8090         ;;
8091 (irix[56].*)
8092         cf_xopen_source="-D_SGI_SOURCE"
8093         cf_XOPEN_SOURCE=
8094         ;;
8095 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8096
8097 echo "$as_me:8097: checking if we must define _GNU_SOURCE" >&5
8098 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8099 if test "${cf_cv_gnu_source+set}" = set; then
8100   echo $ECHO_N "(cached) $ECHO_C" >&6
8101 else
8102
8103 cat >conftest.$ac_ext <<_ACEOF
8104 #line 8104 "configure"
8105 #include "confdefs.h"
8106 #include <sys/types.h>
8107 int
8108 main (void)
8109 {
8110
8111 #ifndef _XOPEN_SOURCE
8112 make an error
8113 #endif
8114   ;
8115   return 0;
8116 }
8117 _ACEOF
8118 rm -f conftest.$ac_objext
8119 if { (eval echo "$as_me:8119: \"$ac_compile\"") >&5
8120   (eval $ac_compile) 2>&5
8121   ac_status=$?
8122   echo "$as_me:8122: \$? = $ac_status" >&5
8123   (exit $ac_status); } &&
8124          { ac_try='test -s conftest.$ac_objext'
8125   { (eval echo "$as_me:8125: \"$ac_try\"") >&5
8126   (eval $ac_try) 2>&5
8127   ac_status=$?
8128   echo "$as_me:8128: \$? = $ac_status" >&5
8129   (exit $ac_status); }; }; then
8130   cf_cv_gnu_source=no
8131 else
8132   echo "$as_me: failed program was:" >&5
8133 cat conftest.$ac_ext >&5
8134 cf_save="$CPPFLAGS"
8135          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8136          cat >conftest.$ac_ext <<_ACEOF
8137 #line 8137 "configure"
8138 #include "confdefs.h"
8139 #include <sys/types.h>
8140 int
8141 main (void)
8142 {
8143
8144 #ifdef _XOPEN_SOURCE
8145 make an error
8146 #endif
8147   ;
8148   return 0;
8149 }
8150 _ACEOF
8151 rm -f conftest.$ac_objext
8152 if { (eval echo "$as_me:8152: \"$ac_compile\"") >&5
8153   (eval $ac_compile) 2>&5
8154   ac_status=$?
8155   echo "$as_me:8155: \$? = $ac_status" >&5
8156   (exit $ac_status); } &&
8157          { ac_try='test -s conftest.$ac_objext'
8158   { (eval echo "$as_me:8158: \"$ac_try\"") >&5
8159   (eval $ac_try) 2>&5
8160   ac_status=$?
8161   echo "$as_me:8161: \$? = $ac_status" >&5
8162   (exit $ac_status); }; }; then
8163   cf_cv_gnu_source=no
8164 else
8165   echo "$as_me: failed program was:" >&5
8166 cat conftest.$ac_ext >&5
8167 cf_cv_gnu_source=yes
8168 fi
8169 rm -f conftest.$ac_objext conftest.$ac_ext
8170         CPPFLAGS="$cf_save"
8171
8172 fi
8173 rm -f conftest.$ac_objext conftest.$ac_ext
8174
8175 fi
8176 echo "$as_me:8176: result: $cf_cv_gnu_source" >&5
8177 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8178
8179 if test "$cf_cv_gnu_source" = yes
8180 then
8181 echo "$as_me:8181: checking if we should also define _DEFAULT_SOURCE" >&5
8182 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8183 if test "${cf_cv_default_source+set}" = set; then
8184   echo $ECHO_N "(cached) $ECHO_C" >&6
8185 else
8186
8187 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8188         cat >conftest.$ac_ext <<_ACEOF
8189 #line 8189 "configure"
8190 #include "confdefs.h"
8191 #include <sys/types.h>
8192 int
8193 main (void)
8194 {
8195
8196 #ifdef _DEFAULT_SOURCE
8197 make an error
8198 #endif
8199   ;
8200   return 0;
8201 }
8202 _ACEOF
8203 rm -f conftest.$ac_objext
8204 if { (eval echo "$as_me:8204: \"$ac_compile\"") >&5
8205   (eval $ac_compile) 2>&5
8206   ac_status=$?
8207   echo "$as_me:8207: \$? = $ac_status" >&5
8208   (exit $ac_status); } &&
8209          { ac_try='test -s conftest.$ac_objext'
8210   { (eval echo "$as_me:8210: \"$ac_try\"") >&5
8211   (eval $ac_try) 2>&5
8212   ac_status=$?
8213   echo "$as_me:8213: \$? = $ac_status" >&5
8214   (exit $ac_status); }; }; then
8215   cf_cv_default_source=no
8216 else
8217   echo "$as_me: failed program was:" >&5
8218 cat conftest.$ac_ext >&5
8219 cf_cv_default_source=yes
8220 fi
8221 rm -f conftest.$ac_objext conftest.$ac_ext
8222
8223 fi
8224 echo "$as_me:8224: result: $cf_cv_default_source" >&5
8225 echo "${ECHO_T}$cf_cv_default_source" >&6
8226 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8227 fi
8228
8229         ;;
8230 (minix*)
8231         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8232         ;;
8233 (mirbsd*)
8234         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8235         cf_XOPEN_SOURCE=
8236
8237 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8238
8239 cf_save_CFLAGS="$CFLAGS"
8240 cf_save_CPPFLAGS="$CPPFLAGS"
8241
8242 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8243         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8244                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8245
8246 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8247         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8248                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8249
8250 echo "$as_me:8250: checking if we should define _POSIX_C_SOURCE" >&5
8251 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8252 if test "${cf_cv_posix_c_source+set}" = set; then
8253   echo $ECHO_N "(cached) $ECHO_C" >&6
8254 else
8255
8256 echo "${as_me:-configure}:8256: testing if the symbol is already defined go no further ..." 1>&5
8257
8258         cat >conftest.$ac_ext <<_ACEOF
8259 #line 8259 "configure"
8260 #include "confdefs.h"
8261 #include <sys/types.h>
8262 int
8263 main (void)
8264 {
8265
8266 #ifndef _POSIX_C_SOURCE
8267 make an error
8268 #endif
8269   ;
8270   return 0;
8271 }
8272 _ACEOF
8273 rm -f conftest.$ac_objext
8274 if { (eval echo "$as_me:8274: \"$ac_compile\"") >&5
8275   (eval $ac_compile) 2>&5
8276   ac_status=$?
8277   echo "$as_me:8277: \$? = $ac_status" >&5
8278   (exit $ac_status); } &&
8279          { ac_try='test -s conftest.$ac_objext'
8280   { (eval echo "$as_me:8280: \"$ac_try\"") >&5
8281   (eval $ac_try) 2>&5
8282   ac_status=$?
8283   echo "$as_me:8283: \$? = $ac_status" >&5
8284   (exit $ac_status); }; }; then
8285   cf_cv_posix_c_source=no
8286 else
8287   echo "$as_me: failed program was:" >&5
8288 cat conftest.$ac_ext >&5
8289 cf_want_posix_source=no
8290          case .$cf_POSIX_C_SOURCE in
8291          (.[12]??*)
8292                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8293                 ;;
8294          (.2)
8295                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8296                 cf_want_posix_source=yes
8297                 ;;
8298          (.*)
8299                 cf_want_posix_source=yes
8300                 ;;
8301          esac
8302          if test "$cf_want_posix_source" = yes ; then
8303                 cat >conftest.$ac_ext <<_ACEOF
8304 #line 8304 "configure"
8305 #include "confdefs.h"
8306 #include <sys/types.h>
8307 int
8308 main (void)
8309 {
8310
8311 #ifdef _POSIX_SOURCE
8312 make an error
8313 #endif
8314   ;
8315   return 0;
8316 }
8317 _ACEOF
8318 rm -f conftest.$ac_objext
8319 if { (eval echo "$as_me:8319: \"$ac_compile\"") >&5
8320   (eval $ac_compile) 2>&5
8321   ac_status=$?
8322   echo "$as_me:8322: \$? = $ac_status" >&5
8323   (exit $ac_status); } &&
8324          { ac_try='test -s conftest.$ac_objext'
8325   { (eval echo "$as_me:8325: \"$ac_try\"") >&5
8326   (eval $ac_try) 2>&5
8327   ac_status=$?
8328   echo "$as_me:8328: \$? = $ac_status" >&5
8329   (exit $ac_status); }; }; then
8330   :
8331 else
8332   echo "$as_me: failed program was:" >&5
8333 cat conftest.$ac_ext >&5
8334 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8335 fi
8336 rm -f conftest.$ac_objext conftest.$ac_ext
8337          fi
8338
8339 echo "${as_me:-configure}:8339: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8340
8341          CFLAGS="$cf_trim_CFLAGS"
8342          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8343
8344 echo "${as_me:-configure}:8344: testing if the second compile does not leave our definition intact error ..." 1>&5
8345
8346          cat >conftest.$ac_ext <<_ACEOF
8347 #line 8347 "configure"
8348 #include "confdefs.h"
8349 #include <sys/types.h>
8350 int
8351 main (void)
8352 {
8353
8354 #ifndef _POSIX_C_SOURCE
8355 make an error
8356 #endif
8357   ;
8358   return 0;
8359 }
8360 _ACEOF
8361 rm -f conftest.$ac_objext
8362 if { (eval echo "$as_me:8362: \"$ac_compile\"") >&5
8363   (eval $ac_compile) 2>&5
8364   ac_status=$?
8365   echo "$as_me:8365: \$? = $ac_status" >&5
8366   (exit $ac_status); } &&
8367          { ac_try='test -s conftest.$ac_objext'
8368   { (eval echo "$as_me:8368: \"$ac_try\"") >&5
8369   (eval $ac_try) 2>&5
8370   ac_status=$?
8371   echo "$as_me:8371: \$? = $ac_status" >&5
8372   (exit $ac_status); }; }; then
8373   :
8374 else
8375   echo "$as_me: failed program was:" >&5
8376 cat conftest.$ac_ext >&5
8377 cf_cv_posix_c_source=no
8378 fi
8379 rm -f conftest.$ac_objext conftest.$ac_ext
8380          CFLAGS="$cf_save_CFLAGS"
8381          CPPFLAGS="$cf_save_CPPFLAGS"
8382
8383 fi
8384 rm -f conftest.$ac_objext conftest.$ac_ext
8385
8386 fi
8387 echo "$as_me:8387: result: $cf_cv_posix_c_source" >&5
8388 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8389
8390 if test "$cf_cv_posix_c_source" != no ; then
8391         CFLAGS="$cf_trim_CFLAGS"
8392         CPPFLAGS="$cf_trim_CPPFLAGS"
8393
8394 cf_fix_cppflags=no
8395 cf_new_cflags=
8396 cf_new_cppflags=
8397 cf_new_extra_cppflags=
8398
8399 for cf_add_cflags in $cf_cv_posix_c_source
8400 do
8401 case $cf_fix_cppflags in
8402 (no)
8403         case $cf_add_cflags in
8404         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8405                 case $cf_add_cflags in
8406                 (-D*)
8407                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8408
8409                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8410                                 && test -z "${cf_tst_cflags}" \
8411                                 && cf_fix_cppflags=yes
8412
8413                         if test $cf_fix_cppflags = yes ; then
8414
8415         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8416         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8417
8418                                 continue
8419                         elif test "${cf_tst_cflags}" = "\"'" ; then
8420
8421         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8422         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8423
8424                                 continue
8425                         fi
8426                         ;;
8427                 esac
8428                 case "$CPPFLAGS" in
8429                 (*$cf_add_cflags)
8430                         ;;
8431                 (*)
8432                         case $cf_add_cflags in
8433                         (-D*)
8434                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8435
8436 CPPFLAGS=`echo "$CPPFLAGS" | \
8437         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8438                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8439
8440                                 ;;
8441                         esac
8442
8443         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8444         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8445
8446                         ;;
8447                 esac
8448                 ;;
8449         (*)
8450
8451         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8452         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8453
8454                 ;;
8455         esac
8456         ;;
8457 (yes)
8458
8459         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8460         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8461
8462         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8463
8464         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8465                 && test -z "${cf_tst_cflags}" \
8466                 && cf_fix_cppflags=no
8467         ;;
8468 esac
8469 done
8470
8471 if test -n "$cf_new_cflags" ; then
8472
8473         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8474         CFLAGS="${CFLAGS}$cf_new_cflags"
8475
8476 fi
8477
8478 if test -n "$cf_new_cppflags" ; then
8479
8480         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8481         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8482
8483 fi
8484
8485 if test -n "$cf_new_extra_cppflags" ; then
8486
8487         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8488         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8489
8490 fi
8491
8492 fi
8493
8494         ;;
8495 (netbsd*)
8496         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8497         ;;
8498 (openbsd[4-9]*)
8499         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8500         cf_xopen_source="-D_BSD_SOURCE"
8501         cf_XOPEN_SOURCE=600
8502         ;;
8503 (openbsd*)
8504         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8505         ;;
8506 (osf[45]*)
8507         cf_xopen_source="-D_OSF_SOURCE"
8508         ;;
8509 (nto-qnx*)
8510         cf_xopen_source="-D_QNX_SOURCE"
8511         ;;
8512 (sco*)
8513         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8514         ;;
8515 (solaris2.*)
8516         cf_xopen_source="-D__EXTENSIONS__"
8517         cf_cv_xopen_source=broken
8518         ;;
8519 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8520         cf_XOPEN_SOURCE=
8521         cf_POSIX_C_SOURCE=
8522         ;;
8523 (*)
8524
8525 echo "$as_me:8525: checking if we should define _XOPEN_SOURCE" >&5
8526 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8527 if test "${cf_cv_xopen_source+set}" = set; then
8528   echo $ECHO_N "(cached) $ECHO_C" >&6
8529 else
8530
8531         cat >conftest.$ac_ext <<_ACEOF
8532 #line 8532 "configure"
8533 #include "confdefs.h"
8534
8535 #include <stdlib.h>
8536 #include <string.h>
8537 #include <sys/types.h>
8538
8539 int
8540 main (void)
8541 {
8542
8543 #ifndef _XOPEN_SOURCE
8544 make an error
8545 #endif
8546   ;
8547   return 0;
8548 }
8549 _ACEOF
8550 rm -f conftest.$ac_objext
8551 if { (eval echo "$as_me:8551: \"$ac_compile\"") >&5
8552   (eval $ac_compile) 2>&5
8553   ac_status=$?
8554   echo "$as_me:8554: \$? = $ac_status" >&5
8555   (exit $ac_status); } &&
8556          { ac_try='test -s conftest.$ac_objext'
8557   { (eval echo "$as_me:8557: \"$ac_try\"") >&5
8558   (eval $ac_try) 2>&5
8559   ac_status=$?
8560   echo "$as_me:8560: \$? = $ac_status" >&5
8561   (exit $ac_status); }; }; then
8562   cf_cv_xopen_source=no
8563 else
8564   echo "$as_me: failed program was:" >&5
8565 cat conftest.$ac_ext >&5
8566 cf_save="$CPPFLAGS"
8567          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8568          cat >conftest.$ac_ext <<_ACEOF
8569 #line 8569 "configure"
8570 #include "confdefs.h"
8571
8572 #include <stdlib.h>
8573 #include <string.h>
8574 #include <sys/types.h>
8575
8576 int
8577 main (void)
8578 {
8579
8580 #ifdef _XOPEN_SOURCE
8581 make an error
8582 #endif
8583   ;
8584   return 0;
8585 }
8586 _ACEOF
8587 rm -f conftest.$ac_objext
8588 if { (eval echo "$as_me:8588: \"$ac_compile\"") >&5
8589   (eval $ac_compile) 2>&5
8590   ac_status=$?
8591   echo "$as_me:8591: \$? = $ac_status" >&5
8592   (exit $ac_status); } &&
8593          { ac_try='test -s conftest.$ac_objext'
8594   { (eval echo "$as_me:8594: \"$ac_try\"") >&5
8595   (eval $ac_try) 2>&5
8596   ac_status=$?
8597   echo "$as_me:8597: \$? = $ac_status" >&5
8598   (exit $ac_status); }; }; then
8599   cf_cv_xopen_source=no
8600 else
8601   echo "$as_me: failed program was:" >&5
8602 cat conftest.$ac_ext >&5
8603 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8604 fi
8605 rm -f conftest.$ac_objext conftest.$ac_ext
8606         CPPFLAGS="$cf_save"
8607
8608 fi
8609 rm -f conftest.$ac_objext conftest.$ac_ext
8610
8611 fi
8612 echo "$as_me:8612: result: $cf_cv_xopen_source" >&5
8613 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8614
8615 if test "$cf_cv_xopen_source" != no ; then
8616
8617 CFLAGS=`echo "$CFLAGS" | \
8618         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8619                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8620
8621 CPPFLAGS=`echo "$CPPFLAGS" | \
8622         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8623                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8624
8625         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8626
8627 cf_fix_cppflags=no
8628 cf_new_cflags=
8629 cf_new_cppflags=
8630 cf_new_extra_cppflags=
8631
8632 for cf_add_cflags in $cf_temp_xopen_source
8633 do
8634 case $cf_fix_cppflags in
8635 (no)
8636         case $cf_add_cflags in
8637         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8638                 case $cf_add_cflags in
8639                 (-D*)
8640                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8641
8642                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8643                                 && test -z "${cf_tst_cflags}" \
8644                                 && cf_fix_cppflags=yes
8645
8646                         if test $cf_fix_cppflags = yes ; then
8647
8648         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8649         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8650
8651                                 continue
8652                         elif test "${cf_tst_cflags}" = "\"'" ; then
8653
8654         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8655         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8656
8657                                 continue
8658                         fi
8659                         ;;
8660                 esac
8661                 case "$CPPFLAGS" in
8662                 (*$cf_add_cflags)
8663                         ;;
8664                 (*)
8665                         case $cf_add_cflags in
8666                         (-D*)
8667                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8668
8669 CPPFLAGS=`echo "$CPPFLAGS" | \
8670         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8671                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8672
8673                                 ;;
8674                         esac
8675
8676         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8677         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8678
8679                         ;;
8680                 esac
8681                 ;;
8682         (*)
8683
8684         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8685         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8686
8687                 ;;
8688         esac
8689         ;;
8690 (yes)
8691
8692         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8693         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8694
8695         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8696
8697         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8698                 && test -z "${cf_tst_cflags}" \
8699                 && cf_fix_cppflags=no
8700         ;;
8701 esac
8702 done
8703
8704 if test -n "$cf_new_cflags" ; then
8705
8706         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8707         CFLAGS="${CFLAGS}$cf_new_cflags"
8708
8709 fi
8710
8711 if test -n "$cf_new_cppflags" ; then
8712
8713         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8714         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8715
8716 fi
8717
8718 if test -n "$cf_new_extra_cppflags" ; then
8719
8720         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8721         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8722
8723 fi
8724
8725 fi
8726
8727 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8728
8729 cf_save_CFLAGS="$CFLAGS"
8730 cf_save_CPPFLAGS="$CPPFLAGS"
8731
8732 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8733         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8734                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8735
8736 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8737         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8738                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8739
8740 echo "$as_me:8740: checking if we should define _POSIX_C_SOURCE" >&5
8741 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8742 if test "${cf_cv_posix_c_source+set}" = set; then
8743   echo $ECHO_N "(cached) $ECHO_C" >&6
8744 else
8745
8746 echo "${as_me:-configure}:8746: testing if the symbol is already defined go no further ..." 1>&5
8747
8748         cat >conftest.$ac_ext <<_ACEOF
8749 #line 8749 "configure"
8750 #include "confdefs.h"
8751 #include <sys/types.h>
8752 int
8753 main (void)
8754 {
8755
8756 #ifndef _POSIX_C_SOURCE
8757 make an error
8758 #endif
8759   ;
8760   return 0;
8761 }
8762 _ACEOF
8763 rm -f conftest.$ac_objext
8764 if { (eval echo "$as_me:8764: \"$ac_compile\"") >&5
8765   (eval $ac_compile) 2>&5
8766   ac_status=$?
8767   echo "$as_me:8767: \$? = $ac_status" >&5
8768   (exit $ac_status); } &&
8769          { ac_try='test -s conftest.$ac_objext'
8770   { (eval echo "$as_me:8770: \"$ac_try\"") >&5
8771   (eval $ac_try) 2>&5
8772   ac_status=$?
8773   echo "$as_me:8773: \$? = $ac_status" >&5
8774   (exit $ac_status); }; }; then
8775   cf_cv_posix_c_source=no
8776 else
8777   echo "$as_me: failed program was:" >&5
8778 cat conftest.$ac_ext >&5
8779 cf_want_posix_source=no
8780          case .$cf_POSIX_C_SOURCE in
8781          (.[12]??*)
8782                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8783                 ;;
8784          (.2)
8785                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8786                 cf_want_posix_source=yes
8787                 ;;
8788          (.*)
8789                 cf_want_posix_source=yes
8790                 ;;
8791          esac
8792          if test "$cf_want_posix_source" = yes ; then
8793                 cat >conftest.$ac_ext <<_ACEOF
8794 #line 8794 "configure"
8795 #include "confdefs.h"
8796 #include <sys/types.h>
8797 int
8798 main (void)
8799 {
8800
8801 #ifdef _POSIX_SOURCE
8802 make an error
8803 #endif
8804   ;
8805   return 0;
8806 }
8807 _ACEOF
8808 rm -f conftest.$ac_objext
8809 if { (eval echo "$as_me:8809: \"$ac_compile\"") >&5
8810   (eval $ac_compile) 2>&5
8811   ac_status=$?
8812   echo "$as_me:8812: \$? = $ac_status" >&5
8813   (exit $ac_status); } &&
8814          { ac_try='test -s conftest.$ac_objext'
8815   { (eval echo "$as_me:8815: \"$ac_try\"") >&5
8816   (eval $ac_try) 2>&5
8817   ac_status=$?
8818   echo "$as_me:8818: \$? = $ac_status" >&5
8819   (exit $ac_status); }; }; then
8820   :
8821 else
8822   echo "$as_me: failed program was:" >&5
8823 cat conftest.$ac_ext >&5
8824 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8825 fi
8826 rm -f conftest.$ac_objext conftest.$ac_ext
8827          fi
8828
8829 echo "${as_me:-configure}:8829: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8830
8831          CFLAGS="$cf_trim_CFLAGS"
8832          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8833
8834 echo "${as_me:-configure}:8834: testing if the second compile does not leave our definition intact error ..." 1>&5
8835
8836          cat >conftest.$ac_ext <<_ACEOF
8837 #line 8837 "configure"
8838 #include "confdefs.h"
8839 #include <sys/types.h>
8840 int
8841 main (void)
8842 {
8843
8844 #ifndef _POSIX_C_SOURCE
8845 make an error
8846 #endif
8847   ;
8848   return 0;
8849 }
8850 _ACEOF
8851 rm -f conftest.$ac_objext
8852 if { (eval echo "$as_me:8852: \"$ac_compile\"") >&5
8853   (eval $ac_compile) 2>&5
8854   ac_status=$?
8855   echo "$as_me:8855: \$? = $ac_status" >&5
8856   (exit $ac_status); } &&
8857          { ac_try='test -s conftest.$ac_objext'
8858   { (eval echo "$as_me:8858: \"$ac_try\"") >&5
8859   (eval $ac_try) 2>&5
8860   ac_status=$?
8861   echo "$as_me:8861: \$? = $ac_status" >&5
8862   (exit $ac_status); }; }; then
8863   :
8864 else
8865   echo "$as_me: failed program was:" >&5
8866 cat conftest.$ac_ext >&5
8867 cf_cv_posix_c_source=no
8868 fi
8869 rm -f conftest.$ac_objext conftest.$ac_ext
8870          CFLAGS="$cf_save_CFLAGS"
8871          CPPFLAGS="$cf_save_CPPFLAGS"
8872
8873 fi
8874 rm -f conftest.$ac_objext conftest.$ac_ext
8875
8876 fi
8877 echo "$as_me:8877: result: $cf_cv_posix_c_source" >&5
8878 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8879
8880 if test "$cf_cv_posix_c_source" != no ; then
8881         CFLAGS="$cf_trim_CFLAGS"
8882         CPPFLAGS="$cf_trim_CPPFLAGS"
8883
8884 cf_fix_cppflags=no
8885 cf_new_cflags=
8886 cf_new_cppflags=
8887 cf_new_extra_cppflags=
8888
8889 for cf_add_cflags in $cf_cv_posix_c_source
8890 do
8891 case $cf_fix_cppflags in
8892 (no)
8893         case $cf_add_cflags in
8894         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8895                 case $cf_add_cflags in
8896                 (-D*)
8897                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8898
8899                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8900                                 && test -z "${cf_tst_cflags}" \
8901                                 && cf_fix_cppflags=yes
8902
8903                         if test $cf_fix_cppflags = yes ; then
8904
8905         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8906         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8907
8908                                 continue
8909                         elif test "${cf_tst_cflags}" = "\"'" ; then
8910
8911         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8912         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8913
8914                                 continue
8915                         fi
8916                         ;;
8917                 esac
8918                 case "$CPPFLAGS" in
8919                 (*$cf_add_cflags)
8920                         ;;
8921                 (*)
8922                         case $cf_add_cflags in
8923                         (-D*)
8924                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8925
8926 CPPFLAGS=`echo "$CPPFLAGS" | \
8927         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8928                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8929
8930                                 ;;
8931                         esac
8932
8933         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8934         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8935
8936                         ;;
8937                 esac
8938                 ;;
8939         (*)
8940
8941         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8942         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8943
8944                 ;;
8945         esac
8946         ;;
8947 (yes)
8948
8949         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8950         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8951
8952         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8953
8954         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8955                 && test -z "${cf_tst_cflags}" \
8956                 && cf_fix_cppflags=no
8957         ;;
8958 esac
8959 done
8960
8961 if test -n "$cf_new_cflags" ; then
8962
8963         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8964         CFLAGS="${CFLAGS}$cf_new_cflags"
8965
8966 fi
8967
8968 if test -n "$cf_new_cppflags" ; then
8969
8970         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8971         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8972
8973 fi
8974
8975 if test -n "$cf_new_extra_cppflags" ; then
8976
8977         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8978         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8979
8980 fi
8981
8982 fi
8983
8984         ;;
8985 esac
8986
8987 if test -n "$cf_xopen_source" ; then
8988
8989 cf_fix_cppflags=no
8990 cf_new_cflags=
8991 cf_new_cppflags=
8992 cf_new_extra_cppflags=
8993
8994 for cf_add_cflags in $cf_xopen_source
8995 do
8996 case $cf_fix_cppflags in
8997 (no)
8998         case $cf_add_cflags in
8999         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9000                 case $cf_add_cflags in
9001                 (-D*)
9002                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9003
9004                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9005                                 && test -z "${cf_tst_cflags}" \
9006                                 && cf_fix_cppflags=yes
9007
9008                         if test $cf_fix_cppflags = yes ; then
9009
9010         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9011         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9012
9013                                 continue
9014                         elif test "${cf_tst_cflags}" = "\"'" ; then
9015
9016         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9017         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9018
9019                                 continue
9020                         fi
9021                         ;;
9022                 esac
9023                 case "$CPPFLAGS" in
9024                 (*$cf_add_cflags)
9025                         ;;
9026                 (*)
9027                         case $cf_add_cflags in
9028                         (-D*)
9029                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9030
9031 CPPFLAGS=`echo "$CPPFLAGS" | \
9032         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9033                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9034
9035                                 ;;
9036                         esac
9037
9038         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9039         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9040
9041                         ;;
9042                 esac
9043                 ;;
9044         (*)
9045
9046         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9047         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9048
9049                 ;;
9050         esac
9051         ;;
9052 (yes)
9053
9054         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9055         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9056
9057         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9058
9059         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9060                 && test -z "${cf_tst_cflags}" \
9061                 && cf_fix_cppflags=no
9062         ;;
9063 esac
9064 done
9065
9066 if test -n "$cf_new_cflags" ; then
9067         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9068
9069 echo "${as_me:-configure}:9069: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9070
9071         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9072         CFLAGS="${CFLAGS}$cf_new_cflags"
9073
9074 fi
9075
9076 if test -n "$cf_new_cppflags" ; then
9077         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9078
9079 echo "${as_me:-configure}:9079: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9080
9081         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9082         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9083
9084 fi
9085
9086 if test -n "$cf_new_extra_cppflags" ; then
9087         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9088
9089 echo "${as_me:-configure}:9089: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9090
9091         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9092         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9093
9094 fi
9095
9096 fi
9097
9098 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9099         echo "$as_me:9099: checking if _XOPEN_SOURCE really is set" >&5
9100 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9101         cat >conftest.$ac_ext <<_ACEOF
9102 #line 9102 "configure"
9103 #include "confdefs.h"
9104 #include <stdlib.h>
9105 int
9106 main (void)
9107 {
9108
9109 #ifndef _XOPEN_SOURCE
9110 make an error
9111 #endif
9112   ;
9113   return 0;
9114 }
9115 _ACEOF
9116 rm -f conftest.$ac_objext
9117 if { (eval echo "$as_me:9117: \"$ac_compile\"") >&5
9118   (eval $ac_compile) 2>&5
9119   ac_status=$?
9120   echo "$as_me:9120: \$? = $ac_status" >&5
9121   (exit $ac_status); } &&
9122          { ac_try='test -s conftest.$ac_objext'
9123   { (eval echo "$as_me:9123: \"$ac_try\"") >&5
9124   (eval $ac_try) 2>&5
9125   ac_status=$?
9126   echo "$as_me:9126: \$? = $ac_status" >&5
9127   (exit $ac_status); }; }; then
9128   cf_XOPEN_SOURCE_set=yes
9129 else
9130   echo "$as_me: failed program was:" >&5
9131 cat conftest.$ac_ext >&5
9132 cf_XOPEN_SOURCE_set=no
9133 fi
9134 rm -f conftest.$ac_objext conftest.$ac_ext
9135         echo "$as_me:9135: result: $cf_XOPEN_SOURCE_set" >&5
9136 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9137         if test $cf_XOPEN_SOURCE_set = yes
9138         then
9139                 cat >conftest.$ac_ext <<_ACEOF
9140 #line 9140 "configure"
9141 #include "confdefs.h"
9142 #include <stdlib.h>
9143 int
9144 main (void)
9145 {
9146
9147 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9148 make an error
9149 #endif
9150   ;
9151   return 0;
9152 }
9153 _ACEOF
9154 rm -f conftest.$ac_objext
9155 if { (eval echo "$as_me:9155: \"$ac_compile\"") >&5
9156   (eval $ac_compile) 2>&5
9157   ac_status=$?
9158   echo "$as_me:9158: \$? = $ac_status" >&5
9159   (exit $ac_status); } &&
9160          { ac_try='test -s conftest.$ac_objext'
9161   { (eval echo "$as_me:9161: \"$ac_try\"") >&5
9162   (eval $ac_try) 2>&5
9163   ac_status=$?
9164   echo "$as_me:9164: \$? = $ac_status" >&5
9165   (exit $ac_status); }; }; then
9166   cf_XOPEN_SOURCE_set_ok=yes
9167 else
9168   echo "$as_me: failed program was:" >&5
9169 cat conftest.$ac_ext >&5
9170 cf_XOPEN_SOURCE_set_ok=no
9171 fi
9172 rm -f conftest.$ac_objext conftest.$ac_ext
9173                 if test $cf_XOPEN_SOURCE_set_ok = no
9174                 then
9175                         { echo "$as_me:9175: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9176 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9177                 fi
9178         else
9179
9180 echo "$as_me:9180: checking if we should define _XOPEN_SOURCE" >&5
9181 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9182 if test "${cf_cv_xopen_source+set}" = set; then
9183   echo $ECHO_N "(cached) $ECHO_C" >&6
9184 else
9185
9186         cat >conftest.$ac_ext <<_ACEOF
9187 #line 9187 "configure"
9188 #include "confdefs.h"
9189
9190 #include <stdlib.h>
9191 #include <string.h>
9192 #include <sys/types.h>
9193
9194 int
9195 main (void)
9196 {
9197
9198 #ifndef _XOPEN_SOURCE
9199 make an error
9200 #endif
9201   ;
9202   return 0;
9203 }
9204 _ACEOF
9205 rm -f conftest.$ac_objext
9206 if { (eval echo "$as_me:9206: \"$ac_compile\"") >&5
9207   (eval $ac_compile) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); } &&
9211          { ac_try='test -s conftest.$ac_objext'
9212   { (eval echo "$as_me:9212: \"$ac_try\"") >&5
9213   (eval $ac_try) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); }; }; then
9217   cf_cv_xopen_source=no
9218 else
9219   echo "$as_me: failed program was:" >&5
9220 cat conftest.$ac_ext >&5
9221 cf_save="$CPPFLAGS"
9222          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9223          cat >conftest.$ac_ext <<_ACEOF
9224 #line 9224 "configure"
9225 #include "confdefs.h"
9226
9227 #include <stdlib.h>
9228 #include <string.h>
9229 #include <sys/types.h>
9230
9231 int
9232 main (void)
9233 {
9234
9235 #ifdef _XOPEN_SOURCE
9236 make an error
9237 #endif
9238   ;
9239   return 0;
9240 }
9241 _ACEOF
9242 rm -f conftest.$ac_objext
9243 if { (eval echo "$as_me:9243: \"$ac_compile\"") >&5
9244   (eval $ac_compile) 2>&5
9245   ac_status=$?
9246   echo "$as_me:9246: \$? = $ac_status" >&5
9247   (exit $ac_status); } &&
9248          { ac_try='test -s conftest.$ac_objext'
9249   { (eval echo "$as_me:9249: \"$ac_try\"") >&5
9250   (eval $ac_try) 2>&5
9251   ac_status=$?
9252   echo "$as_me:9252: \$? = $ac_status" >&5
9253   (exit $ac_status); }; }; then
9254   cf_cv_xopen_source=no
9255 else
9256   echo "$as_me: failed program was:" >&5
9257 cat conftest.$ac_ext >&5
9258 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9259 fi
9260 rm -f conftest.$ac_objext conftest.$ac_ext
9261         CPPFLAGS="$cf_save"
9262
9263 fi
9264 rm -f conftest.$ac_objext conftest.$ac_ext
9265
9266 fi
9267 echo "$as_me:9267: result: $cf_cv_xopen_source" >&5
9268 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9269
9270 if test "$cf_cv_xopen_source" != no ; then
9271
9272 CFLAGS=`echo "$CFLAGS" | \
9273         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9274                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9275
9276 CPPFLAGS=`echo "$CPPFLAGS" | \
9277         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9278                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9279
9280         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9281
9282 cf_fix_cppflags=no
9283 cf_new_cflags=
9284 cf_new_cppflags=
9285 cf_new_extra_cppflags=
9286
9287 for cf_add_cflags in $cf_temp_xopen_source
9288 do
9289 case $cf_fix_cppflags in
9290 (no)
9291         case $cf_add_cflags in
9292         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9293                 case $cf_add_cflags in
9294                 (-D*)
9295                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9296
9297                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9298                                 && test -z "${cf_tst_cflags}" \
9299                                 && cf_fix_cppflags=yes
9300
9301                         if test $cf_fix_cppflags = yes ; then
9302
9303         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9304         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9305
9306                                 continue
9307                         elif test "${cf_tst_cflags}" = "\"'" ; then
9308
9309         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9310         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9311
9312                                 continue
9313                         fi
9314                         ;;
9315                 esac
9316                 case "$CPPFLAGS" in
9317                 (*$cf_add_cflags)
9318                         ;;
9319                 (*)
9320                         case $cf_add_cflags in
9321                         (-D*)
9322                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9323
9324 CPPFLAGS=`echo "$CPPFLAGS" | \
9325         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9326                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9327
9328                                 ;;
9329                         esac
9330
9331         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9332         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9333
9334                         ;;
9335                 esac
9336                 ;;
9337         (*)
9338
9339         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9340         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9341
9342                 ;;
9343         esac
9344         ;;
9345 (yes)
9346
9347         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9348         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9349
9350         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9351
9352         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9353                 && test -z "${cf_tst_cflags}" \
9354                 && cf_fix_cppflags=no
9355         ;;
9356 esac
9357 done
9358
9359 if test -n "$cf_new_cflags" ; then
9360
9361         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9362         CFLAGS="${CFLAGS}$cf_new_cflags"
9363
9364 fi
9365
9366 if test -n "$cf_new_cppflags" ; then
9367
9368         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9369         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9370
9371 fi
9372
9373 if test -n "$cf_new_extra_cppflags" ; then
9374
9375         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9376         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9377
9378 fi
9379
9380 fi
9381
9382         fi
9383 fi
9384
9385 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9386
9387 # Work around breakage on OS X
9388
9389 echo "$as_me:9389: checking if SIGWINCH is defined" >&5
9390 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9391 if test "${cf_cv_define_sigwinch+set}" = set; then
9392   echo $ECHO_N "(cached) $ECHO_C" >&6
9393 else
9394
9395         cat >conftest.$ac_ext <<_ACEOF
9396 #line 9396 "configure"
9397 #include "confdefs.h"
9398
9399 #include <sys/types.h>
9400 #include <sys/signal.h>
9401
9402 int
9403 main (void)
9404 {
9405 int x = SIGWINCH
9406   ;
9407   return 0;
9408 }
9409 _ACEOF
9410 rm -f conftest.$ac_objext
9411 if { (eval echo "$as_me:9411: \"$ac_compile\"") >&5
9412   (eval $ac_compile) 2>&5
9413   ac_status=$?
9414   echo "$as_me:9414: \$? = $ac_status" >&5
9415   (exit $ac_status); } &&
9416          { ac_try='test -s conftest.$ac_objext'
9417   { (eval echo "$as_me:9417: \"$ac_try\"") >&5
9418   (eval $ac_try) 2>&5
9419   ac_status=$?
9420   echo "$as_me:9420: \$? = $ac_status" >&5
9421   (exit $ac_status); }; }; then
9422   cf_cv_define_sigwinch=yes
9423 else
9424   echo "$as_me: failed program was:" >&5
9425 cat conftest.$ac_ext >&5
9426 cat >conftest.$ac_ext <<_ACEOF
9427 #line 9427 "configure"
9428 #include "confdefs.h"
9429
9430 #undef _XOPEN_SOURCE
9431 #undef _POSIX_SOURCE
9432 #undef _POSIX_C_SOURCE
9433 #include <sys/types.h>
9434 #include <sys/signal.h>
9435
9436 int
9437 main (void)
9438 {
9439 int x = SIGWINCH
9440   ;
9441   return 0;
9442 }
9443 _ACEOF
9444 rm -f conftest.$ac_objext
9445 if { (eval echo "$as_me:9445: \"$ac_compile\"") >&5
9446   (eval $ac_compile) 2>&5
9447   ac_status=$?
9448   echo "$as_me:9448: \$? = $ac_status" >&5
9449   (exit $ac_status); } &&
9450          { ac_try='test -s conftest.$ac_objext'
9451   { (eval echo "$as_me:9451: \"$ac_try\"") >&5
9452   (eval $ac_try) 2>&5
9453   ac_status=$?
9454   echo "$as_me:9454: \$? = $ac_status" >&5
9455   (exit $ac_status); }; }; then
9456   cf_cv_define_sigwinch=maybe
9457 else
9458   echo "$as_me: failed program was:" >&5
9459 cat conftest.$ac_ext >&5
9460 cf_cv_define_sigwinch=no
9461 fi
9462 rm -f conftest.$ac_objext conftest.$ac_ext
9463
9464 fi
9465 rm -f conftest.$ac_objext conftest.$ac_ext
9466
9467 fi
9468 echo "$as_me:9468: result: $cf_cv_define_sigwinch" >&5
9469 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9470
9471 if test "$cf_cv_define_sigwinch" = maybe ; then
9472 echo "$as_me:9472: checking for actual SIGWINCH definition" >&5
9473 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9474 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9475   echo $ECHO_N "(cached) $ECHO_C" >&6
9476 else
9477
9478 cf_cv_fixup_sigwinch=unknown
9479 cf_sigwinch=32
9480 while test $cf_sigwinch != 1
9481 do
9482         cat >conftest.$ac_ext <<_ACEOF
9483 #line 9483 "configure"
9484 #include "confdefs.h"
9485
9486 #undef _XOPEN_SOURCE
9487 #undef _POSIX_SOURCE
9488 #undef _POSIX_C_SOURCE
9489 #include <sys/types.h>
9490 #include <sys/signal.h>
9491
9492 int
9493 main (void)
9494 {
9495
9496 #if SIGWINCH != $cf_sigwinch
9497 make an error
9498 #endif
9499 int x = SIGWINCH
9500   ;
9501   return 0;
9502 }
9503 _ACEOF
9504 rm -f conftest.$ac_objext
9505 if { (eval echo "$as_me:9505: \"$ac_compile\"") >&5
9506   (eval $ac_compile) 2>&5
9507   ac_status=$?
9508   echo "$as_me:9508: \$? = $ac_status" >&5
9509   (exit $ac_status); } &&
9510          { ac_try='test -s conftest.$ac_objext'
9511   { (eval echo "$as_me:9511: \"$ac_try\"") >&5
9512   (eval $ac_try) 2>&5
9513   ac_status=$?
9514   echo "$as_me:9514: \$? = $ac_status" >&5
9515   (exit $ac_status); }; }; then
9516   cf_cv_fixup_sigwinch=$cf_sigwinch
9517          break
9518 else
9519   echo "$as_me: failed program was:" >&5
9520 cat conftest.$ac_ext >&5
9521 fi
9522 rm -f conftest.$ac_objext conftest.$ac_ext
9523
9524 cf_sigwinch=`expr $cf_sigwinch - 1`
9525 done
9526
9527 fi
9528 echo "$as_me:9528: result: $cf_cv_fixup_sigwinch" >&5
9529 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9530
9531         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9532                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9533         fi
9534 fi
9535
9536 # Checks for CODESET support.
9537
9538 echo "$as_me:9538: checking for nl_langinfo and CODESET" >&5
9539 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9540 if test "${am_cv_langinfo_codeset+set}" = set; then
9541   echo $ECHO_N "(cached) $ECHO_C" >&6
9542 else
9543   cat >conftest.$ac_ext <<_ACEOF
9544 #line 9544 "configure"
9545 #include "confdefs.h"
9546 #include <langinfo.h>
9547 int
9548 main (void)
9549 {
9550 char* cs = nl_langinfo(CODESET);
9551   ;
9552   return 0;
9553 }
9554 _ACEOF
9555 rm -f conftest.$ac_objext conftest$ac_exeext
9556 if { (eval echo "$as_me:9556: \"$ac_link\"") >&5
9557   (eval $ac_link) 2>&5
9558   ac_status=$?
9559   echo "$as_me:9559: \$? = $ac_status" >&5
9560   (exit $ac_status); } &&
9561          { ac_try='test -s conftest$ac_exeext'
9562   { (eval echo "$as_me:9562: \"$ac_try\"") >&5
9563   (eval $ac_try) 2>&5
9564   ac_status=$?
9565   echo "$as_me:9565: \$? = $ac_status" >&5
9566   (exit $ac_status); }; }; then
9567   am_cv_langinfo_codeset=yes
9568 else
9569   echo "$as_me: failed program was:" >&5
9570 cat conftest.$ac_ext >&5
9571 am_cv_langinfo_codeset=no
9572 fi
9573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9574
9575 fi
9576 echo "$as_me:9576: result: $am_cv_langinfo_codeset" >&5
9577 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9578         if test $am_cv_langinfo_codeset = yes; then
9579
9580 cat >>confdefs.h <<\EOF
9581 #define HAVE_LANGINFO_CODESET 1
9582 EOF
9583
9584         fi
9585
9586 # use these variables to work around a defect in gcc's fixincludes.
9587 NCURSES_OK_WCHAR_T=
9588 NCURSES_OK_WINT_T=
9589
9590 echo "$as_me:9590: checking if you want wide-character code" >&5
9591 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9592
9593 # Check whether --enable-widec or --disable-widec was given.
9594 if test "${enable_widec+set}" = set; then
9595   enableval="$enable_widec"
9596   with_widec=$enableval
9597 else
9598   with_widec=no
9599 fi;
9600 echo "$as_me:9600: result: $with_widec" >&5
9601 echo "${ECHO_T}$with_widec" >&6
9602
9603 NCURSES_WCWIDTH_GRAPHICS=1
9604
9605 if test "x$with_widec" = xyes ; then
9606         if test "x$disable_lib_suffixes" = xno ; then
9607                 LIB_SUFFIX="w${LIB_SUFFIX}"
9608         fi
9609
9610 cat >>confdefs.h <<\EOF
9611 #define USE_WIDEC_SUPPORT 1
9612 EOF
9613
9614 cat >>confdefs.h <<\EOF
9615 #define NCURSES_WIDECHAR 1
9616 EOF
9617
9618 for ac_header in \
9619 wchar.h \
9620 wctype.h \
9621
9622 do
9623 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9624 echo "$as_me:9624: checking for $ac_header" >&5
9625 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9626 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9627   echo $ECHO_N "(cached) $ECHO_C" >&6
9628 else
9629   cat >conftest.$ac_ext <<_ACEOF
9630 #line 9630 "configure"
9631 #include "confdefs.h"
9632 #include <$ac_header>
9633 _ACEOF
9634 if { (eval echo "$as_me:9634: \"$ac_cpp conftest.$ac_ext\"") >&5
9635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9636   ac_status=$?
9637   egrep -v '^ *\+' conftest.er1 >conftest.err
9638   rm -f conftest.er1
9639   cat conftest.err >&5
9640   echo "$as_me:9640: \$? = $ac_status" >&5
9641   (exit $ac_status); } >/dev/null; then
9642   if test -s conftest.err; then
9643     ac_cpp_err=$ac_c_preproc_warn_flag
9644   else
9645     ac_cpp_err=
9646   fi
9647 else
9648   ac_cpp_err=yes
9649 fi
9650 if test -z "$ac_cpp_err"; then
9651   eval "$as_ac_Header=yes"
9652 else
9653   echo "$as_me: failed program was:" >&5
9654   cat conftest.$ac_ext >&5
9655   eval "$as_ac_Header=no"
9656 fi
9657 rm -f conftest.err conftest.$ac_ext
9658 fi
9659 echo "$as_me:9659: result: `eval echo '${'$as_ac_Header'}'`" >&5
9660 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9661 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9662   cat >>confdefs.h <<EOF
9663 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9664 EOF
9665
9666 fi
9667 done
9668
9669 echo "$as_me:9669: checking if wchar.h can be used as is" >&5
9670 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9671 if test "${cf_cv_wchar_h_okay+set}" = set; then
9672   echo $ECHO_N "(cached) $ECHO_C" >&6
9673 else
9674
9675 cat >conftest.$ac_ext <<_ACEOF
9676 #line 9676 "configure"
9677 #include "confdefs.h"
9678
9679 #include <stdlib.h>
9680 #ifdef HAVE_WCHAR_H
9681 #include <wchar.h>
9682 #endif
9683 #ifdef HAVE_WCTYPE_H
9684 #include <wctype.h>
9685 #endif
9686
9687 int
9688 main (void)
9689 {
9690
9691         wint_t foo = 0;
9692         int bar = iswpunct(foo)
9693   ;
9694   return 0;
9695 }
9696 _ACEOF
9697 rm -f conftest.$ac_objext
9698 if { (eval echo "$as_me:9698: \"$ac_compile\"") >&5
9699   (eval $ac_compile) 2>&5
9700   ac_status=$?
9701   echo "$as_me:9701: \$? = $ac_status" >&5
9702   (exit $ac_status); } &&
9703          { ac_try='test -s conftest.$ac_objext'
9704   { (eval echo "$as_me:9704: \"$ac_try\"") >&5
9705   (eval $ac_try) 2>&5
9706   ac_status=$?
9707   echo "$as_me:9707: \$? = $ac_status" >&5
9708   (exit $ac_status); }; }; then
9709   cf_cv_wchar_h_okay=yes
9710 else
9711   echo "$as_me: failed program was:" >&5
9712 cat conftest.$ac_ext >&5
9713 cf_cv_wchar_h_okay=no
9714 fi
9715 rm -f conftest.$ac_objext conftest.$ac_ext
9716 fi
9717 echo "$as_me:9717: result: $cf_cv_wchar_h_okay" >&5
9718 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9719
9720 if test $cf_cv_wchar_h_okay = no
9721 then
9722
9723 echo "$as_me:9723: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9724 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9725 cat >conftest.$ac_ext <<_ACEOF
9726 #line 9726 "configure"
9727 #include "confdefs.h"
9728 #include <sys/types.h>
9729
9730 int
9731 main (void)
9732 {
9733
9734 #ifndef _XOPEN_SOURCE_EXTENDED
9735 make an error
9736 #endif
9737   ;
9738   return 0;
9739 }
9740 _ACEOF
9741 rm -f conftest.$ac_objext
9742 if { (eval echo "$as_me:9742: \"$ac_compile\"") >&5
9743   (eval $ac_compile) 2>&5
9744   ac_status=$?
9745   echo "$as_me:9745: \$? = $ac_status" >&5
9746   (exit $ac_status); } &&
9747          { ac_try='test -s conftest.$ac_objext'
9748   { (eval echo "$as_me:9748: \"$ac_try\"") >&5
9749   (eval $ac_try) 2>&5
9750   ac_status=$?
9751   echo "$as_me:9751: \$? = $ac_status" >&5
9752   (exit $ac_status); }; }; then
9753   cf_result=no
9754 else
9755   echo "$as_me: failed program was:" >&5
9756 cat conftest.$ac_ext >&5
9757 cf_result=yes
9758 fi
9759 rm -f conftest.$ac_objext conftest.$ac_ext
9760 echo "$as_me:9760: result: $cf_result" >&5
9761 echo "${ECHO_T}$cf_result" >&6
9762
9763 if test "$cf_result" = yes ; then
9764         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9765 elif test "x" != "x" ; then
9766         echo "$as_me:9766: checking checking for compatible value versus " >&5
9767 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9768         cat >conftest.$ac_ext <<_ACEOF
9769 #line 9769 "configure"
9770 #include "confdefs.h"
9771 #include <sys/types.h>
9772
9773 int
9774 main (void)
9775 {
9776
9777 #if _XOPEN_SOURCE_EXTENDED- < 0
9778 make an error
9779 #endif
9780   ;
9781   return 0;
9782 }
9783 _ACEOF
9784 rm -f conftest.$ac_objext
9785 if { (eval echo "$as_me:9785: \"$ac_compile\"") >&5
9786   (eval $ac_compile) 2>&5
9787   ac_status=$?
9788   echo "$as_me:9788: \$? = $ac_status" >&5
9789   (exit $ac_status); } &&
9790          { ac_try='test -s conftest.$ac_objext'
9791   { (eval echo "$as_me:9791: \"$ac_try\"") >&5
9792   (eval $ac_try) 2>&5
9793   ac_status=$?
9794   echo "$as_me:9794: \$? = $ac_status" >&5
9795   (exit $ac_status); }; }; then
9796   cf_result=yes
9797 else
9798   echo "$as_me: failed program was:" >&5
9799 cat conftest.$ac_ext >&5
9800 cf_result=no
9801 fi
9802 rm -f conftest.$ac_objext conftest.$ac_ext
9803         echo "$as_me:9803: result: $cf_result" >&5
9804 echo "${ECHO_T}$cf_result" >&6
9805         if test "$cf_result" = no ; then
9806                 # perhaps we can override it - try...
9807                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9808         fi
9809 fi
9810
9811 fi
9812
9813 echo "$as_me:9813: checking if wcwidth agrees graphics are single-width" >&5
9814 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9815 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9816   echo $ECHO_N "(cached) $ECHO_C" >&6
9817 else
9818
9819 cat >conftest.in <<CF_EOF
9820 -       VT100 symbols
9821 0x250c  upper left corner
9822 0x2514  lower left corner
9823 0x2510  upper right corner
9824 0x2518  lower right corner
9825 0x251c  tee pointing left
9826 0x2524  tee pointing right
9827 0x2534  tee pointing up
9828 0x252c  tee pointing down
9829 0x2500  horizontal line
9830 0x2502  vertical line
9831 0x253c  large plus or crossover
9832 0x23ba  scan line 1
9833 0x23bd  scan line 9
9834 0x25c6  diamond
9835 0x2592  checker board (stipple)
9836 0x00b0  degree symbol
9837 0x00b1  plus/minus
9838 0x00b7  bullet
9839 -       Teletype 5410v1 symbols
9840 0x2190  arrow pointing left
9841 0x2192  arrow pointing right
9842 0x2193  arrow pointing down
9843 0x2191  arrow pointing up
9844 0x2592  board of squares
9845 0x2603  lantern symbol
9846 0x25ae  solid square block
9847 -       these defaults were invented for ncurses
9848 0x23bb  scan line 3
9849 0x23bc  scan line 7
9850 0x2264  less-than-or-equal-to
9851 0x2265  greater-than-or-equal-to
9852 0x03c0  greek pi
9853 0x2260  not-equal
9854 0x00a3  pound-sterling symbol
9855 -       thick-line-drawing
9856 0x250f  upper left corner
9857 0x2517  lower left corner
9858 0x2513  upper right corner
9859 0x251b  lower right corner
9860 0x2523  tee pointing left
9861 0x252b  tee pointing right
9862 0x253b  tee pointing up
9863 0x2533  tee pointing down
9864 0x2501  horizontal line
9865 0x2503  vertical line
9866 0x254b  large plus or crossover
9867 -       double-line-drawing
9868 0x2554  upper left corner
9869 0x255a  lower left corner
9870 0x2557  upper right corner
9871 0x255d  lower right corner
9872 0x2563  tee pointing left
9873 0x2560  tee pointing right
9874 0x2569  tee pointing up
9875 0x2566  tee pointing down
9876 0x2550  horizontal line
9877 0x2551  vertical line
9878 0x256c  large plus or crossover
9879 CF_EOF
9880 if test "$cross_compiling" = yes; then
9881   cf_cv_wcwidth_graphics=unknown
9882 else
9883   cat >conftest.$ac_ext <<_ACEOF
9884 #line 9884 "configure"
9885 #include "confdefs.h"
9886
9887 #include <locale.h>
9888 #include <stdio.h>
9889 #include <wchar.h>
9890
9891 #define MY_LEN 80
9892
9893 int
9894 main(void)
9895 {
9896         FILE *fp;
9897         int value;
9898         char buffer[MY_LEN + 1];
9899         char notes[MY_LEN + 1];
9900         int totals = 0;
9901         int passed = 0;
9902
9903         if (setlocale(LC_ALL, "en_US.UTF8") ||
9904                 setlocale(LC_ALL, "en_US.UTF-8") ||
9905                 setlocale(LC_ALL, "en_US.utf8") ||
9906                 setlocale(LC_ALL, "en_US.utf-8")) {
9907                 if ((fp = fopen("conftest.in", "r")) != 0) {
9908                         while (fgets(buffer, MY_LEN, fp) != 0) {
9909                                 if (*buffer == '-') {
9910                                         fprintf(stderr, "\t%s", buffer);
9911                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9912                                         ++totals;
9913                                         if (wcwidth(value) == 1)
9914                                                 ++passed;
9915                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9916                                 } else {
9917                                         fprintf(stderr, "?\t%s", buffer);
9918                                 }
9919                         }
9920                 }
9921         }
9922         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9923         return (totals == passed) ? 0 : 1;
9924 }
9925
9926 _ACEOF
9927 rm -f conftest$ac_exeext
9928 if { (eval echo "$as_me:9928: \"$ac_link\"") >&5
9929   (eval $ac_link) 2>&5
9930   ac_status=$?
9931   echo "$as_me:9931: \$? = $ac_status" >&5
9932   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9933   { (eval echo "$as_me:9933: \"$ac_try\"") >&5
9934   (eval $ac_try) 2>&5
9935   ac_status=$?
9936   echo "$as_me:9936: \$? = $ac_status" >&5
9937   (exit $ac_status); }; }; then
9938   cf_cv_wcwidth_graphics=yes
9939 else
9940   echo "$as_me: program exited with status $ac_status" >&5
9941 echo "$as_me: failed program was:" >&5
9942 cat conftest.$ac_ext >&5
9943 cf_cv_wcwidth_graphics=no
9944 fi
9945 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9946 fi
9947
9948 fi
9949 echo "$as_me:9949: result: $cf_cv_wcwidth_graphics" >&5
9950 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9951
9952         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9953
9954         # with_overwrite=no
9955         NCURSES_CH_T=cchar_t
9956
9957 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9958 do
9959 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9960 echo "$as_me:9960: checking for $ac_func" >&5
9961 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9962 if eval "test \"\${$as_ac_var+set}\" = set"; then
9963   echo $ECHO_N "(cached) $ECHO_C" >&6
9964 else
9965   cat >conftest.$ac_ext <<_ACEOF
9966 #line 9966 "configure"
9967 #include "confdefs.h"
9968 /* System header to define __stub macros and hopefully few prototypes,
9969     which can conflict with char $ac_func (); below.  */
9970 #include <assert.h>
9971 /* Override any gcc2 internal prototype to avoid an error.  */
9972 #ifdef __cplusplus
9973 extern "C"
9974 #endif
9975 /* We use char because int might match the return type of a gcc2
9976    builtin and then its argument prototype would still apply.  */
9977 char $ac_func ();
9978 char (*f) ();
9979
9980 int
9981 main (void)
9982 {
9983 /* The GNU C library defines this for functions which it implements
9984     to always fail with ENOSYS.  Some functions are actually named
9985     something starting with __ and the normal name is an alias.  */
9986 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9987 choke me
9988 #else
9989 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9990 #endif
9991
9992   ;
9993   return 0;
9994 }
9995 _ACEOF
9996 rm -f conftest.$ac_objext conftest$ac_exeext
9997 if { (eval echo "$as_me:9997: \"$ac_link\"") >&5
9998   (eval $ac_link) 2>&5
9999   ac_status=$?
10000   echo "$as_me:10000: \$? = $ac_status" >&5
10001   (exit $ac_status); } &&
10002          { ac_try='test -s conftest$ac_exeext'
10003   { (eval echo "$as_me:10003: \"$ac_try\"") >&5
10004   (eval $ac_try) 2>&5
10005   ac_status=$?
10006   echo "$as_me:10006: \$? = $ac_status" >&5
10007   (exit $ac_status); }; }; then
10008   eval "$as_ac_var=yes"
10009 else
10010   echo "$as_me: failed program was:" >&5
10011 cat conftest.$ac_ext >&5
10012 eval "$as_ac_var=no"
10013 fi
10014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10015 fi
10016 echo "$as_me:10016: result: `eval echo '${'$as_ac_var'}'`" >&5
10017 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10018 if test `eval echo '${'$as_ac_var'}'` = yes; then
10019   cat >>confdefs.h <<EOF
10020 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10021 EOF
10022
10023 fi
10024 done
10025
10026         if test "x$ac_cv_func_putwc" != xyes ; then
10027
10028 echo "$as_me:10028: checking for multibyte character support" >&5
10029 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10030 if test "${cf_cv_utf8_lib+set}" = set; then
10031   echo $ECHO_N "(cached) $ECHO_C" >&6
10032 else
10033
10034         cf_save_LIBS="$LIBS"
10035         cat >conftest.$ac_ext <<_ACEOF
10036 #line 10036 "configure"
10037 #include "confdefs.h"
10038
10039 #include <stdlib.h>
10040 int
10041 main (void)
10042 {
10043 putwc(0,0);
10044   ;
10045   return 0;
10046 }
10047 _ACEOF
10048 rm -f conftest.$ac_objext conftest$ac_exeext
10049 if { (eval echo "$as_me:10049: \"$ac_link\"") >&5
10050   (eval $ac_link) 2>&5
10051   ac_status=$?
10052   echo "$as_me:10052: \$? = $ac_status" >&5
10053   (exit $ac_status); } &&
10054          { ac_try='test -s conftest$ac_exeext'
10055   { (eval echo "$as_me:10055: \"$ac_try\"") >&5
10056   (eval $ac_try) 2>&5
10057   ac_status=$?
10058   echo "$as_me:10058: \$? = $ac_status" >&5
10059   (exit $ac_status); }; }; then
10060   cf_cv_utf8_lib=yes
10061 else
10062   echo "$as_me: failed program was:" >&5
10063 cat conftest.$ac_ext >&5
10064
10065 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10066 # will be set on completion of the AC_TRY_LINK below.
10067 cf_cv_header_path_utf8=
10068 cf_cv_library_path_utf8=
10069
10070 echo "${as_me:-configure}:10070: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10071
10072 cf_save_LIBS="$LIBS"
10073
10074 cat >conftest.$ac_ext <<_ACEOF
10075 #line 10075 "configure"
10076 #include "confdefs.h"
10077
10078 #include <libutf8.h>
10079 int
10080 main (void)
10081 {
10082 putwc(0,0);
10083   ;
10084   return 0;
10085 }
10086 _ACEOF
10087 rm -f conftest.$ac_objext conftest$ac_exeext
10088 if { (eval echo "$as_me:10088: \"$ac_link\"") >&5
10089   (eval $ac_link) 2>&5
10090   ac_status=$?
10091   echo "$as_me:10091: \$? = $ac_status" >&5
10092   (exit $ac_status); } &&
10093          { ac_try='test -s conftest$ac_exeext'
10094   { (eval echo "$as_me:10094: \"$ac_try\"") >&5
10095   (eval $ac_try) 2>&5
10096   ac_status=$?
10097   echo "$as_me:10097: \$? = $ac_status" >&5
10098   (exit $ac_status); }; }; then
10099
10100         cf_cv_find_linkage_utf8=yes
10101         cf_cv_header_path_utf8=/usr/include
10102         cf_cv_library_path_utf8=/usr/lib
10103
10104 else
10105   echo "$as_me: failed program was:" >&5
10106 cat conftest.$ac_ext >&5
10107
10108 LIBS="-lutf8  $cf_save_LIBS"
10109
10110 cat >conftest.$ac_ext <<_ACEOF
10111 #line 10111 "configure"
10112 #include "confdefs.h"
10113
10114 #include <libutf8.h>
10115 int
10116 main (void)
10117 {
10118 putwc(0,0);
10119   ;
10120   return 0;
10121 }
10122 _ACEOF
10123 rm -f conftest.$ac_objext conftest$ac_exeext
10124 if { (eval echo "$as_me:10124: \"$ac_link\"") >&5
10125   (eval $ac_link) 2>&5
10126   ac_status=$?
10127   echo "$as_me:10127: \$? = $ac_status" >&5
10128   (exit $ac_status); } &&
10129          { ac_try='test -s conftest$ac_exeext'
10130   { (eval echo "$as_me:10130: \"$ac_try\"") >&5
10131   (eval $ac_try) 2>&5
10132   ac_status=$?
10133   echo "$as_me:10133: \$? = $ac_status" >&5
10134   (exit $ac_status); }; }; then
10135
10136         cf_cv_find_linkage_utf8=yes
10137         cf_cv_header_path_utf8=/usr/include
10138         cf_cv_library_path_utf8=/usr/lib
10139         cf_cv_library_file_utf8="-lutf8"
10140
10141 else
10142   echo "$as_me: failed program was:" >&5
10143 cat conftest.$ac_ext >&5
10144
10145         cf_cv_find_linkage_utf8=no
10146         LIBS="$cf_save_LIBS"
10147
10148         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10149
10150 echo "${as_me:-configure}:10150: testing find linkage for utf8 library ..." 1>&5
10151
10152 echo "${as_me:-configure}:10152: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10153
10154         cf_save_CPPFLAGS="$CPPFLAGS"
10155         cf_test_CPPFLAGS="$CPPFLAGS"
10156
10157 cf_search=
10158
10159 # collect the current set of include-directories from compiler flags
10160 cf_header_path_list=""
10161 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10162         for cf_header_path in $CPPFLAGS $CFLAGS
10163         do
10164                 case $cf_header_path in
10165                 (-I*)
10166                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10167
10168 test "x$cf_header_path" != "xNONE" && \
10169 test -d "$cf_header_path" && \
10170  {
10171         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10172         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10173         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10174         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10175         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10176         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10177 }
10178
10179                         cf_header_path_list="$cf_header_path_list $cf_search"
10180                         ;;
10181                 esac
10182         done
10183 fi
10184
10185 # add the variations for the package we are looking for
10186
10187 cf_search=
10188
10189 test "x$prefix" != "xNONE" && \
10190 test -d "$prefix" && \
10191  {
10192         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10193         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10194         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10195         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10196         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10197         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10198 }
10199
10200 for cf_subdir_prefix in \
10201         /usr \
10202         /usr/local \
10203         /usr/pkg \
10204         /opt \
10205         /opt/local \
10206         $HOME
10207 do
10208
10209 test "x$cf_subdir_prefix" != "x$prefix" && \
10210 test -d "$cf_subdir_prefix" && \
10211 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10212         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10213         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10214         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10215         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10216         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10217         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10218 }
10219
10220 done
10221
10222 test "$includedir" != NONE && \
10223 test "$includedir" != "/usr/include" && \
10224 test -d "$includedir" && {
10225         test -d $includedir &&    cf_search="$cf_search $includedir"
10226         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10227 }
10228
10229 test "$oldincludedir" != NONE && \
10230 test "$oldincludedir" != "/usr/include" && \
10231 test -d "$oldincludedir" && {
10232         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10233         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10234 }
10235
10236 cf_search="$cf_search $cf_header_path_list"
10237
10238         for cf_cv_header_path_utf8 in $cf_search
10239         do
10240                 if test -d $cf_cv_header_path_utf8 ; then
10241                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10242
10243 echo "${as_me:-configure}:10243: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10244
10245                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10246                         cat >conftest.$ac_ext <<_ACEOF
10247 #line 10247 "configure"
10248 #include "confdefs.h"
10249
10250 #include <libutf8.h>
10251 int
10252 main (void)
10253 {
10254 putwc(0,0);
10255   ;
10256   return 0;
10257 }
10258 _ACEOF
10259 rm -f conftest.$ac_objext
10260 if { (eval echo "$as_me:10260: \"$ac_compile\"") >&5
10261   (eval $ac_compile) 2>&5
10262   ac_status=$?
10263   echo "$as_me:10263: \$? = $ac_status" >&5
10264   (exit $ac_status); } &&
10265          { ac_try='test -s conftest.$ac_objext'
10266   { (eval echo "$as_me:10266: \"$ac_try\"") >&5
10267   (eval $ac_try) 2>&5
10268   ac_status=$?
10269   echo "$as_me:10269: \$? = $ac_status" >&5
10270   (exit $ac_status); }; }; then
10271
10272                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10273
10274 echo "${as_me:-configure}:10274: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10275
10276                                 cf_cv_find_linkage_utf8=maybe
10277                                 cf_test_CPPFLAGS="$CPPFLAGS"
10278                                 break
10279 else
10280   echo "$as_me: failed program was:" >&5
10281 cat conftest.$ac_ext >&5
10282
10283                                 CPPFLAGS="$cf_save_CPPFLAGS"
10284
10285 fi
10286 rm -f conftest.$ac_objext conftest.$ac_ext
10287                 fi
10288         done
10289
10290         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10291
10292 echo "${as_me:-configure}:10292: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10293
10294                 cf_save_LIBS="$LIBS"
10295                 cf_save_LDFLAGS="$LDFLAGS"
10296
10297                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10298
10299 cf_search=
10300 cf_library_path_list=""
10301 if test -n "${LDFLAGS}${LIBS}" ; then
10302         for cf_library_path in $LDFLAGS $LIBS
10303         do
10304                 case $cf_library_path in
10305                 (-L*)
10306                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10307
10308 test "x$cf_library_path" != "xNONE" && \
10309 test -d "$cf_library_path" && \
10310  {
10311         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10312         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10313         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10314         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10315         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10316         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10317 }
10318
10319                         cf_library_path_list="$cf_library_path_list $cf_search"
10320                         ;;
10321                 esac
10322         done
10323 fi
10324
10325 cf_search=
10326
10327 test "x$prefix" != "xNONE" && \
10328 test -d "$prefix" && \
10329  {
10330         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10331         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10332         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10333         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10334         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10335         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10336 }
10337
10338 for cf_subdir_prefix in \
10339         /usr \
10340         /usr/local \
10341         /usr/pkg \
10342         /opt \
10343         /opt/local \
10344         $HOME
10345 do
10346
10347 test "x$cf_subdir_prefix" != "x$prefix" && \
10348 test -d "$cf_subdir_prefix" && \
10349 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10350         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10351         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10352         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10353         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10354         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10355         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10356 }
10357
10358 done
10359
10360 cf_search="$cf_library_path_list $cf_search"
10361
10362                         for cf_cv_library_path_utf8 in $cf_search
10363                         do
10364                                 if test -d $cf_cv_library_path_utf8 ; then
10365                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10366
10367 echo "${as_me:-configure}:10367: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10368
10369                                         CPPFLAGS="$cf_test_CPPFLAGS"
10370                                         LIBS="-lutf8  $cf_save_LIBS"
10371                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10372                                         cat >conftest.$ac_ext <<_ACEOF
10373 #line 10373 "configure"
10374 #include "confdefs.h"
10375
10376 #include <libutf8.h>
10377 int
10378 main (void)
10379 {
10380 putwc(0,0);
10381   ;
10382   return 0;
10383 }
10384 _ACEOF
10385 rm -f conftest.$ac_objext conftest$ac_exeext
10386 if { (eval echo "$as_me:10386: \"$ac_link\"") >&5
10387   (eval $ac_link) 2>&5
10388   ac_status=$?
10389   echo "$as_me:10389: \$? = $ac_status" >&5
10390   (exit $ac_status); } &&
10391          { ac_try='test -s conftest$ac_exeext'
10392   { (eval echo "$as_me:10392: \"$ac_try\"") >&5
10393   (eval $ac_try) 2>&5
10394   ac_status=$?
10395   echo "$as_me:10395: \$? = $ac_status" >&5
10396   (exit $ac_status); }; }; then
10397
10398                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10399
10400 echo "${as_me:-configure}:10400: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10401
10402                                         cf_cv_find_linkage_utf8=yes
10403                                         cf_cv_library_file_utf8="-lutf8"
10404                                         break
10405 else
10406   echo "$as_me: failed program was:" >&5
10407 cat conftest.$ac_ext >&5
10408
10409                                         CPPFLAGS="$cf_save_CPPFLAGS"
10410                                         LIBS="$cf_save_LIBS"
10411                                         LDFLAGS="$cf_save_LDFLAGS"
10412
10413 fi
10414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10415                                 fi
10416                         done
10417                         CPPFLAGS="$cf_save_CPPFLAGS"
10418                         LDFLAGS="$cf_save_LDFLAGS"
10419                 fi
10420
10421         else
10422                 cf_cv_find_linkage_utf8=no
10423         fi
10424
10425 fi
10426 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10427
10428 fi
10429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10430
10431 LIBS="$cf_save_LIBS"
10432
10433 if test "$cf_cv_find_linkage_utf8" = yes ; then
10434 cf_cv_utf8_lib=add-on
10435 else
10436 cf_cv_utf8_lib=no
10437 fi
10438
10439 fi
10440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10441 fi
10442 echo "$as_me:10442: result: $cf_cv_utf8_lib" >&5
10443 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10444
10445 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10446 # ncurses/ncursesw:
10447 if test "$cf_cv_utf8_lib" = "add-on" ; then
10448
10449 cat >>confdefs.h <<\EOF
10450 #define HAVE_LIBUTF8_H 1
10451 EOF
10452
10453 if test -n "$cf_cv_header_path_utf8" ; then
10454   for cf_add_incdir in $cf_cv_header_path_utf8
10455   do
10456         while test $cf_add_incdir != /usr/include
10457         do
10458           if test -d $cf_add_incdir
10459           then
10460                 cf_have_incdir=no
10461                 if test -n "$CFLAGS$CPPFLAGS" ; then
10462                   # a loop is needed to ensure we can add subdirs of existing dirs
10463                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10464                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10465                           cf_have_incdir=yes; break
10466                         fi
10467                   done
10468                 fi
10469
10470                 if test "$cf_have_incdir" = no ; then
10471                   if test "$cf_add_incdir" = /usr/local/include ; then
10472                         if test "$GCC" = yes
10473                         then
10474                           cf_save_CPPFLAGS=$CPPFLAGS
10475                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10476                           cat >conftest.$ac_ext <<_ACEOF
10477 #line 10477 "configure"
10478 #include "confdefs.h"
10479 #include <stdio.h>
10480 int
10481 main (void)
10482 {
10483 printf("Hello")
10484   ;
10485   return 0;
10486 }
10487 _ACEOF
10488 rm -f conftest.$ac_objext
10489 if { (eval echo "$as_me:10489: \"$ac_compile\"") >&5
10490   (eval $ac_compile) 2>&5
10491   ac_status=$?
10492   echo "$as_me:10492: \$? = $ac_status" >&5
10493   (exit $ac_status); } &&
10494          { ac_try='test -s conftest.$ac_objext'
10495   { (eval echo "$as_me:10495: \"$ac_try\"") >&5
10496   (eval $ac_try) 2>&5
10497   ac_status=$?
10498   echo "$as_me:10498: \$? = $ac_status" >&5
10499   (exit $ac_status); }; }; then
10500   :
10501 else
10502   echo "$as_me: failed program was:" >&5
10503 cat conftest.$ac_ext >&5
10504 cf_have_incdir=yes
10505 fi
10506 rm -f conftest.$ac_objext conftest.$ac_ext
10507                           CPPFLAGS=$cf_save_CPPFLAGS
10508                         fi
10509                   fi
10510                 fi
10511
10512                 if test "$cf_have_incdir" = no ; then
10513                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10514
10515 echo "${as_me:-configure}:10515: testing adding $cf_add_incdir to include-path ..." 1>&5
10516
10517                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10518
10519                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10520                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10521                   cf_add_incdir="$cf_top_incdir"
10522                 else
10523                   break
10524                 fi
10525           else
10526                 break
10527           fi
10528         done
10529   done
10530 fi
10531
10532 if test -n "$cf_cv_library_path_utf8" ; then
10533         for cf_add_libdir in $cf_cv_library_path_utf8
10534         do
10535                 if test $cf_add_libdir = /usr/lib ; then
10536                         :
10537                 elif test -d $cf_add_libdir
10538                 then
10539                         cf_have_libdir=no
10540                         if test -n "$LDFLAGS$LIBS" ; then
10541                                 # a loop is needed to ensure we can add subdirs of existing dirs
10542                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10543                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10544                                                 cf_have_libdir=yes; break
10545                                         fi
10546                                 done
10547                         fi
10548                         if test "$cf_have_libdir" = no ; then
10549                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10550
10551 echo "${as_me:-configure}:10551: testing adding $cf_add_libdir to library-path ..." 1>&5
10552
10553                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10554                         fi
10555                 fi
10556         done
10557 fi
10558
10559 cf_add_libs="$cf_cv_library_file_utf8"
10560 # Filter out duplicates - this happens with badly-designed ".pc" files...
10561 for cf_add_1lib in $LIBS
10562 do
10563         for cf_add_2lib in $cf_add_libs
10564         do
10565                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10566                 then
10567                         cf_add_1lib=
10568                         break
10569                 fi
10570         done
10571         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10572 done
10573 LIBS="$cf_add_libs"
10574
10575 fi
10576
10577                 if test "$cf_cv_utf8_lib" != no ; then
10578                         NCURSES_LIBUTF8=1
10579                 fi
10580         fi
10581
10582 # This is needed on Tru64 5.0 to declare mbstate_t
10583 echo "$as_me:10583: checking if we must include wchar.h to declare mbstate_t" >&5
10584 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10585 if test "${cf_cv_mbstate_t+set}" = set; then
10586   echo $ECHO_N "(cached) $ECHO_C" >&6
10587 else
10588
10589 cat >conftest.$ac_ext <<_ACEOF
10590 #line 10590 "configure"
10591 #include "confdefs.h"
10592
10593 #include <stdlib.h>
10594 #include <stdarg.h>
10595 #include <stdio.h>
10596 #ifdef HAVE_LIBUTF8_H
10597 #include <libutf8.h>
10598 #endif
10599 int
10600 main (void)
10601 {
10602 mbstate_t state
10603   ;
10604   return 0;
10605 }
10606 _ACEOF
10607 rm -f conftest.$ac_objext
10608 if { (eval echo "$as_me:10608: \"$ac_compile\"") >&5
10609   (eval $ac_compile) 2>&5
10610   ac_status=$?
10611   echo "$as_me:10611: \$? = $ac_status" >&5
10612   (exit $ac_status); } &&
10613          { ac_try='test -s conftest.$ac_objext'
10614   { (eval echo "$as_me:10614: \"$ac_try\"") >&5
10615   (eval $ac_try) 2>&5
10616   ac_status=$?
10617   echo "$as_me:10617: \$? = $ac_status" >&5
10618   (exit $ac_status); }; }; then
10619   cf_cv_mbstate_t=no
10620 else
10621   echo "$as_me: failed program was:" >&5
10622 cat conftest.$ac_ext >&5
10623 cat >conftest.$ac_ext <<_ACEOF
10624 #line 10624 "configure"
10625 #include "confdefs.h"
10626
10627 #include <stdlib.h>
10628 #include <stdarg.h>
10629 #include <stdio.h>
10630 #include <wchar.h>
10631 #ifdef HAVE_LIBUTF8_H
10632 #include <libutf8.h>
10633 #endif
10634 int
10635 main (void)
10636 {
10637 mbstate_t value
10638   ;
10639   return 0;
10640 }
10641 _ACEOF
10642 rm -f conftest.$ac_objext
10643 if { (eval echo "$as_me:10643: \"$ac_compile\"") >&5
10644   (eval $ac_compile) 2>&5
10645   ac_status=$?
10646   echo "$as_me:10646: \$? = $ac_status" >&5
10647   (exit $ac_status); } &&
10648          { ac_try='test -s conftest.$ac_objext'
10649   { (eval echo "$as_me:10649: \"$ac_try\"") >&5
10650   (eval $ac_try) 2>&5
10651   ac_status=$?
10652   echo "$as_me:10652: \$? = $ac_status" >&5
10653   (exit $ac_status); }; }; then
10654   cf_cv_mbstate_t=yes
10655 else
10656   echo "$as_me: failed program was:" >&5
10657 cat conftest.$ac_ext >&5
10658 cf_cv_mbstate_t=unknown
10659 fi
10660 rm -f conftest.$ac_objext conftest.$ac_ext
10661 fi
10662 rm -f conftest.$ac_objext conftest.$ac_ext
10663 fi
10664 echo "$as_me:10664: result: $cf_cv_mbstate_t" >&5
10665 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10666
10667 if test "$cf_cv_mbstate_t" = yes ; then
10668
10669 cat >>confdefs.h <<\EOF
10670 #define NEED_WCHAR_H 1
10671 EOF
10672
10673         NEED_WCHAR_H=1
10674 fi
10675
10676 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10677 if test "$cf_cv_mbstate_t" = unknown ; then
10678         NCURSES_MBSTATE_T=1
10679 fi
10680
10681 # This is needed on Tru64 5.0 to declare wchar_t
10682 echo "$as_me:10682: checking if we must include wchar.h to declare wchar_t" >&5
10683 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10684 if test "${cf_cv_wchar_t+set}" = set; then
10685   echo $ECHO_N "(cached) $ECHO_C" >&6
10686 else
10687
10688 cat >conftest.$ac_ext <<_ACEOF
10689 #line 10689 "configure"
10690 #include "confdefs.h"
10691
10692 #include <stdlib.h>
10693 #include <stdarg.h>
10694 #include <stdio.h>
10695 #ifdef HAVE_LIBUTF8_H
10696 #include <libutf8.h>
10697 #endif
10698 int
10699 main (void)
10700 {
10701 wchar_t state
10702   ;
10703   return 0;
10704 }
10705 _ACEOF
10706 rm -f conftest.$ac_objext
10707 if { (eval echo "$as_me:10707: \"$ac_compile\"") >&5
10708   (eval $ac_compile) 2>&5
10709   ac_status=$?
10710   echo "$as_me:10710: \$? = $ac_status" >&5
10711   (exit $ac_status); } &&
10712          { ac_try='test -s conftest.$ac_objext'
10713   { (eval echo "$as_me:10713: \"$ac_try\"") >&5
10714   (eval $ac_try) 2>&5
10715   ac_status=$?
10716   echo "$as_me:10716: \$? = $ac_status" >&5
10717   (exit $ac_status); }; }; then
10718   cf_cv_wchar_t=no
10719 else
10720   echo "$as_me: failed program was:" >&5
10721 cat conftest.$ac_ext >&5
10722 cat >conftest.$ac_ext <<_ACEOF
10723 #line 10723 "configure"
10724 #include "confdefs.h"
10725
10726 #include <stdlib.h>
10727 #include <stdarg.h>
10728 #include <stdio.h>
10729 #include <wchar.h>
10730 #ifdef HAVE_LIBUTF8_H
10731 #include <libutf8.h>
10732 #endif
10733 int
10734 main (void)
10735 {
10736 wchar_t value
10737   ;
10738   return 0;
10739 }
10740 _ACEOF
10741 rm -f conftest.$ac_objext
10742 if { (eval echo "$as_me:10742: \"$ac_compile\"") >&5
10743   (eval $ac_compile) 2>&5
10744   ac_status=$?
10745   echo "$as_me:10745: \$? = $ac_status" >&5
10746   (exit $ac_status); } &&
10747          { ac_try='test -s conftest.$ac_objext'
10748   { (eval echo "$as_me:10748: \"$ac_try\"") >&5
10749   (eval $ac_try) 2>&5
10750   ac_status=$?
10751   echo "$as_me:10751: \$? = $ac_status" >&5
10752   (exit $ac_status); }; }; then
10753   cf_cv_wchar_t=yes
10754 else
10755   echo "$as_me: failed program was:" >&5
10756 cat conftest.$ac_ext >&5
10757 cf_cv_wchar_t=unknown
10758 fi
10759 rm -f conftest.$ac_objext conftest.$ac_ext
10760 fi
10761 rm -f conftest.$ac_objext conftest.$ac_ext
10762 fi
10763 echo "$as_me:10763: result: $cf_cv_wchar_t" >&5
10764 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10765
10766 if test "$cf_cv_wchar_t" = yes ; then
10767
10768 cat >>confdefs.h <<\EOF
10769 #define NEED_WCHAR_H 1
10770 EOF
10771
10772         NEED_WCHAR_H=1
10773 fi
10774
10775 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10776 if test "$cf_cv_wchar_t" = unknown ; then
10777         NCURSES_WCHAR_T=1
10778 fi
10779
10780 # if we find wchar_t in either place, use substitution to provide a fallback.
10781 if test "$cf_cv_wchar_t" != unknown ; then
10782         NCURSES_OK_WCHAR_T=1
10783 fi
10784
10785 # This is needed on Tru64 5.0 to declare wint_t
10786 echo "$as_me:10786: checking if we must include wchar.h to declare wint_t" >&5
10787 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10788 if test "${cf_cv_wint_t+set}" = set; then
10789   echo $ECHO_N "(cached) $ECHO_C" >&6
10790 else
10791
10792 cat >conftest.$ac_ext <<_ACEOF
10793 #line 10793 "configure"
10794 #include "confdefs.h"
10795
10796 #include <stdlib.h>
10797 #include <stdarg.h>
10798 #include <stdio.h>
10799 #ifdef HAVE_LIBUTF8_H
10800 #include <libutf8.h>
10801 #endif
10802 int
10803 main (void)
10804 {
10805 wint_t state
10806   ;
10807   return 0;
10808 }
10809 _ACEOF
10810 rm -f conftest.$ac_objext
10811 if { (eval echo "$as_me:10811: \"$ac_compile\"") >&5
10812   (eval $ac_compile) 2>&5
10813   ac_status=$?
10814   echo "$as_me:10814: \$? = $ac_status" >&5
10815   (exit $ac_status); } &&
10816          { ac_try='test -s conftest.$ac_objext'
10817   { (eval echo "$as_me:10817: \"$ac_try\"") >&5
10818   (eval $ac_try) 2>&5
10819   ac_status=$?
10820   echo "$as_me:10820: \$? = $ac_status" >&5
10821   (exit $ac_status); }; }; then
10822   cf_cv_wint_t=no
10823 else
10824   echo "$as_me: failed program was:" >&5
10825 cat conftest.$ac_ext >&5
10826 cat >conftest.$ac_ext <<_ACEOF
10827 #line 10827 "configure"
10828 #include "confdefs.h"
10829
10830 #include <stdlib.h>
10831 #include <stdarg.h>
10832 #include <stdio.h>
10833 #include <wchar.h>
10834 #ifdef HAVE_LIBUTF8_H
10835 #include <libutf8.h>
10836 #endif
10837 int
10838 main (void)
10839 {
10840 wint_t value
10841   ;
10842   return 0;
10843 }
10844 _ACEOF
10845 rm -f conftest.$ac_objext
10846 if { (eval echo "$as_me:10846: \"$ac_compile\"") >&5
10847   (eval $ac_compile) 2>&5
10848   ac_status=$?
10849   echo "$as_me:10849: \$? = $ac_status" >&5
10850   (exit $ac_status); } &&
10851          { ac_try='test -s conftest.$ac_objext'
10852   { (eval echo "$as_me:10852: \"$ac_try\"") >&5
10853   (eval $ac_try) 2>&5
10854   ac_status=$?
10855   echo "$as_me:10855: \$? = $ac_status" >&5
10856   (exit $ac_status); }; }; then
10857   cf_cv_wint_t=yes
10858 else
10859   echo "$as_me: failed program was:" >&5
10860 cat conftest.$ac_ext >&5
10861 cf_cv_wint_t=unknown
10862 fi
10863 rm -f conftest.$ac_objext conftest.$ac_ext
10864 fi
10865 rm -f conftest.$ac_objext conftest.$ac_ext
10866 fi
10867 echo "$as_me:10867: result: $cf_cv_wint_t" >&5
10868 echo "${ECHO_T}$cf_cv_wint_t" >&6
10869
10870 if test "$cf_cv_wint_t" = yes ; then
10871
10872 cat >>confdefs.h <<\EOF
10873 #define NEED_WCHAR_H 1
10874 EOF
10875
10876         NEED_WCHAR_H=1
10877 fi
10878
10879 # if we do not find wint_t in either place, use substitution to provide a fallback.
10880 if test "$cf_cv_wint_t" = unknown ; then
10881         NCURSES_WINT_T=1
10882 fi
10883
10884 # if we find wint_t in either place, use substitution to provide a fallback.
10885 if test "$cf_cv_wint_t" != unknown ; then
10886         NCURSES_OK_WINT_T=1
10887 fi
10888
10889         if test "$NCURSES_MBSTATE_T" != 0; then
10890
10891 cat >>confdefs.h <<\EOF
10892 #define NEED_MBSTATE_T_DEF 1
10893 EOF
10894
10895         fi
10896 fi
10897
10898 ###   use option --disable-lp64 to allow long chtype
10899 echo "$as_me:10899: checking whether to enable _LP64 definition in curses.h" >&5
10900 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10901
10902 # Check whether --enable-lp64 or --disable-lp64 was given.
10903 if test "${enable_lp64+set}" = set; then
10904   enableval="$enable_lp64"
10905   with_lp64=$enableval
10906 else
10907   with_lp64=$cf_dft_with_lp64
10908 fi;
10909 echo "$as_me:10909: result: $with_lp64" >&5
10910 echo "${ECHO_T}$with_lp64" >&6
10911
10912 if test "x$with_lp64" = xyes ; then
10913         cf_cv_enable_lp64=1
10914 else
10915         cf_cv_enable_lp64=0
10916 fi
10917
10918 # Check whether --enable-largefile or --disable-largefile was given.
10919 if test "${enable_largefile+set}" = set; then
10920   enableval="$enable_largefile"
10921
10922 fi;
10923 if test "$enable_largefile" != no; then
10924
10925   echo "$as_me:10925: checking for special C compiler options needed for large files" >&5
10926 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10927 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10928   echo $ECHO_N "(cached) $ECHO_C" >&6
10929 else
10930   ac_cv_sys_largefile_CC=no
10931      if test "$GCC" != yes; then
10932        ac_save_CC=$CC
10933        while :; do
10934          # IRIX 6.2 and later do not support large files by default,
10935          # so use the C compiler's -n32 option if that helps.
10936          cat >conftest.$ac_ext <<_ACEOF
10937 #line 10937 "configure"
10938 #include "confdefs.h"
10939 #include <sys/types.h>
10940  /* Check that off_t can represent 2**63 - 1 correctly.
10941     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10942     since some C++ compilers masquerading as C compilers
10943     incorrectly reject 9223372036854775807.  */
10944 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10945   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10946                        && LARGE_OFF_T % 2147483647 == 1)
10947                       ? 1 : -1];
10948 int
10949 main (void)
10950 {
10951
10952   ;
10953   return 0;
10954 }
10955 _ACEOF
10956          rm -f conftest.$ac_objext
10957 if { (eval echo "$as_me:10957: \"$ac_compile\"") >&5
10958   (eval $ac_compile) 2>&5
10959   ac_status=$?
10960   echo "$as_me:10960: \$? = $ac_status" >&5
10961   (exit $ac_status); } &&
10962          { ac_try='test -s conftest.$ac_objext'
10963   { (eval echo "$as_me:10963: \"$ac_try\"") >&5
10964   (eval $ac_try) 2>&5
10965   ac_status=$?
10966   echo "$as_me:10966: \$? = $ac_status" >&5
10967   (exit $ac_status); }; }; then
10968   break
10969 else
10970   echo "$as_me: failed program was:" >&5
10971 cat conftest.$ac_ext >&5
10972 fi
10973 rm -f conftest.$ac_objext
10974          CC="$CC -n32"
10975          rm -f conftest.$ac_objext
10976 if { (eval echo "$as_me:10976: \"$ac_compile\"") >&5
10977   (eval $ac_compile) 2>&5
10978   ac_status=$?
10979   echo "$as_me:10979: \$? = $ac_status" >&5
10980   (exit $ac_status); } &&
10981          { ac_try='test -s conftest.$ac_objext'
10982   { (eval echo "$as_me:10982: \"$ac_try\"") >&5
10983   (eval $ac_try) 2>&5
10984   ac_status=$?
10985   echo "$as_me:10985: \$? = $ac_status" >&5
10986   (exit $ac_status); }; }; then
10987   ac_cv_sys_largefile_CC=' -n32'; break
10988 else
10989   echo "$as_me: failed program was:" >&5
10990 cat conftest.$ac_ext >&5
10991 fi
10992 rm -f conftest.$ac_objext
10993          break
10994        done
10995        CC=$ac_save_CC
10996        rm -f conftest.$ac_ext
10997     fi
10998 fi
10999 echo "$as_me:10999: result: $ac_cv_sys_largefile_CC" >&5
11000 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11001   if test "$ac_cv_sys_largefile_CC" != no; then
11002     CC=$CC$ac_cv_sys_largefile_CC
11003   fi
11004
11005   echo "$as_me:11005: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11006 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11007 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11008   echo $ECHO_N "(cached) $ECHO_C" >&6
11009 else
11010   while :; do
11011   ac_cv_sys_file_offset_bits=no
11012   cat >conftest.$ac_ext <<_ACEOF
11013 #line 11013 "configure"
11014 #include "confdefs.h"
11015 #include <sys/types.h>
11016  /* Check that off_t can represent 2**63 - 1 correctly.
11017     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11018     since some C++ compilers masquerading as C compilers
11019     incorrectly reject 9223372036854775807.  */
11020 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11021   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11022                        && LARGE_OFF_T % 2147483647 == 1)
11023                       ? 1 : -1];
11024 int
11025 main (void)
11026 {
11027
11028   ;
11029   return 0;
11030 }
11031 _ACEOF
11032 rm -f conftest.$ac_objext
11033 if { (eval echo "$as_me:11033: \"$ac_compile\"") >&5
11034   (eval $ac_compile) 2>&5
11035   ac_status=$?
11036   echo "$as_me:11036: \$? = $ac_status" >&5
11037   (exit $ac_status); } &&
11038          { ac_try='test -s conftest.$ac_objext'
11039   { (eval echo "$as_me:11039: \"$ac_try\"") >&5
11040   (eval $ac_try) 2>&5
11041   ac_status=$?
11042   echo "$as_me:11042: \$? = $ac_status" >&5
11043   (exit $ac_status); }; }; then
11044   break
11045 else
11046   echo "$as_me: failed program was:" >&5
11047 cat conftest.$ac_ext >&5
11048 fi
11049 rm -f conftest.$ac_objext conftest.$ac_ext
11050   cat >conftest.$ac_ext <<_ACEOF
11051 #line 11051 "configure"
11052 #include "confdefs.h"
11053 #define _FILE_OFFSET_BITS 64
11054 #include <sys/types.h>
11055  /* Check that off_t can represent 2**63 - 1 correctly.
11056     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11057     since some C++ compilers masquerading as C compilers
11058     incorrectly reject 9223372036854775807.  */
11059 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11060   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11061                        && LARGE_OFF_T % 2147483647 == 1)
11062                       ? 1 : -1];
11063 int
11064 main (void)
11065 {
11066
11067   ;
11068   return 0;
11069 }
11070 _ACEOF
11071 rm -f conftest.$ac_objext
11072 if { (eval echo "$as_me:11072: \"$ac_compile\"") >&5
11073   (eval $ac_compile) 2>&5
11074   ac_status=$?
11075   echo "$as_me:11075: \$? = $ac_status" >&5
11076   (exit $ac_status); } &&
11077          { ac_try='test -s conftest.$ac_objext'
11078   { (eval echo "$as_me:11078: \"$ac_try\"") >&5
11079   (eval $ac_try) 2>&5
11080   ac_status=$?
11081   echo "$as_me:11081: \$? = $ac_status" >&5
11082   (exit $ac_status); }; }; then
11083   ac_cv_sys_file_offset_bits=64; break
11084 else
11085   echo "$as_me: failed program was:" >&5
11086 cat conftest.$ac_ext >&5
11087 fi
11088 rm -f conftest.$ac_objext conftest.$ac_ext
11089   break
11090 done
11091 fi
11092 echo "$as_me:11092: result: $ac_cv_sys_file_offset_bits" >&5
11093 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11094 if test "$ac_cv_sys_file_offset_bits" != no; then
11095
11096 cat >>confdefs.h <<EOF
11097 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11098 EOF
11099
11100 fi
11101 rm -rf conftest*
11102   echo "$as_me:11102: checking for _LARGE_FILES value needed for large files" >&5
11103 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11104 if test "${ac_cv_sys_large_files+set}" = set; then
11105   echo $ECHO_N "(cached) $ECHO_C" >&6
11106 else
11107   while :; do
11108   ac_cv_sys_large_files=no
11109   cat >conftest.$ac_ext <<_ACEOF
11110 #line 11110 "configure"
11111 #include "confdefs.h"
11112 #include <sys/types.h>
11113  /* Check that off_t can represent 2**63 - 1 correctly.
11114     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11115     since some C++ compilers masquerading as C compilers
11116     incorrectly reject 9223372036854775807.  */
11117 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11118   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11119                        && LARGE_OFF_T % 2147483647 == 1)
11120                       ? 1 : -1];
11121 int
11122 main (void)
11123 {
11124
11125   ;
11126   return 0;
11127 }
11128 _ACEOF
11129 rm -f conftest.$ac_objext
11130 if { (eval echo "$as_me:11130: \"$ac_compile\"") >&5
11131   (eval $ac_compile) 2>&5
11132   ac_status=$?
11133   echo "$as_me:11133: \$? = $ac_status" >&5
11134   (exit $ac_status); } &&
11135          { ac_try='test -s conftest.$ac_objext'
11136   { (eval echo "$as_me:11136: \"$ac_try\"") >&5
11137   (eval $ac_try) 2>&5
11138   ac_status=$?
11139   echo "$as_me:11139: \$? = $ac_status" >&5
11140   (exit $ac_status); }; }; then
11141   break
11142 else
11143   echo "$as_me: failed program was:" >&5
11144 cat conftest.$ac_ext >&5
11145 fi
11146 rm -f conftest.$ac_objext conftest.$ac_ext
11147   cat >conftest.$ac_ext <<_ACEOF
11148 #line 11148 "configure"
11149 #include "confdefs.h"
11150 #define _LARGE_FILES 1
11151 #include <sys/types.h>
11152  /* Check that off_t can represent 2**63 - 1 correctly.
11153     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11154     since some C++ compilers masquerading as C compilers
11155     incorrectly reject 9223372036854775807.  */
11156 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11157   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11158                        && LARGE_OFF_T % 2147483647 == 1)
11159                       ? 1 : -1];
11160 int
11161 main (void)
11162 {
11163
11164   ;
11165   return 0;
11166 }
11167 _ACEOF
11168 rm -f conftest.$ac_objext
11169 if { (eval echo "$as_me:11169: \"$ac_compile\"") >&5
11170   (eval $ac_compile) 2>&5
11171   ac_status=$?
11172   echo "$as_me:11172: \$? = $ac_status" >&5
11173   (exit $ac_status); } &&
11174          { ac_try='test -s conftest.$ac_objext'
11175   { (eval echo "$as_me:11175: \"$ac_try\"") >&5
11176   (eval $ac_try) 2>&5
11177   ac_status=$?
11178   echo "$as_me:11178: \$? = $ac_status" >&5
11179   (exit $ac_status); }; }; then
11180   ac_cv_sys_large_files=1; break
11181 else
11182   echo "$as_me: failed program was:" >&5
11183 cat conftest.$ac_ext >&5
11184 fi
11185 rm -f conftest.$ac_objext conftest.$ac_ext
11186   break
11187 done
11188 fi
11189 echo "$as_me:11189: result: $ac_cv_sys_large_files" >&5
11190 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11191 if test "$ac_cv_sys_large_files" != no; then
11192
11193 cat >>confdefs.h <<EOF
11194 #define _LARGE_FILES $ac_cv_sys_large_files
11195 EOF
11196
11197 fi
11198 rm -rf conftest*
11199 fi
11200
11201         if test "$enable_largefile" != no ; then
11202         echo "$as_me:11202: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11203 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11204 if test "${ac_cv_sys_largefile_source+set}" = set; then
11205   echo $ECHO_N "(cached) $ECHO_C" >&6
11206 else
11207   while :; do
11208   ac_cv_sys_largefile_source=no
11209   cat >conftest.$ac_ext <<_ACEOF
11210 #line 11210 "configure"
11211 #include "confdefs.h"
11212 #include <stdio.h>
11213 int
11214 main (void)
11215 {
11216 return !fseeko;
11217   ;
11218   return 0;
11219 }
11220 _ACEOF
11221 rm -f conftest.$ac_objext
11222 if { (eval echo "$as_me:11222: \"$ac_compile\"") >&5
11223   (eval $ac_compile) 2>&5
11224   ac_status=$?
11225   echo "$as_me:11225: \$? = $ac_status" >&5
11226   (exit $ac_status); } &&
11227          { ac_try='test -s conftest.$ac_objext'
11228   { (eval echo "$as_me:11228: \"$ac_try\"") >&5
11229   (eval $ac_try) 2>&5
11230   ac_status=$?
11231   echo "$as_me:11231: \$? = $ac_status" >&5
11232   (exit $ac_status); }; }; then
11233   break
11234 else
11235   echo "$as_me: failed program was:" >&5
11236 cat conftest.$ac_ext >&5
11237 fi
11238 rm -f conftest.$ac_objext conftest.$ac_ext
11239   cat >conftest.$ac_ext <<_ACEOF
11240 #line 11240 "configure"
11241 #include "confdefs.h"
11242 #define _LARGEFILE_SOURCE 1
11243 #include <stdio.h>
11244 int
11245 main (void)
11246 {
11247 return !fseeko;
11248   ;
11249   return 0;
11250 }
11251 _ACEOF
11252 rm -f conftest.$ac_objext
11253 if { (eval echo "$as_me:11253: \"$ac_compile\"") >&5
11254   (eval $ac_compile) 2>&5
11255   ac_status=$?
11256   echo "$as_me:11256: \$? = $ac_status" >&5
11257   (exit $ac_status); } &&
11258          { ac_try='test -s conftest.$ac_objext'
11259   { (eval echo "$as_me:11259: \"$ac_try\"") >&5
11260   (eval $ac_try) 2>&5
11261   ac_status=$?
11262   echo "$as_me:11262: \$? = $ac_status" >&5
11263   (exit $ac_status); }; }; then
11264   ac_cv_sys_largefile_source=1; break
11265 else
11266   echo "$as_me: failed program was:" >&5
11267 cat conftest.$ac_ext >&5
11268 fi
11269 rm -f conftest.$ac_objext conftest.$ac_ext
11270   break
11271 done
11272 fi
11273 echo "$as_me:11273: result: $ac_cv_sys_largefile_source" >&5
11274 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11275 if test "$ac_cv_sys_largefile_source" != no; then
11276
11277 cat >>confdefs.h <<EOF
11278 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11279 EOF
11280
11281 fi
11282 rm -rf conftest*
11283
11284 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11285 # in glibc 2.1.3, but that breaks too many other things.
11286 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11287 echo "$as_me:11287: checking for fseeko" >&5
11288 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11289 if test "${ac_cv_func_fseeko+set}" = set; then
11290   echo $ECHO_N "(cached) $ECHO_C" >&6
11291 else
11292   cat >conftest.$ac_ext <<_ACEOF
11293 #line 11293 "configure"
11294 #include "confdefs.h"
11295 #include <stdio.h>
11296 int
11297 main (void)
11298 {
11299 return fseeko && fseeko (stdin, 0, 0);
11300   ;
11301   return 0;
11302 }
11303 _ACEOF
11304 rm -f conftest.$ac_objext conftest$ac_exeext
11305 if { (eval echo "$as_me:11305: \"$ac_link\"") >&5
11306   (eval $ac_link) 2>&5
11307   ac_status=$?
11308   echo "$as_me:11308: \$? = $ac_status" >&5
11309   (exit $ac_status); } &&
11310          { ac_try='test -s conftest$ac_exeext'
11311   { (eval echo "$as_me:11311: \"$ac_try\"") >&5
11312   (eval $ac_try) 2>&5
11313   ac_status=$?
11314   echo "$as_me:11314: \$? = $ac_status" >&5
11315   (exit $ac_status); }; }; then
11316   ac_cv_func_fseeko=yes
11317 else
11318   echo "$as_me: failed program was:" >&5
11319 cat conftest.$ac_ext >&5
11320 ac_cv_func_fseeko=no
11321 fi
11322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11323 fi
11324 echo "$as_me:11324: result: $ac_cv_func_fseeko" >&5
11325 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11326 if test $ac_cv_func_fseeko = yes; then
11327
11328 cat >>confdefs.h <<\EOF
11329 #define HAVE_FSEEKO 1
11330 EOF
11331
11332 fi
11333
11334         # Normally we would collect these definitions in the config.h,
11335         # but (like _XOPEN_SOURCE), some environments rely on having these
11336         # defined before any of the system headers are included.  Another
11337         # case comes up with C++, e.g., on AIX the compiler compiles the
11338         # header files by themselves before looking at the body files it is
11339         # told to compile.  For ncurses, those header files do not include
11340         # the config.h
11341         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11342         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11343         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11344
11345         echo "$as_me:11345: checking whether to use struct dirent64" >&5
11346 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11347 if test "${cf_cv_struct_dirent64+set}" = set; then
11348   echo $ECHO_N "(cached) $ECHO_C" >&6
11349 else
11350
11351                 cat >conftest.$ac_ext <<_ACEOF
11352 #line 11352 "configure"
11353 #include "confdefs.h"
11354
11355 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11356 #include <sys/types.h>
11357 #include <dirent.h>
11358
11359 int
11360 main (void)
11361 {
11362
11363                 /* if transitional largefile support is setup, this is true */
11364                 extern struct dirent64 * readdir(DIR *);
11365                 struct dirent64 *x = readdir((DIR *)0);
11366                 struct dirent *y = readdir((DIR *)0);
11367                 int z = x - y;
11368
11369   ;
11370   return 0;
11371 }
11372 _ACEOF
11373 rm -f conftest.$ac_objext
11374 if { (eval echo "$as_me:11374: \"$ac_compile\"") >&5
11375   (eval $ac_compile) 2>&5
11376   ac_status=$?
11377   echo "$as_me:11377: \$? = $ac_status" >&5
11378   (exit $ac_status); } &&
11379          { ac_try='test -s conftest.$ac_objext'
11380   { (eval echo "$as_me:11380: \"$ac_try\"") >&5
11381   (eval $ac_try) 2>&5
11382   ac_status=$?
11383   echo "$as_me:11383: \$? = $ac_status" >&5
11384   (exit $ac_status); }; }; then
11385   cf_cv_struct_dirent64=yes
11386 else
11387   echo "$as_me: failed program was:" >&5
11388 cat conftest.$ac_ext >&5
11389 cf_cv_struct_dirent64=no
11390 fi
11391 rm -f conftest.$ac_objext conftest.$ac_ext
11392
11393 fi
11394 echo "$as_me:11394: result: $cf_cv_struct_dirent64" >&5
11395 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11396         test "$cf_cv_struct_dirent64" = yes &&
11397 cat >>confdefs.h <<\EOF
11398 #define HAVE_STRUCT_DIRENT64 1
11399 EOF
11400
11401         fi
11402
11403 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11404 echo "$as_me:11404: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11405 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11406
11407 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11408 if test "${enable_tparm_varargs+set}" = set; then
11409   enableval="$enable_tparm_varargs"
11410   with_tparm_varargs=$enableval
11411 else
11412   with_tparm_varargs=yes
11413 fi;
11414 echo "$as_me:11414: result: $with_tparm_varargs" >&5
11415 echo "${ECHO_T}$with_tparm_varargs" >&6
11416 NCURSES_TPARM_VARARGS=0
11417 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11418
11419 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11420 if test "$with_ticlib" != no ; then
11421 echo "$as_me:11421: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11422 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11423
11424 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11425 if test "${enable_tic_depends+set}" = set; then
11426   enableval="$enable_tic_depends"
11427   with_tic_depends=$enableval
11428 else
11429   with_tic_depends=yes
11430 fi;
11431 echo "$as_me:11431: result: $with_tic_depends" >&5
11432 echo "${ECHO_T}$with_tic_depends" >&6
11433 else
11434         with_tic_depends=no
11435 fi
11436
11437 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11438 echo "$as_me:11438: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11439 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11440
11441 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11442 if test "${enable_wattr_macros+set}" = set; then
11443   enableval="$enable_wattr_macros"
11444   with_wattr_macros=$enableval
11445 else
11446   with_wattr_macros=yes
11447 fi;
11448 if [ "x$with_wattr_macros" != xyes ]; then
11449         NCURSES_WATTR_MACROS=0
11450         echo "$as_me:11450: result: yes" >&5
11451 echo "${ECHO_T}yes" >&6
11452 else
11453         NCURSES_WATTR_MACROS=1
11454         echo "$as_me:11454: result: no" >&5
11455 echo "${ECHO_T}no" >&6
11456 fi
11457
11458 echo "$as_me:11458: checking for X11 rgb file" >&5
11459 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
11460
11461 # Check whether --with-x11-rgb or --without-x11-rgb was given.
11462 if test "${with_x11_rgb+set}" = set; then
11463   withval="$with_x11_rgb"
11464   RGB_PATH=$withval
11465 else
11466   RGB_PATH=auto
11467 fi;
11468
11469 if test "x$RGB_PATH" = xauto
11470 then
11471         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
11472         for cf_path in \
11473                 /opt/local/share/X11/rgb.txt \
11474                 /opt/X11/share/X11/rgb.txt \
11475                 /usr/share/X11/rgb.txt \
11476                 /usr/X11/share/X11/rgb.txt \
11477                 /usr/X11/lib/X11/rgb.txt \
11478                 /usr/lib/X11/rgb.txt \
11479                 /etc/X11/rgb.txt \
11480                 /usr/pkg/lib/X11/rgb.txt \
11481                 /usr/X11R7/lib/X11/rgb.txt \
11482                 /usr/X11R6/lib/X11/rgb.txt \
11483                 /usr/X11R5/lib/X11/rgb.txt \
11484                 /usr/X11R4/lib/X11/rgb.txt \
11485                 /usr/local/lib/X11/rgb.txt \
11486                 /usr/local/share/X11/rgb.txt \
11487                 /usr/lib64/X11/rgb.txt
11488         do
11489                 if test -f "$cf_path" ; then
11490                         RGB_PATH="$cf_path"
11491                         break
11492                 fi
11493         done
11494 else
11495         cf_path=$RGB_PATH
11496
11497 if test "x$prefix" != xNONE; then
11498         cf_path_syntax="$prefix"
11499 else
11500         cf_path_syntax="$ac_default_prefix"
11501 fi
11502
11503 case ".$cf_path" in
11504 (.\$\(*\)*|.\'*\'*)
11505         ;;
11506 (..|./*|.\\*)
11507         ;;
11508 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11509         ;;
11510 (.\${*prefix}*|.\${*dir}*)
11511         eval cf_path="$cf_path"
11512         case ".$cf_path" in
11513         (.NONE/*)
11514                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11515                 ;;
11516         esac
11517         ;;
11518 (.no|.NONE/*)
11519         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11520         ;;
11521 (*)
11522         { { echo "$as_me:11522: error: expected a pathname, not \"$cf_path\"" >&5
11523 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
11524    { (exit 1); exit 1; }; }
11525         ;;
11526 esac
11527
11528 fi
11529
11530 echo "$as_me:11530: result: $RGB_PATH" >&5
11531 echo "${ECHO_T}$RGB_PATH" >&6
11532
11533 cat >>confdefs.h <<EOF
11534 #define RGB_PATH "$cf_path"
11535 EOF
11536
11537 no_x11_rgb=
11538 if test "$RGB_PATH" = no
11539 then
11540         no_x11_rgb="#"
11541 fi
11542
11543 ###   use option --with-bool to override bool's type
11544 echo "$as_me:11544: checking for type of bool" >&5
11545 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11546
11547 # Check whether --with-bool or --without-bool was given.
11548 if test "${with_bool+set}" = set; then
11549   withval="$with_bool"
11550   NCURSES_BOOL="$withval"
11551 else
11552   NCURSES_BOOL=auto
11553 fi;
11554 echo "$as_me:11554: result: $NCURSES_BOOL" >&5
11555 echo "${ECHO_T}$NCURSES_BOOL" >&6
11556
11557 echo "$as_me:11557: checking for alternate terminal capabilities file" >&5
11558 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11559
11560 # Check whether --with-caps or --without-caps was given.
11561 if test "${with_caps+set}" = set; then
11562   withval="$with_caps"
11563   TERMINFO_CAPS=Caps.$withval
11564 else
11565   TERMINFO_CAPS=Caps
11566 fi;
11567 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11568 echo "$as_me:11568: result: $TERMINFO_CAPS" >&5
11569 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11570
11571 ###   use option --with-chtype to override chtype's type
11572 echo "$as_me:11572: checking for type of chtype" >&5
11573 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11574
11575 # Check whether --with-chtype or --without-chtype was given.
11576 if test "${with_chtype+set}" = set; then
11577   withval="$with_chtype"
11578   NCURSES_CHTYPE="$withval"
11579 else
11580   NCURSES_CHTYPE=$cf_dft_chtype
11581 fi;
11582 echo "$as_me:11582: result: $NCURSES_CHTYPE" >&5
11583 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11584
11585 ###   use option --with-ospeed to override ospeed's type
11586 echo "$as_me:11586: checking for type of ospeed" >&5
11587 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11588
11589 # Check whether --with-ospeed or --without-ospeed was given.
11590 if test "${with_ospeed+set}" = set; then
11591   withval="$with_ospeed"
11592   NCURSES_OSPEED="$withval"
11593 else
11594   NCURSES_OSPEED=short
11595 fi;
11596 echo "$as_me:11596: result: $NCURSES_OSPEED" >&5
11597 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11598
11599 ###   use option --with-mmask-t to override mmask_t's type
11600 echo "$as_me:11600: checking for type of mmask_t" >&5
11601 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11602
11603 # Check whether --with-mmask-t or --without-mmask-t was given.
11604 if test "${with_mmask_t+set}" = set; then
11605   withval="$with_mmask_t"
11606   NCURSES_MMASK_T="$withval"
11607 else
11608   NCURSES_MMASK_T=$cf_dft_mmask_t
11609 fi;
11610 echo "$as_me:11610: result: $NCURSES_MMASK_T" >&5
11611 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11612
11613 ###   use option --with-ccharw-max to override CCHARW_MAX size
11614 echo "$as_me:11614: checking for size CCHARW_MAX" >&5
11615 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11616
11617 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11618 if test "${with_ccharw_max+set}" = set; then
11619   withval="$with_ccharw_max"
11620   NCURSES_CCHARW_MAX="$withval"
11621 else
11622   NCURSES_CCHARW_MAX=5
11623 fi;
11624 echo "$as_me:11624: result: $NCURSES_CCHARW_MAX" >&5
11625 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11626
11627 ###   use option --with-tparm-arg to override tparm's argument type
11628 echo "$as_me:11628: checking for type of tparm args" >&5
11629 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11630
11631 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11632 if test "${with_tparm_arg+set}" = set; then
11633   withval="$with_tparm_arg"
11634   NCURSES_TPARM_ARG="$withval"
11635 else
11636   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11637 fi;
11638 echo "$as_me:11638: result: $NCURSES_TPARM_ARG" >&5
11639 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11640
11641 ### Enable compiling-in rcs id's
11642 echo "$as_me:11642: checking if RCS identifiers should be compiled-in" >&5
11643 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11644
11645 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11646 if test "${with_rcs_ids+set}" = set; then
11647   withval="$with_rcs_ids"
11648   with_rcs_ids=$withval
11649 else
11650   with_rcs_ids=no
11651 fi;
11652 echo "$as_me:11652: result: $with_rcs_ids" >&5
11653 echo "${ECHO_T}$with_rcs_ids" >&6
11654 test "x$with_rcs_ids" = xyes &&
11655 cat >>confdefs.h <<\EOF
11656 #define USE_RCS_IDS 1
11657 EOF
11658
11659 ###############################################################################
11660
11661 echo "$as_me:11661: checking format of man-pages" >&5
11662 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11663
11664 # Check whether --with-manpage-format or --without-manpage-format was given.
11665 if test "${with_manpage_format+set}" = set; then
11666   withval="$with_manpage_format"
11667   MANPAGE_FORMAT=$withval
11668 else
11669   MANPAGE_FORMAT=unknown
11670 fi;
11671
11672 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11673 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11674
11675 cf_unknown=
11676
11677 case $MANPAGE_FORMAT in
11678 (unknown)
11679         if test -z "$MANPATH" ; then
11680                 MANPATH="/usr/man:/usr/share/man"
11681         fi
11682
11683         # look for the 'date' man-page (it's most likely to be installed!)
11684         MANPAGE_FORMAT=
11685         cf_preform=no
11686         cf_catonly=yes
11687         cf_example=date
11688
11689         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11690         for cf_dir in $MANPATH; do
11691                 test -z "$cf_dir" && cf_dir=/usr/man
11692                 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
11693                 do
11694                         cf_test=`echo $cf_name | sed -e 's/*//'`
11695                         if test "x$cf_test" = "x$cf_name" ; then
11696
11697                                 case "$cf_name" in
11698                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11699                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11700                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11701                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11702                                 esac
11703
11704                                 case "$cf_name" in
11705                                 ($cf_dir/man*)
11706                                         cf_catonly=no
11707                                         ;;
11708                                 ($cf_dir/cat*)
11709                                         cf_preform=yes
11710                                         ;;
11711                                 esac
11712                                 break
11713                         fi
11714
11715                         # if we found a match in either man* or cat*, stop looking
11716                         if test -n "$MANPAGE_FORMAT" ; then
11717                                 cf_found=no
11718                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11719                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11720                                 case "$cf_name" in
11721                                 ($cf_dir/cat*)
11722                                         cf_found=yes
11723                                         ;;
11724                                 esac
11725                                 test $cf_found=yes && break
11726                         fi
11727                 done
11728                 # only check the first directory in $MANPATH where we find manpages
11729                 if test -n "$MANPAGE_FORMAT" ; then
11730                         break
11731                 fi
11732         done
11733         # if we did not find the example, just assume it is normal
11734         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11735         IFS="$ac_save_ifs"
11736         ;;
11737 (*)
11738         for cf_option in $MANPAGE_FORMAT; do
11739         case $cf_option in
11740         (gzip|compress|BSDI|normal|formatted|catonly)
11741                 ;;
11742         (*)
11743                 cf_unknown="$cf_unknown $cf_option"
11744                 ;;
11745         esac
11746         done
11747         ;;
11748 esac
11749
11750 echo "$as_me:11750: result: $MANPAGE_FORMAT" >&5
11751 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11752 if test -n "$cf_unknown" ; then
11753         { echo "$as_me:11753: WARNING: Unexpected manpage-format $cf_unknown" >&5
11754 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11755 fi
11756
11757 echo "$as_me:11757: checking for manpage renaming" >&5
11758 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11759
11760 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11761 if test "${with_manpage_renames+set}" = set; then
11762   withval="$with_manpage_renames"
11763   MANPAGE_RENAMES=$withval
11764 else
11765   MANPAGE_RENAMES=yes
11766 fi;
11767
11768 case ".$MANPAGE_RENAMES" in
11769 (.no)
11770         ;;
11771 (.|.yes)
11772         # Debian 'man' program?
11773         if test -f /etc/debian_version ; then
11774                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11775         else
11776                 MANPAGE_RENAMES=no
11777         fi
11778         ;;
11779 esac
11780
11781 if test "$MANPAGE_RENAMES" != no ; then
11782         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11783                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11784         elif test ! -f $MANPAGE_RENAMES ; then
11785                 { { echo "$as_me:11785: error: not a filename: $MANPAGE_RENAMES" >&5
11786 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11787    { (exit 1); exit 1; }; }
11788         fi
11789
11790         test ! -d man && mkdir man
11791
11792         # Construct a sed-script to perform renaming within man-pages
11793         if test -n "$MANPAGE_RENAMES" ; then
11794                 test ! -d man && mkdir man
11795                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11796         fi
11797 fi
11798
11799 echo "$as_me:11799: result: $MANPAGE_RENAMES" >&5
11800 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11801
11802 echo "$as_me:11802: checking if manpage aliases will be installed" >&5
11803 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11804
11805 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11806 if test "${with_manpage_aliases+set}" = set; then
11807   withval="$with_manpage_aliases"
11808   MANPAGE_ALIASES=$withval
11809 else
11810   MANPAGE_ALIASES=yes
11811 fi;
11812
11813 echo "$as_me:11813: result: $MANPAGE_ALIASES" >&5
11814 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11815
11816 case "x$LN_S" in
11817 (xln*)
11818         cf_use_symlinks=yes
11819         ;;
11820 (*)
11821         cf_use_symlinks=no
11822         ;;
11823 esac
11824
11825 MANPAGE_SYMLINKS=no
11826 if test "$MANPAGE_ALIASES" = yes ; then
11827 echo "$as_me:11827: checking if manpage symlinks should be used" >&5
11828 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11829
11830 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11831 if test "${with_manpage_symlinks+set}" = set; then
11832   withval="$with_manpage_symlinks"
11833   MANPAGE_SYMLINKS=$withval
11834 else
11835   MANPAGE_SYMLINKS=$cf_use_symlinks
11836 fi;
11837
11838 if test "$$cf_use_symlinks" = no; then
11839 if test "$MANPAGE_SYMLINKS" = yes ; then
11840         { echo "$as_me:11840: WARNING: cannot make symlinks" >&5
11841 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11842         MANPAGE_SYMLINKS=no
11843 fi
11844 fi
11845
11846 echo "$as_me:11846: result: $MANPAGE_SYMLINKS" >&5
11847 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11848 fi
11849
11850 echo "$as_me:11850: checking for manpage tbl" >&5
11851 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11852
11853 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11854 if test "${with_manpage_tbl+set}" = set; then
11855   withval="$with_manpage_tbl"
11856   MANPAGE_TBL=$withval
11857 else
11858   MANPAGE_TBL=no
11859 fi;
11860
11861 echo "$as_me:11861: result: $MANPAGE_TBL" >&5
11862 echo "${ECHO_T}$MANPAGE_TBL" >&6
11863
11864 if test "$prefix" = "NONE" ; then
11865         cf_prefix="$ac_default_prefix"
11866 else
11867         cf_prefix="$prefix"
11868 fi
11869
11870 case "$MANPAGE_FORMAT" in
11871 (*catonly*)
11872         cf_format=yes
11873         cf_inboth=no
11874         ;;
11875 (*formatted*)
11876         cf_format=yes
11877         cf_inboth=yes
11878         ;;
11879 (*)
11880         cf_format=no
11881         cf_inboth=no
11882         ;;
11883 esac
11884
11885 test ! -d man && mkdir man
11886
11887 cf_so_strip=
11888 cf_compress=
11889 case "$MANPAGE_FORMAT" in
11890 (*compress*)
11891         cf_so_strip="Z"
11892         cf_compress=compress
11893         ;;
11894 (*gzip*)
11895         cf_so_strip="gz"
11896         cf_compress=gzip
11897         ;;
11898 esac
11899
11900 cf_edit_man=./edit_man.sh
11901 cf_man_alias=`pwd`/man_alias.sed
11902
11903 cat >$cf_edit_man <<CF_EOF
11904 #! $SHELL
11905 # this script is generated by the configure-script CF_MAN_PAGES macro.
11906
11907 prefix="$cf_prefix"
11908 datarootdir="$datarootdir"
11909 datadir="$datadir"
11910
11911 NCURSES_MAJOR="$NCURSES_MAJOR"
11912 NCURSES_MINOR="$NCURSES_MINOR"
11913 NCURSES_PATCH="$NCURSES_PATCH"
11914
11915 NCURSES_OSPEED="$NCURSES_OSPEED"
11916 TERMINFO="$TERMINFO"
11917
11918 INSTALL="$INSTALL"
11919 INSTALL_DATA="$INSTALL_DATA"
11920
11921 transform="$program_transform_name"
11922
11923 TMP=\${TMPDIR:=/tmp}/man\$\$
11924 trap "rm -f \$TMP" 0 1 2 3 15
11925
11926 form=\$1
11927 shift || exit 1
11928
11929 verb=\$1
11930 shift || exit 1
11931
11932 mandir=\$1
11933 shift || exit 1
11934
11935 srcdir=\$1
11936 top_srcdir=\$srcdir/..
11937 shift || exit 1
11938
11939 if test "\$form" = normal ; then
11940         if test "$cf_format" = yes ; then
11941         if test "$cf_inboth" = no ; then
11942                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11943                 exit $?
11944         fi
11945         fi
11946         cf_subdir=\$mandir/man
11947         cf_tables=$MANPAGE_TBL
11948 else
11949         cf_subdir=\$mandir/cat
11950         cf_tables=yes
11951 fi
11952
11953 # process the list of source-files
11954 for i in \$* ; do
11955 case \$i in
11956 (*.orig|*.rej) ;;
11957 (*.[0-9]*)
11958         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11959         if test \$verb = installing ; then
11960         if test ! -d \$cf_subdir\${section} ; then
11961                 mkdir -p \$cf_subdir\$section
11962         fi
11963         fi
11964
11965         # replace variables in man page
11966         if test ! -f $cf_man_alias ; then
11967 cat >>$cf_man_alias <<-CF_EOF2
11968                 s,@DATADIR@,\$datadir,g
11969                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11970                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11971                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11972                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11973                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11974                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11975 CF_EOF
11976
11977         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11978         do
11979                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11980                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11981 cat >>$cf_edit_man <<-CF_EOF
11982                 s,@$cf_NAME@,$cf_name,g
11983 CF_EOF
11984         done
11985
11986 cat >>$cf_edit_man <<CF_EOF
11987 CF_EOF2
11988                 echo "...made $cf_man_alias"
11989         fi
11990
11991         aliases=
11992         cf_source=\`basename \$i\`
11993         inalias=\$cf_source
11994         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11995         if test ! -f \$inalias ; then
11996                 echo .. skipped \$cf_source
11997                 continue
11998         fi
11999 CF_EOF
12000
12001 if test "$MANPAGE_ALIASES" != no ; then
12002 cat >>$cf_edit_man <<CF_EOF
12003         nCurses=ignore.3x
12004         test $with_curses_h = yes && nCurses=ncurses.3x
12005         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
12006 CF_EOF
12007 fi
12008
12009 if test "$MANPAGE_RENAMES" = no ; then
12010 cat >>$cf_edit_man <<CF_EOF
12011         # perform program transformations for section 1 man pages
12012         if test \$section = 1 ; then
12013                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
12014         else
12015                 cf_target=\$cf_subdir\${section}/\$cf_source
12016         fi
12017 CF_EOF
12018 else
12019 cat >>$cf_edit_man <<CF_EOF
12020         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
12021         if test -z "\$cf_target" ; then
12022                 echo '? missing rename for '\$cf_source
12023                 cf_target="\$cf_source"
12024         fi
12025         cf_target="\$cf_subdir\${section}/\${cf_target}"
12026
12027 CF_EOF
12028 fi
12029
12030 cat >>$cf_edit_man <<CF_EOF
12031         sed     -f $cf_man_alias \\
12032 CF_EOF
12033
12034 if test -f $MANPAGE_RENAMES ; then
12035 cat >>$cf_edit_man <<CF_EOF
12036                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
12037 CF_EOF
12038 else
12039 cat >>$cf_edit_man <<CF_EOF
12040                 < \$i >\$TMP
12041 CF_EOF
12042 fi
12043
12044 cat >>$cf_edit_man <<CF_EOF
12045 if test \$cf_tables = yes ; then
12046         tbl \$TMP >\$TMP.out
12047         mv \$TMP.out \$TMP
12048 fi
12049 CF_EOF
12050
12051 if test $with_overwrite != yes ; then
12052 cat >>$cf_edit_man <<CF_EOF
12053         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
12054         mv \$TMP.out \$TMP
12055 CF_EOF
12056 fi
12057
12058 if test $with_curses_h != yes ; then
12059 cat >>$cf_edit_man <<CF_EOF
12060         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
12061         mv \$TMP.out \$TMP
12062 CF_EOF
12063 fi
12064
12065 cat >>$cf_edit_man <<CF_EOF
12066         if test \$form = format ; then
12067                 nroff -man \$TMP >\$TMP.out
12068                 mv \$TMP.out \$TMP
12069         fi
12070 CF_EOF
12071
12072 if test -n "$cf_compress" ; then
12073 cat >>$cf_edit_man <<CF_EOF
12074         if test \$verb = installing ; then
12075         if ( $cf_compress -f \$TMP )
12076         then
12077                 mv \$TMP.$cf_so_strip \$TMP
12078         fi
12079         fi
12080         cf_target="\$cf_target.$cf_so_strip"
12081 CF_EOF
12082 fi
12083
12084 case "$MANPAGE_FORMAT" in
12085 (*BSDI*)
12086 cat >>$cf_edit_man <<CF_EOF
12087         if test \$form = format ; then
12088                 # BSDI installs only .0 suffixes in the cat directories
12089                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
12090         fi
12091 CF_EOF
12092   ;;
12093 esac
12094
12095 cat >>$cf_edit_man <<CF_EOF
12096         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
12097         if test \$verb = installing ; then
12098                 echo \$verb \$cf_target
12099                 \$INSTALL_DATA \$TMP \$cf_target
12100                 test -d \$cf_subdir\${section} &&
12101                 test -n "\$aliases" && (
12102                         cd \$cf_subdir\${section} && (
12103                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
12104                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
12105                                 cf_target=\`basename \$cf_target\`
12106                                 for cf_alias in \$aliases
12107                                 do
12108                                         if test \$section = 1 ; then
12109                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12110                                         fi
12111
12112                                         if test "$MANPAGE_SYMLINKS" = yes ; then
12113                                                 if test -f \$cf_alias\${suffix} ; then
12114                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
12115                                                         then
12116                                                                 continue
12117                                                         fi
12118                                                 fi
12119                                                 echo .. \$verb alias \$cf_alias\${suffix}
12120 CF_EOF
12121 case "x$LN_S" in
12122 (*-f)
12123 cat >>$cf_edit_man <<CF_EOF
12124                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12125 CF_EOF
12126         ;;
12127 (*)
12128 cat >>$cf_edit_man <<CF_EOF
12129                                                 rm -f \$cf_alias\${suffix}
12130                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12131 CF_EOF
12132         ;;
12133 esac
12134 cat >>$cf_edit_man <<CF_EOF
12135                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12136                                                 echo ".so \$cf_source" >\$TMP
12137 CF_EOF
12138 if test -n "$cf_compress" ; then
12139 cat >>$cf_edit_man <<CF_EOF
12140                                                 if test -n "$cf_so_strip" ; then
12141                                                         $cf_compress -f \$TMP
12142                                                         mv \$TMP.$cf_so_strip \$TMP
12143                                                 fi
12144 CF_EOF
12145 fi
12146 cat >>$cf_edit_man <<CF_EOF
12147                                                 echo .. \$verb alias \$cf_alias\${suffix}
12148                                                 rm -f \$cf_alias\${suffix}
12149                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12150                                         fi
12151                                 done
12152                         )
12153                 )
12154         elif test \$verb = removing ; then
12155                 test -f \$cf_target && (
12156                         echo \$verb \$cf_target
12157                         rm -f \$cf_target
12158                 )
12159                 test -d \$cf_subdir\${section} &&
12160                 test -n "\$aliases" && (
12161                         cd \$cf_subdir\${section} && (
12162                                 for cf_alias in \$aliases
12163                                 do
12164                                         if test \$section = 1 ; then
12165                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12166                                         fi
12167
12168                                         echo .. \$verb alias \$cf_alias\${suffix}
12169                                         rm -f \$cf_alias\${suffix}
12170                                 done
12171                         )
12172                 )
12173         else
12174 #               echo ".hy 0"
12175                 cat \$TMP
12176         fi
12177         ;;
12178 esac
12179 done
12180
12181 if test $cf_inboth = yes ; then
12182 if test \$form != format ; then
12183         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12184 fi
12185 fi
12186
12187 exit 0
12188 CF_EOF
12189 chmod 755 $cf_edit_man
12190
12191 ###############################################################################
12192
12193 ### Note that some functions (such as const) are normally disabled anyway.
12194 echo "$as_me:12194: checking if you want to build with function extensions" >&5
12195 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12196
12197 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12198 if test "${enable_ext_funcs+set}" = set; then
12199   enableval="$enable_ext_funcs"
12200   with_ext_funcs=$enableval
12201 else
12202   with_ext_funcs=yes
12203 fi;
12204 echo "$as_me:12204: result: $with_ext_funcs" >&5
12205 echo "${ECHO_T}$with_ext_funcs" >&6
12206 if test "x$with_ext_funcs" = xyes ; then
12207         NCURSES_EXT_FUNCS=1
12208
12209 cat >>confdefs.h <<\EOF
12210 #define NCURSES_EXT_FUNCS 1
12211 EOF
12212
12213 cat >>confdefs.h <<\EOF
12214 #define HAVE_ASSUME_DEFAULT_COLORS 1
12215 EOF
12216
12217 cat >>confdefs.h <<\EOF
12218 #define HAVE_CURSES_VERSION 1
12219 EOF
12220
12221 cat >>confdefs.h <<\EOF
12222 #define HAVE_HAS_KEY 1
12223 EOF
12224
12225 cat >>confdefs.h <<\EOF
12226 #define HAVE_RESIZETERM 1
12227 EOF
12228
12229 cat >>confdefs.h <<\EOF
12230 #define HAVE_RESIZE_TERM 1
12231 EOF
12232
12233 cat >>confdefs.h <<\EOF
12234 #define HAVE_TERM_ENTRY_H 1
12235 EOF
12236
12237 cat >>confdefs.h <<\EOF
12238 #define HAVE_USE_DEFAULT_COLORS 1
12239 EOF
12240
12241 cat >>confdefs.h <<\EOF
12242 #define HAVE_USE_EXTENDED_NAMES 1
12243 EOF
12244
12245 cat >>confdefs.h <<\EOF
12246 #define HAVE_USE_SCREEN 1
12247 EOF
12248
12249 cat >>confdefs.h <<\EOF
12250 #define HAVE_USE_WINDOW 1
12251 EOF
12252
12253 cat >>confdefs.h <<\EOF
12254 #define HAVE_WRESIZE 1
12255 EOF
12256
12257         GENERATED_EXT_FUNCS=generated
12258         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12259 else
12260         NCURSES_EXT_FUNCS=0
12261         GENERATED_EXT_FUNCS=
12262 fi
12263
12264 echo "$as_me:12264: checking if you want to build with SCREEN extensions" >&5
12265 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12266
12267 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12268 if test "${enable_sp_funcs+set}" = set; then
12269   enableval="$enable_sp_funcs"
12270   with_sp_funcs=$enableval
12271 else
12272   with_sp_funcs=$cf_dft_ext_spfuncs
12273 fi;
12274 echo "$as_me:12274: result: $with_sp_funcs" >&5
12275 echo "${ECHO_T}$with_sp_funcs" >&6
12276 if test "x$with_sp_funcs" = xyes ; then
12277         NCURSES_SP_FUNCS=1
12278
12279 cat >>confdefs.h <<\EOF
12280 #define NCURSES_SP_FUNCS 1
12281 EOF
12282
12283 cat >>confdefs.h <<\EOF
12284 #define HAVE_TPUTS_SP 1
12285 EOF
12286
12287         GENERATED_SP_FUNCS=generated
12288 else
12289         NCURSES_SP_FUNCS=0
12290         GENERATED_SP_FUNCS=
12291 fi
12292
12293 echo "$as_me:12293: checking if you want to build with terminal-driver" >&5
12294 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12295
12296 # Check whether --enable-term-driver or --disable-term-driver was given.
12297 if test "${enable_term_driver+set}" = set; then
12298   enableval="$enable_term_driver"
12299   with_term_driver=$enableval
12300 else
12301   with_term_driver=no
12302 fi;
12303 echo "$as_me:12303: result: $with_term_driver" >&5
12304 echo "${ECHO_T}$with_term_driver" >&6
12305 if test "x$with_term_driver" = xyes ; then
12306
12307 cat >>confdefs.h <<\EOF
12308 #define USE_TERM_DRIVER 1
12309 EOF
12310
12311         if test "x$with_termlib" != xno ; then
12312                 { { echo "$as_me:12312: error: The term-driver option conflicts with the termlib option" >&5
12313 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12314    { (exit 1); exit 1; }; }
12315         fi
12316         if test "x$with_sp_funcs" != xyes ; then
12317                 { { echo "$as_me:12317: error: The term-driver option relies upon sp-funcs" >&5
12318 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12319    { (exit 1); exit 1; }; }
12320         fi
12321 fi
12322
12323 ###   use option --enable-const to turn on use of const beyond that in XSI.
12324 echo "$as_me:12324: checking for extended use of const keyword" >&5
12325 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12326
12327 # Check whether --enable-const or --disable-const was given.
12328 if test "${enable_const+set}" = set; then
12329   enableval="$enable_const"
12330   with_ext_const=$enableval
12331 else
12332   with_ext_const=$cf_dft_ext_const
12333 fi;
12334 echo "$as_me:12334: result: $with_ext_const" >&5
12335 echo "${ECHO_T}$with_ext_const" >&6
12336 NCURSES_CONST='/*nothing*/'
12337 if test "x$with_ext_const" = xyes ; then
12338         NCURSES_CONST=const
12339 fi
12340
12341 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12342 echo "$as_me:12342: checking if you want to use extended colors" >&5
12343 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12344
12345 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12346 if test "${enable_ext_colors+set}" = set; then
12347   enableval="$enable_ext_colors"
12348   with_ext_colors=$enableval
12349 else
12350   with_ext_colors=$cf_dft_ext_colors
12351 fi;
12352 echo "$as_me:12352: result: $with_ext_colors" >&5
12353 echo "${ECHO_T}$with_ext_colors" >&6
12354 NCURSES_EXT_COLORS=0
12355 if test "x$with_ext_colors" = xyes ; then
12356         if test "x$with_widec" != xyes ; then
12357                 { echo "$as_me:12357: WARNING: This option applies only to wide-character library" >&5
12358 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12359         else
12360                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12361
12362 if test "${with_abi_version+set}" != set; then
12363         case $cf_cv_rel_version in
12364         (5.*)
12365                 cf_cv_rel_version=6.0
12366                 cf_cv_abi_version=6
12367                 { echo "$as_me:12367: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12368 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12369                 ;;
12370         esac
12371 fi
12372
12373                 NCURSES_EXT_COLORS=1
12374
12375 cat >>confdefs.h <<\EOF
12376 #define NCURSES_EXT_COLORS 1
12377 EOF
12378
12379 cat >>confdefs.h <<\EOF
12380 #define HAVE_ALLOC_PAIR 1
12381 EOF
12382
12383 cat >>confdefs.h <<\EOF
12384 #define HAVE_INIT_EXTENDED_COLOR 1
12385 EOF
12386
12387 cat >>confdefs.h <<\EOF
12388 #define HAVE_RESET_COLOR_PAIRS 1
12389 EOF
12390
12391         fi
12392 fi
12393
12394 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12395 echo "$as_me:12395: checking if you want to use extended mouse encoding" >&5
12396 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12397
12398 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12399 if test "${enable_ext_mouse+set}" = set; then
12400   enableval="$enable_ext_mouse"
12401   with_ext_mouse=$enableval
12402 else
12403   with_ext_mouse=$cf_dft_ext_mouse
12404 fi;
12405 echo "$as_me:12405: result: $with_ext_mouse" >&5
12406 echo "${ECHO_T}$with_ext_mouse" >&6
12407 NCURSES_MOUSE_VERSION=1
12408 if test "x$with_ext_mouse" = xyes ; then
12409         NCURSES_MOUSE_VERSION=2
12410
12411 if test "${with_abi_version+set}" != set; then
12412         case $cf_cv_rel_version in
12413         (5.*)
12414                 cf_cv_rel_version=6.0
12415                 cf_cv_abi_version=6
12416                 { echo "$as_me:12416: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12417 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12418                 ;;
12419         esac
12420 fi
12421
12422 fi
12423
12424 ###   use option --enable-ext-putwin to turn on extended screendumps
12425 echo "$as_me:12425: checking if you want to use extended putwin/screendump" >&5
12426 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12427
12428 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12429 if test "${enable_ext_putwin+set}" = set; then
12430   enableval="$enable_ext_putwin"
12431   with_ext_putwin=$enableval
12432 else
12433   with_ext_putwin=$cf_dft_ext_putwin
12434 fi;
12435 echo "$as_me:12435: result: $with_ext_putwin" >&5
12436 echo "${ECHO_T}$with_ext_putwin" >&6
12437 if test "x$with_ext_putwin" = xyes ; then
12438
12439 cat >>confdefs.h <<\EOF
12440 #define NCURSES_EXT_PUTWIN 1
12441 EOF
12442
12443 fi
12444
12445 echo "$as_me:12445: checking if you want \$NCURSES_NO_PADDING code" >&5
12446 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12447
12448 # Check whether --enable-no-padding or --disable-no-padding was given.
12449 if test "${enable_no_padding+set}" = set; then
12450   enableval="$enable_no_padding"
12451   with_no_padding=$enableval
12452 else
12453   with_no_padding=$with_ext_funcs
12454 fi;
12455 echo "$as_me:12455: result: $with_no_padding" >&5
12456 echo "${ECHO_T}$with_no_padding" >&6
12457 test "x$with_no_padding" = xyes &&
12458 cat >>confdefs.h <<\EOF
12459 #define NCURSES_NO_PADDING 1
12460 EOF
12461
12462 echo "$as_me:12462: checking for ANSI C header files" >&5
12463 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12464 if test "${ac_cv_header_stdc+set}" = set; then
12465   echo $ECHO_N "(cached) $ECHO_C" >&6
12466 else
12467   cat >conftest.$ac_ext <<_ACEOF
12468 #line 12468 "configure"
12469 #include "confdefs.h"
12470 #include <stdlib.h>
12471 #include <stdarg.h>
12472 #include <string.h>
12473 #include <float.h>
12474
12475 _ACEOF
12476 if { (eval echo "$as_me:12476: \"$ac_cpp conftest.$ac_ext\"") >&5
12477   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12478   ac_status=$?
12479   egrep -v '^ *\+' conftest.er1 >conftest.err
12480   rm -f conftest.er1
12481   cat conftest.err >&5
12482   echo "$as_me:12482: \$? = $ac_status" >&5
12483   (exit $ac_status); } >/dev/null; then
12484   if test -s conftest.err; then
12485     ac_cpp_err=$ac_c_preproc_warn_flag
12486   else
12487     ac_cpp_err=
12488   fi
12489 else
12490   ac_cpp_err=yes
12491 fi
12492 if test -z "$ac_cpp_err"; then
12493   ac_cv_header_stdc=yes
12494 else
12495   echo "$as_me: failed program was:" >&5
12496   cat conftest.$ac_ext >&5
12497   ac_cv_header_stdc=no
12498 fi
12499 rm -f conftest.err conftest.$ac_ext
12500
12501 if test $ac_cv_header_stdc = yes; then
12502   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12503   cat >conftest.$ac_ext <<_ACEOF
12504 #line 12504 "configure"
12505 #include "confdefs.h"
12506 #include <string.h>
12507
12508 _ACEOF
12509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12510   egrep "memchr" >/dev/null 2>&1; then
12511   :
12512 else
12513   ac_cv_header_stdc=no
12514 fi
12515 rm -rf conftest*
12516
12517 fi
12518
12519 if test $ac_cv_header_stdc = yes; then
12520   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12521   cat >conftest.$ac_ext <<_ACEOF
12522 #line 12522 "configure"
12523 #include "confdefs.h"
12524 #include <stdlib.h>
12525
12526 _ACEOF
12527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12528   egrep "free" >/dev/null 2>&1; then
12529   :
12530 else
12531   ac_cv_header_stdc=no
12532 fi
12533 rm -rf conftest*
12534
12535 fi
12536
12537 if test $ac_cv_header_stdc = yes; then
12538   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12539   if test "$cross_compiling" = yes; then
12540   :
12541 else
12542   cat >conftest.$ac_ext <<_ACEOF
12543 #line 12543 "configure"
12544 #include "confdefs.h"
12545 #include <ctype.h>
12546 #if ((' ' & 0x0FF) == 0x020)
12547 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12548 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12549 #else
12550 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12551                      || ('j' <= (c) && (c) <= 'r') \
12552                      || ('s' <= (c) && (c) <= 'z'))
12553 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12554 #endif
12555
12556 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12557 int
12558 main (void)
12559 {
12560   int i;
12561   for (i = 0; i < 256; i++)
12562     if (XOR (islower (i), ISLOWER (i))
12563         || toupper (i) != TOUPPER (i))
12564       $ac_main_return(2);
12565   $ac_main_return (0);
12566 }
12567 _ACEOF
12568 rm -f conftest$ac_exeext
12569 if { (eval echo "$as_me:12569: \"$ac_link\"") >&5
12570   (eval $ac_link) 2>&5
12571   ac_status=$?
12572   echo "$as_me:12572: \$? = $ac_status" >&5
12573   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12574   { (eval echo "$as_me:12574: \"$ac_try\"") >&5
12575   (eval $ac_try) 2>&5
12576   ac_status=$?
12577   echo "$as_me:12577: \$? = $ac_status" >&5
12578   (exit $ac_status); }; }; then
12579   :
12580 else
12581   echo "$as_me: program exited with status $ac_status" >&5
12582 echo "$as_me: failed program was:" >&5
12583 cat conftest.$ac_ext >&5
12584 ac_cv_header_stdc=no
12585 fi
12586 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12587 fi
12588 fi
12589 fi
12590 echo "$as_me:12590: result: $ac_cv_header_stdc" >&5
12591 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12592 if test $ac_cv_header_stdc = yes; then
12593
12594 cat >>confdefs.h <<\EOF
12595 #define STDC_HEADERS 1
12596 EOF
12597
12598 fi
12599
12600 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12601
12602 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12603                   inttypes.h stdint.h unistd.h
12604 do
12605 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12606 echo "$as_me:12606: checking for $ac_header" >&5
12607 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12608 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12609   echo $ECHO_N "(cached) $ECHO_C" >&6
12610 else
12611   cat >conftest.$ac_ext <<_ACEOF
12612 #line 12612 "configure"
12613 #include "confdefs.h"
12614 $ac_includes_default
12615 #include <$ac_header>
12616 _ACEOF
12617 rm -f conftest.$ac_objext
12618 if { (eval echo "$as_me:12618: \"$ac_compile\"") >&5
12619   (eval $ac_compile) 2>&5
12620   ac_status=$?
12621   echo "$as_me:12621: \$? = $ac_status" >&5
12622   (exit $ac_status); } &&
12623          { ac_try='test -s conftest.$ac_objext'
12624   { (eval echo "$as_me:12624: \"$ac_try\"") >&5
12625   (eval $ac_try) 2>&5
12626   ac_status=$?
12627   echo "$as_me:12627: \$? = $ac_status" >&5
12628   (exit $ac_status); }; }; then
12629   eval "$as_ac_Header=yes"
12630 else
12631   echo "$as_me: failed program was:" >&5
12632 cat conftest.$ac_ext >&5
12633 eval "$as_ac_Header=no"
12634 fi
12635 rm -f conftest.$ac_objext conftest.$ac_ext
12636 fi
12637 echo "$as_me:12637: result: `eval echo '${'$as_ac_Header'}'`" >&5
12638 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12639 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12640   cat >>confdefs.h <<EOF
12641 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12642 EOF
12643
12644 fi
12645 done
12646
12647 echo "$as_me:12647: checking for signed char" >&5
12648 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12649 if test "${ac_cv_type_signed_char+set}" = set; then
12650   echo $ECHO_N "(cached) $ECHO_C" >&6
12651 else
12652   cat >conftest.$ac_ext <<_ACEOF
12653 #line 12653 "configure"
12654 #include "confdefs.h"
12655 $ac_includes_default
12656 int
12657 main (void)
12658 {
12659 if ((signed char *) 0)
12660   return 0;
12661 if (sizeof (signed char))
12662   return 0;
12663   ;
12664   return 0;
12665 }
12666 _ACEOF
12667 rm -f conftest.$ac_objext
12668 if { (eval echo "$as_me:12668: \"$ac_compile\"") >&5
12669   (eval $ac_compile) 2>&5
12670   ac_status=$?
12671   echo "$as_me:12671: \$? = $ac_status" >&5
12672   (exit $ac_status); } &&
12673          { ac_try='test -s conftest.$ac_objext'
12674   { (eval echo "$as_me:12674: \"$ac_try\"") >&5
12675   (eval $ac_try) 2>&5
12676   ac_status=$?
12677   echo "$as_me:12677: \$? = $ac_status" >&5
12678   (exit $ac_status); }; }; then
12679   ac_cv_type_signed_char=yes
12680 else
12681   echo "$as_me: failed program was:" >&5
12682 cat conftest.$ac_ext >&5
12683 ac_cv_type_signed_char=no
12684 fi
12685 rm -f conftest.$ac_objext conftest.$ac_ext
12686 fi
12687 echo "$as_me:12687: result: $ac_cv_type_signed_char" >&5
12688 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12689
12690 echo "$as_me:12690: checking size of signed char" >&5
12691 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12692 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12693   echo $ECHO_N "(cached) $ECHO_C" >&6
12694 else
12695   if test "$ac_cv_type_signed_char" = yes; then
12696   if test "$cross_compiling" = yes; then
12697   # Depending upon the size, compute the lo and hi bounds.
12698 cat >conftest.$ac_ext <<_ACEOF
12699 #line 12699 "configure"
12700 #include "confdefs.h"
12701 $ac_includes_default
12702 int
12703 main (void)
12704 {
12705 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12706   ;
12707   return 0;
12708 }
12709 _ACEOF
12710 rm -f conftest.$ac_objext
12711 if { (eval echo "$as_me:12711: \"$ac_compile\"") >&5
12712   (eval $ac_compile) 2>&5
12713   ac_status=$?
12714   echo "$as_me:12714: \$? = $ac_status" >&5
12715   (exit $ac_status); } &&
12716          { ac_try='test -s conftest.$ac_objext'
12717   { (eval echo "$as_me:12717: \"$ac_try\"") >&5
12718   (eval $ac_try) 2>&5
12719   ac_status=$?
12720   echo "$as_me:12720: \$? = $ac_status" >&5
12721   (exit $ac_status); }; }; then
12722   ac_lo=0 ac_mid=0
12723   while :; do
12724     cat >conftest.$ac_ext <<_ACEOF
12725 #line 12725 "configure"
12726 #include "confdefs.h"
12727 $ac_includes_default
12728 int
12729 main (void)
12730 {
12731 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12732   ;
12733   return 0;
12734 }
12735 _ACEOF
12736 rm -f conftest.$ac_objext
12737 if { (eval echo "$as_me:12737: \"$ac_compile\"") >&5
12738   (eval $ac_compile) 2>&5
12739   ac_status=$?
12740   echo "$as_me:12740: \$? = $ac_status" >&5
12741   (exit $ac_status); } &&
12742          { ac_try='test -s conftest.$ac_objext'
12743   { (eval echo "$as_me:12743: \"$ac_try\"") >&5
12744   (eval $ac_try) 2>&5
12745   ac_status=$?
12746   echo "$as_me:12746: \$? = $ac_status" >&5
12747   (exit $ac_status); }; }; then
12748   ac_hi=$ac_mid; break
12749 else
12750   echo "$as_me: failed program was:" >&5
12751 cat conftest.$ac_ext >&5
12752 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12753 fi
12754 rm -f conftest.$ac_objext conftest.$ac_ext
12755   done
12756 else
12757   echo "$as_me: failed program was:" >&5
12758 cat conftest.$ac_ext >&5
12759 ac_hi=-1 ac_mid=-1
12760   while :; do
12761     cat >conftest.$ac_ext <<_ACEOF
12762 #line 12762 "configure"
12763 #include "confdefs.h"
12764 $ac_includes_default
12765 int
12766 main (void)
12767 {
12768 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12769   ;
12770   return 0;
12771 }
12772 _ACEOF
12773 rm -f conftest.$ac_objext
12774 if { (eval echo "$as_me:12774: \"$ac_compile\"") >&5
12775   (eval $ac_compile) 2>&5
12776   ac_status=$?
12777   echo "$as_me:12777: \$? = $ac_status" >&5
12778   (exit $ac_status); } &&
12779          { ac_try='test -s conftest.$ac_objext'
12780   { (eval echo "$as_me:12780: \"$ac_try\"") >&5
12781   (eval $ac_try) 2>&5
12782   ac_status=$?
12783   echo "$as_me:12783: \$? = $ac_status" >&5
12784   (exit $ac_status); }; }; then
12785   ac_lo=$ac_mid; break
12786 else
12787   echo "$as_me: failed program was:" >&5
12788 cat conftest.$ac_ext >&5
12789 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12790 fi
12791 rm -f conftest.$ac_objext conftest.$ac_ext
12792   done
12793 fi
12794 rm -f conftest.$ac_objext conftest.$ac_ext
12795 # Binary search between lo and hi bounds.
12796 while test "x$ac_lo" != "x$ac_hi"; do
12797   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12798   cat >conftest.$ac_ext <<_ACEOF
12799 #line 12799 "configure"
12800 #include "confdefs.h"
12801 $ac_includes_default
12802 int
12803 main (void)
12804 {
12805 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12806   ;
12807   return 0;
12808 }
12809 _ACEOF
12810 rm -f conftest.$ac_objext
12811 if { (eval echo "$as_me:12811: \"$ac_compile\"") >&5
12812   (eval $ac_compile) 2>&5
12813   ac_status=$?
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit $ac_status); } &&
12816          { ac_try='test -s conftest.$ac_objext'
12817   { (eval echo "$as_me:12817: \"$ac_try\"") >&5
12818   (eval $ac_try) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); }; }; then
12822   ac_hi=$ac_mid
12823 else
12824   echo "$as_me: failed program was:" >&5
12825 cat conftest.$ac_ext >&5
12826 ac_lo=`expr $ac_mid + 1`
12827 fi
12828 rm -f conftest.$ac_objext conftest.$ac_ext
12829 done
12830 ac_cv_sizeof_signed_char=$ac_lo
12831 else
12832   if test "$cross_compiling" = yes; then
12833   { { echo "$as_me:12833: error: cannot run test program while cross compiling" >&5
12834 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12835    { (exit 1); exit 1; }; }
12836 else
12837   cat >conftest.$ac_ext <<_ACEOF
12838 #line 12838 "configure"
12839 #include "confdefs.h"
12840 $ac_includes_default
12841 int
12842 main (void)
12843 {
12844 FILE *f = fopen ("conftest.val", "w");
12845 if (!f)
12846   $ac_main_return (1);
12847 fprintf (f, "%d", (sizeof (signed char)));
12848 fclose (f);
12849   ;
12850   return 0;
12851 }
12852 _ACEOF
12853 rm -f conftest$ac_exeext
12854 if { (eval echo "$as_me:12854: \"$ac_link\"") >&5
12855   (eval $ac_link) 2>&5
12856   ac_status=$?
12857   echo "$as_me:12857: \$? = $ac_status" >&5
12858   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12859   { (eval echo "$as_me:12859: \"$ac_try\"") >&5
12860   (eval $ac_try) 2>&5
12861   ac_status=$?
12862   echo "$as_me:12862: \$? = $ac_status" >&5
12863   (exit $ac_status); }; }; then
12864   ac_cv_sizeof_signed_char=`cat conftest.val`
12865 else
12866   echo "$as_me: program exited with status $ac_status" >&5
12867 echo "$as_me: failed program was:" >&5
12868 cat conftest.$ac_ext >&5
12869 fi
12870 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12871 fi
12872 fi
12873 rm -f conftest.val
12874 else
12875   ac_cv_sizeof_signed_char=0
12876 fi
12877 fi
12878 echo "$as_me:12878: result: $ac_cv_sizeof_signed_char" >&5
12879 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12880 cat >>confdefs.h <<EOF
12881 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12882 EOF
12883
12884 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12885         NCURSES_SBOOL="signed char"
12886 else
12887         NCURSES_SBOOL="char"
12888 fi
12889 echo "$as_me:12889: checking if you want to use signed Boolean array in term.h" >&5
12890 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12891
12892 # Check whether --enable-signed-char or --disable-signed-char was given.
12893 if test "${enable_signed_char+set}" = set; then
12894   enableval="$enable_signed_char"
12895   with_signed_char=$enableval
12896 else
12897   with_signed_char=no
12898 fi;
12899 echo "$as_me:12899: result: $with_signed_char" >&5
12900 echo "${ECHO_T}$with_signed_char" >&6
12901 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12902
12903 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12904 echo "$as_me:12904: checking if you want SIGWINCH handler" >&5
12905 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12906
12907 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12908 if test "${enable_sigwinch+set}" = set; then
12909   enableval="$enable_sigwinch"
12910   with_sigwinch=$enableval
12911 else
12912   with_sigwinch=$with_ext_funcs
12913 fi;
12914 echo "$as_me:12914: result: $with_sigwinch" >&5
12915 echo "${ECHO_T}$with_sigwinch" >&6
12916 test "x$with_sigwinch" = xyes &&
12917 cat >>confdefs.h <<\EOF
12918 #define USE_SIGWINCH 1
12919 EOF
12920
12921 ###   use option --enable-tcap-names to allow user to define new capabilities
12922 echo "$as_me:12922: checking if you want user-definable terminal capabilities like termcap" >&5
12923 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12924
12925 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12926 if test "${enable_tcap_names+set}" = set; then
12927   enableval="$enable_tcap_names"
12928   with_tcap_names=$enableval
12929 else
12930   with_tcap_names=$with_ext_funcs
12931 fi;
12932 echo "$as_me:12932: result: $with_tcap_names" >&5
12933 echo "${ECHO_T}$with_tcap_names" >&6
12934 NCURSES_XNAMES=0
12935 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12936
12937 ##############################################################################
12938
12939 echo "$as_me:12939: checking if you want to link with the pthread library" >&5
12940 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12941
12942 # Check whether --with-pthread or --without-pthread was given.
12943 if test "${with_pthread+set}" = set; then
12944   withval="$with_pthread"
12945   with_pthread=$withval
12946 else
12947   with_pthread=no
12948 fi;
12949 echo "$as_me:12949: result: $with_pthread" >&5
12950 echo "${ECHO_T}$with_pthread" >&6
12951
12952 if test "$with_pthread" != no ; then
12953         echo "$as_me:12953: checking for pthread.h" >&5
12954 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12955 if test "${ac_cv_header_pthread_h+set}" = set; then
12956   echo $ECHO_N "(cached) $ECHO_C" >&6
12957 else
12958   cat >conftest.$ac_ext <<_ACEOF
12959 #line 12959 "configure"
12960 #include "confdefs.h"
12961 #include <pthread.h>
12962 _ACEOF
12963 if { (eval echo "$as_me:12963: \"$ac_cpp conftest.$ac_ext\"") >&5
12964   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12965   ac_status=$?
12966   egrep -v '^ *\+' conftest.er1 >conftest.err
12967   rm -f conftest.er1
12968   cat conftest.err >&5
12969   echo "$as_me:12969: \$? = $ac_status" >&5
12970   (exit $ac_status); } >/dev/null; then
12971   if test -s conftest.err; then
12972     ac_cpp_err=$ac_c_preproc_warn_flag
12973   else
12974     ac_cpp_err=
12975   fi
12976 else
12977   ac_cpp_err=yes
12978 fi
12979 if test -z "$ac_cpp_err"; then
12980   ac_cv_header_pthread_h=yes
12981 else
12982   echo "$as_me: failed program was:" >&5
12983   cat conftest.$ac_ext >&5
12984   ac_cv_header_pthread_h=no
12985 fi
12986 rm -f conftest.err conftest.$ac_ext
12987 fi
12988 echo "$as_me:12988: result: $ac_cv_header_pthread_h" >&5
12989 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12990 if test $ac_cv_header_pthread_h = yes; then
12991
12992 cat >>confdefs.h <<\EOF
12993 #define HAVE_PTHREADS_H 1
12994 EOF
12995
12996         for cf_lib_pthread in pthread c_r
12997         do
12998             echo "$as_me:12998: checking if we can link with the $cf_lib_pthread library" >&5
12999 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13000             cf_save_LIBS="$LIBS"
13001
13002 cf_add_libs="-l$cf_lib_pthread"
13003 # Filter out duplicates - this happens with badly-designed ".pc" files...
13004 for cf_add_1lib in $LIBS
13005 do
13006         for cf_add_2lib in $cf_add_libs
13007         do
13008                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13009                 then
13010                         cf_add_1lib=
13011                         break
13012                 fi
13013         done
13014         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13015 done
13016 LIBS="$cf_add_libs"
13017
13018             cat >conftest.$ac_ext <<_ACEOF
13019 #line 13019 "configure"
13020 #include "confdefs.h"
13021
13022 #include <pthread.h>
13023
13024 int
13025 main (void)
13026 {
13027
13028                 int rc = pthread_create(0,0,0,0);
13029                 int r2 = pthread_mutexattr_settype(0, 0);
13030
13031   ;
13032   return 0;
13033 }
13034 _ACEOF
13035 rm -f conftest.$ac_objext conftest$ac_exeext
13036 if { (eval echo "$as_me:13036: \"$ac_link\"") >&5
13037   (eval $ac_link) 2>&5
13038   ac_status=$?
13039   echo "$as_me:13039: \$? = $ac_status" >&5
13040   (exit $ac_status); } &&
13041          { ac_try='test -s conftest$ac_exeext'
13042   { (eval echo "$as_me:13042: \"$ac_try\"") >&5
13043   (eval $ac_try) 2>&5
13044   ac_status=$?
13045   echo "$as_me:13045: \$? = $ac_status" >&5
13046   (exit $ac_status); }; }; then
13047   with_pthread=yes
13048 else
13049   echo "$as_me: failed program was:" >&5
13050 cat conftest.$ac_ext >&5
13051 with_pthread=no
13052 fi
13053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13054             LIBS="$cf_save_LIBS"
13055             echo "$as_me:13055: result: $with_pthread" >&5
13056 echo "${ECHO_T}$with_pthread" >&6
13057             test "$with_pthread" = yes && break
13058         done
13059
13060         if test "$with_pthread" = yes ; then
13061
13062 cf_add_libs="-l$cf_lib_pthread"
13063 # Filter out duplicates - this happens with badly-designed ".pc" files...
13064 for cf_add_1lib in $LIBS
13065 do
13066         for cf_add_2lib in $cf_add_libs
13067         do
13068                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13069                 then
13070                         cf_add_1lib=
13071                         break
13072                 fi
13073         done
13074         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13075 done
13076 LIBS="$cf_add_libs"
13077
13078 cat >>confdefs.h <<\EOF
13079 #define HAVE_LIBPTHREADS 1
13080 EOF
13081
13082         else
13083             { { echo "$as_me:13083: error: Cannot link with pthread library" >&5
13084 echo "$as_me: error: Cannot link with pthread library" >&2;}
13085    { (exit 1); exit 1; }; }
13086         fi
13087
13088 fi
13089
13090 fi
13091
13092 if test "x$with_pthread" != xno; then
13093         echo "$as_me:13093: checking for pthread_kill" >&5
13094 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
13095 if test "${ac_cv_func_pthread_kill+set}" = set; then
13096   echo $ECHO_N "(cached) $ECHO_C" >&6
13097 else
13098   cat >conftest.$ac_ext <<_ACEOF
13099 #line 13099 "configure"
13100 #include "confdefs.h"
13101 /* System header to define __stub macros and hopefully few prototypes,
13102     which can conflict with char pthread_kill (); below.  */
13103 #include <assert.h>
13104 /* Override any gcc2 internal prototype to avoid an error.  */
13105 #ifdef __cplusplus
13106 extern "C"
13107 #endif
13108 /* We use char because int might match the return type of a gcc2
13109    builtin and then its argument prototype would still apply.  */
13110 char pthread_kill ();
13111 char (*f) ();
13112
13113 int
13114 main (void)
13115 {
13116 /* The GNU C library defines this for functions which it implements
13117     to always fail with ENOSYS.  Some functions are actually named
13118     something starting with __ and the normal name is an alias.  */
13119 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13120 choke me
13121 #else
13122 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13123 #endif
13124
13125   ;
13126   return 0;
13127 }
13128 _ACEOF
13129 rm -f conftest.$ac_objext conftest$ac_exeext
13130 if { (eval echo "$as_me:13130: \"$ac_link\"") >&5
13131   (eval $ac_link) 2>&5
13132   ac_status=$?
13133   echo "$as_me:13133: \$? = $ac_status" >&5
13134   (exit $ac_status); } &&
13135          { ac_try='test -s conftest$ac_exeext'
13136   { (eval echo "$as_me:13136: \"$ac_try\"") >&5
13137   (eval $ac_try) 2>&5
13138   ac_status=$?
13139   echo "$as_me:13139: \$? = $ac_status" >&5
13140   (exit $ac_status); }; }; then
13141   ac_cv_func_pthread_kill=yes
13142 else
13143   echo "$as_me: failed program was:" >&5
13144 cat conftest.$ac_ext >&5
13145 ac_cv_func_pthread_kill=no
13146 fi
13147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13148 fi
13149 echo "$as_me:13149: result: $ac_cv_func_pthread_kill" >&5
13150 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13151 if test $ac_cv_func_pthread_kill = yes; then
13152
13153                 echo "$as_me:13153: checking if you want to allow EINTR in wgetch with pthreads" >&5
13154 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13155
13156 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13157 if test "${enable_pthreads_eintr+set}" = set; then
13158   enableval="$enable_pthreads_eintr"
13159   use_pthreads_eintr=$enableval
13160 else
13161   use_pthreads_eintr=no
13162 fi;
13163                 echo "$as_me:13163: result: $use_pthreads_eintr" >&5
13164 echo "${ECHO_T}$use_pthreads_eintr" >&6
13165                 if test "x$use_pthreads_eintr" = xyes ; then
13166
13167 cat >>confdefs.h <<\EOF
13168 #define USE_PTHREADS_EINTR 1
13169 EOF
13170
13171                 fi
13172 fi
13173
13174         echo "$as_me:13174: checking if you want to use weak-symbols for pthreads" >&5
13175 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13176
13177 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13178 if test "${enable_weak_symbols+set}" = set; then
13179   enableval="$enable_weak_symbols"
13180   use_weak_symbols=$enableval
13181 else
13182   use_weak_symbols=no
13183 fi;
13184         echo "$as_me:13184: result: $use_weak_symbols" >&5
13185 echo "${ECHO_T}$use_weak_symbols" >&6
13186         if test "x$use_weak_symbols" = xyes ; then
13187
13188 echo "$as_me:13188: checking if $CC supports weak symbols" >&5
13189 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13190 if test "${cf_cv_weak_symbols+set}" = set; then
13191   echo $ECHO_N "(cached) $ECHO_C" >&6
13192 else
13193
13194 cat >conftest.$ac_ext <<_ACEOF
13195 #line 13195 "configure"
13196 #include "confdefs.h"
13197
13198 #include <stdio.h>
13199 int
13200 main (void)
13201 {
13202
13203 #if defined(__GNUC__)
13204 #  if defined __USE_ISOC99
13205 #    define _cat_pragma(exp)    _Pragma(#exp)
13206 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13207 #  else
13208 #    define _weak_pragma(exp)
13209 #  endif
13210 #  define _declare(name)        __extension__ extern __typeof__(name) name
13211 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13212 #endif
13213
13214 weak_symbol(fopen);
13215
13216   ;
13217   return 0;
13218 }
13219 _ACEOF
13220 rm -f conftest.$ac_objext
13221 if { (eval echo "$as_me:13221: \"$ac_compile\"") >&5
13222   (eval $ac_compile) 2>&5
13223   ac_status=$?
13224   echo "$as_me:13224: \$? = $ac_status" >&5
13225   (exit $ac_status); } &&
13226          { ac_try='test -s conftest.$ac_objext'
13227   { (eval echo "$as_me:13227: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:13230: \$? = $ac_status" >&5
13231   (exit $ac_status); }; }; then
13232   cf_cv_weak_symbols=yes
13233 else
13234   echo "$as_me: failed program was:" >&5
13235 cat conftest.$ac_ext >&5
13236 cf_cv_weak_symbols=no
13237 fi
13238 rm -f conftest.$ac_objext conftest.$ac_ext
13239
13240 fi
13241 echo "$as_me:13241: result: $cf_cv_weak_symbols" >&5
13242 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13243
13244         else
13245                 cf_cv_weak_symbols=no
13246         fi
13247
13248         if test "x$cf_cv_weak_symbols" = xyes ; then
13249
13250 cat >>confdefs.h <<\EOF
13251 #define USE_WEAK_SYMBOLS 1
13252 EOF
13253
13254         fi
13255 fi
13256
13257 PTHREAD=
13258 if test "x$with_pthread" = "xyes" ; then
13259
13260 cat >>confdefs.h <<\EOF
13261 #define USE_PTHREADS 1
13262 EOF
13263
13264         enable_reentrant=yes
13265         if test "x$cf_cv_weak_symbols" = xyes ; then
13266                 PTHREAD=-lpthread
13267         fi
13268 fi
13269
13270 # Reentrant code has to be opaque; there's little advantage to making ncurses
13271 # opaque outside of that, so there is no --enable-opaque option.  We can use
13272 # this option without --with-pthreads, but this will be always set for
13273 # pthreads.
13274 echo "$as_me:13274: checking if you want reentrant code" >&5
13275 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13276
13277 # Check whether --enable-reentrant or --disable-reentrant was given.
13278 if test "${enable_reentrant+set}" = set; then
13279   enableval="$enable_reentrant"
13280   with_reentrant=$enableval
13281 else
13282   with_reentrant=no
13283 fi;
13284 echo "$as_me:13284: result: $with_reentrant" >&5
13285 echo "${ECHO_T}$with_reentrant" >&6
13286 if test "x$with_reentrant" = xyes ; then
13287         cf_cv_enable_reentrant=1
13288         cf_cv_enable_opaque="NCURSES_INTERNALS"
13289         NCURSES_SIZE_T=int
13290         if test "x$cf_cv_weak_symbols" = xyes ; then
13291
13292 # remove pthread library from $LIBS
13293 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13294
13295 cf_add_libs="-lpthread"
13296 # Filter out duplicates - this happens with badly-designed ".pc" files...
13297 for cf_add_1lib in $TEST_LIBS
13298 do
13299         for cf_add_2lib in $cf_add_libs
13300         do
13301                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13302                 then
13303                         cf_add_1lib=
13304                         break
13305                 fi
13306         done
13307         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13308 done
13309 TEST_LIBS="$cf_add_libs"
13310
13311 cf_add_libs="-lpthread"
13312 # Filter out duplicates - this happens with badly-designed ".pc" files...
13313 for cf_add_1lib in $TEST_LIBS2
13314 do
13315         for cf_add_2lib in $cf_add_libs
13316         do
13317                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13318                 then
13319                         cf_add_1lib=
13320                         break
13321                 fi
13322         done
13323         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13324 done
13325 TEST_LIBS2="$cf_add_libs"
13326
13327         else
13328                 # when not using weak symbols but with_reentrant,
13329                 # add 't' to the library suffix on all platforms
13330                 # except cygwin, where we only do that if ALSO
13331                 # compiling with full thread support.
13332                 case "$host" in
13333                 (*cygwin* | *msys*)
13334                         if test "$with_pthread" = "yes" ; then
13335                                 if test "x$disable_lib_suffixes" = "xno" ; then
13336                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13337                                 fi
13338                         fi ;;
13339                 (*)
13340                         if test "x$disable_lib_suffixes" = "xno" ; then
13341                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13342                         fi
13343                         ;;
13344                 esac
13345         fi
13346
13347 cat >>confdefs.h <<\EOF
13348 #define USE_REENTRANT 1
13349 EOF
13350
13351 if test "${with_abi_version+set}" != set; then
13352         case $cf_cv_rel_version in
13353         (5.*)
13354                 cf_cv_rel_version=6.0
13355                 cf_cv_abi_version=6
13356                 { echo "$as_me:13356: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13357 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13358                 ;;
13359         esac
13360 fi
13361
13362 else
13363         cf_cv_enable_reentrant=0
13364         cf_cv_enable_opaque="NCURSES_OPAQUE"
13365         NCURSES_SIZE_T=short
13366 fi
13367
13368 echo "$as_me:13368: checking if you want opaque curses-library structures" >&5
13369 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13370
13371 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13372 if test "${enable_opaque_curses+set}" = set; then
13373   enableval="$enable_opaque_curses"
13374   test "$enableval" != yes && enableval=no
13375         if test "$enableval" != "no" ; then
13376     enable_opaque_curses=yes
13377         else
13378
13379          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13380          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13381
13382         fi
13383 else
13384   enableval=no
13385
13386          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13387          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13388
13389 fi;
13390 echo "$as_me:13390: result: $enable_opaque_curses" >&5
13391 echo "${ECHO_T}$enable_opaque_curses" >&6
13392
13393 test "$cf_cv_enable_reentrant" = 1 && \
13394 test "$enable_opaque_curses" = no && \
13395 { { echo "$as_me:13395: error: reentrant configuration requires opaque library" >&5
13396 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13397    { (exit 1); exit 1; }; }
13398
13399 echo "$as_me:13399: checking if you want opaque form-library structures" >&5
13400 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13401
13402 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13403 if test "${enable_opaque_form+set}" = set; then
13404   enableval="$enable_opaque_form"
13405   enable_opaque_form=yes
13406 else
13407   enable_opaque_form=no
13408 fi;
13409 echo "$as_me:13409: result: $enable_opaque_form" >&5
13410 echo "${ECHO_T}$enable_opaque_form" >&6
13411
13412 echo "$as_me:13412: checking if you want opaque menu-library structures" >&5
13413 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13414
13415 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13416 if test "${enable_opaque_menu+set}" = set; then
13417   enableval="$enable_opaque_menu"
13418   enable_opaque_menu=yes
13419 else
13420   enable_opaque_menu=no
13421 fi;
13422 echo "$as_me:13422: result: $enable_opaque_menu" >&5
13423 echo "${ECHO_T}$enable_opaque_menu" >&6
13424
13425 echo "$as_me:13425: checking if you want opaque panel-library structures" >&5
13426 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13427
13428 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13429 if test "${enable_opaque_panel+set}" = set; then
13430   enableval="$enable_opaque_panel"
13431   enable_opaque_panel=yes
13432 else
13433   enable_opaque_panel=no
13434 fi;
13435 echo "$as_me:13435: result: $enable_opaque_panel" >&5
13436 echo "${ECHO_T}$enable_opaque_panel" >&6
13437
13438 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13439 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13440 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13441 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13442
13443 ### Allow using a different wrap-prefix
13444 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13445         echo "$as_me:13445: checking for prefix used to wrap public variables" >&5
13446 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13447
13448 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13449 if test "${with_wrap_prefix+set}" = set; then
13450   withval="$with_wrap_prefix"
13451   NCURSES_WRAP_PREFIX=$withval
13452 else
13453   NCURSES_WRAP_PREFIX=_nc_
13454 fi;
13455         echo "$as_me:13455: result: $NCURSES_WRAP_PREFIX" >&5
13456 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13457 else
13458         NCURSES_WRAP_PREFIX=_nc_
13459 fi
13460
13461 cat >>confdefs.h <<EOF
13462 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13463 EOF
13464
13465 ###############################################################################
13466 # These options are relatively safe to experiment with.
13467
13468 echo "$as_me:13468: checking if you want all development code" >&5
13469 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13470
13471 # Check whether --with-develop or --without-develop was given.
13472 if test "${with_develop+set}" = set; then
13473   withval="$with_develop"
13474   with_develop=$withval
13475 else
13476   with_develop=no
13477 fi;
13478 echo "$as_me:13478: result: $with_develop" >&5
13479 echo "${ECHO_T}$with_develop" >&6
13480
13481 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13482 echo "$as_me:13482: checking if you want hard-tabs code" >&5
13483 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13484
13485 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13486 if test "${enable_hard_tabs+set}" = set; then
13487   enableval="$enable_hard_tabs"
13488
13489 else
13490   enable_hard_tabs=$with_develop
13491 fi;
13492 echo "$as_me:13492: result: $enable_hard_tabs" >&5
13493 echo "${ECHO_T}$enable_hard_tabs" >&6
13494 test "x$enable_hard_tabs" = xyes &&
13495 cat >>confdefs.h <<\EOF
13496 #define USE_HARD_TABS 1
13497 EOF
13498
13499 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13500 echo "$as_me:13500: checking if you want limited support for xmc" >&5
13501 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13502
13503 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13504 if test "${enable_xmc_glitch+set}" = set; then
13505   enableval="$enable_xmc_glitch"
13506
13507 else
13508   enable_xmc_glitch=$with_develop
13509 fi;
13510 echo "$as_me:13510: result: $enable_xmc_glitch" >&5
13511 echo "${ECHO_T}$enable_xmc_glitch" >&6
13512 test "x$enable_xmc_glitch" = xyes &&
13513 cat >>confdefs.h <<\EOF
13514 #define USE_XMC_SUPPORT 1
13515 EOF
13516
13517 ###############################################################################
13518 # These are just experimental, probably should not be in a package:
13519
13520 echo "$as_me:13520: checking if you do not want to assume colors are white-on-black" >&5
13521 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13522
13523 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13524 if test "${enable_assumed_color+set}" = set; then
13525   enableval="$enable_assumed_color"
13526   with_assumed_color=$enableval
13527 else
13528   with_assumed_color=yes
13529 fi;
13530 echo "$as_me:13530: result: $with_assumed_color" >&5
13531 echo "${ECHO_T}$with_assumed_color" >&6
13532 test "x$with_assumed_color" = xyes &&
13533 cat >>confdefs.h <<\EOF
13534 #define USE_ASSUMED_COLOR 1
13535 EOF
13536
13537 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13538 echo "$as_me:13538: checking if you want hashmap scrolling-optimization code" >&5
13539 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13540
13541 # Check whether --enable-hashmap or --disable-hashmap was given.
13542 if test "${enable_hashmap+set}" = set; then
13543   enableval="$enable_hashmap"
13544   with_hashmap=$enableval
13545 else
13546   with_hashmap=yes
13547 fi;
13548 echo "$as_me:13548: result: $with_hashmap" >&5
13549 echo "${ECHO_T}$with_hashmap" >&6
13550 test "x$with_hashmap" = xyes &&
13551 cat >>confdefs.h <<\EOF
13552 #define USE_HASHMAP 1
13553 EOF
13554
13555 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13556 echo "$as_me:13556: checking if you want colorfgbg code" >&5
13557 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13558
13559 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13560 if test "${enable_colorfgbg+set}" = set; then
13561   enableval="$enable_colorfgbg"
13562   with_colorfgbg=$enableval
13563 else
13564   with_colorfgbg=no
13565 fi;
13566 echo "$as_me:13566: result: $with_colorfgbg" >&5
13567 echo "${ECHO_T}$with_colorfgbg" >&6
13568 test "x$with_colorfgbg" = xyes &&
13569 cat >>confdefs.h <<\EOF
13570 #define USE_COLORFGBG 1
13571 EOF
13572
13573 ###   use option --enable-interop to turn on use of bindings used for interop
13574 echo "$as_me:13574: checking if you want interop bindings" >&5
13575 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13576
13577 # Check whether --enable-interop or --disable-interop was given.
13578 if test "${enable_interop+set}" = set; then
13579   enableval="$enable_interop"
13580   with_exp_interop=$enableval
13581 else
13582   with_exp_interop=$cf_dft_interop
13583 fi;
13584 echo "$as_me:13584: result: $with_exp_interop" >&5
13585 echo "${ECHO_T}$with_exp_interop" >&6
13586
13587 NCURSES_INTEROP_FUNCS=0
13588 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13589
13590 echo "$as_me:13590: checking if you want experimental safe-sprintf code" >&5
13591 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13592
13593 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13594 if test "${enable_safe_sprintf+set}" = set; then
13595   enableval="$enable_safe_sprintf"
13596   with_safe_sprintf=$enableval
13597 else
13598   with_safe_sprintf=no
13599 fi;
13600 echo "$as_me:13600: result: $with_safe_sprintf" >&5
13601 echo "${ECHO_T}$with_safe_sprintf" >&6
13602 test "x$with_safe_sprintf" = xyes &&
13603 cat >>confdefs.h <<\EOF
13604 #define USE_SAFE_SPRINTF 1
13605 EOF
13606
13607 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13608 # when hashmap is used scroll hints are useless
13609 if test "$with_hashmap" = no ; then
13610 echo "$as_me:13610: checking if you want to experiment without scrolling-hints code" >&5
13611 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13612
13613 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13614 if test "${enable_scroll_hints+set}" = set; then
13615   enableval="$enable_scroll_hints"
13616   with_scroll_hints=$enableval
13617 else
13618   with_scroll_hints=yes
13619 fi;
13620 echo "$as_me:13620: result: $with_scroll_hints" >&5
13621 echo "${ECHO_T}$with_scroll_hints" >&6
13622 test "x$with_scroll_hints" = xyes &&
13623 cat >>confdefs.h <<\EOF
13624 #define USE_SCROLL_HINTS 1
13625 EOF
13626
13627 fi
13628
13629 echo "$as_me:13629: checking if you want wgetch-events code" >&5
13630 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13631
13632 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13633 if test "${enable_wgetch_events+set}" = set; then
13634   enableval="$enable_wgetch_events"
13635   with_wgetch_events=$enableval
13636 else
13637   with_wgetch_events=no
13638 fi;
13639 echo "$as_me:13639: result: $with_wgetch_events" >&5
13640 echo "${ECHO_T}$with_wgetch_events" >&6
13641 test "x$with_wgetch_events" = xyes &&
13642 cat >>confdefs.h <<\EOF
13643 #define NCURSES_WGETCH_EVENTS 1
13644 EOF
13645
13646 ###############################################################################
13647
13648 ###     use option --disable-echo to suppress full display compiling commands
13649
13650 echo "$as_me:13650: checking if you want to see long compiling messages" >&5
13651 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13652
13653 # Check whether --enable-echo or --disable-echo was given.
13654 if test "${enable_echo+set}" = set; then
13655   enableval="$enable_echo"
13656   test "$enableval" != no && enableval=yes
13657         if test "$enableval" != "yes" ; then
13658
13659         ECHO_LT='--silent'
13660         ECHO_LD='@echo linking $@;'
13661         RULE_CC='@echo compiling $<'
13662         SHOW_CC='@echo compiling $@'
13663         ECHO_CC='@'
13664
13665         else
13666
13667         ECHO_LT=''
13668         ECHO_LD=''
13669         RULE_CC=''
13670         SHOW_CC=''
13671         ECHO_CC=''
13672
13673         fi
13674 else
13675   enableval=yes
13676
13677         ECHO_LT=''
13678         ECHO_LD=''
13679         RULE_CC=''
13680         SHOW_CC=''
13681         ECHO_CC=''
13682
13683 fi;
13684 echo "$as_me:13684: result: $enableval" >&5
13685 echo "${ECHO_T}$enableval" >&6
13686
13687 if test "x$enable_echo" = xyes; then
13688         ECHO_LINK=
13689 else
13690         ECHO_LINK='@ echo linking $@ ... ;'
13691         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13692         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13693 fi
13694
13695 # --disable-stripping is used for debugging
13696
13697 echo "$as_me:13697: checking if you want to install stripped executables" >&5
13698 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
13699
13700 # Check whether --enable-stripping or --disable-stripping was given.
13701 if test "${enable_stripping+set}" = set; then
13702   enableval="$enable_stripping"
13703   test "$enableval" != no && enableval=yes
13704         if test "$enableval" != "yes" ; then
13705     with_stripping=no
13706         else
13707                 with_stripping=yes
13708         fi
13709 else
13710   enableval=yes
13711         with_stripping=yes
13712
13713 fi;
13714 echo "$as_me:13714: result: $with_stripping" >&5
13715 echo "${ECHO_T}$with_stripping" >&6
13716
13717 if test "$with_stripping" = yes
13718 then
13719         INSTALL_OPT_S="-s"
13720 else
13721         INSTALL_OPT_S=
13722 fi
13723
13724 echo "$as_me:13724: checking if install needs to be told about ownership" >&5
13725 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
13726 case `$ac_config_guess` in
13727 (*minix)
13728         with_install_o=yes
13729         ;;
13730 (*)
13731         with_install_o=no
13732         ;;
13733 esac
13734
13735 echo "$as_me:13735: result: $with_install_o" >&5
13736 echo "${ECHO_T}$with_install_o" >&6
13737 if test "x$with_install_o" = xyes
13738 then
13739         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'`
13740 else
13741         INSTALL_OPT_O=
13742 fi
13743
13744 ###     use option --enable-warnings to turn on all gcc warnings
13745 echo "$as_me:13745: checking if you want to see compiler warnings" >&5
13746 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13747
13748 # Check whether --enable-warnings or --disable-warnings was given.
13749 if test "${enable_warnings+set}" = set; then
13750   enableval="$enable_warnings"
13751   with_warnings=$enableval
13752 fi;
13753 echo "$as_me:13753: result: $with_warnings" >&5
13754 echo "${ECHO_T}$with_warnings" >&6
13755
13756 if test "x$with_warnings" = "xyes"; then
13757
13758         ADAFLAGS="$ADAFLAGS -gnatg"
13759
13760 INTEL_COMPILER=no
13761
13762 if test "$GCC" = yes ; then
13763         case $host_os in
13764         (linux*|gnu*)
13765                 echo "$as_me:13765: checking if this is really Intel C compiler" >&5
13766 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13767                 cf_save_CFLAGS="$CFLAGS"
13768                 CFLAGS="$CFLAGS -no-gcc"
13769                 cat >conftest.$ac_ext <<_ACEOF
13770 #line 13770 "configure"
13771 #include "confdefs.h"
13772
13773 int
13774 main (void)
13775 {
13776
13777 #ifdef __INTEL_COMPILER
13778 #else
13779 make an error
13780 #endif
13781
13782   ;
13783   return 0;
13784 }
13785 _ACEOF
13786 rm -f conftest.$ac_objext
13787 if { (eval echo "$as_me:13787: \"$ac_compile\"") >&5
13788   (eval $ac_compile) 2>&5
13789   ac_status=$?
13790   echo "$as_me:13790: \$? = $ac_status" >&5
13791   (exit $ac_status); } &&
13792          { ac_try='test -s conftest.$ac_objext'
13793   { (eval echo "$as_me:13793: \"$ac_try\"") >&5
13794   (eval $ac_try) 2>&5
13795   ac_status=$?
13796   echo "$as_me:13796: \$? = $ac_status" >&5
13797   (exit $ac_status); }; }; then
13798   INTEL_COMPILER=yes
13799 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13800
13801 else
13802   echo "$as_me: failed program was:" >&5
13803 cat conftest.$ac_ext >&5
13804 fi
13805 rm -f conftest.$ac_objext conftest.$ac_ext
13806                 CFLAGS="$cf_save_CFLAGS"
13807                 echo "$as_me:13807: result: $INTEL_COMPILER" >&5
13808 echo "${ECHO_T}$INTEL_COMPILER" >&6
13809                 ;;
13810         esac
13811 fi
13812
13813 CLANG_COMPILER=no
13814
13815 if test "$GCC" = yes ; then
13816         echo "$as_me:13816: checking if this is really Clang C compiler" >&5
13817 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13818         cf_save_CFLAGS="$CFLAGS"
13819         CFLAGS="$CFLAGS -Qunused-arguments"
13820         cat >conftest.$ac_ext <<_ACEOF
13821 #line 13821 "configure"
13822 #include "confdefs.h"
13823
13824 int
13825 main (void)
13826 {
13827
13828 #ifdef __clang__
13829 #else
13830 make an error
13831 #endif
13832
13833   ;
13834   return 0;
13835 }
13836 _ACEOF
13837 rm -f conftest.$ac_objext
13838 if { (eval echo "$as_me:13838: \"$ac_compile\"") >&5
13839   (eval $ac_compile) 2>&5
13840   ac_status=$?
13841   echo "$as_me:13841: \$? = $ac_status" >&5
13842   (exit $ac_status); } &&
13843          { ac_try='test -s conftest.$ac_objext'
13844   { (eval echo "$as_me:13844: \"$ac_try\"") >&5
13845   (eval $ac_try) 2>&5
13846   ac_status=$?
13847   echo "$as_me:13847: \$? = $ac_status" >&5
13848   (exit $ac_status); }; }; then
13849   CLANG_COMPILER=yes
13850 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13851
13852 else
13853   echo "$as_me: failed program was:" >&5
13854 cat conftest.$ac_ext >&5
13855 fi
13856 rm -f conftest.$ac_objext conftest.$ac_ext
13857         CFLAGS="$cf_save_CFLAGS"
13858         echo "$as_me:13858: result: $CLANG_COMPILER" >&5
13859 echo "${ECHO_T}$CLANG_COMPILER" >&6
13860 fi
13861
13862 cat > conftest.$ac_ext <<EOF
13863 #line 13863 "${as_me:-configure}"
13864 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13865 EOF
13866
13867 if test "$INTEL_COMPILER" = yes
13868 then
13869 # The "-wdXXX" options suppress warnings:
13870 # remark #1419: external declaration in primary source file
13871 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13872 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13873 # remark #193: zero used for undefined preprocessing identifier
13874 # remark #593: variable "curs_sb_left_arrow" was set but never used
13875 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13876 # remark #869: parameter "tw" was never referenced
13877 # remark #981: operands are evaluated in unspecified order
13878 # warning #279: controlling expression is constant
13879
13880         { echo "$as_me:13880: checking for $CC warning options..." >&5
13881 echo "$as_me: checking for $CC warning options..." >&6;}
13882         cf_save_CFLAGS="$CFLAGS"
13883         EXTRA_CFLAGS="-Wall"
13884         for cf_opt in \
13885                 wd1419 \
13886                 wd1683 \
13887                 wd1684 \
13888                 wd193 \
13889                 wd593 \
13890                 wd279 \
13891                 wd810 \
13892                 wd869 \
13893                 wd981
13894         do
13895                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13896                 if { (eval echo "$as_me:13896: \"$ac_compile\"") >&5
13897   (eval $ac_compile) 2>&5
13898   ac_status=$?
13899   echo "$as_me:13899: \$? = $ac_status" >&5
13900   (exit $ac_status); }; then
13901                         test -n "$verbose" && echo "$as_me:13901: result: ... -$cf_opt" >&5
13902 echo "${ECHO_T}... -$cf_opt" >&6
13903                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13904                 fi
13905         done
13906         CFLAGS="$cf_save_CFLAGS"
13907
13908 elif test "$GCC" = yes
13909 then
13910         { echo "$as_me:13910: checking for $CC warning options..." >&5
13911 echo "$as_me: checking for $CC warning options..." >&6;}
13912         cf_save_CFLAGS="$CFLAGS"
13913         EXTRA_CFLAGS=
13914         cf_warn_CONST=""
13915         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13916         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13917         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13918         for cf_opt in W Wall \
13919                 Wbad-function-cast \
13920                 Wcast-align \
13921                 Wcast-qual \
13922                 Wdeclaration-after-statement \
13923                 Wextra \
13924                 Winline \
13925                 Wmissing-declarations \
13926                 Wmissing-prototypes \
13927                 Wnested-externs \
13928                 Wpointer-arith \
13929                 Wshadow \
13930                 Wstrict-prototypes \
13931                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13932         do
13933                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13934                 if { (eval echo "$as_me:13934: \"$ac_compile\"") >&5
13935   (eval $ac_compile) 2>&5
13936   ac_status=$?
13937   echo "$as_me:13937: \$? = $ac_status" >&5
13938   (exit $ac_status); }; then
13939                         test -n "$verbose" && echo "$as_me:13939: result: ... -$cf_opt" >&5
13940 echo "${ECHO_T}... -$cf_opt" >&6
13941                         case $cf_opt in
13942                         (Wcast-qual)
13943                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13944                                 ;;
13945                         (Winline)
13946                                 case $GCC_VERSION in
13947                                 ([34].*)
13948                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13949
13950 echo "${as_me:-configure}:13950: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13951
13952                                         continue;;
13953                                 esac
13954                                 ;;
13955                         (Wpointer-arith)
13956                                 case $GCC_VERSION in
13957                                 ([12].*)
13958                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13959
13960 echo "${as_me:-configure}:13960: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13961
13962                                         continue;;
13963                                 esac
13964                                 ;;
13965                         esac
13966                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13967                 fi
13968         done
13969         CFLAGS="$cf_save_CFLAGS"
13970 fi
13971 rm -rf conftest*
13972
13973         if test "x$cf_with_cxx" = xyes ; then
13974
13975 INTEL_CPLUSPLUS=no
13976
13977 if test "$GCC" = yes ; then
13978         case $host_os in
13979         (linux*|gnu*)
13980                 echo "$as_me:13980: checking if this is really Intel C++ compiler" >&5
13981 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13982                 cf_save_CFLAGS="$CXXFLAGS"
13983                 CXXFLAGS="$CXXFLAGS -no-gcc"
13984                 cat >conftest.$ac_ext <<_ACEOF
13985 #line 13985 "configure"
13986 #include "confdefs.h"
13987
13988 int
13989 main (void)
13990 {
13991
13992 #ifdef __INTEL_COMPILER
13993 #else
13994 make an error
13995 #endif
13996
13997   ;
13998   return 0;
13999 }
14000 _ACEOF
14001 rm -f conftest.$ac_objext
14002 if { (eval echo "$as_me:14002: \"$ac_compile\"") >&5
14003   (eval $ac_compile) 2>&5
14004   ac_status=$?
14005   echo "$as_me:14005: \$? = $ac_status" >&5
14006   (exit $ac_status); } &&
14007          { ac_try='test -s conftest.$ac_objext'
14008   { (eval echo "$as_me:14008: \"$ac_try\"") >&5
14009   (eval $ac_try) 2>&5
14010   ac_status=$?
14011   echo "$as_me:14011: \$? = $ac_status" >&5
14012   (exit $ac_status); }; }; then
14013   INTEL_CPLUSPLUS=yes
14014 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14015
14016 else
14017   echo "$as_me: failed program was:" >&5
14018 cat conftest.$ac_ext >&5
14019 fi
14020 rm -f conftest.$ac_objext conftest.$ac_ext
14021                 CXXFLAGS="$cf_save_CFLAGS"
14022                 echo "$as_me:14022: result: $INTEL_CPLUSPLUS" >&5
14023 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
14024                 ;;
14025         esac
14026 fi
14027
14028 CLANG_CPLUSPLUS=no
14029
14030 if test "$GCC" = yes ; then
14031         echo "$as_me:14031: checking if this is really Clang C++ compiler" >&5
14032 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
14033         cf_save_CFLAGS="$CXXFLAGS"
14034         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
14035         cat >conftest.$ac_ext <<_ACEOF
14036 #line 14036 "configure"
14037 #include "confdefs.h"
14038
14039 int
14040 main (void)
14041 {
14042
14043 #ifdef __clang__
14044 #else
14045 make an error
14046 #endif
14047
14048   ;
14049   return 0;
14050 }
14051 _ACEOF
14052 rm -f conftest.$ac_objext
14053 if { (eval echo "$as_me:14053: \"$ac_compile\"") >&5
14054   (eval $ac_compile) 2>&5
14055   ac_status=$?
14056   echo "$as_me:14056: \$? = $ac_status" >&5
14057   (exit $ac_status); } &&
14058          { ac_try='test -s conftest.$ac_objext'
14059   { (eval echo "$as_me:14059: \"$ac_try\"") >&5
14060   (eval $ac_try) 2>&5
14061   ac_status=$?
14062   echo "$as_me:14062: \$? = $ac_status" >&5
14063   (exit $ac_status); }; }; then
14064   CLANG_CPLUSPLUS=yes
14065 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14066
14067 else
14068   echo "$as_me: failed program was:" >&5
14069 cat conftest.$ac_ext >&5
14070 fi
14071 rm -f conftest.$ac_objext conftest.$ac_ext
14072         CXXFLAGS="$cf_save_CFLAGS"
14073         echo "$as_me:14073: result: $CLANG_CPLUSPLUS" >&5
14074 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
14075 fi
14076
14077 ac_ext=cc
14078 ac_cpp='$CXXCPP $CPPFLAGS'
14079 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14080 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14081 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14082 ac_main_return=return
14083
14084 cat > conftest.$ac_ext <<EOF
14085 #line 14085 "configure"
14086 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14087 EOF
14088
14089 if test "$INTEL_CPLUSPLUS" = yes
14090 then
14091 # The "-wdXXX" options suppress warnings:
14092 # remark #1419: external declaration in primary source file
14093 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14094 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14095 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14096 # remark #193: zero used for undefined preprocessing identifier
14097 # remark #593: variable "curs_sb_left_arrow" was set but never used
14098 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14099 # remark #869: parameter "tw" was never referenced
14100 # remark #981: operands are evaluated in unspecified order
14101 # warning #269: invalid format string conversion
14102
14103         { echo "$as_me:14103: checking for $CC warning options..." >&5
14104 echo "$as_me: checking for $CC warning options..." >&6;}
14105         cf_save_CXXFLAGS="$CXXFLAGS"
14106         EXTRA_CXXFLAGS="-Wall"
14107         for cf_opt in \
14108                 wd1419 \
14109                 wd1682 \
14110                 wd1683 \
14111                 wd1684 \
14112                 wd193 \
14113                 wd279 \
14114                 wd593 \
14115                 wd810 \
14116                 wd869 \
14117                 wd981
14118         do
14119                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
14120                 if { (eval echo "$as_me:14120: \"$ac_compile\"") >&5
14121   (eval $ac_compile) 2>&5
14122   ac_status=$?
14123   echo "$as_me:14123: \$? = $ac_status" >&5
14124   (exit $ac_status); }; then
14125                         test -n "$verbose" && echo "$as_me:14125: result: ... -$cf_opt" >&5
14126 echo "${ECHO_T}... -$cf_opt" >&6
14127                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14128                 fi
14129         done
14130         CXXFLAGS="$cf_save_CXXFLAGS"
14131
14132 elif test "$GXX" = yes
14133 then
14134         { echo "$as_me:14134: checking for $CXX warning options..." >&5
14135 echo "$as_me: checking for $CXX warning options..." >&6;}
14136         cf_save_CXXFLAGS="$CXXFLAGS"
14137         EXTRA_CXXFLAGS="-W -Wall"
14138         cf_gxx_extra_warnings=""
14139         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
14140         case "$GCC_VERSION" in
14141         ([1-2].*)
14142                 ;;
14143         (*)
14144                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
14145                 ;;
14146         esac
14147         for cf_opt in \
14148                 Wabi \
14149                 fabi-version=0 \
14150                 Wextra \
14151                 Wignored-qualifiers \
14152                 Wlogical-op \
14153                 Woverloaded-virtual \
14154                 Wsign-promo \
14155                 Wsynth \
14156                 Wold-style-cast \
14157                 Wcast-align \
14158                 Wcast-qual \
14159                 Wpointer-arith \
14160                 Wshadow \
14161                 Wundef $cf_gxx_extra_warnings Wno-unused
14162         do
14163                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14164                 if { (eval echo "$as_me:14164: \"$ac_compile\"") >&5
14165   (eval $ac_compile) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit $ac_status); }; then
14169                         test -n "$verbose" && echo "$as_me:14169: result: ... -$cf_opt" >&5
14170 echo "${ECHO_T}... -$cf_opt" >&6
14171                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14172                 else
14173                         test -n "$verbose" && echo "$as_me:14173: result: ... no -$cf_opt" >&5
14174 echo "${ECHO_T}... no -$cf_opt" >&6
14175                 fi
14176         done
14177         CXXFLAGS="$cf_save_CXXFLAGS"
14178 fi
14179
14180 rm -rf conftest*
14181 ac_ext=c
14182 ac_cpp='$CPP $CPPFLAGS'
14183 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14184 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14185 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14186 ac_main_return=return
14187
14188         fi
14189 fi
14190
14191 if test "$GCC" = yes
14192 then
14193 cat > conftest.i <<EOF
14194 #ifndef GCC_PRINTF
14195 #define GCC_PRINTF 0
14196 #endif
14197 #ifndef GCC_SCANF
14198 #define GCC_SCANF 0
14199 #endif
14200 #ifndef GCC_NORETURN
14201 #define GCC_NORETURN /* nothing */
14202 #endif
14203 #ifndef GCC_UNUSED
14204 #define GCC_UNUSED /* nothing */
14205 #endif
14206 EOF
14207 if test "$GCC" = yes
14208 then
14209         { echo "$as_me:14209: checking for $CC __attribute__ directives..." >&5
14210 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14211 cat > conftest.$ac_ext <<EOF
14212 #line 14212 "${as_me:-configure}"
14213 #include "confdefs.h"
14214 #include "conftest.h"
14215 #include "conftest.i"
14216 #if     GCC_PRINTF
14217 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14218 #else
14219 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14220 #endif
14221 #if     GCC_SCANF
14222 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14223 #else
14224 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14225 #endif
14226 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14227 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14228 extern void foo(void) GCC_NORETURN;
14229 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14230 EOF
14231         cf_printf_attribute=no
14232         cf_scanf_attribute=no
14233         for cf_attribute in scanf printf unused noreturn
14234         do
14235
14236 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14237
14238                 cf_directive="__attribute__(($cf_attribute))"
14239                 echo "checking for $CC $cf_directive" 1>&5
14240
14241                 case $cf_attribute in
14242                 (printf)
14243                         cf_printf_attribute=yes
14244                         cat >conftest.h <<EOF
14245 #define GCC_$cf_ATTRIBUTE 1
14246 EOF
14247                         ;;
14248                 (scanf)
14249                         cf_scanf_attribute=yes
14250                         cat >conftest.h <<EOF
14251 #define GCC_$cf_ATTRIBUTE 1
14252 EOF
14253                         ;;
14254                 (*)
14255                         cat >conftest.h <<EOF
14256 #define GCC_$cf_ATTRIBUTE $cf_directive
14257 EOF
14258                         ;;
14259                 esac
14260
14261                 if { (eval echo "$as_me:14261: \"$ac_compile\"") >&5
14262   (eval $ac_compile) 2>&5
14263   ac_status=$?
14264   echo "$as_me:14264: \$? = $ac_status" >&5
14265   (exit $ac_status); }; then
14266                         test -n "$verbose" && echo "$as_me:14266: result: ... $cf_attribute" >&5
14267 echo "${ECHO_T}... $cf_attribute" >&6
14268                         cat conftest.h >>confdefs.h
14269                         case $cf_attribute in
14270                         (noreturn)
14271
14272 cat >>confdefs.h <<EOF
14273 #define GCC_NORETURN $cf_directive
14274 EOF
14275
14276                                 ;;
14277                         (printf)
14278                                 cf_value='/* nothing */'
14279                                 if test "$cf_printf_attribute" != no ; then
14280                                         cf_value='__attribute__((format(printf,fmt,var)))'
14281
14282 cat >>confdefs.h <<\EOF
14283 #define GCC_PRINTF 1
14284 EOF
14285
14286                                 fi
14287
14288 cat >>confdefs.h <<EOF
14289 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14290 EOF
14291
14292                                 ;;
14293                         (scanf)
14294                                 cf_value='/* nothing */'
14295                                 if test "$cf_scanf_attribute" != no ; then
14296                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14297
14298 cat >>confdefs.h <<\EOF
14299 #define GCC_SCANF 1
14300 EOF
14301
14302                                 fi
14303
14304 cat >>confdefs.h <<EOF
14305 #define GCC_SCANFLIKE(fmt,var) $cf_value
14306 EOF
14307
14308                                 ;;
14309                         (unused)
14310
14311 cat >>confdefs.h <<EOF
14312 #define GCC_UNUSED $cf_directive
14313 EOF
14314
14315                                 ;;
14316                         esac
14317                 fi
14318         done
14319 else
14320         fgrep define conftest.i >>confdefs.h
14321 fi
14322 rm -rf conftest*
14323 fi
14324
14325 echo "$as_me:14325: checking if you want to work around bogus compiler/loader warnings" >&5
14326 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14327
14328 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14329 if test "${enable_string_hacks+set}" = set; then
14330   enableval="$enable_string_hacks"
14331   with_string_hacks=$enableval
14332 else
14333   with_string_hacks=no
14334 fi;
14335 echo "$as_me:14335: result: $with_string_hacks" >&5
14336 echo "${ECHO_T}$with_string_hacks" >&6
14337
14338 if test "x$with_string_hacks" = "xyes"; then
14339
14340 cat >>confdefs.h <<\EOF
14341 #define USE_STRING_HACKS 1
14342 EOF
14343
14344         { echo "$as_me:14344: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14345 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14346         echo "$as_me:14346: checking for strlcat" >&5
14347 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14348 if test "${ac_cv_func_strlcat+set}" = set; then
14349   echo $ECHO_N "(cached) $ECHO_C" >&6
14350 else
14351   cat >conftest.$ac_ext <<_ACEOF
14352 #line 14352 "configure"
14353 #include "confdefs.h"
14354 /* System header to define __stub macros and hopefully few prototypes,
14355     which can conflict with char strlcat (); below.  */
14356 #include <assert.h>
14357 /* Override any gcc2 internal prototype to avoid an error.  */
14358 #ifdef __cplusplus
14359 extern "C"
14360 #endif
14361 /* We use char because int might match the return type of a gcc2
14362    builtin and then its argument prototype would still apply.  */
14363 char strlcat ();
14364 char (*f) ();
14365
14366 int
14367 main (void)
14368 {
14369 /* The GNU C library defines this for functions which it implements
14370     to always fail with ENOSYS.  Some functions are actually named
14371     something starting with __ and the normal name is an alias.  */
14372 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14373 choke me
14374 #else
14375 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14376 #endif
14377
14378   ;
14379   return 0;
14380 }
14381 _ACEOF
14382 rm -f conftest.$ac_objext conftest$ac_exeext
14383 if { (eval echo "$as_me:14383: \"$ac_link\"") >&5
14384   (eval $ac_link) 2>&5
14385   ac_status=$?
14386   echo "$as_me:14386: \$? = $ac_status" >&5
14387   (exit $ac_status); } &&
14388          { ac_try='test -s conftest$ac_exeext'
14389   { (eval echo "$as_me:14389: \"$ac_try\"") >&5
14390   (eval $ac_try) 2>&5
14391   ac_status=$?
14392   echo "$as_me:14392: \$? = $ac_status" >&5
14393   (exit $ac_status); }; }; then
14394   ac_cv_func_strlcat=yes
14395 else
14396   echo "$as_me: failed program was:" >&5
14397 cat conftest.$ac_ext >&5
14398 ac_cv_func_strlcat=no
14399 fi
14400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14401 fi
14402 echo "$as_me:14402: result: $ac_cv_func_strlcat" >&5
14403 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14404 if test $ac_cv_func_strlcat = yes; then
14405
14406 cat >>confdefs.h <<\EOF
14407 #define HAVE_STRLCAT 1
14408 EOF
14409
14410 else
14411
14412                 echo "$as_me:14412: checking for strlcat in -lbsd" >&5
14413 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14414 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14415   echo $ECHO_N "(cached) $ECHO_C" >&6
14416 else
14417   ac_check_lib_save_LIBS=$LIBS
14418 LIBS="-lbsd  $LIBS"
14419 cat >conftest.$ac_ext <<_ACEOF
14420 #line 14420 "configure"
14421 #include "confdefs.h"
14422
14423 /* Override any gcc2 internal prototype to avoid an error.  */
14424 #ifdef __cplusplus
14425 extern "C"
14426 #endif
14427 /* We use char because int might match the return type of a gcc2
14428    builtin and then its argument prototype would still apply.  */
14429 char strlcat ();
14430 int
14431 main (void)
14432 {
14433 strlcat ();
14434   ;
14435   return 0;
14436 }
14437 _ACEOF
14438 rm -f conftest.$ac_objext conftest$ac_exeext
14439 if { (eval echo "$as_me:14439: \"$ac_link\"") >&5
14440   (eval $ac_link) 2>&5
14441   ac_status=$?
14442   echo "$as_me:14442: \$? = $ac_status" >&5
14443   (exit $ac_status); } &&
14444          { ac_try='test -s conftest$ac_exeext'
14445   { (eval echo "$as_me:14445: \"$ac_try\"") >&5
14446   (eval $ac_try) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); }; }; then
14450   ac_cv_lib_bsd_strlcat=yes
14451 else
14452   echo "$as_me: failed program was:" >&5
14453 cat conftest.$ac_ext >&5
14454 ac_cv_lib_bsd_strlcat=no
14455 fi
14456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14457 LIBS=$ac_check_lib_save_LIBS
14458 fi
14459 echo "$as_me:14459: result: $ac_cv_lib_bsd_strlcat" >&5
14460 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14461 if test $ac_cv_lib_bsd_strlcat = yes; then
14462
14463 cf_add_libs="-lbsd"
14464 # Filter out duplicates - this happens with badly-designed ".pc" files...
14465 for cf_add_1lib in $LIBS
14466 do
14467         for cf_add_2lib in $cf_add_libs
14468         do
14469                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14470                 then
14471                         cf_add_1lib=
14472                         break
14473                 fi
14474         done
14475         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14476 done
14477 LIBS="$cf_add_libs"
14478
14479 for ac_header in bsd/string.h
14480 do
14481 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14482 echo "$as_me:14482: checking for $ac_header" >&5
14483 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14484 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14485   echo $ECHO_N "(cached) $ECHO_C" >&6
14486 else
14487   cat >conftest.$ac_ext <<_ACEOF
14488 #line 14488 "configure"
14489 #include "confdefs.h"
14490 #include <$ac_header>
14491 _ACEOF
14492 if { (eval echo "$as_me:14492: \"$ac_cpp conftest.$ac_ext\"") >&5
14493   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14494   ac_status=$?
14495   egrep -v '^ *\+' conftest.er1 >conftest.err
14496   rm -f conftest.er1
14497   cat conftest.err >&5
14498   echo "$as_me:14498: \$? = $ac_status" >&5
14499   (exit $ac_status); } >/dev/null; then
14500   if test -s conftest.err; then
14501     ac_cpp_err=$ac_c_preproc_warn_flag
14502   else
14503     ac_cpp_err=
14504   fi
14505 else
14506   ac_cpp_err=yes
14507 fi
14508 if test -z "$ac_cpp_err"; then
14509   eval "$as_ac_Header=yes"
14510 else
14511   echo "$as_me: failed program was:" >&5
14512   cat conftest.$ac_ext >&5
14513   eval "$as_ac_Header=no"
14514 fi
14515 rm -f conftest.err conftest.$ac_ext
14516 fi
14517 echo "$as_me:14517: result: `eval echo '${'$as_ac_Header'}'`" >&5
14518 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14519 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14520   cat >>confdefs.h <<EOF
14521 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14522 EOF
14523
14524 fi
14525 done
14526
14527 cat >>confdefs.h <<\EOF
14528 #define HAVE_STRLCAT 1
14529 EOF
14530
14531 fi
14532
14533 fi
14534
14535 for ac_func in strlcpy snprintf
14536 do
14537 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14538 echo "$as_me:14538: checking for $ac_func" >&5
14539 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14540 if eval "test \"\${$as_ac_var+set}\" = set"; then
14541   echo $ECHO_N "(cached) $ECHO_C" >&6
14542 else
14543   cat >conftest.$ac_ext <<_ACEOF
14544 #line 14544 "configure"
14545 #include "confdefs.h"
14546 /* System header to define __stub macros and hopefully few prototypes,
14547     which can conflict with char $ac_func (); below.  */
14548 #include <assert.h>
14549 /* Override any gcc2 internal prototype to avoid an error.  */
14550 #ifdef __cplusplus
14551 extern "C"
14552 #endif
14553 /* We use char because int might match the return type of a gcc2
14554    builtin and then its argument prototype would still apply.  */
14555 char $ac_func ();
14556 char (*f) ();
14557
14558 int
14559 main (void)
14560 {
14561 /* The GNU C library defines this for functions which it implements
14562     to always fail with ENOSYS.  Some functions are actually named
14563     something starting with __ and the normal name is an alias.  */
14564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14565 choke me
14566 #else
14567 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14568 #endif
14569
14570   ;
14571   return 0;
14572 }
14573 _ACEOF
14574 rm -f conftest.$ac_objext conftest$ac_exeext
14575 if { (eval echo "$as_me:14575: \"$ac_link\"") >&5
14576   (eval $ac_link) 2>&5
14577   ac_status=$?
14578   echo "$as_me:14578: \$? = $ac_status" >&5
14579   (exit $ac_status); } &&
14580          { ac_try='test -s conftest$ac_exeext'
14581   { (eval echo "$as_me:14581: \"$ac_try\"") >&5
14582   (eval $ac_try) 2>&5
14583   ac_status=$?
14584   echo "$as_me:14584: \$? = $ac_status" >&5
14585   (exit $ac_status); }; }; then
14586   eval "$as_ac_var=yes"
14587 else
14588   echo "$as_me: failed program was:" >&5
14589 cat conftest.$ac_ext >&5
14590 eval "$as_ac_var=no"
14591 fi
14592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14593 fi
14594 echo "$as_me:14594: result: `eval echo '${'$as_ac_var'}'`" >&5
14595 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14596 if test `eval echo '${'$as_ac_var'}'` = yes; then
14597   cat >>confdefs.h <<EOF
14598 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14599 EOF
14600
14601 fi
14602 done
14603
14604 fi
14605
14606 ###     use option --enable-assertions to turn on generation of assertion code
14607 echo "$as_me:14607: checking if you want to enable runtime assertions" >&5
14608 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14609
14610 # Check whether --enable-assertions or --disable-assertions was given.
14611 if test "${enable_assertions+set}" = set; then
14612   enableval="$enable_assertions"
14613   with_assertions=$enableval
14614 else
14615   with_assertions=no
14616 fi;
14617 echo "$as_me:14617: result: $with_assertions" >&5
14618 echo "${ECHO_T}$with_assertions" >&6
14619 if test -n "$GCC"
14620 then
14621         if test "$with_assertions" = no
14622         then
14623                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14624         else
14625
14626         ADAFLAGS="$ADAFLAGS -gnata"
14627
14628         fi
14629 fi
14630
14631 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14632
14633 echo "$as_me:14633: checking if you want to use dmalloc for testing" >&5
14634 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14635
14636 # Check whether --with-dmalloc or --without-dmalloc was given.
14637 if test "${with_dmalloc+set}" = set; then
14638   withval="$with_dmalloc"
14639
14640 cat >>confdefs.h <<EOF
14641 #define USE_DMALLOC 1
14642 EOF
14643
14644         : ${with_cflags:=-g}
14645         : ${with_no_leaks:=yes}
14646          with_dmalloc=yes
14647 else
14648   with_dmalloc=
14649 fi;
14650 echo "$as_me:14650: result: ${with_dmalloc:-no}" >&5
14651 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14652
14653 case .$with_cflags in
14654 (.*-g*)
14655         case .$CFLAGS in
14656         (.*-g*)
14657                 ;;
14658         (*)
14659
14660 cf_fix_cppflags=no
14661 cf_new_cflags=
14662 cf_new_cppflags=
14663 cf_new_extra_cppflags=
14664
14665 for cf_add_cflags in -g
14666 do
14667 case $cf_fix_cppflags in
14668 (no)
14669         case $cf_add_cflags in
14670         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14671                 case $cf_add_cflags in
14672                 (-D*)
14673                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14674
14675                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14676                                 && test -z "${cf_tst_cflags}" \
14677                                 && cf_fix_cppflags=yes
14678
14679                         if test $cf_fix_cppflags = yes ; then
14680
14681         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14682         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14683
14684                                 continue
14685                         elif test "${cf_tst_cflags}" = "\"'" ; then
14686
14687         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14688         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14689
14690                                 continue
14691                         fi
14692                         ;;
14693                 esac
14694                 case "$CPPFLAGS" in
14695                 (*$cf_add_cflags)
14696                         ;;
14697                 (*)
14698                         case $cf_add_cflags in
14699                         (-D*)
14700                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14701
14702 CPPFLAGS=`echo "$CPPFLAGS" | \
14703         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14704                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14705
14706                                 ;;
14707                         esac
14708
14709         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14710         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14711
14712                         ;;
14713                 esac
14714                 ;;
14715         (*)
14716
14717         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14718         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14719
14720                 ;;
14721         esac
14722         ;;
14723 (yes)
14724
14725         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14726         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14727
14728         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14729
14730         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14731                 && test -z "${cf_tst_cflags}" \
14732                 && cf_fix_cppflags=no
14733         ;;
14734 esac
14735 done
14736
14737 if test -n "$cf_new_cflags" ; then
14738
14739         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14740         CFLAGS="${CFLAGS}$cf_new_cflags"
14741
14742 fi
14743
14744 if test -n "$cf_new_cppflags" ; then
14745
14746         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14747         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14748
14749 fi
14750
14751 if test -n "$cf_new_extra_cppflags" ; then
14752
14753         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14754         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14755
14756 fi
14757
14758                 ;;
14759         esac
14760         ;;
14761 esac
14762
14763 if test "$with_dmalloc" = yes ; then
14764         echo "$as_me:14764: checking for dmalloc.h" >&5
14765 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14766 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14767   echo $ECHO_N "(cached) $ECHO_C" >&6
14768 else
14769   cat >conftest.$ac_ext <<_ACEOF
14770 #line 14770 "configure"
14771 #include "confdefs.h"
14772 #include <dmalloc.h>
14773 _ACEOF
14774 if { (eval echo "$as_me:14774: \"$ac_cpp conftest.$ac_ext\"") >&5
14775   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14776   ac_status=$?
14777   egrep -v '^ *\+' conftest.er1 >conftest.err
14778   rm -f conftest.er1
14779   cat conftest.err >&5
14780   echo "$as_me:14780: \$? = $ac_status" >&5
14781   (exit $ac_status); } >/dev/null; then
14782   if test -s conftest.err; then
14783     ac_cpp_err=$ac_c_preproc_warn_flag
14784   else
14785     ac_cpp_err=
14786   fi
14787 else
14788   ac_cpp_err=yes
14789 fi
14790 if test -z "$ac_cpp_err"; then
14791   ac_cv_header_dmalloc_h=yes
14792 else
14793   echo "$as_me: failed program was:" >&5
14794   cat conftest.$ac_ext >&5
14795   ac_cv_header_dmalloc_h=no
14796 fi
14797 rm -f conftest.err conftest.$ac_ext
14798 fi
14799 echo "$as_me:14799: result: $ac_cv_header_dmalloc_h" >&5
14800 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14801 if test $ac_cv_header_dmalloc_h = yes; then
14802
14803 echo "$as_me:14803: checking for dmalloc_debug in -ldmalloc" >&5
14804 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14805 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14806   echo $ECHO_N "(cached) $ECHO_C" >&6
14807 else
14808   ac_check_lib_save_LIBS=$LIBS
14809 LIBS="-ldmalloc  $LIBS"
14810 cat >conftest.$ac_ext <<_ACEOF
14811 #line 14811 "configure"
14812 #include "confdefs.h"
14813
14814 /* Override any gcc2 internal prototype to avoid an error.  */
14815 #ifdef __cplusplus
14816 extern "C"
14817 #endif
14818 /* We use char because int might match the return type of a gcc2
14819    builtin and then its argument prototype would still apply.  */
14820 char dmalloc_debug ();
14821 int
14822 main (void)
14823 {
14824 dmalloc_debug ();
14825   ;
14826   return 0;
14827 }
14828 _ACEOF
14829 rm -f conftest.$ac_objext conftest$ac_exeext
14830 if { (eval echo "$as_me:14830: \"$ac_link\"") >&5
14831   (eval $ac_link) 2>&5
14832   ac_status=$?
14833   echo "$as_me:14833: \$? = $ac_status" >&5
14834   (exit $ac_status); } &&
14835          { ac_try='test -s conftest$ac_exeext'
14836   { (eval echo "$as_me:14836: \"$ac_try\"") >&5
14837   (eval $ac_try) 2>&5
14838   ac_status=$?
14839   echo "$as_me:14839: \$? = $ac_status" >&5
14840   (exit $ac_status); }; }; then
14841   ac_cv_lib_dmalloc_dmalloc_debug=yes
14842 else
14843   echo "$as_me: failed program was:" >&5
14844 cat conftest.$ac_ext >&5
14845 ac_cv_lib_dmalloc_dmalloc_debug=no
14846 fi
14847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14848 LIBS=$ac_check_lib_save_LIBS
14849 fi
14850 echo "$as_me:14850: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14851 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14852 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14853   cat >>confdefs.h <<EOF
14854 #define HAVE_LIBDMALLOC 1
14855 EOF
14856
14857   LIBS="-ldmalloc $LIBS"
14858
14859 fi
14860
14861 fi
14862
14863 fi
14864
14865 echo "$as_me:14865: checking if you want to use dbmalloc for testing" >&5
14866 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14867
14868 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14869 if test "${with_dbmalloc+set}" = set; then
14870   withval="$with_dbmalloc"
14871
14872 cat >>confdefs.h <<EOF
14873 #define USE_DBMALLOC 1
14874 EOF
14875
14876         : ${with_cflags:=-g}
14877         : ${with_no_leaks:=yes}
14878          with_dbmalloc=yes
14879 else
14880   with_dbmalloc=
14881 fi;
14882 echo "$as_me:14882: result: ${with_dbmalloc:-no}" >&5
14883 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14884
14885 case .$with_cflags in
14886 (.*-g*)
14887         case .$CFLAGS in
14888         (.*-g*)
14889                 ;;
14890         (*)
14891
14892 cf_fix_cppflags=no
14893 cf_new_cflags=
14894 cf_new_cppflags=
14895 cf_new_extra_cppflags=
14896
14897 for cf_add_cflags in -g
14898 do
14899 case $cf_fix_cppflags in
14900 (no)
14901         case $cf_add_cflags in
14902         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14903                 case $cf_add_cflags in
14904                 (-D*)
14905                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14906
14907                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14908                                 && test -z "${cf_tst_cflags}" \
14909                                 && cf_fix_cppflags=yes
14910
14911                         if test $cf_fix_cppflags = yes ; then
14912
14913         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14914         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14915
14916                                 continue
14917                         elif test "${cf_tst_cflags}" = "\"'" ; then
14918
14919         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14920         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14921
14922                                 continue
14923                         fi
14924                         ;;
14925                 esac
14926                 case "$CPPFLAGS" in
14927                 (*$cf_add_cflags)
14928                         ;;
14929                 (*)
14930                         case $cf_add_cflags in
14931                         (-D*)
14932                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14933
14934 CPPFLAGS=`echo "$CPPFLAGS" | \
14935         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14936                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14937
14938                                 ;;
14939                         esac
14940
14941         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14942         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14943
14944                         ;;
14945                 esac
14946                 ;;
14947         (*)
14948
14949         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14950         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14951
14952                 ;;
14953         esac
14954         ;;
14955 (yes)
14956
14957         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14958         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14959
14960         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14961
14962         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14963                 && test -z "${cf_tst_cflags}" \
14964                 && cf_fix_cppflags=no
14965         ;;
14966 esac
14967 done
14968
14969 if test -n "$cf_new_cflags" ; then
14970
14971         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14972         CFLAGS="${CFLAGS}$cf_new_cflags"
14973
14974 fi
14975
14976 if test -n "$cf_new_cppflags" ; then
14977
14978         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14979         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14980
14981 fi
14982
14983 if test -n "$cf_new_extra_cppflags" ; then
14984
14985         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14986         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14987
14988 fi
14989
14990                 ;;
14991         esac
14992         ;;
14993 esac
14994
14995 if test "$with_dbmalloc" = yes ; then
14996         echo "$as_me:14996: checking for dbmalloc.h" >&5
14997 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14998 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14999   echo $ECHO_N "(cached) $ECHO_C" >&6
15000 else
15001   cat >conftest.$ac_ext <<_ACEOF
15002 #line 15002 "configure"
15003 #include "confdefs.h"
15004 #include <dbmalloc.h>
15005 _ACEOF
15006 if { (eval echo "$as_me:15006: \"$ac_cpp conftest.$ac_ext\"") >&5
15007   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15008   ac_status=$?
15009   egrep -v '^ *\+' conftest.er1 >conftest.err
15010   rm -f conftest.er1
15011   cat conftest.err >&5
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); } >/dev/null; then
15014   if test -s conftest.err; then
15015     ac_cpp_err=$ac_c_preproc_warn_flag
15016   else
15017     ac_cpp_err=
15018   fi
15019 else
15020   ac_cpp_err=yes
15021 fi
15022 if test -z "$ac_cpp_err"; then
15023   ac_cv_header_dbmalloc_h=yes
15024 else
15025   echo "$as_me: failed program was:" >&5
15026   cat conftest.$ac_ext >&5
15027   ac_cv_header_dbmalloc_h=no
15028 fi
15029 rm -f conftest.err conftest.$ac_ext
15030 fi
15031 echo "$as_me:15031: result: $ac_cv_header_dbmalloc_h" >&5
15032 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
15033 if test $ac_cv_header_dbmalloc_h = yes; then
15034
15035 echo "$as_me:15035: checking for debug_malloc in -ldbmalloc" >&5
15036 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
15037 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
15038   echo $ECHO_N "(cached) $ECHO_C" >&6
15039 else
15040   ac_check_lib_save_LIBS=$LIBS
15041 LIBS="-ldbmalloc  $LIBS"
15042 cat >conftest.$ac_ext <<_ACEOF
15043 #line 15043 "configure"
15044 #include "confdefs.h"
15045
15046 /* Override any gcc2 internal prototype to avoid an error.  */
15047 #ifdef __cplusplus
15048 extern "C"
15049 #endif
15050 /* We use char because int might match the return type of a gcc2
15051    builtin and then its argument prototype would still apply.  */
15052 char debug_malloc ();
15053 int
15054 main (void)
15055 {
15056 debug_malloc ();
15057   ;
15058   return 0;
15059 }
15060 _ACEOF
15061 rm -f conftest.$ac_objext conftest$ac_exeext
15062 if { (eval echo "$as_me:15062: \"$ac_link\"") >&5
15063   (eval $ac_link) 2>&5
15064   ac_status=$?
15065   echo "$as_me:15065: \$? = $ac_status" >&5
15066   (exit $ac_status); } &&
15067          { ac_try='test -s conftest$ac_exeext'
15068   { (eval echo "$as_me:15068: \"$ac_try\"") >&5
15069   (eval $ac_try) 2>&5
15070   ac_status=$?
15071   echo "$as_me:15071: \$? = $ac_status" >&5
15072   (exit $ac_status); }; }; then
15073   ac_cv_lib_dbmalloc_debug_malloc=yes
15074 else
15075   echo "$as_me: failed program was:" >&5
15076 cat conftest.$ac_ext >&5
15077 ac_cv_lib_dbmalloc_debug_malloc=no
15078 fi
15079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15080 LIBS=$ac_check_lib_save_LIBS
15081 fi
15082 echo "$as_me:15082: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
15083 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
15084 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
15085   cat >>confdefs.h <<EOF
15086 #define HAVE_LIBDBMALLOC 1
15087 EOF
15088
15089   LIBS="-ldbmalloc $LIBS"
15090
15091 fi
15092
15093 fi
15094
15095 fi
15096
15097 echo "$as_me:15097: checking if you want to use valgrind for testing" >&5
15098 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
15099
15100 # Check whether --with-valgrind or --without-valgrind was given.
15101 if test "${with_valgrind+set}" = set; then
15102   withval="$with_valgrind"
15103
15104 cat >>confdefs.h <<EOF
15105 #define USE_VALGRIND 1
15106 EOF
15107
15108         : ${with_cflags:=-g}
15109         : ${with_no_leaks:=yes}
15110          with_valgrind=yes
15111 else
15112   with_valgrind=
15113 fi;
15114 echo "$as_me:15114: result: ${with_valgrind:-no}" >&5
15115 echo "${ECHO_T}${with_valgrind:-no}" >&6
15116
15117 case .$with_cflags in
15118 (.*-g*)
15119         case .$CFLAGS in
15120         (.*-g*)
15121                 ;;
15122         (*)
15123
15124 cf_fix_cppflags=no
15125 cf_new_cflags=
15126 cf_new_cppflags=
15127 cf_new_extra_cppflags=
15128
15129 for cf_add_cflags in -g
15130 do
15131 case $cf_fix_cppflags in
15132 (no)
15133         case $cf_add_cflags in
15134         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15135                 case $cf_add_cflags in
15136                 (-D*)
15137                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15138
15139                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15140                                 && test -z "${cf_tst_cflags}" \
15141                                 && cf_fix_cppflags=yes
15142
15143                         if test $cf_fix_cppflags = yes ; then
15144
15145         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15146         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15147
15148                                 continue
15149                         elif test "${cf_tst_cflags}" = "\"'" ; then
15150
15151         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15152         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15153
15154                                 continue
15155                         fi
15156                         ;;
15157                 esac
15158                 case "$CPPFLAGS" in
15159                 (*$cf_add_cflags)
15160                         ;;
15161                 (*)
15162                         case $cf_add_cflags in
15163                         (-D*)
15164                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15165
15166 CPPFLAGS=`echo "$CPPFLAGS" | \
15167         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15168                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15169
15170                                 ;;
15171                         esac
15172
15173         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15174         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15175
15176                         ;;
15177                 esac
15178                 ;;
15179         (*)
15180
15181         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15182         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15183
15184                 ;;
15185         esac
15186         ;;
15187 (yes)
15188
15189         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15190         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15191
15192         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15193
15194         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15195                 && test -z "${cf_tst_cflags}" \
15196                 && cf_fix_cppflags=no
15197         ;;
15198 esac
15199 done
15200
15201 if test -n "$cf_new_cflags" ; then
15202
15203         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15204         CFLAGS="${CFLAGS}$cf_new_cflags"
15205
15206 fi
15207
15208 if test -n "$cf_new_cppflags" ; then
15209
15210         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15211         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15212
15213 fi
15214
15215 if test -n "$cf_new_extra_cppflags" ; then
15216
15217         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15218         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15219
15220 fi
15221
15222                 ;;
15223         esac
15224         ;;
15225 esac
15226
15227 echo "$as_me:15227: checking if you want to perform memory-leak testing" >&5
15228 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15229
15230 # Check whether --enable-leaks or --disable-leaks was given.
15231 if test "${enable_leaks+set}" = set; then
15232   enableval="$enable_leaks"
15233   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15234 else
15235   : ${with_no_leaks:=no}
15236 fi;
15237 echo "$as_me:15237: result: $with_no_leaks" >&5
15238 echo "${ECHO_T}$with_no_leaks" >&6
15239
15240 if test "$with_no_leaks" = yes ; then
15241
15242 cat >>confdefs.h <<\EOF
15243 #define NO_LEAKS 1
15244 EOF
15245
15246 cat >>confdefs.h <<\EOF
15247 #define YY_NO_LEAKS 1
15248 EOF
15249
15250 fi
15251
15252 cat >>confdefs.h <<\EOF
15253 #define HAVE_NC_ALLOC_H 1
15254 EOF
15255
15256 ###     use option --enable-expanded to generate certain macros as functions
15257
15258 # Check whether --enable-expanded or --disable-expanded was given.
15259 if test "${enable_expanded+set}" = set; then
15260   enableval="$enable_expanded"
15261   test "x$enableval" = xyes &&
15262 cat >>confdefs.h <<\EOF
15263 #define NCURSES_EXPANDED 1
15264 EOF
15265
15266 fi;
15267
15268 ###     use option --disable-macros to suppress macros in favor of functions
15269
15270 # Check whether --enable-macros or --disable-macros was given.
15271 if test "${enable_macros+set}" = set; then
15272   enableval="$enable_macros"
15273   test "$enableval" = no &&
15274 cat >>confdefs.h <<\EOF
15275 #define NCURSES_NOMACROS 1
15276 EOF
15277
15278 fi;
15279
15280 # Normally we only add trace() to the debug-library.  Allow this to be
15281 # extended to all models of the ncurses library:
15282 cf_all_traces=no
15283 case "$CFLAGS $CPPFLAGS" in
15284 (*-DTRACE*)
15285         cf_all_traces=yes
15286         ;;
15287 esac
15288
15289 echo "$as_me:15289: checking whether to add trace feature to all models" >&5
15290 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15291
15292 # Check whether --with-trace or --without-trace was given.
15293 if test "${with_trace+set}" = set; then
15294   withval="$with_trace"
15295   cf_with_trace=$withval
15296 else
15297   cf_with_trace=$cf_all_traces
15298 fi;
15299 echo "$as_me:15299: result: $cf_with_trace" >&5
15300 echo "${ECHO_T}$cf_with_trace" >&6
15301
15302 if test "x$cf_with_trace" = xyes ; then
15303         LIB_TRACING=all
15304         ADA_TRACE=TRUE
15305
15306 cf_fix_cppflags=no
15307 cf_new_cflags=
15308 cf_new_cppflags=
15309 cf_new_extra_cppflags=
15310
15311 for cf_add_cflags in -DTRACE
15312 do
15313 case $cf_fix_cppflags in
15314 (no)
15315         case $cf_add_cflags in
15316         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15317                 case $cf_add_cflags in
15318                 (-D*)
15319                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15320
15321                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15322                                 && test -z "${cf_tst_cflags}" \
15323                                 && cf_fix_cppflags=yes
15324
15325                         if test $cf_fix_cppflags = yes ; then
15326
15327         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15328         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15329
15330                                 continue
15331                         elif test "${cf_tst_cflags}" = "\"'" ; then
15332
15333         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15334         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15335
15336                                 continue
15337                         fi
15338                         ;;
15339                 esac
15340                 case "$CPPFLAGS" in
15341                 (*$cf_add_cflags)
15342                         ;;
15343                 (*)
15344                         case $cf_add_cflags in
15345                         (-D*)
15346                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15347
15348 CPPFLAGS=`echo "$CPPFLAGS" | \
15349         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15350                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15351
15352                                 ;;
15353                         esac
15354
15355         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15356         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15357
15358                         ;;
15359                 esac
15360                 ;;
15361         (*)
15362
15363         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15364         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15365
15366                 ;;
15367         esac
15368         ;;
15369 (yes)
15370
15371         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15372         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15373
15374         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15375
15376         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15377                 && test -z "${cf_tst_cflags}" \
15378                 && cf_fix_cppflags=no
15379         ;;
15380 esac
15381 done
15382
15383 if test -n "$cf_new_cflags" ; then
15384
15385         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15386         CFLAGS="${CFLAGS}$cf_new_cflags"
15387
15388 fi
15389
15390 if test -n "$cf_new_cppflags" ; then
15391
15392         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15393         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15394
15395 fi
15396
15397 if test -n "$cf_new_extra_cppflags" ; then
15398
15399         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15400         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15401
15402 fi
15403
15404 cat >>confdefs.h <<\EOF
15405 #define HAVE__TRACEF 1
15406 EOF
15407
15408 else
15409         LIB_TRACING=DEBUG
15410         ADA_TRACE=FALSE
15411 fi
15412
15413 echo "$as_me:15413: checking if we want to use GNAT projects" >&5
15414 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15415
15416 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15417 if test "${enable_gnat_projects+set}" = set; then
15418   enableval="$enable_gnat_projects"
15419   test "$enableval" != no && enableval=yes
15420         if test "$enableval" != "yes" ; then
15421     enable_gnat_projects=no
15422         else
15423                 enable_gnat_projects=yes
15424         fi
15425 else
15426   enableval=yes
15427         enable_gnat_projects=yes
15428
15429 fi;
15430 echo "$as_me:15430: result: $enable_gnat_projects" >&5
15431 echo "${ECHO_T}$enable_gnat_projects" >&6
15432
15433 ###     Checks for libraries.
15434 case $cf_cv_system_name in
15435 (*mingw32*|*mingw64*)
15436         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15437         LIBS=" -lpsapi $LIBS"
15438         ;;
15439 (*)
15440 echo "$as_me:15440: checking for gettimeofday" >&5
15441 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15442 if test "${ac_cv_func_gettimeofday+set}" = set; then
15443   echo $ECHO_N "(cached) $ECHO_C" >&6
15444 else
15445   cat >conftest.$ac_ext <<_ACEOF
15446 #line 15446 "configure"
15447 #include "confdefs.h"
15448 /* System header to define __stub macros and hopefully few prototypes,
15449     which can conflict with char gettimeofday (); below.  */
15450 #include <assert.h>
15451 /* Override any gcc2 internal prototype to avoid an error.  */
15452 #ifdef __cplusplus
15453 extern "C"
15454 #endif
15455 /* We use char because int might match the return type of a gcc2
15456    builtin and then its argument prototype would still apply.  */
15457 char gettimeofday ();
15458 char (*f) ();
15459
15460 int
15461 main (void)
15462 {
15463 /* The GNU C library defines this for functions which it implements
15464     to always fail with ENOSYS.  Some functions are actually named
15465     something starting with __ and the normal name is an alias.  */
15466 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15467 choke me
15468 #else
15469 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15470 #endif
15471
15472   ;
15473   return 0;
15474 }
15475 _ACEOF
15476 rm -f conftest.$ac_objext conftest$ac_exeext
15477 if { (eval echo "$as_me:15477: \"$ac_link\"") >&5
15478   (eval $ac_link) 2>&5
15479   ac_status=$?
15480   echo "$as_me:15480: \$? = $ac_status" >&5
15481   (exit $ac_status); } &&
15482          { ac_try='test -s conftest$ac_exeext'
15483   { (eval echo "$as_me:15483: \"$ac_try\"") >&5
15484   (eval $ac_try) 2>&5
15485   ac_status=$?
15486   echo "$as_me:15486: \$? = $ac_status" >&5
15487   (exit $ac_status); }; }; then
15488   ac_cv_func_gettimeofday=yes
15489 else
15490   echo "$as_me: failed program was:" >&5
15491 cat conftest.$ac_ext >&5
15492 ac_cv_func_gettimeofday=no
15493 fi
15494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15495 fi
15496 echo "$as_me:15496: result: $ac_cv_func_gettimeofday" >&5
15497 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15498 if test $ac_cv_func_gettimeofday = yes; then
15499
15500 cat >>confdefs.h <<\EOF
15501 #define HAVE_GETTIMEOFDAY 1
15502 EOF
15503
15504 else
15505
15506 echo "$as_me:15506: checking for gettimeofday in -lbsd" >&5
15507 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15508 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15509   echo $ECHO_N "(cached) $ECHO_C" >&6
15510 else
15511   ac_check_lib_save_LIBS=$LIBS
15512 LIBS="-lbsd  $LIBS"
15513 cat >conftest.$ac_ext <<_ACEOF
15514 #line 15514 "configure"
15515 #include "confdefs.h"
15516
15517 /* Override any gcc2 internal prototype to avoid an error.  */
15518 #ifdef __cplusplus
15519 extern "C"
15520 #endif
15521 /* We use char because int might match the return type of a gcc2
15522    builtin and then its argument prototype would still apply.  */
15523 char gettimeofday ();
15524 int
15525 main (void)
15526 {
15527 gettimeofday ();
15528   ;
15529   return 0;
15530 }
15531 _ACEOF
15532 rm -f conftest.$ac_objext conftest$ac_exeext
15533 if { (eval echo "$as_me:15533: \"$ac_link\"") >&5
15534   (eval $ac_link) 2>&5
15535   ac_status=$?
15536   echo "$as_me:15536: \$? = $ac_status" >&5
15537   (exit $ac_status); } &&
15538          { ac_try='test -s conftest$ac_exeext'
15539   { (eval echo "$as_me:15539: \"$ac_try\"") >&5
15540   (eval $ac_try) 2>&5
15541   ac_status=$?
15542   echo "$as_me:15542: \$? = $ac_status" >&5
15543   (exit $ac_status); }; }; then
15544   ac_cv_lib_bsd_gettimeofday=yes
15545 else
15546   echo "$as_me: failed program was:" >&5
15547 cat conftest.$ac_ext >&5
15548 ac_cv_lib_bsd_gettimeofday=no
15549 fi
15550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15551 LIBS=$ac_check_lib_save_LIBS
15552 fi
15553 echo "$as_me:15553: result: $ac_cv_lib_bsd_gettimeofday" >&5
15554 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15555 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15556
15557 cat >>confdefs.h <<\EOF
15558 #define HAVE_GETTIMEOFDAY 1
15559 EOF
15560
15561 cf_add_libs="-lbsd"
15562 # Filter out duplicates - this happens with badly-designed ".pc" files...
15563 for cf_add_1lib in $LIBS
15564 do
15565         for cf_add_2lib in $cf_add_libs
15566         do
15567                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15568                 then
15569                         cf_add_1lib=
15570                         break
15571                 fi
15572         done
15573         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15574 done
15575 LIBS="$cf_add_libs"
15576
15577 fi
15578
15579 fi
15580         ;;
15581 esac
15582
15583 echo "$as_me:15583: checking if -lm needed for math functions" >&5
15584 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15585 if test "${cf_cv_need_libm+set}" = set; then
15586   echo $ECHO_N "(cached) $ECHO_C" >&6
15587 else
15588
15589         cat >conftest.$ac_ext <<_ACEOF
15590 #line 15590 "configure"
15591 #include "confdefs.h"
15592
15593         #include <stdio.h>
15594         #include <stdlib.h>
15595         #include <math.h>
15596
15597 int
15598 main (void)
15599 {
15600 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15601   ;
15602   return 0;
15603 }
15604 _ACEOF
15605 rm -f conftest.$ac_objext conftest$ac_exeext
15606 if { (eval echo "$as_me:15606: \"$ac_link\"") >&5
15607   (eval $ac_link) 2>&5
15608   ac_status=$?
15609   echo "$as_me:15609: \$? = $ac_status" >&5
15610   (exit $ac_status); } &&
15611          { ac_try='test -s conftest$ac_exeext'
15612   { (eval echo "$as_me:15612: \"$ac_try\"") >&5
15613   (eval $ac_try) 2>&5
15614   ac_status=$?
15615   echo "$as_me:15615: \$? = $ac_status" >&5
15616   (exit $ac_status); }; }; then
15617   cf_cv_need_libm=no
15618 else
15619   echo "$as_me: failed program was:" >&5
15620 cat conftest.$ac_ext >&5
15621 cf_cv_need_libm=yes
15622 fi
15623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15624 fi
15625 echo "$as_me:15625: result: $cf_cv_need_libm" >&5
15626 echo "${ECHO_T}$cf_cv_need_libm" >&6
15627 if test "$cf_cv_need_libm" = yes
15628 then
15629 MATH_LIB=-lm
15630 fi
15631
15632 ###     Checks for header files.
15633 echo "$as_me:15633: checking for ANSI C header files" >&5
15634 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15635 if test "${ac_cv_header_stdc+set}" = set; then
15636   echo $ECHO_N "(cached) $ECHO_C" >&6
15637 else
15638   cat >conftest.$ac_ext <<_ACEOF
15639 #line 15639 "configure"
15640 #include "confdefs.h"
15641 #include <stdlib.h>
15642 #include <stdarg.h>
15643 #include <string.h>
15644 #include <float.h>
15645
15646 _ACEOF
15647 if { (eval echo "$as_me:15647: \"$ac_cpp conftest.$ac_ext\"") >&5
15648   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15649   ac_status=$?
15650   egrep -v '^ *\+' conftest.er1 >conftest.err
15651   rm -f conftest.er1
15652   cat conftest.err >&5
15653   echo "$as_me:15653: \$? = $ac_status" >&5
15654   (exit $ac_status); } >/dev/null; then
15655   if test -s conftest.err; then
15656     ac_cpp_err=$ac_c_preproc_warn_flag
15657   else
15658     ac_cpp_err=
15659   fi
15660 else
15661   ac_cpp_err=yes
15662 fi
15663 if test -z "$ac_cpp_err"; then
15664   ac_cv_header_stdc=yes
15665 else
15666   echo "$as_me: failed program was:" >&5
15667   cat conftest.$ac_ext >&5
15668   ac_cv_header_stdc=no
15669 fi
15670 rm -f conftest.err conftest.$ac_ext
15671
15672 if test $ac_cv_header_stdc = yes; then
15673   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15674   cat >conftest.$ac_ext <<_ACEOF
15675 #line 15675 "configure"
15676 #include "confdefs.h"
15677 #include <string.h>
15678
15679 _ACEOF
15680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15681   egrep "memchr" >/dev/null 2>&1; then
15682   :
15683 else
15684   ac_cv_header_stdc=no
15685 fi
15686 rm -rf conftest*
15687
15688 fi
15689
15690 if test $ac_cv_header_stdc = yes; then
15691   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15692   cat >conftest.$ac_ext <<_ACEOF
15693 #line 15693 "configure"
15694 #include "confdefs.h"
15695 #include <stdlib.h>
15696
15697 _ACEOF
15698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15699   egrep "free" >/dev/null 2>&1; then
15700   :
15701 else
15702   ac_cv_header_stdc=no
15703 fi
15704 rm -rf conftest*
15705
15706 fi
15707
15708 if test $ac_cv_header_stdc = yes; then
15709   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15710   if test "$cross_compiling" = yes; then
15711   :
15712 else
15713   cat >conftest.$ac_ext <<_ACEOF
15714 #line 15714 "configure"
15715 #include "confdefs.h"
15716 #include <ctype.h>
15717 #if ((' ' & 0x0FF) == 0x020)
15718 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15719 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15720 #else
15721 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15722                      || ('j' <= (c) && (c) <= 'r') \
15723                      || ('s' <= (c) && (c) <= 'z'))
15724 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15725 #endif
15726
15727 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15728 int
15729 main (void)
15730 {
15731   int i;
15732   for (i = 0; i < 256; i++)
15733     if (XOR (islower (i), ISLOWER (i))
15734         || toupper (i) != TOUPPER (i))
15735       $ac_main_return(2);
15736   $ac_main_return (0);
15737 }
15738 _ACEOF
15739 rm -f conftest$ac_exeext
15740 if { (eval echo "$as_me:15740: \"$ac_link\"") >&5
15741   (eval $ac_link) 2>&5
15742   ac_status=$?
15743   echo "$as_me:15743: \$? = $ac_status" >&5
15744   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15745   { (eval echo "$as_me:15745: \"$ac_try\"") >&5
15746   (eval $ac_try) 2>&5
15747   ac_status=$?
15748   echo "$as_me:15748: \$? = $ac_status" >&5
15749   (exit $ac_status); }; }; then
15750   :
15751 else
15752   echo "$as_me: program exited with status $ac_status" >&5
15753 echo "$as_me: failed program was:" >&5
15754 cat conftest.$ac_ext >&5
15755 ac_cv_header_stdc=no
15756 fi
15757 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15758 fi
15759 fi
15760 fi
15761 echo "$as_me:15761: result: $ac_cv_header_stdc" >&5
15762 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15763 if test $ac_cv_header_stdc = yes; then
15764
15765 cat >>confdefs.h <<\EOF
15766 #define STDC_HEADERS 1
15767 EOF
15768
15769 fi
15770
15771 ac_header_dirent=no
15772 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15773   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15774 echo "$as_me:15774: checking for $ac_hdr that defines DIR" >&5
15775 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15776 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15777   echo $ECHO_N "(cached) $ECHO_C" >&6
15778 else
15779   cat >conftest.$ac_ext <<_ACEOF
15780 #line 15780 "configure"
15781 #include "confdefs.h"
15782 #include <sys/types.h>
15783 #include <$ac_hdr>
15784
15785 int
15786 main (void)
15787 {
15788 if ((DIR *) 0)
15789 return 0;
15790   ;
15791   return 0;
15792 }
15793 _ACEOF
15794 rm -f conftest.$ac_objext
15795 if { (eval echo "$as_me:15795: \"$ac_compile\"") >&5
15796   (eval $ac_compile) 2>&5
15797   ac_status=$?
15798   echo "$as_me:15798: \$? = $ac_status" >&5
15799   (exit $ac_status); } &&
15800          { ac_try='test -s conftest.$ac_objext'
15801   { (eval echo "$as_me:15801: \"$ac_try\"") >&5
15802   (eval $ac_try) 2>&5
15803   ac_status=$?
15804   echo "$as_me:15804: \$? = $ac_status" >&5
15805   (exit $ac_status); }; }; then
15806   eval "$as_ac_Header=yes"
15807 else
15808   echo "$as_me: failed program was:" >&5
15809 cat conftest.$ac_ext >&5
15810 eval "$as_ac_Header=no"
15811 fi
15812 rm -f conftest.$ac_objext conftest.$ac_ext
15813 fi
15814 echo "$as_me:15814: result: `eval echo '${'$as_ac_Header'}'`" >&5
15815 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15816 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15817   cat >>confdefs.h <<EOF
15818 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15819 EOF
15820
15821 ac_header_dirent=$ac_hdr; break
15822 fi
15823
15824 done
15825 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15826 if test $ac_header_dirent = dirent.h; then
15827   echo "$as_me:15827: checking for opendir in -ldir" >&5
15828 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15829 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15830   echo $ECHO_N "(cached) $ECHO_C" >&6
15831 else
15832   ac_check_lib_save_LIBS=$LIBS
15833 LIBS="-ldir  $LIBS"
15834 cat >conftest.$ac_ext <<_ACEOF
15835 #line 15835 "configure"
15836 #include "confdefs.h"
15837
15838 /* Override any gcc2 internal prototype to avoid an error.  */
15839 #ifdef __cplusplus
15840 extern "C"
15841 #endif
15842 /* We use char because int might match the return type of a gcc2
15843    builtin and then its argument prototype would still apply.  */
15844 char opendir ();
15845 int
15846 main (void)
15847 {
15848 opendir ();
15849   ;
15850   return 0;
15851 }
15852 _ACEOF
15853 rm -f conftest.$ac_objext conftest$ac_exeext
15854 if { (eval echo "$as_me:15854: \"$ac_link\"") >&5
15855   (eval $ac_link) 2>&5
15856   ac_status=$?
15857   echo "$as_me:15857: \$? = $ac_status" >&5
15858   (exit $ac_status); } &&
15859          { ac_try='test -s conftest$ac_exeext'
15860   { (eval echo "$as_me:15860: \"$ac_try\"") >&5
15861   (eval $ac_try) 2>&5
15862   ac_status=$?
15863   echo "$as_me:15863: \$? = $ac_status" >&5
15864   (exit $ac_status); }; }; then
15865   ac_cv_lib_dir_opendir=yes
15866 else
15867   echo "$as_me: failed program was:" >&5
15868 cat conftest.$ac_ext >&5
15869 ac_cv_lib_dir_opendir=no
15870 fi
15871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15872 LIBS=$ac_check_lib_save_LIBS
15873 fi
15874 echo "$as_me:15874: result: $ac_cv_lib_dir_opendir" >&5
15875 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15876 if test $ac_cv_lib_dir_opendir = yes; then
15877   LIBS="$LIBS -ldir"
15878 fi
15879
15880 else
15881   echo "$as_me:15881: checking for opendir in -lx" >&5
15882 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15883 if test "${ac_cv_lib_x_opendir+set}" = set; then
15884   echo $ECHO_N "(cached) $ECHO_C" >&6
15885 else
15886   ac_check_lib_save_LIBS=$LIBS
15887 LIBS="-lx  $LIBS"
15888 cat >conftest.$ac_ext <<_ACEOF
15889 #line 15889 "configure"
15890 #include "confdefs.h"
15891
15892 /* Override any gcc2 internal prototype to avoid an error.  */
15893 #ifdef __cplusplus
15894 extern "C"
15895 #endif
15896 /* We use char because int might match the return type of a gcc2
15897    builtin and then its argument prototype would still apply.  */
15898 char opendir ();
15899 int
15900 main (void)
15901 {
15902 opendir ();
15903   ;
15904   return 0;
15905 }
15906 _ACEOF
15907 rm -f conftest.$ac_objext conftest$ac_exeext
15908 if { (eval echo "$as_me:15908: \"$ac_link\"") >&5
15909   (eval $ac_link) 2>&5
15910   ac_status=$?
15911   echo "$as_me:15911: \$? = $ac_status" >&5
15912   (exit $ac_status); } &&
15913          { ac_try='test -s conftest$ac_exeext'
15914   { (eval echo "$as_me:15914: \"$ac_try\"") >&5
15915   (eval $ac_try) 2>&5
15916   ac_status=$?
15917   echo "$as_me:15917: \$? = $ac_status" >&5
15918   (exit $ac_status); }; }; then
15919   ac_cv_lib_x_opendir=yes
15920 else
15921   echo "$as_me: failed program was:" >&5
15922 cat conftest.$ac_ext >&5
15923 ac_cv_lib_x_opendir=no
15924 fi
15925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15926 LIBS=$ac_check_lib_save_LIBS
15927 fi
15928 echo "$as_me:15928: result: $ac_cv_lib_x_opendir" >&5
15929 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15930 if test $ac_cv_lib_x_opendir = yes; then
15931   LIBS="$LIBS -lx"
15932 fi
15933
15934 fi
15935
15936 echo "$as_me:15936: checking whether time.h and sys/time.h may both be included" >&5
15937 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15938 if test "${ac_cv_header_time+set}" = set; then
15939   echo $ECHO_N "(cached) $ECHO_C" >&6
15940 else
15941   cat >conftest.$ac_ext <<_ACEOF
15942 #line 15942 "configure"
15943 #include "confdefs.h"
15944 #include <sys/types.h>
15945 #include <sys/time.h>
15946 #include <time.h>
15947
15948 int
15949 main (void)
15950 {
15951 if ((struct tm *) 0)
15952 return 0;
15953   ;
15954   return 0;
15955 }
15956 _ACEOF
15957 rm -f conftest.$ac_objext
15958 if { (eval echo "$as_me:15958: \"$ac_compile\"") >&5
15959   (eval $ac_compile) 2>&5
15960   ac_status=$?
15961   echo "$as_me:15961: \$? = $ac_status" >&5
15962   (exit $ac_status); } &&
15963          { ac_try='test -s conftest.$ac_objext'
15964   { (eval echo "$as_me:15964: \"$ac_try\"") >&5
15965   (eval $ac_try) 2>&5
15966   ac_status=$?
15967   echo "$as_me:15967: \$? = $ac_status" >&5
15968   (exit $ac_status); }; }; then
15969   ac_cv_header_time=yes
15970 else
15971   echo "$as_me: failed program was:" >&5
15972 cat conftest.$ac_ext >&5
15973 ac_cv_header_time=no
15974 fi
15975 rm -f conftest.$ac_objext conftest.$ac_ext
15976 fi
15977 echo "$as_me:15977: result: $ac_cv_header_time" >&5
15978 echo "${ECHO_T}$ac_cv_header_time" >&6
15979 if test $ac_cv_header_time = yes; then
15980
15981 cat >>confdefs.h <<\EOF
15982 #define TIME_WITH_SYS_TIME 1
15983 EOF
15984
15985 fi
15986
15987 cf_regex_func=no
15988
15989 cf_regex_libs="regex re"
15990 case $host_os in
15991 (mingw*)
15992         cf_regex_libs="gnurx $cf_regex_libs"
15993         ;;
15994 esac
15995
15996 echo "$as_me:15996: checking for regcomp" >&5
15997 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15998 if test "${ac_cv_func_regcomp+set}" = set; then
15999   echo $ECHO_N "(cached) $ECHO_C" >&6
16000 else
16001   cat >conftest.$ac_ext <<_ACEOF
16002 #line 16002 "configure"
16003 #include "confdefs.h"
16004 /* System header to define __stub macros and hopefully few prototypes,
16005     which can conflict with char regcomp (); below.  */
16006 #include <assert.h>
16007 /* Override any gcc2 internal prototype to avoid an error.  */
16008 #ifdef __cplusplus
16009 extern "C"
16010 #endif
16011 /* We use char because int might match the return type of a gcc2
16012    builtin and then its argument prototype would still apply.  */
16013 char regcomp ();
16014 char (*f) ();
16015
16016 int
16017 main (void)
16018 {
16019 /* The GNU C library defines this for functions which it implements
16020     to always fail with ENOSYS.  Some functions are actually named
16021     something starting with __ and the normal name is an alias.  */
16022 #if defined (__stub_regcomp) || defined (__stub___regcomp)
16023 choke me
16024 #else
16025 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16026 #endif
16027
16028   ;
16029   return 0;
16030 }
16031 _ACEOF
16032 rm -f conftest.$ac_objext conftest$ac_exeext
16033 if { (eval echo "$as_me:16033: \"$ac_link\"") >&5
16034   (eval $ac_link) 2>&5
16035   ac_status=$?
16036   echo "$as_me:16036: \$? = $ac_status" >&5
16037   (exit $ac_status); } &&
16038          { ac_try='test -s conftest$ac_exeext'
16039   { (eval echo "$as_me:16039: \"$ac_try\"") >&5
16040   (eval $ac_try) 2>&5
16041   ac_status=$?
16042   echo "$as_me:16042: \$? = $ac_status" >&5
16043   (exit $ac_status); }; }; then
16044   ac_cv_func_regcomp=yes
16045 else
16046   echo "$as_me: failed program was:" >&5
16047 cat conftest.$ac_ext >&5
16048 ac_cv_func_regcomp=no
16049 fi
16050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16051 fi
16052 echo "$as_me:16052: result: $ac_cv_func_regcomp" >&5
16053 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
16054 if test $ac_cv_func_regcomp = yes; then
16055   cf_regex_func=regcomp
16056 else
16057
16058         for cf_regex_lib in $cf_regex_libs
16059         do
16060                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
16061 echo "$as_me:16061: checking for regcomp in -l$cf_regex_lib" >&5
16062 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
16063 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16064   echo $ECHO_N "(cached) $ECHO_C" >&6
16065 else
16066   ac_check_lib_save_LIBS=$LIBS
16067 LIBS="-l$cf_regex_lib  $LIBS"
16068 cat >conftest.$ac_ext <<_ACEOF
16069 #line 16069 "configure"
16070 #include "confdefs.h"
16071
16072 /* Override any gcc2 internal prototype to avoid an error.  */
16073 #ifdef __cplusplus
16074 extern "C"
16075 #endif
16076 /* We use char because int might match the return type of a gcc2
16077    builtin and then its argument prototype would still apply.  */
16078 char regcomp ();
16079 int
16080 main (void)
16081 {
16082 regcomp ();
16083   ;
16084   return 0;
16085 }
16086 _ACEOF
16087 rm -f conftest.$ac_objext conftest$ac_exeext
16088 if { (eval echo "$as_me:16088: \"$ac_link\"") >&5
16089   (eval $ac_link) 2>&5
16090   ac_status=$?
16091   echo "$as_me:16091: \$? = $ac_status" >&5
16092   (exit $ac_status); } &&
16093          { ac_try='test -s conftest$ac_exeext'
16094   { (eval echo "$as_me:16094: \"$ac_try\"") >&5
16095   (eval $ac_try) 2>&5
16096   ac_status=$?
16097   echo "$as_me:16097: \$? = $ac_status" >&5
16098   (exit $ac_status); }; }; then
16099   eval "$as_ac_Lib=yes"
16100 else
16101   echo "$as_me: failed program was:" >&5
16102 cat conftest.$ac_ext >&5
16103 eval "$as_ac_Lib=no"
16104 fi
16105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16106 LIBS=$ac_check_lib_save_LIBS
16107 fi
16108 echo "$as_me:16108: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16109 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16110 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16111
16112 cf_add_libs="-l$cf_regex_lib"
16113 # Filter out duplicates - this happens with badly-designed ".pc" files...
16114 for cf_add_1lib in $LIBS
16115 do
16116         for cf_add_2lib in $cf_add_libs
16117         do
16118                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16119                 then
16120                         cf_add_1lib=
16121                         break
16122                 fi
16123         done
16124         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16125 done
16126 LIBS="$cf_add_libs"
16127
16128                                 cf_regex_func=regcomp
16129                                 break
16130 fi
16131
16132         done
16133
16134 fi
16135
16136 if test "$cf_regex_func" = no ; then
16137         echo "$as_me:16137: checking for compile" >&5
16138 echo $ECHO_N "checking for compile... $ECHO_C" >&6
16139 if test "${ac_cv_func_compile+set}" = set; then
16140   echo $ECHO_N "(cached) $ECHO_C" >&6
16141 else
16142   cat >conftest.$ac_ext <<_ACEOF
16143 #line 16143 "configure"
16144 #include "confdefs.h"
16145 /* System header to define __stub macros and hopefully few prototypes,
16146     which can conflict with char compile (); below.  */
16147 #include <assert.h>
16148 /* Override any gcc2 internal prototype to avoid an error.  */
16149 #ifdef __cplusplus
16150 extern "C"
16151 #endif
16152 /* We use char because int might match the return type of a gcc2
16153    builtin and then its argument prototype would still apply.  */
16154 char compile ();
16155 char (*f) ();
16156
16157 int
16158 main (void)
16159 {
16160 /* The GNU C library defines this for functions which it implements
16161     to always fail with ENOSYS.  Some functions are actually named
16162     something starting with __ and the normal name is an alias.  */
16163 #if defined (__stub_compile) || defined (__stub___compile)
16164 choke me
16165 #else
16166 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16167 #endif
16168
16169   ;
16170   return 0;
16171 }
16172 _ACEOF
16173 rm -f conftest.$ac_objext conftest$ac_exeext
16174 if { (eval echo "$as_me:16174: \"$ac_link\"") >&5
16175   (eval $ac_link) 2>&5
16176   ac_status=$?
16177   echo "$as_me:16177: \$? = $ac_status" >&5
16178   (exit $ac_status); } &&
16179          { ac_try='test -s conftest$ac_exeext'
16180   { (eval echo "$as_me:16180: \"$ac_try\"") >&5
16181   (eval $ac_try) 2>&5
16182   ac_status=$?
16183   echo "$as_me:16183: \$? = $ac_status" >&5
16184   (exit $ac_status); }; }; then
16185   ac_cv_func_compile=yes
16186 else
16187   echo "$as_me: failed program was:" >&5
16188 cat conftest.$ac_ext >&5
16189 ac_cv_func_compile=no
16190 fi
16191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16192 fi
16193 echo "$as_me:16193: result: $ac_cv_func_compile" >&5
16194 echo "${ECHO_T}$ac_cv_func_compile" >&6
16195 if test $ac_cv_func_compile = yes; then
16196   cf_regex_func=compile
16197 else
16198
16199                 echo "$as_me:16199: checking for compile in -lgen" >&5
16200 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16201 if test "${ac_cv_lib_gen_compile+set}" = set; then
16202   echo $ECHO_N "(cached) $ECHO_C" >&6
16203 else
16204   ac_check_lib_save_LIBS=$LIBS
16205 LIBS="-lgen  $LIBS"
16206 cat >conftest.$ac_ext <<_ACEOF
16207 #line 16207 "configure"
16208 #include "confdefs.h"
16209
16210 /* Override any gcc2 internal prototype to avoid an error.  */
16211 #ifdef __cplusplus
16212 extern "C"
16213 #endif
16214 /* We use char because int might match the return type of a gcc2
16215    builtin and then its argument prototype would still apply.  */
16216 char compile ();
16217 int
16218 main (void)
16219 {
16220 compile ();
16221   ;
16222   return 0;
16223 }
16224 _ACEOF
16225 rm -f conftest.$ac_objext conftest$ac_exeext
16226 if { (eval echo "$as_me:16226: \"$ac_link\"") >&5
16227   (eval $ac_link) 2>&5
16228   ac_status=$?
16229   echo "$as_me:16229: \$? = $ac_status" >&5
16230   (exit $ac_status); } &&
16231          { ac_try='test -s conftest$ac_exeext'
16232   { (eval echo "$as_me:16232: \"$ac_try\"") >&5
16233   (eval $ac_try) 2>&5
16234   ac_status=$?
16235   echo "$as_me:16235: \$? = $ac_status" >&5
16236   (exit $ac_status); }; }; then
16237   ac_cv_lib_gen_compile=yes
16238 else
16239   echo "$as_me: failed program was:" >&5
16240 cat conftest.$ac_ext >&5
16241 ac_cv_lib_gen_compile=no
16242 fi
16243 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16244 LIBS=$ac_check_lib_save_LIBS
16245 fi
16246 echo "$as_me:16246: result: $ac_cv_lib_gen_compile" >&5
16247 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16248 if test $ac_cv_lib_gen_compile = yes; then
16249
16250 cf_add_libs="-lgen"
16251 # Filter out duplicates - this happens with badly-designed ".pc" files...
16252 for cf_add_1lib in $LIBS
16253 do
16254         for cf_add_2lib in $cf_add_libs
16255         do
16256                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16257                 then
16258                         cf_add_1lib=
16259                         break
16260                 fi
16261         done
16262         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16263 done
16264 LIBS="$cf_add_libs"
16265
16266                                 cf_regex_func=compile
16267 fi
16268
16269 fi
16270
16271 fi
16272
16273 if test "$cf_regex_func" = no ; then
16274         { echo "$as_me:16274: WARNING: cannot find regular expression library" >&5
16275 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16276 fi
16277
16278 echo "$as_me:16278: checking for regular-expression headers" >&5
16279 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16280 if test "${cf_cv_regex_hdrs+set}" = set; then
16281   echo $ECHO_N "(cached) $ECHO_C" >&6
16282 else
16283
16284 cf_cv_regex_hdrs=no
16285 case $cf_regex_func in
16286 (compile)
16287         for cf_regex_hdr in regexp.h regexpr.h
16288         do
16289                 cat >conftest.$ac_ext <<_ACEOF
16290 #line 16290 "configure"
16291 #include "confdefs.h"
16292 #include <$cf_regex_hdr>
16293 int
16294 main (void)
16295 {
16296
16297                         char *p = compile("", "", "", 0);
16298                         int x = step("", "");
16299
16300   ;
16301   return 0;
16302 }
16303 _ACEOF
16304 rm -f conftest.$ac_objext conftest$ac_exeext
16305 if { (eval echo "$as_me:16305: \"$ac_link\"") >&5
16306   (eval $ac_link) 2>&5
16307   ac_status=$?
16308   echo "$as_me:16308: \$? = $ac_status" >&5
16309   (exit $ac_status); } &&
16310          { ac_try='test -s conftest$ac_exeext'
16311   { (eval echo "$as_me:16311: \"$ac_try\"") >&5
16312   (eval $ac_try) 2>&5
16313   ac_status=$?
16314   echo "$as_me:16314: \$? = $ac_status" >&5
16315   (exit $ac_status); }; }; then
16316
16317                         cf_cv_regex_hdrs=$cf_regex_hdr
16318                         break
16319
16320 else
16321   echo "$as_me: failed program was:" >&5
16322 cat conftest.$ac_ext >&5
16323 fi
16324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16325         done
16326         ;;
16327 (*)
16328         for cf_regex_hdr in regex.h
16329         do
16330                 cat >conftest.$ac_ext <<_ACEOF
16331 #line 16331 "configure"
16332 #include "confdefs.h"
16333 #include <sys/types.h>
16334 #include <$cf_regex_hdr>
16335 int
16336 main (void)
16337 {
16338
16339                         regex_t *p;
16340                         int x = regcomp(p, "", 0);
16341                         int y = regexec(p, "", 0, 0, 0);
16342                         regfree(p);
16343
16344   ;
16345   return 0;
16346 }
16347 _ACEOF
16348 rm -f conftest.$ac_objext conftest$ac_exeext
16349 if { (eval echo "$as_me:16349: \"$ac_link\"") >&5
16350   (eval $ac_link) 2>&5
16351   ac_status=$?
16352   echo "$as_me:16352: \$? = $ac_status" >&5
16353   (exit $ac_status); } &&
16354          { ac_try='test -s conftest$ac_exeext'
16355   { (eval echo "$as_me:16355: \"$ac_try\"") >&5
16356   (eval $ac_try) 2>&5
16357   ac_status=$?
16358   echo "$as_me:16358: \$? = $ac_status" >&5
16359   (exit $ac_status); }; }; then
16360
16361                         cf_cv_regex_hdrs=$cf_regex_hdr
16362                         break
16363
16364 else
16365   echo "$as_me: failed program was:" >&5
16366 cat conftest.$ac_ext >&5
16367 fi
16368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16369         done
16370         ;;
16371 esac
16372
16373 fi
16374 echo "$as_me:16374: result: $cf_cv_regex_hdrs" >&5
16375 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16376
16377 case $cf_cv_regex_hdrs in
16378         (no)            { echo "$as_me:16378: WARNING: no regular expression header found" >&5
16379 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16380         (regex.h)
16381 cat >>confdefs.h <<\EOF
16382 #define HAVE_REGEX_H_FUNCS 1
16383 EOF
16384  ;;
16385         (regexp.h)
16386 cat >>confdefs.h <<\EOF
16387 #define HAVE_REGEXP_H_FUNCS 1
16388 EOF
16389  ;;
16390         (regexpr.h)
16391 cat >>confdefs.h <<\EOF
16392 #define HAVE_REGEXPR_H_FUNCS 1
16393 EOF
16394  ;;
16395 esac
16396
16397 for ac_header in \
16398 fcntl.h \
16399 getopt.h \
16400 limits.h \
16401 locale.h \
16402 math.h \
16403 poll.h \
16404 sys/bsdtypes.h \
16405 sys/ioctl.h \
16406 sys/param.h \
16407 sys/poll.h \
16408 sys/select.h \
16409 sys/time.h \
16410 sys/times.h \
16411 ttyent.h \
16412 unistd.h \
16413 wctype.h \
16414
16415 do
16416 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16417 echo "$as_me:16417: checking for $ac_header" >&5
16418 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16419 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16420   echo $ECHO_N "(cached) $ECHO_C" >&6
16421 else
16422   cat >conftest.$ac_ext <<_ACEOF
16423 #line 16423 "configure"
16424 #include "confdefs.h"
16425 #include <$ac_header>
16426 _ACEOF
16427 if { (eval echo "$as_me:16427: \"$ac_cpp conftest.$ac_ext\"") >&5
16428   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16429   ac_status=$?
16430   egrep -v '^ *\+' conftest.er1 >conftest.err
16431   rm -f conftest.er1
16432   cat conftest.err >&5
16433   echo "$as_me:16433: \$? = $ac_status" >&5
16434   (exit $ac_status); } >/dev/null; then
16435   if test -s conftest.err; then
16436     ac_cpp_err=$ac_c_preproc_warn_flag
16437   else
16438     ac_cpp_err=
16439   fi
16440 else
16441   ac_cpp_err=yes
16442 fi
16443 if test -z "$ac_cpp_err"; then
16444   eval "$as_ac_Header=yes"
16445 else
16446   echo "$as_me: failed program was:" >&5
16447   cat conftest.$ac_ext >&5
16448   eval "$as_ac_Header=no"
16449 fi
16450 rm -f conftest.err conftest.$ac_ext
16451 fi
16452 echo "$as_me:16452: result: `eval echo '${'$as_ac_Header'}'`" >&5
16453 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16454 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16455   cat >>confdefs.h <<EOF
16456 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16457 EOF
16458
16459 fi
16460 done
16461
16462 for ac_header in unistd.h getopt.h
16463 do
16464 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16465 echo "$as_me:16465: checking for $ac_header" >&5
16466 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16467 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16468   echo $ECHO_N "(cached) $ECHO_C" >&6
16469 else
16470   cat >conftest.$ac_ext <<_ACEOF
16471 #line 16471 "configure"
16472 #include "confdefs.h"
16473 #include <$ac_header>
16474 _ACEOF
16475 if { (eval echo "$as_me:16475: \"$ac_cpp conftest.$ac_ext\"") >&5
16476   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16477   ac_status=$?
16478   egrep -v '^ *\+' conftest.er1 >conftest.err
16479   rm -f conftest.er1
16480   cat conftest.err >&5
16481   echo "$as_me:16481: \$? = $ac_status" >&5
16482   (exit $ac_status); } >/dev/null; then
16483   if test -s conftest.err; then
16484     ac_cpp_err=$ac_c_preproc_warn_flag
16485   else
16486     ac_cpp_err=
16487   fi
16488 else
16489   ac_cpp_err=yes
16490 fi
16491 if test -z "$ac_cpp_err"; then
16492   eval "$as_ac_Header=yes"
16493 else
16494   echo "$as_me: failed program was:" >&5
16495   cat conftest.$ac_ext >&5
16496   eval "$as_ac_Header=no"
16497 fi
16498 rm -f conftest.err conftest.$ac_ext
16499 fi
16500 echo "$as_me:16500: result: `eval echo '${'$as_ac_Header'}'`" >&5
16501 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16502 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16503   cat >>confdefs.h <<EOF
16504 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16505 EOF
16506
16507 fi
16508 done
16509
16510 echo "$as_me:16510: checking for header declaring getopt variables" >&5
16511 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16512 if test "${cf_cv_getopt_header+set}" = set; then
16513   echo $ECHO_N "(cached) $ECHO_C" >&6
16514 else
16515
16516 cf_cv_getopt_header=none
16517 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16518 do
16519 cat >conftest.$ac_ext <<_ACEOF
16520 #line 16520 "configure"
16521 #include "confdefs.h"
16522
16523 #include <$cf_header>
16524 int
16525 main (void)
16526 {
16527 int x = optind; char *y = optarg
16528   ;
16529   return 0;
16530 }
16531 _ACEOF
16532 rm -f conftest.$ac_objext
16533 if { (eval echo "$as_me:16533: \"$ac_compile\"") >&5
16534   (eval $ac_compile) 2>&5
16535   ac_status=$?
16536   echo "$as_me:16536: \$? = $ac_status" >&5
16537   (exit $ac_status); } &&
16538          { ac_try='test -s conftest.$ac_objext'
16539   { (eval echo "$as_me:16539: \"$ac_try\"") >&5
16540   (eval $ac_try) 2>&5
16541   ac_status=$?
16542   echo "$as_me:16542: \$? = $ac_status" >&5
16543   (exit $ac_status); }; }; then
16544   cf_cv_getopt_header=$cf_header
16545  break
16546 else
16547   echo "$as_me: failed program was:" >&5
16548 cat conftest.$ac_ext >&5
16549 fi
16550 rm -f conftest.$ac_objext conftest.$ac_ext
16551 done
16552
16553 fi
16554 echo "$as_me:16554: result: $cf_cv_getopt_header" >&5
16555 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16556 if test $cf_cv_getopt_header != none ; then
16557
16558 cat >>confdefs.h <<\EOF
16559 #define HAVE_GETOPT_HEADER 1
16560 EOF
16561
16562 fi
16563 if test $cf_cv_getopt_header = getopt.h ; then
16564
16565 cat >>confdefs.h <<\EOF
16566 #define NEED_GETOPT_H 1
16567 EOF
16568
16569 fi
16570
16571 # check for ISC (this may also define _POSIX_SOURCE)
16572 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16573 if test "x$ISC" = xyes ; then
16574
16575 echo "$as_me:16575: checking for main in -lcposix" >&5
16576 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16577 if test "${ac_cv_lib_cposix_main+set}" = set; then
16578   echo $ECHO_N "(cached) $ECHO_C" >&6
16579 else
16580   ac_check_lib_save_LIBS=$LIBS
16581 LIBS="-lcposix  $LIBS"
16582 cat >conftest.$ac_ext <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585
16586 int
16587 main (void)
16588 {
16589 main ();
16590   ;
16591   return 0;
16592 }
16593 _ACEOF
16594 rm -f conftest.$ac_objext conftest$ac_exeext
16595 if { (eval echo "$as_me:16595: \"$ac_link\"") >&5
16596   (eval $ac_link) 2>&5
16597   ac_status=$?
16598   echo "$as_me:16598: \$? = $ac_status" >&5
16599   (exit $ac_status); } &&
16600          { ac_try='test -s conftest$ac_exeext'
16601   { (eval echo "$as_me:16601: \"$ac_try\"") >&5
16602   (eval $ac_try) 2>&5
16603   ac_status=$?
16604   echo "$as_me:16604: \$? = $ac_status" >&5
16605   (exit $ac_status); }; }; then
16606   ac_cv_lib_cposix_main=yes
16607 else
16608   echo "$as_me: failed program was:" >&5
16609 cat conftest.$ac_ext >&5
16610 ac_cv_lib_cposix_main=no
16611 fi
16612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16613 LIBS=$ac_check_lib_save_LIBS
16614 fi
16615 echo "$as_me:16615: result: $ac_cv_lib_cposix_main" >&5
16616 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16617 if test $ac_cv_lib_cposix_main = yes; then
16618   cat >>confdefs.h <<EOF
16619 #define HAVE_LIBCPOSIX 1
16620 EOF
16621
16622   LIBS="-lcposix $LIBS"
16623
16624 fi
16625
16626         echo "$as_me:16626: checking for bzero in -linet" >&5
16627 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16628 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16629   echo $ECHO_N "(cached) $ECHO_C" >&6
16630 else
16631   ac_check_lib_save_LIBS=$LIBS
16632 LIBS="-linet  $LIBS"
16633 cat >conftest.$ac_ext <<_ACEOF
16634 #line 16634 "configure"
16635 #include "confdefs.h"
16636
16637 /* Override any gcc2 internal prototype to avoid an error.  */
16638 #ifdef __cplusplus
16639 extern "C"
16640 #endif
16641 /* We use char because int might match the return type of a gcc2
16642    builtin and then its argument prototype would still apply.  */
16643 char bzero ();
16644 int
16645 main (void)
16646 {
16647 bzero ();
16648   ;
16649   return 0;
16650 }
16651 _ACEOF
16652 rm -f conftest.$ac_objext conftest$ac_exeext
16653 if { (eval echo "$as_me:16653: \"$ac_link\"") >&5
16654   (eval $ac_link) 2>&5
16655   ac_status=$?
16656   echo "$as_me:16656: \$? = $ac_status" >&5
16657   (exit $ac_status); } &&
16658          { ac_try='test -s conftest$ac_exeext'
16659   { (eval echo "$as_me:16659: \"$ac_try\"") >&5
16660   (eval $ac_try) 2>&5
16661   ac_status=$?
16662   echo "$as_me:16662: \$? = $ac_status" >&5
16663   (exit $ac_status); }; }; then
16664   ac_cv_lib_inet_bzero=yes
16665 else
16666   echo "$as_me: failed program was:" >&5
16667 cat conftest.$ac_ext >&5
16668 ac_cv_lib_inet_bzero=no
16669 fi
16670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16671 LIBS=$ac_check_lib_save_LIBS
16672 fi
16673 echo "$as_me:16673: result: $ac_cv_lib_inet_bzero" >&5
16674 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16675 if test $ac_cv_lib_inet_bzero = yes; then
16676
16677 cf_add_libs="-linet"
16678 # Filter out duplicates - this happens with badly-designed ".pc" files...
16679 for cf_add_1lib in $LIBS
16680 do
16681         for cf_add_2lib in $cf_add_libs
16682         do
16683                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16684                 then
16685                         cf_add_1lib=
16686                         break
16687                 fi
16688         done
16689         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16690 done
16691 LIBS="$cf_add_libs"
16692
16693 fi
16694 fi
16695
16696 echo "$as_me:16696: checking if sys/time.h works with sys/select.h" >&5
16697 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16698 if test "${cf_cv_sys_time_select+set}" = set; then
16699   echo $ECHO_N "(cached) $ECHO_C" >&6
16700 else
16701
16702 cat >conftest.$ac_ext <<_ACEOF
16703 #line 16703 "configure"
16704 #include "confdefs.h"
16705
16706 #include <sys/types.h>
16707 #ifdef HAVE_SYS_TIME_H
16708 #include <sys/time.h>
16709 #endif
16710 #ifdef HAVE_SYS_SELECT_H
16711 #include <sys/select.h>
16712 #endif
16713
16714 int
16715 main (void)
16716 {
16717
16718   ;
16719   return 0;
16720 }
16721 _ACEOF
16722 rm -f conftest.$ac_objext
16723 if { (eval echo "$as_me:16723: \"$ac_compile\"") >&5
16724   (eval $ac_compile) 2>&5
16725   ac_status=$?
16726   echo "$as_me:16726: \$? = $ac_status" >&5
16727   (exit $ac_status); } &&
16728          { ac_try='test -s conftest.$ac_objext'
16729   { (eval echo "$as_me:16729: \"$ac_try\"") >&5
16730   (eval $ac_try) 2>&5
16731   ac_status=$?
16732   echo "$as_me:16732: \$? = $ac_status" >&5
16733   (exit $ac_status); }; }; then
16734   cf_cv_sys_time_select=yes
16735 else
16736   echo "$as_me: failed program was:" >&5
16737 cat conftest.$ac_ext >&5
16738 cf_cv_sys_time_select=no
16739 fi
16740 rm -f conftest.$ac_objext conftest.$ac_ext
16741
16742 fi
16743
16744 echo "$as_me:16744: result: $cf_cv_sys_time_select" >&5
16745 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16746 test "$cf_cv_sys_time_select" = yes &&
16747 cat >>confdefs.h <<\EOF
16748 #define HAVE_SYS_TIME_SELECT 1
16749 EOF
16750
16751 ###     checks for compiler characteristics
16752 ac_ext=c
16753 ac_cpp='$CPP $CPPFLAGS'
16754 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16755 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16756 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16757 ac_main_return=return
16758
16759 echo "$as_me:16759: checking for an ANSI C-conforming const" >&5
16760 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16761 if test "${ac_cv_c_const+set}" = set; then
16762   echo $ECHO_N "(cached) $ECHO_C" >&6
16763 else
16764   cat >conftest.$ac_ext <<_ACEOF
16765 #line 16765 "configure"
16766 #include "confdefs.h"
16767
16768 int
16769 main (void)
16770 {
16771 /* FIXME: Include the comments suggested by Paul. */
16772 #ifndef __cplusplus
16773   /* Ultrix mips cc rejects this.  */
16774   typedef int charset[2];
16775   const charset x;
16776   /* SunOS 4.1.1 cc rejects this.  */
16777   char const *const *ccp;
16778   char **p;
16779   /* NEC SVR4.0.2 mips cc rejects this.  */
16780   struct point {int x, y;};
16781   static struct point const zero = {0,0};
16782   /* AIX XL C 1.02.0.0 rejects this.
16783      It does not let you subtract one const X* pointer from another in
16784      an arm of an if-expression whose if-part is not a constant
16785      expression */
16786   const char *g = "string";
16787   ccp = &g + (g ? g-g : 0);
16788   /* HPUX 7.0 cc rejects these. */
16789   ++ccp;
16790   p = (char**) ccp;
16791   ccp = (char const *const *) p;
16792   { /* SCO 3.2v4 cc rejects this.  */
16793     char *t;
16794     char const *s = 0 ? (char *) 0 : (char const *) 0;
16795
16796     *t++ = 0;
16797   }
16798   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16799     int x[] = {25, 17};
16800     const int *foo = &x[0];
16801     ++foo;
16802   }
16803   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16804     typedef const int *iptr;
16805     iptr p = 0;
16806     ++p;
16807   }
16808   { /* AIX XL C 1.02.0.0 rejects this saying
16809        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16810     struct s { int j; const int *ap[3]; };
16811     struct s *b; b->j = 5;
16812   }
16813   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16814     const int foo = 10;
16815   }
16816 #endif
16817
16818   ;
16819   return 0;
16820 }
16821 _ACEOF
16822 rm -f conftest.$ac_objext
16823 if { (eval echo "$as_me:16823: \"$ac_compile\"") >&5
16824   (eval $ac_compile) 2>&5
16825   ac_status=$?
16826   echo "$as_me:16826: \$? = $ac_status" >&5
16827   (exit $ac_status); } &&
16828          { ac_try='test -s conftest.$ac_objext'
16829   { (eval echo "$as_me:16829: \"$ac_try\"") >&5
16830   (eval $ac_try) 2>&5
16831   ac_status=$?
16832   echo "$as_me:16832: \$? = $ac_status" >&5
16833   (exit $ac_status); }; }; then
16834   ac_cv_c_const=yes
16835 else
16836   echo "$as_me: failed program was:" >&5
16837 cat conftest.$ac_ext >&5
16838 ac_cv_c_const=no
16839 fi
16840 rm -f conftest.$ac_objext conftest.$ac_ext
16841 fi
16842 echo "$as_me:16842: result: $ac_cv_c_const" >&5
16843 echo "${ECHO_T}$ac_cv_c_const" >&6
16844 if test $ac_cv_c_const = no; then
16845
16846 cat >>confdefs.h <<\EOF
16847 #define const
16848 EOF
16849
16850 fi
16851
16852 echo "$as_me:16852: checking for inline" >&5
16853 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16854 if test "${ac_cv_c_inline+set}" = set; then
16855   echo $ECHO_N "(cached) $ECHO_C" >&6
16856 else
16857   ac_cv_c_inline=no
16858 for ac_kw in inline __inline__ __inline; do
16859   cat >conftest.$ac_ext <<_ACEOF
16860 #line 16860 "configure"
16861 #include "confdefs.h"
16862 #ifndef __cplusplus
16863 static $ac_kw int static_foo () {return 0; }
16864 $ac_kw int foo () {return 0; }
16865 #endif
16866
16867 _ACEOF
16868 rm -f conftest.$ac_objext
16869 if { (eval echo "$as_me:16869: \"$ac_compile\"") >&5
16870   (eval $ac_compile) 2>&5
16871   ac_status=$?
16872   echo "$as_me:16872: \$? = $ac_status" >&5
16873   (exit $ac_status); } &&
16874          { ac_try='test -s conftest.$ac_objext'
16875   { (eval echo "$as_me:16875: \"$ac_try\"") >&5
16876   (eval $ac_try) 2>&5
16877   ac_status=$?
16878   echo "$as_me:16878: \$? = $ac_status" >&5
16879   (exit $ac_status); }; }; then
16880   ac_cv_c_inline=$ac_kw; break
16881 else
16882   echo "$as_me: failed program was:" >&5
16883 cat conftest.$ac_ext >&5
16884 fi
16885 rm -f conftest.$ac_objext conftest.$ac_ext
16886 done
16887
16888 fi
16889 echo "$as_me:16889: result: $ac_cv_c_inline" >&5
16890 echo "${ECHO_T}$ac_cv_c_inline" >&6
16891 case $ac_cv_c_inline in
16892   inline | yes) ;;
16893   no)
16894 cat >>confdefs.h <<\EOF
16895 #define inline
16896 EOF
16897  ;;
16898   *)  cat >>confdefs.h <<EOF
16899 #define inline $ac_cv_c_inline
16900 EOF
16901  ;;
16902 esac
16903
16904 NCURSES_INLINE=
16905 if test "$ac_cv_c_inline" != no ; then
16906         NCURSES_INLINE=inline
16907         if test "$INTEL_COMPILER" = yes
16908         then
16909                 :
16910         elif test "$CLANG_COMPILER" = yes
16911         then
16912                 :
16913         elif test "$GCC" = yes
16914         then
16915                 echo "$as_me:16915: checking if $CC supports options to tune inlining" >&5
16916 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16917 if test "${cf_cv_gcc_inline+set}" = set; then
16918   echo $ECHO_N "(cached) $ECHO_C" >&6
16919 else
16920
16921                 cf_save_CFLAGS=$CFLAGS
16922                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16923                 cat >conftest.$ac_ext <<_ACEOF
16924 #line 16924 "configure"
16925 #include "confdefs.h"
16926 inline int foo(void) { return 1; }
16927 int
16928 main (void)
16929 {
16930 ${cf_cv_main_return:-return} foo()
16931   ;
16932   return 0;
16933 }
16934 _ACEOF
16935 rm -f conftest.$ac_objext
16936 if { (eval echo "$as_me:16936: \"$ac_compile\"") >&5
16937   (eval $ac_compile) 2>&5
16938   ac_status=$?
16939   echo "$as_me:16939: \$? = $ac_status" >&5
16940   (exit $ac_status); } &&
16941          { ac_try='test -s conftest.$ac_objext'
16942   { (eval echo "$as_me:16942: \"$ac_try\"") >&5
16943   (eval $ac_try) 2>&5
16944   ac_status=$?
16945   echo "$as_me:16945: \$? = $ac_status" >&5
16946   (exit $ac_status); }; }; then
16947   cf_cv_gcc_inline=yes
16948 else
16949   echo "$as_me: failed program was:" >&5
16950 cat conftest.$ac_ext >&5
16951 cf_cv_gcc_inline=no
16952 fi
16953 rm -f conftest.$ac_objext conftest.$ac_ext
16954                 CFLAGS=$cf_save_CFLAGS
16955
16956 fi
16957 echo "$as_me:16957: result: $cf_cv_gcc_inline" >&5
16958 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16959                 if test "$cf_cv_gcc_inline" = yes ; then
16960
16961 cf_fix_cppflags=no
16962 cf_new_cflags=
16963 cf_new_cppflags=
16964 cf_new_extra_cppflags=
16965
16966 for cf_add_cflags in --param max-inline-insns-single=1200
16967 do
16968 case $cf_fix_cppflags in
16969 (no)
16970         case $cf_add_cflags in
16971         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16972                 case $cf_add_cflags in
16973                 (-D*)
16974                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16975
16976                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16977                                 && test -z "${cf_tst_cflags}" \
16978                                 && cf_fix_cppflags=yes
16979
16980                         if test $cf_fix_cppflags = yes ; then
16981
16982         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16983         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16984
16985                                 continue
16986                         elif test "${cf_tst_cflags}" = "\"'" ; then
16987
16988         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16989         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16990
16991                                 continue
16992                         fi
16993                         ;;
16994                 esac
16995                 case "$CPPFLAGS" in
16996                 (*$cf_add_cflags)
16997                         ;;
16998                 (*)
16999                         case $cf_add_cflags in
17000                         (-D*)
17001                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17002
17003 CPPFLAGS=`echo "$CPPFLAGS" | \
17004         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17005                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17006
17007                                 ;;
17008                         esac
17009
17010         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17011         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17012
17013                         ;;
17014                 esac
17015                 ;;
17016         (*)
17017
17018         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17019         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17020
17021                 ;;
17022         esac
17023         ;;
17024 (yes)
17025
17026         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17027         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17028
17029         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17030
17031         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17032                 && test -z "${cf_tst_cflags}" \
17033                 && cf_fix_cppflags=no
17034         ;;
17035 esac
17036 done
17037
17038 if test -n "$cf_new_cflags" ; then
17039
17040         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17041         CFLAGS="${CFLAGS}$cf_new_cflags"
17042
17043 fi
17044
17045 if test -n "$cf_new_cppflags" ; then
17046
17047         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17048         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17049
17050 fi
17051
17052 if test -n "$cf_new_extra_cppflags" ; then
17053
17054         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17055         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17056
17057 fi
17058
17059                 fi
17060         fi
17061 fi
17062
17063 echo "$as_me:17063: checking for signal global datatype" >&5
17064 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
17065 if test "${cf_cv_sig_atomic_t+set}" = set; then
17066   echo $ECHO_N "(cached) $ECHO_C" >&6
17067 else
17068
17069         for cf_type in \
17070                 "volatile sig_atomic_t" \
17071                 "sig_atomic_t" \
17072                 "int"
17073         do
17074         cat >conftest.$ac_ext <<_ACEOF
17075 #line 17075 "configure"
17076 #include "confdefs.h"
17077
17078 #include <sys/types.h>
17079 #include <signal.h>
17080 #include <stdio.h>
17081
17082 extern $cf_type x;
17083 $cf_type x;
17084 static void handler(int sig)
17085 {
17086         x = 5;
17087 }
17088 int
17089 main (void)
17090 {
17091 signal(SIGINT, handler);
17092                  x = 1
17093   ;
17094   return 0;
17095 }
17096 _ACEOF
17097 rm -f conftest.$ac_objext
17098 if { (eval echo "$as_me:17098: \"$ac_compile\"") >&5
17099   (eval $ac_compile) 2>&5
17100   ac_status=$?
17101   echo "$as_me:17101: \$? = $ac_status" >&5
17102   (exit $ac_status); } &&
17103          { ac_try='test -s conftest.$ac_objext'
17104   { (eval echo "$as_me:17104: \"$ac_try\"") >&5
17105   (eval $ac_try) 2>&5
17106   ac_status=$?
17107   echo "$as_me:17107: \$? = $ac_status" >&5
17108   (exit $ac_status); }; }; then
17109   cf_cv_sig_atomic_t=$cf_type
17110 else
17111   echo "$as_me: failed program was:" >&5
17112 cat conftest.$ac_ext >&5
17113 cf_cv_sig_atomic_t=no
17114 fi
17115 rm -f conftest.$ac_objext conftest.$ac_ext
17116                 test "$cf_cv_sig_atomic_t" != no && break
17117         done
17118
17119 fi
17120
17121 echo "$as_me:17121: result: $cf_cv_sig_atomic_t" >&5
17122 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
17123 test "$cf_cv_sig_atomic_t" != no &&
17124 cat >>confdefs.h <<EOF
17125 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
17126 EOF
17127
17128 if test $NCURSES_CHTYPE = auto ; then
17129
17130 echo "$as_me:17130: checking for type of chtype" >&5
17131 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
17132 if test "${cf_cv_typeof_chtype+set}" = set; then
17133   echo $ECHO_N "(cached) $ECHO_C" >&6
17134 else
17135
17136                 if test "$cross_compiling" = yes; then
17137   cf_cv_typeof_chtype=long
17138 else
17139   cat >conftest.$ac_ext <<_ACEOF
17140 #line 17140 "configure"
17141 #include "confdefs.h"
17142
17143 #define WANT_BITS 31
17144 #include <stdio.h>
17145 int main(void)
17146 {
17147         FILE *fp = fopen("cf_test.out", "w");
17148         if (fp != 0) {
17149                 char *result = "long";
17150                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
17151                         int n;
17152                         unsigned int x, y;
17153                         for (n = 0; n < WANT_BITS; n++) {
17154                                 x = (1 << n);
17155                                 y = (x >> n);
17156                                 if (y != 1 || x == 0) {
17157                                         x = 0;
17158                                         break;
17159                                 }
17160                         }
17161                         /*
17162                          * If x is nonzero, an int is big enough for the bits
17163                          * that we want.
17164                          */
17165                         result = (x != 0) ? "int" : "long";
17166                 }
17167                 fputs(result, fp);
17168                 fclose(fp);
17169         }
17170         ${cf_cv_main_return:-return}(0);
17171 }
17172
17173 _ACEOF
17174 rm -f conftest$ac_exeext
17175 if { (eval echo "$as_me:17175: \"$ac_link\"") >&5
17176   (eval $ac_link) 2>&5
17177   ac_status=$?
17178   echo "$as_me:17178: \$? = $ac_status" >&5
17179   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17180   { (eval echo "$as_me:17180: \"$ac_try\"") >&5
17181   (eval $ac_try) 2>&5
17182   ac_status=$?
17183   echo "$as_me:17183: \$? = $ac_status" >&5
17184   (exit $ac_status); }; }; then
17185   cf_cv_typeof_chtype=`cat cf_test.out`
17186 else
17187   echo "$as_me: program exited with status $ac_status" >&5
17188 echo "$as_me: failed program was:" >&5
17189 cat conftest.$ac_ext >&5
17190 cf_cv_typeof_chtype=long
17191 fi
17192 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17193 fi
17194                 rm -f cf_test.out
17195
17196 fi
17197
17198 echo "$as_me:17198: result: $cf_cv_typeof_chtype" >&5
17199 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17200
17201 cat >>confdefs.h <<EOF
17202 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17203 EOF
17204
17205 else
17206         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17207 fi
17208 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17209
17210 echo "$as_me:17210: checking if unsigned literals are legal" >&5
17211 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17212 if test "${cf_cv_unsigned_literals+set}" = set; then
17213   echo $ECHO_N "(cached) $ECHO_C" >&6
17214 else
17215
17216         cat >conftest.$ac_ext <<_ACEOF
17217 #line 17217 "configure"
17218 #include "confdefs.h"
17219
17220 int
17221 main (void)
17222 {
17223 long x = 1L + 1UL + 1U + 1
17224   ;
17225   return 0;
17226 }
17227 _ACEOF
17228 rm -f conftest.$ac_objext
17229 if { (eval echo "$as_me:17229: \"$ac_compile\"") >&5
17230   (eval $ac_compile) 2>&5
17231   ac_status=$?
17232   echo "$as_me:17232: \$? = $ac_status" >&5
17233   (exit $ac_status); } &&
17234          { ac_try='test -s conftest.$ac_objext'
17235   { (eval echo "$as_me:17235: \"$ac_try\"") >&5
17236   (eval $ac_try) 2>&5
17237   ac_status=$?
17238   echo "$as_me:17238: \$? = $ac_status" >&5
17239   (exit $ac_status); }; }; then
17240   cf_cv_unsigned_literals=yes
17241 else
17242   echo "$as_me: failed program was:" >&5
17243 cat conftest.$ac_ext >&5
17244 cf_cv_unsigned_literals=no
17245 fi
17246 rm -f conftest.$ac_objext conftest.$ac_ext
17247
17248 fi
17249
17250 echo "$as_me:17250: result: $cf_cv_unsigned_literals" >&5
17251 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17252
17253 cf_cv_1UL="1"
17254 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17255 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17256
17257 if test $NCURSES_MMASK_T = auto ; then
17258         cf_cv_typeof_mmask_t=long
17259 else
17260         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17261 fi
17262 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17263
17264 ###     Checks for external-data
17265
17266 echo "$as_me:17266: checking if external errno is declared" >&5
17267 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17268 if test "${cf_cv_dcl_errno+set}" = set; then
17269   echo $ECHO_N "(cached) $ECHO_C" >&6
17270 else
17271
17272         cat >conftest.$ac_ext <<_ACEOF
17273 #line 17273 "configure"
17274 #include "confdefs.h"
17275
17276 #ifdef HAVE_STDLIB_H
17277 #include <stdlib.h>
17278 #endif
17279 #include <stdio.h>
17280 #include <sys/types.h>
17281 #include <errno.h>
17282 int
17283 main (void)
17284 {
17285 int x = (int) errno
17286   ;
17287   return 0;
17288 }
17289 _ACEOF
17290 rm -f conftest.$ac_objext
17291 if { (eval echo "$as_me:17291: \"$ac_compile\"") >&5
17292   (eval $ac_compile) 2>&5
17293   ac_status=$?
17294   echo "$as_me:17294: \$? = $ac_status" >&5
17295   (exit $ac_status); } &&
17296          { ac_try='test -s conftest.$ac_objext'
17297   { (eval echo "$as_me:17297: \"$ac_try\"") >&5
17298   (eval $ac_try) 2>&5
17299   ac_status=$?
17300   echo "$as_me:17300: \$? = $ac_status" >&5
17301   (exit $ac_status); }; }; then
17302   cf_cv_dcl_errno=yes
17303 else
17304   echo "$as_me: failed program was:" >&5
17305 cat conftest.$ac_ext >&5
17306 cf_cv_dcl_errno=no
17307 fi
17308 rm -f conftest.$ac_objext conftest.$ac_ext
17309
17310 fi
17311 echo "$as_me:17311: result: $cf_cv_dcl_errno" >&5
17312 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17313
17314 if test "$cf_cv_dcl_errno" = no ; then
17315
17316 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17317
17318         cat >>confdefs.h <<EOF
17319 #define $cf_result 1
17320 EOF
17321
17322 fi
17323
17324 # It's possible (for near-UNIX clones) that the data doesn't exist
17325
17326 echo "$as_me:17326: checking if external errno exists" >&5
17327 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17328 if test "${cf_cv_have_errno+set}" = set; then
17329   echo $ECHO_N "(cached) $ECHO_C" >&6
17330 else
17331
17332         cat >conftest.$ac_ext <<_ACEOF
17333 #line 17333 "configure"
17334 #include "confdefs.h"
17335
17336 #undef errno
17337 extern int errno;
17338
17339 int
17340 main (void)
17341 {
17342 errno = 2
17343   ;
17344   return 0;
17345 }
17346 _ACEOF
17347 rm -f conftest.$ac_objext conftest$ac_exeext
17348 if { (eval echo "$as_me:17348: \"$ac_link\"") >&5
17349   (eval $ac_link) 2>&5
17350   ac_status=$?
17351   echo "$as_me:17351: \$? = $ac_status" >&5
17352   (exit $ac_status); } &&
17353          { ac_try='test -s conftest$ac_exeext'
17354   { (eval echo "$as_me:17354: \"$ac_try\"") >&5
17355   (eval $ac_try) 2>&5
17356   ac_status=$?
17357   echo "$as_me:17357: \$? = $ac_status" >&5
17358   (exit $ac_status); }; }; then
17359   cf_cv_have_errno=yes
17360 else
17361   echo "$as_me: failed program was:" >&5
17362 cat conftest.$ac_ext >&5
17363 cf_cv_have_errno=no
17364 fi
17365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17366
17367 fi
17368 echo "$as_me:17368: result: $cf_cv_have_errno" >&5
17369 echo "${ECHO_T}$cf_cv_have_errno" >&6
17370
17371 if test "$cf_cv_have_errno" = yes ; then
17372
17373 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17374
17375         cat >>confdefs.h <<EOF
17376 #define $cf_result 1
17377 EOF
17378
17379 fi
17380
17381 echo "$as_me:17381: checking if data-only library module links" >&5
17382 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17383 if test "${cf_cv_link_dataonly+set}" = set; then
17384   echo $ECHO_N "(cached) $ECHO_C" >&6
17385 else
17386
17387         rm -f conftest.a
17388         cat >conftest.$ac_ext <<EOF
17389 #line 17389 "configure"
17390 int     testdata[3] = { 123, 456, 789 };
17391 EOF
17392         if { (eval echo "$as_me:17392: \"$ac_compile\"") >&5
17393   (eval $ac_compile) 2>&5
17394   ac_status=$?
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit $ac_status); } ; then
17397                 mv conftest.o data.o && \
17398                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17399         fi
17400         rm -f conftest.$ac_ext data.o
17401         cat >conftest.$ac_ext <<EOF
17402 #line 17402 "configure"
17403 int     testfunc(void)
17404 {
17405 #if defined(NeXT)
17406         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17407 #else
17408         extern int testdata[3];
17409         return testdata[0] == 123
17410            &&  testdata[1] == 456
17411            &&  testdata[2] == 789;
17412 #endif
17413 }
17414 EOF
17415         if { (eval echo "$as_me:17415: \"$ac_compile\"") >&5
17416   (eval $ac_compile) 2>&5
17417   ac_status=$?
17418   echo "$as_me:17418: \$? = $ac_status" >&5
17419   (exit $ac_status); }; then
17420                 mv conftest.o func.o && \
17421                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17422         fi
17423         rm -f conftest.$ac_ext func.o
17424         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17425         cf_saveLIBS="$LIBS"
17426         LIBS="conftest.a $LIBS"
17427         if test "$cross_compiling" = yes; then
17428   cf_cv_link_dataonly=unknown
17429 else
17430   cat >conftest.$ac_ext <<_ACEOF
17431 #line 17431 "configure"
17432 #include "confdefs.h"
17433
17434         int main(void)
17435         {
17436                 extern int testfunc();
17437                 ${cf_cv_main_return:-return} (!testfunc());
17438         }
17439
17440 _ACEOF
17441 rm -f conftest$ac_exeext
17442 if { (eval echo "$as_me:17442: \"$ac_link\"") >&5
17443   (eval $ac_link) 2>&5
17444   ac_status=$?
17445   echo "$as_me:17445: \$? = $ac_status" >&5
17446   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17447   { (eval echo "$as_me:17447: \"$ac_try\"") >&5
17448   (eval $ac_try) 2>&5
17449   ac_status=$?
17450   echo "$as_me:17450: \$? = $ac_status" >&5
17451   (exit $ac_status); }; }; then
17452   cf_cv_link_dataonly=yes
17453 else
17454   echo "$as_me: program exited with status $ac_status" >&5
17455 echo "$as_me: failed program was:" >&5
17456 cat conftest.$ac_ext >&5
17457 cf_cv_link_dataonly=no
17458 fi
17459 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17460 fi
17461         LIBS="$cf_saveLIBS"
17462
17463 fi
17464
17465 echo "$as_me:17465: result: $cf_cv_link_dataonly" >&5
17466 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17467
17468 if test "$cf_cv_link_dataonly" = no ; then
17469
17470 cat >>confdefs.h <<\EOF
17471 #define BROKEN_LINKER 1
17472 EOF
17473
17474         BROKEN_LINKER=1
17475 fi
17476
17477 ###     Checks for library functions.
17478
17479 for ac_func in \
17480 getcwd \
17481 getegid \
17482 geteuid \
17483 getopt \
17484 getttynam \
17485 issetugid \
17486 poll \
17487 putenv \
17488 remove \
17489 select \
17490 setbuf \
17491 setbuffer \
17492 setenv \
17493 setvbuf \
17494 sigaction \
17495 sigvec \
17496 strdup \
17497 strstr \
17498 tcgetpgrp \
17499 tdestroy \
17500 times \
17501 tsearch \
17502 vsnprintf \
17503
17504 do
17505 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17506 echo "$as_me:17506: checking for $ac_func" >&5
17507 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17508 if eval "test \"\${$as_ac_var+set}\" = set"; then
17509   echo $ECHO_N "(cached) $ECHO_C" >&6
17510 else
17511   cat >conftest.$ac_ext <<_ACEOF
17512 #line 17512 "configure"
17513 #include "confdefs.h"
17514 /* System header to define __stub macros and hopefully few prototypes,
17515     which can conflict with char $ac_func (); below.  */
17516 #include <assert.h>
17517 /* Override any gcc2 internal prototype to avoid an error.  */
17518 #ifdef __cplusplus
17519 extern "C"
17520 #endif
17521 /* We use char because int might match the return type of a gcc2
17522    builtin and then its argument prototype would still apply.  */
17523 char $ac_func ();
17524 char (*f) ();
17525
17526 int
17527 main (void)
17528 {
17529 /* The GNU C library defines this for functions which it implements
17530     to always fail with ENOSYS.  Some functions are actually named
17531     something starting with __ and the normal name is an alias.  */
17532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17533 choke me
17534 #else
17535 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17536 #endif
17537
17538   ;
17539   return 0;
17540 }
17541 _ACEOF
17542 rm -f conftest.$ac_objext conftest$ac_exeext
17543 if { (eval echo "$as_me:17543: \"$ac_link\"") >&5
17544   (eval $ac_link) 2>&5
17545   ac_status=$?
17546   echo "$as_me:17546: \$? = $ac_status" >&5
17547   (exit $ac_status); } &&
17548          { ac_try='test -s conftest$ac_exeext'
17549   { (eval echo "$as_me:17549: \"$ac_try\"") >&5
17550   (eval $ac_try) 2>&5
17551   ac_status=$?
17552   echo "$as_me:17552: \$? = $ac_status" >&5
17553   (exit $ac_status); }; }; then
17554   eval "$as_ac_var=yes"
17555 else
17556   echo "$as_me: failed program was:" >&5
17557 cat conftest.$ac_ext >&5
17558 eval "$as_ac_var=no"
17559 fi
17560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17561 fi
17562 echo "$as_me:17562: result: `eval echo '${'$as_ac_var'}'`" >&5
17563 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17564 if test `eval echo '${'$as_ac_var'}'` = yes; then
17565   cat >>confdefs.h <<EOF
17566 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17567 EOF
17568
17569 fi
17570 done
17571
17572 if test "x$ac_cv_func_getopt" = xno && \
17573    test "x$cf_with_progs$cf_with_tests" != xnono; then
17574         { { echo "$as_me:17574: error: getopt is required for building programs" >&5
17575 echo "$as_me: error: getopt is required for building programs" >&2;}
17576    { (exit 1); exit 1; }; }
17577 fi
17578
17579 if test "x$with_getcap" = "xyes" ; then
17580
17581 echo "$as_me:17581: checking for terminal-capability database functions" >&5
17582 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17583 if test "${cf_cv_cgetent+set}" = set; then
17584   echo $ECHO_N "(cached) $ECHO_C" >&6
17585 else
17586
17587 cat >conftest.$ac_ext <<_ACEOF
17588 #line 17588 "configure"
17589 #include "confdefs.h"
17590
17591 #include <stdlib.h>
17592 int
17593 main (void)
17594 {
17595
17596         char temp[128];
17597         char *buf = temp;
17598         char *db_array = temp;
17599         cgetent(&buf, &db_array, "vt100");
17600         cgetcap(buf, "tc", '=');
17601         cgetmatch(buf, "tc");
17602
17603   ;
17604   return 0;
17605 }
17606 _ACEOF
17607 rm -f conftest.$ac_objext conftest$ac_exeext
17608 if { (eval echo "$as_me:17608: \"$ac_link\"") >&5
17609   (eval $ac_link) 2>&5
17610   ac_status=$?
17611   echo "$as_me:17611: \$? = $ac_status" >&5
17612   (exit $ac_status); } &&
17613          { ac_try='test -s conftest$ac_exeext'
17614   { (eval echo "$as_me:17614: \"$ac_try\"") >&5
17615   (eval $ac_try) 2>&5
17616   ac_status=$?
17617   echo "$as_me:17617: \$? = $ac_status" >&5
17618   (exit $ac_status); }; }; then
17619   cf_cv_cgetent=yes
17620 else
17621   echo "$as_me: failed program was:" >&5
17622 cat conftest.$ac_ext >&5
17623 cf_cv_cgetent=no
17624 fi
17625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17626
17627 fi
17628 echo "$as_me:17628: result: $cf_cv_cgetent" >&5
17629 echo "${ECHO_T}$cf_cv_cgetent" >&6
17630
17631 if test "$cf_cv_cgetent" = yes
17632 then
17633
17634 cat >>confdefs.h <<\EOF
17635 #define HAVE_BSD_CGETENT 1
17636 EOF
17637
17638 echo "$as_me:17638: checking if cgetent uses const parameter" >&5
17639 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17640 if test "${cf_cv_cgetent_const+set}" = set; then
17641   echo $ECHO_N "(cached) $ECHO_C" >&6
17642 else
17643
17644 cat >conftest.$ac_ext <<_ACEOF
17645 #line 17645 "configure"
17646 #include "confdefs.h"
17647
17648 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17649 #include <stdlib.h>
17650 int
17651 main (void)
17652 {
17653
17654         char temp[128];
17655         char *buf = temp;
17656 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17657         const char *db_array = temp;
17658         cgetent(&buf, &db_array, "vt100");
17659 #endif
17660         cgetcap(buf, "tc", '=');
17661         cgetmatch(buf, "tc");
17662
17663   ;
17664   return 0;
17665 }
17666 _ACEOF
17667 rm -f conftest.$ac_objext conftest$ac_exeext
17668 if { (eval echo "$as_me:17668: \"$ac_link\"") >&5
17669   (eval $ac_link) 2>&5
17670   ac_status=$?
17671   echo "$as_me:17671: \$? = $ac_status" >&5
17672   (exit $ac_status); } &&
17673          { ac_try='test -s conftest$ac_exeext'
17674   { (eval echo "$as_me:17674: \"$ac_try\"") >&5
17675   (eval $ac_try) 2>&5
17676   ac_status=$?
17677   echo "$as_me:17677: \$? = $ac_status" >&5
17678   (exit $ac_status); }; }; then
17679   cf_cv_cgetent_const=yes
17680 else
17681   echo "$as_me: failed program was:" >&5
17682 cat conftest.$ac_ext >&5
17683 cf_cv_cgetent_const=no
17684 fi
17685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17686
17687 fi
17688 echo "$as_me:17688: result: $cf_cv_cgetent_const" >&5
17689 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17690         if test "$cf_cv_cgetent_const" = yes
17691         then
17692
17693 cat >>confdefs.h <<EOF
17694 #define CGETENT_CONST const
17695 EOF
17696
17697         fi
17698 fi
17699
17700 fi
17701
17702 echo "$as_me:17702: checking for isascii" >&5
17703 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17704 if test "${cf_cv_have_isascii+set}" = set; then
17705   echo $ECHO_N "(cached) $ECHO_C" >&6
17706 else
17707
17708         cat >conftest.$ac_ext <<_ACEOF
17709 #line 17709 "configure"
17710 #include "confdefs.h"
17711 #include <ctype.h>
17712 int
17713 main (void)
17714 {
17715 int x = isascii(' ')
17716   ;
17717   return 0;
17718 }
17719 _ACEOF
17720 rm -f conftest.$ac_objext conftest$ac_exeext
17721 if { (eval echo "$as_me:17721: \"$ac_link\"") >&5
17722   (eval $ac_link) 2>&5
17723   ac_status=$?
17724   echo "$as_me:17724: \$? = $ac_status" >&5
17725   (exit $ac_status); } &&
17726          { ac_try='test -s conftest$ac_exeext'
17727   { (eval echo "$as_me:17727: \"$ac_try\"") >&5
17728   (eval $ac_try) 2>&5
17729   ac_status=$?
17730   echo "$as_me:17730: \$? = $ac_status" >&5
17731   (exit $ac_status); }; }; then
17732   cf_cv_have_isascii=yes
17733 else
17734   echo "$as_me: failed program was:" >&5
17735 cat conftest.$ac_ext >&5
17736 cf_cv_have_isascii=no
17737 fi
17738 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17739
17740 fi
17741 echo "$as_me:17741: result: $cf_cv_have_isascii" >&5
17742 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17743 test "$cf_cv_have_isascii" = yes &&
17744 cat >>confdefs.h <<\EOF
17745 #define HAVE_ISASCII 1
17746 EOF
17747
17748 if test "$ac_cv_func_sigaction" = yes; then
17749 echo "$as_me:17749: checking whether sigaction needs _POSIX_SOURCE" >&5
17750 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17751 cat >conftest.$ac_ext <<_ACEOF
17752 #line 17752 "configure"
17753 #include "confdefs.h"
17754
17755 #include <sys/types.h>
17756 #include <signal.h>
17757 int
17758 main (void)
17759 {
17760 struct sigaction act
17761   ;
17762   return 0;
17763 }
17764 _ACEOF
17765 rm -f conftest.$ac_objext
17766 if { (eval echo "$as_me:17766: \"$ac_compile\"") >&5
17767   (eval $ac_compile) 2>&5
17768   ac_status=$?
17769   echo "$as_me:17769: \$? = $ac_status" >&5
17770   (exit $ac_status); } &&
17771          { ac_try='test -s conftest.$ac_objext'
17772   { (eval echo "$as_me:17772: \"$ac_try\"") >&5
17773   (eval $ac_try) 2>&5
17774   ac_status=$?
17775   echo "$as_me:17775: \$? = $ac_status" >&5
17776   (exit $ac_status); }; }; then
17777   sigact_bad=no
17778 else
17779   echo "$as_me: failed program was:" >&5
17780 cat conftest.$ac_ext >&5
17781
17782 cat >conftest.$ac_ext <<_ACEOF
17783 #line 17783 "configure"
17784 #include "confdefs.h"
17785
17786 #define _POSIX_SOURCE
17787 #include <sys/types.h>
17788 #include <signal.h>
17789 int
17790 main (void)
17791 {
17792 struct sigaction act
17793   ;
17794   return 0;
17795 }
17796 _ACEOF
17797 rm -f conftest.$ac_objext
17798 if { (eval echo "$as_me:17798: \"$ac_compile\"") >&5
17799   (eval $ac_compile) 2>&5
17800   ac_status=$?
17801   echo "$as_me:17801: \$? = $ac_status" >&5
17802   (exit $ac_status); } &&
17803          { ac_try='test -s conftest.$ac_objext'
17804   { (eval echo "$as_me:17804: \"$ac_try\"") >&5
17805   (eval $ac_try) 2>&5
17806   ac_status=$?
17807   echo "$as_me:17807: \$? = $ac_status" >&5
17808   (exit $ac_status); }; }; then
17809   sigact_bad=yes
17810
17811 cat >>confdefs.h <<\EOF
17812 #define _POSIX_SOURCE 1
17813 EOF
17814
17815 else
17816   echo "$as_me: failed program was:" >&5
17817 cat conftest.$ac_ext >&5
17818 sigact_bad=unknown
17819 fi
17820 rm -f conftest.$ac_objext conftest.$ac_ext
17821 fi
17822 rm -f conftest.$ac_objext conftest.$ac_ext
17823 echo "$as_me:17823: result: $sigact_bad" >&5
17824 echo "${ECHO_T}$sigact_bad" >&6
17825 fi
17826
17827 echo "$as_me:17827: checking if nanosleep really works" >&5
17828 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17829 if test "${cf_cv_func_nanosleep+set}" = set; then
17830   echo $ECHO_N "(cached) $ECHO_C" >&6
17831 else
17832
17833 if test "$cross_compiling" = yes; then
17834   cf_cv_func_nanosleep=unknown
17835 else
17836   cat >conftest.$ac_ext <<_ACEOF
17837 #line 17837 "configure"
17838 #include "confdefs.h"
17839
17840 #include <stdio.h>
17841 #include <errno.h>
17842 #include <time.h>
17843
17844 #ifdef HAVE_SYS_TIME_H
17845 #include <sys/time.h>
17846 #endif
17847
17848 int main(void) {
17849         struct timespec ts1, ts2;
17850         int code;
17851         ts1.tv_sec  = 0;
17852         ts1.tv_nsec = 750000000;
17853         ts2.tv_sec  = 0;
17854         ts2.tv_nsec = 0;
17855         errno = 0;
17856         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17857         ${cf_cv_main_return:-return}(code != 0);
17858 }
17859
17860 _ACEOF
17861 rm -f conftest$ac_exeext
17862 if { (eval echo "$as_me:17862: \"$ac_link\"") >&5
17863   (eval $ac_link) 2>&5
17864   ac_status=$?
17865   echo "$as_me:17865: \$? = $ac_status" >&5
17866   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17867   { (eval echo "$as_me:17867: \"$ac_try\"") >&5
17868   (eval $ac_try) 2>&5
17869   ac_status=$?
17870   echo "$as_me:17870: \$? = $ac_status" >&5
17871   (exit $ac_status); }; }; then
17872   cf_cv_func_nanosleep=yes
17873 else
17874   echo "$as_me: program exited with status $ac_status" >&5
17875 echo "$as_me: failed program was:" >&5
17876 cat conftest.$ac_ext >&5
17877 cf_cv_func_nanosleep=no
17878 fi
17879 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17880 fi
17881 fi
17882 echo "$as_me:17882: result: $cf_cv_func_nanosleep" >&5
17883 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17884
17885 test "$cf_cv_func_nanosleep" = "yes" &&
17886 cat >>confdefs.h <<\EOF
17887 #define HAVE_NANOSLEEP 1
17888 EOF
17889
17890 for ac_header in \
17891 termio.h \
17892 termios.h \
17893 unistd.h \
17894
17895 do
17896 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17897 echo "$as_me:17897: checking for $ac_header" >&5
17898 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17899 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17900   echo $ECHO_N "(cached) $ECHO_C" >&6
17901 else
17902   cat >conftest.$ac_ext <<_ACEOF
17903 #line 17903 "configure"
17904 #include "confdefs.h"
17905 #include <$ac_header>
17906 _ACEOF
17907 if { (eval echo "$as_me:17907: \"$ac_cpp conftest.$ac_ext\"") >&5
17908   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17909   ac_status=$?
17910   egrep -v '^ *\+' conftest.er1 >conftest.err
17911   rm -f conftest.er1
17912   cat conftest.err >&5
17913   echo "$as_me:17913: \$? = $ac_status" >&5
17914   (exit $ac_status); } >/dev/null; then
17915   if test -s conftest.err; then
17916     ac_cpp_err=$ac_c_preproc_warn_flag
17917   else
17918     ac_cpp_err=
17919   fi
17920 else
17921   ac_cpp_err=yes
17922 fi
17923 if test -z "$ac_cpp_err"; then
17924   eval "$as_ac_Header=yes"
17925 else
17926   echo "$as_me: failed program was:" >&5
17927   cat conftest.$ac_ext >&5
17928   eval "$as_ac_Header=no"
17929 fi
17930 rm -f conftest.err conftest.$ac_ext
17931 fi
17932 echo "$as_me:17932: result: `eval echo '${'$as_ac_Header'}'`" >&5
17933 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17934 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17935   cat >>confdefs.h <<EOF
17936 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17937 EOF
17938
17939 fi
17940 done
17941
17942 if test "$ISC" = yes ; then
17943
17944 for ac_header in sys/termio.h
17945 do
17946 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17947 echo "$as_me:17947: checking for $ac_header" >&5
17948 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17949 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17950   echo $ECHO_N "(cached) $ECHO_C" >&6
17951 else
17952   cat >conftest.$ac_ext <<_ACEOF
17953 #line 17953 "configure"
17954 #include "confdefs.h"
17955 #include <$ac_header>
17956 _ACEOF
17957 if { (eval echo "$as_me:17957: \"$ac_cpp conftest.$ac_ext\"") >&5
17958   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17959   ac_status=$?
17960   egrep -v '^ *\+' conftest.er1 >conftest.err
17961   rm -f conftest.er1
17962   cat conftest.err >&5
17963   echo "$as_me:17963: \$? = $ac_status" >&5
17964   (exit $ac_status); } >/dev/null; then
17965   if test -s conftest.err; then
17966     ac_cpp_err=$ac_c_preproc_warn_flag
17967   else
17968     ac_cpp_err=
17969   fi
17970 else
17971   ac_cpp_err=yes
17972 fi
17973 if test -z "$ac_cpp_err"; then
17974   eval "$as_ac_Header=yes"
17975 else
17976   echo "$as_me: failed program was:" >&5
17977   cat conftest.$ac_ext >&5
17978   eval "$as_ac_Header=no"
17979 fi
17980 rm -f conftest.err conftest.$ac_ext
17981 fi
17982 echo "$as_me:17982: result: `eval echo '${'$as_ac_Header'}'`" >&5
17983 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17984 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17985   cat >>confdefs.h <<EOF
17986 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17987 EOF
17988
17989 fi
17990 done
17991
17992 fi
17993 if test "$ac_cv_header_termios_h" = yes ; then
17994         case "$CFLAGS $CPPFLAGS" in
17995         (*-D_POSIX_SOURCE*)
17996                 termios_bad=dunno ;;
17997         (*)     termios_bad=maybe ;;
17998         esac
17999         if test "$termios_bad" = maybe ; then
18000         echo "$as_me:18000: checking whether termios.h needs _POSIX_SOURCE" >&5
18001 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
18002         cat >conftest.$ac_ext <<_ACEOF
18003 #line 18003 "configure"
18004 #include "confdefs.h"
18005 #include <termios.h>
18006 int
18007 main (void)
18008 {
18009 struct termios foo; int x = foo.c_iflag
18010   ;
18011   return 0;
18012 }
18013 _ACEOF
18014 rm -f conftest.$ac_objext
18015 if { (eval echo "$as_me:18015: \"$ac_compile\"") >&5
18016   (eval $ac_compile) 2>&5
18017   ac_status=$?
18018   echo "$as_me:18018: \$? = $ac_status" >&5
18019   (exit $ac_status); } &&
18020          { ac_try='test -s conftest.$ac_objext'
18021   { (eval echo "$as_me:18021: \"$ac_try\"") >&5
18022   (eval $ac_try) 2>&5
18023   ac_status=$?
18024   echo "$as_me:18024: \$? = $ac_status" >&5
18025   (exit $ac_status); }; }; then
18026   termios_bad=no
18027 else
18028   echo "$as_me: failed program was:" >&5
18029 cat conftest.$ac_ext >&5
18030
18031                 cat >conftest.$ac_ext <<_ACEOF
18032 #line 18032 "configure"
18033 #include "confdefs.h"
18034
18035 #define _POSIX_SOURCE
18036 #include <termios.h>
18037 int
18038 main (void)
18039 {
18040 struct termios foo; int x = foo.c_iflag
18041   ;
18042   return 0;
18043 }
18044 _ACEOF
18045 rm -f conftest.$ac_objext
18046 if { (eval echo "$as_me:18046: \"$ac_compile\"") >&5
18047   (eval $ac_compile) 2>&5
18048   ac_status=$?
18049   echo "$as_me:18049: \$? = $ac_status" >&5
18050   (exit $ac_status); } &&
18051          { ac_try='test -s conftest.$ac_objext'
18052   { (eval echo "$as_me:18052: \"$ac_try\"") >&5
18053   (eval $ac_try) 2>&5
18054   ac_status=$?
18055   echo "$as_me:18055: \$? = $ac_status" >&5
18056   (exit $ac_status); }; }; then
18057   termios_bad=unknown
18058 else
18059   echo "$as_me: failed program was:" >&5
18060 cat conftest.$ac_ext >&5
18061 termios_bad=yes
18062 cat >>confdefs.h <<\EOF
18063 #define _POSIX_SOURCE 1
18064 EOF
18065
18066 fi
18067 rm -f conftest.$ac_objext conftest.$ac_ext
18068
18069 fi
18070 rm -f conftest.$ac_objext conftest.$ac_ext
18071         echo "$as_me:18071: result: $termios_bad" >&5
18072 echo "${ECHO_T}$termios_bad" >&6
18073         fi
18074 fi
18075
18076 echo "$as_me:18076: checking for tcgetattr" >&5
18077 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
18078 if test "${cf_cv_have_tcgetattr+set}" = set; then
18079   echo $ECHO_N "(cached) $ECHO_C" >&6
18080 else
18081
18082 cat >conftest.$ac_ext <<_ACEOF
18083 #line 18083 "configure"
18084 #include "confdefs.h"
18085
18086 #include <sys/types.h>
18087 #ifdef HAVE_UNISTD_H
18088 #include <unistd.h>
18089 #endif
18090 #ifdef HAVE_TERMIOS_H
18091 #include <termios.h>
18092 #define TTY struct termios
18093 #else
18094 #ifdef HAVE_TERMIO_H
18095 #include <termio.h>
18096 #define TTY struct termio
18097 #endif
18098 #endif
18099
18100 int
18101 main (void)
18102 {
18103
18104 TTY foo;
18105 tcgetattr(1, &foo);
18106   ;
18107   return 0;
18108 }
18109 _ACEOF
18110 rm -f conftest.$ac_objext conftest$ac_exeext
18111 if { (eval echo "$as_me:18111: \"$ac_link\"") >&5
18112   (eval $ac_link) 2>&5
18113   ac_status=$?
18114   echo "$as_me:18114: \$? = $ac_status" >&5
18115   (exit $ac_status); } &&
18116          { ac_try='test -s conftest$ac_exeext'
18117   { (eval echo "$as_me:18117: \"$ac_try\"") >&5
18118   (eval $ac_try) 2>&5
18119   ac_status=$?
18120   echo "$as_me:18120: \$? = $ac_status" >&5
18121   (exit $ac_status); }; }; then
18122   cf_cv_have_tcgetattr=yes
18123 else
18124   echo "$as_me: failed program was:" >&5
18125 cat conftest.$ac_ext >&5
18126 cf_cv_have_tcgetattr=no
18127 fi
18128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18129 fi
18130 echo "$as_me:18130: result: $cf_cv_have_tcgetattr" >&5
18131 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
18132 test "$cf_cv_have_tcgetattr" = yes &&
18133 cat >>confdefs.h <<\EOF
18134 #define HAVE_TCGETATTR 1
18135 EOF
18136
18137 echo "$as_me:18137: checking for vsscanf function or workaround" >&5
18138 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
18139 if test "${cf_cv_func_vsscanf+set}" = set; then
18140   echo $ECHO_N "(cached) $ECHO_C" >&6
18141 else
18142
18143 cat >conftest.$ac_ext <<_ACEOF
18144 #line 18144 "configure"
18145 #include "confdefs.h"
18146
18147 #include <stdarg.h>
18148 #include <stdio.h>
18149 int
18150 main (void)
18151 {
18152
18153         va_list ap;
18154         vsscanf("from", "%d", ap)
18155   ;
18156   return 0;
18157 }
18158 _ACEOF
18159 rm -f conftest.$ac_objext conftest$ac_exeext
18160 if { (eval echo "$as_me:18160: \"$ac_link\"") >&5
18161   (eval $ac_link) 2>&5
18162   ac_status=$?
18163   echo "$as_me:18163: \$? = $ac_status" >&5
18164   (exit $ac_status); } &&
18165          { ac_try='test -s conftest$ac_exeext'
18166   { (eval echo "$as_me:18166: \"$ac_try\"") >&5
18167   (eval $ac_try) 2>&5
18168   ac_status=$?
18169   echo "$as_me:18169: \$? = $ac_status" >&5
18170   (exit $ac_status); }; }; then
18171   cf_cv_func_vsscanf=vsscanf
18172 else
18173   echo "$as_me: failed program was:" >&5
18174 cat conftest.$ac_ext >&5
18175
18176 cat >conftest.$ac_ext <<_ACEOF
18177 #line 18177 "configure"
18178 #include "confdefs.h"
18179
18180 #include <stdarg.h>
18181 #include <stdio.h>
18182 int
18183 main (void)
18184 {
18185
18186         FILE strbuf;
18187         char *str = "from";
18188
18189         strbuf._flag = _IOREAD;
18190         strbuf._ptr = strbuf._base = (unsigned char *) str;
18191         strbuf._cnt = strlen(str);
18192         strbuf._file = _NFILE;
18193         return (vfscanf(&strbuf, "%d", ap))
18194   ;
18195   return 0;
18196 }
18197 _ACEOF
18198 rm -f conftest.$ac_objext conftest$ac_exeext
18199 if { (eval echo "$as_me:18199: \"$ac_link\"") >&5
18200   (eval $ac_link) 2>&5
18201   ac_status=$?
18202   echo "$as_me:18202: \$? = $ac_status" >&5
18203   (exit $ac_status); } &&
18204          { ac_try='test -s conftest$ac_exeext'
18205   { (eval echo "$as_me:18205: \"$ac_try\"") >&5
18206   (eval $ac_try) 2>&5
18207   ac_status=$?
18208   echo "$as_me:18208: \$? = $ac_status" >&5
18209   (exit $ac_status); }; }; then
18210   cf_cv_func_vsscanf=vfscanf
18211 else
18212   echo "$as_me: failed program was:" >&5
18213 cat conftest.$ac_ext >&5
18214
18215 cat >conftest.$ac_ext <<_ACEOF
18216 #line 18216 "configure"
18217 #include "confdefs.h"
18218
18219 #include <stdarg.h>
18220 #include <stdio.h>
18221 int
18222 main (void)
18223 {
18224
18225         FILE strbuf;
18226         char *str = "from";
18227
18228         strbuf._flag = _IOREAD;
18229         strbuf._ptr = strbuf._base = (unsigned char *) str;
18230         strbuf._cnt = strlen(str);
18231         strbuf._file = _NFILE;
18232         return (_doscan(&strbuf, "%d", ap))
18233   ;
18234   return 0;
18235 }
18236 _ACEOF
18237 rm -f conftest.$ac_objext conftest$ac_exeext
18238 if { (eval echo "$as_me:18238: \"$ac_link\"") >&5
18239   (eval $ac_link) 2>&5
18240   ac_status=$?
18241   echo "$as_me:18241: \$? = $ac_status" >&5
18242   (exit $ac_status); } &&
18243          { ac_try='test -s conftest$ac_exeext'
18244   { (eval echo "$as_me:18244: \"$ac_try\"") >&5
18245   (eval $ac_try) 2>&5
18246   ac_status=$?
18247   echo "$as_me:18247: \$? = $ac_status" >&5
18248   (exit $ac_status); }; }; then
18249   cf_cv_func_vsscanf=_doscan
18250 else
18251   echo "$as_me: failed program was:" >&5
18252 cat conftest.$ac_ext >&5
18253
18254 cf_cv_func_vsscanf=no
18255 fi
18256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18257 fi
18258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18259 fi
18260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18261 fi
18262 echo "$as_me:18262: result: $cf_cv_func_vsscanf" >&5
18263 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18264
18265 case $cf_cv_func_vsscanf in
18266 (vsscanf)
18267 cat >>confdefs.h <<\EOF
18268 #define HAVE_VSSCANF 1
18269 EOF
18270 ;;
18271 (vfscanf)
18272 cat >>confdefs.h <<\EOF
18273 #define HAVE_VFSCANF 1
18274 EOF
18275 ;;
18276 (_doscan)
18277 cat >>confdefs.h <<\EOF
18278 #define HAVE__DOSCAN 1
18279 EOF
18280 ;;
18281 esac
18282
18283 for ac_header in \
18284 unistd.h \
18285
18286 do
18287 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18288 echo "$as_me:18288: checking for $ac_header" >&5
18289 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18290 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18291   echo $ECHO_N "(cached) $ECHO_C" >&6
18292 else
18293   cat >conftest.$ac_ext <<_ACEOF
18294 #line 18294 "configure"
18295 #include "confdefs.h"
18296 #include <$ac_header>
18297 _ACEOF
18298 if { (eval echo "$as_me:18298: \"$ac_cpp conftest.$ac_ext\"") >&5
18299   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18300   ac_status=$?
18301   egrep -v '^ *\+' conftest.er1 >conftest.err
18302   rm -f conftest.er1
18303   cat conftest.err >&5
18304   echo "$as_me:18304: \$? = $ac_status" >&5
18305   (exit $ac_status); } >/dev/null; then
18306   if test -s conftest.err; then
18307     ac_cpp_err=$ac_c_preproc_warn_flag
18308   else
18309     ac_cpp_err=
18310   fi
18311 else
18312   ac_cpp_err=yes
18313 fi
18314 if test -z "$ac_cpp_err"; then
18315   eval "$as_ac_Header=yes"
18316 else
18317   echo "$as_me: failed program was:" >&5
18318   cat conftest.$ac_ext >&5
18319   eval "$as_ac_Header=no"
18320 fi
18321 rm -f conftest.err conftest.$ac_ext
18322 fi
18323 echo "$as_me:18323: result: `eval echo '${'$as_ac_Header'}'`" >&5
18324 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18325 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18326   cat >>confdefs.h <<EOF
18327 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18328 EOF
18329
18330 fi
18331 done
18332
18333 echo "$as_me:18333: checking for working mkstemp" >&5
18334 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18335 if test "${cf_cv_func_mkstemp+set}" = set; then
18336   echo $ECHO_N "(cached) $ECHO_C" >&6
18337 else
18338
18339 rm -rf conftest*
18340 if test "$cross_compiling" = yes; then
18341   cf_cv_func_mkstemp=maybe
18342 else
18343   cat >conftest.$ac_ext <<_ACEOF
18344 #line 18344 "configure"
18345 #include "confdefs.h"
18346
18347 #include <sys/types.h>
18348 #ifdef HAVE_UNISTD_H
18349 #include <unistd.h>
18350 #endif
18351 #include <stdlib.h>
18352 #include <stdio.h>
18353 #include <string.h>
18354 #include <sys/stat.h>
18355 int main(void)
18356 {
18357         char *tmpl = "conftestXXXXXX";
18358         char name[2][80];
18359         int n;
18360         int result = 0;
18361         int fd;
18362         struct stat sb;
18363
18364         umask(077);
18365         for (n = 0; n < 2; ++n) {
18366                 strcpy(name[n], tmpl);
18367                 if ((fd = mkstemp(name[n])) >= 0) {
18368                         if (!strcmp(name[n], tmpl)
18369                          || stat(name[n], &sb) != 0
18370                          || (sb.st_mode & S_IFMT) != S_IFREG
18371                          || (sb.st_mode & 077) != 0) {
18372                                 result = 1;
18373                         }
18374                         close(fd);
18375                 }
18376         }
18377         if (result == 0
18378          && !strcmp(name[0], name[1]))
18379                 result = 1;
18380         ${cf_cv_main_return:-return}(result);
18381 }
18382
18383 _ACEOF
18384 rm -f conftest$ac_exeext
18385 if { (eval echo "$as_me:18385: \"$ac_link\"") >&5
18386   (eval $ac_link) 2>&5
18387   ac_status=$?
18388   echo "$as_me:18388: \$? = $ac_status" >&5
18389   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18390   { (eval echo "$as_me:18390: \"$ac_try\"") >&5
18391   (eval $ac_try) 2>&5
18392   ac_status=$?
18393   echo "$as_me:18393: \$? = $ac_status" >&5
18394   (exit $ac_status); }; }; then
18395   cf_cv_func_mkstemp=yes
18396
18397 else
18398   echo "$as_me: program exited with status $ac_status" >&5
18399 echo "$as_me: failed program was:" >&5
18400 cat conftest.$ac_ext >&5
18401 cf_cv_func_mkstemp=no
18402
18403 fi
18404 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18405 fi
18406
18407 fi
18408 echo "$as_me:18408: result: $cf_cv_func_mkstemp" >&5
18409 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18410 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18411         echo "$as_me:18411: checking for mkstemp" >&5
18412 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18413 if test "${ac_cv_func_mkstemp+set}" = set; then
18414   echo $ECHO_N "(cached) $ECHO_C" >&6
18415 else
18416   cat >conftest.$ac_ext <<_ACEOF
18417 #line 18417 "configure"
18418 #include "confdefs.h"
18419 /* System header to define __stub macros and hopefully few prototypes,
18420     which can conflict with char mkstemp (); below.  */
18421 #include <assert.h>
18422 /* Override any gcc2 internal prototype to avoid an error.  */
18423 #ifdef __cplusplus
18424 extern "C"
18425 #endif
18426 /* We use char because int might match the return type of a gcc2
18427    builtin and then its argument prototype would still apply.  */
18428 char mkstemp ();
18429 char (*f) ();
18430
18431 int
18432 main (void)
18433 {
18434 /* The GNU C library defines this for functions which it implements
18435     to always fail with ENOSYS.  Some functions are actually named
18436     something starting with __ and the normal name is an alias.  */
18437 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18438 choke me
18439 #else
18440 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18441 #endif
18442
18443   ;
18444   return 0;
18445 }
18446 _ACEOF
18447 rm -f conftest.$ac_objext conftest$ac_exeext
18448 if { (eval echo "$as_me:18448: \"$ac_link\"") >&5
18449   (eval $ac_link) 2>&5
18450   ac_status=$?
18451   echo "$as_me:18451: \$? = $ac_status" >&5
18452   (exit $ac_status); } &&
18453          { ac_try='test -s conftest$ac_exeext'
18454   { (eval echo "$as_me:18454: \"$ac_try\"") >&5
18455   (eval $ac_try) 2>&5
18456   ac_status=$?
18457   echo "$as_me:18457: \$? = $ac_status" >&5
18458   (exit $ac_status); }; }; then
18459   ac_cv_func_mkstemp=yes
18460 else
18461   echo "$as_me: failed program was:" >&5
18462 cat conftest.$ac_ext >&5
18463 ac_cv_func_mkstemp=no
18464 fi
18465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18466 fi
18467 echo "$as_me:18467: result: $ac_cv_func_mkstemp" >&5
18468 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18469
18470 fi
18471 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18472
18473 cat >>confdefs.h <<\EOF
18474 #define HAVE_MKSTEMP 1
18475 EOF
18476
18477 fi
18478
18479 # setup for prototype of fallback for vsscanf()
18480
18481 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18482         HAVE_VSSCANF=1
18483 else
18484         HAVE_VSSCANF=0
18485 fi
18486
18487 if test "x$cross_compiling" = xyes ; then
18488         { echo "$as_me:18488: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18489 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18490 else
18491         echo "$as_me:18491: checking whether setvbuf arguments are reversed" >&5
18492 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18493 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18494   echo $ECHO_N "(cached) $ECHO_C" >&6
18495 else
18496   if test "$cross_compiling" = yes; then
18497   { { echo "$as_me:18497: error: cannot run test program while cross compiling" >&5
18498 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18499    { (exit 1); exit 1; }; }
18500 else
18501   cat >conftest.$ac_ext <<_ACEOF
18502 #line 18502 "configure"
18503 #include "confdefs.h"
18504 #include <stdio.h>
18505 /* If setvbuf has the reversed format, exit 0. */
18506 int
18507 main (void)
18508 {
18509   /* This call has the arguments reversed.
18510      A reversed system may check and see that the address of main
18511      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18512   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18513     $ac_main_return(1);
18514   putc('\r', stdout);
18515   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18516 }
18517 _ACEOF
18518 rm -f conftest$ac_exeext
18519 if { (eval echo "$as_me:18519: \"$ac_link\"") >&5
18520   (eval $ac_link) 2>&5
18521   ac_status=$?
18522   echo "$as_me:18522: \$? = $ac_status" >&5
18523   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18524   { (eval echo "$as_me:18524: \"$ac_try\"") >&5
18525   (eval $ac_try) 2>&5
18526   ac_status=$?
18527   echo "$as_me:18527: \$? = $ac_status" >&5
18528   (exit $ac_status); }; }; then
18529   ac_cv_func_setvbuf_reversed=yes
18530 else
18531   echo "$as_me: program exited with status $ac_status" >&5
18532 echo "$as_me: failed program was:" >&5
18533 cat conftest.$ac_ext >&5
18534 ac_cv_func_setvbuf_reversed=no
18535 fi
18536 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18537 fi
18538 rm -f core core.* *.core
18539 fi
18540 echo "$as_me:18540: result: $ac_cv_func_setvbuf_reversed" >&5
18541 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18542 if test $ac_cv_func_setvbuf_reversed = yes; then
18543
18544 cat >>confdefs.h <<\EOF
18545 #define SETVBUF_REVERSED 1
18546 EOF
18547
18548 fi
18549
18550 fi
18551 echo "$as_me:18551: checking for intptr_t" >&5
18552 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18553 if test "${ac_cv_type_intptr_t+set}" = set; then
18554   echo $ECHO_N "(cached) $ECHO_C" >&6
18555 else
18556   cat >conftest.$ac_ext <<_ACEOF
18557 #line 18557 "configure"
18558 #include "confdefs.h"
18559 $ac_includes_default
18560 int
18561 main (void)
18562 {
18563 if ((intptr_t *) 0)
18564   return 0;
18565 if (sizeof (intptr_t))
18566   return 0;
18567   ;
18568   return 0;
18569 }
18570 _ACEOF
18571 rm -f conftest.$ac_objext
18572 if { (eval echo "$as_me:18572: \"$ac_compile\"") >&5
18573   (eval $ac_compile) 2>&5
18574   ac_status=$?
18575   echo "$as_me:18575: \$? = $ac_status" >&5
18576   (exit $ac_status); } &&
18577          { ac_try='test -s conftest.$ac_objext'
18578   { (eval echo "$as_me:18578: \"$ac_try\"") >&5
18579   (eval $ac_try) 2>&5
18580   ac_status=$?
18581   echo "$as_me:18581: \$? = $ac_status" >&5
18582   (exit $ac_status); }; }; then
18583   ac_cv_type_intptr_t=yes
18584 else
18585   echo "$as_me: failed program was:" >&5
18586 cat conftest.$ac_ext >&5
18587 ac_cv_type_intptr_t=no
18588 fi
18589 rm -f conftest.$ac_objext conftest.$ac_ext
18590 fi
18591 echo "$as_me:18591: result: $ac_cv_type_intptr_t" >&5
18592 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18593 if test $ac_cv_type_intptr_t = yes; then
18594   :
18595 else
18596
18597 cat >>confdefs.h <<EOF
18598 #define intptr_t long
18599 EOF
18600
18601 fi
18602
18603 echo "$as_me:18603: checking for ssize_t" >&5
18604 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18605 if test "${ac_cv_type_ssize_t+set}" = set; then
18606   echo $ECHO_N "(cached) $ECHO_C" >&6
18607 else
18608   cat >conftest.$ac_ext <<_ACEOF
18609 #line 18609 "configure"
18610 #include "confdefs.h"
18611 $ac_includes_default
18612 int
18613 main (void)
18614 {
18615 if ((ssize_t *) 0)
18616   return 0;
18617 if (sizeof (ssize_t))
18618   return 0;
18619   ;
18620   return 0;
18621 }
18622 _ACEOF
18623 rm -f conftest.$ac_objext
18624 if { (eval echo "$as_me:18624: \"$ac_compile\"") >&5
18625   (eval $ac_compile) 2>&5
18626   ac_status=$?
18627   echo "$as_me:18627: \$? = $ac_status" >&5
18628   (exit $ac_status); } &&
18629          { ac_try='test -s conftest.$ac_objext'
18630   { (eval echo "$as_me:18630: \"$ac_try\"") >&5
18631   (eval $ac_try) 2>&5
18632   ac_status=$?
18633   echo "$as_me:18633: \$? = $ac_status" >&5
18634   (exit $ac_status); }; }; then
18635   ac_cv_type_ssize_t=yes
18636 else
18637   echo "$as_me: failed program was:" >&5
18638 cat conftest.$ac_ext >&5
18639 ac_cv_type_ssize_t=no
18640 fi
18641 rm -f conftest.$ac_objext conftest.$ac_ext
18642 fi
18643 echo "$as_me:18643: result: $ac_cv_type_ssize_t" >&5
18644 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18645 if test $ac_cv_type_ssize_t = yes; then
18646   :
18647 else
18648
18649 cat >>confdefs.h <<EOF
18650 #define ssize_t int
18651 EOF
18652
18653 fi
18654
18655 echo "$as_me:18655: checking for type sigaction_t" >&5
18656 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18657 if test "${cf_cv_type_sigaction+set}" = set; then
18658   echo $ECHO_N "(cached) $ECHO_C" >&6
18659 else
18660
18661         cat >conftest.$ac_ext <<_ACEOF
18662 #line 18662 "configure"
18663 #include "confdefs.h"
18664
18665 #include <signal.h>
18666 int
18667 main (void)
18668 {
18669 sigaction_t x
18670   ;
18671   return 0;
18672 }
18673 _ACEOF
18674 rm -f conftest.$ac_objext
18675 if { (eval echo "$as_me:18675: \"$ac_compile\"") >&5
18676   (eval $ac_compile) 2>&5
18677   ac_status=$?
18678   echo "$as_me:18678: \$? = $ac_status" >&5
18679   (exit $ac_status); } &&
18680          { ac_try='test -s conftest.$ac_objext'
18681   { (eval echo "$as_me:18681: \"$ac_try\"") >&5
18682   (eval $ac_try) 2>&5
18683   ac_status=$?
18684   echo "$as_me:18684: \$? = $ac_status" >&5
18685   (exit $ac_status); }; }; then
18686   cf_cv_type_sigaction=yes
18687 else
18688   echo "$as_me: failed program was:" >&5
18689 cat conftest.$ac_ext >&5
18690 cf_cv_type_sigaction=no
18691 fi
18692 rm -f conftest.$ac_objext conftest.$ac_ext
18693 fi
18694
18695 echo "$as_me:18695: result: $cf_cv_type_sigaction" >&5
18696 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18697 test "$cf_cv_type_sigaction" = yes &&
18698 cat >>confdefs.h <<\EOF
18699 #define HAVE_TYPE_SIGACTION 1
18700 EOF
18701
18702 echo "$as_me:18702: checking declaration of size-change" >&5
18703 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18704 if test "${cf_cv_sizechange+set}" = set; then
18705   echo $ECHO_N "(cached) $ECHO_C" >&6
18706 else
18707
18708         cf_cv_sizechange=unknown
18709         cf_save_CPPFLAGS="$CPPFLAGS"
18710
18711 for cf_opts in "" "NEED_PTEM_H"
18712 do
18713
18714         CPPFLAGS="$cf_save_CPPFLAGS"
18715         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18716         cat >conftest.$ac_ext <<_ACEOF
18717 #line 18717 "configure"
18718 #include "confdefs.h"
18719 #include <sys/types.h>
18720 #ifdef HAVE_TERMIOS_H
18721 #include <termios.h>
18722 #else
18723 #ifdef HAVE_TERMIO_H
18724 #include <termio.h>
18725 #endif
18726 #endif
18727 #ifdef NEED_PTEM_H
18728 /* This is a workaround for SCO:  they neglected to define struct winsize in
18729  * termios.h -- it's only in termio.h and ptem.h
18730  */
18731 #include        <sys/stream.h>
18732 #include        <sys/ptem.h>
18733 #endif
18734 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18735 #include <sys/ioctl.h>
18736 #endif
18737
18738 int
18739 main (void)
18740 {
18741
18742 #ifdef TIOCGSIZE
18743         struct ttysize win;     /* FIXME: what system is this? */
18744         int y = win.ts_lines;
18745         int x = win.ts_cols;
18746 #else
18747 #ifdef TIOCGWINSZ
18748         struct winsize win;
18749         int y = win.ws_row;
18750         int x = win.ws_col;
18751 #else
18752         no TIOCGSIZE or TIOCGWINSZ
18753 #endif /* TIOCGWINSZ */
18754 #endif /* TIOCGSIZE */
18755
18756   ;
18757   return 0;
18758 }
18759 _ACEOF
18760 rm -f conftest.$ac_objext
18761 if { (eval echo "$as_me:18761: \"$ac_compile\"") >&5
18762   (eval $ac_compile) 2>&5
18763   ac_status=$?
18764   echo "$as_me:18764: \$? = $ac_status" >&5
18765   (exit $ac_status); } &&
18766          { ac_try='test -s conftest.$ac_objext'
18767   { (eval echo "$as_me:18767: \"$ac_try\"") >&5
18768   (eval $ac_try) 2>&5
18769   ac_status=$?
18770   echo "$as_me:18770: \$? = $ac_status" >&5
18771   (exit $ac_status); }; }; then
18772   cf_cv_sizechange=yes
18773 else
18774   echo "$as_me: failed program was:" >&5
18775 cat conftest.$ac_ext >&5
18776 cf_cv_sizechange=no
18777 fi
18778 rm -f conftest.$ac_objext conftest.$ac_ext
18779
18780         CPPFLAGS="$cf_save_CPPFLAGS"
18781         if test "$cf_cv_sizechange" = yes ; then
18782                 echo "size-change succeeded ($cf_opts)" >&5
18783                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18784                 break
18785         fi
18786 done
18787
18788 fi
18789 echo "$as_me:18789: result: $cf_cv_sizechange" >&5
18790 echo "${ECHO_T}$cf_cv_sizechange" >&6
18791 if test "$cf_cv_sizechange" != no ; then
18792
18793 cat >>confdefs.h <<\EOF
18794 #define HAVE_SIZECHANGE 1
18795 EOF
18796
18797         case $cf_cv_sizechange in
18798         (NEED*)
18799                 cat >>confdefs.h <<EOF
18800 #define $cf_cv_sizechange  1
18801 EOF
18802
18803                 ;;
18804         esac
18805 fi
18806
18807 echo "$as_me:18807: checking for memmove" >&5
18808 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18809 if test "${ac_cv_func_memmove+set}" = set; then
18810   echo $ECHO_N "(cached) $ECHO_C" >&6
18811 else
18812   cat >conftest.$ac_ext <<_ACEOF
18813 #line 18813 "configure"
18814 #include "confdefs.h"
18815 /* System header to define __stub macros and hopefully few prototypes,
18816     which can conflict with char memmove (); below.  */
18817 #include <assert.h>
18818 /* Override any gcc2 internal prototype to avoid an error.  */
18819 #ifdef __cplusplus
18820 extern "C"
18821 #endif
18822 /* We use char because int might match the return type of a gcc2
18823    builtin and then its argument prototype would still apply.  */
18824 char memmove ();
18825 char (*f) ();
18826
18827 int
18828 main (void)
18829 {
18830 /* The GNU C library defines this for functions which it implements
18831     to always fail with ENOSYS.  Some functions are actually named
18832     something starting with __ and the normal name is an alias.  */
18833 #if defined (__stub_memmove) || defined (__stub___memmove)
18834 choke me
18835 #else
18836 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18837 #endif
18838
18839   ;
18840   return 0;
18841 }
18842 _ACEOF
18843 rm -f conftest.$ac_objext conftest$ac_exeext
18844 if { (eval echo "$as_me:18844: \"$ac_link\"") >&5
18845   (eval $ac_link) 2>&5
18846   ac_status=$?
18847   echo "$as_me:18847: \$? = $ac_status" >&5
18848   (exit $ac_status); } &&
18849          { ac_try='test -s conftest$ac_exeext'
18850   { (eval echo "$as_me:18850: \"$ac_try\"") >&5
18851   (eval $ac_try) 2>&5
18852   ac_status=$?
18853   echo "$as_me:18853: \$? = $ac_status" >&5
18854   (exit $ac_status); }; }; then
18855   ac_cv_func_memmove=yes
18856 else
18857   echo "$as_me: failed program was:" >&5
18858 cat conftest.$ac_ext >&5
18859 ac_cv_func_memmove=no
18860 fi
18861 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18862 fi
18863 echo "$as_me:18863: result: $ac_cv_func_memmove" >&5
18864 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18865 if test $ac_cv_func_memmove = yes; then
18866   :
18867 else
18868
18869 echo "$as_me:18869: checking for bcopy" >&5
18870 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18871 if test "${ac_cv_func_bcopy+set}" = set; then
18872   echo $ECHO_N "(cached) $ECHO_C" >&6
18873 else
18874   cat >conftest.$ac_ext <<_ACEOF
18875 #line 18875 "configure"
18876 #include "confdefs.h"
18877 /* System header to define __stub macros and hopefully few prototypes,
18878     which can conflict with char bcopy (); below.  */
18879 #include <assert.h>
18880 /* Override any gcc2 internal prototype to avoid an error.  */
18881 #ifdef __cplusplus
18882 extern "C"
18883 #endif
18884 /* We use char because int might match the return type of a gcc2
18885    builtin and then its argument prototype would still apply.  */
18886 char bcopy ();
18887 char (*f) ();
18888
18889 int
18890 main (void)
18891 {
18892 /* The GNU C library defines this for functions which it implements
18893     to always fail with ENOSYS.  Some functions are actually named
18894     something starting with __ and the normal name is an alias.  */
18895 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18896 choke me
18897 #else
18898 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18899 #endif
18900
18901   ;
18902   return 0;
18903 }
18904 _ACEOF
18905 rm -f conftest.$ac_objext conftest$ac_exeext
18906 if { (eval echo "$as_me:18906: \"$ac_link\"") >&5
18907   (eval $ac_link) 2>&5
18908   ac_status=$?
18909   echo "$as_me:18909: \$? = $ac_status" >&5
18910   (exit $ac_status); } &&
18911          { ac_try='test -s conftest$ac_exeext'
18912   { (eval echo "$as_me:18912: \"$ac_try\"") >&5
18913   (eval $ac_try) 2>&5
18914   ac_status=$?
18915   echo "$as_me:18915: \$? = $ac_status" >&5
18916   (exit $ac_status); }; }; then
18917   ac_cv_func_bcopy=yes
18918 else
18919   echo "$as_me: failed program was:" >&5
18920 cat conftest.$ac_ext >&5
18921 ac_cv_func_bcopy=no
18922 fi
18923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18924 fi
18925 echo "$as_me:18925: result: $ac_cv_func_bcopy" >&5
18926 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18927 if test $ac_cv_func_bcopy = yes; then
18928
18929         echo "$as_me:18929: checking if bcopy does overlapping moves" >&5
18930 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18931 if test "${cf_cv_good_bcopy+set}" = set; then
18932   echo $ECHO_N "(cached) $ECHO_C" >&6
18933 else
18934
18935                 if test "$cross_compiling" = yes; then
18936   cf_cv_good_bcopy=unknown
18937 else
18938   cat >conftest.$ac_ext <<_ACEOF
18939 #line 18939 "configure"
18940 #include "confdefs.h"
18941
18942 int main(void) {
18943         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18944         char temp[40];
18945         bcopy(data, temp, sizeof(data));
18946         bcopy(temp+10, temp, 15);
18947         bcopy(temp+5, temp+15, 10);
18948         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18949 }
18950
18951 _ACEOF
18952 rm -f conftest$ac_exeext
18953 if { (eval echo "$as_me:18953: \"$ac_link\"") >&5
18954   (eval $ac_link) 2>&5
18955   ac_status=$?
18956   echo "$as_me:18956: \$? = $ac_status" >&5
18957   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18958   { (eval echo "$as_me:18958: \"$ac_try\"") >&5
18959   (eval $ac_try) 2>&5
18960   ac_status=$?
18961   echo "$as_me:18961: \$? = $ac_status" >&5
18962   (exit $ac_status); }; }; then
18963   cf_cv_good_bcopy=yes
18964 else
18965   echo "$as_me: program exited with status $ac_status" >&5
18966 echo "$as_me: failed program was:" >&5
18967 cat conftest.$ac_ext >&5
18968 cf_cv_good_bcopy=no
18969 fi
18970 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18971 fi
18972
18973 fi
18974 echo "$as_me:18974: result: $cf_cv_good_bcopy" >&5
18975 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18976
18977 else
18978   cf_cv_good_bcopy=no
18979 fi
18980
18981         if test "$cf_cv_good_bcopy" = yes ; then
18982
18983 cat >>confdefs.h <<\EOF
18984 #define USE_OK_BCOPY 1
18985 EOF
18986
18987         else
18988
18989 cat >>confdefs.h <<\EOF
18990 #define USE_MY_MEMMOVE 1
18991 EOF
18992
18993         fi
18994
18995 fi
18996
18997 tty 2>&1 >/dev/null || {
18998 for ac_func in posix_openpt
18999 do
19000 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19001 echo "$as_me:19001: checking for $ac_func" >&5
19002 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19003 if eval "test \"\${$as_ac_var+set}\" = set"; then
19004   echo $ECHO_N "(cached) $ECHO_C" >&6
19005 else
19006   cat >conftest.$ac_ext <<_ACEOF
19007 #line 19007 "configure"
19008 #include "confdefs.h"
19009 /* System header to define __stub macros and hopefully few prototypes,
19010     which can conflict with char $ac_func (); below.  */
19011 #include <assert.h>
19012 /* Override any gcc2 internal prototype to avoid an error.  */
19013 #ifdef __cplusplus
19014 extern "C"
19015 #endif
19016 /* We use char because int might match the return type of a gcc2
19017    builtin and then its argument prototype would still apply.  */
19018 char $ac_func ();
19019 char (*f) ();
19020
19021 int
19022 main (void)
19023 {
19024 /* The GNU C library defines this for functions which it implements
19025     to always fail with ENOSYS.  Some functions are actually named
19026     something starting with __ and the normal name is an alias.  */
19027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19028 choke me
19029 #else
19030 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19031 #endif
19032
19033   ;
19034   return 0;
19035 }
19036 _ACEOF
19037 rm -f conftest.$ac_objext conftest$ac_exeext
19038 if { (eval echo "$as_me:19038: \"$ac_link\"") >&5
19039   (eval $ac_link) 2>&5
19040   ac_status=$?
19041   echo "$as_me:19041: \$? = $ac_status" >&5
19042   (exit $ac_status); } &&
19043          { ac_try='test -s conftest$ac_exeext'
19044   { (eval echo "$as_me:19044: \"$ac_try\"") >&5
19045   (eval $ac_try) 2>&5
19046   ac_status=$?
19047   echo "$as_me:19047: \$? = $ac_status" >&5
19048   (exit $ac_status); }; }; then
19049   eval "$as_ac_var=yes"
19050 else
19051   echo "$as_me: failed program was:" >&5
19052 cat conftest.$ac_ext >&5
19053 eval "$as_ac_var=no"
19054 fi
19055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19056 fi
19057 echo "$as_me:19057: result: `eval echo '${'$as_ac_var'}'`" >&5
19058 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19059 if test `eval echo '${'$as_ac_var'}'` = yes; then
19060   cat >>confdefs.h <<EOF
19061 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19062 EOF
19063
19064 fi
19065 done
19066  }
19067 echo "$as_me:19067: checking if poll really works" >&5
19068 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
19069 if test "${cf_cv_working_poll+set}" = set; then
19070   echo $ECHO_N "(cached) $ECHO_C" >&6
19071 else
19072
19073 if test "$cross_compiling" = yes; then
19074   cf_cv_working_poll=unknown
19075 else
19076   cat >conftest.$ac_ext <<_ACEOF
19077 #line 19077 "configure"
19078 #include "confdefs.h"
19079
19080 #include <stdlib.h>
19081 #include <stdio.h>
19082 #include <unistd.h>
19083 #include <fcntl.h>
19084 #ifdef HAVE_POLL_H
19085 #include <poll.h>
19086 #else
19087 #include <sys/poll.h>
19088 #endif
19089 int main(void) {
19090         struct pollfd myfds;
19091         int ret;
19092
19093         /* check for Darwin bug with respect to "devices" */
19094         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
19095         if (myfds.fd < 0)
19096                 myfds.fd = 0;
19097         myfds.events = POLLIN;
19098         myfds.revents = 0;
19099
19100         ret = poll(&myfds, 1, 100);
19101
19102         if (ret < 0 || (myfds.revents & POLLNVAL)) {
19103                 ret = -1;
19104         } else {
19105                 int fd = 0;
19106                 if (!isatty(fd)) {
19107                         fd = open("/dev/tty", 2);       /* O_RDWR */
19108                 }
19109 #ifdef HAVE_POSIX_OPENPT
19110                 if (fd < 0) {
19111                         fd = posix_openpt(O_RDWR);
19112                 }
19113 #endif
19114
19115                 if (fd >= 0) {
19116                         /* also check with standard input */
19117                         myfds.fd = fd;
19118                         myfds.events = POLLIN;
19119                         myfds.revents = 0;
19120                         ret = poll(&myfds, 1, 100);
19121                 } else {
19122                         ret = -1;
19123                 }
19124         }
19125         ${cf_cv_main_return:-return}(ret < 0);
19126 }
19127 _ACEOF
19128 rm -f conftest$ac_exeext
19129 if { (eval echo "$as_me:19129: \"$ac_link\"") >&5
19130   (eval $ac_link) 2>&5
19131   ac_status=$?
19132   echo "$as_me:19132: \$? = $ac_status" >&5
19133   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19134   { (eval echo "$as_me:19134: \"$ac_try\"") >&5
19135   (eval $ac_try) 2>&5
19136   ac_status=$?
19137   echo "$as_me:19137: \$? = $ac_status" >&5
19138   (exit $ac_status); }; }; then
19139   cf_cv_working_poll=yes
19140 else
19141   echo "$as_me: program exited with status $ac_status" >&5
19142 echo "$as_me: failed program was:" >&5
19143 cat conftest.$ac_ext >&5
19144 cf_cv_working_poll=no
19145 fi
19146 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19147 fi
19148 fi
19149 echo "$as_me:19149: result: $cf_cv_working_poll" >&5
19150 echo "${ECHO_T}$cf_cv_working_poll" >&6
19151 test "$cf_cv_working_poll" = "yes" &&
19152 cat >>confdefs.h <<\EOF
19153 #define HAVE_WORKING_POLL 1
19154 EOF
19155
19156 echo "$as_me:19156: checking for va_copy" >&5
19157 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
19158 if test "${cf_cv_have_va_copy+set}" = set; then
19159   echo $ECHO_N "(cached) $ECHO_C" >&6
19160 else
19161
19162 cat >conftest.$ac_ext <<_ACEOF
19163 #line 19163 "configure"
19164 #include "confdefs.h"
19165
19166 #include <stdarg.h>
19167
19168 int
19169 main (void)
19170 {
19171
19172         static va_list dst;
19173         static va_list src;
19174         va_copy(dst, src)
19175   ;
19176   return 0;
19177 }
19178 _ACEOF
19179 rm -f conftest.$ac_objext conftest$ac_exeext
19180 if { (eval echo "$as_me:19180: \"$ac_link\"") >&5
19181   (eval $ac_link) 2>&5
19182   ac_status=$?
19183   echo "$as_me:19183: \$? = $ac_status" >&5
19184   (exit $ac_status); } &&
19185          { ac_try='test -s conftest$ac_exeext'
19186   { (eval echo "$as_me:19186: \"$ac_try\"") >&5
19187   (eval $ac_try) 2>&5
19188   ac_status=$?
19189   echo "$as_me:19189: \$? = $ac_status" >&5
19190   (exit $ac_status); }; }; then
19191   cf_cv_have_va_copy=yes
19192 else
19193   echo "$as_me: failed program was:" >&5
19194 cat conftest.$ac_ext >&5
19195 cf_cv_have_va_copy=no
19196 fi
19197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19198 fi
19199 echo "$as_me:19199: result: $cf_cv_have_va_copy" >&5
19200 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19201
19202 test "$cf_cv_have_va_copy" = yes &&
19203 cat >>confdefs.h <<\EOF
19204 #define HAVE_VA_COPY 1
19205 EOF
19206
19207 echo "$as_me:19207: checking for __va_copy" >&5
19208 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19209 if test "${cf_cv_have___va_copy+set}" = set; then
19210   echo $ECHO_N "(cached) $ECHO_C" >&6
19211 else
19212
19213 cat >conftest.$ac_ext <<_ACEOF
19214 #line 19214 "configure"
19215 #include "confdefs.h"
19216
19217 #include <stdarg.h>
19218
19219 int
19220 main (void)
19221 {
19222
19223         static va_list dst;
19224         static va_list src;
19225         __va_copy(dst, src)
19226   ;
19227   return 0;
19228 }
19229 _ACEOF
19230 rm -f conftest.$ac_objext conftest$ac_exeext
19231 if { (eval echo "$as_me:19231: \"$ac_link\"") >&5
19232   (eval $ac_link) 2>&5
19233   ac_status=$?
19234   echo "$as_me:19234: \$? = $ac_status" >&5
19235   (exit $ac_status); } &&
19236          { ac_try='test -s conftest$ac_exeext'
19237   { (eval echo "$as_me:19237: \"$ac_try\"") >&5
19238   (eval $ac_try) 2>&5
19239   ac_status=$?
19240   echo "$as_me:19240: \$? = $ac_status" >&5
19241   (exit $ac_status); }; }; then
19242   cf_cv_have___va_copy=yes
19243 else
19244   echo "$as_me: failed program was:" >&5
19245 cat conftest.$ac_ext >&5
19246 cf_cv_have___va_copy=no
19247 fi
19248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19249 fi
19250 echo "$as_me:19250: result: $cf_cv_have___va_copy" >&5
19251 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19252
19253 test "$cf_cv_have___va_copy" = yes &&
19254 cat >>confdefs.h <<\EOF
19255 #define HAVE___VA_COPY 1
19256 EOF
19257
19258 echo "$as_me:19258: checking for pid_t" >&5
19259 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19260 if test "${ac_cv_type_pid_t+set}" = set; then
19261   echo $ECHO_N "(cached) $ECHO_C" >&6
19262 else
19263   cat >conftest.$ac_ext <<_ACEOF
19264 #line 19264 "configure"
19265 #include "confdefs.h"
19266 $ac_includes_default
19267 int
19268 main (void)
19269 {
19270 if ((pid_t *) 0)
19271   return 0;
19272 if (sizeof (pid_t))
19273   return 0;
19274   ;
19275   return 0;
19276 }
19277 _ACEOF
19278 rm -f conftest.$ac_objext
19279 if { (eval echo "$as_me:19279: \"$ac_compile\"") >&5
19280   (eval $ac_compile) 2>&5
19281   ac_status=$?
19282   echo "$as_me:19282: \$? = $ac_status" >&5
19283   (exit $ac_status); } &&
19284          { ac_try='test -s conftest.$ac_objext'
19285   { (eval echo "$as_me:19285: \"$ac_try\"") >&5
19286   (eval $ac_try) 2>&5
19287   ac_status=$?
19288   echo "$as_me:19288: \$? = $ac_status" >&5
19289   (exit $ac_status); }; }; then
19290   ac_cv_type_pid_t=yes
19291 else
19292   echo "$as_me: failed program was:" >&5
19293 cat conftest.$ac_ext >&5
19294 ac_cv_type_pid_t=no
19295 fi
19296 rm -f conftest.$ac_objext conftest.$ac_ext
19297 fi
19298 echo "$as_me:19298: result: $ac_cv_type_pid_t" >&5
19299 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19300 if test $ac_cv_type_pid_t = yes; then
19301   :
19302 else
19303
19304 cat >>confdefs.h <<EOF
19305 #define pid_t int
19306 EOF
19307
19308 fi
19309
19310 for ac_header in unistd.h vfork.h
19311 do
19312 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19313 echo "$as_me:19313: checking for $ac_header" >&5
19314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19316   echo $ECHO_N "(cached) $ECHO_C" >&6
19317 else
19318   cat >conftest.$ac_ext <<_ACEOF
19319 #line 19319 "configure"
19320 #include "confdefs.h"
19321 #include <$ac_header>
19322 _ACEOF
19323 if { (eval echo "$as_me:19323: \"$ac_cpp conftest.$ac_ext\"") >&5
19324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19325   ac_status=$?
19326   egrep -v '^ *\+' conftest.er1 >conftest.err
19327   rm -f conftest.er1
19328   cat conftest.err >&5
19329   echo "$as_me:19329: \$? = $ac_status" >&5
19330   (exit $ac_status); } >/dev/null; then
19331   if test -s conftest.err; then
19332     ac_cpp_err=$ac_c_preproc_warn_flag
19333   else
19334     ac_cpp_err=
19335   fi
19336 else
19337   ac_cpp_err=yes
19338 fi
19339 if test -z "$ac_cpp_err"; then
19340   eval "$as_ac_Header=yes"
19341 else
19342   echo "$as_me: failed program was:" >&5
19343   cat conftest.$ac_ext >&5
19344   eval "$as_ac_Header=no"
19345 fi
19346 rm -f conftest.err conftest.$ac_ext
19347 fi
19348 echo "$as_me:19348: result: `eval echo '${'$as_ac_Header'}'`" >&5
19349 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19350 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19351   cat >>confdefs.h <<EOF
19352 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19353 EOF
19354
19355 fi
19356 done
19357
19358 for ac_func in fork vfork
19359 do
19360 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19361 echo "$as_me:19361: checking for $ac_func" >&5
19362 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19363 if eval "test \"\${$as_ac_var+set}\" = set"; then
19364   echo $ECHO_N "(cached) $ECHO_C" >&6
19365 else
19366   cat >conftest.$ac_ext <<_ACEOF
19367 #line 19367 "configure"
19368 #include "confdefs.h"
19369 /* System header to define __stub macros and hopefully few prototypes,
19370     which can conflict with char $ac_func (); below.  */
19371 #include <assert.h>
19372 /* Override any gcc2 internal prototype to avoid an error.  */
19373 #ifdef __cplusplus
19374 extern "C"
19375 #endif
19376 /* We use char because int might match the return type of a gcc2
19377    builtin and then its argument prototype would still apply.  */
19378 char $ac_func ();
19379 char (*f) ();
19380
19381 int
19382 main (void)
19383 {
19384 /* The GNU C library defines this for functions which it implements
19385     to always fail with ENOSYS.  Some functions are actually named
19386     something starting with __ and the normal name is an alias.  */
19387 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19388 choke me
19389 #else
19390 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19391 #endif
19392
19393   ;
19394   return 0;
19395 }
19396 _ACEOF
19397 rm -f conftest.$ac_objext conftest$ac_exeext
19398 if { (eval echo "$as_me:19398: \"$ac_link\"") >&5
19399   (eval $ac_link) 2>&5
19400   ac_status=$?
19401   echo "$as_me:19401: \$? = $ac_status" >&5
19402   (exit $ac_status); } &&
19403          { ac_try='test -s conftest$ac_exeext'
19404   { (eval echo "$as_me:19404: \"$ac_try\"") >&5
19405   (eval $ac_try) 2>&5
19406   ac_status=$?
19407   echo "$as_me:19407: \$? = $ac_status" >&5
19408   (exit $ac_status); }; }; then
19409   eval "$as_ac_var=yes"
19410 else
19411   echo "$as_me: failed program was:" >&5
19412 cat conftest.$ac_ext >&5
19413 eval "$as_ac_var=no"
19414 fi
19415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19416 fi
19417 echo "$as_me:19417: result: `eval echo '${'$as_ac_var'}'`" >&5
19418 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19419 if test `eval echo '${'$as_ac_var'}'` = yes; then
19420   cat >>confdefs.h <<EOF
19421 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19422 EOF
19423
19424 fi
19425 done
19426
19427 ac_cv_func_fork_works=$ac_cv_func_fork
19428 if test "x$ac_cv_func_fork" = xyes; then
19429   echo "$as_me:19429: checking for working fork" >&5
19430 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19431 if test "${ac_cv_func_fork_works+set}" = set; then
19432   echo $ECHO_N "(cached) $ECHO_C" >&6
19433 else
19434   if test "$cross_compiling" = yes; then
19435   ac_cv_func_fork_works=cross
19436 else
19437   cat >conftest.$ac_ext <<_ACEOF
19438 /* By Rüdiger Kuhlmann. */
19439       #include <sys/types.h>
19440       #if HAVE_UNISTD_H
19441       # include <unistd.h>
19442       #endif
19443       /* Some systems only have a dummy stub for fork() */
19444       int main (void)
19445       {
19446         if (fork() < 0)
19447           $ac_main_return (1);
19448         $ac_main_return (0);
19449       }
19450 _ACEOF
19451 rm -f conftest$ac_exeext
19452 if { (eval echo "$as_me:19452: \"$ac_link\"") >&5
19453   (eval $ac_link) 2>&5
19454   ac_status=$?
19455   echo "$as_me:19455: \$? = $ac_status" >&5
19456   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19457   { (eval echo "$as_me:19457: \"$ac_try\"") >&5
19458   (eval $ac_try) 2>&5
19459   ac_status=$?
19460   echo "$as_me:19460: \$? = $ac_status" >&5
19461   (exit $ac_status); }; }; then
19462   ac_cv_func_fork_works=yes
19463 else
19464   echo "$as_me: program exited with status $ac_status" >&5
19465 echo "$as_me: failed program was:" >&5
19466 cat conftest.$ac_ext >&5
19467 ac_cv_func_fork_works=no
19468 fi
19469 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19470 fi
19471 fi
19472 echo "$as_me:19472: result: $ac_cv_func_fork_works" >&5
19473 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19474
19475 fi
19476 if test "x$ac_cv_func_fork_works" = xcross; then
19477   case $host in
19478     *-*-amigaos* | *-*-msdosdjgpp*)
19479       # Override, as these systems have only a dummy fork() stub
19480       ac_cv_func_fork_works=no
19481       ;;
19482     *)
19483       ac_cv_func_fork_works=yes
19484       ;;
19485   esac
19486   { echo "$as_me:19486: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19487 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19488 fi
19489 ac_cv_func_vfork_works=$ac_cv_func_vfork
19490 if test "x$ac_cv_func_vfork" = xyes; then
19491   echo "$as_me:19491: checking for working vfork" >&5
19492 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19493 if test "${ac_cv_func_vfork_works+set}" = set; then
19494   echo $ECHO_N "(cached) $ECHO_C" >&6
19495 else
19496   if test "$cross_compiling" = yes; then
19497   ac_cv_func_vfork_works=cross
19498 else
19499   cat >conftest.$ac_ext <<_ACEOF
19500 #line 19500 "configure"
19501 #include "confdefs.h"
19502 /* Thanks to Paul Eggert for this test.  */
19503 #include <stdio.h>
19504 #include <sys/types.h>
19505 #include <sys/stat.h>
19506 #if HAVE_UNISTD_H
19507 # include <unistd.h>
19508 #endif
19509 #if HAVE_VFORK_H
19510 # include <vfork.h>
19511 #endif
19512 /* On some sparc systems, changes by the child to local and incoming
19513    argument registers are propagated back to the parent.  The compiler
19514    is told about this with #include <vfork.h>, but some compilers
19515    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19516    static variable whose address is put into a register that is
19517    clobbered by the vfork.  */
19518 static
19519 #ifdef __cplusplus
19520 sparc_address_test (int arg)
19521 # else
19522 sparc_address_test (arg) int arg;
19523 #endif
19524 {
19525   static pid_t child;
19526   if (!child) {
19527     child = vfork ();
19528     if (child < 0) {
19529       perror ("vfork");
19530       _exit(2);
19531     }
19532     if (!child) {
19533       arg = getpid();
19534       write(-1, "", 0);
19535       _exit (arg);
19536     }
19537   }
19538 }
19539
19540 int
19541 main (void)
19542 {
19543   pid_t parent = getpid ();
19544   pid_t child;
19545
19546   sparc_address_test ();
19547
19548   child = vfork ();
19549
19550   if (child == 0) {
19551     /* Here is another test for sparc vfork register problems.  This
19552        test uses lots of local variables, at least as many local
19553        variables as main has allocated so far including compiler
19554        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19555        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19556        reuse the register of parent for one of the local variables,
19557        since it will think that parent can't possibly be used any more
19558        in this routine.  Assigning to the local variable will thus
19559        munge parent in the parent process.  */
19560     pid_t
19561       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19562       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19563     /* Convince the compiler that p..p7 are live; otherwise, it might
19564        use the same hardware register for all 8 local variables.  */
19565     if (p != p1 || p != p2 || p != p3 || p != p4
19566         || p != p5 || p != p6 || p != p7)
19567       _exit(1);
19568
19569     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19570        from child file descriptors.  If the child closes a descriptor
19571        before it execs or exits, this munges the parent's descriptor
19572        as well.  Test for this by closing stdout in the child.  */
19573     _exit(close(fileno(stdout)) != 0);
19574   } else {
19575     int status;
19576     struct stat st;
19577
19578     while (wait(&status) != child)
19579       ;
19580     $ac_main_return(
19581          /* Was there some problem with vforking?  */
19582          child < 0
19583
19584          /* Did the child fail?  (This shouldn't happen.)  */
19585          || status
19586
19587          /* Did the vfork/compiler bug occur?  */
19588          || parent != getpid()
19589
19590          /* Did the file descriptor bug occur?  */
19591          || fstat(fileno(stdout), &st) != 0
19592          );
19593   }
19594 }
19595 _ACEOF
19596 rm -f conftest$ac_exeext
19597 if { (eval echo "$as_me:19597: \"$ac_link\"") >&5
19598   (eval $ac_link) 2>&5
19599   ac_status=$?
19600   echo "$as_me:19600: \$? = $ac_status" >&5
19601   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19602   { (eval echo "$as_me:19602: \"$ac_try\"") >&5
19603   (eval $ac_try) 2>&5
19604   ac_status=$?
19605   echo "$as_me:19605: \$? = $ac_status" >&5
19606   (exit $ac_status); }; }; then
19607   ac_cv_func_vfork_works=yes
19608 else
19609   echo "$as_me: program exited with status $ac_status" >&5
19610 echo "$as_me: failed program was:" >&5
19611 cat conftest.$ac_ext >&5
19612 ac_cv_func_vfork_works=no
19613 fi
19614 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19615 fi
19616 fi
19617 echo "$as_me:19617: result: $ac_cv_func_vfork_works" >&5
19618 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19619
19620 fi;
19621 if test "x$ac_cv_func_fork_works" = xcross; then
19622   ac_cv_func_vfork_works=ac_cv_func_vfork
19623   { echo "$as_me:19623: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19624 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19625 fi
19626
19627 if test "x$ac_cv_func_vfork_works" = xyes; then
19628
19629 cat >>confdefs.h <<\EOF
19630 #define HAVE_WORKING_VFORK 1
19631 EOF
19632
19633 else
19634
19635 cat >>confdefs.h <<\EOF
19636 #define vfork fork
19637 EOF
19638
19639 fi
19640 if test "x$ac_cv_func_fork_works" = xyes; then
19641
19642 cat >>confdefs.h <<\EOF
19643 #define HAVE_WORKING_FORK 1
19644 EOF
19645
19646 fi
19647
19648 # special check for test/ditto.c
19649
19650 echo "$as_me:19650: checking for openpty in -lutil" >&5
19651 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19652 if test "${ac_cv_lib_util_openpty+set}" = set; then
19653   echo $ECHO_N "(cached) $ECHO_C" >&6
19654 else
19655   ac_check_lib_save_LIBS=$LIBS
19656 LIBS="-lutil  $LIBS"
19657 cat >conftest.$ac_ext <<_ACEOF
19658 #line 19658 "configure"
19659 #include "confdefs.h"
19660
19661 /* Override any gcc2 internal prototype to avoid an error.  */
19662 #ifdef __cplusplus
19663 extern "C"
19664 #endif
19665 /* We use char because int might match the return type of a gcc2
19666    builtin and then its argument prototype would still apply.  */
19667 char openpty ();
19668 int
19669 main (void)
19670 {
19671 openpty ();
19672   ;
19673   return 0;
19674 }
19675 _ACEOF
19676 rm -f conftest.$ac_objext conftest$ac_exeext
19677 if { (eval echo "$as_me:19677: \"$ac_link\"") >&5
19678   (eval $ac_link) 2>&5
19679   ac_status=$?
19680   echo "$as_me:19680: \$? = $ac_status" >&5
19681   (exit $ac_status); } &&
19682          { ac_try='test -s conftest$ac_exeext'
19683   { (eval echo "$as_me:19683: \"$ac_try\"") >&5
19684   (eval $ac_try) 2>&5
19685   ac_status=$?
19686   echo "$as_me:19686: \$? = $ac_status" >&5
19687   (exit $ac_status); }; }; then
19688   ac_cv_lib_util_openpty=yes
19689 else
19690   echo "$as_me: failed program was:" >&5
19691 cat conftest.$ac_ext >&5
19692 ac_cv_lib_util_openpty=no
19693 fi
19694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19695 LIBS=$ac_check_lib_save_LIBS
19696 fi
19697 echo "$as_me:19697: result: $ac_cv_lib_util_openpty" >&5
19698 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19699 if test $ac_cv_lib_util_openpty = yes; then
19700   cf_cv_lib_util=yes
19701 else
19702   cf_cv_lib_util=no
19703 fi
19704
19705 echo "$as_me:19705: checking for openpty header" >&5
19706 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19707 if test "${cf_cv_func_openpty+set}" = set; then
19708   echo $ECHO_N "(cached) $ECHO_C" >&6
19709 else
19710
19711         cf_save_LIBS="$LIBS"
19712         test $cf_cv_lib_util = yes && {
19713 cf_add_libs="-lutil"
19714 # Filter out duplicates - this happens with badly-designed ".pc" files...
19715 for cf_add_1lib in $LIBS
19716 do
19717         for cf_add_2lib in $cf_add_libs
19718         do
19719                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19720                 then
19721                         cf_add_1lib=
19722                         break
19723                 fi
19724         done
19725         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19726 done
19727 LIBS="$cf_add_libs"
19728  }
19729         for cf_header in pty.h libutil.h util.h
19730         do
19731         cat >conftest.$ac_ext <<_ACEOF
19732 #line 19732 "configure"
19733 #include "confdefs.h"
19734
19735 #include <$cf_header>
19736
19737 int
19738 main (void)
19739 {
19740
19741         int x = openpty((int *)0, (int *)0, (char *)0,
19742                                    (struct termios *)0, (struct winsize *)0);
19743
19744   ;
19745   return 0;
19746 }
19747 _ACEOF
19748 rm -f conftest.$ac_objext conftest$ac_exeext
19749 if { (eval echo "$as_me:19749: \"$ac_link\"") >&5
19750   (eval $ac_link) 2>&5
19751   ac_status=$?
19752   echo "$as_me:19752: \$? = $ac_status" >&5
19753   (exit $ac_status); } &&
19754          { ac_try='test -s conftest$ac_exeext'
19755   { (eval echo "$as_me:19755: \"$ac_try\"") >&5
19756   (eval $ac_try) 2>&5
19757   ac_status=$?
19758   echo "$as_me:19758: \$? = $ac_status" >&5
19759   (exit $ac_status); }; }; then
19760
19761                 cf_cv_func_openpty=$cf_header
19762                 break
19763
19764 else
19765   echo "$as_me: failed program was:" >&5
19766 cat conftest.$ac_ext >&5
19767
19768                 cf_cv_func_openpty=no
19769
19770 fi
19771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19772         done
19773         LIBS="$cf_save_LIBS"
19774
19775 fi
19776 echo "$as_me:19776: result: $cf_cv_func_openpty" >&5
19777 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19778
19779 if test "$cf_cv_func_openpty" != no ; then
19780
19781 cat >>confdefs.h <<EOF
19782 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19783 EOF
19784
19785 cat >>confdefs.h <<\EOF
19786 #define USE_XTERM_PTY 1
19787 EOF
19788
19789         if test "x$cf_cv_lib_util" = xyes ; then
19790
19791 cf_add_libs="-lutil"
19792 # Filter out duplicates - this happens with badly-designed ".pc" files...
19793 for cf_add_1lib in $TEST_LIBS
19794 do
19795         for cf_add_2lib in $cf_add_libs
19796         do
19797                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19798                 then
19799                         cf_add_1lib=
19800                         break
19801                 fi
19802         done
19803         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19804 done
19805 TEST_LIBS="$cf_add_libs"
19806
19807         fi
19808 fi
19809
19810 if test "$with_hashed_db" != no ; then
19811
19812 cat >>confdefs.h <<\EOF
19813 #define USE_HASHED_DB 1
19814 EOF
19815
19816 case $with_hashed_db in
19817 (yes|*able*)
19818         ;;
19819 (*)
19820         if test -d "$with_hashed_db" ; then
19821
19822 if test -n "$with_hashed_db/include" ; then
19823   for cf_add_incdir in $with_hashed_db/include
19824   do
19825         while test $cf_add_incdir != /usr/include
19826         do
19827           if test -d $cf_add_incdir
19828           then
19829                 cf_have_incdir=no
19830                 if test -n "$CFLAGS$CPPFLAGS" ; then
19831                   # a loop is needed to ensure we can add subdirs of existing dirs
19832                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19833                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19834                           cf_have_incdir=yes; break
19835                         fi
19836                   done
19837                 fi
19838
19839                 if test "$cf_have_incdir" = no ; then
19840                   if test "$cf_add_incdir" = /usr/local/include ; then
19841                         if test "$GCC" = yes
19842                         then
19843                           cf_save_CPPFLAGS=$CPPFLAGS
19844                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19845                           cat >conftest.$ac_ext <<_ACEOF
19846 #line 19846 "configure"
19847 #include "confdefs.h"
19848 #include <stdio.h>
19849 int
19850 main (void)
19851 {
19852 printf("Hello")
19853   ;
19854   return 0;
19855 }
19856 _ACEOF
19857 rm -f conftest.$ac_objext
19858 if { (eval echo "$as_me:19858: \"$ac_compile\"") >&5
19859   (eval $ac_compile) 2>&5
19860   ac_status=$?
19861   echo "$as_me:19861: \$? = $ac_status" >&5
19862   (exit $ac_status); } &&
19863          { ac_try='test -s conftest.$ac_objext'
19864   { (eval echo "$as_me:19864: \"$ac_try\"") >&5
19865   (eval $ac_try) 2>&5
19866   ac_status=$?
19867   echo "$as_me:19867: \$? = $ac_status" >&5
19868   (exit $ac_status); }; }; then
19869   :
19870 else
19871   echo "$as_me: failed program was:" >&5
19872 cat conftest.$ac_ext >&5
19873 cf_have_incdir=yes
19874 fi
19875 rm -f conftest.$ac_objext conftest.$ac_ext
19876                           CPPFLAGS=$cf_save_CPPFLAGS
19877                         fi
19878                   fi
19879                 fi
19880
19881                 if test "$cf_have_incdir" = no ; then
19882                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19883
19884 echo "${as_me:-configure}:19884: testing adding $cf_add_incdir to include-path ..." 1>&5
19885
19886                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19887
19888                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19889                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19890                   cf_add_incdir="$cf_top_incdir"
19891                 else
19892                   break
19893                 fi
19894           else
19895                 break
19896           fi
19897         done
19898   done
19899 fi
19900
19901 if test -n "$with_hashed_db/lib" ; then
19902         for cf_add_libdir in $with_hashed_db/lib
19903         do
19904                 if test $cf_add_libdir = /usr/lib ; then
19905                         :
19906                 elif test -d $cf_add_libdir
19907                 then
19908                         cf_have_libdir=no
19909                         if test -n "$LDFLAGS$LIBS" ; then
19910                                 # a loop is needed to ensure we can add subdirs of existing dirs
19911                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19912                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19913                                                 cf_have_libdir=yes; break
19914                                         fi
19915                                 done
19916                         fi
19917                         if test "$cf_have_libdir" = no ; then
19918                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19919
19920 echo "${as_me:-configure}:19920: testing adding $cf_add_libdir to library-path ..." 1>&5
19921
19922                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19923                         fi
19924                 fi
19925         done
19926 fi
19927
19928         else
19929                 case "$with_hashed_db" in
19930                 (./*|../*|/*)
19931                         { echo "$as_me:19931: WARNING: no such directory $with_hashed_db" >&5
19932 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19933                         ;;
19934                 (*)
19935
19936 cf_search=
19937
19938 test "x$prefix" != "xNONE" && \
19939 test -d "$prefix" && \
19940  {
19941         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19942         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19943         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19944         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19945         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19946         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19947 }
19948
19949 for cf_subdir_prefix in \
19950         /usr \
19951         /usr/local \
19952         /usr/pkg \
19953         /opt \
19954         /opt/local \
19955         $HOME
19956 do
19957
19958 test "x$cf_subdir_prefix" != "x$prefix" && \
19959 test -d "$cf_subdir_prefix" && \
19960 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19961         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19962         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19963         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19964         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19965         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19966         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"
19967 }
19968
19969 done
19970
19971         for cf_item in $cf_search
19972         do
19973                 case $cf_item in
19974                 (*/$with_hashed_db)
19975
19976 if test -n "$cf_item" ; then
19977   for cf_add_incdir in $cf_item
19978   do
19979         while test $cf_add_incdir != /usr/include
19980         do
19981           if test -d $cf_add_incdir
19982           then
19983                 cf_have_incdir=no
19984                 if test -n "$CFLAGS$CPPFLAGS" ; then
19985                   # a loop is needed to ensure we can add subdirs of existing dirs
19986                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19987                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19988                           cf_have_incdir=yes; break
19989                         fi
19990                   done
19991                 fi
19992
19993                 if test "$cf_have_incdir" = no ; then
19994                   if test "$cf_add_incdir" = /usr/local/include ; then
19995                         if test "$GCC" = yes
19996                         then
19997                           cf_save_CPPFLAGS=$CPPFLAGS
19998                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19999                           cat >conftest.$ac_ext <<_ACEOF
20000 #line 20000 "configure"
20001 #include "confdefs.h"
20002 #include <stdio.h>
20003 int
20004 main (void)
20005 {
20006 printf("Hello")
20007   ;
20008   return 0;
20009 }
20010 _ACEOF
20011 rm -f conftest.$ac_objext
20012 if { (eval echo "$as_me:20012: \"$ac_compile\"") >&5
20013   (eval $ac_compile) 2>&5
20014   ac_status=$?
20015   echo "$as_me:20015: \$? = $ac_status" >&5
20016   (exit $ac_status); } &&
20017          { ac_try='test -s conftest.$ac_objext'
20018   { (eval echo "$as_me:20018: \"$ac_try\"") >&5
20019   (eval $ac_try) 2>&5
20020   ac_status=$?
20021   echo "$as_me:20021: \$? = $ac_status" >&5
20022   (exit $ac_status); }; }; then
20023   :
20024 else
20025   echo "$as_me: failed program was:" >&5
20026 cat conftest.$ac_ext >&5
20027 cf_have_incdir=yes
20028 fi
20029 rm -f conftest.$ac_objext conftest.$ac_ext
20030                           CPPFLAGS=$cf_save_CPPFLAGS
20031                         fi
20032                   fi
20033                 fi
20034
20035                 if test "$cf_have_incdir" = no ; then
20036                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20037
20038 echo "${as_me:-configure}:20038: testing adding $cf_add_incdir to include-path ..." 1>&5
20039
20040                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20041
20042                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20043                   test "$cf_top_incdir" = "$cf_add_incdir" && break
20044                   cf_add_incdir="$cf_top_incdir"
20045                 else
20046                   break
20047                 fi
20048           else
20049                 break
20050           fi
20051         done
20052   done
20053 fi
20054
20055                         ;;
20056                 esac
20057         done
20058
20059 cf_search=
20060
20061 test "x$prefix" != "xNONE" && \
20062 test -d "$prefix" && \
20063  {
20064         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
20065         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
20066         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
20067         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
20068         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
20069         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
20070 }
20071
20072 for cf_subdir_prefix in \
20073         /usr \
20074         /usr/local \
20075         /usr/pkg \
20076         /opt \
20077         /opt/local \
20078         $HOME
20079 do
20080
20081 test "x$cf_subdir_prefix" != "x$prefix" && \
20082 test -d "$cf_subdir_prefix" && \
20083 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20084         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
20085         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
20086         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
20087         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
20088         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
20089         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"
20090 }
20091
20092 done
20093
20094         for cf_item in $cf_search
20095         do
20096                 case $cf_item in
20097                 (*/$with_hashed_db)
20098
20099 if test -n "$cf_item" ; then
20100         for cf_add_libdir in $cf_item
20101         do
20102                 if test $cf_add_libdir = /usr/lib ; then
20103                         :
20104                 elif test -d $cf_add_libdir
20105                 then
20106                         cf_have_libdir=no
20107                         if test -n "$LDFLAGS$LIBS" ; then
20108                                 # a loop is needed to ensure we can add subdirs of existing dirs
20109                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20110                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20111                                                 cf_have_libdir=yes; break
20112                                         fi
20113                                 done
20114                         fi
20115                         if test "$cf_have_libdir" = no ; then
20116                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20117
20118 echo "${as_me:-configure}:20118: testing adding $cf_add_libdir to library-path ..." 1>&5
20119
20120                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20121                         fi
20122                 fi
20123         done
20124 fi
20125
20126                         ;;
20127                 esac
20128         done
20129
20130                         ;;
20131                 esac
20132         fi
20133 esac
20134
20135 echo "$as_me:20135: checking for db.h" >&5
20136 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
20137 if test "${ac_cv_header_db_h+set}" = set; then
20138   echo $ECHO_N "(cached) $ECHO_C" >&6
20139 else
20140   cat >conftest.$ac_ext <<_ACEOF
20141 #line 20141 "configure"
20142 #include "confdefs.h"
20143 #include <db.h>
20144 _ACEOF
20145 if { (eval echo "$as_me:20145: \"$ac_cpp conftest.$ac_ext\"") >&5
20146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20147   ac_status=$?
20148   egrep -v '^ *\+' conftest.er1 >conftest.err
20149   rm -f conftest.er1
20150   cat conftest.err >&5
20151   echo "$as_me:20151: \$? = $ac_status" >&5
20152   (exit $ac_status); } >/dev/null; then
20153   if test -s conftest.err; then
20154     ac_cpp_err=$ac_c_preproc_warn_flag
20155   else
20156     ac_cpp_err=
20157   fi
20158 else
20159   ac_cpp_err=yes
20160 fi
20161 if test -z "$ac_cpp_err"; then
20162   ac_cv_header_db_h=yes
20163 else
20164   echo "$as_me: failed program was:" >&5
20165   cat conftest.$ac_ext >&5
20166   ac_cv_header_db_h=no
20167 fi
20168 rm -f conftest.err conftest.$ac_ext
20169 fi
20170 echo "$as_me:20170: result: $ac_cv_header_db_h" >&5
20171 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20172 if test $ac_cv_header_db_h = yes; then
20173
20174 echo "$as_me:20174: checking for version of db" >&5
20175 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20176 if test "${cf_cv_hashed_db_version+set}" = set; then
20177   echo $ECHO_N "(cached) $ECHO_C" >&6
20178 else
20179
20180 cf_cv_hashed_db_version=unknown
20181
20182 for cf_db_version in 1 2 3 4 5 6
20183 do
20184
20185 echo "${as_me:-configure}:20185: testing checking for db version $cf_db_version ..." 1>&5
20186
20187         cat >conftest.$ac_ext <<_ACEOF
20188 #line 20188 "configure"
20189 #include "confdefs.h"
20190
20191 $ac_includes_default
20192 #include <db.h>
20193
20194 #ifdef DB_VERSION_MAJOR
20195         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20196 #if $cf_db_version == DB_VERSION_MAJOR
20197         /* ok */
20198 #else
20199         make an error
20200 #endif
20201 #else
20202 #if $cf_db_version == 1
20203         /* ok: assuming this is DB 1.8.5 */
20204 #else
20205         make an error
20206 #endif
20207 #endif
20208
20209 int
20210 main (void)
20211 {
20212 DBT *foo = 0
20213   ;
20214   return 0;
20215 }
20216 _ACEOF
20217 rm -f conftest.$ac_objext
20218 if { (eval echo "$as_me:20218: \"$ac_compile\"") >&5
20219   (eval $ac_compile) 2>&5
20220   ac_status=$?
20221   echo "$as_me:20221: \$? = $ac_status" >&5
20222   (exit $ac_status); } &&
20223          { ac_try='test -s conftest.$ac_objext'
20224   { (eval echo "$as_me:20224: \"$ac_try\"") >&5
20225   (eval $ac_try) 2>&5
20226   ac_status=$?
20227   echo "$as_me:20227: \$? = $ac_status" >&5
20228   (exit $ac_status); }; }; then
20229
20230         cf_cv_hashed_db_version=$cf_db_version
20231         break
20232
20233 else
20234   echo "$as_me: failed program was:" >&5
20235 cat conftest.$ac_ext >&5
20236 fi
20237 rm -f conftest.$ac_objext conftest.$ac_ext
20238 done
20239
20240 fi
20241 echo "$as_me:20241: result: $cf_cv_hashed_db_version" >&5
20242 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20243
20244 if test "$cf_cv_hashed_db_version" = unknown ; then
20245         { { echo "$as_me:20245: error: Cannot determine version of db" >&5
20246 echo "$as_me: error: Cannot determine version of db" >&2;}
20247    { (exit 1); exit 1; }; }
20248 else
20249
20250 echo "$as_me:20250: checking for db libraries" >&5
20251 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20252 if test "${cf_cv_hashed_db_libs+set}" = set; then
20253   echo $ECHO_N "(cached) $ECHO_C" >&6
20254 else
20255
20256 cf_cv_hashed_db_libs=unknown
20257 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20258 do
20259         cf_save_libs="$LIBS"
20260         if test -n "$cf_db_libs"; then
20261
20262 cf_add_libs="-l$cf_db_libs"
20263 # Filter out duplicates - this happens with badly-designed ".pc" files...
20264 for cf_add_1lib in $LIBS
20265 do
20266         for cf_add_2lib in $cf_add_libs
20267         do
20268                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20269                 then
20270                         cf_add_1lib=
20271                         break
20272                 fi
20273         done
20274         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20275 done
20276 LIBS="$cf_add_libs"
20277
20278         fi
20279
20280 echo "${as_me:-configure}:20280: testing checking for library "$cf_db_libs" ..." 1>&5
20281
20282         cat >conftest.$ac_ext <<_ACEOF
20283 #line 20283 "configure"
20284 #include "confdefs.h"
20285
20286 $ac_includes_default
20287 #include <db.h>
20288
20289 int
20290 main (void)
20291 {
20292
20293         char *path = "/tmp/foo";
20294 #ifdef DB_VERSION_MAJOR
20295 #if DB_VERSION_MAJOR >= 4
20296         DB *result = 0;
20297         db_create(&result, NULL, 0);
20298         result->open(result,
20299                 NULL,
20300                 path,
20301                 path,
20302                 DB_HASH,
20303                 DB_CREATE,
20304                 0644);
20305 #elif DB_VERSION_MAJOR >= 3
20306         DB *result = 0;
20307         db_create(&result, NULL, 0);
20308         result->open(result,
20309                 path,
20310                 path,
20311                 DB_HASH,
20312                 DB_CREATE,
20313                 0644);
20314 #elif DB_VERSION_MAJOR >= 2
20315         DB *result = 0;
20316         db_open(path,
20317                 DB_HASH,
20318                 DB_CREATE,
20319                 0644,
20320                 (DB_ENV *) 0,
20321                 (DB_INFO *) 0,
20322                 &result);
20323 #endif /* DB_VERSION_MAJOR */
20324 #else
20325         DB *result = dbopen(path,
20326                      2,
20327                      0644,
20328                      DB_HASH,
20329                      0);
20330 #endif
20331         ${cf_cv_main_return:-return}(result != 0)
20332
20333   ;
20334   return 0;
20335 }
20336 _ACEOF
20337 rm -f conftest.$ac_objext conftest$ac_exeext
20338 if { (eval echo "$as_me:20338: \"$ac_link\"") >&5
20339   (eval $ac_link) 2>&5
20340   ac_status=$?
20341   echo "$as_me:20341: \$? = $ac_status" >&5
20342   (exit $ac_status); } &&
20343          { ac_try='test -s conftest$ac_exeext'
20344   { (eval echo "$as_me:20344: \"$ac_try\"") >&5
20345   (eval $ac_try) 2>&5
20346   ac_status=$?
20347   echo "$as_me:20347: \$? = $ac_status" >&5
20348   (exit $ac_status); }; }; then
20349
20350         if test -n "$cf_db_libs" ; then
20351                 cf_cv_hashed_db_libs=$cf_db_libs
20352         else
20353                 cf_cv_hashed_db_libs=default
20354         fi
20355         LIBS="$cf_save_libs"
20356         break
20357
20358 else
20359   echo "$as_me: failed program was:" >&5
20360 cat conftest.$ac_ext >&5
20361 fi
20362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20363         LIBS="$cf_save_libs"
20364 done
20365
20366 fi
20367 echo "$as_me:20367: result: $cf_cv_hashed_db_libs" >&5
20368 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20369
20370         if test "$cf_cv_hashed_db_libs" = unknown ; then
20371                 { { echo "$as_me:20371: error: Cannot determine library for db" >&5
20372 echo "$as_me: error: Cannot determine library for db" >&2;}
20373    { (exit 1); exit 1; }; }
20374         elif test "$cf_cv_hashed_db_libs" != default ; then
20375
20376 cf_add_libs="-l$cf_cv_hashed_db_libs"
20377 # Filter out duplicates - this happens with badly-designed ".pc" files...
20378 for cf_add_1lib in $LIBS
20379 do
20380         for cf_add_2lib in $cf_add_libs
20381         do
20382                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20383                 then
20384                         cf_add_1lib=
20385                         break
20386                 fi
20387         done
20388         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20389 done
20390 LIBS="$cf_add_libs"
20391
20392         fi
20393 fi
20394
20395 else
20396
20397         { { echo "$as_me:20397: error: Cannot find db.h" >&5
20398 echo "$as_me: error: Cannot find db.h" >&2;}
20399    { (exit 1); exit 1; }; }
20400
20401 fi
20402
20403 fi
20404
20405 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20406         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20407         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20408 fi
20409
20410 # Just in case, check if the C compiler has a bool type.
20411
20412 echo "$as_me:20412: checking if we should include stdbool.h" >&5
20413 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20414
20415 if test "${cf_cv_header_stdbool_h+set}" = set; then
20416   echo $ECHO_N "(cached) $ECHO_C" >&6
20417 else
20418
20419         cat >conftest.$ac_ext <<_ACEOF
20420 #line 20420 "configure"
20421 #include "confdefs.h"
20422
20423 int
20424 main (void)
20425 {
20426 bool foo = false
20427   ;
20428   return 0;
20429 }
20430 _ACEOF
20431 rm -f conftest.$ac_objext
20432 if { (eval echo "$as_me:20432: \"$ac_compile\"") >&5
20433   (eval $ac_compile) 2>&5
20434   ac_status=$?
20435   echo "$as_me:20435: \$? = $ac_status" >&5
20436   (exit $ac_status); } &&
20437          { ac_try='test -s conftest.$ac_objext'
20438   { (eval echo "$as_me:20438: \"$ac_try\"") >&5
20439   (eval $ac_try) 2>&5
20440   ac_status=$?
20441   echo "$as_me:20441: \$? = $ac_status" >&5
20442   (exit $ac_status); }; }; then
20443   cf_cv_header_stdbool_h=0
20444 else
20445   echo "$as_me: failed program was:" >&5
20446 cat conftest.$ac_ext >&5
20447 cat >conftest.$ac_ext <<_ACEOF
20448 #line 20448 "configure"
20449 #include "confdefs.h"
20450
20451 #ifndef __BEOS__
20452 #include <stdbool.h>
20453 #endif
20454
20455 int
20456 main (void)
20457 {
20458 bool foo = false
20459   ;
20460   return 0;
20461 }
20462 _ACEOF
20463 rm -f conftest.$ac_objext
20464 if { (eval echo "$as_me:20464: \"$ac_compile\"") >&5
20465   (eval $ac_compile) 2>&5
20466   ac_status=$?
20467   echo "$as_me:20467: \$? = $ac_status" >&5
20468   (exit $ac_status); } &&
20469          { ac_try='test -s conftest.$ac_objext'
20470   { (eval echo "$as_me:20470: \"$ac_try\"") >&5
20471   (eval $ac_try) 2>&5
20472   ac_status=$?
20473   echo "$as_me:20473: \$? = $ac_status" >&5
20474   (exit $ac_status); }; }; then
20475   cf_cv_header_stdbool_h=1
20476 else
20477   echo "$as_me: failed program was:" >&5
20478 cat conftest.$ac_ext >&5
20479 cf_cv_header_stdbool_h=0
20480 fi
20481 rm -f conftest.$ac_objext conftest.$ac_ext
20482 fi
20483 rm -f conftest.$ac_objext conftest.$ac_ext
20484 fi
20485
20486 if test "$cf_cv_header_stdbool_h" = 1
20487 then    echo "$as_me:20487: result: yes" >&5
20488 echo "${ECHO_T}yes" >&6
20489 else    echo "$as_me:20489: result: no" >&5
20490 echo "${ECHO_T}no" >&6
20491 fi
20492
20493 echo "$as_me:20493: checking for builtin bool type" >&5
20494 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20495
20496 if test "${cf_cv_cc_bool_type+set}" = set; then
20497   echo $ECHO_N "(cached) $ECHO_C" >&6
20498 else
20499
20500         cat >conftest.$ac_ext <<_ACEOF
20501 #line 20501 "configure"
20502 #include "confdefs.h"
20503
20504 #include <stdio.h>
20505 #include <sys/types.h>
20506
20507 int
20508 main (void)
20509 {
20510 bool x = false
20511   ;
20512   return 0;
20513 }
20514 _ACEOF
20515 rm -f conftest.$ac_objext
20516 if { (eval echo "$as_me:20516: \"$ac_compile\"") >&5
20517   (eval $ac_compile) 2>&5
20518   ac_status=$?
20519   echo "$as_me:20519: \$? = $ac_status" >&5
20520   (exit $ac_status); } &&
20521          { ac_try='test -s conftest.$ac_objext'
20522   { (eval echo "$as_me:20522: \"$ac_try\"") >&5
20523   (eval $ac_try) 2>&5
20524   ac_status=$?
20525   echo "$as_me:20525: \$? = $ac_status" >&5
20526   (exit $ac_status); }; }; then
20527   cf_cv_cc_bool_type=1
20528 else
20529   echo "$as_me: failed program was:" >&5
20530 cat conftest.$ac_ext >&5
20531 cf_cv_cc_bool_type=0
20532 fi
20533 rm -f conftest.$ac_objext conftest.$ac_ext
20534
20535 fi
20536
20537 if test "$cf_cv_cc_bool_type" = 1
20538 then    echo "$as_me:20538: result: yes" >&5
20539 echo "${ECHO_T}yes" >&6
20540 else    echo "$as_me:20540: result: no" >&5
20541 echo "${ECHO_T}no" >&6
20542 fi
20543
20544 # Check for C++ compiler characteristics (and ensure that it's there!)
20545 if test -n "$CXX" ; then
20546         ac_ext=cc
20547 ac_cpp='$CXXCPP $CPPFLAGS'
20548 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20549 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20550 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20551 ac_main_return=return
20552
20553 if test -n "$GXX" ; then
20554
20555         cf_save="$LIBS"
20556         LIBS="$LIBS $CXXLIBS"
20557         echo "$as_me:20557: checking if we already have C++ library" >&5
20558 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20559         cat >conftest.$ac_ext <<_ACEOF
20560 #line 20560 "configure"
20561 #include "confdefs.h"
20562
20563                         #include <iostream>
20564 int
20565 main (void)
20566 {
20567
20568                         std::cout << "Hello World!" << std::endl;
20569   ;
20570   return 0;
20571 }
20572 _ACEOF
20573 rm -f conftest.$ac_objext conftest$ac_exeext
20574 if { (eval echo "$as_me:20574: \"$ac_link\"") >&5
20575   (eval $ac_link) 2>&5
20576   ac_status=$?
20577   echo "$as_me:20577: \$? = $ac_status" >&5
20578   (exit $ac_status); } &&
20579          { ac_try='test -s conftest$ac_exeext'
20580   { (eval echo "$as_me:20580: \"$ac_try\"") >&5
20581   (eval $ac_try) 2>&5
20582   ac_status=$?
20583   echo "$as_me:20583: \$? = $ac_status" >&5
20584   (exit $ac_status); }; }; then
20585   cf_have_libstdcpp=yes
20586 else
20587   echo "$as_me: failed program was:" >&5
20588 cat conftest.$ac_ext >&5
20589 cf_have_libstdcpp=no
20590 fi
20591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20592         echo "$as_me:20592: result: $cf_have_libstdcpp" >&5
20593 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20594         LIBS="$cf_save"
20595
20596         if test $cf_have_libstdcpp != yes
20597         then
20598                 case $cf_cv_system_name in
20599                 (os2*)
20600                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20601                                 cf_stdcpp_libname=stdcpp
20602                         else
20603                                 cf_stdcpp_libname=stdc++
20604                         fi
20605                         ;;
20606                 (*)
20607                         cf_stdcpp_libname=stdc++
20608                         ;;
20609                 esac
20610
20611                 echo "$as_me:20611: checking for library $cf_stdcpp_libname" >&5
20612 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20613 if test "${cf_cv_libstdcpp+set}" = set; then
20614   echo $ECHO_N "(cached) $ECHO_C" >&6
20615 else
20616
20617                         cf_save="$LIBS"
20618                         LIBS="$LIBS $CXXLIBS"
20619
20620 cf_add_libs="-l$cf_stdcpp_libname"
20621 # Filter out duplicates - this happens with badly-designed ".pc" files...
20622 for cf_add_1lib in $LIBS
20623 do
20624         for cf_add_2lib in $cf_add_libs
20625         do
20626                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20627                 then
20628                         cf_add_1lib=
20629                         break
20630                 fi
20631         done
20632         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20633 done
20634 LIBS="$cf_add_libs"
20635
20636                 cat >conftest.$ac_ext <<_ACEOF
20637 #line 20637 "configure"
20638 #include "confdefs.h"
20639
20640                                 #include <iostream>
20641 int
20642 main (void)
20643 {
20644
20645                                 std::cout << "Hello World!" << std::endl;
20646   ;
20647   return 0;
20648 }
20649 _ACEOF
20650 rm -f conftest.$ac_objext conftest$ac_exeext
20651 if { (eval echo "$as_me:20651: \"$ac_link\"") >&5
20652   (eval $ac_link) 2>&5
20653   ac_status=$?
20654   echo "$as_me:20654: \$? = $ac_status" >&5
20655   (exit $ac_status); } &&
20656          { ac_try='test -s conftest$ac_exeext'
20657   { (eval echo "$as_me:20657: \"$ac_try\"") >&5
20658   (eval $ac_try) 2>&5
20659   ac_status=$?
20660   echo "$as_me:20660: \$? = $ac_status" >&5
20661   (exit $ac_status); }; }; then
20662   cf_cv_libstdcpp=yes
20663 else
20664   echo "$as_me: failed program was:" >&5
20665 cat conftest.$ac_ext >&5
20666 cf_cv_libstdcpp=no
20667 fi
20668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20669                         LIBS="$cf_save"
20670
20671 fi
20672 echo "$as_me:20672: result: $cf_cv_libstdcpp" >&5
20673 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20674                 test "$cf_cv_libstdcpp" = yes && {
20675 cf_add_libs="-l$cf_stdcpp_libname"
20676 # Filter out duplicates - this happens with badly-designed ".pc" files...
20677 for cf_add_1lib in $CXXLIBS
20678 do
20679         for cf_add_2lib in $cf_add_libs
20680         do
20681                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20682                 then
20683                         cf_add_1lib=
20684                         break
20685                 fi
20686         done
20687         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20688 done
20689 CXXLIBS="$cf_add_libs"
20690  }
20691         fi
20692 fi
20693
20694         echo "$as_me:20694: checking whether $CXX understands -c and -o together" >&5
20695 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20696 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20697   echo $ECHO_N "(cached) $ECHO_C" >&6
20698 else
20699
20700 cat > conftest.$ac_ext <<CF_EOF
20701 int main(void)
20702 {
20703         ${cf_cv_main_return:-return}(0);
20704 }
20705 CF_EOF
20706 # We do the test twice because some compilers refuse to overwrite an
20707 # existing .o file with -o, though they will create one.
20708 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20709 if { (eval echo "$as_me:20709: \"$ac_try\"") >&5
20710   (eval $ac_try) 2>&5
20711   ac_status=$?
20712   echo "$as_me:20712: \$? = $ac_status" >&5
20713   (exit $ac_status); } &&
20714   test -f conftest2.$ac_objext && { (eval echo "$as_me:20714: \"$ac_try\"") >&5
20715   (eval $ac_try) 2>&5
20716   ac_status=$?
20717   echo "$as_me:20717: \$? = $ac_status" >&5
20718   (exit $ac_status); };
20719 then
20720   eval cf_cv_prog_CXX_c_o=yes
20721 else
20722   eval cf_cv_prog_CXX_c_o=no
20723 fi
20724 rm -rf conftest*
20725
20726 fi
20727 if test $cf_cv_prog_CXX_c_o = yes; then
20728   echo "$as_me:20728: result: yes" >&5
20729 echo "${ECHO_T}yes" >&6
20730 else
20731   echo "$as_me:20731: result: no" >&5
20732 echo "${ECHO_T}no" >&6
20733 fi
20734
20735         case $GXX_VERSION in
20736         (1*|2.0-6*)
20737                 cf_cxx_library=yes
20738                 ;;
20739         (*-2.7*|2.7*)
20740
20741 cf_cxx_library=unknown
20742 case $cf_cv_system_name in
20743 (os2*)
20744         cf_gpp_libname=gpp
20745         ;;
20746 (*)
20747         cf_gpp_libname=g++
20748         ;;
20749 esac
20750 if test "$GXX" = yes; then
20751         echo "$as_me:20751: checking for lib$cf_gpp_libname" >&5
20752 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20753         cf_save="$LIBS"
20754
20755 cf_add_libs="-l$cf_gpp_libname"
20756 # Filter out duplicates - this happens with badly-designed ".pc" files...
20757 for cf_add_1lib in $LIBS
20758 do
20759         for cf_add_2lib in $cf_add_libs
20760         do
20761                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20762                 then
20763                         cf_add_1lib=
20764                         break
20765                 fi
20766         done
20767         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20768 done
20769 LIBS="$cf_add_libs"
20770
20771         cat >conftest.$ac_ext <<_ACEOF
20772 #line 20772 "configure"
20773 #include "confdefs.h"
20774
20775 #include <$cf_gpp_libname/builtin.h>
20776
20777 int
20778 main (void)
20779 {
20780 two_arg_error_handler_t foo2 = lib_error_handler
20781   ;
20782   return 0;
20783 }
20784 _ACEOF
20785 rm -f conftest.$ac_objext conftest$ac_exeext
20786 if { (eval echo "$as_me:20786: \"$ac_link\"") >&5
20787   (eval $ac_link) 2>&5
20788   ac_status=$?
20789   echo "$as_me:20789: \$? = $ac_status" >&5
20790   (exit $ac_status); } &&
20791          { ac_try='test -s conftest$ac_exeext'
20792   { (eval echo "$as_me:20792: \"$ac_try\"") >&5
20793   (eval $ac_try) 2>&5
20794   ac_status=$?
20795   echo "$as_me:20795: \$? = $ac_status" >&5
20796   (exit $ac_status); }; }; then
20797   cf_cxx_library=yes
20798
20799 cf_add_libs="-l$cf_gpp_libname"
20800 # Filter out duplicates - this happens with badly-designed ".pc" files...
20801 for cf_add_1lib in $CXXLIBS
20802 do
20803         for cf_add_2lib in $cf_add_libs
20804         do
20805                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20806                 then
20807                         cf_add_1lib=
20808                         break
20809                 fi
20810         done
20811         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20812 done
20813 CXXLIBS="$cf_add_libs"
20814
20815          if test "$cf_gpp_libname" = cpp ; then
20816
20817 cat >>confdefs.h <<\EOF
20818 #define HAVE_GPP_BUILTIN_H 1
20819 EOF
20820
20821          else
20822
20823 cat >>confdefs.h <<\EOF
20824 #define HAVE_GXX_BUILTIN_H 1
20825 EOF
20826
20827          fi
20828 else
20829   echo "$as_me: failed program was:" >&5
20830 cat conftest.$ac_ext >&5
20831 cat >conftest.$ac_ext <<_ACEOF
20832 #line 20832 "configure"
20833 #include "confdefs.h"
20834
20835 #include <builtin.h>
20836
20837 int
20838 main (void)
20839 {
20840 two_arg_error_handler_t foo2 = lib_error_handler
20841   ;
20842   return 0;
20843 }
20844 _ACEOF
20845 rm -f conftest.$ac_objext conftest$ac_exeext
20846 if { (eval echo "$as_me:20846: \"$ac_link\"") >&5
20847   (eval $ac_link) 2>&5
20848   ac_status=$?
20849   echo "$as_me:20849: \$? = $ac_status" >&5
20850   (exit $ac_status); } &&
20851          { ac_try='test -s conftest$ac_exeext'
20852   { (eval echo "$as_me:20852: \"$ac_try\"") >&5
20853   (eval $ac_try) 2>&5
20854   ac_status=$?
20855   echo "$as_me:20855: \$? = $ac_status" >&5
20856   (exit $ac_status); }; }; then
20857   cf_cxx_library=yes
20858
20859 cf_add_libs="-l$cf_gpp_libname"
20860 # Filter out duplicates - this happens with badly-designed ".pc" files...
20861 for cf_add_1lib in $CXXLIBS
20862 do
20863         for cf_add_2lib in $cf_add_libs
20864         do
20865                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20866                 then
20867                         cf_add_1lib=
20868                         break
20869                 fi
20870         done
20871         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20872 done
20873 CXXLIBS="$cf_add_libs"
20874
20875 cat >>confdefs.h <<\EOF
20876 #define HAVE_BUILTIN_H 1
20877 EOF
20878
20879 else
20880   echo "$as_me: failed program was:" >&5
20881 cat conftest.$ac_ext >&5
20882 cf_cxx_library=no
20883 fi
20884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20885 fi
20886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20887         LIBS="$cf_save"
20888         echo "$as_me:20888: result: $cf_cxx_library" >&5
20889 echo "${ECHO_T}$cf_cxx_library" >&6
20890 fi
20891
20892                 ;;
20893         (*)
20894                 cf_cxx_library=no
20895                 ;;
20896         esac
20897
20898         ac_ext=cc
20899 ac_cpp='$CXXCPP $CPPFLAGS'
20900 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20901 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20902 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20903 ac_main_return=return
20904 echo "$as_me:20904: checking how to run the C++ preprocessor" >&5
20905 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20906 if test -z "$CXXCPP"; then
20907   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20908   echo $ECHO_N "(cached) $ECHO_C" >&6
20909 else
20910       # Double quotes because CXXCPP needs to be expanded
20911     for CXXCPP in "$CXX -E" "/lib/cpp"
20912     do
20913       ac_preproc_ok=false
20914 for ac_cxx_preproc_warn_flag in '' yes
20915 do
20916   # Use a header file that comes with gcc, so configuring glibc
20917   # with a fresh cross-compiler works.
20918   # On the NeXT, cc -E runs the code through the compiler's parser,
20919   # not just through cpp. "Syntax error" is here to catch this case.
20920   cat >conftest.$ac_ext <<_ACEOF
20921 #line 20921 "configure"
20922 #include "confdefs.h"
20923 #include <assert.h>
20924                      Syntax error
20925 _ACEOF
20926 if { (eval echo "$as_me:20926: \"$ac_cpp conftest.$ac_ext\"") >&5
20927   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20928   ac_status=$?
20929   egrep -v '^ *\+' conftest.er1 >conftest.err
20930   rm -f conftest.er1
20931   cat conftest.err >&5
20932   echo "$as_me:20932: \$? = $ac_status" >&5
20933   (exit $ac_status); } >/dev/null; then
20934   if test -s conftest.err; then
20935     ac_cpp_err=$ac_cxx_preproc_warn_flag
20936   else
20937     ac_cpp_err=
20938   fi
20939 else
20940   ac_cpp_err=yes
20941 fi
20942 if test -z "$ac_cpp_err"; then
20943   :
20944 else
20945   echo "$as_me: failed program was:" >&5
20946   cat conftest.$ac_ext >&5
20947   # Broken: fails on valid input.
20948 continue
20949 fi
20950 rm -f conftest.err conftest.$ac_ext
20951
20952   # OK, works on sane cases.  Now check whether non-existent headers
20953   # can be detected and how.
20954   cat >conftest.$ac_ext <<_ACEOF
20955 #line 20955 "configure"
20956 #include "confdefs.h"
20957 #include <ac_nonexistent.h>
20958 _ACEOF
20959 if { (eval echo "$as_me:20959: \"$ac_cpp conftest.$ac_ext\"") >&5
20960   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20961   ac_status=$?
20962   egrep -v '^ *\+' conftest.er1 >conftest.err
20963   rm -f conftest.er1
20964   cat conftest.err >&5
20965   echo "$as_me:20965: \$? = $ac_status" >&5
20966   (exit $ac_status); } >/dev/null; then
20967   if test -s conftest.err; then
20968     ac_cpp_err=$ac_cxx_preproc_warn_flag
20969   else
20970     ac_cpp_err=
20971   fi
20972 else
20973   ac_cpp_err=yes
20974 fi
20975 if test -z "$ac_cpp_err"; then
20976   # Broken: success on invalid input.
20977 continue
20978 else
20979   echo "$as_me: failed program was:" >&5
20980   cat conftest.$ac_ext >&5
20981   # Passes both tests.
20982 ac_preproc_ok=:
20983 break
20984 fi
20985 rm -f conftest.err conftest.$ac_ext
20986
20987 done
20988 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20989 rm -f conftest.err conftest.$ac_ext
20990 if $ac_preproc_ok; then
20991   break
20992 fi
20993
20994     done
20995     ac_cv_prog_CXXCPP=$CXXCPP
20996
20997 fi
20998   CXXCPP=$ac_cv_prog_CXXCPP
20999 else
21000   ac_cv_prog_CXXCPP=$CXXCPP
21001 fi
21002 echo "$as_me:21002: result: $CXXCPP" >&5
21003 echo "${ECHO_T}$CXXCPP" >&6
21004 ac_preproc_ok=false
21005 for ac_cxx_preproc_warn_flag in '' yes
21006 do
21007   # Use a header file that comes with gcc, so configuring glibc
21008   # with a fresh cross-compiler works.
21009   # On the NeXT, cc -E runs the code through the compiler's parser,
21010   # not just through cpp. "Syntax error" is here to catch this case.
21011   cat >conftest.$ac_ext <<_ACEOF
21012 #line 21012 "configure"
21013 #include "confdefs.h"
21014 #include <assert.h>
21015                      Syntax error
21016 _ACEOF
21017 if { (eval echo "$as_me:21017: \"$ac_cpp conftest.$ac_ext\"") >&5
21018   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21019   ac_status=$?
21020   egrep -v '^ *\+' conftest.er1 >conftest.err
21021   rm -f conftest.er1
21022   cat conftest.err >&5
21023   echo "$as_me:21023: \$? = $ac_status" >&5
21024   (exit $ac_status); } >/dev/null; then
21025   if test -s conftest.err; then
21026     ac_cpp_err=$ac_cxx_preproc_warn_flag
21027   else
21028     ac_cpp_err=
21029   fi
21030 else
21031   ac_cpp_err=yes
21032 fi
21033 if test -z "$ac_cpp_err"; then
21034   :
21035 else
21036   echo "$as_me: failed program was:" >&5
21037   cat conftest.$ac_ext >&5
21038   # Broken: fails on valid input.
21039 continue
21040 fi
21041 rm -f conftest.err conftest.$ac_ext
21042
21043   # OK, works on sane cases.  Now check whether non-existent headers
21044   # can be detected and how.
21045   cat >conftest.$ac_ext <<_ACEOF
21046 #line 21046 "configure"
21047 #include "confdefs.h"
21048 #include <ac_nonexistent.h>
21049 _ACEOF
21050 if { (eval echo "$as_me:21050: \"$ac_cpp conftest.$ac_ext\"") >&5
21051   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21052   ac_status=$?
21053   egrep -v '^ *\+' conftest.er1 >conftest.err
21054   rm -f conftest.er1
21055   cat conftest.err >&5
21056   echo "$as_me:21056: \$? = $ac_status" >&5
21057   (exit $ac_status); } >/dev/null; then
21058   if test -s conftest.err; then
21059     ac_cpp_err=$ac_cxx_preproc_warn_flag
21060   else
21061     ac_cpp_err=
21062   fi
21063 else
21064   ac_cpp_err=yes
21065 fi
21066 if test -z "$ac_cpp_err"; then
21067   # Broken: success on invalid input.
21068 continue
21069 else
21070   echo "$as_me: failed program was:" >&5
21071   cat conftest.$ac_ext >&5
21072   # Passes both tests.
21073 ac_preproc_ok=:
21074 break
21075 fi
21076 rm -f conftest.err conftest.$ac_ext
21077
21078 done
21079 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21080 rm -f conftest.err conftest.$ac_ext
21081 if $ac_preproc_ok; then
21082   :
21083 else
21084   { { echo "$as_me:21084: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
21085 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
21086    { (exit 1); exit 1; }; }
21087 fi
21088
21089 ac_ext=cc
21090 ac_cpp='$CXXCPP $CPPFLAGS'
21091 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21092 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21093 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21094 ac_main_return=return
21095
21096 for ac_header in typeinfo
21097 do
21098 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21099 echo "$as_me:21099: checking for $ac_header" >&5
21100 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21101 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21102   echo $ECHO_N "(cached) $ECHO_C" >&6
21103 else
21104   cat >conftest.$ac_ext <<_ACEOF
21105 #line 21105 "configure"
21106 #include "confdefs.h"
21107 #include <$ac_header>
21108 _ACEOF
21109 if { (eval echo "$as_me:21109: \"$ac_cpp conftest.$ac_ext\"") >&5
21110   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21111   ac_status=$?
21112   egrep -v '^ *\+' conftest.er1 >conftest.err
21113   rm -f conftest.er1
21114   cat conftest.err >&5
21115   echo "$as_me:21115: \$? = $ac_status" >&5
21116   (exit $ac_status); } >/dev/null; then
21117   if test -s conftest.err; then
21118     ac_cpp_err=$ac_cxx_preproc_warn_flag
21119   else
21120     ac_cpp_err=
21121   fi
21122 else
21123   ac_cpp_err=yes
21124 fi
21125 if test -z "$ac_cpp_err"; then
21126   eval "$as_ac_Header=yes"
21127 else
21128   echo "$as_me: failed program was:" >&5
21129   cat conftest.$ac_ext >&5
21130   eval "$as_ac_Header=no"
21131 fi
21132 rm -f conftest.err conftest.$ac_ext
21133 fi
21134 echo "$as_me:21134: result: `eval echo '${'$as_ac_Header'}'`" >&5
21135 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21136 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21137   cat >>confdefs.h <<EOF
21138 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21139 EOF
21140
21141 fi
21142 done
21143
21144 for ac_header in iostream
21145 do
21146 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21147 echo "$as_me:21147: checking for $ac_header" >&5
21148 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21149 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21150   echo $ECHO_N "(cached) $ECHO_C" >&6
21151 else
21152   cat >conftest.$ac_ext <<_ACEOF
21153 #line 21153 "configure"
21154 #include "confdefs.h"
21155 #include <$ac_header>
21156 _ACEOF
21157 if { (eval echo "$as_me:21157: \"$ac_cpp conftest.$ac_ext\"") >&5
21158   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21159   ac_status=$?
21160   egrep -v '^ *\+' conftest.er1 >conftest.err
21161   rm -f conftest.er1
21162   cat conftest.err >&5
21163   echo "$as_me:21163: \$? = $ac_status" >&5
21164   (exit $ac_status); } >/dev/null; then
21165   if test -s conftest.err; then
21166     ac_cpp_err=$ac_cxx_preproc_warn_flag
21167   else
21168     ac_cpp_err=
21169   fi
21170 else
21171   ac_cpp_err=yes
21172 fi
21173 if test -z "$ac_cpp_err"; then
21174   eval "$as_ac_Header=yes"
21175 else
21176   echo "$as_me: failed program was:" >&5
21177   cat conftest.$ac_ext >&5
21178   eval "$as_ac_Header=no"
21179 fi
21180 rm -f conftest.err conftest.$ac_ext
21181 fi
21182 echo "$as_me:21182: result: `eval echo '${'$as_ac_Header'}'`" >&5
21183 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21184 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21185   cat >>confdefs.h <<EOF
21186 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21187 EOF
21188
21189 fi
21190 done
21191
21192 if test x"$ac_cv_header_iostream" = xyes ; then
21193         echo "$as_me:21193: checking if iostream uses std-namespace" >&5
21194 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21195         cat >conftest.$ac_ext <<_ACEOF
21196 #line 21196 "configure"
21197 #include "confdefs.h"
21198
21199 #include <iostream>
21200 using std::endl;
21201 using std::cerr;
21202 int
21203 main (void)
21204 {
21205
21206 cerr << "testing" << endl;
21207
21208   ;
21209   return 0;
21210 }
21211 _ACEOF
21212 rm -f conftest.$ac_objext
21213 if { (eval echo "$as_me:21213: \"$ac_compile\"") >&5
21214   (eval $ac_compile) 2>&5
21215   ac_status=$?
21216   echo "$as_me:21216: \$? = $ac_status" >&5
21217   (exit $ac_status); } &&
21218          { ac_try='test -s conftest.$ac_objext'
21219   { (eval echo "$as_me:21219: \"$ac_try\"") >&5
21220   (eval $ac_try) 2>&5
21221   ac_status=$?
21222   echo "$as_me:21222: \$? = $ac_status" >&5
21223   (exit $ac_status); }; }; then
21224   cf_iostream_namespace=yes
21225 else
21226   echo "$as_me: failed program was:" >&5
21227 cat conftest.$ac_ext >&5
21228 cf_iostream_namespace=no
21229 fi
21230 rm -f conftest.$ac_objext conftest.$ac_ext
21231         echo "$as_me:21231: result: $cf_iostream_namespace" >&5
21232 echo "${ECHO_T}$cf_iostream_namespace" >&6
21233         if test "$cf_iostream_namespace" = yes ; then
21234
21235 cat >>confdefs.h <<\EOF
21236 #define IOSTREAM_NAMESPACE 1
21237 EOF
21238
21239         fi
21240 fi
21241
21242 echo "$as_me:21242: checking if we should include stdbool.h" >&5
21243 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21244
21245 if test "${cf_cv_header_stdbool_h+set}" = set; then
21246   echo $ECHO_N "(cached) $ECHO_C" >&6
21247 else
21248
21249         cat >conftest.$ac_ext <<_ACEOF
21250 #line 21250 "configure"
21251 #include "confdefs.h"
21252
21253 int
21254 main (void)
21255 {
21256 bool foo = false
21257   ;
21258   return 0;
21259 }
21260 _ACEOF
21261 rm -f conftest.$ac_objext
21262 if { (eval echo "$as_me:21262: \"$ac_compile\"") >&5
21263   (eval $ac_compile) 2>&5
21264   ac_status=$?
21265   echo "$as_me:21265: \$? = $ac_status" >&5
21266   (exit $ac_status); } &&
21267          { ac_try='test -s conftest.$ac_objext'
21268   { (eval echo "$as_me:21268: \"$ac_try\"") >&5
21269   (eval $ac_try) 2>&5
21270   ac_status=$?
21271   echo "$as_me:21271: \$? = $ac_status" >&5
21272   (exit $ac_status); }; }; then
21273   cf_cv_header_stdbool_h=0
21274 else
21275   echo "$as_me: failed program was:" >&5
21276 cat conftest.$ac_ext >&5
21277 cat >conftest.$ac_ext <<_ACEOF
21278 #line 21278 "configure"
21279 #include "confdefs.h"
21280
21281 #ifndef __BEOS__
21282 #include <stdbool.h>
21283 #endif
21284
21285 int
21286 main (void)
21287 {
21288 bool foo = false
21289   ;
21290   return 0;
21291 }
21292 _ACEOF
21293 rm -f conftest.$ac_objext
21294 if { (eval echo "$as_me:21294: \"$ac_compile\"") >&5
21295   (eval $ac_compile) 2>&5
21296   ac_status=$?
21297   echo "$as_me:21297: \$? = $ac_status" >&5
21298   (exit $ac_status); } &&
21299          { ac_try='test -s conftest.$ac_objext'
21300   { (eval echo "$as_me:21300: \"$ac_try\"") >&5
21301   (eval $ac_try) 2>&5
21302   ac_status=$?
21303   echo "$as_me:21303: \$? = $ac_status" >&5
21304   (exit $ac_status); }; }; then
21305   cf_cv_header_stdbool_h=1
21306 else
21307   echo "$as_me: failed program was:" >&5
21308 cat conftest.$ac_ext >&5
21309 cf_cv_header_stdbool_h=0
21310 fi
21311 rm -f conftest.$ac_objext conftest.$ac_ext
21312 fi
21313 rm -f conftest.$ac_objext conftest.$ac_ext
21314 fi
21315
21316 if test "$cf_cv_header_stdbool_h" = 1
21317 then    echo "$as_me:21317: result: yes" >&5
21318 echo "${ECHO_T}yes" >&6
21319 else    echo "$as_me:21319: result: no" >&5
21320 echo "${ECHO_T}no" >&6
21321 fi
21322
21323 echo "$as_me:21323: checking for builtin bool type" >&5
21324 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21325
21326 if test "${cf_cv_builtin_bool+set}" = set; then
21327   echo $ECHO_N "(cached) $ECHO_C" >&6
21328 else
21329
21330         cat >conftest.$ac_ext <<_ACEOF
21331 #line 21331 "configure"
21332 #include "confdefs.h"
21333
21334 #include <stdio.h>
21335 #include <sys/types.h>
21336
21337 int
21338 main (void)
21339 {
21340 bool x = false
21341   ;
21342   return 0;
21343 }
21344 _ACEOF
21345 rm -f conftest.$ac_objext
21346 if { (eval echo "$as_me:21346: \"$ac_compile\"") >&5
21347   (eval $ac_compile) 2>&5
21348   ac_status=$?
21349   echo "$as_me:21349: \$? = $ac_status" >&5
21350   (exit $ac_status); } &&
21351          { ac_try='test -s conftest.$ac_objext'
21352   { (eval echo "$as_me:21352: \"$ac_try\"") >&5
21353   (eval $ac_try) 2>&5
21354   ac_status=$?
21355   echo "$as_me:21355: \$? = $ac_status" >&5
21356   (exit $ac_status); }; }; then
21357   cf_cv_builtin_bool=1
21358 else
21359   echo "$as_me: failed program was:" >&5
21360 cat conftest.$ac_ext >&5
21361 cf_cv_builtin_bool=0
21362 fi
21363 rm -f conftest.$ac_objext conftest.$ac_ext
21364
21365 fi
21366
21367 if test "$cf_cv_builtin_bool" = 1
21368 then    echo "$as_me:21368: result: yes" >&5
21369 echo "${ECHO_T}yes" >&6
21370 else    echo "$as_me:21370: result: no" >&5
21371 echo "${ECHO_T}no" >&6
21372 fi
21373
21374 echo "$as_me:21374: checking for size of bool" >&5
21375 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21376 if test "${cf_cv_type_of_bool+set}" = set; then
21377   echo $ECHO_N "(cached) $ECHO_C" >&6
21378 else
21379
21380         rm -f cf_test.out
21381         if test "$cross_compiling" = yes; then
21382   cf_cv_type_of_bool=unknown
21383 else
21384   cat >conftest.$ac_ext <<_ACEOF
21385 #line 21385 "configure"
21386 #include "confdefs.h"
21387
21388 #include <stdlib.h>
21389 #include <stdio.h>
21390
21391 #if defined(__cplusplus)
21392
21393 #ifdef HAVE_GXX_BUILTIN_H
21394 #include <g++/builtin.h>
21395 #elif HAVE_GPP_BUILTIN_H
21396 #include <gpp/builtin.h>
21397 #elif HAVE_BUILTIN_H
21398 #include <builtin.h>
21399 #endif
21400
21401 #else
21402
21403 #if $cf_cv_header_stdbool_h
21404 #include <stdbool.h>
21405 #endif
21406
21407 #endif
21408
21409 int main(void)
21410 {
21411         FILE *fp = fopen("cf_test.out", "w");
21412         if (fp != 0) {
21413                 bool x = true;
21414                 if ((bool)(-x) >= 0)
21415                         fputs("unsigned ", fp);
21416                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21417                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21418                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21419                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21420                 fclose(fp);
21421         }
21422         ${cf_cv_main_return:-return}(0);
21423 }
21424
21425 _ACEOF
21426 rm -f conftest$ac_exeext
21427 if { (eval echo "$as_me:21427: \"$ac_link\"") >&5
21428   (eval $ac_link) 2>&5
21429   ac_status=$?
21430   echo "$as_me:21430: \$? = $ac_status" >&5
21431   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21432   { (eval echo "$as_me:21432: \"$ac_try\"") >&5
21433   (eval $ac_try) 2>&5
21434   ac_status=$?
21435   echo "$as_me:21435: \$? = $ac_status" >&5
21436   (exit $ac_status); }; }; then
21437   cf_cv_type_of_bool=`cat cf_test.out`
21438                  if test -z "$cf_cv_type_of_bool"; then
21439                    cf_cv_type_of_bool=unknown
21440                  fi
21441 else
21442   echo "$as_me: program exited with status $ac_status" >&5
21443 echo "$as_me: failed program was:" >&5
21444 cat conftest.$ac_ext >&5
21445 cf_cv_type_of_bool=unknown
21446 fi
21447 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21448 fi
21449
21450 fi
21451
21452         rm -f cf_test.out
21453 echo "$as_me:21453: result: $cf_cv_type_of_bool" >&5
21454 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21455 if test "$cf_cv_type_of_bool" = unknown ; then
21456         case .$NCURSES_BOOL in
21457         (.auto|.) NCURSES_BOOL=unsigned;;
21458         esac
21459         { echo "$as_me:21459: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21460 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21461         cf_cv_type_of_bool=$NCURSES_BOOL
21462 fi
21463
21464 echo "$as_me:21464: checking for special defines needed for etip.h" >&5
21465 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21466 cf_save_CXXFLAGS="$CXXFLAGS"
21467 cf_result="none"
21468
21469 # etip.h includes ncurses.h which includes ncurses_dll.h
21470 # But ncurses_dll.h is generated - fix here.
21471 test -d include || mkdir include
21472 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
21473
21474 for cf_math in "" MATH_H
21475 do
21476 for cf_excp in "" MATH_EXCEPTION
21477 do
21478         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21479         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21480         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21481 cat >conftest.$ac_ext <<_ACEOF
21482 #line 21482 "configure"
21483 #include "confdefs.h"
21484
21485 #include <etip.h.in>
21486
21487 int
21488 main (void)
21489 {
21490
21491   ;
21492   return 0;
21493 }
21494 _ACEOF
21495 rm -f conftest.$ac_objext
21496 if { (eval echo "$as_me:21496: \"$ac_compile\"") >&5
21497   (eval $ac_compile) 2>&5
21498   ac_status=$?
21499   echo "$as_me:21499: \$? = $ac_status" >&5
21500   (exit $ac_status); } &&
21501          { ac_try='test -s conftest.$ac_objext'
21502   { (eval echo "$as_me:21502: \"$ac_try\"") >&5
21503   (eval $ac_try) 2>&5
21504   ac_status=$?
21505   echo "$as_me:21505: \$? = $ac_status" >&5
21506   (exit $ac_status); }; }; then
21507
21508         test -n "$cf_math" && cat >>confdefs.h <<EOF
21509 #define ETIP_NEEDS_${cf_math} 1
21510 EOF
21511
21512         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21513 #define ETIP_NEEDS_${cf_excp} 1
21514 EOF
21515
21516         cf_result="$cf_math $cf_excp"
21517         break 2
21518
21519 else
21520   echo "$as_me: failed program was:" >&5
21521 cat conftest.$ac_ext >&5
21522 fi
21523 rm -f conftest.$ac_objext conftest.$ac_ext
21524 done
21525 done
21526 echo "$as_me:21526: result: $cf_result" >&5
21527 echo "${ECHO_T}$cf_result" >&6
21528 CXXFLAGS="$cf_save_CXXFLAGS"
21529
21530 if test -n "$CXX"; then
21531 echo "$as_me:21531: checking if $CXX accepts parameter initialization" >&5
21532 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21533 if test "${cf_cv_cpp_param_init+set}" = set; then
21534   echo $ECHO_N "(cached) $ECHO_C" >&6
21535 else
21536
21537         ac_ext=cc
21538 ac_cpp='$CXXCPP $CPPFLAGS'
21539 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21540 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21541 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21542 ac_main_return=return
21543
21544         if test "$cross_compiling" = yes; then
21545   cf_cv_cpp_param_init=unknown
21546 else
21547   cat >conftest.$ac_ext <<_ACEOF
21548 #line 21548 "configure"
21549 #include "confdefs.h"
21550
21551 class TEST {
21552 private:
21553         int value;
21554 public:
21555         TEST(int x = 1);
21556         ~TEST();
21557 };
21558
21559 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21560 {
21561         value = x;
21562 }
21563 int main(void) { }
21564
21565 _ACEOF
21566 rm -f conftest$ac_exeext
21567 if { (eval echo "$as_me:21567: \"$ac_link\"") >&5
21568   (eval $ac_link) 2>&5
21569   ac_status=$?
21570   echo "$as_me:21570: \$? = $ac_status" >&5
21571   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21572   { (eval echo "$as_me:21572: \"$ac_try\"") >&5
21573   (eval $ac_try) 2>&5
21574   ac_status=$?
21575   echo "$as_me:21575: \$? = $ac_status" >&5
21576   (exit $ac_status); }; }; then
21577   cf_cv_cpp_param_init=yes
21578 else
21579   echo "$as_me: program exited with status $ac_status" >&5
21580 echo "$as_me: failed program was:" >&5
21581 cat conftest.$ac_ext >&5
21582 cf_cv_cpp_param_init=no
21583 fi
21584 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21585 fi
21586         ac_ext=cc
21587 ac_cpp='$CXXCPP $CPPFLAGS'
21588 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21589 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21590 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21591 ac_main_return=return
21592
21593 fi
21594 echo "$as_me:21594: result: $cf_cv_cpp_param_init" >&5
21595 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21596 fi
21597 test "$cf_cv_cpp_param_init" = yes &&
21598 cat >>confdefs.h <<\EOF
21599 #define CPP_HAS_PARAM_INIT 1
21600 EOF
21601
21602 if test -n "$CXX"; then
21603
21604 echo "$as_me:21604: checking if $CXX accepts static_cast" >&5
21605 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21606 if test "${cf_cv_cpp_static_cast+set}" = set; then
21607   echo $ECHO_N "(cached) $ECHO_C" >&6
21608 else
21609
21610         ac_ext=cc
21611 ac_cpp='$CXXCPP $CPPFLAGS'
21612 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21613 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21614 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21615 ac_main_return=return
21616
21617         cat >conftest.$ac_ext <<_ACEOF
21618 #line 21618 "configure"
21619 #include "confdefs.h"
21620
21621 class NCursesPanel
21622 {
21623 public:
21624   NCursesPanel(int nlines,
21625                int ncols,
21626                int begin_y = 0,
21627                int begin_x = 0)
21628   {
21629   }
21630   NCursesPanel();
21631   ~NCursesPanel();
21632 };
21633
21634 template<class T> class NCursesUserPanel : public NCursesPanel
21635 {
21636 public:
21637   NCursesUserPanel (int nlines,
21638                     int ncols,
21639                     int begin_y = 0,
21640                     int begin_x = 0,
21641                     const T* p_UserData = static_cast<T*>(0))
21642     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21643   {
21644   };
21645   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21646   {
21647   };
21648
21649   virtual ~NCursesUserPanel() {};
21650 };
21651
21652 int
21653 main (void)
21654 {
21655
21656         const char* p_UserData = static_cast<char*>(0)
21657   ;
21658   return 0;
21659 }
21660 _ACEOF
21661 rm -f conftest.$ac_objext
21662 if { (eval echo "$as_me:21662: \"$ac_compile\"") >&5
21663   (eval $ac_compile) 2>&5
21664   ac_status=$?
21665   echo "$as_me:21665: \$? = $ac_status" >&5
21666   (exit $ac_status); } &&
21667          { ac_try='test -s conftest.$ac_objext'
21668   { (eval echo "$as_me:21668: \"$ac_try\"") >&5
21669   (eval $ac_try) 2>&5
21670   ac_status=$?
21671   echo "$as_me:21671: \$? = $ac_status" >&5
21672   (exit $ac_status); }; }; then
21673   cf_cv_cpp_static_cast=yes
21674 else
21675   echo "$as_me: failed program was:" >&5
21676 cat conftest.$ac_ext >&5
21677 cf_cv_cpp_static_cast=no
21678 fi
21679 rm -f conftest.$ac_objext conftest.$ac_ext
21680
21681         ac_ext=cc
21682 ac_cpp='$CXXCPP $CPPFLAGS'
21683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21686 ac_main_return=return
21687
21688 fi
21689 echo "$as_me:21689: result: $cf_cv_cpp_static_cast" >&5
21690 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21691
21692 fi
21693
21694 test "$cf_cv_cpp_static_cast" = yes &&
21695 cat >>confdefs.h <<\EOF
21696 #define CPP_HAS_STATIC_CAST 1
21697 EOF
21698
21699         CXX_AR='$(AR)'
21700         CXX_ARFLAGS='$(ARFLAGS)'
21701         case $cf_cv_system_name in
21702         (irix*)
21703             if test "$GXX" != yes ; then
21704                 CXX_AR='$(CXX)'
21705                 CXX_ARFLAGS='-ar -o'
21706             fi
21707             ;;
21708         (sco3.2v5*)
21709             CXXLDFLAGS="-u main"
21710             ;;
21711         (solaris2*)
21712             if test "$GXX" != yes ; then
21713                 CXX_AR='$(CXX)'
21714                 CXX_ARFLAGS='-xar -o'
21715             fi
21716             ;;
21717         esac
21718
21719 else
21720         cf_cxx_library=no
21721         cf_cv_builtin_bool=1
21722
21723         # Just because we are not configuring against C++ right now does not
21724         # mean that a user will not want to use C++.  Some distributors disable
21725         # the C++ portion of this configuration as a shortcut (or just to avoid
21726         # compiling the demo in the c++ directory).  So we need a reasonable
21727         # default for the 'bool' type.
21728         #
21729         # Caveat: since the storage of the bool type is not standardized, it
21730         # may change.
21731
21732         if test "$NCURSES_BOOL" != auto ; then
21733                 cf_cv_type_of_bool=$NCURSES_BOOL
21734                 cf_cv_header_stdbool_h=0
21735         else
21736                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21737
21738 echo "$as_me:21738: checking for size of bool" >&5
21739 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21740 if test "${cf_cv_type_of_bool+set}" = set; then
21741   echo $ECHO_N "(cached) $ECHO_C" >&6
21742 else
21743
21744         rm -f cf_test.out
21745         if test "$cross_compiling" = yes; then
21746   cf_cv_type_of_bool=unknown
21747 else
21748   cat >conftest.$ac_ext <<_ACEOF
21749 #line 21749 "configure"
21750 #include "confdefs.h"
21751
21752 #include <stdlib.h>
21753 #include <stdio.h>
21754
21755 #if defined(__cplusplus)
21756
21757 #ifdef HAVE_GXX_BUILTIN_H
21758 #include <g++/builtin.h>
21759 #elif HAVE_GPP_BUILTIN_H
21760 #include <gpp/builtin.h>
21761 #elif HAVE_BUILTIN_H
21762 #include <builtin.h>
21763 #endif
21764
21765 #else
21766
21767 #if $cf_cv_header_stdbool_h
21768 #include <stdbool.h>
21769 #endif
21770
21771 #endif
21772
21773 int main(void)
21774 {
21775         FILE *fp = fopen("cf_test.out", "w");
21776         if (fp != 0) {
21777                 bool x = true;
21778                 if ((bool)(-x) >= 0)
21779                         fputs("unsigned ", fp);
21780                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21781                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21782                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21783                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21784                 fclose(fp);
21785         }
21786         ${cf_cv_main_return:-return}(0);
21787 }
21788
21789 _ACEOF
21790 rm -f conftest$ac_exeext
21791 if { (eval echo "$as_me:21791: \"$ac_link\"") >&5
21792   (eval $ac_link) 2>&5
21793   ac_status=$?
21794   echo "$as_me:21794: \$? = $ac_status" >&5
21795   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21796   { (eval echo "$as_me:21796: \"$ac_try\"") >&5
21797   (eval $ac_try) 2>&5
21798   ac_status=$?
21799   echo "$as_me:21799: \$? = $ac_status" >&5
21800   (exit $ac_status); }; }; then
21801   cf_cv_type_of_bool=`cat cf_test.out`
21802                  if test -z "$cf_cv_type_of_bool"; then
21803                    cf_cv_type_of_bool=unknown
21804                  fi
21805 else
21806   echo "$as_me: program exited with status $ac_status" >&5
21807 echo "$as_me: failed program was:" >&5
21808 cat conftest.$ac_ext >&5
21809 cf_cv_type_of_bool=unknown
21810 fi
21811 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21812 fi
21813
21814 fi
21815
21816         rm -f cf_test.out
21817 echo "$as_me:21817: result: $cf_cv_type_of_bool" >&5
21818 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21819 if test "$cf_cv_type_of_bool" = unknown ; then
21820         case .$NCURSES_BOOL in
21821         (.auto|.) NCURSES_BOOL=unsigned;;
21822         esac
21823         { echo "$as_me:21823: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21824 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21825         cf_cv_type_of_bool=$NCURSES_BOOL
21826 fi
21827
21828                 else
21829                         echo "$as_me:21829: checking for fallback type of bool" >&5
21830 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21831                         case "$host_cpu" in
21832                         (i?86)  cf_cv_type_of_bool=char ;;
21833                         (*)     cf_cv_type_of_bool=int  ;;
21834                         esac
21835                         echo "$as_me:21835: result: $cf_cv_type_of_bool" >&5
21836 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21837                 fi
21838         fi
21839 fi
21840
21841 # If the C compiler did not declare bool, and we did not determine that the C++
21842 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21843 # ncurses library use the same type as C++ bool.  Note that this allows one to
21844 # specify the type of bool in a configure-script option and postpone
21845 # integration with the C++ compiler provided that the types are compatible.
21846 USE_CXX_BOOL=1
21847 if test $cf_cv_cc_bool_type = 1
21848 then
21849         # oops: C has a bool.  Unlikely, but C++ could differ.
21850         USE_CXX_BOOL=0
21851 elif test $cf_cv_builtin_bool = 0
21852 then
21853         # C++ has no bool
21854         USE_CXX_BOOL=0
21855 else
21856         # this is the normal case
21857         USE_CXX_BOOL='defined(__cplusplus)'
21858 fi
21859
21860 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21861
21862         if test "$cf_with_ada" != "no" ; then
21863                 if test "$with_libtool" != "no"; then
21864                         { echo "$as_me:21864: WARNING: libtool does not support Ada - disabling feature" >&5
21865 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21866                         cf_with_ada=no
21867                 fi
21868         fi
21869
21870         if test "$cf_with_ada" != "no" ; then
21871
21872 cf_ada_make=gnatmake
21873 cf_ada_config="#"
21874 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21875 set dummy $cf_ada_make; ac_word=$2
21876 echo "$as_me:21876: checking for $ac_word" >&5
21877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21878 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
21879   echo $ECHO_N "(cached) $ECHO_C" >&6
21880 else
21881   if test -n "$gnatmake_exists"; then
21882   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
21883 else
21884   ac_save_IFS=$IFS; IFS=$ac_path_separator
21885 ac_dummy="$PATH"
21886 for ac_dir in $ac_dummy; do
21887   IFS=$ac_save_IFS
21888   test -z "$ac_dir" && ac_dir=.
21889   $as_executable_p "$ac_dir/$ac_word" || continue
21890 ac_cv_prog_gnatmake_exists="yes"
21891 echo "$as_me:21891: found $ac_dir/$ac_word" >&5
21892 break
21893 done
21894
21895   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
21896 fi
21897 fi
21898 gnatmake_exists=$ac_cv_prog_gnatmake_exists
21899 if test -n "$gnatmake_exists"; then
21900   echo "$as_me:21900: result: $gnatmake_exists" >&5
21901 echo "${ECHO_T}$gnatmake_exists" >&6
21902 else
21903   echo "$as_me:21903: result: no" >&5
21904 echo "${ECHO_T}no" >&6
21905 fi
21906
21907 if test "$ac_cv_prog_gnatmake_exists" = no; then
21908         cf_ada_make=
21909         cf_cv_prog_gnat_correct=no
21910 else
21911         # Extract the first word of "gprconfig", so it can be a program name with args.
21912 set dummy gprconfig; ac_word=$2
21913 echo "$as_me:21913: checking for $ac_word" >&5
21914 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21915 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
21916   echo $ECHO_N "(cached) $ECHO_C" >&6
21917 else
21918   if test -n "$gprconfig_exists"; then
21919   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
21920 else
21921   ac_save_IFS=$IFS; IFS=$ac_path_separator
21922 ac_dummy="$PATH"
21923 for ac_dir in $ac_dummy; do
21924   IFS=$ac_save_IFS
21925   test -z "$ac_dir" && ac_dir=.
21926   $as_executable_p "$ac_dir/$ac_word" || continue
21927 ac_cv_prog_gprconfig_exists="yes"
21928 echo "$as_me:21928: found $ac_dir/$ac_word" >&5
21929 break
21930 done
21931
21932   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
21933 fi
21934 fi
21935 gprconfig_exists=$ac_cv_prog_gprconfig_exists
21936 if test -n "$gprconfig_exists"; then
21937   echo "$as_me:21937: result: $gprconfig_exists" >&5
21938 echo "${ECHO_T}$gprconfig_exists" >&6
21939 else
21940   echo "$as_me:21940: result: no" >&5
21941 echo "${ECHO_T}no" >&6
21942 fi
21943
21944         if test "$ac_cv_prog_gprconfig_exists" = yes
21945         then
21946                 rm -rf conftest* *~conftest*
21947                 if mkdir conftest.src
21948                 then
21949                         cf_ada_config=""
21950                         cd conftest.src
21951                         for cf_gprconfig in Ada C
21952                         do
21953                                 echo "$as_me:21953: checking for gprconfig name for $cf_gprconfig" >&5
21954 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
21955                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
21956                                 if test -n "$cf_gprconfig_value"
21957                                 then
21958                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
21959                                         echo "$as_me:21959: result: $cf_gprconfig_value" >&5
21960 echo "${ECHO_T}$cf_gprconfig_value" >&6
21961                                 else
21962                                         echo "$as_me:21962: result: missing" >&5
21963 echo "${ECHO_T}missing" >&6
21964                                         cf_ada_config="#"
21965                                         break
21966                                 fi
21967                         done
21968                         cd ..
21969                         rm -rf conftest* *~conftest*
21970                 fi
21971         else
21972                 # gprconfig is newer than gnatmake; we can continue...
21973                 cf_ada_config="##"
21974         fi
21975         if test "x$cf_ada_config" != "x#"
21976         then
21977
21978 echo "$as_me:21978: checking for gnat version" >&5
21979 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21980 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21981         grep '[0-9].[0-9][0-9]*' |\
21982         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21983 echo "$as_me:21983: result: $cf_gnat_version" >&5
21984 echo "${ECHO_T}$cf_gnat_version" >&6
21985
21986 case $cf_gnat_version in
21987 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21988         cf_cv_prog_gnat_correct=yes
21989         ;;
21990 (*)
21991         { echo "$as_me:21991: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21992 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21993         cf_cv_prog_gnat_correct=no
21994         ;;
21995 esac
21996
21997                 # Extract the first word of "m4", so it can be a program name with args.
21998 set dummy m4; ac_word=$2
21999 echo "$as_me:21999: checking for $ac_word" >&5
22000 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22001 if test "${ac_cv_prog_M4_exists+set}" = set; then
22002   echo $ECHO_N "(cached) $ECHO_C" >&6
22003 else
22004   if test -n "$M4_exists"; then
22005   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
22006 else
22007   ac_save_IFS=$IFS; IFS=$ac_path_separator
22008 ac_dummy="$PATH"
22009 for ac_dir in $ac_dummy; do
22010   IFS=$ac_save_IFS
22011   test -z "$ac_dir" && ac_dir=.
22012   $as_executable_p "$ac_dir/$ac_word" || continue
22013 ac_cv_prog_M4_exists="yes"
22014 echo "$as_me:22014: found $ac_dir/$ac_word" >&5
22015 break
22016 done
22017
22018   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
22019 fi
22020 fi
22021 M4_exists=$ac_cv_prog_M4_exists
22022 if test -n "$M4_exists"; then
22023   echo "$as_me:22023: result: $M4_exists" >&5
22024 echo "${ECHO_T}$M4_exists" >&6
22025 else
22026   echo "$as_me:22026: result: no" >&5
22027 echo "${ECHO_T}no" >&6
22028 fi
22029
22030                 if test "$ac_cv_prog_M4_exists" = no; then
22031                         cf_cv_prog_gnat_correct=no
22032                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
22033                 fi
22034                 if test "$cf_cv_prog_gnat_correct" = yes; then
22035                         echo "$as_me:22035: checking if GNAT works" >&5
22036 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
22037
22038 rm -rf conftest* *~conftest*
22039 cat >>conftest.ads <<CF_EOF
22040 procedure conftest;
22041 CF_EOF
22042 cat >>conftest.adb <<CF_EOF
22043 with Text_IO;
22044 with GNAT.OS_Lib;
22045 procedure conftest is
22046 begin
22047    Text_IO.Put ("Hello World");
22048    Text_IO.New_Line;
22049    GNAT.OS_Lib.OS_Exit (0);
22050 end conftest;
22051 CF_EOF
22052 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22053    if ( ./conftest 1>&5 2>&1 ) ; then
22054       cf_cv_prog_gnat_correct=yes
22055    else
22056       cf_cv_prog_gnat_correct=no
22057    fi
22058 else
22059    cf_cv_prog_gnat_correct=no
22060 fi
22061 rm -rf conftest* *~conftest*
22062
22063                         echo "$as_me:22063: result: $cf_cv_prog_gnat_correct" >&5
22064 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
22065                 fi
22066         else
22067                 cf_cv_prog_gnat_correct=no
22068         fi
22069 fi
22070
22071                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
22072
22073         ADAFLAGS="$ADAFLAGS -gnatpn"
22074
22075         echo "$as_me:22075: checking optimization options for ADAFLAGS" >&5
22076 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
22077         case "$CFLAGS" in
22078         (*-g*)
22079
22080         ADAFLAGS="$ADAFLAGS -g"
22081
22082                 ;;
22083         esac
22084         case "$CFLAGS" in
22085         (*-O*)
22086                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
22087
22088         ADAFLAGS="$ADAFLAGS $cf_O_flag"
22089
22090                 ;;
22091         esac
22092         echo "$as_me:22092: result: $ADAFLAGS" >&5
22093 echo "${ECHO_T}$ADAFLAGS" >&6
22094
22095 echo "$as_me:22095: checking if GNATPREP supports -T option" >&5
22096 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
22097 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
22098   echo $ECHO_N "(cached) $ECHO_C" >&6
22099 else
22100
22101 cf_cv_gnatprep_opt_t=no
22102 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
22103
22104 fi
22105 echo "$as_me:22105: result: $cf_cv_gnatprep_opt_t" >&5
22106 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
22107 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
22108
22109 echo "$as_me:22109: checking if GNAT supports generics" >&5
22110 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
22111 case $cf_gnat_version in
22112 (3.[1-9]*|[4-9].*)
22113         cf_gnat_generics=yes
22114         ;;
22115 (*)
22116         cf_gnat_generics=no
22117         ;;
22118 esac
22119 echo "$as_me:22119: result: $cf_gnat_generics" >&5
22120 echo "${ECHO_T}$cf_gnat_generics" >&6
22121
22122 if test "$cf_gnat_generics" = yes
22123 then
22124         cf_compile_generics=generics
22125         cf_generic_objects="\${GENOBJS}"
22126 else
22127         cf_compile_generics=
22128         cf_generic_objects=
22129 fi
22130
22131 echo "$as_me:22131: checking if GNAT supports SIGINT" >&5
22132 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
22133 if test "${cf_cv_gnat_sigint+set}" = set; then
22134   echo $ECHO_N "(cached) $ECHO_C" >&6
22135 else
22136
22137 rm -rf conftest* *~conftest*
22138 cat >>conftest.ads <<CF_EOF
22139 with Ada.Interrupts.Names;
22140
22141 package ConfTest is
22142
22143    pragma Warnings (Off);  --  the next pragma exists since 3.11p
22144    pragma Unreserve_All_Interrupts;
22145    pragma Warnings (On);
22146
22147    protected Process is
22148       procedure Stop;
22149       function Continue return Boolean;
22150       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
22151    private
22152       Done : Boolean := False;
22153    end Process;
22154
22155 end ConfTest;
22156 CF_EOF
22157 cat >>conftest.adb <<CF_EOF
22158 package body ConfTest is
22159    protected body Process is
22160       procedure Stop is
22161       begin
22162          Done := True;
22163       end Stop;
22164       function Continue return Boolean is
22165       begin
22166          return not Done;
22167       end Continue;
22168    end Process;
22169 end ConfTest;
22170 CF_EOF
22171 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22172       cf_cv_gnat_sigint=yes
22173 else
22174    cf_cv_gnat_sigint=no
22175 fi
22176 rm -rf conftest* *~conftest*
22177
22178 fi
22179 echo "$as_me:22179: result: $cf_cv_gnat_sigint" >&5
22180 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
22181
22182 if test $cf_cv_gnat_sigint = yes ; then
22183         USE_GNAT_SIGINT=""
22184 else
22185         USE_GNAT_SIGINT="#"
22186 fi
22187
22188 cf_gnat_libraries=no
22189 cf_gnat_projects=no
22190
22191 if test "$enable_gnat_projects" != no ; then
22192 echo "$as_me:22192: checking if GNAT supports project files" >&5
22193 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
22194 case $cf_gnat_version in
22195 (3.[0-9]*)
22196         ;;
22197 (*)
22198         case $cf_cv_system_name in
22199         (cygwin*|msys*)
22200                 ;;
22201         (*)
22202                 rm -rf conftest* *~conftest*
22203                 if mkdir conftest.src conftest.bin conftest.lib
22204                 then
22205                         cd conftest.src
22206                         rm -rf conftest* *~conftest*
22207                         cat >>library.gpr <<CF_EOF
22208 project Library is
22209   Kind := External ("LIB_KIND");
22210   for Library_Name use "ConfTest";
22211   for Object_Dir use ".";
22212   for Library_ALI_Dir use External("LIBRARY_DIR");
22213   for Library_Version use External ("SONAME");
22214   for Library_Kind use Kind;
22215   for Library_Dir use External("BUILD_DIR");
22216   Source_Dir := External ("SOURCE_DIR");
22217   for Source_Dirs use (Source_Dir);
22218 end Library;
22219 CF_EOF
22220                         cat >>confpackage.ads <<CF_EOF
22221 package ConfPackage is
22222    procedure conftest;
22223 end ConfPackage;
22224 CF_EOF
22225                         cat >>confpackage.adb <<CF_EOF
22226 with Text_IO;
22227 package body ConfPackage is
22228    procedure conftest is
22229    begin
22230       Text_IO.Put ("Hello World");
22231       Text_IO.New_Line;
22232    end conftest;
22233 end ConfPackage;
22234 CF_EOF
22235                         if ( $cf_ada_make $ADAFLAGS \
22236                                         -Plibrary.gpr \
22237                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22238                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22239                                         -XSOURCE_DIR=`pwd` \
22240                                         -XSONAME=libConfTest.so.1 \
22241                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
22242                                 cf_gnat_projects=yes
22243                         fi
22244                         cd ..
22245                 fi
22246                 if test -f conftest.lib/confpackage.ali
22247                 then
22248                         cf_gnat_libraries=yes
22249                 fi
22250                 rm -rf conftest* *~conftest*
22251                 ;;
22252         esac
22253         ;;
22254 esac
22255 echo "$as_me:22255: result: $cf_gnat_projects" >&5
22256 echo "${ECHO_T}$cf_gnat_projects" >&6
22257 fi # enable_gnat_projects
22258
22259 if test $cf_gnat_projects = yes
22260 then
22261         echo "$as_me:22261: checking if GNAT supports libraries" >&5
22262 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22263         echo "$as_me:22263: result: $cf_gnat_libraries" >&5
22264 echo "${ECHO_T}$cf_gnat_libraries" >&6
22265 fi
22266
22267 if test "$cf_gnat_projects" = yes
22268 then
22269         USE_OLD_MAKERULES="#"
22270         USE_GNAT_PROJECTS=""
22271 else
22272         USE_OLD_MAKERULES=""
22273         USE_GNAT_PROJECTS="#"
22274 fi
22275
22276 if test "$cf_gnat_libraries" = yes
22277 then
22278         USE_GNAT_LIBRARIES=""
22279 else
22280         USE_GNAT_LIBRARIES="#"
22281 fi
22282
22283 echo "$as_me:22283: checking for ada-compiler" >&5
22284 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22285
22286 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22287 if test "${with_ada_compiler+set}" = set; then
22288   withval="$with_ada_compiler"
22289   cf_ada_compiler=$withval
22290 else
22291   cf_ada_compiler=gnatmake
22292 fi;
22293
22294 echo "$as_me:22294: result: $cf_ada_compiler" >&5
22295 echo "${ECHO_T}$cf_ada_compiler" >&6
22296
22297                         cf_ada_package=terminal_interface
22298
22299 echo "$as_me:22299: checking for ada-include" >&5
22300 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22301
22302 # Check whether --with-ada-include or --without-ada-include was given.
22303 if test "${with_ada_include+set}" = set; then
22304   withval="$with_ada_include"
22305
22306 else
22307   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22308 fi; if test -n "$prefix/share/ada/adainclude" ; then
22309
22310 if test "x$prefix" != xNONE; then
22311         cf_path_syntax="$prefix"
22312 else
22313         cf_path_syntax="$ac_default_prefix"
22314 fi
22315
22316 case ".$withval" in
22317 (.\$\(*\)*|.\'*\'*)
22318         ;;
22319 (..|./*|.\\*)
22320         ;;
22321 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22322         ;;
22323 (.\${*prefix}*|.\${*dir}*)
22324         eval withval="$withval"
22325         case ".$withval" in
22326         (.NONE/*)
22327                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22328                 ;;
22329         esac
22330         ;;
22331 (.no|.NONE/*)
22332         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22333         ;;
22334 (*)
22335         { { echo "$as_me:22335: error: expected a pathname, not \"$withval\"" >&5
22336 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22337    { (exit 1); exit 1; }; }
22338         ;;
22339 esac
22340
22341 fi
22342 eval ADA_INCLUDE="$withval"
22343
22344 echo "$as_me:22344: result: $ADA_INCLUDE" >&5
22345 echo "${ECHO_T}$ADA_INCLUDE" >&6
22346
22347 echo "$as_me:22347: checking for ada-objects" >&5
22348 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22349
22350 # Check whether --with-ada-objects or --without-ada-objects was given.
22351 if test "${with_ada_objects+set}" = set; then
22352   withval="$with_ada_objects"
22353
22354 else
22355   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22356 fi; if test -n "$prefix/lib/ada/adalib" ; then
22357
22358 if test "x$prefix" != xNONE; then
22359         cf_path_syntax="$prefix"
22360 else
22361         cf_path_syntax="$ac_default_prefix"
22362 fi
22363
22364 case ".$withval" in
22365 (.\$\(*\)*|.\'*\'*)
22366         ;;
22367 (..|./*|.\\*)
22368         ;;
22369 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22370         ;;
22371 (.\${*prefix}*|.\${*dir}*)
22372         eval withval="$withval"
22373         case ".$withval" in
22374         (.NONE/*)
22375                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22376                 ;;
22377         esac
22378         ;;
22379 (.no|.NONE/*)
22380         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22381         ;;
22382 (*)
22383         { { echo "$as_me:22383: error: expected a pathname, not \"$withval\"" >&5
22384 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22385    { (exit 1); exit 1; }; }
22386         ;;
22387 esac
22388
22389 fi
22390 eval ADA_OBJECTS="$withval"
22391
22392 echo "$as_me:22392: result: $ADA_OBJECTS" >&5
22393 echo "${ECHO_T}$ADA_OBJECTS" >&6
22394
22395 echo "$as_me:22395: checking if an Ada95 shared-library should be built" >&5
22396 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22397
22398 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22399 if test "${with_ada_sharedlib+set}" = set; then
22400   withval="$with_ada_sharedlib"
22401   with_ada_sharedlib=$withval
22402 else
22403   with_ada_sharedlib=no
22404 fi;
22405 echo "$as_me:22405: result: $with_ada_sharedlib" >&5
22406 echo "${ECHO_T}$with_ada_sharedlib" >&6
22407
22408 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22409 MAKE_ADA_SHAREDLIB="#"
22410
22411 if test "x$with_ada_sharedlib" != xno
22412 then
22413         MAKE_ADA_SHAREDLIB=
22414         if test "x$with_ada_sharedlib" != xyes
22415         then
22416                 ADA_SHAREDLIB="$with_ada_sharedlib"
22417         fi
22418 fi
22419
22420                 fi
22421         fi
22422 else
22423         cf_with_ada=no
22424 fi
22425
22426 # do this "late" to avoid conflict with header-checks
22427 if test "x$with_widec" = xyes ; then
22428         echo "$as_me:22428: checking for wchar_t" >&5
22429 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22430 if test "${ac_cv_type_wchar_t+set}" = set; then
22431   echo $ECHO_N "(cached) $ECHO_C" >&6
22432 else
22433   cat >conftest.$ac_ext <<_ACEOF
22434 #line 22434 "configure"
22435 #include "confdefs.h"
22436 $ac_includes_default
22437 int
22438 main (void)
22439 {
22440 if ((wchar_t *) 0)
22441   return 0;
22442 if (sizeof (wchar_t))
22443   return 0;
22444   ;
22445   return 0;
22446 }
22447 _ACEOF
22448 rm -f conftest.$ac_objext
22449 if { (eval echo "$as_me:22449: \"$ac_compile\"") >&5
22450   (eval $ac_compile) 2>&5
22451   ac_status=$?
22452   echo "$as_me:22452: \$? = $ac_status" >&5
22453   (exit $ac_status); } &&
22454          { ac_try='test -s conftest.$ac_objext'
22455   { (eval echo "$as_me:22455: \"$ac_try\"") >&5
22456   (eval $ac_try) 2>&5
22457   ac_status=$?
22458   echo "$as_me:22458: \$? = $ac_status" >&5
22459   (exit $ac_status); }; }; then
22460   ac_cv_type_wchar_t=yes
22461 else
22462   echo "$as_me: failed program was:" >&5
22463 cat conftest.$ac_ext >&5
22464 ac_cv_type_wchar_t=no
22465 fi
22466 rm -f conftest.$ac_objext conftest.$ac_ext
22467 fi
22468 echo "$as_me:22468: result: $ac_cv_type_wchar_t" >&5
22469 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22470
22471 echo "$as_me:22471: checking size of wchar_t" >&5
22472 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22473 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22474   echo $ECHO_N "(cached) $ECHO_C" >&6
22475 else
22476   if test "$ac_cv_type_wchar_t" = yes; then
22477   if test "$cross_compiling" = yes; then
22478   # Depending upon the size, compute the lo and hi bounds.
22479 cat >conftest.$ac_ext <<_ACEOF
22480 #line 22480 "configure"
22481 #include "confdefs.h"
22482 $ac_includes_default
22483 int
22484 main (void)
22485 {
22486 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22487   ;
22488   return 0;
22489 }
22490 _ACEOF
22491 rm -f conftest.$ac_objext
22492 if { (eval echo "$as_me:22492: \"$ac_compile\"") >&5
22493   (eval $ac_compile) 2>&5
22494   ac_status=$?
22495   echo "$as_me:22495: \$? = $ac_status" >&5
22496   (exit $ac_status); } &&
22497          { ac_try='test -s conftest.$ac_objext'
22498   { (eval echo "$as_me:22498: \"$ac_try\"") >&5
22499   (eval $ac_try) 2>&5
22500   ac_status=$?
22501   echo "$as_me:22501: \$? = $ac_status" >&5
22502   (exit $ac_status); }; }; then
22503   ac_lo=0 ac_mid=0
22504   while :; do
22505     cat >conftest.$ac_ext <<_ACEOF
22506 #line 22506 "configure"
22507 #include "confdefs.h"
22508 $ac_includes_default
22509 int
22510 main (void)
22511 {
22512 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22513   ;
22514   return 0;
22515 }
22516 _ACEOF
22517 rm -f conftest.$ac_objext
22518 if { (eval echo "$as_me:22518: \"$ac_compile\"") >&5
22519   (eval $ac_compile) 2>&5
22520   ac_status=$?
22521   echo "$as_me:22521: \$? = $ac_status" >&5
22522   (exit $ac_status); } &&
22523          { ac_try='test -s conftest.$ac_objext'
22524   { (eval echo "$as_me:22524: \"$ac_try\"") >&5
22525   (eval $ac_try) 2>&5
22526   ac_status=$?
22527   echo "$as_me:22527: \$? = $ac_status" >&5
22528   (exit $ac_status); }; }; then
22529   ac_hi=$ac_mid; break
22530 else
22531   echo "$as_me: failed program was:" >&5
22532 cat conftest.$ac_ext >&5
22533 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22534 fi
22535 rm -f conftest.$ac_objext conftest.$ac_ext
22536   done
22537 else
22538   echo "$as_me: failed program was:" >&5
22539 cat conftest.$ac_ext >&5
22540 ac_hi=-1 ac_mid=-1
22541   while :; do
22542     cat >conftest.$ac_ext <<_ACEOF
22543 #line 22543 "configure"
22544 #include "confdefs.h"
22545 $ac_includes_default
22546 int
22547 main (void)
22548 {
22549 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22550   ;
22551   return 0;
22552 }
22553 _ACEOF
22554 rm -f conftest.$ac_objext
22555 if { (eval echo "$as_me:22555: \"$ac_compile\"") >&5
22556   (eval $ac_compile) 2>&5
22557   ac_status=$?
22558   echo "$as_me:22558: \$? = $ac_status" >&5
22559   (exit $ac_status); } &&
22560          { ac_try='test -s conftest.$ac_objext'
22561   { (eval echo "$as_me:22561: \"$ac_try\"") >&5
22562   (eval $ac_try) 2>&5
22563   ac_status=$?
22564   echo "$as_me:22564: \$? = $ac_status" >&5
22565   (exit $ac_status); }; }; then
22566   ac_lo=$ac_mid; break
22567 else
22568   echo "$as_me: failed program was:" >&5
22569 cat conftest.$ac_ext >&5
22570 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22571 fi
22572 rm -f conftest.$ac_objext conftest.$ac_ext
22573   done
22574 fi
22575 rm -f conftest.$ac_objext conftest.$ac_ext
22576 # Binary search between lo and hi bounds.
22577 while test "x$ac_lo" != "x$ac_hi"; do
22578   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22579   cat >conftest.$ac_ext <<_ACEOF
22580 #line 22580 "configure"
22581 #include "confdefs.h"
22582 $ac_includes_default
22583 int
22584 main (void)
22585 {
22586 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22587   ;
22588   return 0;
22589 }
22590 _ACEOF
22591 rm -f conftest.$ac_objext
22592 if { (eval echo "$as_me:22592: \"$ac_compile\"") >&5
22593   (eval $ac_compile) 2>&5
22594   ac_status=$?
22595   echo "$as_me:22595: \$? = $ac_status" >&5
22596   (exit $ac_status); } &&
22597          { ac_try='test -s conftest.$ac_objext'
22598   { (eval echo "$as_me:22598: \"$ac_try\"") >&5
22599   (eval $ac_try) 2>&5
22600   ac_status=$?
22601   echo "$as_me:22601: \$? = $ac_status" >&5
22602   (exit $ac_status); }; }; then
22603   ac_hi=$ac_mid
22604 else
22605   echo "$as_me: failed program was:" >&5
22606 cat conftest.$ac_ext >&5
22607 ac_lo=`expr $ac_mid + 1`
22608 fi
22609 rm -f conftest.$ac_objext conftest.$ac_ext
22610 done
22611 ac_cv_sizeof_wchar_t=$ac_lo
22612 else
22613   if test "$cross_compiling" = yes; then
22614   { { echo "$as_me:22614: error: cannot run test program while cross compiling" >&5
22615 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22616    { (exit 1); exit 1; }; }
22617 else
22618   cat >conftest.$ac_ext <<_ACEOF
22619 #line 22619 "configure"
22620 #include "confdefs.h"
22621 $ac_includes_default
22622 int
22623 main (void)
22624 {
22625 FILE *f = fopen ("conftest.val", "w");
22626 if (!f)
22627   $ac_main_return (1);
22628 fprintf (f, "%d", (sizeof (wchar_t)));
22629 fclose (f);
22630   ;
22631   return 0;
22632 }
22633 _ACEOF
22634 rm -f conftest$ac_exeext
22635 if { (eval echo "$as_me:22635: \"$ac_link\"") >&5
22636   (eval $ac_link) 2>&5
22637   ac_status=$?
22638   echo "$as_me:22638: \$? = $ac_status" >&5
22639   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22640   { (eval echo "$as_me:22640: \"$ac_try\"") >&5
22641   (eval $ac_try) 2>&5
22642   ac_status=$?
22643   echo "$as_me:22643: \$? = $ac_status" >&5
22644   (exit $ac_status); }; }; then
22645   ac_cv_sizeof_wchar_t=`cat conftest.val`
22646 else
22647   echo "$as_me: program exited with status $ac_status" >&5
22648 echo "$as_me: failed program was:" >&5
22649 cat conftest.$ac_ext >&5
22650 fi
22651 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22652 fi
22653 fi
22654 rm -f conftest.val
22655 else
22656   ac_cv_sizeof_wchar_t=0
22657 fi
22658 fi
22659 echo "$as_me:22659: result: $ac_cv_sizeof_wchar_t" >&5
22660 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22661 cat >>confdefs.h <<EOF
22662 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22663 EOF
22664
22665 fi
22666
22667 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22668 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22669 ###
22670 ### ticlib modules may be a separate library, otherwise contained in termlib.
22671 ### termlib modules may be a separate library, otherwise contained in ncurses.
22672 ###
22673 ### The of "+" or " " between the tokens controls the way the script
22674 ### chooses to split module lists into libraries.
22675 ###
22676 ### (see CF_LIB_RULES).
22677 echo "$as_me:22677: checking for library subsets" >&5
22678 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22679 LIB_SUBSETS=
22680
22681 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22682         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22683         if test "$with_ticlib" != no ; then
22684                 LIB_SUBSETS="${LIB_SUBSETS} "
22685         else
22686                 LIB_SUBSETS="${LIB_SUBSETS}+"
22687         fi
22688 fi
22689
22690 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22691 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22692
22693 if test "$with_termlib" != no ; then
22694         LIB_SUBSETS="${LIB_SUBSETS} "
22695 else
22696         LIB_SUBSETS="${LIB_SUBSETS}+"
22697 fi
22698
22699 LIB_SUBSETS="${LIB_SUBSETS}base"
22700
22701 # Most term-driver calls are to tinfo, but some like init_pair are to the
22702 # base library (so it resides in base).
22703 if test "$with_term_driver" != no ; then
22704         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22705         case $cf_cv_system_name in
22706         (*mingw32*|*mingw64*)
22707                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22708                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22709                 ;;
22710         (*)
22711                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22712                 ;;
22713         esac
22714 fi
22715
22716 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22717 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22718
22719 echo "$as_me:22719: result: $LIB_SUBSETS" >&5
22720 echo "${ECHO_T}$LIB_SUBSETS" >&6
22721
22722 ### Construct the list of include-directories to be generated
22723
22724 if test "$srcdir" != "."; then
22725         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22726 fi
22727 CPPFLAGS="-I../include $CPPFLAGS"
22728 if test "$srcdir" != "."; then
22729         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22730 fi
22731 CPPFLAGS="-I. $CPPFLAGS"
22732
22733 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22734 if test "$srcdir" != "."; then
22735         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22736 fi
22737 if test "$GCC" != yes; then
22738         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22739 elif test "$includedir" != "/usr/include"; then
22740         if test "$includedir" = '${prefix}/include' ; then
22741                 if test x$prefix != x/usr ; then
22742                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22743                 fi
22744         else
22745                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22746         fi
22747 fi
22748
22749 ### Build up pieces for makefile rules
22750 echo "$as_me:22750: checking default library suffix" >&5
22751 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22752
22753         case $DFT_LWR_MODEL in
22754         (libtool) DFT_ARG_SUFFIX=''   ;;
22755         (normal)  DFT_ARG_SUFFIX=''   ;;
22756         (debug)   DFT_ARG_SUFFIX='_g' ;;
22757         (profile) DFT_ARG_SUFFIX='_p' ;;
22758         (shared)  DFT_ARG_SUFFIX=''   ;;
22759         esac
22760         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22761 echo "$as_me:22761: result: $DFT_ARG_SUFFIX" >&5
22762 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22763
22764 echo "$as_me:22764: checking default library-dependency suffix" >&5
22765 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22766
22767         case X$DFT_LWR_MODEL in
22768         (Xlibtool)
22769                 DFT_LIB_SUFFIX='.la'
22770                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22771                 ;;
22772         (Xdebug)
22773                 DFT_LIB_SUFFIX='_g.a'
22774                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22775                 ;;
22776         (Xprofile)
22777                 DFT_LIB_SUFFIX='_p.a'
22778                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22779                 ;;
22780         (Xshared)
22781                 case $cf_cv_system_name in
22782                 (aix[5-7]*)
22783                         DFT_LIB_SUFFIX='.so'
22784                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22785                         ;;
22786                 (cygwin*|msys*|mingw*)
22787                         DFT_LIB_SUFFIX='.dll'
22788                         DFT_DEP_SUFFIX='.dll.a'
22789                         ;;
22790                 (darwin*)
22791                         DFT_LIB_SUFFIX='.dylib'
22792                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22793                         ;;
22794                 (hpux*)
22795                         case $target in
22796                         (ia64*)
22797                                 DFT_LIB_SUFFIX='.so'
22798                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22799                                 ;;
22800                         (*)
22801                                 DFT_LIB_SUFFIX='.sl'
22802                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22803                                 ;;
22804                         esac
22805                         ;;
22806                 (*)
22807                         DFT_LIB_SUFFIX='.so'
22808                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22809                         ;;
22810                 esac
22811                 ;;
22812         (*)
22813                 DFT_LIB_SUFFIX='.a'
22814                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22815                 ;;
22816         esac
22817         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22818         then
22819                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22820                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22821         fi
22822 echo "$as_me:22822: result: $DFT_DEP_SUFFIX" >&5
22823 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22824
22825 echo "$as_me:22825: checking default object directory" >&5
22826 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22827
22828         case $DFT_LWR_MODEL in
22829         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22830         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22831         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22832         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22833         (shared)
22834                 case $cf_cv_system_name in
22835                 (cygwin|msys)
22836                         DFT_OBJ_SUBDIR='objects' ;;
22837                 (*)
22838                         DFT_OBJ_SUBDIR='obj_s' ;;
22839                 esac
22840         esac
22841 echo "$as_me:22841: result: $DFT_OBJ_SUBDIR" >&5
22842 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22843
22844 if test "x$cf_with_cxx" = xyes ; then
22845 echo "$as_me:22845: checking c++ library-dependency suffix" >&5
22846 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22847 if test "$with_libtool" != "no"; then
22848         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22849         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22850 elif test "$with_shared_cxx" != "no"; then
22851         # also for g++ users...
22852         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22853 else
22854         # we normally make a static library because C/C++ library rules differ
22855
22856         case Xnormal in
22857         (Xlibtool)
22858                 CXX_LIB_SUFFIX='.la'
22859                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22860                 ;;
22861         (Xdebug)
22862                 CXX_LIB_SUFFIX='_g.a'
22863                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22864                 ;;
22865         (Xprofile)
22866                 CXX_LIB_SUFFIX='_p.a'
22867                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22868                 ;;
22869         (Xshared)
22870                 case $cf_cv_system_name in
22871                 (aix[5-7]*)
22872                         CXX_LIB_SUFFIX='.so'
22873                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22874                         ;;
22875                 (cygwin*|msys*|mingw*)
22876                         CXX_LIB_SUFFIX='.dll'
22877                         CXX_DEP_SUFFIX='.dll.a'
22878                         ;;
22879                 (darwin*)
22880                         CXX_LIB_SUFFIX='.dylib'
22881                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22882                         ;;
22883                 (hpux*)
22884                         case $target in
22885                         (ia64*)
22886                                 CXX_LIB_SUFFIX='.so'
22887                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22888                                 ;;
22889                         (*)
22890                                 CXX_LIB_SUFFIX='.sl'
22891                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22892                                 ;;
22893                         esac
22894                         ;;
22895                 (*)
22896                         CXX_LIB_SUFFIX='.so'
22897                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22898                         ;;
22899                 esac
22900                 ;;
22901         (*)
22902                 CXX_LIB_SUFFIX='.a'
22903                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22904                 ;;
22905         esac
22906         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22907         then
22908                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22909                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22910         fi
22911
22912 fi
22913 echo "$as_me:22913: result: $CXX_LIB_SUFFIX" >&5
22914 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22915
22916 fi
22917
22918 # do not want -ldl in build except as needed for -lncurses dependency
22919 if test "x$with_dlsym" = xyes ; then
22920 if test $DFT_LWR_MODEL = shared || \
22921    test $DFT_LWR_MODEL = libtool ; then
22922
22923 # remove dl library from $LIBS
22924 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22925
22926 fi
22927 fi
22928 ### Set up low-level terminfo dependencies for makefiles.
22929
22930 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22931 # do not need libdl
22932 TICS_LIST=
22933 if test "x$with_dlsym" = xyes ; then
22934
22935 # remove dl library from $SHLIB_LIST
22936 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22937
22938 fi
22939
22940 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22941 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22942 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22943 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22944 then
22945         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22946 fi
22947
22948 if test "$with_ticlib" != no ; then
22949
22950         if test "x$with_ticlib" != xyes ; then
22951                 TICS_NAME=$with_ticlib
22952                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22953                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22954                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22955                 TICS_LIB_SUFFIX="${with_ticlib}"
22956         else
22957                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22958                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22959                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22960                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22961         fi
22962         TICS_LDFLAGS="-L${LIB_DIR}"
22963         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22964 else
22965         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22966         TICS_LDFLAGS="-L${LIB_DIR}"
22967         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22968 fi
22969
22970 if test "$with_termlib" != no ; then
22971
22972         if test "x$with_termlib" != xyes ; then
22973                 TINFO_NAME=$with_termlib
22974                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22975                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22976                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22977                 TINFO_LIB_SUFFIX="${with_termlib}"
22978         else
22979                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22980                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22981                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22982                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22983         fi
22984
22985         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22986         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22987         if test "$DFT_LWR_MODEL" = "libtool"; then
22988                 TEST_ARGS="${TEST_DEPS}"
22989                 TEST_ARG2="${TEST_DEP2}"
22990                 TINFO_LDFLAGS="-L${LIB_DIR}"
22991                 TINFO_LIBS="$TEST_ARGS"
22992                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22993                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22994         else
22995                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22996                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22997                 if test "x$with_term_driver" != xno ; then
22998                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22999                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
23000                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23001                 else
23002                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23003                         TINFO_LIBS="$TEST_ARGS"
23004                 fi
23005                 TINFO_LDFLAGS="-L${LIB_DIR}"
23006                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23007         fi
23008 else
23009         # the next lines are needed for linking libtic over libncurses
23010         TINFO_NAME=${LIB_NAME}
23011         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23012         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
23013         if test "x$with_tic_depends" = xyes ; then
23014                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23015         else
23016                 TICS_LIST="$SHLIB_LIST"
23017         fi
23018
23019         TINFO_LDFLAGS="-L${LIB_DIR}"
23020         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23021 fi
23022
23023 if test "$DFT_LWR_MODEL" = shared ; then
23024         case $cf_cv_system_name in
23025         (cygwin*|msys*)
23026                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
23027                 TINFO_SUFFIX=.dll
23028                 ;;
23029         esac
23030 fi
23031
23032 if test "x$with_dlsym" = xyes ; then
23033
23034 # remove dl library from $TICS_LIST
23035 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
23036
23037 fi
23038
23039 if test "$DFT_LWR_MODEL" = "libtool"; then
23040         OBJEXT=lo
23041 fi
23042
23043 # needed for Ada95
23044 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
23045
23046 case $DFT_LWR_MODEL in
23047 (normal|debug|profile)
23048
23049 if test "$GCC" = yes ; then
23050         case $cf_cv_system_name in
23051         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
23052                 LDFLAGS_STATIC=
23053                 LDFLAGS_SHARED=
23054                 ;;
23055         (*)     # normally, except when broken
23056                 LDFLAGS_STATIC=-static
23057                 LDFLAGS_SHARED=-dynamic
23058                 ;;
23059         esac
23060 else
23061         case $cf_cv_system_name in
23062         (aix[4-7]*)     # from ld manpage
23063                 LDFLAGS_STATIC=-bstatic
23064                 LDFLAGS_SHARED=-bdynamic
23065                 ;;
23066         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
23067                 # We could also use just "archive" and "shared".
23068                 LDFLAGS_STATIC=-Wl,-a,archive_shared
23069                 LDFLAGS_SHARED=-Wl,-a,shared_archive
23070                 ;;
23071         (irix*)         # from ld manpage IRIX64
23072                 LDFLAGS_STATIC=-Bstatic
23073                 LDFLAGS_SHARED=-Bdynamic
23074                 ;;
23075         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
23076                 # alternative "-oldstyle_liblookup" (not in cc manpage)
23077                 LDFLAGS_STATIC=-noso
23078                 LDFLAGS_SHARED=-so_archive
23079                 ;;
23080         (solaris2*)
23081                 LDFLAGS_STATIC=-Bstatic
23082                 LDFLAGS_SHARED=-Bdynamic
23083                 ;;
23084         esac
23085 fi
23086
23087 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
23088 then
23089         echo "$as_me:23089: checking if linker supports switching between static/dynamic" >&5
23090 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
23091
23092         rm -f libconftest.a
23093         cat >conftest.$ac_ext <<EOF
23094 #line 23094 "configure"
23095 #include <stdio.h>
23096 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
23097 EOF
23098         if { (eval echo "$as_me:23098: \"$ac_compile\"") >&5
23099   (eval $ac_compile) 2>&5
23100   ac_status=$?
23101   echo "$as_me:23101: \$? = $ac_status" >&5
23102   (exit $ac_status); } ; then
23103                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
23104                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
23105         fi
23106         rm -f conftest.*
23107
23108         cf_save_LIBS="$LIBS"
23109
23110         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
23111         cat >conftest.$ac_ext <<_ACEOF
23112 #line 23112 "configure"
23113 #include "confdefs.h"
23114
23115 #line 23115 "configure"
23116 #include <stdio.h>
23117 int cf_ldflags_static(FILE *fp);
23118
23119 int
23120 main (void)
23121 {
23122
23123         return cf_ldflags_static(stdin);
23124
23125   ;
23126   return 0;
23127 }
23128 _ACEOF
23129 rm -f conftest.$ac_objext conftest$ac_exeext
23130 if { (eval echo "$as_me:23130: \"$ac_link\"") >&5
23131   (eval $ac_link) 2>&5
23132   ac_status=$?
23133   echo "$as_me:23133: \$? = $ac_status" >&5
23134   (exit $ac_status); } &&
23135          { ac_try='test -s conftest$ac_exeext'
23136   { (eval echo "$as_me:23136: \"$ac_try\"") >&5
23137   (eval $ac_try) 2>&5
23138   ac_status=$?
23139   echo "$as_me:23139: \$? = $ac_status" >&5
23140   (exit $ac_status); }; }; then
23141
23142         # some linkers simply ignore the -dynamic
23143         case x`file conftest$ac_exeext 2>/dev/null` in
23144         (*static*)
23145                 cf_ldflags_static=no
23146                 ;;
23147         (*)
23148                 cf_ldflags_static=yes
23149                 ;;
23150         esac
23151
23152 else
23153   echo "$as_me: failed program was:" >&5
23154 cat conftest.$ac_ext >&5
23155 cf_ldflags_static=no
23156 fi
23157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23158
23159         rm -f libconftest.*
23160         LIBS="$cf_save_LIBS"
23161
23162         echo "$as_me:23162: result: $cf_ldflags_static" >&5
23163 echo "${ECHO_T}$cf_ldflags_static" >&6
23164
23165         if test $cf_ldflags_static != yes
23166         then
23167                 LDFLAGS_STATIC=
23168                 LDFLAGS_SHARED=
23169         fi
23170 else
23171         LDFLAGS_STATIC=
23172         LDFLAGS_SHARED=
23173 fi
23174
23175         ;;
23176 esac
23177
23178 echo "$as_me:23178: checking where we will install curses.h" >&5
23179 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
23180
23181 includesubdir=
23182 if test "$with_overwrite" = no && \
23183  ( test "x$includedir" = 'x${prefix}/include' || \
23184    test "x$includedir" = "x${prefix}/include" )
23185 then
23186         includesubdir="/ncurses${USE_LIB_SUFFIX}"
23187 fi
23188 echo "$as_me:23188: result: ${includedir}${includesubdir}" >&5
23189 echo "${ECHO_T}${includedir}${includesubdir}" >&6
23190
23191 ### Resolve a conflict between normal and wide-curses by forcing applications
23192 ### that will need libutf8 to add it to their configure script.
23193 if test "$with_overwrite" != no ; then
23194 if test "$NCURSES_LIBUTF8" = 1 ; then
23195         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
23196         { echo "$as_me:23196: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
23197 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
23198 fi
23199 fi
23200 WITH_OVERWRITE=$with_overwrite
23201
23202 # used to separate tack out of the tree
23203 NCURSES_TREE=
23204
23205 ### predefined stuff for the test programs
23206
23207 cat >>confdefs.h <<\EOF
23208 #define HAVE_SLK_COLOR 1
23209 EOF
23210
23211 ### Construct the list of subdirectories for which we'll customize makefiles
23212 ### with the appropriate compile-rules.
23213
23214 echo "$as_me:23214: checking for src modules" >&5
23215 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
23216
23217 # dependencies and linker-arguments for test-programs
23218 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
23219 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
23220 if test "$DFT_LWR_MODEL" = "libtool"; then
23221         TEST_ARGS="${TEST_DEPS}"
23222         TEST_ARG2="${TEST_DEP2}"
23223 else
23224         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23225         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
23226 fi
23227
23228 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
23229 cf_cv_src_modules=
23230 for cf_dir in $modules_to_build
23231 do
23232         if test -f $srcdir/$cf_dir/modules; then
23233
23234                 # We may/may not have tack in the distribution, though the
23235                 # makefile is.
23236                 if test $cf_dir = tack ; then
23237                         if test "x$cf_with_tack" != "xyes"; then
23238                                 continue
23239                         fi
23240                 fi
23241
23242                 if test -z "$cf_cv_src_modules"; then
23243                         cf_cv_src_modules=$cf_dir
23244                 else
23245                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23246                 fi
23247
23248                 # Make the ncurses_cfg.h file record the library interface files as
23249                 # well.  These are header files that are the same name as their
23250                 # directory.  Ncurses is the only library that does not follow
23251                 # that pattern.
23252                 if test $cf_dir = tack ; then
23253                         continue
23254                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23255
23256 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23257
23258                         cat >>confdefs.h <<EOF
23259 #define HAVE_${cf_have_include}_H 1
23260 EOF
23261
23262                         cat >>confdefs.h <<EOF
23263 #define HAVE_LIB${cf_have_include} 1
23264 EOF
23265
23266                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23267                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23268                         if test "$DFT_LWR_MODEL" = "libtool"; then
23269                                 TEST_ARGS="${TEST_DEPS}"
23270                                 TEST_ARG2="${TEST_DEP2}"
23271                         else
23272                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23273                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23274                         fi
23275                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23276                 fi
23277         fi
23278 done
23279 echo "$as_me:23279: result: $cf_cv_src_modules" >&5
23280 echo "${ECHO_T}$cf_cv_src_modules" >&6
23281
23282 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23283 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23284
23285 SRC_SUBDIRS=
23286 if test "x$cf_with_manpages" != xno ; then
23287         SRC_SUBDIRS="$SRC_SUBDIRS man"
23288 fi
23289 SRC_SUBDIRS="$SRC_SUBDIRS include"
23290 for cf_dir in $cf_cv_src_modules
23291 do
23292         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23293 done
23294 if test "x$cf_with_tests" != "xno" ; then
23295         SRC_SUBDIRS="$SRC_SUBDIRS test"
23296 fi
23297 # always make this, to install the ncurses-config script
23298 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23299 if test "$cf_with_cxx_binding" != no; then
23300         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23301         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23302 fi
23303
23304 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23305 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23306
23307 ADA_SUBDIRS=
23308 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23309         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23310         ADA_SUBDIRS="gen src"
23311         if test "x$cf_with_tests" != "xno" ; then
23312                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23313         fi
23314 fi
23315
23316 SUB_MAKEFILES=
23317 for cf_dir in $SRC_SUBDIRS
23318 do
23319         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23320 done
23321
23322 if test -n "$ADA_SUBDIRS"; then
23323         for cf_dir in $ADA_SUBDIRS
23324         do
23325                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23326         done
23327
23328 fi
23329
23330 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23331    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23332    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23333 fi
23334
23335 DIRS_TO_MAKE="lib"
23336 for cf_item in $cf_list_models
23337 do
23338
23339         case $cf_item in
23340         (libtool) cf_subdir='obj_lo'  ;;
23341         (normal)  cf_subdir='objects' ;;
23342         (debug)   cf_subdir='obj_g' ;;
23343         (profile) cf_subdir='obj_p' ;;
23344         (shared)
23345                 case $cf_cv_system_name in
23346                 (cygwin|msys)
23347                         cf_subdir='objects' ;;
23348                 (*)
23349                         cf_subdir='obj_s' ;;
23350                 esac
23351         esac
23352
23353         for cf_item2 in $DIRS_TO_MAKE
23354         do
23355                 test $cf_item2 = $cf_subdir && break
23356         done
23357         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23358 done
23359 for cf_dir in $DIRS_TO_MAKE
23360 do
23361         test ! -d $cf_dir && mkdir $cf_dir
23362 done
23363
23364 # symbols that differ when compiling Ada95 by itself.
23365 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23366
23367 # values to use as strings
23368
23369 cat >>confdefs.h <<EOF
23370 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23371 EOF
23372
23373 cat >>confdefs.h <<EOF
23374 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23375 EOF
23376
23377 ### Now that we're done running tests, add the compiler-warnings, if any
23378
23379 cf_fix_cppflags=no
23380 cf_new_cflags=
23381 cf_new_cppflags=
23382 cf_new_extra_cppflags=
23383
23384 for cf_add_cflags in $EXTRA_CFLAGS
23385 do
23386 case $cf_fix_cppflags in
23387 (no)
23388         case $cf_add_cflags in
23389         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23390                 case $cf_add_cflags in
23391                 (-D*)
23392                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23393
23394                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23395                                 && test -z "${cf_tst_cflags}" \
23396                                 && cf_fix_cppflags=yes
23397
23398                         if test $cf_fix_cppflags = yes ; then
23399
23400         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23401         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23402
23403                                 continue
23404                         elif test "${cf_tst_cflags}" = "\"'" ; then
23405
23406         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23407         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23408
23409                                 continue
23410                         fi
23411                         ;;
23412                 esac
23413                 case "$CPPFLAGS" in
23414                 (*$cf_add_cflags)
23415                         ;;
23416                 (*)
23417                         case $cf_add_cflags in
23418                         (-D*)
23419                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23420
23421 CPPFLAGS=`echo "$CPPFLAGS" | \
23422         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23423                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23424
23425                                 ;;
23426                         esac
23427
23428         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23429         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23430
23431                         ;;
23432                 esac
23433                 ;;
23434         (*)
23435
23436         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23437         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23438
23439                 ;;
23440         esac
23441         ;;
23442 (yes)
23443
23444         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23445         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23446
23447         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23448
23449         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23450                 && test -z "${cf_tst_cflags}" \
23451                 && cf_fix_cppflags=no
23452         ;;
23453 esac
23454 done
23455
23456 if test -n "$cf_new_cflags" ; then
23457
23458         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23459         CFLAGS="${CFLAGS}$cf_new_cflags"
23460
23461 fi
23462
23463 if test -n "$cf_new_cppflags" ; then
23464
23465         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23466         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23467
23468 fi
23469
23470 if test -n "$cf_new_extra_cppflags" ; then
23471
23472         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23473         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23474
23475 fi
23476
23477 ### Define substitutions for header files to avoid name-pollution
23478
23479 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23480         HAVE_TCGETATTR=1
23481 else
23482         HAVE_TCGETATTR=0
23483 fi
23484
23485 if test "x$ac_cv_header_stdint_h" = xyes ; then
23486         HAVE_STDINT_H=1
23487 else
23488         HAVE_STDINT_H=0
23489 fi
23490
23491 if test "x$ac_cv_header_termio_h" = xyes ; then
23492         HAVE_TERMIO_H=1
23493 else
23494         HAVE_TERMIO_H=0
23495 fi
23496
23497 if test "x$ac_cv_header_termios_h" = xyes ; then
23498         HAVE_TERMIOS_H=1
23499 else
23500         HAVE_TERMIOS_H=0
23501 fi
23502
23503 ################################################################################
23504 test "x$use_database" = xyes && \
23505 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23506
23507 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23508 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23509
23510 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23511 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23512 fi
23513
23514 # Extract the first word of "tic", so it can be a program name with args.
23515 set dummy tic; ac_word=$2
23516 echo "$as_me:23516: checking for $ac_word" >&5
23517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23518 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23519   echo $ECHO_N "(cached) $ECHO_C" >&6
23520 else
23521   case $TIC_PATH in
23522   [\\/]* | ?:[\\/]*)
23523   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23524   ;;
23525   *)
23526   ac_save_IFS=$IFS; IFS=$ac_path_separator
23527 ac_dummy="$PATH:/usr/local/ncurses/bin"
23528 for ac_dir in $ac_dummy; do
23529   IFS=$ac_save_IFS
23530   test -z "$ac_dir" && ac_dir=.
23531   if $as_executable_p "$ac_dir/$ac_word"; then
23532    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23533    echo "$as_me:23533: found $ac_dir/$ac_word" >&5
23534    break
23535 fi
23536 done
23537
23538   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23539   ;;
23540 esac
23541 fi
23542 TIC_PATH=$ac_cv_path_TIC_PATH
23543
23544 if test -n "$TIC_PATH"; then
23545   echo "$as_me:23545: result: $TIC_PATH" >&5
23546 echo "${ECHO_T}$TIC_PATH" >&6
23547 else
23548   echo "$as_me:23548: result: no" >&5
23549 echo "${ECHO_T}no" >&6
23550 fi
23551
23552 if test -n "$FALLBACK_LIST"
23553 then
23554         if test "$TIC_PATH" = unknown
23555         then
23556                 { echo "$as_me:23556: WARNING: no tic program found for fallbacks" >&5
23557 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23558         fi
23559 fi
23560
23561 if test "x$cf_with_tests" != xno ; then
23562         MAKE_TESTS=
23563 else
23564         MAKE_TESTS="#"
23565 fi
23566
23567 ADAHTML_DIR=../../doc/html/ada
23568
23569 # these could be configurable, but are not currently
23570 PANEL_NAME=panel
23571 MENU_NAME=menu
23572 FORM_NAME=form
23573 CXX_NAME=ncurses++
23574
23575 # workaround for OS/2 (20151017)
23576 case $cf_cv_system_name in
23577 (os2*)
23578         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23579         ;;
23580 (*)
23581         LIBTOOL_OPTS_CXX=
23582         ;;
23583 esac
23584
23585 # workaround for g++ versus Solaris (20131116)
23586 case $cf_cv_system_name in
23587 (solaris2*)
23588         case "x$CPPFLAGS" in
23589         (*-D_XOPEN_SOURCE_EXTENDED*)
23590                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23591
23592 echo "${as_me:-configure}:23592: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23593
23594                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23595                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23596                 ;;
23597         esac
23598         ;;
23599 esac
23600
23601 # Help to automatically enable the extended curses features when using either
23602 # the *-config or the ".pc" files by adding defines.
23603 echo "$as_me:23603: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23604 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23605 PKG_CFLAGS=
23606 for cf_loop1 in $CPPFLAGS_after_XOPEN
23607 do
23608         cf_found=no
23609         for cf_loop2 in $CPPFLAGS_before_XOPEN
23610         do
23611                 if test "x$cf_loop1" = "x$cf_loop2"
23612                 then
23613                         cf_found=yes
23614                         break
23615                 fi
23616         done
23617         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23618 done
23619 echo "$as_me:23619: result: $PKG_CFLAGS" >&5
23620 echo "${ECHO_T}$PKG_CFLAGS" >&6
23621
23622 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23623 case "x$NCURSES_OSPEED" in
23624 (*short*)
23625         cf_compatible=1
23626         ;;
23627 (*)
23628         cf_compatible=0
23629         ;;
23630 esac
23631
23632 cat >>confdefs.h <<EOF
23633 #define NCURSES_OSPEED_COMPAT $cf_compatible
23634 EOF
23635
23636 case "x$cf_cv_typeof_chtype" in
23637 (xshort|xint|xlong)
23638         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23639         ;;
23640 esac
23641
23642 case "x$cf_cv_typeof_mmask_t" in
23643 (xshort|xint|xlong)
23644         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23645         ;;
23646 esac
23647
23648 # substitute into misc/Makefile to suppress
23649 # (un)install.data from the
23650 # (un)install rules.
23651 if test "x$cf_with_db_install" = "xno"; then
23652         MISC_INSTALL_DATA=
23653         MISC_UNINSTALL_DATA=
23654 else
23655         MISC_INSTALL_DATA=install.data
23656         MISC_UNINSTALL_DATA=uninstall.data
23657 fi
23658
23659 SUB_SCRIPTS=
23660
23661 if test -n "$PACKAGE"
23662 then
23663         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23664         export PACKAGE
23665         echo "package: $PACKAGE"
23666 fi
23667
23668 UNALTERED_SYMS=
23669 cf_filter_syms=no
23670
23671 if test -n "$RESULTING_SYMS"
23672 then
23673         cf_filter_syms=$cf_dft_filter_syms
23674         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23675
23676 echo "${as_me:-configure}:23676: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23677
23678 fi
23679
23680 if test "x$WILDCARD_SYMS" = xno
23681 then
23682         cf_filter_syms=yes
23683 fi
23684
23685 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23686
23687 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23688 if test $cf_filter_syms = yes
23689 then
23690         RESULTING_SYMS=resulting.map
23691 fi
23692
23693 if test "x$cross_compiling" = xyes ; then
23694         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23695         CHECK_BUILD="#"
23696 else
23697         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23698         CHECK_BUILD=
23699 fi
23700
23701 cat >>confdefs.h <<\EOF
23702 #define HAVE_CURSES_DATA_BOOLNAMES 1
23703 EOF
23704
23705 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"
23706 ac_config_commands="$ac_config_commands default"
23707 cat >confcache <<\_ACEOF
23708 # This file is a shell script that caches the results of configure
23709 # tests run on this system so they can be shared between configure
23710 # scripts and configure runs, see configure's option --config-cache.
23711 # It is not useful on other systems.  If it contains results you don't
23712 # want to keep, you may remove or edit it.
23713 #
23714 # config.status only pays attention to the cache file if you give it
23715 # the --recheck option to rerun configure.
23716 #
23717 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23718 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23719 # following values.
23720
23721 _ACEOF
23722
23723 # The following way of writing the cache mishandles newlines in values,
23724 # but we know of no workaround that is simple, portable, and efficient.
23725 # So, don't put newlines in cache variables' values.
23726 # Ultrix sh set writes to stderr and can't be redirected directly,
23727 # and sets the high bit in the cache file unless we assign to the vars.
23728 {
23729   (set) 2>&1 |
23730     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23731     *ac_space=\ *)
23732       # `set' does not quote correctly, so add quotes (double-quote
23733       # substitution turns \\\\ into \\, and sed turns \\ into \).
23734       sed -n \
23735         "s/'/'\\\\''/g;
23736           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23737       ;;
23738     *)
23739       # `set' quotes correctly as required by POSIX, so do not add quotes.
23740       sed -n \
23741         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23742       ;;
23743     esac;
23744 } |
23745   sed '
23746      t clear
23747      : clear
23748      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23749      t end
23750      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23751      : end' >>confcache
23752 if cmp -s $cache_file confcache; then :; else
23753   if test -w $cache_file; then
23754     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23755     cat confcache >$cache_file
23756   else
23757     echo "not updating unwritable cache $cache_file"
23758   fi
23759 fi
23760 rm -f confcache
23761
23762 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23763 # Let make expand exec_prefix.
23764 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23765
23766 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23767 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23768 # trailing colons and then remove the whole line if VPATH becomes empty
23769 # (actually we leave an empty line to preserve line numbers).
23770 if test "x$srcdir" = x.; then
23771   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23772 s/:*\$(srcdir):*/:/;
23773 s/:*\${srcdir}:*/:/;
23774 s/:*@srcdir@:*/:/;
23775 s/^\([^=]*=[    ]*\):*/\1/;
23776 s/:*$//;
23777 s/^[^=]*=[      ]*$//;
23778 }'
23779 fi
23780
23781 DEFS=-DHAVE_CONFIG_H
23782
23783 : ${CONFIG_STATUS=./config.status}
23784 ac_clean_files_save=$ac_clean_files
23785 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23786 { echo "$as_me:23786: creating $CONFIG_STATUS" >&5
23787 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23788 cat >$CONFIG_STATUS <<_ACEOF
23789 #! $SHELL
23790 # Generated automatically by configure.
23791 # Run this file to recreate the current configuration.
23792 # Compiler output produced by configure, useful for debugging
23793 # configure, is in config.log if it exists.
23794
23795 debug=false
23796 SHELL=\${CONFIG_SHELL-$SHELL}
23797 ac_cs_invocation="\$0 \$@"
23798
23799 _ACEOF
23800
23801 cat >>$CONFIG_STATUS <<\_ACEOF
23802 # Be Bourne compatible
23803 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23804   emulate sh
23805   NULLCMD=:
23806 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23807   set -o posix
23808 fi
23809
23810 # Name of the executable.
23811 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23812
23813 if expr a : '\(a\)' >/dev/null 2>&1; then
23814   as_expr=expr
23815 else
23816   as_expr=false
23817 fi
23818
23819 rm -f conf$$ conf$$.exe conf$$.file
23820 echo >conf$$.file
23821 if ln -s conf$$.file conf$$ 2>/dev/null; then
23822   # We could just check for DJGPP; but this test a) works b) is more generic
23823   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23824   if test -f conf$$.exe; then
23825     # Don't use ln at all; we don't have any links
23826     as_ln_s='cp -p'
23827   else
23828     as_ln_s='ln -s'
23829   fi
23830 elif ln conf$$.file conf$$ 2>/dev/null; then
23831   as_ln_s=ln
23832 else
23833   as_ln_s='cp -p'
23834 fi
23835 rm -f conf$$ conf$$.exe conf$$.file
23836
23837 as_executable_p="test -f"
23838
23839 # Support unset when possible.
23840 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23841   as_unset=unset
23842 else
23843   as_unset=false
23844 fi
23845
23846 # NLS nuisances.
23847 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23848 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23849 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23850 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23851 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23852 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23853 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23854 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23855
23856 # IFS
23857 # We need space, tab and new line, in precisely that order.
23858 as_nl='
23859 '
23860 IFS="   $as_nl"
23861
23862 # CDPATH.
23863 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23864
23865 exec 6>&1
23866
23867 _ACEOF
23868
23869 # Files that config.status was made for.
23870 if test -n "$ac_config_files"; then
23871   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23872 fi
23873
23874 if test -n "$ac_config_headers"; then
23875   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23876 fi
23877
23878 if test -n "$ac_config_links"; then
23879   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23880 fi
23881
23882 if test -n "$ac_config_commands"; then
23883   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23884 fi
23885
23886 cat >>$CONFIG_STATUS <<\EOF
23887
23888 ac_cs_usage="\
23889 \`$as_me' instantiates files from templates according to the
23890 current configuration.
23891
23892 Usage: $0 [OPTIONS] [FILE]...
23893
23894   -h, --help       print this help, then exit
23895   -V, --version    print version number, then exit
23896   -d, --debug      don't remove temporary files
23897       --recheck    update $as_me by reconfiguring in the same conditions
23898   --file=FILE[:TEMPLATE]
23899                    instantiate the configuration file FILE
23900   --header=FILE[:TEMPLATE]
23901                    instantiate the configuration header FILE
23902
23903 Configuration files:
23904 $config_files
23905
23906 Configuration headers:
23907 $config_headers
23908
23909 Configuration commands:
23910 $config_commands
23911
23912 Report bugs to <dickey@invisible-island.net>."
23913 EOF
23914
23915 cat >>$CONFIG_STATUS <<EOF
23916 ac_cs_version="\\
23917 config.status
23918 configured by $0, generated by GNU Autoconf 2.52.20170501,
23919   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23920
23921 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23922 Free Software Foundation, Inc.
23923 This config.status script is free software; the Free Software Foundation
23924 gives unlimited permission to copy, distribute and modify it."
23925 srcdir=$srcdir
23926 INSTALL="$INSTALL"
23927 EOF
23928
23929 cat >>$CONFIG_STATUS <<\EOF
23930 # If no file are specified by the user, then we need to provide default
23931 # value.  By we need to know if files were specified by the user.
23932 ac_need_defaults=:
23933 while test $# != 0
23934 do
23935   case $1 in
23936   --*=*)
23937     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23938     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23939     shift
23940     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23941     shift
23942     ;;
23943   -*);;
23944   *) # This is not an option, so the user has probably given explicit
23945      # arguments.
23946      ac_need_defaults=false;;
23947   esac
23948
23949   case $1 in
23950   # Handling of the options.
23951 EOF
23952 cat >>$CONFIG_STATUS <<EOF
23953   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23954     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23955     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23956 EOF
23957 cat >>$CONFIG_STATUS <<\EOF
23958   --version | --vers* | -V )
23959     echo "$ac_cs_version"; exit 0 ;;
23960   --he | --h)
23961     # Conflict between --help and --header
23962     { { echo "$as_me:23962: error: ambiguous option: $1
23963 Try \`$0 --help' for more information." >&5
23964 echo "$as_me: error: ambiguous option: $1
23965 Try \`$0 --help' for more information." >&2;}
23966    { (exit 1); exit 1; }; };;
23967   --help | --hel | -h )
23968     echo "$ac_cs_usage"; exit 0 ;;
23969   --debug | --d* | -d )
23970     debug=: ;;
23971   --file | --fil | --fi | --f )
23972     shift
23973     CONFIG_FILES="$CONFIG_FILES $1"
23974     ac_need_defaults=false;;
23975   --header | --heade | --head | --hea )
23976     shift
23977     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23978     ac_need_defaults=false;;
23979
23980   # This is an error.
23981   -*) { { echo "$as_me:23981: error: unrecognized option: $1
23982 Try \`$0 --help' for more information." >&5
23983 echo "$as_me: error: unrecognized option: $1
23984 Try \`$0 --help' for more information." >&2;}
23985    { (exit 1); exit 1; }; } ;;
23986
23987   *) ac_config_targets="$ac_config_targets $1" ;;
23988
23989   esac
23990   shift
23991 done
23992
23993 exec 5>>config.log
23994 cat >&5 << _ACEOF
23995
23996 ## ----------------------- ##
23997 ## Running config.status.  ##
23998 ## ----------------------- ##
23999
24000 This file was extended by $as_me 2.52.20170501, executed with
24001   CONFIG_FILES    = $CONFIG_FILES
24002   CONFIG_HEADERS  = $CONFIG_HEADERS
24003   CONFIG_LINKS    = $CONFIG_LINKS
24004   CONFIG_COMMANDS = $CONFIG_COMMANDS
24005   > $ac_cs_invocation
24006 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24007
24008 _ACEOF
24009 EOF
24010
24011 cat >>$CONFIG_STATUS <<EOF
24012 #
24013 # INIT-COMMANDS section.
24014 #
24015
24016 ### Special initialization commands, used to pass information from the
24017 ### configuration-run into config.status
24018
24019 AWK="$AWK"
24020 ALTERNATE_SYMS="$ALTERNATE_SYMS"
24021 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
24022 DFT_LWR_MODEL="$DFT_LWR_MODEL"
24023 ECHO_LD="$ECHO_LD"
24024 EXTRA_SUFFIX="$EXTRA_SUFFIX"
24025 LDCONFIG="$LDCONFIG"
24026 LIBTOOL_VERSION="$LIBTOOL_VERSION"
24027 LIB_NAME="$LIB_NAME"
24028 LIB_PREFIX="$LIB_PREFIX"
24029 LIB_SUBSETS="$LIB_SUBSETS"
24030 LIB_SUFFIX="$LIB_SUFFIX"
24031 LIB_TRACING="$LIB_TRACING"
24032 LN_S="$LN_S"
24033 MAKE_TERMINFO="$MAKE_TERMINFO"
24034 NCURSES_MAJOR="$NCURSES_MAJOR"
24035 NCURSES_MINOR="$NCURSES_MINOR"
24036 NCURSES_OSPEED="$NCURSES_OSPEED"
24037 NCURSES_PATCH="$NCURSES_PATCH"
24038 SRC_SUBDIRS="$SRC_SUBDIRS"
24039 TERMINFO="$TERMINFO"
24040 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
24041 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
24042 TICS_NAME="$TICS_NAME"
24043 TICS_SUFFIX="$TICS_SUFFIX"
24044 TIC_PATH="$TIC_PATH"
24045 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
24046 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
24047 TINFO_NAME="$TINFO_NAME"
24048 TINFO_SUFFIX="$TINFO_SUFFIX"
24049 UNALTERED_SYMS="$UNALTERED_SYMS"
24050 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
24051 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
24052 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
24053 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
24054 WILDCARD_SYMS="$WILDCARD_SYMS"
24055 WITH_CURSES_H="$with_curses_h"
24056 WITH_ECHO="${enable_echo:=yes}"
24057 WITH_OVERWRITE="$with_overwrite"
24058 cf_LIST_MODELS="$cf_list_models"
24059 cf_cv_abi_version="$cf_cv_abi_version"
24060 cf_cv_do_relink="$cf_cv_do_relink"
24061 cf_cv_do_symlinks="$cf_cv_do_symlinks"
24062 cf_cv_enable_lp64="$cf_cv_enable_lp64"
24063 cf_cv_enable_opaque="$cf_cv_enable_opaque"
24064 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
24065 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
24066 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
24067 cf_cv_rel_version="$cf_cv_rel_version"
24068 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
24069 cf_cv_shared_soname='$cf_cv_shared_soname'
24070 cf_cv_shlib_version="$cf_cv_shlib_version"
24071 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
24072 cf_cv_system_name="$cf_cv_system_name"
24073 cf_cv_term_driver="$with_term_driver"
24074 cf_with_ada="$cf_with_ada"
24075 cf_with_cxx_binding="$cf_with_cxx_binding"
24076 cf_with_db_install="$cf_with_db_install"
24077 cf_with_manpages="$cf_with_manpages"
24078 cf_with_tests="$cf_with_tests"
24079 host="$host"
24080 target="$target"
24081 with_shared_cxx="$with_shared_cxx"
24082
24083 EOF
24084
24085 cat >>$CONFIG_STATUS <<\EOF
24086 for ac_config_target in $ac_config_targets
24087 do
24088   case "$ac_config_target" in
24089   # Handling of arguments.
24090   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
24091   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
24092   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
24093   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
24094   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
24095   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
24096   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
24097   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24098   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24099   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
24100   *) { { echo "$as_me:24100: error: invalid argument: $ac_config_target" >&5
24101 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24102    { (exit 1); exit 1; }; };;
24103   esac
24104 done
24105
24106 # If the user did not use the arguments to specify the items to instantiate,
24107 # then the envvar interface is used.  Set only those that are not.
24108 # We use the long form for the default assignment because of an extremely
24109 # bizarre bug on SunOS 4.1.3.
24110 if $ac_need_defaults; then
24111   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24112   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24113   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24114 fi
24115
24116 # Create a temporary directory, and hook for its removal unless debugging.
24117 $debug ||
24118 {
24119   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24120   trap '{ (exit 1); exit 1; }' 1 2 13 15
24121 }
24122
24123 # Create a (secure) tmp directory for tmp files.
24124 : ${TMPDIR=/tmp}
24125 {
24126   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24127   test -n "$tmp" && test -d "$tmp"
24128 }  ||
24129 {
24130   tmp=$TMPDIR/cs$$-$RANDOM
24131   (umask 077 && mkdir $tmp)
24132 } ||
24133 {
24134    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24135    { (exit 1); exit 1; }
24136 }
24137
24138 EOF
24139
24140 cat >>$CONFIG_STATUS <<EOF
24141
24142 #
24143 # CONFIG_FILES section.
24144 #
24145
24146 # No need to generate the scripts if there are no CONFIG_FILES.
24147 # This happens for instance when ./config.status config.h
24148 if test -n "\$CONFIG_FILES"; then
24149   # Protect against being on the right side of a sed subst in config.status.
24150   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24151    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24152 s,@SHELL@,$SHELL,;t t
24153 s,@exec_prefix@,$exec_prefix,;t t
24154 s,@prefix@,$prefix,;t t
24155 s,@program_transform_name@,$program_transform_name,;t t
24156 s,@bindir@,$bindir,;t t
24157 s,@sbindir@,$sbindir,;t t
24158 s,@libexecdir@,$libexecdir,;t t
24159 s,@datarootdir@,$datarootdir,;t t
24160 s,@datadir@,$datadir,;t t
24161 s,@sysconfdir@,$sysconfdir,;t t
24162 s,@sharedstatedir@,$sharedstatedir,;t t
24163 s,@localstatedir@,$localstatedir,;t t
24164 s,@libdir@,$libdir,;t t
24165 s,@includedir@,$includedir,;t t
24166 s,@oldincludedir@,$oldincludedir,;t t
24167 s,@infodir@,$infodir,;t t
24168 s,@mandir@,$mandir,;t t
24169 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24170 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24171 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24172 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24173 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24174 s,@build_alias@,$build_alias,;t t
24175 s,@host_alias@,$host_alias,;t t
24176 s,@target_alias@,$target_alias,;t t
24177 s,@ECHO_C@,$ECHO_C,;t t
24178 s,@ECHO_N@,$ECHO_N,;t t
24179 s,@ECHO_T@,$ECHO_T,;t t
24180 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24181 s,@DEFS@,$DEFS,;t t
24182 s,@LIBS@,$LIBS,;t t
24183 s,@top_builddir@,$top_builddir,;t t
24184 s,@EGREP@,$EGREP,;t t
24185 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
24186 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
24187 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
24188 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24189 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24190 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
24191 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
24192 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
24193 s,@VERSION@,$VERSION,;t t
24194 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
24195 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
24196 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
24197 s,@PACKAGE@,$PACKAGE,;t t
24198 s,@build@,$build,;t t
24199 s,@build_cpu@,$build_cpu,;t t
24200 s,@build_vendor@,$build_vendor,;t t
24201 s,@build_os@,$build_os,;t t
24202 s,@host@,$host,;t t
24203 s,@host_cpu@,$host_cpu,;t t
24204 s,@host_vendor@,$host_vendor,;t t
24205 s,@host_os@,$host_os,;t t
24206 s,@target@,$target,;t t
24207 s,@target_cpu@,$target_cpu,;t t
24208 s,@target_vendor@,$target_vendor,;t t
24209 s,@target_os@,$target_os,;t t
24210 s,@CC@,$CC,;t t
24211 s,@CFLAGS@,$CFLAGS,;t t
24212 s,@LDFLAGS@,$LDFLAGS,;t t
24213 s,@CPPFLAGS@,$CPPFLAGS,;t t
24214 s,@ac_ct_CC@,$ac_ct_CC,;t t
24215 s,@EXEEXT@,$EXEEXT,;t t
24216 s,@OBJEXT@,$OBJEXT,;t t
24217 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24218 s,@CPP@,$CPP,;t t
24219 s,@LDCONFIG@,$LDCONFIG,;t t
24220 s,@CXX@,$CXX,;t t
24221 s,@CXXFLAGS@,$CXXFLAGS,;t t
24222 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
24223 s,@AWK@,$AWK,;t t
24224 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24225 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24226 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24227 s,@LINT@,$LINT,;t t
24228 s,@LINT_OPTS@,$LINT_OPTS,;t t
24229 s,@LN_S@,$LN_S,;t t
24230 s,@cf_config_suffix@,$cf_config_suffix,;t t
24231 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24232 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24233 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
24234 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24235 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24236 s,@SET_MAKE@,$SET_MAKE,;t t
24237 s,@CTAGS@,$CTAGS,;t t
24238 s,@ETAGS@,$ETAGS,;t t
24239 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24240 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24241 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24242 s,@RANLIB@,$RANLIB,;t t
24243 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24244 s,@LD@,$LD,;t t
24245 s,@ac_ct_LD@,$ac_ct_LD,;t t
24246 s,@AR@,$AR,;t t
24247 s,@ac_ct_AR@,$ac_ct_AR,;t t
24248 s,@NM@,$NM,;t t
24249 s,@ac_ct_NM@,$ac_ct_NM,;t t
24250 s,@ARFLAGS@,$ARFLAGS,;t t
24251 s,@DESTDIR@,$DESTDIR,;t t
24252 s,@BUILD_CC@,$BUILD_CC,;t t
24253 s,@BUILD_CPP@,$BUILD_CPP,;t t
24254 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24255 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24256 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24257 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24258 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24259 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24260 s,@cf_list_models@,$cf_list_models,;t t
24261 s,@ABI_VERSION@,$ABI_VERSION,;t t
24262 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24263 s,@LIBTOOL@,$LIBTOOL,;t t
24264 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24265 s,@LT_UNDEF@,$LT_UNDEF,;t t
24266 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24267 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24268 s,@LIB_CREATE@,$LIB_CREATE,;t t
24269 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24270 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24271 s,@LIB_PREP@,$LIB_PREP,;t t
24272 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24273 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24274 s,@LIB_LINK@,$LIB_LINK,;t t
24275 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24276 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24277 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24278 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24279 s,@TICS_NAME@,$TICS_NAME,;t t
24280 s,@TINFO_NAME@,$TINFO_NAME,;t t
24281 s,@LIB_NAME@,$LIB_NAME,;t t
24282 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24283 s,@CC_G_OPT@,$CC_G_OPT,;t t
24284 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24285 s,@LD_MODEL@,$LD_MODEL,;t t
24286 s,@shlibdir@,$shlibdir,;t t
24287 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24288 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24289 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24290 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24291 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24292 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24293 s,@LINK_PROGS@,$LINK_PROGS,;t t
24294 s,@LINK_TESTS@,$LINK_TESTS,;t t
24295 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24296 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24297 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24298 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24299 s,@RPATH_LIST@,$RPATH_LIST,;t t
24300 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24301 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24302 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24303 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24304 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24305 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24306 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24307 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24308 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24309 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24310 s,@XTERM_KBS@,$XTERM_KBS,;t t
24311 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24312 s,@TERMINFO@,$TERMINFO,;t t
24313 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24314 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24315 s,@TERMPATH@,$TERMPATH,;t t
24316 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24317 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24318 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24319 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24320 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24321 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24322 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24323 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24324 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24325 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24326 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24327 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24328 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24329 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24330 s,@RGB_PATH@,$RGB_PATH,;t t
24331 s,@no_x11_rgb@,$no_x11_rgb,;t t
24332 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24333 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24334 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24335 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24336 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24337 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24338 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24339 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24340 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24341 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24342 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24343 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24344 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24345 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24346 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24347 s,@PTHREAD@,$PTHREAD,;t t
24348 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24349 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24350 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24351 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24352 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24353 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24354 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24355 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24356 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24357 s,@ECHO_LT@,$ECHO_LT,;t t
24358 s,@ECHO_LD@,$ECHO_LD,;t t
24359 s,@RULE_CC@,$RULE_CC,;t t
24360 s,@SHOW_CC@,$SHOW_CC,;t t
24361 s,@ECHO_CC@,$ECHO_CC,;t t
24362 s,@ECHO_LINK@,$ECHO_LINK,;t t
24363 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
24364 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
24365 s,@ADAFLAGS@,$ADAFLAGS,;t t
24366 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24367 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24368 s,@ADA_TRACE@,$ADA_TRACE,;t t
24369 s,@MATH_LIB@,$MATH_LIB,;t t
24370 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24371 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24372 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24373 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24374 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24375 s,@TEST_LIBS@,$TEST_LIBS,;t t
24376 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24377 s,@CXXCPP@,$CXXCPP,;t t
24378 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24379 s,@CXX_AR@,$CXX_AR,;t t
24380 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24381 s,@CXXLIBS@,$CXXLIBS,;t t
24382 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24383 s,@gnatmake_exists@,$gnatmake_exists,;t t
24384 s,@gprconfig_exists@,$gprconfig_exists,;t t
24385 s,@M4_exists@,$M4_exists,;t t
24386 s,@cf_ada_make@,$cf_ada_make,;t t
24387 s,@cf_ada_config@,$cf_ada_config,;t t
24388 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
24389 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
24390 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24391 s,@cf_compile_generics@,$cf_compile_generics,;t t
24392 s,@cf_generic_objects@,$cf_generic_objects,;t t
24393 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24394 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24395 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24396 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24397 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24398 s,@cf_ada_package@,$cf_ada_package,;t t
24399 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24400 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24401 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24402 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24403 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24404 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24405 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24406 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24407 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24408 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24409 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24410 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24411 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24412 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24413 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24414 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24415 s,@TICS_LIBS@,$TICS_LIBS,;t t
24416 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24417 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24418 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24419 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24420 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24421 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24422 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24423 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24424 s,@includesubdir@,$includesubdir,;t t
24425 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24426 s,@TICS_LIST@,$TICS_LIST,;t t
24427 s,@TINFO_LIST@,$TINFO_LIST,;t t
24428 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24429 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24430 s,@TEST_ARGS@,$TEST_ARGS,;t t
24431 s,@TEST_DEPS@,$TEST_DEPS,;t t
24432 s,@TEST_ARG2@,$TEST_ARG2,;t t
24433 s,@TEST_DEP2@,$TEST_DEP2,;t t
24434 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24435 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24436 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24437 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24438 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24439 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24440 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24441 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24442 s,@cross_compiling@,$cross_compiling,;t t
24443 s,@TIC_PATH@,$TIC_PATH,;t t
24444 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24445 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24446 s,@PANEL_NAME@,$PANEL_NAME,;t t
24447 s,@MENU_NAME@,$MENU_NAME,;t t
24448 s,@FORM_NAME@,$FORM_NAME,;t t
24449 s,@CXX_NAME@,$CXX_NAME,;t t
24450 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24451 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24452 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24453 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24454 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24455 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24456 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24457 CEOF
24458
24459 EOF
24460
24461   cat >>$CONFIG_STATUS <<\EOF
24462   # Split the substitutions into bite-sized pieces for seds with
24463   # small command number limits, like on Digital OSF/1 and HP-UX.
24464   ac_max_sed_lines=48
24465   ac_sed_frag=1 # Number of current file.
24466   ac_beg=1 # First line for current file.
24467   ac_end=$ac_max_sed_lines # Line after last line for current file.
24468   ac_more_lines=:
24469   ac_sed_cmds=
24470   while $ac_more_lines; do
24471     if test $ac_beg -gt 1; then
24472       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24473     else
24474       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24475     fi
24476     if test ! -s $tmp/subs.frag; then
24477       ac_more_lines=false
24478     else
24479       # The purpose of the label and of the branching condition is to
24480       # speed up the sed processing (if there are no `@' at all, there
24481       # is no need to browse any of the substitutions).
24482       # These are the two extra sed commands mentioned above.
24483       (echo ':t
24484   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24485       # It is possible to make a multiline substitution using escaped newlines.
24486       # Ensure that we do not split the substitution between script fragments.
24487       ac_BEG=$ac_end
24488       ac_END=`expr $ac_end + $ac_max_sed_lines`
24489       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24490       if test -s $tmp/subs.next; then
24491         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24492         if test ! -s $tmp/subs.edit; then
24493           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24494           if test ! -s $tmp/subs.edit; then
24495             if test $ac_beg -gt 1; then
24496               ac_end=`expr $ac_end - 1`
24497               continue
24498             fi
24499           fi
24500         fi
24501       fi
24502
24503       if test -z "$ac_sed_cmds"; then
24504         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24505       else
24506         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24507       fi
24508       ac_sed_frag=`expr $ac_sed_frag + 1`
24509       ac_beg=$ac_end
24510       ac_end=`expr $ac_end + $ac_max_sed_lines`
24511     fi
24512   done
24513   if test -z "$ac_sed_cmds"; then
24514     ac_sed_cmds=cat
24515   fi
24516 fi # test -n "$CONFIG_FILES"
24517
24518 EOF
24519 cat >>$CONFIG_STATUS <<\EOF
24520 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24521   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24522   case $ac_file in
24523   - | *:- | *:-:* ) # input from stdin
24524         cat >$tmp/stdin
24525         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24526         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24527   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24528         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24529   * )   ac_file_in=$ac_file.in ;;
24530   esac
24531
24532   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24533   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24534          X"$ac_file" : 'X\(//\)[^/]' \| \
24535          X"$ac_file" : 'X\(//\)$' \| \
24536          X"$ac_file" : 'X\(/\)' \| \
24537          .     : '\(.\)' 2>/dev/null ||
24538 echo X"$ac_file" |
24539     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24540           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24541           /^X\(\/\/\)$/{ s//\1/; q; }
24542           /^X\(\/\).*/{ s//\1/; q; }
24543           s/.*/./; q'`
24544   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24545     { case "$ac_dir" in
24546   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24547   *)                      as_incr_dir=.;;
24548 esac
24549 as_dummy="$ac_dir"
24550 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24551   case $as_mkdir_dir in
24552     # Skip DOS drivespec
24553     ?:) as_incr_dir=$as_mkdir_dir ;;
24554     *)
24555       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24556       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24557     ;;
24558   esac
24559 done; }
24560
24561     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24562     # A "../" for each directory in $ac_dir_suffix.
24563     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24564   else
24565     ac_dir_suffix= ac_dots=
24566   fi
24567
24568   case $srcdir in
24569   .)  ac_srcdir=.
24570       if test -z "$ac_dots"; then
24571          ac_top_srcdir=.
24572       else
24573          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24574       fi ;;
24575   [\\/]* | ?:[\\/]* )
24576       ac_srcdir=$srcdir$ac_dir_suffix;
24577       ac_top_srcdir=$srcdir ;;
24578   *) # Relative path.
24579     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24580     ac_top_srcdir=$ac_dots$srcdir ;;
24581   esac
24582
24583   case $INSTALL in
24584   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24585   *) ac_INSTALL=$ac_dots$INSTALL ;;
24586   esac
24587
24588   if test x"$ac_file" != x-; then
24589     { echo "$as_me:24589: creating $ac_file" >&5
24590 echo "$as_me: creating $ac_file" >&6;}
24591     rm -f "$ac_file"
24592   fi
24593   # Let's still pretend it is `configure' which instantiates (i.e., don't
24594   # use $as_me), people would be surprised to read:
24595   #    /* config.h.  Generated automatically by config.status.  */
24596   configure_input="Generated automatically from `echo $ac_file_in |
24597                                                  sed 's,.*/,,'` by configure."
24598
24599   # First look for the input files in the build tree, otherwise in the
24600   # src tree.
24601   ac_file_inputs=`IFS=:
24602     for f in $ac_file_in; do
24603       case $f in
24604       -) echo $tmp/stdin ;;
24605       [\\/$]*)
24606          # Absolute (can't be DOS-style, as IFS=:)
24607          test -f "$f" || { { echo "$as_me:24607: error: cannot find input file: $f" >&5
24608 echo "$as_me: error: cannot find input file: $f" >&2;}
24609    { (exit 1); exit 1; }; }
24610          echo $f;;
24611       *) # Relative
24612          if test -f "$f"; then
24613            # Build tree
24614            echo $f
24615          elif test -f "$srcdir/$f"; then
24616            # Source tree
24617            echo $srcdir/$f
24618          else
24619            # /dev/null tree
24620            { { echo "$as_me:24620: error: cannot find input file: $f" >&5
24621 echo "$as_me: error: cannot find input file: $f" >&2;}
24622    { (exit 1); exit 1; }; }
24623          fi;;
24624       esac
24625     done` || { (exit 1); exit 1; }
24626 EOF
24627 cat >>$CONFIG_STATUS <<\EOF
24628   ac_warn_datarootdir=no
24629   if test x"$ac_file" != x-; then
24630     for ac_item in $ac_file_inputs
24631     do
24632       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24633       if test -n "$ac_seen"; then
24634         ac_used=`grep '@datarootdir@' $ac_item`
24635         if test -z "$ac_used"; then
24636           { echo "$as_me:24636: WARNING: datarootdir was used implicitly but not set:
24637 $ac_seen" >&5
24638 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24639 $ac_seen" >&2;}
24640           ac_warn_datarootdir=yes
24641         fi
24642       fi
24643       ac_seen=`grep '${datarootdir}' $ac_item`
24644       if test -n "$ac_seen"; then
24645         { echo "$as_me:24645: WARNING: datarootdir was used explicitly but not set:
24646 $ac_seen" >&5
24647 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24648 $ac_seen" >&2;}
24649         ac_warn_datarootdir=yes
24650       fi
24651     done
24652   fi
24653
24654 if test "x$ac_warn_datarootdir" = xyes; then
24655   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24656 fi
24657
24658 EOF
24659 cat >>$CONFIG_STATUS <<EOF
24660   sed "$ac_vpsub
24661 $extrasub
24662 EOF
24663 cat >>$CONFIG_STATUS <<\EOF
24664 :t
24665 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24666 s,@configure_input@,$configure_input,;t t
24667 s,@srcdir@,$ac_srcdir,;t t
24668 s,@top_srcdir@,$ac_top_srcdir,;t t
24669 s,@INSTALL@,$ac_INSTALL,;t t
24670 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24671   rm -f $tmp/stdin
24672   if test x"$ac_file" != x-; then
24673     cp $tmp/out $ac_file
24674
24675     for ac_name in prefix exec_prefix datarootdir
24676     do
24677         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24678         if test -n "$ac_seen"; then
24679             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24680             if test -z "$ac_init"; then
24681               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24682               { echo "$as_me:24682: WARNING: Variable $ac_name is used but was not set:
24683 $ac_seen" >&5
24684 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24685 $ac_seen" >&2;}
24686             fi
24687         fi
24688     done
24689     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24690     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24691     if test -s $tmp/out; then
24692       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24693       { echo "$as_me:24693: WARNING: Some variables may not be substituted:
24694 $ac_seen" >&5
24695 echo "$as_me: WARNING: Some variables may not be substituted:
24696 $ac_seen" >&2;}
24697     fi
24698   else
24699     cat $tmp/out
24700   fi
24701   rm -f $tmp/out
24702
24703 done
24704 EOF
24705 cat >>$CONFIG_STATUS <<\EOF
24706
24707 #
24708 # CONFIG_HEADER section.
24709 #
24710
24711 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24712 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24713 #
24714 # ac_d sets the value in "#define NAME VALUE" lines.
24715 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24716 ac_dB='[        ].*$,\1#\2'
24717 ac_dC=' '
24718 ac_dD=',;t'
24719 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24720 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24721 ac_iB='\([      ]\),\1#\2define\3'
24722 ac_iC=' '
24723 ac_iD='\4,;t'
24724 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24725 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24726 ac_uB='$,\1#\2define\3'
24727 ac_uC=' '
24728 ac_uD=',;t'
24729
24730 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24731   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24732   case $ac_file in
24733   - | *:- | *:-:* ) # input from stdin
24734         cat >$tmp/stdin
24735         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24736         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24737   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24738         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24739   * )   ac_file_in=$ac_file.in ;;
24740   esac
24741
24742   test x"$ac_file" != x- && { echo "$as_me:24742: creating $ac_file" >&5
24743 echo "$as_me: creating $ac_file" >&6;}
24744
24745   # First look for the input files in the build tree, otherwise in the
24746   # src tree.
24747   ac_file_inputs=`IFS=:
24748     for f in $ac_file_in; do
24749       case $f in
24750       -) echo $tmp/stdin ;;
24751       [\\/$]*)
24752          # Absolute (can't be DOS-style, as IFS=:)
24753          test -f "$f" || { { echo "$as_me:24753: error: cannot find input file: $f" >&5
24754 echo "$as_me: error: cannot find input file: $f" >&2;}
24755    { (exit 1); exit 1; }; }
24756          echo $f;;
24757       *) # Relative
24758          if test -f "$f"; then
24759            # Build tree
24760            echo $f
24761          elif test -f "$srcdir/$f"; then
24762            # Source tree
24763            echo $srcdir/$f
24764          else
24765            # /dev/null tree
24766            { { echo "$as_me:24766: error: cannot find input file: $f" >&5
24767 echo "$as_me: error: cannot find input file: $f" >&2;}
24768    { (exit 1); exit 1; }; }
24769          fi;;
24770       esac
24771     done` || { (exit 1); exit 1; }
24772   # Remove the trailing spaces.
24773   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24774
24775 EOF
24776
24777 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24778 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24779 # be either 'cat' or 'sort'.
24780 cat confdefs.h | uniq >conftest.vals
24781
24782 # Break up conftest.vals because some shells have a limit on
24783 # the size of here documents, and old seds have small limits too.
24784
24785 rm -f conftest.tail
24786 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24787 while grep . conftest.vals >/dev/null
24788 do
24789   # Write chunks of a limited-size here document to conftest.frag.
24790   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24791   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24792   echo 'CEOF' >> $CONFIG_STATUS
24793   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24794   rm -f conftest.vals
24795   mv conftest.tail conftest.vals
24796 done
24797 rm -f conftest.vals
24798
24799 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24800 # marker @DEFS@.
24801 echo '  cat >> conftest.edit <<CEOF
24802 /@DEFS@/r conftest.frag
24803 /@DEFS@/d
24804 CEOF
24805 sed -f conftest.edit $tmp/in > $tmp/out
24806 rm -f $tmp/in
24807 mv $tmp/out $tmp/in
24808 rm -f conftest.edit conftest.frag
24809 ' >> $CONFIG_STATUS
24810
24811 cat >>$CONFIG_STATUS <<\EOF
24812   # Let's still pretend it is `configure' which instantiates (i.e., don't
24813   # use $as_me), people would be surprised to read:
24814   #    /* config.h.  Generated automatically by config.status.  */
24815   if test x"$ac_file" = x-; then
24816     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24817   else
24818     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24819   fi
24820   cat $tmp/in >>$tmp/config.h
24821   rm -f $tmp/in
24822   if test x"$ac_file" != x-; then
24823     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24824       { echo "$as_me:24824: $ac_file is unchanged" >&5
24825 echo "$as_me: $ac_file is unchanged" >&6;}
24826     else
24827       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24828          X"$ac_file" : 'X\(//\)[^/]' \| \
24829          X"$ac_file" : 'X\(//\)$' \| \
24830          X"$ac_file" : 'X\(/\)' \| \
24831          .     : '\(.\)' 2>/dev/null ||
24832 echo X"$ac_file" |
24833     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24834           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24835           /^X\(\/\/\)$/{ s//\1/; q; }
24836           /^X\(\/\).*/{ s//\1/; q; }
24837           s/.*/./; q'`
24838       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24839         { case "$ac_dir" in
24840   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24841   *)                      as_incr_dir=.;;
24842 esac
24843 as_dummy="$ac_dir"
24844 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24845   case $as_mkdir_dir in
24846     # Skip DOS drivespec
24847     ?:) as_incr_dir=$as_mkdir_dir ;;
24848     *)
24849       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24850       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24851     ;;
24852   esac
24853 done; }
24854
24855       fi
24856       rm -f $ac_file
24857       mv $tmp/config.h $ac_file
24858     fi
24859   else
24860     cat $tmp/config.h
24861     rm -f $tmp/config.h
24862   fi
24863 done
24864 EOF
24865 cat >>$CONFIG_STATUS <<\EOF
24866 #
24867 # CONFIG_COMMANDS section.
24868 #
24869 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24870   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24871   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24872
24873   case $ac_dest in
24874     default )
24875 if test "x$cf_with_tests" != xno ; then
24876
24877 for cf_dir in test
24878 do
24879         if test ! -d $srcdir/$cf_dir; then
24880                 continue
24881         elif test -f $srcdir/$cf_dir/programs; then
24882                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24883         fi
24884 done
24885
24886 fi
24887
24888 cf_prefix=$LIB_PREFIX
24889
24890 case $cf_cv_shlib_version in
24891 (cygdll|msysdll|mingw)
24892         TINFO_NAME=$TINFO_ARG_SUFFIX
24893         TINFO_SUFFIX=.dll
24894         ;;
24895 esac
24896
24897 if test -n "$TINFO_SUFFIX" ; then
24898         case $TINFO_SUFFIX in
24899         (tw*)
24900                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24901                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24902                 ;;
24903         (t*)
24904                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24905                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24906                 ;;
24907         (w*)
24908                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24909                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24910                 ;;
24911         esac
24912 fi
24913
24914 for cf_dir in $SRC_SUBDIRS
24915 do
24916         if test ! -d $srcdir/$cf_dir ; then
24917                 continue
24918         elif test -f $srcdir/$cf_dir/modules; then
24919
24920                 SHARED_LIB=
24921                 Libs_To_Make=
24922                 cf_awk_program=
24923                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24924                 then
24925                         cf_awk_program="$cf_awk_program\
24926 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24927 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24928 "
24929                 fi
24930
24931                 if test "x$WILDCARD_SYMS" = xno
24932                 then
24933                         cf_awk_program="$cf_awk_program\
24934 /[      ]_\\*;/ { skip=1; next; }\
24935 "
24936                 fi
24937
24938                 if test "x$cf_awk_program" != "x"
24939                 then
24940                         cat >>$cf_dir/Makefile <<CF_EOF
24941
24942 # Generated by CF_LIB_RULES
24943 resulting.map: $UNALTERED_SYMS
24944         $AWK 'BEGIN { skip = 1; last=""; } \
24945 $cf_awk_program \
24946 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24947  skip = 0; last = \$\$0; } \
24948 END { print last; }' < $UNALTERED_SYMS >\$@
24949
24950 distclean::
24951         rm -f resulting.map
24952 CF_EOF
24953                 fi
24954
24955                 for cf_item in $cf_LIST_MODELS
24956                 do
24957
24958         case X$cf_item in
24959         (Xlibtool)
24960                 cf_suffix='.la'
24961                 cf_depsuf=$cf_suffix
24962                 ;;
24963         (Xdebug)
24964                 cf_suffix='_g.a'
24965                 cf_depsuf=$cf_suffix
24966                 ;;
24967         (Xprofile)
24968                 cf_suffix='_p.a'
24969                 cf_depsuf=$cf_suffix
24970                 ;;
24971         (Xshared)
24972                 case $cf_cv_system_name in
24973                 (aix[5-7]*)
24974                         cf_suffix='.so'
24975                         cf_depsuf=$cf_suffix
24976                         ;;
24977                 (cygwin*|msys*|mingw*)
24978                         cf_suffix='.dll'
24979                         cf_depsuf='.dll.a'
24980                         ;;
24981                 (darwin*)
24982                         cf_suffix='.dylib'
24983                         cf_depsuf=$cf_suffix
24984                         ;;
24985                 (hpux*)
24986                         case $target in
24987                         (ia64*)
24988                                 cf_suffix='.so'
24989                                 cf_depsuf=$cf_suffix
24990                                 ;;
24991                         (*)
24992                                 cf_suffix='.sl'
24993                                 cf_depsuf=$cf_suffix
24994                                 ;;
24995                         esac
24996                         ;;
24997                 (*)
24998                         cf_suffix='.so'
24999                         cf_depsuf=$cf_suffix
25000                         ;;
25001                 esac
25002                 ;;
25003         (*)
25004                 cf_suffix='.a'
25005                 cf_depsuf=$cf_suffix
25006                 ;;
25007         esac
25008         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25009         then
25010                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25011                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25012         fi
25013
25014                         cf_libname=$cf_dir
25015                         test "$cf_dir" = c++ && cf_libname=ncurses++
25016                         if test $cf_item = shared ; then
25017                                 if test -n "${LIB_SUFFIX}"
25018                                 then
25019                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25020                                 else
25021                                         cf_shared_suffix="$cf_suffix"
25022                                 fi
25023                                 if test "$cf_cv_do_symlinks" = yes ; then
25024                                         cf_version_name=
25025
25026                                         case "$cf_cv_shlib_version" in
25027                                         (rel)
25028                                                 cf_version_name=REL_VERSION
25029                                                 ;;
25030                                         (abi)
25031                                                 cf_version_name=ABI_VERSION
25032                                                 ;;
25033                                         esac
25034
25035                                         if test -n "$cf_version_name"
25036                                         then
25037                                                 case "$cf_cv_system_name" in
25038                                                 (darwin*)
25039                                                         # "w", etc?
25040                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
25041                                                         ;;
25042                                                 (*)
25043                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
25044                                                         ;;
25045                                                 esac
25046                                         fi
25047                                         if test -n "${USE_LIB_SUFFIX}"
25048                                         then
25049                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25050                                         else
25051                                                 cf_shared_suffix="$cf_suffix"
25052                                         fi
25053                                 fi
25054                                 # cygwin needs import library, and has unique naming convention
25055                                 # use autodetected ${cf_prefix} for import lib and static lib, but
25056                                 # use 'cyg' prefix for shared lib.
25057                                 case $cf_cv_shlib_version in
25058                                 (cygdll)
25059                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25060                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
25061                                         ;;
25062                                 (msysdll)
25063                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25064                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
25065                                         ;;
25066                                 (mingw)
25067                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25068                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
25069                                         ;;
25070                                 (*)
25071                                         cf_add_lib=
25072                                         ;;
25073                                 esac
25074                                 if test -n "$cf_add_lib"
25075                                 then
25076                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25077                                         continue
25078                                 fi
25079                         fi
25080                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
25081                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25082                 done
25083
25084                 if test $cf_dir = ncurses ; then
25085                         cf_subsets="$LIB_SUBSETS"
25086                         cf_r_parts="$cf_subsets"
25087                         cf_liblist="$Libs_To_Make"
25088
25089                         while test -n "$cf_r_parts"
25090                         do
25091                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
25092                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
25093                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
25094                                         cf_add_lib=
25095                                         case $cf_l_parts in
25096                                         (*termlib*)
25097                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
25098                                                 ;;
25099                                         (*ticlib*)
25100                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
25101                                                 ;;
25102                                         (*)
25103                                                 break
25104                                                 ;;
25105                                         esac
25106                                         if test -n "$cf_add_lib"; then
25107                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
25108                                         fi
25109                                 else
25110                                         break
25111                                 fi
25112                         done
25113                 else
25114                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
25115                 fi
25116
25117                 if test $cf_dir = c++; then
25118                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
25119                                 cf_list=
25120                                 for cf_item in $Libs_To_Make
25121                                 do
25122                                         case $cf_item in
25123                                         (*.a)
25124                                                 ;;
25125                                         (*)
25126                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
25127                                                 ;;
25128                                         esac
25129                                         for cf_test in $cf_list
25130                                         do
25131                                                 if test "$cf_test" = "$cf_item"
25132                                                 then
25133                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
25134                                                         cf_item=
25135                                                         break
25136                                                 fi
25137                                         done
25138                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
25139                                 done
25140                                 Libs_To_Make="$cf_list"
25141                         fi
25142                 fi
25143
25144                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
25145                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
25146                         $cf_dir/Makefile >$cf_dir/Makefile.out
25147                 mv $cf_dir/Makefile.out $cf_dir/Makefile
25148
25149                 $AWK -f $srcdir/mk-0th.awk \
25150                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
25151                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25152
25153                 for cf_subset in $cf_subsets
25154                 do
25155                         cf_subdirs=
25156                         for cf_item in $cf_LIST_MODELS
25157                         do
25158
25159                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
25160
25161 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25162
25163                         CXX_MODEL=$cf_ITEM
25164                         if test "$CXX_MODEL" = SHARED; then
25165                                 case $cf_cv_shlib_version in
25166                                 (cygdll|msysdll|mingw)
25167                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
25168
25169 echo "${as_me:-configure}:25169: testing overriding CXX_MODEL to SHARED ..." 1>&5
25170
25171                                         with_shared_cxx=yes
25172                                         ;;
25173                                 (*)
25174                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
25175                                         ;;
25176                                 esac
25177                         fi
25178
25179         case X$cf_item in
25180         (Xlibtool)
25181                 cf_suffix='.la'
25182                 cf_depsuf=$cf_suffix
25183                 ;;
25184         (Xdebug)
25185                 cf_suffix='_g.a'
25186                 cf_depsuf=$cf_suffix
25187                 ;;
25188         (Xprofile)
25189                 cf_suffix='_p.a'
25190                 cf_depsuf=$cf_suffix
25191                 ;;
25192         (Xshared)
25193                 case $cf_cv_system_name in
25194                 (aix[5-7]*)
25195                         cf_suffix='.so'
25196                         cf_depsuf=$cf_suffix
25197                         ;;
25198                 (cygwin*|msys*|mingw*)
25199                         cf_suffix='.dll'
25200                         cf_depsuf='.dll.a'
25201                         ;;
25202                 (darwin*)
25203                         cf_suffix='.dylib'
25204                         cf_depsuf=$cf_suffix
25205                         ;;
25206                 (hpux*)
25207                         case $target in
25208                         (ia64*)
25209                                 cf_suffix='.so'
25210                                 cf_depsuf=$cf_suffix
25211                                 ;;
25212                         (*)
25213                                 cf_suffix='.sl'
25214                                 cf_depsuf=$cf_suffix
25215                                 ;;
25216                         esac
25217                         ;;
25218                 (*)
25219                         cf_suffix='.so'
25220                         cf_depsuf=$cf_suffix
25221                         ;;
25222                 esac
25223                 ;;
25224         (*)
25225                 cf_suffix='.a'
25226                 cf_depsuf=$cf_suffix
25227                 ;;
25228         esac
25229         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25230         then
25231                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25232                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25233         fi
25234
25235         case $cf_item in
25236         (libtool) cf_subdir='obj_lo'  ;;
25237         (normal)  cf_subdir='objects' ;;
25238         (debug)   cf_subdir='obj_g' ;;
25239         (profile) cf_subdir='obj_p' ;;
25240         (shared)
25241                 case $cf_cv_system_name in
25242                 (cygwin|msys)
25243                         cf_subdir='objects' ;;
25244                 (*)
25245                         cf_subdir='obj_s' ;;
25246                 esac
25247         esac
25248
25249                         # Test for case where we build libtinfo with a different name.
25250                         cf_libname=$cf_dir
25251                         if test $cf_dir = ncurses ; then
25252                                 case $cf_subset in
25253                                 (*base*)
25254                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25255                                         ;;
25256                                 (*termlib*)
25257                                         cf_libname=$TINFO_LIB_SUFFIX
25258                                         ;;
25259                                 (ticlib*)
25260                                         cf_libname=$TICS_LIB_SUFFIX
25261                                         ;;
25262                                 esac
25263                         elif test $cf_dir = c++ ; then
25264                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25265                         else
25266                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25267                         fi
25268                         if test -n "${USE_ARG_SUFFIX}" ; then
25269                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25270                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25271                         fi
25272
25273                         # These dependencies really are for development, not
25274                         # builds, but they are useful in porting, too.
25275                         cf_depend="../include/ncurses_cfg.h"
25276                         if test "$srcdir" = "."; then
25277                                 cf_reldir="."
25278                         else
25279                                 cf_reldir="\${srcdir}"
25280                         fi
25281
25282                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25283                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25284                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25285                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25286                         fi
25287
25288                         cf_dir_suffix=
25289                         old_cf_suffix="$cf_suffix"
25290                         if test "$cf_cv_shlib_version_infix" = yes ; then
25291                         if test -n "$USE_LIB_SUFFIX" ; then
25292                                 case $USE_LIB_SUFFIX in
25293                                 (tw*)
25294                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25295                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25296                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25297                                         ;;
25298                                 (t*)
25299                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25300                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25301                                         cf_dir_suffix=t$EXTRA_SUFFIX
25302                                         ;;
25303                                 (w*)
25304                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25305                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25306                                         cf_dir_suffix=w$EXTRA_SUFFIX
25307                                         ;;
25308                                 (*)
25309                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25310                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25311                                         cf_dir_suffix=$EXTRA_SUFFIX
25312                                         ;;
25313                                 esac
25314                         fi
25315                         fi
25316
25317                         $AWK -f $srcdir/mk-1st.awk \
25318                                 name=${cf_libname}${cf_dir_suffix} \
25319                                 traces=$LIB_TRACING \
25320                                 MODEL=$cf_ITEM \
25321                                 CXX_MODEL=$CXX_MODEL \
25322                                 model=$cf_subdir \
25323                                 prefix=$cf_prefix \
25324                                 suffix=$cf_suffix \
25325                                 subset=$cf_subset \
25326                                 driver=$cf_cv_term_driver \
25327                                 SymLink="$LN_S" \
25328                                 TermlibRoot=$TINFO_NAME \
25329                                 TermlibSuffix=$TINFO_SUFFIX \
25330                                 ShlibVer=$cf_cv_shlib_version \
25331                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25332                                 ReLink=${cf_cv_do_relink:-no} \
25333                                 DoLinks=$cf_cv_do_symlinks \
25334                                 rmSoLocs=$cf_cv_rm_so_locs \
25335                                 ldconfig="$LDCONFIG" \
25336                                 overwrite=$WITH_OVERWRITE \
25337                                 depend="$cf_depend" \
25338                                 host="$host" \
25339                                 libtool_version="$LIBTOOL_VERSION" \
25340                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25341
25342                         cf_suffix="$old_cf_suffix"
25343
25344                         for cf_subdir2 in $cf_subdirs lib
25345                         do
25346                                 test $cf_subdir = $cf_subdir2 && break
25347                         done
25348                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25349                         $AWK -f $srcdir/mk-2nd.awk \
25350                                 name=$cf_dir \
25351                                 traces=$LIB_TRACING \
25352                                 MODEL=$cf_ITEM \
25353                                 model=$cf_subdir \
25354                                 subset=$cf_subset \
25355                                 srcdir=$srcdir \
25356                                 echo=$WITH_ECHO \
25357                                 crenames=$cf_cv_prog_CC_c_o \
25358                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25359                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25360                         cf_subdirs="$cf_subdirs $cf_subdir"
25361                         done
25362                 done
25363         fi
25364
25365         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25366 done
25367
25368 for cf_dir in $SRC_SUBDIRS
25369 do
25370         if test ! -d $srcdir/$cf_dir ; then
25371                 continue
25372         fi
25373
25374         if test -f $cf_dir/Makefile ; then
25375                 case "$cf_dir" in
25376                 (Ada95)
25377                         echo 'libs \' >> Makefile
25378                         echo 'install.libs \' >> Makefile
25379                         echo 'uninstall.libs ::' >> Makefile
25380                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25381                         ;;
25382                 esac
25383         fi
25384
25385         if test -f $srcdir/$cf_dir/modules; then
25386                 echo >> Makefile
25387                 if test -f $srcdir/$cf_dir/headers; then
25388 cat >> Makefile <<CF_EOF
25389 install.includes \\
25390 uninstall.includes \\
25391 CF_EOF
25392                 fi
25393 if test "$cf_dir" != "c++" ; then
25394 echo 'lint \' >> Makefile
25395 fi
25396 cat >> Makefile <<CF_EOF
25397 libs \\
25398 lintlib \\
25399 install.libs \\
25400 uninstall.libs \\
25401 install.$cf_dir \\
25402 uninstall.$cf_dir ::
25403         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25404 CF_EOF
25405         elif test -f $srcdir/$cf_dir/headers; then
25406 cat >> Makefile <<CF_EOF
25407
25408 libs \\
25409 install.libs \\
25410 uninstall.libs \\
25411 install.includes \\
25412 uninstall.includes ::
25413         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25414 CF_EOF
25415 fi
25416 done
25417
25418 if test "x$cf_with_db_install" = xyes; then
25419 cat >> Makefile <<CF_EOF
25420
25421 install.libs uninstall.libs \\
25422 install.data uninstall.data ::
25423 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25424 CF_EOF
25425 else
25426 cat >> Makefile <<CF_EOF
25427
25428 install.libs uninstall.libs ::
25429         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25430 CF_EOF
25431 fi
25432
25433 if test "x$cf_with_manpages" = xyes; then
25434 cat >> Makefile <<CF_EOF
25435
25436 install.man \\
25437 uninstall.man ::
25438         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25439 CF_EOF
25440 fi
25441
25442 cat >> Makefile <<CF_EOF
25443
25444 distclean ::
25445         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25446         rm -f headers.sh headers.sed mk_shared_lib.sh
25447         rm -f edit_man.* man_alias.*
25448         rm -rf \${DIRS_TO_MAKE}
25449 CF_EOF
25450
25451 # Special case: tack's manpage lives in its own directory.
25452 if test "x$cf_with_manpages" = xyes; then
25453 if test "x$cf_with_tack" = "xyes"; then
25454 cat >> Makefile <<CF_EOF
25455
25456 install.man \\
25457 uninstall.man ::
25458         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25459 CF_EOF
25460 fi
25461 fi
25462
25463 rm -f headers.sed headers.sh
25464
25465 echo creating headers.sh
25466 cat >headers.sh <<CF_EOF
25467 #! $SHELL
25468 # This shell script is generated by the 'configure' script.  It is invoked in a
25469 # subdirectory of the build tree.  It generates a sed-script in the parent
25470 # directory that is used to adjust includes for header files that reside in a
25471 # subdirectory of /usr/include, etc.
25472 PRG=""
25473 while test \$# != 3
25474 do
25475 PRG="\$PRG \$1"; shift
25476 done
25477 DST=\$1
25478 REF=\$2
25479 SRC=\$3
25480 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25481 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25482 echo installing \$SRC in \$DST
25483 CF_EOF
25484
25485 if test $WITH_CURSES_H = yes; then
25486         cat >>headers.sh <<CF_EOF
25487 case \$DST in
25488 (/*/include/*)
25489         END=\`basename \$DST\`
25490         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25491         do
25492                 NAME=\`basename \$i\`
25493                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25494         done
25495         ;;
25496 (*)
25497         echo "" >> \$TMPSED
25498         ;;
25499 esac
25500 CF_EOF
25501
25502 else
25503         cat >>headers.sh <<CF_EOF
25504 case \$DST in
25505 (/*/include/*)
25506         END=\`basename \$DST\`
25507         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25508         do
25509                 NAME=\`basename \$i\`
25510                 if test "\$NAME" = "curses.h"
25511                 then
25512                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25513                         NAME=ncurses.h
25514                 fi
25515                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25516         done
25517         ;;
25518 (*)
25519         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25520         ;;
25521 esac
25522 CF_EOF
25523 fi
25524 cat >>headers.sh <<CF_EOF
25525 rm -f \$TMPSRC
25526 sed -f \$TMPSED \$SRC > \$TMPSRC
25527 NAME=\`basename \$SRC\`
25528 CF_EOF
25529 if test $WITH_CURSES_H != yes; then
25530         cat >>headers.sh <<CF_EOF
25531 test "\$NAME" = "curses.h" && NAME=ncurses.h
25532 CF_EOF
25533 fi
25534 cat >>headers.sh <<CF_EOF
25535 # Just in case someone gzip'd manpages, remove the conflicting copy.
25536 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25537
25538 eval \$PRG \$TMPSRC \$DST/\$NAME
25539 rm -f \$TMPSRC \$TMPSED
25540 CF_EOF
25541
25542 chmod 0755 headers.sh
25543
25544 for cf_dir in $SRC_SUBDIRS
25545 do
25546         if test ! -d $srcdir/$cf_dir ; then
25547                 continue
25548         fi
25549
25550         if test -f $srcdir/$cf_dir/headers; then
25551                 $AWK -f $srcdir/mk-hdr.awk \
25552                         subset="$LIB_SUBSETS" \
25553                         compat="$WITH_CURSES_H" \
25554                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25555         fi
25556
25557         if test -f $srcdir/$cf_dir/modules; then
25558                 if test "$cf_dir" != "c++" ; then
25559                         cat >>$cf_dir/Makefile <<"CF_EOF"
25560 depend : ${AUTO_SRC}
25561         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25562
25563 # DO NOT DELETE THIS LINE -- make depend depends on it.
25564 CF_EOF
25565                 fi
25566         fi
25567 done
25568
25569 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25570 if test -z "$USE_OLD_MAKERULES" ; then
25571         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25572 fi
25573 fi
25574  ;;
25575   esac
25576 done
25577 EOF
25578
25579 cat >>$CONFIG_STATUS <<\EOF
25580
25581 { (exit 0); exit 0; }
25582 EOF
25583 chmod +x $CONFIG_STATUS
25584 ac_clean_files=$ac_clean_files_save
25585
25586 # configure is writing to config.log, and then calls config.status.
25587 # config.status does its own redirection, appending to config.log.
25588 # Unfortunately, on DOS this fails, as config.log is still kept open
25589 # by configure, so config.status won't be able to write to it; its
25590 # output is simply discarded.  So we exec the FD to /dev/null,
25591 # effectively closing config.log, so it can be properly (re)opened and
25592 # appended to by config.status.  When coming back to configure, we
25593 # need to make the FD available again.
25594 if test "$no_create" != yes; then
25595   ac_cs_success=:
25596   exec 5>/dev/null
25597   $SHELL $CONFIG_STATUS || ac_cs_success=false
25598   exec 5>>config.log
25599   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25600   # would make configure fail if this is the last instruction.
25601   $ac_cs_success || { (exit 1); exit 1; }
25602 fi
25603 ${MAKE:-make} preinstall