]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
781679404a47bea171c7188917a858469a3430cd
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.586 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --enable-mixed-case     tic should assume mixed-case filenames
718   --with-install-prefix   prefixes actual install-location ($DESTDIR)
719 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
721   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
722   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
726 Options to Specify the Libraries Built/Used:
727   --disable-libtool-version  enable to use libtool's incompatible naming scheme
728   --with-libtool          generate libraries with libtool
729   --with-shared           generate shared-libraries
730   --with-normal           generate normal-libraries (default)
731   --with-debug            generate debug-libraries (default)
732   --with-profile          generate profile-libraries
733   --with-cxx-shared       generate C++ shared-libraries
734   --with-lib-prefix       override library-prefix
735   --with-termlib          generate separate terminfo library
736   --with-ticlib           generate separate tic library
737   --with-gpm              use Alessandro Rubini's GPM library
738   --without-dlsym         do not use dlsym() to load GPM dynamically
739   --with-sysmouse         use sysmouse (FreeBSD console)
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --disable-lib-suffixes  disable library suffixes
744   --disable-rpath-hack    don't add rpath options for additional libraries
745 Fine-Tuning Your Configuration:
746   --disable-overwrite     leave out the link to -lcurses
747   --disable-database      do not use terminfo, only fallbacks/termcap
748   --with-database=XXX     specify terminfo source to install
749   --with-hashed-db        specify hashed-database library
750   --with-fallbacks=XXX    specify list of fallback terminal descriptions
751   --without-xterm-new     specify if xterm terminfo should be old version
752   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
753   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
754   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
755   --disable-big-core      assume machine has little memory
756   --disable-big-strings   assume compiler has only standard-size strings
757   --enable-termcap        compile in termcap fallback support
758   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
759   --enable-getcap         fast termcap load, no xrefs to terminfo
760   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
761   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
762   --disable-root-environ  restrict environment when running as root
763   --enable-symlinks       make tic use symbolic links not hard links
764   --enable-broken_linker  compile with broken-linker support code
765   --enable-bsdpad         recognize BSD-style prefix padding
766   --enable-widec          compile with wide-char/UTF-8 code
767   --disable-lp64          allow chtype to be long (ignore _LP64)
768   --disable-largefile     omit support for large files
769   --disable-tparm-varargs compile tparm() without varargs interface
770   --disable-tic-depends   link tic library without explicit dependency on ncurses library
771   --with-bool=TYPE        override fallback type of bool variable
772   --with-caps=alt         compile with alternate Caps file
773   --with-chtype=TYPE      override type of chtype
774   --with-ospeed=TYPE      override type of ospeed variable
775   --with-mmask-t=TYPE     override type of mmask_t
776   --with-ccharw-max=XXX   override size CCHARW_MAX
777   --with-tparm-arg=TYPE   override parameter type of tparm
778   --with-rcs-ids          compile-in RCS identifiers
779 Options to Specify How Manpages are Installed:
780   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
781                           optionally formatted/catonly, e.g., gzip,formatted
782   --with-manpage-renames  specify manpage-renaming
783   --with-manpage-aliases  specify manpage-aliases using .so
784   --with-manpage-symlinks specify manpage-aliases using symlinks
785   --with-manpage-tbl      specify manpage processing with tbl
786 Extensions:
787   --disable-ext-funcs     disable function-extensions
788   --enable-sp-funcs       enable experimental SCREEN-extensions
789   --enable-term-driver    enable experimental terminal-driver
790   --enable-const          compile with extra/non-standard const
791   --enable-ext-colors     compile for 256-color support
792   --enable-ext-mouse      compile for extended mouse-encoding
793   --enable-no-padding     compile with $NCURSES_NO_PADDING code
794   --enable-signed-char    compile using signed Boolean's in term.h
795   --enable-sigwinch       compile with SIGWINCH handler
796   --enable-tcap-names     compile with user-definable terminal capabilities
797 Development Code:
798   --without-develop       disable development options
799   --enable-hard-tabs      compile with hard-tabs code
800   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
801 Experimental Code:
802   --disable-assumed-color do not assume anything about default-colors
803   --disable-hashmap       compile without hashmap scrolling-optimization
804   --enable-colorfgbg      compile-in experimental $COLORFGBG code
805   --enable-interop        compile-in experimental interop bindings
806   --with-pthread          use POSIX thread library
807   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
808   --enable-weak-symbols   enable weak-symbols for pthreads
809   --enable-reentrant      compile with experimental reentrant code
810   --with-wrap-prefix=XXX  override prefix used for public variables
811   --enable-safe-sprintf   compile with experimental safe-sprintf code
812   --disable-scroll-hints  compile without scroll-hints code
813   --enable-wgetch-events  compile with experimental wgetch-events code
814 Testing/development Options:
815   --disable-echo          do not display "compiling" commands
816   --enable-warnings       build: turn on GCC compiler warnings
817   --enable-string-hacks   work around bogus compiler/loader warnings
818   --enable-assertions     test: turn on generation of assertion code
819   --with-dmalloc          test: use Gray Watson's dmalloc library
820   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
821   --with-valgrind         test: use valgrind
822   --disable-leaks         test: free permanent memory, analyze leaks
823   --enable-expanded       test: generate functions for certain macros
824   --disable-macros        test: use functions rather than macros
825   --with-trace            test: add trace() function to all models of ncurses
826   --disable-gnat-projects test: disable GNAT projects even if usable
827 Ada95 Binding Options:
828   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
829   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
830   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
831   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
832
833 Some influential environment variables:
834   CC          C compiler command
835   CFLAGS      C compiler flags
836   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
837               nonstandard directory <lib dir>
838   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
839               headers in a nonstandard directory <include dir>
840   CPP         C preprocessor
841   CXX         C++ compiler command
842   CXXFLAGS    C++ compiler flags
843   CXXCPP      C++ preprocessor
844
845 Use these variables to override the choices made by `configure' or to help
846 it to find libraries and programs with nonstandard names/locations.
847
848 EOF
849 fi
850
851 if test "$ac_init_help" = "recursive"; then
852   # If there are subdirs, report their specific --help.
853   ac_popdir=`pwd`
854   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
855     cd $ac_subdir
856     # A "../" for each directory in /$ac_subdir.
857     ac_dots=`echo $ac_subdir |
858              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
859
860     case $srcdir in
861     .) # No --srcdir option.  We are building in place.
862       ac_sub_srcdir=$srcdir ;;
863     [\\/]* | ?:[\\/]* ) # Absolute path.
864       ac_sub_srcdir=$srcdir/$ac_subdir ;;
865     *) # Relative path.
866       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
867     esac
868
869     # Check for guested configure; otherwise get Cygnus style configure.
870     if test -f $ac_sub_srcdir/configure.gnu; then
871       echo
872       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
873     elif test -f $ac_sub_srcdir/configure; then
874       echo
875       $SHELL $ac_sub_srcdir/configure  --help=recursive
876     elif test -f $ac_sub_srcdir/configure.ac ||
877            test -f $ac_sub_srcdir/configure.in; then
878       echo
879       $ac_configure --help
880     else
881       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
882     fi
883     cd $ac_popdir
884   done
885 fi
886
887 test -n "$ac_init_help" && exit 0
888 if $ac_init_version; then
889   cat <<\EOF
890
891 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
892 Free Software Foundation, Inc.
893 This configure script is free software; the Free Software Foundation
894 gives unlimited permission to copy, distribute and modify it.
895 EOF
896   exit 0
897 fi
898 exec 5>config.log
899 cat >&5 <<EOF
900 This file contains any messages produced by compilers while
901 running configure, to aid debugging if configure makes a mistake.
902
903 It was created by $as_me, which was
904 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
905
906   $ $0 $@
907
908 EOF
909 {
910 cat <<_ASUNAME
911 ## ---------- ##
912 ## Platform.  ##
913 ## ---------- ##
914
915 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
916 uname -m = `(uname -m) 2>/dev/null || echo unknown`
917 uname -r = `(uname -r) 2>/dev/null || echo unknown`
918 uname -s = `(uname -s) 2>/dev/null || echo unknown`
919 uname -v = `(uname -v) 2>/dev/null || echo unknown`
920
921 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
922 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
923
924 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
925 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
926 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
927 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
928 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
929 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
930 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
931
932 PATH = $PATH
933
934 _ASUNAME
935 } >&5
936
937 cat >&5 <<EOF
938 ## ------------ ##
939 ## Core tests.  ##
940 ## ------------ ##
941
942 EOF
943
944 # Keep a trace of the command line.
945 # Strip out --no-create and --no-recursion so they do not pile up.
946 # Also quote any args containing shell meta-characters.
947 ac_configure_args=
948 ac_sep=
949 for ac_arg
950 do
951   case $ac_arg in
952   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
953   | --no-cr | --no-c) ;;
954   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
955   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
956   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
957     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
958     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
959     ac_sep=" " ;;
960   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
961      ac_sep=" " ;;
962   esac
963   # Get rid of the leading space.
964 done
965
966 # When interrupted or exit'd, cleanup temporary files, and complete
967 # config.log.  We remove comments because anyway the quotes in there
968 # would cause problems or look ugly.
969 trap 'exit_status=$?
970   # Save into config.log some information that might help in debugging.
971   echo >&5
972   echo "## ----------------- ##" >&5
973   echo "## Cache variables.  ##" >&5
974   echo "## ----------------- ##" >&5
975   echo >&5
976   # The following way of writing the cache mishandles newlines in values,
977 {
978   (set) 2>&1 |
979     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
980     *ac_space=\ *)
981       sed -n \
982         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
983           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
984       ;;
985     *)
986       sed -n \
987         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
988       ;;
989     esac;
990 } >&5
991   sed "/^$/d" confdefs.h >conftest.log
992   if test -s conftest.log; then
993     echo >&5
994     echo "## ------------ ##" >&5
995     echo "## confdefs.h.  ##" >&5
996     echo "## ------------ ##" >&5
997     echo >&5
998     cat conftest.log >&5
999   fi
1000   (echo; echo) >&5
1001   test "$ac_signal" != 0 &&
1002     echo "$as_me: caught signal $ac_signal" >&5
1003   echo "$as_me: exit $exit_status" >&5
1004   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1005     exit $exit_status
1006      ' 0
1007 for ac_signal in 1 2 13 15; do
1008   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1009 done
1010 ac_signal=0
1011
1012 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1013 rm -rf conftest* confdefs.h
1014 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1015 echo >confdefs.h
1016
1017 # Let the site file select an alternate cache file if it wants to.
1018 # Prefer explicitly selected file to automatically selected ones.
1019 if test -z "$CONFIG_SITE"; then
1020   if test "x$prefix" != xNONE; then
1021     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1022   else
1023     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1024   fi
1025 fi
1026 for ac_site_file in $CONFIG_SITE; do
1027   if test -r "$ac_site_file"; then
1028     { echo "$as_me:1028: loading site script $ac_site_file" >&5
1029 echo "$as_me: loading site script $ac_site_file" >&6;}
1030     cat "$ac_site_file" >&5
1031     . "$ac_site_file"
1032   fi
1033 done
1034
1035 if test -r "$cache_file"; then
1036   # Some versions of bash will fail to source /dev/null (special
1037   # files actually), so we avoid doing that.
1038   if test -f "$cache_file"; then
1039     { echo "$as_me:1039: loading cache $cache_file" >&5
1040 echo "$as_me: loading cache $cache_file" >&6;}
1041     case $cache_file in
1042       [\\/]* | ?:[\\/]* ) . $cache_file;;
1043       *)                      . ./$cache_file;;
1044     esac
1045   fi
1046 else
1047   { echo "$as_me:1047: creating cache $cache_file" >&5
1048 echo "$as_me: creating cache $cache_file" >&6;}
1049   >$cache_file
1050 fi
1051
1052 # Check that the precious variables saved in the cache have kept the same
1053 # value.
1054 ac_cache_corrupted=false
1055 for ac_var in `(set) 2>&1 |
1056                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1057   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1058   eval ac_new_set=\$ac_env_${ac_var}_set
1059   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1060   eval ac_new_val="\$ac_env_${ac_var}_value"
1061   case $ac_old_set,$ac_new_set in
1062     set,)
1063       { echo "$as_me:1063: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,set)
1067       { echo "$as_me:1067: error: \`$ac_var' was not set in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,);;
1071     *)
1072       if test "x$ac_old_val" != "x$ac_new_val"; then
1073         { echo "$as_me:1073: error: \`$ac_var' has changed since the previous run:" >&5
1074 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1075         { echo "$as_me:1075:   former value:  $ac_old_val" >&5
1076 echo "$as_me:   former value:  $ac_old_val" >&2;}
1077         { echo "$as_me:1077:   current value: $ac_new_val" >&5
1078 echo "$as_me:   current value: $ac_new_val" >&2;}
1079         ac_cache_corrupted=:
1080       fi;;
1081   esac
1082   # Pass precious variables to config.status.  It doesn't matter if
1083   # we pass some twice (in addition to the command line arguments).
1084   if test "$ac_new_set" = set; then
1085     case $ac_new_val in
1086     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1087       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1088       ac_configure_args="$ac_configure_args '$ac_arg'"
1089       ;;
1090     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1091        ;;
1092     esac
1093   fi
1094 done
1095 if $ac_cache_corrupted; then
1096   { echo "$as_me:1096: error: changes in the environment can compromise the build" >&5
1097 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1098   { { echo "$as_me:1098: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1099 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1100    { (exit 1); exit 1; }; }
1101 fi
1102
1103 ac_ext=c
1104 ac_cpp='$CPP $CPPFLAGS'
1105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1108 ac_main_return=return
1109
1110 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1111   *c*,-n*) ECHO_N= ECHO_C='
1112 ' ECHO_T='      ' ;;
1113   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1114   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1115 esac
1116 echo "#! $SHELL" >conftest.sh
1117 echo  "exit 0"   >>conftest.sh
1118 chmod +x conftest.sh
1119 if { (echo "$as_me:1119: PATH=\".;.\"; conftest.sh") >&5
1120   (PATH=".;."; conftest.sh) 2>&5
1121   ac_status=$?
1122   echo "$as_me:1122: \$? = $ac_status" >&5
1123   (exit $ac_status); }; then
1124   ac_path_separator=';'
1125 else
1126   ac_path_separator=:
1127 fi
1128 PATH_SEPARATOR="$ac_path_separator"
1129 rm -f conftest.sh
1130
1131 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1132
1133 top_builddir=`pwd`
1134
1135 echo "$as_me:1135: checking for egrep" >&5
1136 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1137 if test "${ac_cv_prog_egrep+set}" = set; then
1138   echo $ECHO_N "(cached) $ECHO_C" >&6
1139 else
1140   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1141     then ac_cv_prog_egrep='grep -E'
1142     else ac_cv_prog_egrep='egrep'
1143     fi
1144 fi
1145 echo "$as_me:1145: result: $ac_cv_prog_egrep" >&5
1146 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1147  EGREP=$ac_cv_prog_egrep
1148
1149 test -z "$EGREP" && { { echo "$as_me:1149: error: No egrep program found" >&5
1150 echo "$as_me: error: No egrep program found" >&2;}
1151    { (exit 1); exit 1; }; }
1152
1153 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1155 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1156 cf_cv_abi_version=${NCURSES_MAJOR}
1157 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1158 cf_cv_timestamp=`date`
1159 echo "$as_me:1159: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1160 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1161
1162 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1163
1164 # Check whether --with-rel-version or --without-rel-version was given.
1165 if test "${with_rel_version+set}" = set; then
1166   withval="$with_rel_version"
1167   { echo "$as_me:1167: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1168 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1169  cf_cv_rel_version=$withval
1170 fi;
1171
1172  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1173  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1174
1175 if test -n "$NCURSES_MAJOR" ; then
1176   case $NCURSES_MAJOR in #(vi
1177   [0-9]*) #(vi
1178         ;;
1179   *)
1180         { { echo "$as_me:1180: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1181 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1182    { (exit 1); exit 1; }; }
1183         ;;
1184   esac
1185 else
1186   { { echo "$as_me:1186: error: Release major-version value is empty" >&5
1187 echo "$as_me: error: Release major-version value is empty" >&2;}
1188    { (exit 1); exit 1; }; }
1189 fi
1190
1191 if test -n "$NCURSES_MINOR" ; then
1192   case $NCURSES_MINOR in #(vi
1193   [0-9]*) #(vi
1194         ;;
1195   *)
1196         { { echo "$as_me:1196: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1197 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1198    { (exit 1); exit 1; }; }
1199         ;;
1200   esac
1201 else
1202   { { echo "$as_me:1202: error: Release minor-version value is empty" >&5
1203 echo "$as_me: error: Release minor-version value is empty" >&2;}
1204    { (exit 1); exit 1; }; }
1205 fi
1206
1207 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1208
1209 # Check whether --with-abi-version or --without-abi-version was given.
1210 if test "${with_abi_version+set}" = set; then
1211   withval="$with_abi_version"
1212   { echo "$as_me:1212: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1213 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1214  cf_cv_abi_version=$withval
1215 fi;
1216
1217 if test -n "$cf_cv_abi_version" ; then
1218   case $cf_cv_abi_version in #(vi
1219   [0-9]*) #(vi
1220         ;;
1221   *)
1222         { { echo "$as_me:1222: error: ABI version is not a number: $cf_cv_abi_version" >&5
1223 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1224    { (exit 1); exit 1; }; }
1225         ;;
1226   esac
1227 else
1228   { { echo "$as_me:1228: error: ABI version value is empty" >&5
1229 echo "$as_me: error: ABI version value is empty" >&2;}
1230    { (exit 1); exit 1; }; }
1231 fi
1232
1233 ac_aux_dir=
1234 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1235   if test -f $ac_dir/install-sh; then
1236     ac_aux_dir=$ac_dir
1237     ac_install_sh="$ac_aux_dir/install-sh -c"
1238     break
1239   elif test -f $ac_dir/install.sh; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/install.sh -c"
1242     break
1243   elif test -f $ac_dir/shtool; then
1244     ac_aux_dir=$ac_dir
1245     ac_install_sh="$ac_aux_dir/shtool install -c"
1246     break
1247   fi
1248 done
1249 if test -z "$ac_aux_dir"; then
1250   { { echo "$as_me:1250: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1251 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1252    { (exit 1); exit 1; }; }
1253 fi
1254 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1255 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1256 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1257
1258 # Make sure we can run config.sub.
1259 $ac_config_sub sun4 >/dev/null 2>&1 ||
1260   { { echo "$as_me:1260: error: cannot run $ac_config_sub" >&5
1261 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 echo "$as_me:1264: checking build system type" >&5
1265 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1266 if test "${ac_cv_build+set}" = set; then
1267   echo $ECHO_N "(cached) $ECHO_C" >&6
1268 else
1269   ac_cv_build_alias=$build_alias
1270 test -z "$ac_cv_build_alias" &&
1271   ac_cv_build_alias=`$ac_config_guess`
1272 test -z "$ac_cv_build_alias" &&
1273   { { echo "$as_me:1273: error: cannot guess build type; you must specify one" >&5
1274 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1275    { (exit 1); exit 1; }; }
1276 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1277   { { echo "$as_me:1277: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1278 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1279    { (exit 1); exit 1; }; }
1280
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_build" >&5
1283 echo "${ECHO_T}$ac_cv_build" >&6
1284 build=$ac_cv_build
1285 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1286 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1287 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1288
1289 echo "$as_me:1289: checking host system type" >&5
1290 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1291 if test "${ac_cv_host+set}" = set; then
1292   echo $ECHO_N "(cached) $ECHO_C" >&6
1293 else
1294   ac_cv_host_alias=$host_alias
1295 test -z "$ac_cv_host_alias" &&
1296   ac_cv_host_alias=$ac_cv_build_alias
1297 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1298   { { echo "$as_me:1298: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1299 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1300    { (exit 1); exit 1; }; }
1301
1302 fi
1303 echo "$as_me:1303: result: $ac_cv_host" >&5
1304 echo "${ECHO_T}$ac_cv_host" >&6
1305 host=$ac_cv_host
1306 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1307 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1308 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1309
1310 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1311         echo "$as_me:1311: checking target system type" >&5
1312 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1313 if test "${ac_cv_target+set}" = set; then
1314   echo $ECHO_N "(cached) $ECHO_C" >&6
1315 else
1316   ac_cv_target_alias=$target_alias
1317 test "x$ac_cv_target_alias" = "x" &&
1318   ac_cv_target_alias=$ac_cv_host_alias
1319 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1320   { { echo "$as_me:1320: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1321 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1322    { (exit 1); exit 1; }; }
1323
1324 fi
1325 echo "$as_me:1325: result: $ac_cv_target" >&5
1326 echo "${ECHO_T}$ac_cv_target" >&6
1327 target=$ac_cv_target
1328 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1329 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1330 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1331
1332 # The aliases save the names the user supplied, while $host etc.
1333 # will get canonicalized.
1334 test -n "$target_alias" &&
1335   test "$program_prefix$program_suffix$program_transform_name" = \
1336     NONENONEs,x,x, &&
1337   program_prefix=${target_alias}-
1338         system_name="$host_os"
1339 else
1340         system_name="`(uname -s -r) 2>/dev/null`"
1341         if test -z "$system_name" ; then
1342                 system_name="`(hostname) 2>/dev/null`"
1343         fi
1344 fi
1345 test -n "$system_name" &&
1346 cat >>confdefs.h <<EOF
1347 #define SYSTEM_NAME "$system_name"
1348 EOF
1349
1350 if test "${cf_cv_system_name+set}" = set; then
1351   echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353   cf_cv_system_name="$system_name"
1354 fi
1355
1356 test -z "$system_name" && system_name="$cf_cv_system_name"
1357 test -n "$cf_cv_system_name" && echo "$as_me:1357: result: Configuring for $cf_cv_system_name" >&5
1358 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1359
1360 if test ".$system_name" != ".$cf_cv_system_name" ; then
1361         echo "$as_me:1361: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1362 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1363         { { echo "$as_me:1363: error: \"Please remove config.cache and try again.\"" >&5
1364 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1365    { (exit 1); exit 1; }; }
1366 fi
1367
1368 # Check whether --with-system-type or --without-system-type was given.
1369 if test "${with_system_type+set}" = set; then
1370   withval="$with_system_type"
1371   { echo "$as_me:1371: WARNING: overriding system type to $withval" >&5
1372 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1373         cf_cv_system_name=$withval
1374         host_os=$withval
1375
1376 fi;
1377
1378 ###     Save the given $CFLAGS to allow user-override.
1379 cf_user_CFLAGS="$CFLAGS"
1380
1381 ###     Default install-location
1382
1383 echo "$as_me:1383: checking for prefix" >&5
1384 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1385 if test "x$prefix" = "xNONE" ; then
1386         case "$cf_cv_system_name" in
1387                 # non-vendor systems don't have a conflict
1388         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1389                 prefix=/usr
1390                 ;;
1391         *)      prefix=$ac_default_prefix
1392                 ;;
1393         esac
1394 fi
1395 echo "$as_me:1395: result: $prefix" >&5
1396 echo "${ECHO_T}$prefix" >&6
1397
1398 if test "x$prefix" = "xNONE" ; then
1399 echo "$as_me:1399: checking for default include-directory" >&5
1400 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1401 test -n "$verbose" && echo 1>&6
1402 for cf_symbol in \
1403         $includedir \
1404         $includedir/ncurses \
1405         $prefix/include \
1406         $prefix/include/ncurses \
1407         /usr/local/include \
1408         /usr/local/include/ncurses \
1409         /usr/include \
1410         /usr/include/ncurses
1411 do
1412         cf_dir=`eval echo $cf_symbol`
1413         if test -f $cf_dir/curses.h ; then
1414         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1415                 includedir="$cf_symbol"
1416                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1417                 break
1418         fi
1419         fi
1420         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1421 done
1422 echo "$as_me:1422: result: $includedir" >&5
1423 echo "${ECHO_T}$includedir" >&6
1424 fi
1425
1426 ###     Checks for programs.
1427
1428 # Check whether --with-ada or --without-ada was given.
1429 if test "${with_ada+set}" = set; then
1430   withval="$with_ada"
1431   cf_with_ada=$withval
1432 else
1433   cf_with_ada=yes
1434 fi;
1435 if test "x$cf_with_ada" = xyes
1436 then
1437         cf_PROG_CC="gnatgcc gcc cc"
1438 else
1439         cf_PROG_CC="gcc cc"
1440 fi
1441
1442 ac_ext=c
1443 ac_cpp='$CPP $CPPFLAGS'
1444 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1445 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1447 ac_main_return=return
1448 if test -n "$ac_tool_prefix"; then
1449   for ac_prog in $cf_PROG_CC
1450   do
1451     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1452 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1453 echo "$as_me:1453: checking for $ac_word" >&5
1454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1455 if test "${ac_cv_prog_CC+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   if test -n "$CC"; then
1459   ac_cv_prog_CC="$CC" # Let the user override the test.
1460 else
1461   ac_save_IFS=$IFS; IFS=$ac_path_separator
1462 ac_dummy="$PATH"
1463 for ac_dir in $ac_dummy; do
1464   IFS=$ac_save_IFS
1465   test -z "$ac_dir" && ac_dir=.
1466   $as_executable_p "$ac_dir/$ac_word" || continue
1467 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1468 echo "$as_me:1468: found $ac_dir/$ac_word" >&5
1469 break
1470 done
1471
1472 fi
1473 fi
1474 CC=$ac_cv_prog_CC
1475 if test -n "$CC"; then
1476   echo "$as_me:1476: result: $CC" >&5
1477 echo "${ECHO_T}$CC" >&6
1478 else
1479   echo "$as_me:1479: result: no" >&5
1480 echo "${ECHO_T}no" >&6
1481 fi
1482
1483     test -n "$CC" && break
1484   done
1485 fi
1486 if test -z "$CC"; then
1487   ac_ct_CC=$CC
1488   for ac_prog in $cf_PROG_CC
1489 do
1490   # Extract the first word of "$ac_prog", so it can be a program name with args.
1491 set dummy $ac_prog; ac_word=$2
1492 echo "$as_me:1492: checking for $ac_word" >&5
1493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1494 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1495   echo $ECHO_N "(cached) $ECHO_C" >&6
1496 else
1497   if test -n "$ac_ct_CC"; then
1498   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1499 else
1500   ac_save_IFS=$IFS; IFS=$ac_path_separator
1501 ac_dummy="$PATH"
1502 for ac_dir in $ac_dummy; do
1503   IFS=$ac_save_IFS
1504   test -z "$ac_dir" && ac_dir=.
1505   $as_executable_p "$ac_dir/$ac_word" || continue
1506 ac_cv_prog_ac_ct_CC="$ac_prog"
1507 echo "$as_me:1507: found $ac_dir/$ac_word" >&5
1508 break
1509 done
1510
1511 fi
1512 fi
1513 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1514 if test -n "$ac_ct_CC"; then
1515   echo "$as_me:1515: result: $ac_ct_CC" >&5
1516 echo "${ECHO_T}$ac_ct_CC" >&6
1517 else
1518   echo "$as_me:1518: result: no" >&5
1519 echo "${ECHO_T}no" >&6
1520 fi
1521
1522   test -n "$ac_ct_CC" && break
1523 done
1524
1525   CC=$ac_ct_CC
1526 fi
1527
1528 test -z "$CC" && { { echo "$as_me:1528: error: no acceptable cc found in \$PATH" >&5
1529 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1530    { (exit 1); exit 1; }; }
1531
1532 # Provide some information about the compiler.
1533 echo "$as_me:1533:" \
1534      "checking for C compiler version" >&5
1535 ac_compiler=`set X $ac_compile; echo $2`
1536 { (eval echo "$as_me:1536: \"$ac_compiler --version </dev/null >&5\"") >&5
1537   (eval $ac_compiler --version </dev/null >&5) 2>&5
1538   ac_status=$?
1539   echo "$as_me:1539: \$? = $ac_status" >&5
1540   (exit $ac_status); }
1541 { (eval echo "$as_me:1541: \"$ac_compiler -v </dev/null >&5\"") >&5
1542   (eval $ac_compiler -v </dev/null >&5) 2>&5
1543   ac_status=$?
1544   echo "$as_me:1544: \$? = $ac_status" >&5
1545   (exit $ac_status); }
1546 { (eval echo "$as_me:1546: \"$ac_compiler -V </dev/null >&5\"") >&5
1547   (eval $ac_compiler -V </dev/null >&5) 2>&5
1548   ac_status=$?
1549   echo "$as_me:1549: \$? = $ac_status" >&5
1550   (exit $ac_status); }
1551
1552 cat >conftest.$ac_ext <<_ACEOF
1553 #line 1553 "configure"
1554 #include "confdefs.h"
1555
1556 int
1557 main ()
1558 {
1559
1560   ;
1561   return 0;
1562 }
1563 _ACEOF
1564 ac_clean_files_save=$ac_clean_files
1565 ac_clean_files="$ac_clean_files a.out a.exe"
1566 # Try to create an executable without -o first, disregard a.out.
1567 # It will help us diagnose broken compilers, and finding out an intuition
1568 # of exeext.
1569 echo "$as_me:1569: checking for C compiler default output" >&5
1570 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1571 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1572 if { (eval echo "$as_me:1572: \"$ac_link_default\"") >&5
1573   (eval $ac_link_default) 2>&5
1574   ac_status=$?
1575   echo "$as_me:1575: \$? = $ac_status" >&5
1576   (exit $ac_status); }; then
1577   # Find the output, starting from the most likely.  This scheme is
1578 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1579 # resort.
1580 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1581                 ls a.out conftest 2>/dev/null;
1582                 ls a.* conftest.* 2>/dev/null`; do
1583   case $ac_file in
1584     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1585     a.out ) # We found the default executable, but exeext='' is most
1586             # certainly right.
1587             break;;
1588     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1589           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1590           export ac_cv_exeext
1591           break;;
1592     * ) break;;
1593   esac
1594 done
1595 else
1596   echo "$as_me: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 { { echo "$as_me:1598: error: C compiler cannot create executables" >&5
1599 echo "$as_me: error: C compiler cannot create executables" >&2;}
1600    { (exit 77); exit 77; }; }
1601 fi
1602
1603 ac_exeext=$ac_cv_exeext
1604 echo "$as_me:1604: result: $ac_file" >&5
1605 echo "${ECHO_T}$ac_file" >&6
1606
1607 # Check the compiler produces executables we can run.  If not, either
1608 # the compiler is broken, or we cross compile.
1609 echo "$as_me:1609: checking whether the C compiler works" >&5
1610 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1611 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1612 # If not cross compiling, check that we can run a simple program.
1613 if test "$cross_compiling" != yes; then
1614   if { ac_try='./$ac_file'
1615   { (eval echo "$as_me:1615: \"$ac_try\"") >&5
1616   (eval $ac_try) 2>&5
1617   ac_status=$?
1618   echo "$as_me:1618: \$? = $ac_status" >&5
1619   (exit $ac_status); }; }; then
1620     cross_compiling=no
1621   else
1622     if test "$cross_compiling" = maybe; then
1623         cross_compiling=yes
1624     else
1625         { { echo "$as_me:1625: error: cannot run C compiled programs.
1626 If you meant to cross compile, use \`--host'." >&5
1627 echo "$as_me: error: cannot run C compiled programs.
1628 If you meant to cross compile, use \`--host'." >&2;}
1629    { (exit 1); exit 1; }; }
1630     fi
1631   fi
1632 fi
1633 echo "$as_me:1633: result: yes" >&5
1634 echo "${ECHO_T}yes" >&6
1635
1636 rm -f a.out a.exe conftest$ac_cv_exeext
1637 ac_clean_files=$ac_clean_files_save
1638 # Check the compiler produces executables we can run.  If not, either
1639 # the compiler is broken, or we cross compile.
1640 echo "$as_me:1640: checking whether we are cross compiling" >&5
1641 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1642 echo "$as_me:1642: result: $cross_compiling" >&5
1643 echo "${ECHO_T}$cross_compiling" >&6
1644
1645 echo "$as_me:1645: checking for executable suffix" >&5
1646 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1647 if { (eval echo "$as_me:1647: \"$ac_link\"") >&5
1648   (eval $ac_link) 2>&5
1649   ac_status=$?
1650   echo "$as_me:1650: \$? = $ac_status" >&5
1651   (exit $ac_status); }; then
1652   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1653 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1654 # work properly (i.e., refer to `conftest.exe'), while it won't with
1655 # `rm'.
1656 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1657   case $ac_file in
1658     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1659     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1660           export ac_cv_exeext
1661           break;;
1662     * ) break;;
1663   esac
1664 done
1665 else
1666   { { echo "$as_me:1666: error: cannot compute EXEEXT: cannot compile and link" >&5
1667 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1668    { (exit 1); exit 1; }; }
1669 fi
1670
1671 rm -f conftest$ac_cv_exeext
1672 echo "$as_me:1672: result: $ac_cv_exeext" >&5
1673 echo "${ECHO_T}$ac_cv_exeext" >&6
1674
1675 rm -f conftest.$ac_ext
1676 EXEEXT=$ac_cv_exeext
1677 ac_exeext=$EXEEXT
1678 echo "$as_me:1678: checking for object suffix" >&5
1679 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1680 if test "${ac_cv_objext+set}" = set; then
1681   echo $ECHO_N "(cached) $ECHO_C" >&6
1682 else
1683   cat >conftest.$ac_ext <<_ACEOF
1684 #line 1684 "configure"
1685 #include "confdefs.h"
1686
1687 int
1688 main ()
1689 {
1690
1691   ;
1692   return 0;
1693 }
1694 _ACEOF
1695 rm -f conftest.o conftest.obj
1696 if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5
1697   (eval $ac_compile) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }; then
1701   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1702   case $ac_file in
1703     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1704     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1705        break;;
1706   esac
1707 done
1708 else
1709   echo "$as_me: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 { { echo "$as_me:1711: error: cannot compute OBJEXT: cannot compile" >&5
1712 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1713    { (exit 1); exit 1; }; }
1714 fi
1715
1716 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1717 fi
1718 echo "$as_me:1718: result: $ac_cv_objext" >&5
1719 echo "${ECHO_T}$ac_cv_objext" >&6
1720 OBJEXT=$ac_cv_objext
1721 ac_objext=$OBJEXT
1722 echo "$as_me:1722: checking whether we are using the GNU C compiler" >&5
1723 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1724 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1725   echo $ECHO_N "(cached) $ECHO_C" >&6
1726 else
1727   cat >conftest.$ac_ext <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main ()
1733 {
1734 #ifndef __GNUC__
1735        choke me
1736 #endif
1737
1738   ;
1739   return 0;
1740 }
1741 _ACEOF
1742 rm -f conftest.$ac_objext
1743 if { (eval echo "$as_me:1743: \"$ac_compile\"") >&5
1744   (eval $ac_compile) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); } &&
1748          { ac_try='test -s conftest.$ac_objext'
1749   { (eval echo "$as_me:1749: \"$ac_try\"") >&5
1750   (eval $ac_try) 2>&5
1751   ac_status=$?
1752   echo "$as_me:1752: \$? = $ac_status" >&5
1753   (exit $ac_status); }; }; then
1754   ac_compiler_gnu=yes
1755 else
1756   echo "$as_me: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
1758 ac_compiler_gnu=no
1759 fi
1760 rm -f conftest.$ac_objext conftest.$ac_ext
1761 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1762
1763 fi
1764 echo "$as_me:1764: result: $ac_cv_c_compiler_gnu" >&5
1765 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1766 GCC=`test $ac_compiler_gnu = yes && echo yes`
1767 ac_test_CFLAGS=${CFLAGS+set}
1768 ac_save_CFLAGS=$CFLAGS
1769 CFLAGS="-g"
1770 echo "$as_me:1770: checking whether $CC accepts -g" >&5
1771 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1772 if test "${ac_cv_prog_cc_g+set}" = set; then
1773   echo $ECHO_N "(cached) $ECHO_C" >&6
1774 else
1775   cat >conftest.$ac_ext <<_ACEOF
1776 #line 1776 "configure"
1777 #include "confdefs.h"
1778
1779 int
1780 main ()
1781 {
1782
1783   ;
1784   return 0;
1785 }
1786 _ACEOF
1787 rm -f conftest.$ac_objext
1788 if { (eval echo "$as_me:1788: \"$ac_compile\"") >&5
1789   (eval $ac_compile) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); } &&
1793          { ac_try='test -s conftest.$ac_objext'
1794   { (eval echo "$as_me:1794: \"$ac_try\"") >&5
1795   (eval $ac_try) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); }; }; then
1799   ac_cv_prog_cc_g=yes
1800 else
1801   echo "$as_me: failed program was:" >&5
1802 cat conftest.$ac_ext >&5
1803 ac_cv_prog_cc_g=no
1804 fi
1805 rm -f conftest.$ac_objext conftest.$ac_ext
1806 fi
1807 echo "$as_me:1807: result: $ac_cv_prog_cc_g" >&5
1808 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1809 if test "$ac_test_CFLAGS" = set; then
1810   CFLAGS=$ac_save_CFLAGS
1811 elif test $ac_cv_prog_cc_g = yes; then
1812   if test "$GCC" = yes; then
1813     CFLAGS="-g -O2"
1814   else
1815     CFLAGS="-g"
1816   fi
1817 else
1818   if test "$GCC" = yes; then
1819     CFLAGS="-O2"
1820   else
1821     CFLAGS=
1822   fi
1823 fi
1824 # Some people use a C++ compiler to compile C.  Since we use `exit',
1825 # in C++ we need to declare it.  In case someone uses the same compiler
1826 # for both compiling C and C++ we need to have the C++ compiler decide
1827 # the declaration of exit, since it's the most demanding environment.
1828 cat >conftest.$ac_ext <<_ACEOF
1829 #ifndef __cplusplus
1830   choke me
1831 #endif
1832 _ACEOF
1833 rm -f conftest.$ac_objext
1834 if { (eval echo "$as_me:1834: \"$ac_compile\"") >&5
1835   (eval $ac_compile) 2>&5
1836   ac_status=$?
1837   echo "$as_me:1837: \$? = $ac_status" >&5
1838   (exit $ac_status); } &&
1839          { ac_try='test -s conftest.$ac_objext'
1840   { (eval echo "$as_me:1840: \"$ac_try\"") >&5
1841   (eval $ac_try) 2>&5
1842   ac_status=$?
1843   echo "$as_me:1843: \$? = $ac_status" >&5
1844   (exit $ac_status); }; }; then
1845   for ac_declaration in \
1846    ''\
1847    '#include <stdlib.h>' \
1848    'extern "C" void std::exit (int) throw (); using std::exit;' \
1849    'extern "C" void std::exit (int); using std::exit;' \
1850    'extern "C" void exit (int) throw ();' \
1851    'extern "C" void exit (int);' \
1852    'void exit (int);'
1853 do
1854   cat >conftest.$ac_ext <<_ACEOF
1855 #line 1855 "configure"
1856 #include "confdefs.h"
1857 #include <stdlib.h>
1858 $ac_declaration
1859 int
1860 main ()
1861 {
1862 exit (42);
1863   ;
1864   return 0;
1865 }
1866 _ACEOF
1867 rm -f conftest.$ac_objext
1868 if { (eval echo "$as_me:1868: \"$ac_compile\"") >&5
1869   (eval $ac_compile) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); } &&
1873          { ac_try='test -s conftest.$ac_objext'
1874   { (eval echo "$as_me:1874: \"$ac_try\"") >&5
1875   (eval $ac_try) 2>&5
1876   ac_status=$?
1877   echo "$as_me:1877: \$? = $ac_status" >&5
1878   (exit $ac_status); }; }; then
1879   :
1880 else
1881   echo "$as_me: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
1883 continue
1884 fi
1885 rm -f conftest.$ac_objext conftest.$ac_ext
1886   cat >conftest.$ac_ext <<_ACEOF
1887 #line 1887 "configure"
1888 #include "confdefs.h"
1889 $ac_declaration
1890 int
1891 main ()
1892 {
1893 exit (42);
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900   (eval $ac_compile) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); } &&
1904          { ac_try='test -s conftest.$ac_objext'
1905   { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906   (eval $ac_try) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); }; }; then
1910   break
1911 else
1912   echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 fi
1915 rm -f conftest.$ac_objext conftest.$ac_ext
1916 done
1917 rm -rf conftest*
1918 if test -n "$ac_declaration"; then
1919   echo '#ifdef __cplusplus' >>confdefs.h
1920   echo $ac_declaration      >>confdefs.h
1921   echo '#endif'             >>confdefs.h
1922 fi
1923
1924 else
1925   echo "$as_me: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_ext=c
1930 ac_cpp='$CPP $CPPFLAGS'
1931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1934 ac_main_return=return
1935
1936 GCC_VERSION=none
1937 if test "$GCC" = yes ; then
1938         echo "$as_me:1938: checking version of $CC" >&5
1939 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1940         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.].*//'`"
1941         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1942         echo "$as_me:1942: result: $GCC_VERSION" >&5
1943 echo "${ECHO_T}$GCC_VERSION" >&6
1944 fi
1945
1946 echo "$as_me:1946: checking for $CC option to accept ANSI C" >&5
1947 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1948 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1949   echo $ECHO_N "(cached) $ECHO_C" >&6
1950 else
1951   ac_cv_prog_cc_stdc=no
1952 ac_save_CC=$CC
1953 cat >conftest.$ac_ext <<_ACEOF
1954 #line 1954 "configure"
1955 #include "confdefs.h"
1956 #include <stdarg.h>
1957 #include <stdio.h>
1958 #include <sys/types.h>
1959 #include <sys/stat.h>
1960 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1961 struct buf { int x; };
1962 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1963 static char *e (p, i)
1964      char **p;
1965      int i;
1966 {
1967   return p[i];
1968 }
1969 static char *f (char * (*g) (char **, int), char **p, ...)
1970 {
1971   char *s;
1972   va_list v;
1973   va_start (v,p);
1974   s = g (p, va_arg (v,int));
1975   va_end (v);
1976   return s;
1977 }
1978 int test (int i, double x);
1979 struct s1 {int (*f) (int a);};
1980 struct s2 {int (*f) (double a);};
1981 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1982 int argc;
1983 char **argv;
1984 int
1985 main ()
1986 {
1987 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1988   ;
1989   return 0;
1990 }
1991 _ACEOF
1992 # Don't try gcc -ansi; that turns off useful extensions and
1993 # breaks some systems' header files.
1994 # AIX                   -qlanglvl=ansi
1995 # Ultrix and OSF/1      -std1
1996 # HP-UX 10.20 and later -Ae
1997 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1998 # SVR4                  -Xc -D__EXTENSIONS__
1999 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2000 do
2001   CC="$ac_save_CC $ac_arg"
2002   rm -f conftest.$ac_objext
2003 if { (eval echo "$as_me:2003: \"$ac_compile\"") >&5
2004   (eval $ac_compile) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); } &&
2008          { ac_try='test -s conftest.$ac_objext'
2009   { (eval echo "$as_me:2009: \"$ac_try\"") >&5
2010   (eval $ac_try) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); }; }; then
2014   ac_cv_prog_cc_stdc=$ac_arg
2015 break
2016 else
2017   echo "$as_me: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
2019 fi
2020 rm -f conftest.$ac_objext
2021 done
2022 rm -f conftest.$ac_ext conftest.$ac_objext
2023 CC=$ac_save_CC
2024
2025 fi
2026
2027 case "x$ac_cv_prog_cc_stdc" in
2028   x|xno)
2029     echo "$as_me:2029: result: none needed" >&5
2030 echo "${ECHO_T}none needed" >&6 ;;
2031   *)
2032     echo "$as_me:2032: result: $ac_cv_prog_cc_stdc" >&5
2033 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2034     CC="$CC $ac_cv_prog_cc_stdc" ;;
2035 esac
2036
2037 # This should have been defined by AC_PROG_CC
2038 : ${CC:=cc}
2039
2040 echo "$as_me:2040: checking \$CC variable" >&5
2041 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2042 case "$CC" in #(vi
2043 *[\ \   ]-[IUD]*)
2044         echo "$as_me:2044: result: broken" >&5
2045 echo "${ECHO_T}broken" >&6
2046         { echo "$as_me:2046: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2047 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2048         # humor him...
2049         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2050         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2051
2052 cf_fix_cppflags=no
2053 cf_new_cflags=
2054 cf_new_cppflags=
2055 cf_new_extra_cppflags=
2056
2057 for cf_add_cflags in $cf_flags
2058 do
2059 case $cf_fix_cppflags in
2060 no)
2061         case $cf_add_cflags in #(vi
2062         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2063                 case $cf_add_cflags in
2064                 -D*)
2065                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2066
2067                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2068                                 && test -z "${cf_tst_cflags}" \
2069                                 && cf_fix_cppflags=yes
2070
2071                         if test $cf_fix_cppflags = yes ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         elif test "${cf_tst_cflags}" = "\"'" ; then
2075                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2076                                 continue
2077                         fi
2078                         ;;
2079                 esac
2080                 case "$CPPFLAGS" in
2081                 *$cf_add_cflags) #(vi
2082                         ;;
2083                 *) #(vi
2084                         case $cf_add_cflags in #(vi
2085                         -D*)
2086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2087
2088 CPPFLAGS=`echo "$CPPFLAGS" | \
2089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2091
2092                                 ;;
2093                         esac
2094                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2095                         ;;
2096                 esac
2097                 ;;
2098         *)
2099                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2100                 ;;
2101         esac
2102         ;;
2103 yes)
2104         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2105
2106         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2107
2108         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2109                 && test -z "${cf_tst_cflags}" \
2110                 && cf_fix_cppflags=no
2111         ;;
2112 esac
2113 done
2114
2115 if test -n "$cf_new_cflags" ; then
2116
2117         CFLAGS="$CFLAGS $cf_new_cflags"
2118 fi
2119
2120 if test -n "$cf_new_cppflags" ; then
2121
2122         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2123 fi
2124
2125 if test -n "$cf_new_extra_cppflags" ; then
2126
2127         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2128 fi
2129
2130         ;;
2131 *)
2132         echo "$as_me:2132: result: ok" >&5
2133 echo "${ECHO_T}ok" >&6
2134         ;;
2135 esac
2136
2137 ac_ext=c
2138 ac_cpp='$CPP $CPPFLAGS'
2139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2142 ac_main_return=return
2143 echo "$as_me:2143: checking how to run the C preprocessor" >&5
2144 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2145 # On Suns, sometimes $CPP names a directory.
2146 if test -n "$CPP" && test -d "$CPP"; then
2147   CPP=
2148 fi
2149 if test -z "$CPP"; then
2150   if test "${ac_cv_prog_CPP+set}" = set; then
2151   echo $ECHO_N "(cached) $ECHO_C" >&6
2152 else
2153       # Double quotes because CPP needs to be expanded
2154     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2155     do
2156       ac_preproc_ok=false
2157 for ac_c_preproc_warn_flag in '' yes
2158 do
2159   # Use a header file that comes with gcc, so configuring glibc
2160   # with a fresh cross-compiler works.
2161   # On the NeXT, cc -E runs the code through the compiler's parser,
2162   # not just through cpp. "Syntax error" is here to catch this case.
2163   cat >conftest.$ac_ext <<_ACEOF
2164 #line 2164 "configure"
2165 #include "confdefs.h"
2166 #include <assert.h>
2167                      Syntax error
2168 _ACEOF
2169 if { (eval echo "$as_me:2169: \"$ac_cpp conftest.$ac_ext\"") >&5
2170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171   ac_status=$?
2172   egrep -v '^ *\+' conftest.er1 >conftest.err
2173   rm -f conftest.er1
2174   cat conftest.err >&5
2175   echo "$as_me:2175: \$? = $ac_status" >&5
2176   (exit $ac_status); } >/dev/null; then
2177   if test -s conftest.err; then
2178     ac_cpp_err=$ac_c_preproc_warn_flag
2179   else
2180     ac_cpp_err=
2181   fi
2182 else
2183   ac_cpp_err=yes
2184 fi
2185 if test -z "$ac_cpp_err"; then
2186   :
2187 else
2188   echo "$as_me: failed program was:" >&5
2189   cat conftest.$ac_ext >&5
2190   # Broken: fails on valid input.
2191 continue
2192 fi
2193 rm -f conftest.err conftest.$ac_ext
2194
2195   # OK, works on sane cases.  Now check whether non-existent headers
2196   # can be detected and how.
2197   cat >conftest.$ac_ext <<_ACEOF
2198 #line 2198 "configure"
2199 #include "confdefs.h"
2200 #include <ac_nonexistent.h>
2201 _ACEOF
2202 if { (eval echo "$as_me:2202: \"$ac_cpp conftest.$ac_ext\"") >&5
2203   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2204   ac_status=$?
2205   egrep -v '^ *\+' conftest.er1 >conftest.err
2206   rm -f conftest.er1
2207   cat conftest.err >&5
2208   echo "$as_me:2208: \$? = $ac_status" >&5
2209   (exit $ac_status); } >/dev/null; then
2210   if test -s conftest.err; then
2211     ac_cpp_err=$ac_c_preproc_warn_flag
2212   else
2213     ac_cpp_err=
2214   fi
2215 else
2216   ac_cpp_err=yes
2217 fi
2218 if test -z "$ac_cpp_err"; then
2219   # Broken: success on invalid input.
2220 continue
2221 else
2222   echo "$as_me: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224   # Passes both tests.
2225 ac_preproc_ok=:
2226 break
2227 fi
2228 rm -f conftest.err conftest.$ac_ext
2229
2230 done
2231 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2232 rm -f conftest.err conftest.$ac_ext
2233 if $ac_preproc_ok; then
2234   break
2235 fi
2236
2237     done
2238     ac_cv_prog_CPP=$CPP
2239
2240 fi
2241   CPP=$ac_cv_prog_CPP
2242 else
2243   ac_cv_prog_CPP=$CPP
2244 fi
2245 echo "$as_me:2245: result: $CPP" >&5
2246 echo "${ECHO_T}$CPP" >&6
2247 ac_preproc_ok=false
2248 for ac_c_preproc_warn_flag in '' yes
2249 do
2250   # Use a header file that comes with gcc, so configuring glibc
2251   # with a fresh cross-compiler works.
2252   # On the NeXT, cc -E runs the code through the compiler's parser,
2253   # not just through cpp. "Syntax error" is here to catch this case.
2254   cat >conftest.$ac_ext <<_ACEOF
2255 #line 2255 "configure"
2256 #include "confdefs.h"
2257 #include <assert.h>
2258                      Syntax error
2259 _ACEOF
2260 if { (eval echo "$as_me:2260: \"$ac_cpp conftest.$ac_ext\"") >&5
2261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2262   ac_status=$?
2263   egrep -v '^ *\+' conftest.er1 >conftest.err
2264   rm -f conftest.er1
2265   cat conftest.err >&5
2266   echo "$as_me:2266: \$? = $ac_status" >&5
2267   (exit $ac_status); } >/dev/null; then
2268   if test -s conftest.err; then
2269     ac_cpp_err=$ac_c_preproc_warn_flag
2270   else
2271     ac_cpp_err=
2272   fi
2273 else
2274   ac_cpp_err=yes
2275 fi
2276 if test -z "$ac_cpp_err"; then
2277   :
2278 else
2279   echo "$as_me: failed program was:" >&5
2280   cat conftest.$ac_ext >&5
2281   # Broken: fails on valid input.
2282 continue
2283 fi
2284 rm -f conftest.err conftest.$ac_ext
2285
2286   # OK, works on sane cases.  Now check whether non-existent headers
2287   # can be detected and how.
2288   cat >conftest.$ac_ext <<_ACEOF
2289 #line 2289 "configure"
2290 #include "confdefs.h"
2291 #include <ac_nonexistent.h>
2292 _ACEOF
2293 if { (eval echo "$as_me:2293: \"$ac_cpp conftest.$ac_ext\"") >&5
2294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2295   ac_status=$?
2296   egrep -v '^ *\+' conftest.er1 >conftest.err
2297   rm -f conftest.er1
2298   cat conftest.err >&5
2299   echo "$as_me:2299: \$? = $ac_status" >&5
2300   (exit $ac_status); } >/dev/null; then
2301   if test -s conftest.err; then
2302     ac_cpp_err=$ac_c_preproc_warn_flag
2303   else
2304     ac_cpp_err=
2305   fi
2306 else
2307   ac_cpp_err=yes
2308 fi
2309 if test -z "$ac_cpp_err"; then
2310   # Broken: success on invalid input.
2311 continue
2312 else
2313   echo "$as_me: failed program was:" >&5
2314   cat conftest.$ac_ext >&5
2315   # Passes both tests.
2316 ac_preproc_ok=:
2317 break
2318 fi
2319 rm -f conftest.err conftest.$ac_ext
2320
2321 done
2322 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2323 rm -f conftest.err conftest.$ac_ext
2324 if $ac_preproc_ok; then
2325   :
2326 else
2327   { { echo "$as_me:2327: error: C preprocessor \"$CPP\" fails sanity check" >&5
2328 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2329    { (exit 1); exit 1; }; }
2330 fi
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338
2339 if test $ac_cv_c_compiler_gnu = yes; then
2340     echo "$as_me:2340: checking whether $CC needs -traditional" >&5
2341 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2342 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345     ac_pattern="Autoconf.*'x'"
2346   cat >conftest.$ac_ext <<_ACEOF
2347 #line 2347 "configure"
2348 #include "confdefs.h"
2349 #include <sgtty.h>
2350 int Autoconf = TIOCGETP;
2351 _ACEOF
2352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2353   egrep "$ac_pattern" >/dev/null 2>&1; then
2354   ac_cv_prog_gcc_traditional=yes
2355 else
2356   ac_cv_prog_gcc_traditional=no
2357 fi
2358 rm -rf conftest*
2359
2360   if test $ac_cv_prog_gcc_traditional = no; then
2361     cat >conftest.$ac_ext <<_ACEOF
2362 #line 2362 "configure"
2363 #include "confdefs.h"
2364 #include <termio.h>
2365 int Autoconf = TCGETA;
2366 _ACEOF
2367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2368   egrep "$ac_pattern" >/dev/null 2>&1; then
2369   ac_cv_prog_gcc_traditional=yes
2370 fi
2371 rm -rf conftest*
2372
2373   fi
2374 fi
2375 echo "$as_me:2375: result: $ac_cv_prog_gcc_traditional" >&5
2376 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2377   if test $ac_cv_prog_gcc_traditional = yes; then
2378     CC="$CC -traditional"
2379   fi
2380 fi
2381
2382 echo "$as_me:2382: checking whether $CC understands -c and -o together" >&5
2383 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2384 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2385   echo $ECHO_N "(cached) $ECHO_C" >&6
2386 else
2387
2388 cat > conftest.$ac_ext <<CF_EOF
2389 #include <stdio.h>
2390 int main()
2391 {
2392         ${cf_cv_main_return:-return}(0);
2393 }
2394 CF_EOF
2395 # We do the test twice because some compilers refuse to overwrite an
2396 # existing .o file with -o, though they will create one.
2397 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2398 if { (eval echo "$as_me:2398: \"$ac_try\"") >&5
2399   (eval $ac_try) 2>&5
2400   ac_status=$?
2401   echo "$as_me:2401: \$? = $ac_status" >&5
2402   (exit $ac_status); } &&
2403   test -f conftest2.$ac_objext && { (eval echo "$as_me:2403: \"$ac_try\"") >&5
2404   (eval $ac_try) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit $ac_status); };
2408 then
2409   eval cf_cv_prog_CC_c_o=yes
2410 else
2411   eval cf_cv_prog_CC_c_o=no
2412 fi
2413 rm -rf conftest*
2414
2415 fi
2416 if test $cf_cv_prog_CC_c_o = yes; then
2417   echo "$as_me:2417: result: yes" >&5
2418 echo "${ECHO_T}yes" >&6
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422 fi
2423
2424 if test "$cross_compiling" = yes ; then
2425   LDCONFIG=:
2426 else
2427 case "$cf_cv_system_name" in #(vi
2428 dragonfly*|mirbsd*|freebsd*) #(vi
2429   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2430   ;;
2431 *) LDPATH=$PATH:/sbin:/usr/sbin
2432   # Extract the first word of "ldconfig", so it can be a program name with args.
2433 set dummy ldconfig; ac_word=$2
2434 echo "$as_me:2434: checking for $ac_word" >&5
2435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2436 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2437   echo $ECHO_N "(cached) $ECHO_C" >&6
2438 else
2439   case $LDCONFIG in
2440   [\\/]* | ?:[\\/]*)
2441   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2442   ;;
2443   *)
2444   ac_save_IFS=$IFS; IFS=$ac_path_separator
2445 ac_dummy="$LDPATH"
2446 for ac_dir in $ac_dummy; do
2447   IFS=$ac_save_IFS
2448   test -z "$ac_dir" && ac_dir=.
2449   if $as_executable_p "$ac_dir/$ac_word"; then
2450    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2451    echo "$as_me:2451: found $ac_dir/$ac_word" >&5
2452    break
2453 fi
2454 done
2455
2456   ;;
2457 esac
2458 fi
2459 LDCONFIG=$ac_cv_path_LDCONFIG
2460
2461 if test -n "$LDCONFIG"; then
2462   echo "$as_me:2462: result: $LDCONFIG" >&5
2463 echo "${ECHO_T}$LDCONFIG" >&6
2464 else
2465   echo "$as_me:2465: result: no" >&5
2466 echo "${ECHO_T}no" >&6
2467 fi
2468
2469   ;;
2470 esac
2471 fi
2472
2473 echo "$as_me:2473: checking if you want to ensure bool is consistent with C++" >&5
2474 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2475
2476 # Check whether --with-cxx or --without-cxx was given.
2477 if test "${with_cxx+set}" = set; then
2478   withval="$with_cxx"
2479   cf_with_cxx=$withval
2480 else
2481   cf_with_cxx=yes
2482 fi;
2483 echo "$as_me:2483: result: $cf_with_cxx" >&5
2484 echo "${ECHO_T}$cf_with_cxx" >&6
2485 if test "X$cf_with_cxx" = Xno ; then
2486         CXX=""
2487         GXX=""
2488 else
2489         # with autoconf 2.13, we can change the error to a warning:
2490                 ac_ext=cc
2491 ac_cpp='$CXXCPP $CPPFLAGS'
2492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2495 ac_main_return=return
2496 if test -n "$ac_tool_prefix"; then
2497   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2498   do
2499     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2500 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2501 echo "$as_me:2501: checking for $ac_word" >&5
2502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2503 if test "${ac_cv_prog_CXX+set}" = set; then
2504   echo $ECHO_N "(cached) $ECHO_C" >&6
2505 else
2506   if test -n "$CXX"; then
2507   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2508 else
2509   ac_save_IFS=$IFS; IFS=$ac_path_separator
2510 ac_dummy="$PATH"
2511 for ac_dir in $ac_dummy; do
2512   IFS=$ac_save_IFS
2513   test -z "$ac_dir" && ac_dir=.
2514   $as_executable_p "$ac_dir/$ac_word" || continue
2515 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2516 echo "$as_me:2516: found $ac_dir/$ac_word" >&5
2517 break
2518 done
2519
2520 fi
2521 fi
2522 CXX=$ac_cv_prog_CXX
2523 if test -n "$CXX"; then
2524   echo "$as_me:2524: result: $CXX" >&5
2525 echo "${ECHO_T}$CXX" >&6
2526 else
2527   echo "$as_me:2527: result: no" >&5
2528 echo "${ECHO_T}no" >&6
2529 fi
2530
2531     test -n "$CXX" && break
2532   done
2533 fi
2534 if test -z "$CXX"; then
2535   ac_ct_CXX=$CXX
2536   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2537 do
2538   # Extract the first word of "$ac_prog", so it can be a program name with args.
2539 set dummy $ac_prog; ac_word=$2
2540 echo "$as_me:2540: checking for $ac_word" >&5
2541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2542 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2543   echo $ECHO_N "(cached) $ECHO_C" >&6
2544 else
2545   if test -n "$ac_ct_CXX"; then
2546   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2547 else
2548   ac_save_IFS=$IFS; IFS=$ac_path_separator
2549 ac_dummy="$PATH"
2550 for ac_dir in $ac_dummy; do
2551   IFS=$ac_save_IFS
2552   test -z "$ac_dir" && ac_dir=.
2553   $as_executable_p "$ac_dir/$ac_word" || continue
2554 ac_cv_prog_ac_ct_CXX="$ac_prog"
2555 echo "$as_me:2555: found $ac_dir/$ac_word" >&5
2556 break
2557 done
2558
2559 fi
2560 fi
2561 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2562 if test -n "$ac_ct_CXX"; then
2563   echo "$as_me:2563: result: $ac_ct_CXX" >&5
2564 echo "${ECHO_T}$ac_ct_CXX" >&6
2565 else
2566   echo "$as_me:2566: result: no" >&5
2567 echo "${ECHO_T}no" >&6
2568 fi
2569
2570   test -n "$ac_ct_CXX" && break
2571 done
2572 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2573
2574   CXX=$ac_ct_CXX
2575 fi
2576
2577 # Provide some information about the compiler.
2578 echo "$as_me:2578:" \
2579      "checking for C++ compiler version" >&5
2580 ac_compiler=`set X $ac_compile; echo $2`
2581 { (eval echo "$as_me:2581: \"$ac_compiler --version </dev/null >&5\"") >&5
2582   (eval $ac_compiler --version </dev/null >&5) 2>&5
2583   ac_status=$?
2584   echo "$as_me:2584: \$? = $ac_status" >&5
2585   (exit $ac_status); }
2586 { (eval echo "$as_me:2586: \"$ac_compiler -v </dev/null >&5\"") >&5
2587   (eval $ac_compiler -v </dev/null >&5) 2>&5
2588   ac_status=$?
2589   echo "$as_me:2589: \$? = $ac_status" >&5
2590   (exit $ac_status); }
2591 { (eval echo "$as_me:2591: \"$ac_compiler -V </dev/null >&5\"") >&5
2592   (eval $ac_compiler -V </dev/null >&5) 2>&5
2593   ac_status=$?
2594   echo "$as_me:2594: \$? = $ac_status" >&5
2595   (exit $ac_status); }
2596
2597 echo "$as_me:2597: checking whether we are using the GNU C++ compiler" >&5
2598 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2599 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   cat >conftest.$ac_ext <<_ACEOF
2603 #line 2603 "configure"
2604 #include "confdefs.h"
2605
2606 int
2607 main ()
2608 {
2609 #ifndef __GNUC__
2610        choke me
2611 #endif
2612
2613   ;
2614   return 0;
2615 }
2616 _ACEOF
2617 rm -f conftest.$ac_objext
2618 if { (eval echo "$as_me:2618: \"$ac_compile\"") >&5
2619   (eval $ac_compile) 2>&5
2620   ac_status=$?
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); } &&
2623          { ac_try='test -s conftest.$ac_objext'
2624   { (eval echo "$as_me:2624: \"$ac_try\"") >&5
2625   (eval $ac_try) 2>&5
2626   ac_status=$?
2627   echo "$as_me:2627: \$? = $ac_status" >&5
2628   (exit $ac_status); }; }; then
2629   ac_compiler_gnu=yes
2630 else
2631   echo "$as_me: failed program was:" >&5
2632 cat conftest.$ac_ext >&5
2633 ac_compiler_gnu=no
2634 fi
2635 rm -f conftest.$ac_objext conftest.$ac_ext
2636 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2637
2638 fi
2639 echo "$as_me:2639: result: $ac_cv_cxx_compiler_gnu" >&5
2640 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2641 GXX=`test $ac_compiler_gnu = yes && echo yes`
2642 ac_test_CXXFLAGS=${CXXFLAGS+set}
2643 ac_save_CXXFLAGS=$CXXFLAGS
2644 CXXFLAGS="-g"
2645 echo "$as_me:2645: checking whether $CXX accepts -g" >&5
2646 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2647 if test "${ac_cv_prog_cxx_g+set}" = set; then
2648   echo $ECHO_N "(cached) $ECHO_C" >&6
2649 else
2650   cat >conftest.$ac_ext <<_ACEOF
2651 #line 2651 "configure"
2652 #include "confdefs.h"
2653
2654 int
2655 main ()
2656 {
2657
2658   ;
2659   return 0;
2660 }
2661 _ACEOF
2662 rm -f conftest.$ac_objext
2663 if { (eval echo "$as_me:2663: \"$ac_compile\"") >&5
2664   (eval $ac_compile) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); } &&
2668          { ac_try='test -s conftest.$ac_objext'
2669   { (eval echo "$as_me:2669: \"$ac_try\"") >&5
2670   (eval $ac_try) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }; }; then
2674   ac_cv_prog_cxx_g=yes
2675 else
2676   echo "$as_me: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 ac_cv_prog_cxx_g=no
2679 fi
2680 rm -f conftest.$ac_objext conftest.$ac_ext
2681 fi
2682 echo "$as_me:2682: result: $ac_cv_prog_cxx_g" >&5
2683 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2684 if test "$ac_test_CXXFLAGS" = set; then
2685   CXXFLAGS=$ac_save_CXXFLAGS
2686 elif test $ac_cv_prog_cxx_g = yes; then
2687   if test "$GXX" = yes; then
2688     CXXFLAGS="-g -O2"
2689   else
2690     CXXFLAGS="-g"
2691   fi
2692 else
2693   if test "$GXX" = yes; then
2694     CXXFLAGS="-O2"
2695   else
2696     CXXFLAGS=
2697   fi
2698 fi
2699 for ac_declaration in \
2700    ''\
2701    '#include <stdlib.h>' \
2702    'extern "C" void std::exit (int) throw (); using std::exit;' \
2703    'extern "C" void std::exit (int); using std::exit;' \
2704    'extern "C" void exit (int) throw ();' \
2705    'extern "C" void exit (int);' \
2706    'void exit (int);'
2707 do
2708   cat >conftest.$ac_ext <<_ACEOF
2709 #line 2709 "configure"
2710 #include "confdefs.h"
2711 #include <stdlib.h>
2712 $ac_declaration
2713 int
2714 main ()
2715 {
2716 exit (42);
2717   ;
2718   return 0;
2719 }
2720 _ACEOF
2721 rm -f conftest.$ac_objext
2722 if { (eval echo "$as_me:2722: \"$ac_compile\"") >&5
2723   (eval $ac_compile) 2>&5
2724   ac_status=$?
2725   echo "$as_me:2725: \$? = $ac_status" >&5
2726   (exit $ac_status); } &&
2727          { ac_try='test -s conftest.$ac_objext'
2728   { (eval echo "$as_me:2728: \"$ac_try\"") >&5
2729   (eval $ac_try) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }; }; then
2733   :
2734 else
2735   echo "$as_me: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2737 continue
2738 fi
2739 rm -f conftest.$ac_objext conftest.$ac_ext
2740   cat >conftest.$ac_ext <<_ACEOF
2741 #line 2741 "configure"
2742 #include "confdefs.h"
2743 $ac_declaration
2744 int
2745 main ()
2746 {
2747 exit (42);
2748   ;
2749   return 0;
2750 }
2751 _ACEOF
2752 rm -f conftest.$ac_objext
2753 if { (eval echo "$as_me:2753: \"$ac_compile\"") >&5
2754   (eval $ac_compile) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); } &&
2758          { ac_try='test -s conftest.$ac_objext'
2759   { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2760   (eval $ac_try) 2>&5
2761   ac_status=$?
2762   echo "$as_me:2762: \$? = $ac_status" >&5
2763   (exit $ac_status); }; }; then
2764   break
2765 else
2766   echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 fi
2769 rm -f conftest.$ac_objext conftest.$ac_ext
2770 done
2771 rm -rf conftest*
2772 if test -n "$ac_declaration"; then
2773   echo '#ifdef __cplusplus' >>confdefs.h
2774   echo $ac_declaration      >>confdefs.h
2775   echo '#endif'             >>confdefs.h
2776 fi
2777
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783 ac_main_return=return
2784
2785         ac_ext=cc
2786 ac_cpp='$CXXCPP $CPPFLAGS'
2787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2790 ac_main_return=return
2791
2792         if test "x$cf_with_cxx" != xno
2793         then
2794                 # Several of the C++ configurations do not work, particularly when
2795                 # cross-compiling (20140913 -TD)
2796                 echo "$as_me:2796: checking if $CXX works" >&5
2797 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2798
2799                 save_CPPFLAGS="$CPPFLAGS"
2800                 eval cf_includedir=${includedir}
2801                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2802
2803 cat >conftest.$ac_ext <<_ACEOF
2804 #line 2804 "configure"
2805 #include "confdefs.h"
2806
2807 #include <stdlib.h>
2808 #include <stdio.h>
2809
2810 int
2811 main ()
2812 {
2813
2814                 printf("Hello world!\n")
2815
2816   ;
2817   return 0;
2818 }
2819 _ACEOF
2820 rm -f conftest.$ac_objext
2821 if { (eval echo "$as_me:2821: \"$ac_compile\"") >&5
2822   (eval $ac_compile) 2>&5
2823   ac_status=$?
2824   echo "$as_me:2824: \$? = $ac_status" >&5
2825   (exit $ac_status); } &&
2826          { ac_try='test -s conftest.$ac_objext'
2827   { (eval echo "$as_me:2827: \"$ac_try\"") >&5
2828   (eval $ac_try) 2>&5
2829   ac_status=$?
2830   echo "$as_me:2830: \$? = $ac_status" >&5
2831   (exit $ac_status); }; }; then
2832   cf_cxx_works=yes
2833 else
2834   echo "$as_me: failed program was:" >&5
2835 cat conftest.$ac_ext >&5
2836 cf_cxx_works=no
2837 fi
2838 rm -f conftest.$ac_objext conftest.$ac_ext
2839                 CPPFLAGS="$save_CPPFLAGS"
2840
2841                 echo "$as_me:2841: result: $cf_cxx_works" >&5
2842 echo "${ECHO_T}$cf_cxx_works" >&6
2843                 if test "x$cf_cxx_works" = xno
2844                 then
2845                         { echo "$as_me:2845: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2846 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2847                         cf_with_cxx=no; CXX=""; GXX="";
2848                 fi
2849         fi
2850         ac_ext=c
2851 ac_cpp='$CPP $CPPFLAGS'
2852 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2853 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2854 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2855 ac_main_return=return
2856
2857         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2858         if test "$CXX" = "g++" ; then
2859                 # Extract the first word of "g++", so it can be a program name with args.
2860 set dummy g++; ac_word=$2
2861 echo "$as_me:2861: checking for $ac_word" >&5
2862 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2863 if test "${ac_cv_path_CXX+set}" = set; then
2864   echo $ECHO_N "(cached) $ECHO_C" >&6
2865 else
2866   case $CXX in
2867   [\\/]* | ?:[\\/]*)
2868   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2869   ;;
2870   *)
2871   ac_save_IFS=$IFS; IFS=$ac_path_separator
2872 ac_dummy="$PATH"
2873 for ac_dir in $ac_dummy; do
2874   IFS=$ac_save_IFS
2875   test -z "$ac_dir" && ac_dir=.
2876   if $as_executable_p "$ac_dir/$ac_word"; then
2877    ac_cv_path_CXX="$ac_dir/$ac_word"
2878    echo "$as_me:2878: found $ac_dir/$ac_word" >&5
2879    break
2880 fi
2881 done
2882
2883   ;;
2884 esac
2885 fi
2886 CXX=$ac_cv_path_CXX
2887
2888 if test -n "$CXX"; then
2889   echo "$as_me:2889: result: $CXX" >&5
2890 echo "${ECHO_T}$CXX" >&6
2891 else
2892   echo "$as_me:2892: result: no" >&5
2893 echo "${ECHO_T}no" >&6
2894 fi
2895
2896         fi
2897         case "x$CXX" in #(vi
2898         x|xg++)
2899                 { echo "$as_me:2899: WARNING: You don't have any C++ compiler, too bad" >&5
2900 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2901                 cf_with_cxx=no; CXX=""; GXX="";
2902                 ;;
2903         esac
2904 fi
2905
2906 GXX_VERSION=none
2907 if test "$GXX" = yes; then
2908         echo "$as_me:2908: checking version of ${CXX:-g++}" >&5
2909 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2910         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2911         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2912         echo "$as_me:2912: result: $GXX_VERSION" >&5
2913 echo "${ECHO_T}$GXX_VERSION" >&6
2914 fi
2915
2916 case $GXX_VERSION in
2917 1*|2.[0-6]*)
2918         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2919         # cf_cxx_library=no
2920         { echo "$as_me:2920: WARNING: templates do not work" >&5
2921 echo "$as_me: WARNING: templates do not work" >&2;}
2922         ;;
2923 esac
2924
2925 echo "$as_me:2925: checking if you want to build C++ binding and demo" >&5
2926 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2927
2928 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2929 if test "${with_cxx_binding+set}" = set; then
2930   withval="$with_cxx_binding"
2931   cf_with_cxx_binding=$withval
2932 else
2933   cf_with_cxx_binding=$cf_with_cxx
2934 fi;
2935 echo "$as_me:2935: result: $cf_with_cxx_binding" >&5
2936 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2937
2938 echo "$as_me:2938: checking if you want to build with Ada95" >&5
2939 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2940 echo "$as_me:2940: result: $cf_with_ada" >&5
2941 echo "${ECHO_T}$cf_with_ada" >&6
2942
2943 echo "$as_me:2943: checking if you want to install terminal database" >&5
2944 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2945
2946 # Check whether --enable-db-install or --disable-db-install was given.
2947 if test "${enable_db_install+set}" = set; then
2948   enableval="$enable_db_install"
2949   cf_with_db_install=$enableval
2950 else
2951   cf_with_db_install=yes
2952 fi;
2953 echo "$as_me:2953: result: $cf_with_db_install" >&5
2954 echo "${ECHO_T}$cf_with_db_install" >&6
2955
2956 echo "$as_me:2956: checking if you want to install manpages" >&5
2957 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2958
2959 # Check whether --with-manpages or --without-manpages was given.
2960 if test "${with_manpages+set}" = set; then
2961   withval="$with_manpages"
2962   cf_with_manpages=$withval
2963 else
2964   cf_with_manpages=yes
2965 fi;
2966 echo "$as_me:2966: result: $cf_with_manpages" >&5
2967 echo "${ECHO_T}$cf_with_manpages" >&6
2968
2969 echo "$as_me:2969: checking if you want to build programs such as tic" >&5
2970 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2971
2972 # Check whether --with-progs or --without-progs was given.
2973 if test "${with_progs+set}" = set; then
2974   withval="$with_progs"
2975   cf_with_progs=$withval
2976 else
2977   cf_with_progs=yes
2978 fi;
2979 echo "$as_me:2979: result: $cf_with_progs" >&5
2980 echo "${ECHO_T}$cf_with_progs" >&6
2981
2982 echo "$as_me:2982: checking if you want to build test-programs" >&5
2983 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2984
2985 # Check whether --with-tests or --without-tests was given.
2986 if test "${with_tests+set}" = set; then
2987   withval="$with_tests"
2988   cf_with_tests=$withval
2989 else
2990   cf_with_tests=yes
2991 fi;
2992 echo "$as_me:2992: result: $cf_with_tests" >&5
2993 echo "${ECHO_T}$cf_with_tests" >&6
2994
2995 echo "$as_me:2995: checking if you wish to install curses.h" >&5
2996 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2997
2998 # Check whether --with-curses-h or --without-curses-h was given.
2999 if test "${with_curses_h+set}" = set; then
3000   withval="$with_curses_h"
3001   with_curses_h=$withval
3002 else
3003   with_curses_h=yes
3004 fi;
3005 echo "$as_me:3005: result: $with_curses_h" >&5
3006 echo "${ECHO_T}$with_curses_h" >&6
3007
3008 modules_to_build="ncurses"
3009 if test "X$cf_with_progs" != Xno ; then
3010 modules_to_build="$modules_to_build progs tack"
3011 fi
3012 modules_to_build="$modules_to_build panel menu form"
3013
3014 test "$program_prefix" != NONE &&
3015   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3016 # Use a double $ so make ignores it.
3017 test "$program_suffix" != NONE &&
3018   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3019 # Double any \ or $.  echo might interpret backslashes.
3020 # By default was `s,x,x', remove it if useless.
3021 cat <<\_ACEOF >conftest.sed
3022 s/[\\$]/&&/g;s/;s,x,x,$//
3023 _ACEOF
3024 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3025 rm conftest.sed
3026
3027 for ac_prog in mawk gawk nawk awk
3028 do
3029   # Extract the first word of "$ac_prog", so it can be a program name with args.
3030 set dummy $ac_prog; ac_word=$2
3031 echo "$as_me:3031: checking for $ac_word" >&5
3032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3033 if test "${ac_cv_prog_AWK+set}" = set; then
3034   echo $ECHO_N "(cached) $ECHO_C" >&6
3035 else
3036   if test -n "$AWK"; then
3037   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3038 else
3039   ac_save_IFS=$IFS; IFS=$ac_path_separator
3040 ac_dummy="$PATH"
3041 for ac_dir in $ac_dummy; do
3042   IFS=$ac_save_IFS
3043   test -z "$ac_dir" && ac_dir=.
3044   $as_executable_p "$ac_dir/$ac_word" || continue
3045 ac_cv_prog_AWK="$ac_prog"
3046 echo "$as_me:3046: found $ac_dir/$ac_word" >&5
3047 break
3048 done
3049
3050 fi
3051 fi
3052 AWK=$ac_cv_prog_AWK
3053 if test -n "$AWK"; then
3054   echo "$as_me:3054: result: $AWK" >&5
3055 echo "${ECHO_T}$AWK" >&6
3056 else
3057   echo "$as_me:3057: result: no" >&5
3058 echo "${ECHO_T}no" >&6
3059 fi
3060
3061   test -n "$AWK" && break
3062 done
3063
3064 test -z "$AWK" && { { echo "$as_me:3064: error: No awk program found" >&5
3065 echo "$as_me: error: No awk program found" >&2;}
3066    { (exit 1); exit 1; }; }
3067
3068 echo "$as_me:3068: checking for egrep" >&5
3069 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3070 if test "${ac_cv_prog_egrep+set}" = set; then
3071   echo $ECHO_N "(cached) $ECHO_C" >&6
3072 else
3073   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3074     then ac_cv_prog_egrep='grep -E'
3075     else ac_cv_prog_egrep='egrep'
3076     fi
3077 fi
3078 echo "$as_me:3078: result: $ac_cv_prog_egrep" >&5
3079 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3080  EGREP=$ac_cv_prog_egrep
3081
3082 test -z "$EGREP" && { { echo "$as_me:3082: error: No egrep program found" >&5
3083 echo "$as_me: error: No egrep program found" >&2;}
3084    { (exit 1); exit 1; }; }
3085
3086 # Find a good install program.  We prefer a C program (faster),
3087 # so one script is as good as another.  But avoid the broken or
3088 # incompatible versions:
3089 # SysV /etc/install, /usr/sbin/install
3090 # SunOS /usr/etc/install
3091 # IRIX /sbin/install
3092 # AIX /bin/install
3093 # AmigaOS /C/install, which installs bootblocks on floppy discs
3094 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3095 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3096 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3097 # ./install, which can be erroneously created by make from ./install.sh.
3098 echo "$as_me:3098: checking for a BSD compatible install" >&5
3099 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3100 if test -z "$INSTALL"; then
3101 if test "${ac_cv_path_install+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104     ac_save_IFS=$IFS; IFS=$ac_path_separator
3105   for ac_dir in $PATH; do
3106     IFS=$ac_save_IFS
3107     # Account for people who put trailing slashes in PATH elements.
3108     case $ac_dir/ in
3109     / | ./ | .// | /cC/* \
3110     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3111     | /usr/ucb/* ) ;;
3112     *)
3113       # OSF1 and SCO ODT 3.0 have their own names for install.
3114       # Don't use installbsd from OSF since it installs stuff as root
3115       # by default.
3116       for ac_prog in ginstall scoinst install; do
3117         if $as_executable_p "$ac_dir/$ac_prog"; then
3118           if test $ac_prog = install &&
3119             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3120             # AIX install.  It has an incompatible calling convention.
3121             :
3122           elif test $ac_prog = install &&
3123             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3124             # program-specific install script used by HP pwplus--don't use.
3125             :
3126           else
3127             ac_cv_path_install="$ac_dir/$ac_prog -c"
3128             break 2
3129           fi
3130         fi
3131       done
3132       ;;
3133     esac
3134   done
3135
3136 fi
3137   if test "${ac_cv_path_install+set}" = set; then
3138     INSTALL=$ac_cv_path_install
3139   else
3140     # As a last resort, use the slow shell script.  We don't cache a
3141     # path for INSTALL within a source directory, because that will
3142     # break other packages using the cache if that directory is
3143     # removed, or if the path is relative.
3144     INSTALL=$ac_install_sh
3145   fi
3146 fi
3147 echo "$as_me:3147: result: $INSTALL" >&5
3148 echo "${ECHO_T}$INSTALL" >&6
3149
3150 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3151 # It thinks the first close brace ends the variable substitution.
3152 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3153
3154 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3155
3156 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3157
3158 case $INSTALL in
3159 /*)
3160   ;;
3161 *)
3162   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3163   test -z "$cf_dir" && cf_dir=.
3164   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3165   ;;
3166 esac
3167
3168 for ac_prog in tdlint lint alint splint lclint
3169 do
3170   # Extract the first word of "$ac_prog", so it can be a program name with args.
3171 set dummy $ac_prog; ac_word=$2
3172 echo "$as_me:3172: checking for $ac_word" >&5
3173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3174 if test "${ac_cv_prog_LINT+set}" = set; then
3175   echo $ECHO_N "(cached) $ECHO_C" >&6
3176 else
3177   if test -n "$LINT"; then
3178   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3179 else
3180   ac_save_IFS=$IFS; IFS=$ac_path_separator
3181 ac_dummy="$PATH"
3182 for ac_dir in $ac_dummy; do
3183   IFS=$ac_save_IFS
3184   test -z "$ac_dir" && ac_dir=.
3185   $as_executable_p "$ac_dir/$ac_word" || continue
3186 ac_cv_prog_LINT="$ac_prog"
3187 echo "$as_me:3187: found $ac_dir/$ac_word" >&5
3188 break
3189 done
3190
3191 fi
3192 fi
3193 LINT=$ac_cv_prog_LINT
3194 if test -n "$LINT"; then
3195   echo "$as_me:3195: result: $LINT" >&5
3196 echo "${ECHO_T}$LINT" >&6
3197 else
3198   echo "$as_me:3198: result: no" >&5
3199 echo "${ECHO_T}no" >&6
3200 fi
3201
3202   test -n "$LINT" && break
3203 done
3204
3205 echo "$as_me:3205: checking whether ln -s works" >&5
3206 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3207 LN_S=$as_ln_s
3208 if test "$LN_S" = "ln -s"; then
3209   echo "$as_me:3209: result: yes" >&5
3210 echo "${ECHO_T}yes" >&6
3211 else
3212   echo "$as_me:3212: result: no, using $LN_S" >&5
3213 echo "${ECHO_T}no, using $LN_S" >&6
3214 fi
3215
3216 echo "$as_me:3216: checking if $LN_S -f options work" >&5
3217 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3218
3219 rm -f conf$$.src conf$$dst
3220 echo >conf$$.dst
3221 echo first >conf$$.src
3222 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3223         cf_prog_ln_sf=yes
3224 else
3225         cf_prog_ln_sf=no
3226 fi
3227 rm -f conf$$.dst conf$$src
3228 echo "$as_me:3228: result: $cf_prog_ln_sf" >&5
3229 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3230
3231 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3232
3233 echo "$as_me:3233: checking for long file names" >&5
3234 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3235 if test "${ac_cv_sys_long_file_names+set}" = set; then
3236   echo $ECHO_N "(cached) $ECHO_C" >&6
3237 else
3238   ac_cv_sys_long_file_names=yes
3239 # Test for long file names in all the places we know might matter:
3240 #      .                the current directory, where building will happen
3241 #      $prefix/lib      where we will be installing things
3242 #      $exec_prefix/lib likewise
3243 # eval it to expand exec_prefix.
3244 #      $TMPDIR          if set, where it might want to write temporary files
3245 # if $TMPDIR is not set:
3246 #      /tmp             where it might want to write temporary files
3247 #      /var/tmp         likewise
3248 #      /usr/tmp         likewise
3249 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3250   ac_tmpdirs=$TMPDIR
3251 else
3252   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3253 fi
3254 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3255   test -d $ac_dir || continue
3256   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3257   ac_xdir=$ac_dir/cf$$
3258   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3259   ac_tf1=$ac_xdir/conftest9012345
3260   ac_tf2=$ac_xdir/conftest9012346
3261   (echo 1 >$ac_tf1) 2>/dev/null
3262   (echo 2 >$ac_tf2) 2>/dev/null
3263   ac_val=`cat $ac_tf1 2>/dev/null`
3264   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3265     ac_cv_sys_long_file_names=no
3266     rm -rf $ac_xdir 2>/dev/null
3267     break
3268   fi
3269   rm -rf $ac_xdir 2>/dev/null
3270 done
3271 fi
3272 echo "$as_me:3272: result: $ac_cv_sys_long_file_names" >&5
3273 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3274 if test $ac_cv_sys_long_file_names = yes; then
3275
3276 cat >>confdefs.h <<\EOF
3277 #define HAVE_LONG_FILE_NAMES 1
3278 EOF
3279
3280 fi
3281
3282 # if we find pkg-config, check if we should install the ".pc" files.
3283
3284 echo "$as_me:3284: checking if you want to use pkg-config" >&5
3285 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3286
3287 # Check whether --with-pkg-config or --without-pkg-config was given.
3288 if test "${with_pkg_config+set}" = set; then
3289   withval="$with_pkg_config"
3290   cf_pkg_config=$withval
3291 else
3292   cf_pkg_config=yes
3293 fi;
3294 echo "$as_me:3294: result: $cf_pkg_config" >&5
3295 echo "${ECHO_T}$cf_pkg_config" >&6
3296
3297 case $cf_pkg_config in #(vi
3298 no) #(vi
3299         PKG_CONFIG=none
3300         ;;
3301 yes) #(vi
3302
3303 if test -n "$ac_tool_prefix"; then
3304   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3305 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3306 echo "$as_me:3306: checking for $ac_word" >&5
3307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3308 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3309   echo $ECHO_N "(cached) $ECHO_C" >&6
3310 else
3311   case $PKG_CONFIG in
3312   [\\/]* | ?:[\\/]*)
3313   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3314   ;;
3315   *)
3316   ac_save_IFS=$IFS; IFS=$ac_path_separator
3317 ac_dummy="$PATH"
3318 for ac_dir in $ac_dummy; do
3319   IFS=$ac_save_IFS
3320   test -z "$ac_dir" && ac_dir=.
3321   if $as_executable_p "$ac_dir/$ac_word"; then
3322    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3323    echo "$as_me:3323: found $ac_dir/$ac_word" >&5
3324    break
3325 fi
3326 done
3327
3328   ;;
3329 esac
3330 fi
3331 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3332
3333 if test -n "$PKG_CONFIG"; then
3334   echo "$as_me:3334: result: $PKG_CONFIG" >&5
3335 echo "${ECHO_T}$PKG_CONFIG" >&6
3336 else
3337   echo "$as_me:3337: result: no" >&5
3338 echo "${ECHO_T}no" >&6
3339 fi
3340
3341 fi
3342 if test -z "$ac_cv_path_PKG_CONFIG"; then
3343   ac_pt_PKG_CONFIG=$PKG_CONFIG
3344   # Extract the first word of "pkg-config", so it can be a program name with args.
3345 set dummy pkg-config; ac_word=$2
3346 echo "$as_me:3346: checking for $ac_word" >&5
3347 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3349   echo $ECHO_N "(cached) $ECHO_C" >&6
3350 else
3351   case $ac_pt_PKG_CONFIG in
3352   [\\/]* | ?:[\\/]*)
3353   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3354   ;;
3355   *)
3356   ac_save_IFS=$IFS; IFS=$ac_path_separator
3357 ac_dummy="$PATH"
3358 for ac_dir in $ac_dummy; do
3359   IFS=$ac_save_IFS
3360   test -z "$ac_dir" && ac_dir=.
3361   if $as_executable_p "$ac_dir/$ac_word"; then
3362    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3363    echo "$as_me:3363: found $ac_dir/$ac_word" >&5
3364    break
3365 fi
3366 done
3367
3368   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3369   ;;
3370 esac
3371 fi
3372 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3373
3374 if test -n "$ac_pt_PKG_CONFIG"; then
3375   echo "$as_me:3375: result: $ac_pt_PKG_CONFIG" >&5
3376 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3377 else
3378   echo "$as_me:3378: result: no" >&5
3379 echo "${ECHO_T}no" >&6
3380 fi
3381
3382   PKG_CONFIG=$ac_pt_PKG_CONFIG
3383 else
3384   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3385 fi
3386
3387         ;;
3388 *)
3389         PKG_CONFIG=$withval
3390         ;;
3391 esac
3392
3393 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3394 if test "$PKG_CONFIG" != none ; then
3395
3396 if test "x$prefix" != xNONE; then
3397   cf_path_syntax="$prefix"
3398 else
3399   cf_path_syntax="$ac_default_prefix"
3400 fi
3401
3402 case ".$PKG_CONFIG" in #(vi
3403 .\$\(*\)*|.\'*\'*) #(vi
3404   ;;
3405 ..|./*|.\\*) #(vi
3406   ;;
3407 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3408   ;;
3409 .\${*prefix}*|.\${*dir}*) #(vi
3410   eval PKG_CONFIG="$PKG_CONFIG"
3411   case ".$PKG_CONFIG" in #(vi
3412   .NONE/*)
3413     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3414     ;;
3415   esac
3416   ;; #(vi
3417 .no|.NONE/*)
3418   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3419   ;;
3420 *)
3421   { { echo "$as_me:3421: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3422 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3423    { (exit 1); exit 1; }; }
3424   ;;
3425 esac
3426
3427 fi
3428
3429 if test "$PKG_CONFIG" != none ; then
3430         echo "$as_me:3430: checking for $PKG_CONFIG library directory" >&5
3431 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3432
3433 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3434 if test "${with_pkg_config_libdir+set}" = set; then
3435   withval="$with_pkg_config_libdir"
3436   PKG_CONFIG_LIBDIR=$withval
3437 else
3438   PKG_CONFIG_LIBDIR=yes
3439 fi;
3440
3441         case x$PKG_CONFIG_LIBDIR in #(vi
3442         x/*) #(vi
3443                 ;;
3444         xyes) #(vi
3445                 # look for the library directory using the same prefix as the executable
3446                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3447                 case x`(arch) 2>/dev/null` in #(vi
3448                 *64) #(vi
3449                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3450                         do
3451                                 if test -d $cf_config/pkgconfig
3452                                 then
3453                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3454                                         break
3455                                 fi
3456                         done
3457                         ;;
3458                 *)
3459                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3460                         ;;
3461                 esac
3462                 ;;
3463         *)
3464                 ;;
3465         esac
3466
3467         echo "$as_me:3467: result: $PKG_CONFIG_LIBDIR" >&5
3468 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3469 fi
3470
3471 if test "$PKG_CONFIG" != none ; then
3472         echo "$as_me:3472: checking if we should install .pc files for $PKG_CONFIG" >&5
3473 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3474
3475 # Check whether --enable-pc-files or --disable-pc-files was given.
3476 if test "${enable_pc_files+set}" = set; then
3477   enableval="$enable_pc_files"
3478   enable_pc_files=$enableval
3479 else
3480   enable_pc_files=no
3481 fi;
3482         echo "$as_me:3482: result: $enable_pc_files" >&5
3483 echo "${ECHO_T}$enable_pc_files" >&6
3484         if test "$enable_pc_files" != no
3485         then
3486
3487 if test "x$prefix" != xNONE; then
3488   cf_path_syntax="$prefix"
3489 else
3490   cf_path_syntax="$ac_default_prefix"
3491 fi
3492
3493 case ".$PKG_CONFIG_LIBDIR" in #(vi
3494 .\$\(*\)*|.\'*\'*) #(vi
3495   ;;
3496 ..|./*|.\\*) #(vi
3497   ;;
3498 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3499   ;;
3500 .\${*prefix}*|.\${*dir}*) #(vi
3501   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3502   case ".$PKG_CONFIG_LIBDIR" in #(vi
3503   .NONE/*)
3504     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3505     ;;
3506   esac
3507   ;; #(vi
3508 .no|.NONE/*)
3509   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3510   ;;
3511 *)
3512   { { echo "$as_me:3512: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3513 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3514    { (exit 1); exit 1; }; }
3515   ;;
3516 esac
3517
3518         fi
3519 else
3520         enable_pc_files=no
3521 fi
3522
3523 echo "$as_me:3523: checking if we should assume mixed-case filenames" >&5
3524 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3525
3526 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3527 if test "${enable_mixed_case+set}" = set; then
3528   enableval="$enable_mixed_case"
3529   enable_mixedcase=$enableval
3530 else
3531   enable_mixedcase=auto
3532 fi;
3533 echo "$as_me:3533: result: $enable_mixedcase" >&5
3534 echo "${ECHO_T}$enable_mixedcase" >&6
3535 if test "$enable_mixedcase" = "auto" ; then
3536
3537 echo "$as_me:3537: checking if filesystem supports mixed-case filenames" >&5
3538 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3539 if test "${cf_cv_mixedcase+set}" = set; then
3540   echo $ECHO_N "(cached) $ECHO_C" >&6
3541 else
3542
3543 if test "$cross_compiling" = yes ; then
3544         case $target_alias in #(vi
3545         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3546                 cf_cv_mixedcase=no
3547                 ;;
3548         *)
3549                 cf_cv_mixedcase=yes
3550                 ;;
3551         esac
3552 else
3553         rm -f conftest CONFTEST
3554         echo test >conftest
3555         if test -f CONFTEST ; then
3556                 cf_cv_mixedcase=no
3557         else
3558                 cf_cv_mixedcase=yes
3559         fi
3560         rm -f conftest CONFTEST
3561 fi
3562
3563 fi
3564 echo "$as_me:3564: result: $cf_cv_mixedcase" >&5
3565 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3566 test "$cf_cv_mixedcase" = yes &&
3567 cat >>confdefs.h <<\EOF
3568 #define MIXEDCASE_FILENAMES 1
3569 EOF
3570
3571 else
3572     cf_cv_mixedcase=$enable_mixedcase
3573     if test "x$enable_mixedcase" = "xyes" ; then
3574
3575 cat >>confdefs.h <<\EOF
3576 #define MIXEDCASE_FILENAMES 1
3577 EOF
3578
3579     fi
3580 fi
3581
3582 # do this after mixed-case option (tags/TAGS is not as important as tic).
3583 echo "$as_me:3583: checking whether ${MAKE-make} sets \${MAKE}" >&5
3584 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3585 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3586 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3587   echo $ECHO_N "(cached) $ECHO_C" >&6
3588 else
3589   cat >conftest.make <<\EOF
3590 all:
3591         @echo 'ac_maketemp="${MAKE}"'
3592 EOF
3593 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3594 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3595 if test -n "$ac_maketemp"; then
3596   eval ac_cv_prog_make_${ac_make}_set=yes
3597 else
3598   eval ac_cv_prog_make_${ac_make}_set=no
3599 fi
3600 rm -f conftest.make
3601 fi
3602 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3603   echo "$as_me:3603: result: yes" >&5
3604 echo "${ECHO_T}yes" >&6
3605   SET_MAKE=
3606 else
3607   echo "$as_me:3607: result: no" >&5
3608 echo "${ECHO_T}no" >&6
3609   SET_MAKE="MAKE=${MAKE-make}"
3610 fi
3611
3612 for ac_prog in exctags ctags
3613 do
3614   # Extract the first word of "$ac_prog", so it can be a program name with args.
3615 set dummy $ac_prog; ac_word=$2
3616 echo "$as_me:3616: checking for $ac_word" >&5
3617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3618 if test "${ac_cv_prog_CTAGS+set}" = set; then
3619   echo $ECHO_N "(cached) $ECHO_C" >&6
3620 else
3621   if test -n "$CTAGS"; then
3622   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3623 else
3624   ac_save_IFS=$IFS; IFS=$ac_path_separator
3625 ac_dummy="$PATH"
3626 for ac_dir in $ac_dummy; do
3627   IFS=$ac_save_IFS
3628   test -z "$ac_dir" && ac_dir=.
3629   $as_executable_p "$ac_dir/$ac_word" || continue
3630 ac_cv_prog_CTAGS="$ac_prog"
3631 echo "$as_me:3631: found $ac_dir/$ac_word" >&5
3632 break
3633 done
3634
3635 fi
3636 fi
3637 CTAGS=$ac_cv_prog_CTAGS
3638 if test -n "$CTAGS"; then
3639   echo "$as_me:3639: result: $CTAGS" >&5
3640 echo "${ECHO_T}$CTAGS" >&6
3641 else
3642   echo "$as_me:3642: result: no" >&5
3643 echo "${ECHO_T}no" >&6
3644 fi
3645
3646   test -n "$CTAGS" && break
3647 done
3648
3649 for ac_prog in exetags etags
3650 do
3651   # Extract the first word of "$ac_prog", so it can be a program name with args.
3652 set dummy $ac_prog; ac_word=$2
3653 echo "$as_me:3653: checking for $ac_word" >&5
3654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3655 if test "${ac_cv_prog_ETAGS+set}" = set; then
3656   echo $ECHO_N "(cached) $ECHO_C" >&6
3657 else
3658   if test -n "$ETAGS"; then
3659   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3660 else
3661   ac_save_IFS=$IFS; IFS=$ac_path_separator
3662 ac_dummy="$PATH"
3663 for ac_dir in $ac_dummy; do
3664   IFS=$ac_save_IFS
3665   test -z "$ac_dir" && ac_dir=.
3666   $as_executable_p "$ac_dir/$ac_word" || continue
3667 ac_cv_prog_ETAGS="$ac_prog"
3668 echo "$as_me:3668: found $ac_dir/$ac_word" >&5
3669 break
3670 done
3671
3672 fi
3673 fi
3674 ETAGS=$ac_cv_prog_ETAGS
3675 if test -n "$ETAGS"; then
3676   echo "$as_me:3676: result: $ETAGS" >&5
3677 echo "${ECHO_T}$ETAGS" >&6
3678 else
3679   echo "$as_me:3679: result: no" >&5
3680 echo "${ECHO_T}no" >&6
3681 fi
3682
3683   test -n "$ETAGS" && break
3684 done
3685
3686 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3687 set dummy ${CTAGS:-ctags}; ac_word=$2
3688 echo "$as_me:3688: checking for $ac_word" >&5
3689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3690 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3691   echo $ECHO_N "(cached) $ECHO_C" >&6
3692 else
3693   if test -n "$MAKE_LOWER_TAGS"; then
3694   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3695 else
3696   ac_save_IFS=$IFS; IFS=$ac_path_separator
3697 ac_dummy="$PATH"
3698 for ac_dir in $ac_dummy; do
3699   IFS=$ac_save_IFS
3700   test -z "$ac_dir" && ac_dir=.
3701   $as_executable_p "$ac_dir/$ac_word" || continue
3702 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3703 echo "$as_me:3703: found $ac_dir/$ac_word" >&5
3704 break
3705 done
3706
3707   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3708 fi
3709 fi
3710 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3711 if test -n "$MAKE_LOWER_TAGS"; then
3712   echo "$as_me:3712: result: $MAKE_LOWER_TAGS" >&5
3713 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3714 else
3715   echo "$as_me:3715: result: no" >&5
3716 echo "${ECHO_T}no" >&6
3717 fi
3718
3719 if test "$cf_cv_mixedcase" = yes ; then
3720         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3721 set dummy ${ETAGS:-etags}; ac_word=$2
3722 echo "$as_me:3722: checking for $ac_word" >&5
3723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3724 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3725   echo $ECHO_N "(cached) $ECHO_C" >&6
3726 else
3727   if test -n "$MAKE_UPPER_TAGS"; then
3728   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3729 else
3730   ac_save_IFS=$IFS; IFS=$ac_path_separator
3731 ac_dummy="$PATH"
3732 for ac_dir in $ac_dummy; do
3733   IFS=$ac_save_IFS
3734   test -z "$ac_dir" && ac_dir=.
3735   $as_executable_p "$ac_dir/$ac_word" || continue
3736 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3737 echo "$as_me:3737: found $ac_dir/$ac_word" >&5
3738 break
3739 done
3740
3741   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3742 fi
3743 fi
3744 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3745 if test -n "$MAKE_UPPER_TAGS"; then
3746   echo "$as_me:3746: result: $MAKE_UPPER_TAGS" >&5
3747 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3748 else
3749   echo "$as_me:3749: result: no" >&5
3750 echo "${ECHO_T}no" >&6
3751 fi
3752
3753 else
3754         MAKE_UPPER_TAGS=no
3755 fi
3756
3757 if test "$MAKE_UPPER_TAGS" = yes ; then
3758         MAKE_UPPER_TAGS=
3759 else
3760         MAKE_UPPER_TAGS="#"
3761 fi
3762
3763 if test "$MAKE_LOWER_TAGS" = yes ; then
3764         MAKE_LOWER_TAGS=
3765 else
3766         MAKE_LOWER_TAGS="#"
3767 fi
3768
3769 echo "$as_me:3769: checking for makeflags variable" >&5
3770 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3771 if test "${cf_cv_makeflags+set}" = set; then
3772   echo $ECHO_N "(cached) $ECHO_C" >&6
3773 else
3774
3775         cf_cv_makeflags=''
3776         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3777         do
3778                 cat >cf_makeflags.tmp <<CF_EOF
3779 SHELL = /bin/sh
3780 all :
3781         @ echo '.$cf_option'
3782 CF_EOF
3783                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3784                 case "$cf_result" in
3785                 .*k|.*kw)
3786                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3787                         case "$cf_result" in
3788                         .*CC=*) cf_cv_makeflags=
3789                                 ;;
3790                         *)      cf_cv_makeflags=$cf_option
3791                                 ;;
3792                         esac
3793                         break
3794                         ;;
3795                 .-)     ;;
3796                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3797                         ;;
3798                 esac
3799         done
3800         rm -f cf_makeflags.tmp
3801
3802 fi
3803 echo "$as_me:3803: result: $cf_cv_makeflags" >&5
3804 echo "${ECHO_T}$cf_cv_makeflags" >&6
3805
3806 if test -n "$ac_tool_prefix"; then
3807   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3808 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3809 echo "$as_me:3809: checking for $ac_word" >&5
3810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3811 if test "${ac_cv_prog_RANLIB+set}" = set; then
3812   echo $ECHO_N "(cached) $ECHO_C" >&6
3813 else
3814   if test -n "$RANLIB"; then
3815   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3816 else
3817   ac_save_IFS=$IFS; IFS=$ac_path_separator
3818 ac_dummy="$PATH"
3819 for ac_dir in $ac_dummy; do
3820   IFS=$ac_save_IFS
3821   test -z "$ac_dir" && ac_dir=.
3822   $as_executable_p "$ac_dir/$ac_word" || continue
3823 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3824 echo "$as_me:3824: found $ac_dir/$ac_word" >&5
3825 break
3826 done
3827
3828 fi
3829 fi
3830 RANLIB=$ac_cv_prog_RANLIB
3831 if test -n "$RANLIB"; then
3832   echo "$as_me:3832: result: $RANLIB" >&5
3833 echo "${ECHO_T}$RANLIB" >&6
3834 else
3835   echo "$as_me:3835: result: no" >&5
3836 echo "${ECHO_T}no" >&6
3837 fi
3838
3839 fi
3840 if test -z "$ac_cv_prog_RANLIB"; then
3841   ac_ct_RANLIB=$RANLIB
3842   # Extract the first word of "ranlib", so it can be a program name with args.
3843 set dummy ranlib; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3847   echo $ECHO_N "(cached) $ECHO_C" >&6
3848 else
3849   if test -n "$ac_ct_RANLIB"; then
3850   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3851 else
3852   ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 ac_dummy="$PATH"
3854 for ac_dir in $ac_dummy; do
3855   IFS=$ac_save_IFS
3856   test -z "$ac_dir" && ac_dir=.
3857   $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_ac_ct_RANLIB="ranlib"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3860 break
3861 done
3862
3863   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3864 fi
3865 fi
3866 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3867 if test -n "$ac_ct_RANLIB"; then
3868   echo "$as_me:3868: result: $ac_ct_RANLIB" >&5
3869 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3870 else
3871   echo "$as_me:3871: result: no" >&5
3872 echo "${ECHO_T}no" >&6
3873 fi
3874
3875   RANLIB=$ac_ct_RANLIB
3876 else
3877   RANLIB="$ac_cv_prog_RANLIB"
3878 fi
3879
3880 if test -n "$ac_tool_prefix"; then
3881   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3882 set dummy ${ac_tool_prefix}ld; ac_word=$2
3883 echo "$as_me:3883: checking for $ac_word" >&5
3884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3885 if test "${ac_cv_prog_LD+set}" = set; then
3886   echo $ECHO_N "(cached) $ECHO_C" >&6
3887 else
3888   if test -n "$LD"; then
3889   ac_cv_prog_LD="$LD" # Let the user override the test.
3890 else
3891   ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 ac_dummy="$PATH"
3893 for ac_dir in $ac_dummy; do
3894   IFS=$ac_save_IFS
3895   test -z "$ac_dir" && ac_dir=.
3896   $as_executable_p "$ac_dir/$ac_word" || continue
3897 ac_cv_prog_LD="${ac_tool_prefix}ld"
3898 echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899 break
3900 done
3901
3902 fi
3903 fi
3904 LD=$ac_cv_prog_LD
3905 if test -n "$LD"; then
3906   echo "$as_me:3906: result: $LD" >&5
3907 echo "${ECHO_T}$LD" >&6
3908 else
3909   echo "$as_me:3909: result: no" >&5
3910 echo "${ECHO_T}no" >&6
3911 fi
3912
3913 fi
3914 if test -z "$ac_cv_prog_LD"; then
3915   ac_ct_LD=$LD
3916   # Extract the first word of "ld", so it can be a program name with args.
3917 set dummy ld; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ac_ct_LD"; then
3924   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ac_ct_LD="ld"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3938 fi
3939 fi
3940 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3941 if test -n "$ac_ct_LD"; then
3942   echo "$as_me:3942: result: $ac_ct_LD" >&5
3943 echo "${ECHO_T}$ac_ct_LD" >&6
3944 else
3945   echo "$as_me:3945: result: no" >&5
3946 echo "${ECHO_T}no" >&6
3947 fi
3948
3949   LD=$ac_ct_LD
3950 else
3951   LD="$ac_cv_prog_LD"
3952 fi
3953
3954 if test -n "$ac_tool_prefix"; then
3955   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3956 set dummy ${ac_tool_prefix}ar; ac_word=$2
3957 echo "$as_me:3957: checking for $ac_word" >&5
3958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3959 if test "${ac_cv_prog_AR+set}" = set; then
3960   echo $ECHO_N "(cached) $ECHO_C" >&6
3961 else
3962   if test -n "$AR"; then
3963   ac_cv_prog_AR="$AR" # Let the user override the test.
3964 else
3965   ac_save_IFS=$IFS; IFS=$ac_path_separator
3966 ac_dummy="$PATH"
3967 for ac_dir in $ac_dummy; do
3968   IFS=$ac_save_IFS
3969   test -z "$ac_dir" && ac_dir=.
3970   $as_executable_p "$ac_dir/$ac_word" || continue
3971 ac_cv_prog_AR="${ac_tool_prefix}ar"
3972 echo "$as_me:3972: found $ac_dir/$ac_word" >&5
3973 break
3974 done
3975
3976 fi
3977 fi
3978 AR=$ac_cv_prog_AR
3979 if test -n "$AR"; then
3980   echo "$as_me:3980: result: $AR" >&5
3981 echo "${ECHO_T}$AR" >&6
3982 else
3983   echo "$as_me:3983: result: no" >&5
3984 echo "${ECHO_T}no" >&6
3985 fi
3986
3987 fi
3988 if test -z "$ac_cv_prog_AR"; then
3989   ac_ct_AR=$AR
3990   # Extract the first word of "ar", so it can be a program name with args.
3991 set dummy ar; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3995   echo $ECHO_N "(cached) $ECHO_C" >&6
3996 else
3997   if test -n "$ac_ct_AR"; then
3998   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3999 else
4000   ac_save_IFS=$IFS; IFS=$ac_path_separator
4001 ac_dummy="$PATH"
4002 for ac_dir in $ac_dummy; do
4003   IFS=$ac_save_IFS
4004   test -z "$ac_dir" && ac_dir=.
4005   $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_ac_ct_AR="ar"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4008 break
4009 done
4010
4011   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4012 fi
4013 fi
4014 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4015 if test -n "$ac_ct_AR"; then
4016   echo "$as_me:4016: result: $ac_ct_AR" >&5
4017 echo "${ECHO_T}$ac_ct_AR" >&6
4018 else
4019   echo "$as_me:4019: result: no" >&5
4020 echo "${ECHO_T}no" >&6
4021 fi
4022
4023   AR=$ac_ct_AR
4024 else
4025   AR="$ac_cv_prog_AR"
4026 fi
4027
4028 if test -n "$ac_tool_prefix"; then
4029   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}nm; ac_word=$2
4031 echo "$as_me:4031: checking for $ac_word" >&5
4032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033 if test "${ac_cv_prog_NM+set}" = set; then
4034   echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036   if test -n "$NM"; then
4037   ac_cv_prog_NM="$NM" # Let the user override the test.
4038 else
4039   ac_save_IFS=$IFS; IFS=$ac_path_separator
4040 ac_dummy="$PATH"
4041 for ac_dir in $ac_dummy; do
4042   IFS=$ac_save_IFS
4043   test -z "$ac_dir" && ac_dir=.
4044   $as_executable_p "$ac_dir/$ac_word" || continue
4045 ac_cv_prog_NM="${ac_tool_prefix}nm"
4046 echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047 break
4048 done
4049
4050 fi
4051 fi
4052 NM=$ac_cv_prog_NM
4053 if test -n "$NM"; then
4054   echo "$as_me:4054: result: $NM" >&5
4055 echo "${ECHO_T}$NM" >&6
4056 else
4057   echo "$as_me:4057: result: no" >&5
4058 echo "${ECHO_T}no" >&6
4059 fi
4060
4061 fi
4062 if test -z "$ac_cv_prog_NM"; then
4063   ac_ct_NM=$NM
4064   # Extract the first word of "nm", so it can be a program name with args.
4065 set dummy nm; ac_word=$2
4066 echo "$as_me:4066: checking for $ac_word" >&5
4067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4069   echo $ECHO_N "(cached) $ECHO_C" >&6
4070 else
4071   if test -n "$ac_ct_NM"; then
4072   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4073 else
4074   ac_save_IFS=$IFS; IFS=$ac_path_separator
4075 ac_dummy="$PATH"
4076 for ac_dir in $ac_dummy; do
4077   IFS=$ac_save_IFS
4078   test -z "$ac_dir" && ac_dir=.
4079   $as_executable_p "$ac_dir/$ac_word" || continue
4080 ac_cv_prog_ac_ct_NM="nm"
4081 echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082 break
4083 done
4084
4085   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4086 fi
4087 fi
4088 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4089 if test -n "$ac_ct_NM"; then
4090   echo "$as_me:4090: result: $ac_ct_NM" >&5
4091 echo "${ECHO_T}$ac_ct_NM" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   NM=$ac_ct_NM
4098 else
4099   NM="$ac_cv_prog_NM"
4100 fi
4101
4102 if test -n "$ac_tool_prefix"; then
4103   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4104 set dummy ${ac_tool_prefix}ar; ac_word=$2
4105 echo "$as_me:4105: checking for $ac_word" >&5
4106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4107 if test "${ac_cv_prog_AR+set}" = set; then
4108   echo $ECHO_N "(cached) $ECHO_C" >&6
4109 else
4110   if test -n "$AR"; then
4111   ac_cv_prog_AR="$AR" # Let the user override the test.
4112 else
4113   ac_save_IFS=$IFS; IFS=$ac_path_separator
4114 ac_dummy="$PATH"
4115 for ac_dir in $ac_dummy; do
4116   IFS=$ac_save_IFS
4117   test -z "$ac_dir" && ac_dir=.
4118   $as_executable_p "$ac_dir/$ac_word" || continue
4119 ac_cv_prog_AR="${ac_tool_prefix}ar"
4120 echo "$as_me:4120: found $ac_dir/$ac_word" >&5
4121 break
4122 done
4123
4124 fi
4125 fi
4126 AR=$ac_cv_prog_AR
4127 if test -n "$AR"; then
4128   echo "$as_me:4128: result: $AR" >&5
4129 echo "${ECHO_T}$AR" >&6
4130 else
4131   echo "$as_me:4131: result: no" >&5
4132 echo "${ECHO_T}no" >&6
4133 fi
4134
4135 fi
4136 if test -z "$ac_cv_prog_AR"; then
4137   ac_ct_AR=$AR
4138   # Extract the first word of "ar", so it can be a program name with args.
4139 set dummy ar; ac_word=$2
4140 echo "$as_me:4140: checking for $ac_word" >&5
4141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4142 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4143   echo $ECHO_N "(cached) $ECHO_C" >&6
4144 else
4145   if test -n "$ac_ct_AR"; then
4146   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4147 else
4148   ac_save_IFS=$IFS; IFS=$ac_path_separator
4149 ac_dummy="$PATH"
4150 for ac_dir in $ac_dummy; do
4151   IFS=$ac_save_IFS
4152   test -z "$ac_dir" && ac_dir=.
4153   $as_executable_p "$ac_dir/$ac_word" || continue
4154 ac_cv_prog_ac_ct_AR="ar"
4155 echo "$as_me:4155: found $ac_dir/$ac_word" >&5
4156 break
4157 done
4158
4159   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4160 fi
4161 fi
4162 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4163 if test -n "$ac_ct_AR"; then
4164   echo "$as_me:4164: result: $ac_ct_AR" >&5
4165 echo "${ECHO_T}$ac_ct_AR" >&6
4166 else
4167   echo "$as_me:4167: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4169 fi
4170
4171   AR=$ac_ct_AR
4172 else
4173   AR="$ac_cv_prog_AR"
4174 fi
4175
4176 echo "$as_me:4176: checking for options to update archives" >&5
4177 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4178 if test "${cf_cv_ar_flags+set}" = set; then
4179   echo $ECHO_N "(cached) $ECHO_C" >&6
4180 else
4181
4182         cf_cv_ar_flags=unknown
4183         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4184         do
4185
4186                 # check if $ARFLAGS already contains this choice
4187                 if test "x$ARFLAGS" != "x" ; then
4188                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4189                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4190                                 cf_cv_ar_flags=
4191                                 break
4192                         fi
4193                 fi
4194
4195                 rm -f conftest.$ac_cv_objext
4196                 rm -f conftest.a
4197
4198                 cat >conftest.$ac_ext <<EOF
4199 #line 4199 "configure"
4200 int     testdata[3] = { 123, 456, 789 };
4201 EOF
4202                 if { (eval echo "$as_me:4202: \"$ac_compile\"") >&5
4203   (eval $ac_compile) 2>&5
4204   ac_status=$?
4205   echo "$as_me:4205: \$? = $ac_status" >&5
4206   (exit $ac_status); } ; then
4207                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4208                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4209                         if test -f conftest.a ; then
4210                                 cf_cv_ar_flags=$cf_ar_flags
4211                                 break
4212                         fi
4213                 else
4214                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4215
4216 echo "${as_me:-configure}:4216: testing cannot compile test-program ..." 1>&5
4217
4218                         break
4219                 fi
4220         done
4221         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4222
4223 fi
4224 echo "$as_me:4224: result: $cf_cv_ar_flags" >&5
4225 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4226
4227 if test -n "$ARFLAGS" ; then
4228         if test -n "$cf_cv_ar_flags" ; then
4229                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4230         fi
4231 else
4232         ARFLAGS=$cf_cv_ar_flags
4233 fi
4234
4235 echo "$as_me:4235: checking if you have specified an install-prefix" >&5
4236 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4237
4238 # Check whether --with-install-prefix or --without-install-prefix was given.
4239 if test "${with_install_prefix+set}" = set; then
4240   withval="$with_install_prefix"
4241   case "x$withval" in #(vi
4242         xyes|xno) #(vi
4243                 ;;
4244         *)      DESTDIR="$withval"
4245                 ;;
4246         esac
4247 fi;
4248 echo "$as_me:4248: result: $DESTDIR" >&5
4249 echo "${ECHO_T}$DESTDIR" >&6
4250
4251 ###############################################################################
4252
4253 # If we're cross-compiling, allow the user to override the tools and their
4254 # options.  The configure script is oriented toward identifying the host
4255 # compiler, etc., but we need a build compiler to generate parts of the source.
4256
4257 if test "$cross_compiling" = yes ; then
4258
4259         # defaults that we might want to override
4260         : ${BUILD_CFLAGS:=''}
4261         : ${BUILD_CPPFLAGS:=''}
4262         : ${BUILD_LDFLAGS:=''}
4263         : ${BUILD_LIBS:=''}
4264         : ${BUILD_EXEEXT:='$x'}
4265         : ${BUILD_OBJEXT:='o'}
4266
4267 # Check whether --with-build-cc or --without-build-cc was given.
4268 if test "${with_build_cc+set}" = set; then
4269   withval="$with_build_cc"
4270   BUILD_CC="$withval"
4271 else
4272   for ac_prog in gcc cc cl
4273 do
4274   # Extract the first word of "$ac_prog", so it can be a program name with args.
4275 set dummy $ac_prog; ac_word=$2
4276 echo "$as_me:4276: checking for $ac_word" >&5
4277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4278 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4279   echo $ECHO_N "(cached) $ECHO_C" >&6
4280 else
4281   if test -n "$BUILD_CC"; then
4282   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4283 else
4284   ac_save_IFS=$IFS; IFS=$ac_path_separator
4285 ac_dummy="$PATH"
4286 for ac_dir in $ac_dummy; do
4287   IFS=$ac_save_IFS
4288   test -z "$ac_dir" && ac_dir=.
4289   $as_executable_p "$ac_dir/$ac_word" || continue
4290 ac_cv_prog_BUILD_CC="$ac_prog"
4291 echo "$as_me:4291: found $ac_dir/$ac_word" >&5
4292 break
4293 done
4294
4295 fi
4296 fi
4297 BUILD_CC=$ac_cv_prog_BUILD_CC
4298 if test -n "$BUILD_CC"; then
4299   echo "$as_me:4299: result: $BUILD_CC" >&5
4300 echo "${ECHO_T}$BUILD_CC" >&6
4301 else
4302   echo "$as_me:4302: result: no" >&5
4303 echo "${ECHO_T}no" >&6
4304 fi
4305
4306   test -n "$BUILD_CC" && break
4307 done
4308
4309 fi;
4310         echo "$as_me:4310: checking for native build C compiler" >&5
4311 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4312         echo "$as_me:4312: result: $BUILD_CC" >&5
4313 echo "${ECHO_T}$BUILD_CC" >&6
4314
4315         echo "$as_me:4315: checking for native build C preprocessor" >&5
4316 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4317
4318 # Check whether --with-build-cpp or --without-build-cpp was given.
4319 if test "${with_build_cpp+set}" = set; then
4320   withval="$with_build_cpp"
4321   BUILD_CPP="$withval"
4322 else
4323   BUILD_CPP='${BUILD_CC} -E'
4324 fi;
4325         echo "$as_me:4325: result: $BUILD_CPP" >&5
4326 echo "${ECHO_T}$BUILD_CPP" >&6
4327
4328         echo "$as_me:4328: checking for native build C flags" >&5
4329 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4330
4331 # Check whether --with-build-cflags or --without-build-cflags was given.
4332 if test "${with_build_cflags+set}" = set; then
4333   withval="$with_build_cflags"
4334   BUILD_CFLAGS="$withval"
4335 fi;
4336         echo "$as_me:4336: result: $BUILD_CFLAGS" >&5
4337 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4338
4339         echo "$as_me:4339: checking for native build C preprocessor-flags" >&5
4340 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4341
4342 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4343 if test "${with_build_cppflags+set}" = set; then
4344   withval="$with_build_cppflags"
4345   BUILD_CPPFLAGS="$withval"
4346 fi;
4347         echo "$as_me:4347: result: $BUILD_CPPFLAGS" >&5
4348 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4349
4350         echo "$as_me:4350: checking for native build linker-flags" >&5
4351 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4352
4353 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4354 if test "${with_build_ldflags+set}" = set; then
4355   withval="$with_build_ldflags"
4356   BUILD_LDFLAGS="$withval"
4357 fi;
4358         echo "$as_me:4358: result: $BUILD_LDFLAGS" >&5
4359 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4360
4361         echo "$as_me:4361: checking for native build linker-libraries" >&5
4362 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4363
4364 # Check whether --with-build-libs or --without-build-libs was given.
4365 if test "${with_build_libs+set}" = set; then
4366   withval="$with_build_libs"
4367   BUILD_LIBS="$withval"
4368 fi;
4369         echo "$as_me:4369: result: $BUILD_LIBS" >&5
4370 echo "${ECHO_T}$BUILD_LIBS" >&6
4371
4372         # this assumes we're on Unix.
4373         BUILD_EXEEXT=
4374         BUILD_OBJEXT=o
4375
4376         : ${BUILD_CC:='${CC}'}
4377
4378         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4379                 { { echo "$as_me:4379: error: Cross-build requires two compilers.
4380 Use --with-build-cc to specify the native compiler." >&5
4381 echo "$as_me: error: Cross-build requires two compilers.
4382 Use --with-build-cc to specify the native compiler." >&2;}
4383    { (exit 1); exit 1; }; }
4384         fi
4385
4386 else
4387         : ${BUILD_CC:='${CC}'}
4388         : ${BUILD_CPP:='${CPP}'}
4389         : ${BUILD_CFLAGS:='${CFLAGS}'}
4390         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4391         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4392         : ${BUILD_LIBS:='${LIBS}'}
4393         : ${BUILD_EXEEXT:='$x'}
4394         : ${BUILD_OBJEXT:='o'}
4395 fi
4396
4397 ###############################################################################
4398
4399 ### Options to allow the user to specify the set of libraries which are used.
4400 ### Use "--without-normal --with-shared" to allow the default model to be
4401 ### shared, for example.
4402 cf_list_models=""
4403
4404 echo "$as_me:4404: checking if libtool -version-number should be used" >&5
4405 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4406
4407 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4408 if test "${enable_libtool_version+set}" = set; then
4409   enableval="$enable_libtool_version"
4410   test "$enableval" != no && enableval=yes
4411   if test "$enableval" != "yes" ; then
4412     cf_libtool_version=no
4413   else
4414     cf_libtool_version=yes
4415   fi
4416 else
4417   enableval=yes
4418   cf_libtool_version=yes
4419
4420 fi;
4421 echo "$as_me:4421: result: $cf_libtool_version" >&5
4422 echo "${ECHO_T}$cf_libtool_version" >&6
4423
4424 if test "$cf_libtool_version" = yes ; then
4425         LIBTOOL_VERSION="-version-number"
4426 else
4427         LIBTOOL_VERSION="-version-info"
4428 fi
4429
4430 LIBTOOL=
4431
4432 # common library maintenance symbols that are convenient for libtool scripts:
4433 LIB_CREATE='${AR} -cr'
4434 LIB_OBJECT='${OBJECTS}'
4435 LIB_SUFFIX=.a
4436 LIB_PREP="$RANLIB"
4437
4438 # symbols used to prop libtool up to enable it to determine what it should be
4439 # doing:
4440 LIB_CLEAN=
4441 LIB_COMPILE=
4442 LIB_LINK='${CC}'
4443 LIB_INSTALL=
4444 LIB_UNINSTALL=
4445
4446 echo "$as_me:4446: checking if you want to build libraries with libtool" >&5
4447 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4448
4449 # Check whether --with-libtool or --without-libtool was given.
4450 if test "${with_libtool+set}" = set; then
4451   withval="$with_libtool"
4452   with_libtool=$withval
4453 else
4454   with_libtool=no
4455 fi;
4456 echo "$as_me:4456: result: $with_libtool" >&5
4457 echo "${ECHO_T}$with_libtool" >&6
4458 if test "$with_libtool" != "no"; then
4459
4460         if test "$with_libtool" != "yes" ; then
4461
4462 if test "x$prefix" != xNONE; then
4463   cf_path_syntax="$prefix"
4464 else
4465   cf_path_syntax="$ac_default_prefix"
4466 fi
4467
4468 case ".$with_libtool" in #(vi
4469 .\$\(*\)*|.\'*\'*) #(vi
4470   ;;
4471 ..|./*|.\\*) #(vi
4472   ;;
4473 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4474   ;;
4475 .\${*prefix}*|.\${*dir}*) #(vi
4476   eval with_libtool="$with_libtool"
4477   case ".$with_libtool" in #(vi
4478   .NONE/*)
4479     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4480     ;;
4481   esac
4482   ;; #(vi
4483 .no|.NONE/*)
4484   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4485   ;;
4486 *)
4487   { { echo "$as_me:4487: error: expected a pathname, not \"$with_libtool\"" >&5
4488 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4489    { (exit 1); exit 1; }; }
4490   ;;
4491 esac
4492
4493                 LIBTOOL=$with_libtool
4494         else
4495                 if test -n "$ac_tool_prefix"; then
4496   for ac_prog in libtool glibtool
4497   do
4498     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4499 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4500 echo "$as_me:4500: checking for $ac_word" >&5
4501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4502 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4503   echo $ECHO_N "(cached) $ECHO_C" >&6
4504 else
4505   if test -n "$LIBTOOL"; then
4506   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4507 else
4508   ac_save_IFS=$IFS; IFS=$ac_path_separator
4509 ac_dummy="$PATH"
4510 for ac_dir in $ac_dummy; do
4511   IFS=$ac_save_IFS
4512   test -z "$ac_dir" && ac_dir=.
4513   $as_executable_p "$ac_dir/$ac_word" || continue
4514 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4515 echo "$as_me:4515: found $ac_dir/$ac_word" >&5
4516 break
4517 done
4518
4519 fi
4520 fi
4521 LIBTOOL=$ac_cv_prog_LIBTOOL
4522 if test -n "$LIBTOOL"; then
4523   echo "$as_me:4523: result: $LIBTOOL" >&5
4524 echo "${ECHO_T}$LIBTOOL" >&6
4525 else
4526   echo "$as_me:4526: result: no" >&5
4527 echo "${ECHO_T}no" >&6
4528 fi
4529
4530     test -n "$LIBTOOL" && break
4531   done
4532 fi
4533 if test -z "$LIBTOOL"; then
4534   ac_ct_LIBTOOL=$LIBTOOL
4535   for ac_prog in libtool glibtool
4536 do
4537   # Extract the first word of "$ac_prog", so it can be a program name with args.
4538 set dummy $ac_prog; ac_word=$2
4539 echo "$as_me:4539: checking for $ac_word" >&5
4540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4541 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4542   echo $ECHO_N "(cached) $ECHO_C" >&6
4543 else
4544   if test -n "$ac_ct_LIBTOOL"; then
4545   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4546 else
4547   ac_save_IFS=$IFS; IFS=$ac_path_separator
4548 ac_dummy="$PATH"
4549 for ac_dir in $ac_dummy; do
4550   IFS=$ac_save_IFS
4551   test -z "$ac_dir" && ac_dir=.
4552   $as_executable_p "$ac_dir/$ac_word" || continue
4553 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4554 echo "$as_me:4554: found $ac_dir/$ac_word" >&5
4555 break
4556 done
4557
4558 fi
4559 fi
4560 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4561 if test -n "$ac_ct_LIBTOOL"; then
4562   echo "$as_me:4562: result: $ac_ct_LIBTOOL" >&5
4563 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4564 else
4565   echo "$as_me:4565: result: no" >&5
4566 echo "${ECHO_T}no" >&6
4567 fi
4568
4569   test -n "$ac_ct_LIBTOOL" && break
4570 done
4571 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4572
4573   LIBTOOL=$ac_ct_LIBTOOL
4574 fi
4575
4576 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4577 then
4578         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.].*//'`
4579 else
4580         cf_cv_libtool_version=
4581 fi
4582 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4583
4584                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4585                 then
4586
4587 unset ac_cv_prog_ac_ct_LIBTOOL
4588 unset ac_ct_LIBTOOL
4589 unset LIBTOOL
4590
4591                         if test -n "$ac_tool_prefix"; then
4592   for ac_prog in glibtool
4593   do
4594     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4595 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4596 echo "$as_me:4596: checking for $ac_word" >&5
4597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4598 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4599   echo $ECHO_N "(cached) $ECHO_C" >&6
4600 else
4601   if test -n "$LIBTOOL"; then
4602   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4603 else
4604   ac_save_IFS=$IFS; IFS=$ac_path_separator
4605 ac_dummy="$PATH"
4606 for ac_dir in $ac_dummy; do
4607   IFS=$ac_save_IFS
4608   test -z "$ac_dir" && ac_dir=.
4609   $as_executable_p "$ac_dir/$ac_word" || continue
4610 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4611 echo "$as_me:4611: found $ac_dir/$ac_word" >&5
4612 break
4613 done
4614
4615 fi
4616 fi
4617 LIBTOOL=$ac_cv_prog_LIBTOOL
4618 if test -n "$LIBTOOL"; then
4619   echo "$as_me:4619: result: $LIBTOOL" >&5
4620 echo "${ECHO_T}$LIBTOOL" >&6
4621 else
4622   echo "$as_me:4622: result: no" >&5
4623 echo "${ECHO_T}no" >&6
4624 fi
4625
4626     test -n "$LIBTOOL" && break
4627   done
4628 fi
4629 if test -z "$LIBTOOL"; then
4630   ac_ct_LIBTOOL=$LIBTOOL
4631   for ac_prog in glibtool
4632 do
4633   # Extract the first word of "$ac_prog", so it can be a program name with args.
4634 set dummy $ac_prog; ac_word=$2
4635 echo "$as_me:4635: checking for $ac_word" >&5
4636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4637 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4638   echo $ECHO_N "(cached) $ECHO_C" >&6
4639 else
4640   if test -n "$ac_ct_LIBTOOL"; then
4641   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4642 else
4643   ac_save_IFS=$IFS; IFS=$ac_path_separator
4644 ac_dummy="$PATH"
4645 for ac_dir in $ac_dummy; do
4646   IFS=$ac_save_IFS
4647   test -z "$ac_dir" && ac_dir=.
4648   $as_executable_p "$ac_dir/$ac_word" || continue
4649 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4650 echo "$as_me:4650: found $ac_dir/$ac_word" >&5
4651 break
4652 done
4653
4654 fi
4655 fi
4656 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4657 if test -n "$ac_ct_LIBTOOL"; then
4658   echo "$as_me:4658: result: $ac_ct_LIBTOOL" >&5
4659 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4660 else
4661   echo "$as_me:4661: result: no" >&5
4662 echo "${ECHO_T}no" >&6
4663 fi
4664
4665   test -n "$ac_ct_LIBTOOL" && break
4666 done
4667 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4668
4669   LIBTOOL=$ac_ct_LIBTOOL
4670 fi
4671
4672 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4673 then
4674         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.].*//'`
4675 else
4676         cf_cv_libtool_version=
4677 fi
4678 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4679
4680                 fi
4681         fi
4682         if test -z "$LIBTOOL" ; then
4683                 { { echo "$as_me:4683: error: Cannot find libtool" >&5
4684 echo "$as_me: error: Cannot find libtool" >&2;}
4685    { (exit 1); exit 1; }; }
4686         fi
4687         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4688         LIB_OBJECT='${OBJECTS:.o=.lo}'
4689         LIB_SUFFIX=.la
4690         LIB_CLEAN='${LIBTOOL} --mode=clean'
4691         LIB_COMPILE='${LIBTOOL} --mode=compile'
4692         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4693         LIB_INSTALL='${LIBTOOL} --mode=install'
4694         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4695         LIB_PREP=:
4696
4697 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4698 then
4699         echo "$as_me:4699: checking version of $LIBTOOL" >&5
4700 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4701
4702 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4703 then
4704         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.].*//'`
4705 else
4706         cf_cv_libtool_version=
4707 fi
4708 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4709
4710         echo "$as_me:4710: result: $cf_cv_libtool_version" >&5
4711 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4712         if test -z "$cf_cv_libtool_version" ; then
4713                 { { echo "$as_me:4713: error: This is not GNU libtool" >&5
4714 echo "$as_me: error: This is not GNU libtool" >&2;}
4715    { (exit 1); exit 1; }; }
4716         fi
4717 else
4718         { { echo "$as_me:4718: error: GNU libtool has not been found" >&5
4719 echo "$as_me: error: GNU libtool has not been found" >&2;}
4720    { (exit 1); exit 1; }; }
4721 fi
4722
4723         # special hack to add -no-undefined (which libtool should do for itself)
4724         LT_UNDEF=
4725         case "$cf_cv_system_name" in #(vi
4726         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4727                 LT_UNDEF=-no-undefined
4728                 ;;
4729         esac
4730
4731         # special hack to add --tag option for C++ compiler
4732         case $cf_cv_libtool_version in #(vi
4733         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4734                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4735                 LIBTOOL="$LIBTOOL --tag=CC"
4736                 ;;
4737         *)
4738                 LIBTOOL_CXX="$LIBTOOL"
4739                 ;;
4740         esac
4741 else
4742         LIBTOOL=""
4743         LIBTOOL_CXX=""
4744 fi
4745
4746 test -z "$LIBTOOL" && ECHO_LT=
4747
4748 if test "$with_libtool" != "no" ; then
4749
4750 cf_list_models="$cf_list_models libtool"
4751
4752 else
4753
4754 echo "$as_me:4754: checking if you want to build shared libraries" >&5
4755 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4756
4757 # Check whether --with-shared or --without-shared was given.
4758 if test "${with_shared+set}" = set; then
4759   withval="$with_shared"
4760   with_shared=$withval
4761 else
4762   with_shared=no
4763 fi;
4764 echo "$as_me:4764: result: $with_shared" >&5
4765 echo "${ECHO_T}$with_shared" >&6
4766 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4767
4768 echo "$as_me:4768: checking if you want to build static libraries" >&5
4769 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4770
4771 # Check whether --with-normal or --without-normal was given.
4772 if test "${with_normal+set}" = set; then
4773   withval="$with_normal"
4774   with_normal=$withval
4775 else
4776   with_normal=yes
4777 fi;
4778 echo "$as_me:4778: result: $with_normal" >&5
4779 echo "${ECHO_T}$with_normal" >&6
4780 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4781
4782 echo "$as_me:4782: checking if you want to build debug libraries" >&5
4783 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4784
4785 # Check whether --with-debug or --without-debug was given.
4786 if test "${with_debug+set}" = set; then
4787   withval="$with_debug"
4788   with_debug=$withval
4789 else
4790   with_debug=yes
4791 fi;
4792 echo "$as_me:4792: result: $with_debug" >&5
4793 echo "${ECHO_T}$with_debug" >&6
4794 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4795
4796 echo "$as_me:4796: checking if you want to build profiling libraries" >&5
4797 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4798
4799 # Check whether --with-profile or --without-profile was given.
4800 if test "${with_profile+set}" = set; then
4801   withval="$with_profile"
4802   with_profile=$withval
4803 else
4804   with_profile=no
4805 fi;
4806 echo "$as_me:4806: result: $with_profile" >&5
4807 echo "${ECHO_T}$with_profile" >&6
4808 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4809
4810 fi
4811
4812 if test "X$cf_with_cxx_binding" != Xno; then
4813 if test "x$with_shared" = "xyes"; then
4814 echo "$as_me:4814: checking if you want to build C++ shared libraries" >&5
4815 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4816
4817 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4818 if test "${with_cxx_shared+set}" = set; then
4819   withval="$with_cxx_shared"
4820   with_shared_cxx=$withval
4821 else
4822   with_shared_cxx=no
4823 fi;
4824 echo "$as_me:4824: result: $with_shared_cxx" >&5
4825 echo "${ECHO_T}$with_shared_cxx" >&6
4826 fi
4827 fi
4828
4829 ###############################################################################
4830
4831 echo "$as_me:4831: checking for specified models" >&5
4832 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4833 test -z "$cf_list_models" && cf_list_models=normal
4834 test "$with_libtool" != "no" && cf_list_models=libtool
4835 echo "$as_me:4835: result: $cf_list_models" >&5
4836 echo "${ECHO_T}$cf_list_models" >&6
4837
4838 ### Use the first model as the default, and save its suffix for use in building
4839 ### up test-applications.
4840 echo "$as_me:4840: checking for default model" >&5
4841 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4842 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4843 echo "$as_me:4843: result: $DFT_LWR_MODEL" >&5
4844 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4845
4846 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4847
4848 TICS_NAME=tic
4849
4850 TINFO_NAME=tinfo
4851
4852 LIB_NAME=ncurses
4853
4854 LIB_DIR=../lib
4855 LIB_2ND=../../lib
4856
4857 echo "$as_me:4857: checking if you want to have a library-prefix" >&5
4858 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4859
4860 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4861 if test "${with_lib_prefix+set}" = set; then
4862   withval="$with_lib_prefix"
4863   with_lib_prefix=$withval
4864 else
4865   with_lib_prefix=auto
4866 fi;
4867 echo "$as_me:4867: result: $with_lib_prefix" >&5
4868 echo "${ECHO_T}$with_lib_prefix" >&6
4869
4870 if test $with_lib_prefix = auto
4871 then
4872
4873         case $cf_cv_system_name in #(vi
4874         OS/2*|os2*) #(vi
4875         LIB_PREFIX=''
4876         ;;
4877         *)      LIB_PREFIX='lib'
4878         ;;
4879         esac
4880 cf_prefix=$LIB_PREFIX
4881
4882 elif test $with_lib_prefix = no
4883 then
4884         LIB_PREFIX=
4885 else
4886         LIB_PREFIX=$with_lib_prefix
4887 fi
4888
4889 LIB_SUFFIX=
4890
4891         echo "$as_me:4891: checking for PATH separator" >&5
4892 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4893         case $cf_cv_system_name in
4894         os2*)   PATH_SEPARATOR=';'  ;;
4895         *)      ${PATH_SEPARATOR:=':'}  ;;
4896         esac
4897
4898         echo "$as_me:4898: result: $PATH_SEPARATOR" >&5
4899 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4900
4901 ###############################################################################
4902
4903 echo "$as_me:4903: checking if you want to build a separate terminfo library" >&5
4904 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4905
4906 # Check whether --with-termlib or --without-termlib was given.
4907 if test "${with_termlib+set}" = set; then
4908   withval="$with_termlib"
4909   with_termlib=$withval
4910 else
4911   with_termlib=no
4912 fi;
4913 echo "$as_me:4913: result: $with_termlib" >&5
4914 echo "${ECHO_T}$with_termlib" >&6
4915
4916 echo "$as_me:4916: checking if you want to build a separate tic library" >&5
4917 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4918
4919 # Check whether --with-ticlib or --without-ticlib was given.
4920 if test "${with_ticlib+set}" = set; then
4921   withval="$with_ticlib"
4922   with_ticlib=$withval
4923 else
4924   with_ticlib=no
4925 fi;
4926 echo "$as_me:4926: result: $with_ticlib" >&5
4927 echo "${ECHO_T}$with_ticlib" >&6
4928
4929 ### Checks for special libraries, must be done up-front.
4930 SHLIB_LIST=""
4931
4932 echo "$as_me:4932: checking if you want to link with the GPM mouse library" >&5
4933 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4934
4935 # Check whether --with-gpm or --without-gpm was given.
4936 if test "${with_gpm+set}" = set; then
4937   withval="$with_gpm"
4938   with_gpm=$withval
4939 else
4940   with_gpm=maybe
4941 fi;
4942 echo "$as_me:4942: result: $with_gpm" >&5
4943 echo "${ECHO_T}$with_gpm" >&6
4944
4945 if test "$with_gpm" != no ; then
4946         echo "$as_me:4946: checking for gpm.h" >&5
4947 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4948 if test "${ac_cv_header_gpm_h+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   cat >conftest.$ac_ext <<_ACEOF
4952 #line 4952 "configure"
4953 #include "confdefs.h"
4954 #include <gpm.h>
4955 _ACEOF
4956 if { (eval echo "$as_me:4956: \"$ac_cpp conftest.$ac_ext\"") >&5
4957   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4958   ac_status=$?
4959   egrep -v '^ *\+' conftest.er1 >conftest.err
4960   rm -f conftest.er1
4961   cat conftest.err >&5
4962   echo "$as_me:4962: \$? = $ac_status" >&5
4963   (exit $ac_status); } >/dev/null; then
4964   if test -s conftest.err; then
4965     ac_cpp_err=$ac_c_preproc_warn_flag
4966   else
4967     ac_cpp_err=
4968   fi
4969 else
4970   ac_cpp_err=yes
4971 fi
4972 if test -z "$ac_cpp_err"; then
4973   ac_cv_header_gpm_h=yes
4974 else
4975   echo "$as_me: failed program was:" >&5
4976   cat conftest.$ac_ext >&5
4977   ac_cv_header_gpm_h=no
4978 fi
4979 rm -f conftest.err conftest.$ac_ext
4980 fi
4981 echo "$as_me:4981: result: $ac_cv_header_gpm_h" >&5
4982 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4983 if test $ac_cv_header_gpm_h = yes; then
4984
4985 cat >>confdefs.h <<\EOF
4986 #define HAVE_GPM_H 1
4987 EOF
4988
4989                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4990                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4991
4992 echo "${as_me:-configure}:4992: testing assuming we really have GPM library ..." 1>&5
4993
4994 cat >>confdefs.h <<\EOF
4995 #define HAVE_LIBGPM 1
4996 EOF
4997
4998                 else
4999                         echo "$as_me:4999: checking for Gpm_Open in -lgpm" >&5
5000 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5001 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5002   echo $ECHO_N "(cached) $ECHO_C" >&6
5003 else
5004   ac_check_lib_save_LIBS=$LIBS
5005 LIBS="-lgpm  $LIBS"
5006 cat >conftest.$ac_ext <<_ACEOF
5007 #line 5007 "configure"
5008 #include "confdefs.h"
5009
5010 /* Override any gcc2 internal prototype to avoid an error.  */
5011 #ifdef __cplusplus
5012 extern "C"
5013 #endif
5014 /* We use char because int might match the return type of a gcc2
5015    builtin and then its argument prototype would still apply.  */
5016 char Gpm_Open ();
5017 int
5018 main ()
5019 {
5020 Gpm_Open ();
5021   ;
5022   return 0;
5023 }
5024 _ACEOF
5025 rm -f conftest.$ac_objext conftest$ac_exeext
5026 if { (eval echo "$as_me:5026: \"$ac_link\"") >&5
5027   (eval $ac_link) 2>&5
5028   ac_status=$?
5029   echo "$as_me:5029: \$? = $ac_status" >&5
5030   (exit $ac_status); } &&
5031          { ac_try='test -s conftest$ac_exeext'
5032   { (eval echo "$as_me:5032: \"$ac_try\"") >&5
5033   (eval $ac_try) 2>&5
5034   ac_status=$?
5035   echo "$as_me:5035: \$? = $ac_status" >&5
5036   (exit $ac_status); }; }; then
5037   ac_cv_lib_gpm_Gpm_Open=yes
5038 else
5039   echo "$as_me: failed program was:" >&5
5040 cat conftest.$ac_ext >&5
5041 ac_cv_lib_gpm_Gpm_Open=no
5042 fi
5043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5044 LIBS=$ac_check_lib_save_LIBS
5045 fi
5046 echo "$as_me:5046: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5047 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5048 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5049   :
5050 else
5051
5052                                 { { echo "$as_me:5052: error: Cannot link with GPM library" >&5
5053 echo "$as_me: error: Cannot link with GPM library" >&2;}
5054    { (exit 1); exit 1; }; }
5055                 fi
5056                 with_gpm=yes
5057
5058 fi
5059
5060 else
5061
5062                 test "$with_gpm" != maybe && { echo "$as_me:5062: WARNING: Cannot find GPM header" >&5
5063 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5064                 with_gpm=no
5065
5066 fi
5067
5068 fi
5069
5070 if test "$with_gpm" != no ; then
5071         echo "$as_me:5071: checking if you want to load GPM dynamically" >&5
5072 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5073
5074 # Check whether --with-dlsym or --without-dlsym was given.
5075 if test "${with_dlsym+set}" = set; then
5076   withval="$with_dlsym"
5077   with_dlsym=$withval
5078 else
5079   with_dlsym=yes
5080 fi;
5081         echo "$as_me:5081: result: $with_dlsym" >&5
5082 echo "${ECHO_T}$with_dlsym" >&6
5083         if test "x$with_dlsym" = xyes ; then
5084
5085 cf_have_dlsym=no
5086 echo "$as_me:5086: checking for dlsym" >&5
5087 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5088 if test "${ac_cv_func_dlsym+set}" = set; then
5089   echo $ECHO_N "(cached) $ECHO_C" >&6
5090 else
5091   cat >conftest.$ac_ext <<_ACEOF
5092 #line 5092 "configure"
5093 #include "confdefs.h"
5094 /* System header to define __stub macros and hopefully few prototypes,
5095     which can conflict with char dlsym (); below.  */
5096 #include <assert.h>
5097 /* Override any gcc2 internal prototype to avoid an error.  */
5098 #ifdef __cplusplus
5099 extern "C"
5100 #endif
5101 /* We use char because int might match the return type of a gcc2
5102    builtin and then its argument prototype would still apply.  */
5103 char dlsym ();
5104 char (*f) ();
5105
5106 int
5107 main ()
5108 {
5109 /* The GNU C library defines this for functions which it implements
5110     to always fail with ENOSYS.  Some functions are actually named
5111     something starting with __ and the normal name is an alias.  */
5112 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5113 choke me
5114 #else
5115 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5116 #endif
5117
5118   ;
5119   return 0;
5120 }
5121 _ACEOF
5122 rm -f conftest.$ac_objext conftest$ac_exeext
5123 if { (eval echo "$as_me:5123: \"$ac_link\"") >&5
5124   (eval $ac_link) 2>&5
5125   ac_status=$?
5126   echo "$as_me:5126: \$? = $ac_status" >&5
5127   (exit $ac_status); } &&
5128          { ac_try='test -s conftest$ac_exeext'
5129   { (eval echo "$as_me:5129: \"$ac_try\"") >&5
5130   (eval $ac_try) 2>&5
5131   ac_status=$?
5132   echo "$as_me:5132: \$? = $ac_status" >&5
5133   (exit $ac_status); }; }; then
5134   ac_cv_func_dlsym=yes
5135 else
5136   echo "$as_me: failed program was:" >&5
5137 cat conftest.$ac_ext >&5
5138 ac_cv_func_dlsym=no
5139 fi
5140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5141 fi
5142 echo "$as_me:5142: result: $ac_cv_func_dlsym" >&5
5143 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5144 if test $ac_cv_func_dlsym = yes; then
5145   cf_have_dlsym=yes
5146 else
5147
5148 cf_have_libdl=no
5149 echo "$as_me:5149: checking for dlsym in -ldl" >&5
5150 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5151 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5152   echo $ECHO_N "(cached) $ECHO_C" >&6
5153 else
5154   ac_check_lib_save_LIBS=$LIBS
5155 LIBS="-ldl  $LIBS"
5156 cat >conftest.$ac_ext <<_ACEOF
5157 #line 5157 "configure"
5158 #include "confdefs.h"
5159
5160 /* Override any gcc2 internal prototype to avoid an error.  */
5161 #ifdef __cplusplus
5162 extern "C"
5163 #endif
5164 /* We use char because int might match the return type of a gcc2
5165    builtin and then its argument prototype would still apply.  */
5166 char dlsym ();
5167 int
5168 main ()
5169 {
5170 dlsym ();
5171   ;
5172   return 0;
5173 }
5174 _ACEOF
5175 rm -f conftest.$ac_objext conftest$ac_exeext
5176 if { (eval echo "$as_me:5176: \"$ac_link\"") >&5
5177   (eval $ac_link) 2>&5
5178   ac_status=$?
5179   echo "$as_me:5179: \$? = $ac_status" >&5
5180   (exit $ac_status); } &&
5181          { ac_try='test -s conftest$ac_exeext'
5182   { (eval echo "$as_me:5182: \"$ac_try\"") >&5
5183   (eval $ac_try) 2>&5
5184   ac_status=$?
5185   echo "$as_me:5185: \$? = $ac_status" >&5
5186   (exit $ac_status); }; }; then
5187   ac_cv_lib_dl_dlsym=yes
5188 else
5189   echo "$as_me: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5191 ac_cv_lib_dl_dlsym=no
5192 fi
5193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5194 LIBS=$ac_check_lib_save_LIBS
5195 fi
5196 echo "$as_me:5196: result: $ac_cv_lib_dl_dlsym" >&5
5197 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5198 if test $ac_cv_lib_dl_dlsym = yes; then
5199
5200         cf_have_dlsym=yes
5201         cf_have_libdl=yes
5202 fi
5203
5204 fi
5205
5206 if test "$cf_have_dlsym" = yes ; then
5207         test "$cf_have_libdl" = yes &&
5208 cf_add_libs="-ldl"
5209 # Filter out duplicates - this happens with badly-designed ".pc" files...
5210 for cf_add_1lib in $LIBS
5211 do
5212         for cf_add_2lib in $cf_add_libs
5213         do
5214                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5215                 then
5216                         cf_add_1lib=
5217                         break
5218                 fi
5219         done
5220         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5221 done
5222 LIBS="$cf_add_libs"
5223
5224         echo "$as_me:5224: checking whether able to link to dl*() functions" >&5
5225 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5226         cat >conftest.$ac_ext <<_ACEOF
5227 #line 5227 "configure"
5228 #include "confdefs.h"
5229 #include <dlfcn.h>
5230 int
5231 main ()
5232 {
5233
5234                 void *obj;
5235                 if ((obj = dlopen("filename", 0)) != 0) {
5236                         if (dlsym(obj, "symbolname") == 0) {
5237                         dlclose(obj);
5238                         }
5239                 }
5240   ;
5241   return 0;
5242 }
5243 _ACEOF
5244 rm -f conftest.$ac_objext conftest$ac_exeext
5245 if { (eval echo "$as_me:5245: \"$ac_link\"") >&5
5246   (eval $ac_link) 2>&5
5247   ac_status=$?
5248   echo "$as_me:5248: \$? = $ac_status" >&5
5249   (exit $ac_status); } &&
5250          { ac_try='test -s conftest$ac_exeext'
5251   { (eval echo "$as_me:5251: \"$ac_try\"") >&5
5252   (eval $ac_try) 2>&5
5253   ac_status=$?
5254   echo "$as_me:5254: \$? = $ac_status" >&5
5255   (exit $ac_status); }; }; then
5256
5257 cat >>confdefs.h <<\EOF
5258 #define HAVE_LIBDL 1
5259 EOF
5260
5261 else
5262   echo "$as_me: failed program was:" >&5
5263 cat conftest.$ac_ext >&5
5264
5265                 { { echo "$as_me:5265: error: Cannot link test program for libdl" >&5
5266 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5267    { (exit 1); exit 1; }; }
5268 fi
5269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5270         echo "$as_me:5270: result: ok" >&5
5271 echo "${ECHO_T}ok" >&6
5272 else
5273         { { echo "$as_me:5273: error: Cannot find dlsym function" >&5
5274 echo "$as_me: error: Cannot find dlsym function" >&2;}
5275    { (exit 1); exit 1; }; }
5276 fi
5277
5278                 if test "x$with_gpm" != xyes ; then
5279                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5280
5281 echo "${as_me:-configure}:5281: testing assuming soname for gpm is $with_gpm ..." 1>&5
5282
5283                         cf_cv_gpm_soname="$with_gpm"
5284                 else
5285
5286 echo "$as_me:5286: checking for soname of gpm library" >&5
5287 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5288 if test "${cf_cv_gpm_soname+set}" = set; then
5289   echo $ECHO_N "(cached) $ECHO_C" >&6
5290 else
5291
5292 cf_cv_gpm_soname=unknown
5293 if test "$cross_compiling" != yes ; then
5294 cat >conftest.$ac_ext <<CF_EOF
5295 #include <gpm.h>
5296 int main()
5297 {
5298 if (Gpm_Open(0,0)) Gpm_Close();
5299         ${cf_cv_main_return:-return}(0);
5300 }
5301 CF_EOF
5302 cf_save_LIBS="$LIBS"
5303
5304 cf_add_libs="-lgpm"
5305 # Filter out duplicates - this happens with badly-designed ".pc" files...
5306 for cf_add_1lib in $LIBS
5307 do
5308         for cf_add_2lib in $cf_add_libs
5309         do
5310                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5311                 then
5312                         cf_add_1lib=
5313                         break
5314                 fi
5315         done
5316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5317 done
5318 LIBS="$cf_add_libs"
5319
5320         if { (eval echo "$as_me:5320: \"$ac_compile\"") >&5
5321   (eval $ac_compile) 2>&5
5322   ac_status=$?
5323   echo "$as_me:5323: \$? = $ac_status" >&5
5324   (exit $ac_status); } ; then
5325                 if { (eval echo "$as_me:5325: \"$ac_link\"") >&5
5326   (eval $ac_link) 2>&5
5327   ac_status=$?
5328   echo "$as_me:5328: \$? = $ac_status" >&5
5329   (exit $ac_status); } ; then
5330                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5331                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5332                 fi
5333         fi
5334 rm -rf conftest*
5335 LIBS="$cf_save_LIBS"
5336 fi
5337
5338 fi
5339 echo "$as_me:5339: result: $cf_cv_gpm_soname" >&5
5340 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5341
5342                 fi
5343                 test "$cf_cv_gpm_soname" != "unknown" &&
5344 cat >>confdefs.h <<EOF
5345 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5346 EOF
5347
5348                 SHLIB_LIST="-ldl $SHLIB_LIST"
5349         else
5350                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5351
5352 cf_add_libs="-lgpm"
5353 # Filter out duplicates - this happens with badly-designed ".pc" files...
5354 for cf_add_1lib in $TEST_LIBS
5355 do
5356         for cf_add_2lib in $cf_add_libs
5357         do
5358                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5359                 then
5360                         cf_add_1lib=
5361                         break
5362                 fi
5363         done
5364         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5365 done
5366 TEST_LIBS="$cf_add_libs"
5367
5368         fi
5369
5370 cat >>confdefs.h <<\EOF
5371 #define HAVE_LIBGPM 1
5372 EOF
5373
5374 echo "$as_me:5374: checking for Gpm_Wgetch in -lgpm" >&5
5375 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5376 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5377   echo $ECHO_N "(cached) $ECHO_C" >&6
5378 else
5379   ac_check_lib_save_LIBS=$LIBS
5380 LIBS="-lgpm  $LIBS"
5381 cat >conftest.$ac_ext <<_ACEOF
5382 #line 5382 "configure"
5383 #include "confdefs.h"
5384
5385 /* Override any gcc2 internal prototype to avoid an error.  */
5386 #ifdef __cplusplus
5387 extern "C"
5388 #endif
5389 /* We use char because int might match the return type of a gcc2
5390    builtin and then its argument prototype would still apply.  */
5391 char Gpm_Wgetch ();
5392 int
5393 main ()
5394 {
5395 Gpm_Wgetch ();
5396   ;
5397   return 0;
5398 }
5399 _ACEOF
5400 rm -f conftest.$ac_objext conftest$ac_exeext
5401 if { (eval echo "$as_me:5401: \"$ac_link\"") >&5
5402   (eval $ac_link) 2>&5
5403   ac_status=$?
5404   echo "$as_me:5404: \$? = $ac_status" >&5
5405   (exit $ac_status); } &&
5406          { ac_try='test -s conftest$ac_exeext'
5407   { (eval echo "$as_me:5407: \"$ac_try\"") >&5
5408   (eval $ac_try) 2>&5
5409   ac_status=$?
5410   echo "$as_me:5410: \$? = $ac_status" >&5
5411   (exit $ac_status); }; }; then
5412   ac_cv_lib_gpm_Gpm_Wgetch=yes
5413 else
5414   echo "$as_me: failed program was:" >&5
5415 cat conftest.$ac_ext >&5
5416 ac_cv_lib_gpm_Gpm_Wgetch=no
5417 fi
5418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5419 LIBS=$ac_check_lib_save_LIBS
5420 fi
5421 echo "$as_me:5421: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5422 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5423 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5424
5425 echo "$as_me:5425: checking if GPM is weakly bound to curses library" >&5
5426 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5427 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5428   echo $ECHO_N "(cached) $ECHO_C" >&6
5429 else
5430
5431 cf_cv_check_gpm_wgetch=unknown
5432 if test "$cross_compiling" != yes ; then
5433
5434 cat >conftest.$ac_ext <<CF_EOF
5435 #include <gpm.h>
5436 int main()
5437 {
5438         Gpm_Wgetch();
5439         ${cf_cv_main_return:-return}(0);
5440 }
5441 CF_EOF
5442
5443         cf_save_LIBS="$LIBS"
5444         # This only works if we can look at the symbol table.  If a shared
5445         # library is stripped for install, we cannot use that.  So we're forced
5446         # to rely on the static library, noting that some packagers may not
5447         # include it.
5448         LIBS="-static -lgpm -dynamic $LIBS"
5449         if { (eval echo "$as_me:5449: \"$ac_compile\"") >&5
5450   (eval $ac_compile) 2>&5
5451   ac_status=$?
5452   echo "$as_me:5452: \$? = $ac_status" >&5
5453   (exit $ac_status); } ; then
5454                 if { (eval echo "$as_me:5454: \"$ac_link\"") >&5
5455   (eval $ac_link) 2>&5
5456   ac_status=$?
5457   echo "$as_me:5457: \$? = $ac_status" >&5
5458   (exit $ac_status); } ; then
5459                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5460                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5461                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5462                 fi
5463         fi
5464         rm -rf conftest*
5465         LIBS="$cf_save_LIBS"
5466 fi
5467
5468 fi
5469 echo "$as_me:5469: result: $cf_cv_check_gpm_wgetch" >&5
5470 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5471
5472 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5473         { echo "$as_me:5473: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5474 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5475 fi
5476
5477 fi
5478
5479 fi
5480
5481 # not everyone has "test -c"
5482 if test -c /dev/sysmouse 2>/dev/null ; then
5483 echo "$as_me:5483: checking if you want to use sysmouse" >&5
5484 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5485
5486 # Check whether --with-sysmouse or --without-sysmouse was given.
5487 if test "${with_sysmouse+set}" = set; then
5488   withval="$with_sysmouse"
5489   cf_with_sysmouse=$withval
5490 else
5491   cf_with_sysmouse=maybe
5492 fi;
5493         if test "$cf_with_sysmouse" != no ; then
5494         cat >conftest.$ac_ext <<_ACEOF
5495 #line 5495 "configure"
5496 #include "confdefs.h"
5497
5498 #include <osreldate.h>
5499 #if (__FreeBSD_version >= 400017)
5500 #include <sys/consio.h>
5501 #include <sys/fbio.h>
5502 #else
5503 #include <machine/console.h>
5504 #endif
5505
5506 int
5507 main ()
5508 {
5509
5510         struct mouse_info the_mouse;
5511         ioctl(0, CONS_MOUSECTL, &the_mouse);
5512
5513   ;
5514   return 0;
5515 }
5516 _ACEOF
5517 rm -f conftest.$ac_objext
5518 if { (eval echo "$as_me:5518: \"$ac_compile\"") >&5
5519   (eval $ac_compile) 2>&5
5520   ac_status=$?
5521   echo "$as_me:5521: \$? = $ac_status" >&5
5522   (exit $ac_status); } &&
5523          { ac_try='test -s conftest.$ac_objext'
5524   { (eval echo "$as_me:5524: \"$ac_try\"") >&5
5525   (eval $ac_try) 2>&5
5526   ac_status=$?
5527   echo "$as_me:5527: \$? = $ac_status" >&5
5528   (exit $ac_status); }; }; then
5529   cf_with_sysmouse=yes
5530 else
5531   echo "$as_me: failed program was:" >&5
5532 cat conftest.$ac_ext >&5
5533 cf_with_sysmouse=no
5534 fi
5535 rm -f conftest.$ac_objext conftest.$ac_ext
5536         fi
5537 echo "$as_me:5537: result: $cf_with_sysmouse" >&5
5538 echo "${ECHO_T}$cf_with_sysmouse" >&6
5539 test "$cf_with_sysmouse" = yes &&
5540 cat >>confdefs.h <<\EOF
5541 #define USE_SYSMOUSE 1
5542 EOF
5543
5544 fi
5545
5546 if test X"$CC_G_OPT" = X"" ; then
5547         CC_G_OPT='-g'
5548         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5549 fi
5550
5551 if test X"$CXX_G_OPT" = X"" ; then
5552         CXX_G_OPT='-g'
5553         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5554 fi
5555
5556 echo "$as_me:5556: checking for default loader flags" >&5
5557 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5558 case $DFT_LWR_MODEL in
5559 libtool) LD_MODEL=''   ;;
5560 normal)  LD_MODEL=''   ;;
5561 debug)   LD_MODEL=$CC_G_OPT ;;
5562 profile) LD_MODEL='-pg';;
5563 shared)  LD_MODEL=''   ;;
5564 esac
5565 echo "$as_me:5565: result: $LD_MODEL" >&5
5566 echo "${ECHO_T}$LD_MODEL" >&6
5567
5568 case $DFT_LWR_MODEL in
5569 shared)
5570
5571 echo "$as_me:5571: checking if rpath option should be used" >&5
5572 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5573
5574 # Check whether --enable-rpath or --disable-rpath was given.
5575 if test "${enable_rpath+set}" = set; then
5576   enableval="$enable_rpath"
5577   cf_cv_enable_rpath=$enableval
5578 else
5579   cf_cv_enable_rpath=no
5580 fi;
5581 echo "$as_me:5581: result: $cf_cv_enable_rpath" >&5
5582 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5583
5584 echo "$as_me:5584: checking if shared libraries should be relinked during install" >&5
5585 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5586
5587 # Check whether --enable-relink or --disable-relink was given.
5588 if test "${enable_relink+set}" = set; then
5589   enableval="$enable_relink"
5590   cf_cv_do_relink=$enableval
5591 else
5592   cf_cv_do_relink=yes
5593 fi;
5594 echo "$as_me:5594: result: $cf_cv_do_relink" >&5
5595 echo "${ECHO_T}$cf_cv_do_relink" >&6
5596         ;;
5597 esac
5598
5599 # we will build libraries one-level down.
5600 rel_builddir=..
5601
5602 LD_RPATH_OPT=
5603 echo "$as_me:5603: checking for an rpath option" >&5
5604 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5605 case $cf_cv_system_name in #(vi
5606 irix*) #(vi
5607         if test "$GCC" = yes; then
5608                 LD_RPATH_OPT="-Wl,-rpath,"
5609         else
5610                 LD_RPATH_OPT="-rpath "
5611         fi
5612         ;;
5613 linux*|gnu*|k*bsd*-gnu) #(vi
5614         LD_RPATH_OPT="-Wl,-rpath,"
5615         ;;
5616 openbsd[2-9].*|mirbsd*) #(vi
5617         LD_RPATH_OPT="-Wl,-rpath,"
5618         ;;
5619 dragonfly*|freebsd*) #(vi
5620         LD_RPATH_OPT="-rpath "
5621         ;;
5622 netbsd*) #(vi
5623         LD_RPATH_OPT="-Wl,-rpath,"
5624         ;;
5625 osf*|mls+*) #(vi
5626         LD_RPATH_OPT="-rpath "
5627         ;;
5628 solaris2*) #(vi
5629         LD_RPATH_OPT="-R"
5630         ;;
5631 *)
5632         ;;
5633 esac
5634 echo "$as_me:5634: result: $LD_RPATH_OPT" >&5
5635 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5636
5637 case "x$LD_RPATH_OPT" in #(vi
5638 x-R*)
5639         echo "$as_me:5639: checking if we need a space after rpath option" >&5
5640 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5641         cf_save_LIBS="$LIBS"
5642
5643 cf_add_libs="${LD_RPATH_OPT}$libdir"
5644 # Filter out duplicates - this happens with badly-designed ".pc" files...
5645 for cf_add_1lib in $LIBS
5646 do
5647         for cf_add_2lib in $cf_add_libs
5648         do
5649                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5650                 then
5651                         cf_add_1lib=
5652                         break
5653                 fi
5654         done
5655         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5656 done
5657 LIBS="$cf_add_libs"
5658
5659         cat >conftest.$ac_ext <<_ACEOF
5660 #line 5660 "configure"
5661 #include "confdefs.h"
5662
5663 int
5664 main ()
5665 {
5666
5667   ;
5668   return 0;
5669 }
5670 _ACEOF
5671 rm -f conftest.$ac_objext conftest$ac_exeext
5672 if { (eval echo "$as_me:5672: \"$ac_link\"") >&5
5673   (eval $ac_link) 2>&5
5674   ac_status=$?
5675   echo "$as_me:5675: \$? = $ac_status" >&5
5676   (exit $ac_status); } &&
5677          { ac_try='test -s conftest$ac_exeext'
5678   { (eval echo "$as_me:5678: \"$ac_try\"") >&5
5679   (eval $ac_try) 2>&5
5680   ac_status=$?
5681   echo "$as_me:5681: \$? = $ac_status" >&5
5682   (exit $ac_status); }; }; then
5683   cf_rpath_space=no
5684 else
5685   echo "$as_me: failed program was:" >&5
5686 cat conftest.$ac_ext >&5
5687 cf_rpath_space=yes
5688 fi
5689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5690         LIBS="$cf_save_LIBS"
5691         echo "$as_me:5691: result: $cf_rpath_space" >&5
5692 echo "${ECHO_T}$cf_rpath_space" >&6
5693         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5694         ;;
5695 esac
5696
5697         RM_SHARED_OPTS=
5698         LOCAL_LDFLAGS=
5699         LOCAL_LDFLAGS2=
5700         LD_SHARED_OPTS=
5701         INSTALL_LIB="-m 644"
5702         : ${rel_builddir:=.}
5703
5704         shlibdir=$libdir
5705
5706         MAKE_DLLS="#"
5707
5708         cf_cv_do_symlinks=no
5709         cf_ld_rpath_opt=
5710         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5711
5712         echo "$as_me:5712: checking if release/abi version should be used for shared libs" >&5
5713 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5714
5715 # Check whether --with-shlib-version or --without-shlib-version was given.
5716 if test "${with_shlib_version+set}" = set; then
5717   withval="$with_shlib_version"
5718   test -z "$withval" && withval=auto
5719         case $withval in #(vi
5720         yes) #(vi
5721                 cf_cv_shlib_version=auto
5722                 ;;
5723         rel|abi|auto|no) #(vi
5724                 cf_cv_shlib_version=$withval
5725                 ;;
5726         *)
5727                 { { echo "$as_me:5727: error: option value must be one of: rel, abi, auto or no" >&5
5728 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5729    { (exit 1); exit 1; }; }
5730                 ;;
5731         esac
5732
5733 else
5734   cf_cv_shlib_version=auto
5735 fi;
5736         echo "$as_me:5736: result: $cf_cv_shlib_version" >&5
5737 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5738
5739         cf_cv_rm_so_locs=no
5740         cf_try_cflags=
5741
5742         # Some less-capable ports of gcc support only -fpic
5743         CC_SHARED_OPTS=
5744         if test "$GCC" = yes
5745         then
5746                 echo "$as_me:5746: checking which $CC option to use" >&5
5747 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5748                 cf_save_CFLAGS="$CFLAGS"
5749                 for CC_SHARED_OPTS in -fPIC -fpic ''
5750                 do
5751                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5752                         cat >conftest.$ac_ext <<_ACEOF
5753 #line 5753 "configure"
5754 #include "confdefs.h"
5755 #include <stdio.h>
5756 int
5757 main ()
5758 {
5759 int x = 1
5760   ;
5761   return 0;
5762 }
5763 _ACEOF
5764 rm -f conftest.$ac_objext
5765 if { (eval echo "$as_me:5765: \"$ac_compile\"") >&5
5766   (eval $ac_compile) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); } &&
5770          { ac_try='test -s conftest.$ac_objext'
5771   { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772   (eval $ac_try) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); }; }; then
5776   break
5777 else
5778   echo "$as_me: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 fi
5781 rm -f conftest.$ac_objext conftest.$ac_ext
5782                 done
5783                 echo "$as_me:5783: result: $CC_SHARED_OPTS" >&5
5784 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5785                 CFLAGS="$cf_save_CFLAGS"
5786         fi
5787
5788         cf_cv_shlib_version_infix=no
5789
5790         case $cf_cv_system_name in #(vi
5791         aix4.3-9*|aix[5-7]*) #(vi
5792                 if test "$GCC" = yes; then
5793                         CC_SHARED_OPTS=
5794                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5795                 else
5796                         # CC_SHARED_OPTS='-qpic=large -G'
5797                         # perhaps "-bM:SRE -bnoentry -bexpall"
5798                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5799                 fi
5800                 ;;
5801         beos*) #(vi
5802                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5803                 ;;
5804         cygwin*) #(vi
5805                 CC_SHARED_OPTS=
5806                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5807                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5808                 cf_cv_shlib_version=cygdll
5809                 cf_cv_shlib_version_infix=cygdll
5810                 shlibdir=$bindir
5811                 MAKE_DLLS=
5812                 cat >mk_shared_lib.sh <<-CF_EOF
5813                 #!/bin/sh
5814                 SHARED_LIB=\$1
5815                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5816                 shift
5817                 cat <<-EOF
5818                 Linking shared library
5819                 ** SHARED_LIB \$SHARED_LIB
5820                 ** IMPORT_LIB \$IMPORT_LIB
5821 EOF
5822                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5823 CF_EOF
5824                 chmod +x mk_shared_lib.sh
5825                 ;;
5826         msys*) #(vi
5827                 CC_SHARED_OPTS=
5828                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5829                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5830                 cf_cv_shlib_version=msysdll
5831                 cf_cv_shlib_version_infix=msysdll
5832                 shlibdir=$bindir
5833                 MAKE_DLLS=
5834                 cat >mk_shared_lib.sh <<-CF_EOF
5835                 #!/bin/sh
5836                 SHARED_LIB=\$1
5837                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5838                 shift
5839                 cat <<-EOF
5840                 Linking shared library
5841                 ** SHARED_LIB \$SHARED_LIB
5842                 ** IMPORT_LIB \$IMPORT_LIB
5843 EOF
5844                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5845 CF_EOF
5846                 chmod +x mk_shared_lib.sh
5847                 ;;
5848         darwin*) #(vi
5849                 cf_try_cflags="no-cpp-precomp"
5850                 CC_SHARED_OPTS="-dynamic"
5851                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5852                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5853                 cf_cv_shlib_version_infix=yes
5854                 echo "$as_me:5854: checking if ld -search_paths_first works" >&5
5855 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5856 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5857   echo $ECHO_N "(cached) $ECHO_C" >&6
5858 else
5859
5860                         cf_save_LDFLAGS=$LDFLAGS
5861                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5862                         cat >conftest.$ac_ext <<_ACEOF
5863 #line 5863 "configure"
5864 #include "confdefs.h"
5865
5866 int
5867 main ()
5868 {
5869 int i;
5870   ;
5871   return 0;
5872 }
5873 _ACEOF
5874 rm -f conftest.$ac_objext conftest$ac_exeext
5875 if { (eval echo "$as_me:5875: \"$ac_link\"") >&5
5876   (eval $ac_link) 2>&5
5877   ac_status=$?
5878   echo "$as_me:5878: \$? = $ac_status" >&5
5879   (exit $ac_status); } &&
5880          { ac_try='test -s conftest$ac_exeext'
5881   { (eval echo "$as_me:5881: \"$ac_try\"") >&5
5882   (eval $ac_try) 2>&5
5883   ac_status=$?
5884   echo "$as_me:5884: \$? = $ac_status" >&5
5885   (exit $ac_status); }; }; then
5886   cf_cv_ldflags_search_paths_first=yes
5887 else
5888   echo "$as_me: failed program was:" >&5
5889 cat conftest.$ac_ext >&5
5890 cf_cv_ldflags_search_paths_first=no
5891 fi
5892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5893                                 LDFLAGS=$cf_save_LDFLAGS
5894 fi
5895 echo "$as_me:5895: result: $cf_cv_ldflags_search_paths_first" >&5
5896 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5897                 if test $cf_cv_ldflags_search_paths_first = yes; then
5898                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5899                 fi
5900                 ;;
5901         hpux[7-8]*) #(vi
5902                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5903                 if test "$GCC" != yes; then
5904                         CC_SHARED_OPTS='+Z'
5905                 fi
5906                 MK_SHARED_LIB='${LD} -b -o $@'
5907                 INSTALL_LIB="-m 555"
5908                 ;;
5909         hpux*) #(vi
5910                 # (tested with gcc 2.7.2 -- I don't have c89)
5911                 if test "$GCC" = yes; then
5912                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5913                 else
5914                         CC_SHARED_OPTS='+Z'
5915                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5916                 fi
5917                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5918                 # HP-UX shared libraries must be executable, and should be
5919                 # readonly to exploit a quirk in the memory manager.
5920                 INSTALL_LIB="-m 555"
5921                 ;;
5922         interix*)
5923                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5924                 if test "$cf_cv_shlib_version" = rel; then
5925                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5926                 else
5927                         cf_shared_soname='`basename `'
5928                 fi
5929                 CC_SHARED_OPTS=
5930                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5931                 ;;
5932         irix*) #(vi
5933                 if test "$cf_cv_enable_rpath" = yes ; then
5934                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5935                 fi
5936                 # tested with IRIX 5.2 and 'cc'.
5937                 if test "$GCC" != yes; then
5938                         CC_SHARED_OPTS='-KPIC'
5939                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5940                 else
5941                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5942                 fi
5943                 cf_cv_rm_so_locs=yes
5944                 ;;
5945         linux*|gnu*|k*bsd*-gnu) #(vi
5946                 if test "$DFT_LWR_MODEL" = "shared" ; then
5947                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5948                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5949                 fi
5950                 if test "$cf_cv_enable_rpath" = yes ; then
5951                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5952                 fi
5953
5954         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5955         if test "$cf_cv_shlib_version" = rel; then
5956                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5957         else
5958                 cf_cv_shared_soname='`basename $@`'
5959         fi
5960
5961                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5962                 ;;
5963         mingw*) #(vi
5964                 cf_cv_shlib_version=mingw
5965                 cf_cv_shlib_version_infix=mingw
5966                 shlibdir=$bindir
5967                 MAKE_DLLS=
5968                 if test "$DFT_LWR_MODEL" = "shared" ; then
5969                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5970                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5971                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5972                 fi
5973                 CC_SHARED_OPTS=
5974                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5975                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5976                 cat >mk_shared_lib.sh <<-CF_EOF
5977                 #!/bin/sh
5978                 SHARED_LIB=\$1
5979                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5980                 shift
5981                 cat <<-EOF
5982                 Linking shared library
5983                 ** SHARED_LIB \$SHARED_LIB
5984                 ** IMPORT_LIB \$IMPORT_LIB
5985 EOF
5986                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5987 CF_EOF
5988                 chmod +x mk_shared_lib.sh
5989                 ;;
5990         openbsd[2-9].*|mirbsd*) #(vi
5991                 if test "$DFT_LWR_MODEL" = "shared" ; then
5992                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5993                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5994                 fi
5995                 if test "$cf_cv_enable_rpath" = yes ; then
5996                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5997                 fi
5998                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5999
6000         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6001         if test "$cf_cv_shlib_version" = rel; then
6002                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6003         else
6004                 cf_cv_shared_soname='`basename $@`'
6005         fi
6006
6007                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6008                 ;;
6009         nto-qnx*|openbsd*|freebsd[12].*) #(vi
6010                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6011                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6012                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6013                 ;;
6014         dragonfly*|freebsd*) #(vi
6015                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6016                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6017                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6018                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6019                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6020                 fi
6021
6022         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6023         if test "$cf_cv_shlib_version" = rel; then
6024                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6025         else
6026                 cf_cv_shared_soname='`basename $@`'
6027         fi
6028
6029                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
6030                 ;;
6031         netbsd*) #(vi
6032                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6033                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6034                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6035                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6036                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6037                         if test "$cf_cv_shlib_version" = auto; then
6038                         if test -f /usr/libexec/ld.elf_so; then
6039                                 cf_cv_shlib_version=abi
6040                         else
6041                                 cf_cv_shlib_version=rel
6042                         fi
6043                         fi
6044
6045         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6046         if test "$cf_cv_shlib_version" = rel; then
6047                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6048         else
6049                 cf_cv_shared_soname='`basename $@`'
6050         fi
6051
6052                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6053                 else
6054                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6055                 fi
6056                 ;;
6057         osf*|mls+*) #(vi
6058                 # tested with OSF/1 V3.2 and 'cc'
6059                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6060                 # link with shared libs).
6061                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6062                 case $host_os in #(vi
6063                 osf4*)
6064                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6065                         ;;
6066                 esac
6067                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6068                 if test "$DFT_LWR_MODEL" = "shared" ; then
6069                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6070                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6071                 fi
6072                 cf_cv_rm_so_locs=yes
6073                 ;;
6074         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6075                 # tested with osr5.0.5
6076                 if test "$GCC" != yes; then
6077                         CC_SHARED_OPTS='-belf -KPIC'
6078                 fi
6079                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6080                 if test "$cf_cv_enable_rpath" = yes ; then
6081                         # only way is to set LD_RUN_PATH but no switch for it
6082                         RUN_PATH=$libdir
6083                 fi
6084                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6085                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6086                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6087                 ;;
6088         sunos4*) #(vi
6089                 # tested with SunOS 4.1.1 and gcc 2.7.0
6090                 if test "$GCC" != yes; then
6091                         CC_SHARED_OPTS='-KPIC'
6092                 fi
6093                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6094                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6095                 ;;
6096         solaris2*) #(vi
6097                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6098                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6099                 if test "$DFT_LWR_MODEL" = "shared" ; then
6100                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6101                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6102                 fi
6103                 if test "$cf_cv_enable_rpath" = yes ; then
6104                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6105                 fi
6106
6107         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6108         if test "$cf_cv_shlib_version" = rel; then
6109                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6110         else
6111                 cf_cv_shared_soname='`basename $@`'
6112         fi
6113
6114                 if test "$GCC" != yes; then
6115                         cf_save_CFLAGS="$CFLAGS"
6116                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6117                         do
6118                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6119                                 cat >conftest.$ac_ext <<_ACEOF
6120 #line 6120 "configure"
6121 #include "confdefs.h"
6122 #include <stdio.h>
6123 int
6124 main ()
6125 {
6126 printf("Hello\n");
6127   ;
6128   return 0;
6129 }
6130 _ACEOF
6131 rm -f conftest.$ac_objext
6132 if { (eval echo "$as_me:6132: \"$ac_compile\"") >&5
6133   (eval $ac_compile) 2>&5
6134   ac_status=$?
6135   echo "$as_me:6135: \$? = $ac_status" >&5
6136   (exit $ac_status); } &&
6137          { ac_try='test -s conftest.$ac_objext'
6138   { (eval echo "$as_me:6138: \"$ac_try\"") >&5
6139   (eval $ac_try) 2>&5
6140   ac_status=$?
6141   echo "$as_me:6141: \$? = $ac_status" >&5
6142   (exit $ac_status); }; }; then
6143   break
6144 else
6145   echo "$as_me: failed program was:" >&5
6146 cat conftest.$ac_ext >&5
6147 fi
6148 rm -f conftest.$ac_objext conftest.$ac_ext
6149                         done
6150                         CFLAGS="$cf_save_CFLAGS"
6151                         CC_SHARED_OPTS=$cf_shared_opts
6152                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6153                 else
6154                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6155                 fi
6156                 ;;
6157         sysv5uw7*|unix_sv*) #(vi
6158                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6159                 if test "$GCC" != yes; then
6160                         CC_SHARED_OPTS='-KPIC'
6161                 fi
6162                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6163                 ;;
6164         *)
6165                 CC_SHARED_OPTS='unknown'
6166                 MK_SHARED_LIB='echo unknown'
6167                 ;;
6168         esac
6169
6170         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6171         case "$cf_cv_shlib_version" in #(vi
6172         rel|abi)
6173                 case "$MK_SHARED_LIB" in #(vi
6174                 *'-o $@') #(vi
6175                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6176                         ;;
6177                 *)
6178                         { echo "$as_me:6178: WARNING: ignored --with-shlib-version" >&5
6179 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6180                         ;;
6181                 esac
6182                 ;;
6183         esac
6184
6185         if test -n "$cf_try_cflags"
6186         then
6187 cat > conftest.$ac_ext <<EOF
6188 #line 6188 "${as_me:-configure}"
6189 #include <stdio.h>
6190 int main(int argc, char *argv[])
6191 {
6192         printf("hello\n");
6193         return (argv[argc-1] == 0) ;
6194 }
6195 EOF
6196                 cf_save_CFLAGS="$CFLAGS"
6197                 for cf_opt in $cf_try_cflags
6198                 do
6199                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6200                         echo "$as_me:6200: checking if CFLAGS option -$cf_opt works" >&5
6201 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6202                         if { (eval echo "$as_me:6202: \"$ac_compile\"") >&5
6203   (eval $ac_compile) 2>&5
6204   ac_status=$?
6205   echo "$as_me:6205: \$? = $ac_status" >&5
6206   (exit $ac_status); }; then
6207                                 echo "$as_me:6207: result: yes" >&5
6208 echo "${ECHO_T}yes" >&6
6209                                 cf_save_CFLAGS="$CFLAGS"
6210                         else
6211                                 echo "$as_me:6211: result: no" >&5
6212 echo "${ECHO_T}no" >&6
6213                         fi
6214                 done
6215                 CFLAGS="$cf_save_CFLAGS"
6216         fi
6217
6218         # RPATH_LIST is a colon-separated list of directories
6219         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6220         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6221
6222         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6223
6224         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6225
6226 echo "${as_me:-configure}:6226: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6227
6228         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6229
6230 echo "${as_me:-configure}:6230: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6231
6232 if test "$CC_SHARED_OPTS" = "unknown"; then
6233         for model in $cf_list_models; do
6234                 if test "$model" = "shared"; then
6235                         { { echo "$as_me:6235: error: Shared libraries are not supported in this version" >&5
6236 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6237    { (exit 1); exit 1; }; }
6238                 fi
6239         done
6240 fi
6241
6242 # pretend that ncurses==ncursesw==ncursest
6243 echo "$as_me:6243: checking if you want to disable library suffixes" >&5
6244 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6245
6246 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6247 if test "${enable_lib_suffixes+set}" = set; then
6248   enableval="$enable_lib_suffixes"
6249   disable_lib_suffixes=$enableval
6250 else
6251   disable_lib_suffixes=no
6252 fi;
6253 echo "$as_me:6253: result: $disable_lib_suffixes" >&5
6254 echo "${ECHO_T}$disable_lib_suffixes" >&6
6255
6256 ### If we're building with rpath, try to link non-standard libs that way too.
6257 if test "$DFT_LWR_MODEL" = "shared"; then
6258
6259 echo "$as_me:6259: checking if rpath-hack should be disabled" >&5
6260 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6261
6262 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6263 if test "${enable_rpath_hack+set}" = set; then
6264   enableval="$enable_rpath_hack"
6265   test "$enableval" != no && enableval=yes
6266   if test "$enableval" != "yes" ; then
6267     cf_disable_rpath_hack=yes
6268   else
6269     cf_disable_rpath_hack=no
6270   fi
6271 else
6272   enableval=yes
6273   cf_disable_rpath_hack=no
6274
6275 fi;
6276 echo "$as_me:6276: result: $cf_disable_rpath_hack" >&5
6277 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6278 if test "$cf_disable_rpath_hack" = no ; then
6279
6280 echo "$as_me:6280: checking for updated LDFLAGS" >&5
6281 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6282 if test -n "$LD_RPATH_OPT" ; then
6283         echo "$as_me:6283: result: maybe" >&5
6284 echo "${ECHO_T}maybe" >&6
6285
6286         for ac_prog in ldd
6287 do
6288   # Extract the first word of "$ac_prog", so it can be a program name with args.
6289 set dummy $ac_prog; ac_word=$2
6290 echo "$as_me:6290: checking for $ac_word" >&5
6291 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6292 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6293   echo $ECHO_N "(cached) $ECHO_C" >&6
6294 else
6295   if test -n "$cf_ldd_prog"; then
6296   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6297 else
6298   ac_save_IFS=$IFS; IFS=$ac_path_separator
6299 ac_dummy="$PATH"
6300 for ac_dir in $ac_dummy; do
6301   IFS=$ac_save_IFS
6302   test -z "$ac_dir" && ac_dir=.
6303   $as_executable_p "$ac_dir/$ac_word" || continue
6304 ac_cv_prog_cf_ldd_prog="$ac_prog"
6305 echo "$as_me:6305: found $ac_dir/$ac_word" >&5
6306 break
6307 done
6308
6309 fi
6310 fi
6311 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6312 if test -n "$cf_ldd_prog"; then
6313   echo "$as_me:6313: result: $cf_ldd_prog" >&5
6314 echo "${ECHO_T}$cf_ldd_prog" >&6
6315 else
6316   echo "$as_me:6316: result: no" >&5
6317 echo "${ECHO_T}no" >&6
6318 fi
6319
6320   test -n "$cf_ldd_prog" && break
6321 done
6322 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6323
6324         cf_rpath_list="/usr/lib /lib"
6325         if test "$cf_ldd_prog" != no
6326         then
6327                 cf_rpath_oops=
6328
6329 cat >conftest.$ac_ext <<_ACEOF
6330 #line 6330 "configure"
6331 #include "confdefs.h"
6332 #include <stdio.h>
6333 int
6334 main ()
6335 {
6336 printf("Hello");
6337   ;
6338   return 0;
6339 }
6340 _ACEOF
6341 rm -f conftest.$ac_objext conftest$ac_exeext
6342 if { (eval echo "$as_me:6342: \"$ac_link\"") >&5
6343   (eval $ac_link) 2>&5
6344   ac_status=$?
6345   echo "$as_me:6345: \$? = $ac_status" >&5
6346   (exit $ac_status); } &&
6347          { ac_try='test -s conftest$ac_exeext'
6348   { (eval echo "$as_me:6348: \"$ac_try\"") >&5
6349   (eval $ac_try) 2>&5
6350   ac_status=$?
6351   echo "$as_me:6351: \$? = $ac_status" >&5
6352   (exit $ac_status); }; }; then
6353   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6354                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6355 else
6356   echo "$as_me: failed program was:" >&5
6357 cat conftest.$ac_ext >&5
6358 fi
6359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6360
6361                 # If we passed the link-test, but get a "not found" on a given library,
6362                 # this could be due to inept reconfiguration of gcc to make it only
6363                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6364                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6365                 # /usr/local libraries.
6366                 if test -n "$cf_rpath_oops"
6367                 then
6368                         for cf_rpath_src in $cf_rpath_oops
6369                         do
6370                                 for cf_rpath_dir in \
6371                                         /usr/local \
6372                                         /usr/pkg \
6373                                         /opt/sfw
6374                                 do
6375                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6376                                         then
6377                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6378
6379 echo "${as_me:-configure}:6379: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6380
6381                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6382                                                 break
6383                                         fi
6384                                 done
6385                         done
6386                 fi
6387         fi
6388
6389         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6390
6391 echo "${as_me:-configure}:6391: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6392
6393 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6394
6395 echo "${as_me:-configure}:6395: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6396
6397 cf_rpath_dst=
6398 for cf_rpath_src in $LDFLAGS
6399 do
6400         case $cf_rpath_src in #(vi
6401         -L*) #(vi
6402
6403                 # check if this refers to a directory which we will ignore
6404                 cf_rpath_skip=no
6405                 if test -n "$cf_rpath_list"
6406                 then
6407                         for cf_rpath_item in $cf_rpath_list
6408                         do
6409                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6410                                 then
6411                                         cf_rpath_skip=yes
6412                                         break
6413                                 fi
6414                         done
6415                 fi
6416
6417                 if test "$cf_rpath_skip" = no
6418                 then
6419                         # transform the option
6420                         if test "$LD_RPATH_OPT" = "-R " ; then
6421                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6422                         else
6423                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6424                         fi
6425
6426                         # if we have not already added this, add it now
6427                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6428                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6429                         then
6430                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6431
6432 echo "${as_me:-configure}:6432: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6433
6434                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6435                         fi
6436                 fi
6437                 ;;
6438         esac
6439         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6440 done
6441 LDFLAGS=$cf_rpath_dst
6442
6443 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6444
6445 echo "${as_me:-configure}:6445: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6446
6447 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6448
6449 echo "${as_me:-configure}:6449: testing ...checking LIBS $LIBS ..." 1>&5
6450
6451 cf_rpath_dst=
6452 for cf_rpath_src in $LIBS
6453 do
6454         case $cf_rpath_src in #(vi
6455         -L*) #(vi
6456
6457                 # check if this refers to a directory which we will ignore
6458                 cf_rpath_skip=no
6459                 if test -n "$cf_rpath_list"
6460                 then
6461                         for cf_rpath_item in $cf_rpath_list
6462                         do
6463                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6464                                 then
6465                                         cf_rpath_skip=yes
6466                                         break
6467                                 fi
6468                         done
6469                 fi
6470
6471                 if test "$cf_rpath_skip" = no
6472                 then
6473                         # transform the option
6474                         if test "$LD_RPATH_OPT" = "-R " ; then
6475                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6476                         else
6477                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6478                         fi
6479
6480                         # if we have not already added this, add it now
6481                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6482                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6483                         then
6484                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6485
6486 echo "${as_me:-configure}:6486: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6487
6488                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6489                         fi
6490                 fi
6491                 ;;
6492         esac
6493         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6494 done
6495 LIBS=$cf_rpath_dst
6496
6497 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6498
6499 echo "${as_me:-configure}:6499: testing ...checked LIBS $LIBS ..." 1>&5
6500
6501         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6502
6503 echo "${as_me:-configure}:6503: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6504
6505 else
6506         echo "$as_me:6506: result: no" >&5
6507 echo "${ECHO_T}no" >&6
6508 fi
6509
6510 fi
6511
6512 fi
6513
6514 ###############################################################################
6515
6516 ###     use option --disable-overwrite to leave out the link to -lcurses
6517 echo "$as_me:6517: checking if you wish to install ncurses overwriting curses" >&5
6518 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6519
6520 # Check whether --enable-overwrite or --disable-overwrite was given.
6521 if test "${enable_overwrite+set}" = set; then
6522   enableval="$enable_overwrite"
6523   with_overwrite=$enableval
6524 else
6525   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6526 fi;
6527 echo "$as_me:6527: result: $with_overwrite" >&5
6528 echo "${ECHO_T}$with_overwrite" >&6
6529
6530 echo "$as_me:6530: checking if external terminfo-database is used" >&5
6531 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6532
6533 # Check whether --enable-database or --disable-database was given.
6534 if test "${enable_database+set}" = set; then
6535   enableval="$enable_database"
6536   use_database=$enableval
6537 else
6538   use_database=yes
6539 fi;
6540 echo "$as_me:6540: result: $use_database" >&5
6541 echo "${ECHO_T}$use_database" >&6
6542
6543 case $host_os in #(vi
6544 os2*) #(vi
6545         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6546         ;;
6547 *) #(vi
6548         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6549         ;;
6550 esac
6551
6552 NCURSES_USE_DATABASE=0
6553 if test "$use_database" != no ; then
6554         NCURSES_USE_DATABASE=1
6555
6556         echo "$as_me:6556: checking which terminfo source-file will be installed" >&5
6557 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6558
6559 # Check whether --with-database or --without-database was given.
6560 if test "${with_database+set}" = set; then
6561   withval="$with_database"
6562   TERMINFO_SRC=$withval
6563 fi;
6564         echo "$as_me:6564: result: $TERMINFO_SRC" >&5
6565 echo "${ECHO_T}$TERMINFO_SRC" >&6
6566
6567         echo "$as_me:6567: checking whether to use hashed database instead of directory/tree" >&5
6568 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6569
6570 # Check whether --with-hashed-db or --without-hashed-db was given.
6571 if test "${with_hashed_db+set}" = set; then
6572   withval="$with_hashed_db"
6573
6574 else
6575   with_hashed_db=no
6576 fi;
6577         echo "$as_me:6577: result: $with_hashed_db" >&5
6578 echo "${ECHO_T}$with_hashed_db" >&6
6579 else
6580         with_hashed_db=no
6581 fi
6582
6583 echo "$as_me:6583: checking for list of fallback descriptions" >&5
6584 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6585
6586 # Check whether --with-fallbacks or --without-fallbacks was given.
6587 if test "${with_fallbacks+set}" = set; then
6588   withval="$with_fallbacks"
6589   with_fallback=$withval
6590 else
6591   with_fallback=
6592 fi;
6593 echo "$as_me:6593: result: $with_fallback" >&5
6594 echo "${ECHO_T}$with_fallback" >&6
6595 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6596
6597 echo "$as_me:6597: checking if you want modern xterm or antique" >&5
6598 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6599
6600 # Check whether --with-xterm-new or --without-xterm-new was given.
6601 if test "${with_xterm_new+set}" = set; then
6602   withval="$with_xterm_new"
6603   with_xterm_new=$withval
6604 else
6605   with_xterm_new=yes
6606 fi;
6607 case $with_xterm_new in
6608 no)     with_xterm_new=xterm-old;;
6609 *)      with_xterm_new=xterm-new;;
6610 esac
6611 echo "$as_me:6611: result: $with_xterm_new" >&5
6612 echo "${ECHO_T}$with_xterm_new" >&6
6613 WHICH_XTERM=$with_xterm_new
6614
6615 echo "$as_me:6615: checking if xterm backspace sends BS or DEL" >&5
6616 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6617
6618 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6619 if test "${with_xterm_kbs+set}" = set; then
6620   withval="$with_xterm_kbs"
6621   with_xterm_kbs=$withval
6622 else
6623   with_xterm_kbs=BS
6624 fi;
6625 case x$with_xterm_kbs in
6626 xyes|xno|xBS|xbs|x8)
6627         with_xterm_kbs=BS
6628         ;;
6629 xDEL|xdel|x127)
6630         with_xterm_kbs=DEL
6631         ;;
6632 *)
6633         with_xterm_kbs=$withval
6634         ;;
6635 esac
6636 echo "$as_me:6636: result: $with_xterm_kbs" >&5
6637 echo "${ECHO_T}$with_xterm_kbs" >&6
6638 XTERM_KBS=$with_xterm_kbs
6639
6640 MAKE_TERMINFO=
6641 if test "$use_database" = no ; then
6642         TERMINFO="${datadir}/terminfo"
6643         MAKE_TERMINFO="#"
6644 else
6645
6646 echo "$as_me:6646: checking for list of terminfo directories" >&5
6647 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6648
6649 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6650 if test "${with_terminfo_dirs+set}" = set; then
6651   withval="$with_terminfo_dirs"
6652
6653 else
6654   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6655 fi;
6656 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6657 cf_dst_path=
6658 for cf_src_path in $withval
6659 do
6660
6661 if test "x$prefix" != xNONE; then
6662   cf_path_syntax="$prefix"
6663 else
6664   cf_path_syntax="$ac_default_prefix"
6665 fi
6666
6667 case ".$cf_src_path" in #(vi
6668 .\$\(*\)*|.\'*\'*) #(vi
6669   ;;
6670 ..|./*|.\\*) #(vi
6671   ;;
6672 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6673   ;;
6674 .\${*prefix}*|.\${*dir}*) #(vi
6675   eval cf_src_path="$cf_src_path"
6676   case ".$cf_src_path" in #(vi
6677   .NONE/*)
6678     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6679     ;;
6680   esac
6681   ;; #(vi
6682 .no|.NONE/*)
6683   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6684   ;;
6685 *)
6686   { { echo "$as_me:6686: error: expected a pathname, not \"$cf_src_path\"" >&5
6687 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6688    { (exit 1); exit 1; }; }
6689   ;;
6690 esac
6691
6692   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6693   cf_dst_path="${cf_dst_path}${cf_src_path}"
6694 done
6695 IFS="$ac_save_ifs"
6696
6697 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6698 # so we have to check/work around.  We do prefer the result of "eval"...
6699 eval cf_dst_eval="$cf_dst_path"
6700 case "x$cf_dst_eval" in #(vi
6701 xNONE*) #(vi
6702         TERMINFO_DIRS=$cf_dst_path
6703         ;;
6704 *)
6705         TERMINFO_DIRS="$cf_dst_eval"
6706         ;;
6707 esac
6708
6709 echo "$as_me:6709: result: $TERMINFO_DIRS" >&5
6710 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6711 test -n "$TERMINFO_DIRS" &&
6712 cat >>confdefs.h <<EOF
6713 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6714 EOF
6715
6716 echo "$as_me:6716: checking for default terminfo directory" >&5
6717 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6718
6719 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6720 if test "${with_default_terminfo_dir+set}" = set; then
6721   withval="$with_default_terminfo_dir"
6722
6723 else
6724   withval="${TERMINFO:-${datadir}/terminfo}"
6725 fi; if test -n "${datadir}/terminfo" ; then
6726
6727 if test "x$prefix" != xNONE; then
6728   cf_path_syntax="$prefix"
6729 else
6730   cf_path_syntax="$ac_default_prefix"
6731 fi
6732
6733 case ".$withval" in #(vi
6734 .\$\(*\)*|.\'*\'*) #(vi
6735   ;;
6736 ..|./*|.\\*) #(vi
6737   ;;
6738 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6739   ;;
6740 .\${*prefix}*|.\${*dir}*) #(vi
6741   eval withval="$withval"
6742   case ".$withval" in #(vi
6743   .NONE/*)
6744     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6745     ;;
6746   esac
6747   ;; #(vi
6748 .no|.NONE/*)
6749   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6750   ;;
6751 *)
6752   { { echo "$as_me:6752: error: expected a pathname, not \"$withval\"" >&5
6753 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6754    { (exit 1); exit 1; }; }
6755   ;;
6756 esac
6757
6758 fi
6759 eval TERMINFO="$withval"
6760
6761 echo "$as_me:6761: result: $TERMINFO" >&5
6762 echo "${ECHO_T}$TERMINFO" >&6
6763
6764 cat >>confdefs.h <<EOF
6765 #define TERMINFO "$TERMINFO"
6766 EOF
6767
6768 fi
6769
6770 ###     use option --disable-big-core to make tic run on small machines
6771 ###     We need 4Mb, check if we can allocate 50% more than that.
6772 echo "$as_me:6772: checking if big-core option selected" >&5
6773 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6774
6775 # Check whether --enable-big-core or --disable-big-core was given.
6776 if test "${enable_big_core+set}" = set; then
6777   enableval="$enable_big_core"
6778   with_big_core=$enableval
6779 else
6780   if test "$cross_compiling" = yes; then
6781   with_big_core=no
6782 else
6783   cat >conftest.$ac_ext <<_ACEOF
6784 #line 6784 "configure"
6785 #include "confdefs.h"
6786
6787 #include <stdlib.h>
6788 #include <string.h>
6789 int main() {
6790         unsigned long n = 6000000L;
6791         char *s = malloc(n);
6792         if (s != 0)
6793                 s[0] = s[n-1] = 0;
6794         ${cf_cv_main_return:-return}(s == 0);
6795 }
6796 _ACEOF
6797 rm -f conftest$ac_exeext
6798 if { (eval echo "$as_me:6798: \"$ac_link\"") >&5
6799   (eval $ac_link) 2>&5
6800   ac_status=$?
6801   echo "$as_me:6801: \$? = $ac_status" >&5
6802   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6803   { (eval echo "$as_me:6803: \"$ac_try\"") >&5
6804   (eval $ac_try) 2>&5
6805   ac_status=$?
6806   echo "$as_me:6806: \$? = $ac_status" >&5
6807   (exit $ac_status); }; }; then
6808   with_big_core=yes
6809 else
6810   echo "$as_me: program exited with status $ac_status" >&5
6811 echo "$as_me: failed program was:" >&5
6812 cat conftest.$ac_ext >&5
6813 with_big_core=no
6814 fi
6815 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6816 fi
6817 fi;
6818 echo "$as_me:6818: result: $with_big_core" >&5
6819 echo "${ECHO_T}$with_big_core" >&6
6820 test "x$with_big_core" = "xyes" &&
6821 cat >>confdefs.h <<\EOF
6822 #define HAVE_BIG_CORE 1
6823 EOF
6824
6825 ### ISO C only guarantees 512-char strings, we have tables which load faster
6826 ### when constructed using "big" strings.  More than the C compiler, the awk
6827 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6828 echo "$as_me:6828: checking if big-strings option selected" >&5
6829 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6830
6831 # Check whether --enable-big-strings or --disable-big-strings was given.
6832 if test "${enable_big_strings+set}" = set; then
6833   enableval="$enable_big_strings"
6834   with_big_strings=$enableval
6835 else
6836
6837         case x$AWK in #(vi
6838         x)
6839                 eval with_big_strings=no
6840                 ;;
6841         *) #(vi
6842                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6843                         | $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
6844                         eval with_big_strings=yes
6845                 else
6846                         eval with_big_strings=no
6847                 fi
6848                 ;;
6849         esac
6850
6851 fi;
6852 echo "$as_me:6852: result: $with_big_strings" >&5
6853 echo "${ECHO_T}$with_big_strings" >&6
6854
6855 USE_BIG_STRINGS=0
6856 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6857
6858 ###     use option --enable-termcap to compile in the termcap fallback support
6859 echo "$as_me:6859: checking if you want termcap-fallback support" >&5
6860 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6861
6862 # Check whether --enable-termcap or --disable-termcap was given.
6863 if test "${enable_termcap+set}" = set; then
6864   enableval="$enable_termcap"
6865   with_termcap=$enableval
6866 else
6867   with_termcap=no
6868 fi;
6869 echo "$as_me:6869: result: $with_termcap" >&5
6870 echo "${ECHO_T}$with_termcap" >&6
6871
6872 NCURSES_USE_TERMCAP=0
6873 if test "x$with_termcap" != "xyes" ; then
6874         if test "$use_database" = no ; then
6875                 if test -z "$with_fallback" ; then
6876                         { { echo "$as_me:6876: error: You have disabled the database w/o specifying fallbacks" >&5
6877 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6878    { (exit 1); exit 1; }; }
6879                 fi
6880         fi
6881
6882 cat >>confdefs.h <<\EOF
6883 #define PURE_TERMINFO 1
6884 EOF
6885
6886 else
6887
6888         if test "$with_ticlib" != no ; then
6889                 { { echo "$as_me:6889: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6890 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6891    { (exit 1); exit 1; }; }
6892         fi
6893
6894         NCURSES_USE_TERMCAP=1
6895         echo "$as_me:6895: checking for list of termcap files" >&5
6896 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6897
6898 # Check whether --with-termpath or --without-termpath was given.
6899 if test "${with_termpath+set}" = set; then
6900   withval="$with_termpath"
6901
6902 else
6903   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6904 fi;
6905 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6906 cf_dst_path=
6907 for cf_src_path in $withval
6908 do
6909
6910 if test "x$prefix" != xNONE; then
6911   cf_path_syntax="$prefix"
6912 else
6913   cf_path_syntax="$ac_default_prefix"
6914 fi
6915
6916 case ".$cf_src_path" in #(vi
6917 .\$\(*\)*|.\'*\'*) #(vi
6918   ;;
6919 ..|./*|.\\*) #(vi
6920   ;;
6921 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6922   ;;
6923 .\${*prefix}*|.\${*dir}*) #(vi
6924   eval cf_src_path="$cf_src_path"
6925   case ".$cf_src_path" in #(vi
6926   .NONE/*)
6927     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6928     ;;
6929   esac
6930   ;; #(vi
6931 .no|.NONE/*)
6932   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6933   ;;
6934 *)
6935   { { echo "$as_me:6935: error: expected a pathname, not \"$cf_src_path\"" >&5
6936 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6937    { (exit 1); exit 1; }; }
6938   ;;
6939 esac
6940
6941   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6942   cf_dst_path="${cf_dst_path}${cf_src_path}"
6943 done
6944 IFS="$ac_save_ifs"
6945
6946 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6947 # so we have to check/work around.  We do prefer the result of "eval"...
6948 eval cf_dst_eval="$cf_dst_path"
6949 case "x$cf_dst_eval" in #(vi
6950 xNONE*) #(vi
6951         TERMPATH=$cf_dst_path
6952         ;;
6953 *)
6954         TERMPATH="$cf_dst_eval"
6955         ;;
6956 esac
6957
6958         echo "$as_me:6958: result: $TERMPATH" >&5
6959 echo "${ECHO_T}$TERMPATH" >&6
6960         test -n "$TERMPATH" &&
6961 cat >>confdefs.h <<EOF
6962 #define TERMPATH "$TERMPATH"
6963 EOF
6964
6965         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6966         echo "$as_me:6966: checking if fast termcap-loader is needed" >&5
6967 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6968
6969 # Check whether --enable-getcap or --disable-getcap was given.
6970 if test "${enable_getcap+set}" = set; then
6971   enableval="$enable_getcap"
6972   with_getcap=$enableval
6973 else
6974   with_getcap=no
6975 fi;
6976         echo "$as_me:6976: result: $with_getcap" >&5
6977 echo "${ECHO_T}$with_getcap" >&6
6978         test "x$with_getcap" = "xyes" &&
6979 cat >>confdefs.h <<\EOF
6980 #define USE_GETCAP 1
6981 EOF
6982
6983         echo "$as_me:6983: checking if translated termcaps will be cached in ~/.terminfo" >&5
6984 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6985
6986 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6987 if test "${enable_getcap_cache+set}" = set; then
6988   enableval="$enable_getcap_cache"
6989   with_getcap_cache=$enableval
6990 else
6991   with_getcap_cache=no
6992 fi;
6993         echo "$as_me:6993: result: $with_getcap_cache" >&5
6994 echo "${ECHO_T}$with_getcap_cache" >&6
6995         test "x$with_getcap_cache" = "xyes" &&
6996 cat >>confdefs.h <<\EOF
6997 #define USE_GETCAP_CACHE 1
6998 EOF
6999
7000 fi
7001
7002 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7003 echo "$as_me:7003: checking if ~/.terminfo is wanted" >&5
7004 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7005
7006 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7007 if test "${enable_home_terminfo+set}" = set; then
7008   enableval="$enable_home_terminfo"
7009   with_home_terminfo=$enableval
7010 else
7011   with_home_terminfo=yes
7012 fi;
7013 echo "$as_me:7013: result: $with_home_terminfo" >&5
7014 echo "${ECHO_T}$with_home_terminfo" >&6
7015 test "x$with_home_terminfo" = "xyes" &&
7016 cat >>confdefs.h <<\EOF
7017 #define USE_HOME_TERMINFO 1
7018 EOF
7019
7020 echo "$as_me:7020: checking if you want to use restricted environment when running as root" >&5
7021 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7022
7023 # Check whether --enable-root-environ or --disable-root-environ was given.
7024 if test "${enable_root_environ+set}" = set; then
7025   enableval="$enable_root_environ"
7026   with_root_environ=$enableval
7027 else
7028   with_root_environ=yes
7029 fi;
7030 echo "$as_me:7030: result: $with_root_environ" >&5
7031 echo "${ECHO_T}$with_root_environ" >&6
7032 test "x$with_root_environ" = xyes &&
7033 cat >>confdefs.h <<\EOF
7034 #define USE_ROOT_ENVIRON 1
7035 EOF
7036
7037 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7038 ###   to reduce storage requirements for the terminfo database.
7039
7040 for ac_func in \
7041         remove \
7042         unlink
7043 do
7044 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7045 echo "$as_me:7045: checking for $ac_func" >&5
7046 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7047 if eval "test \"\${$as_ac_var+set}\" = set"; then
7048   echo $ECHO_N "(cached) $ECHO_C" >&6
7049 else
7050   cat >conftest.$ac_ext <<_ACEOF
7051 #line 7051 "configure"
7052 #include "confdefs.h"
7053 /* System header to define __stub macros and hopefully few prototypes,
7054     which can conflict with char $ac_func (); below.  */
7055 #include <assert.h>
7056 /* Override any gcc2 internal prototype to avoid an error.  */
7057 #ifdef __cplusplus
7058 extern "C"
7059 #endif
7060 /* We use char because int might match the return type of a gcc2
7061    builtin and then its argument prototype would still apply.  */
7062 char $ac_func ();
7063 char (*f) ();
7064
7065 int
7066 main ()
7067 {
7068 /* The GNU C library defines this for functions which it implements
7069     to always fail with ENOSYS.  Some functions are actually named
7070     something starting with __ and the normal name is an alias.  */
7071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7072 choke me
7073 #else
7074 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7075 #endif
7076
7077   ;
7078   return 0;
7079 }
7080 _ACEOF
7081 rm -f conftest.$ac_objext conftest$ac_exeext
7082 if { (eval echo "$as_me:7082: \"$ac_link\"") >&5
7083   (eval $ac_link) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit $ac_status); } &&
7087          { ac_try='test -s conftest$ac_exeext'
7088   { (eval echo "$as_me:7088: \"$ac_try\"") >&5
7089   (eval $ac_try) 2>&5
7090   ac_status=$?
7091   echo "$as_me:7091: \$? = $ac_status" >&5
7092   (exit $ac_status); }; }; then
7093   eval "$as_ac_var=yes"
7094 else
7095   echo "$as_me: failed program was:" >&5
7096 cat conftest.$ac_ext >&5
7097 eval "$as_ac_var=no"
7098 fi
7099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7100 fi
7101 echo "$as_me:7101: result: `eval echo '${'$as_ac_var'}'`" >&5
7102 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7103 if test `eval echo '${'$as_ac_var'}'` = yes; then
7104   cat >>confdefs.h <<EOF
7105 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7106 EOF
7107
7108 fi
7109 done
7110
7111 if test "$cross_compiling" = yes ; then
7112
7113 for ac_func in \
7114                 link \
7115                 symlink
7116 do
7117 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7118 echo "$as_me:7118: checking for $ac_func" >&5
7119 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7120 if eval "test \"\${$as_ac_var+set}\" = set"; then
7121   echo $ECHO_N "(cached) $ECHO_C" >&6
7122 else
7123   cat >conftest.$ac_ext <<_ACEOF
7124 #line 7124 "configure"
7125 #include "confdefs.h"
7126 /* System header to define __stub macros and hopefully few prototypes,
7127     which can conflict with char $ac_func (); below.  */
7128 #include <assert.h>
7129 /* Override any gcc2 internal prototype to avoid an error.  */
7130 #ifdef __cplusplus
7131 extern "C"
7132 #endif
7133 /* We use char because int might match the return type of a gcc2
7134    builtin and then its argument prototype would still apply.  */
7135 char $ac_func ();
7136 char (*f) ();
7137
7138 int
7139 main ()
7140 {
7141 /* The GNU C library defines this for functions which it implements
7142     to always fail with ENOSYS.  Some functions are actually named
7143     something starting with __ and the normal name is an alias.  */
7144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7145 choke me
7146 #else
7147 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7148 #endif
7149
7150   ;
7151   return 0;
7152 }
7153 _ACEOF
7154 rm -f conftest.$ac_objext conftest$ac_exeext
7155 if { (eval echo "$as_me:7155: \"$ac_link\"") >&5
7156   (eval $ac_link) 2>&5
7157   ac_status=$?
7158   echo "$as_me:7158: \$? = $ac_status" >&5
7159   (exit $ac_status); } &&
7160          { ac_try='test -s conftest$ac_exeext'
7161   { (eval echo "$as_me:7161: \"$ac_try\"") >&5
7162   (eval $ac_try) 2>&5
7163   ac_status=$?
7164   echo "$as_me:7164: \$? = $ac_status" >&5
7165   (exit $ac_status); }; }; then
7166   eval "$as_ac_var=yes"
7167 else
7168   echo "$as_me: failed program was:" >&5
7169 cat conftest.$ac_ext >&5
7170 eval "$as_ac_var=no"
7171 fi
7172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7173 fi
7174 echo "$as_me:7174: result: `eval echo '${'$as_ac_var'}'`" >&5
7175 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7176 if test `eval echo '${'$as_ac_var'}'` = yes; then
7177   cat >>confdefs.h <<EOF
7178 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7179 EOF
7180
7181 fi
7182 done
7183
7184 else
7185         echo "$as_me:7185: checking if link/symlink functions work" >&5
7186 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7187 if test "${cf_cv_link_funcs+set}" = set; then
7188   echo $ECHO_N "(cached) $ECHO_C" >&6
7189 else
7190
7191                 cf_cv_link_funcs=
7192                 for cf_func in link symlink ; do
7193                         if test "$cross_compiling" = yes; then
7194
7195                         eval 'ac_cv_func_'$cf_func'=error'
7196 else
7197   cat >conftest.$ac_ext <<_ACEOF
7198 #line 7198 "configure"
7199 #include "confdefs.h"
7200
7201 #include <sys/types.h>
7202 #include <sys/stat.h>
7203 #ifdef HAVE_UNISTD_H
7204 #include <unistd.h>
7205 #endif
7206 int main()
7207 {
7208         int fail = 0;
7209         char *src = "config.log";
7210         char *dst = "conftest.chk";
7211         struct stat src_sb;
7212         struct stat dst_sb;
7213
7214         stat(src, &src_sb);
7215         fail = ($cf_func("config.log", "conftest.chk") < 0)
7216             || (stat(dst, &dst_sb) < 0)
7217             || (dst_sb.st_mtime != src_sb.st_mtime);
7218 #ifdef HAVE_UNLINK
7219         unlink(dst);
7220 #else
7221         remove(dst);
7222 #endif
7223         ${cf_cv_main_return:-return} (fail);
7224 }
7225
7226 _ACEOF
7227 rm -f conftest$ac_exeext
7228 if { (eval echo "$as_me:7228: \"$ac_link\"") >&5
7229   (eval $ac_link) 2>&5
7230   ac_status=$?
7231   echo "$as_me:7231: \$? = $ac_status" >&5
7232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7233   { (eval echo "$as_me:7233: \"$ac_try\"") >&5
7234   (eval $ac_try) 2>&5
7235   ac_status=$?
7236   echo "$as_me:7236: \$? = $ac_status" >&5
7237   (exit $ac_status); }; }; then
7238
7239                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7240                         eval 'ac_cv_func_'$cf_func'=yes'
7241 else
7242   echo "$as_me: program exited with status $ac_status" >&5
7243 echo "$as_me: failed program was:" >&5
7244 cat conftest.$ac_ext >&5
7245
7246                         eval 'ac_cv_func_'$cf_func'=no'
7247 fi
7248 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7249 fi
7250                 done
7251                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7252
7253 fi
7254 echo "$as_me:7254: result: $cf_cv_link_funcs" >&5
7255 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7256         test "$ac_cv_func_link"    = yes &&
7257 cat >>confdefs.h <<\EOF
7258 #define HAVE_LINK 1
7259 EOF
7260
7261         test "$ac_cv_func_symlink" = yes &&
7262 cat >>confdefs.h <<\EOF
7263 #define HAVE_SYMLINK 1
7264 EOF
7265
7266 fi
7267
7268 with_links=no
7269 with_symlinks=no
7270
7271 # soft links (symbolic links) are useful for some systems where hard links do
7272 # not work, or to make it simpler to copy terminfo trees around.
7273 if test "x$ac_cv_func_symlink" = xyes ; then
7274     echo "$as_me:7274: checking if tic should use symbolic links" >&5
7275 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7276
7277 # Check whether --enable-symlinks or --disable-symlinks was given.
7278 if test "${enable_symlinks+set}" = set; then
7279   enableval="$enable_symlinks"
7280   with_symlinks=$enableval
7281 else
7282   with_symlinks=no
7283 fi;
7284     echo "$as_me:7284: result: $with_symlinks" >&5
7285 echo "${ECHO_T}$with_symlinks" >&6
7286 fi
7287
7288 # If we have hard links and did not choose to use soft links instead, there is
7289 # no reason to make this choice optional - use the hard links.
7290 if test "$with_symlinks" = no ; then
7291     echo "$as_me:7291: checking if tic should use hard links" >&5
7292 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7293     if test "x$ac_cv_func_link" = xyes ; then
7294         with_links=yes
7295     else
7296         with_links=no
7297     fi
7298     echo "$as_me:7298: result: $with_links" >&5
7299 echo "${ECHO_T}$with_links" >&6
7300 fi
7301
7302 test "x$with_links" = xyes &&
7303 cat >>confdefs.h <<\EOF
7304 #define USE_LINKS 1
7305 EOF
7306
7307 test "x$with_symlinks" = xyes &&
7308 cat >>confdefs.h <<\EOF
7309 #define USE_SYMLINKS 1
7310 EOF
7311
7312 ###   use option --enable-broken-linker to force on use of broken-linker support
7313 echo "$as_me:7313: checking if you want broken-linker support code" >&5
7314 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7315
7316 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7317 if test "${enable_broken_linker+set}" = set; then
7318   enableval="$enable_broken_linker"
7319   with_broken_linker=$enableval
7320 else
7321   with_broken_linker=${BROKEN_LINKER:-no}
7322 fi;
7323 echo "$as_me:7323: result: $with_broken_linker" >&5
7324 echo "${ECHO_T}$with_broken_linker" >&6
7325
7326 BROKEN_LINKER=0
7327 if test "x$with_broken_linker" = xyes ; then
7328
7329 cat >>confdefs.h <<\EOF
7330 #define BROKEN_LINKER 1
7331 EOF
7332
7333         BROKEN_LINKER=1
7334 elif test "$DFT_LWR_MODEL" = shared ; then
7335         case $cf_cv_system_name in #(vi
7336         cygwin*)
7337
7338 cat >>confdefs.h <<\EOF
7339 #define BROKEN_LINKER 1
7340 EOF
7341
7342                 BROKEN_LINKER=1
7343                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7344
7345 echo "${as_me:-configure}:7345: testing cygwin linker is broken anyway ..." 1>&5
7346
7347                 ;;
7348         esac
7349 fi
7350
7351 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7352 echo "$as_me:7352: checking if tputs should process BSD-style prefix padding" >&5
7353 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7354
7355 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7356 if test "${enable_bsdpad+set}" = set; then
7357   enableval="$enable_bsdpad"
7358   with_bsdpad=$enableval
7359 else
7360   with_bsdpad=no
7361 fi;
7362 echo "$as_me:7362: result: $with_bsdpad" >&5
7363 echo "${ECHO_T}$with_bsdpad" >&6
7364 test "x$with_bsdpad" = xyes &&
7365 cat >>confdefs.h <<\EOF
7366 #define BSD_TPUTS 1
7367 EOF
7368
7369 ###   use option --enable-widec to turn on use of wide-character support
7370 NCURSES_CH_T=chtype
7371 NCURSES_LIBUTF8=0
7372
7373 NEED_WCHAR_H=0
7374 NCURSES_MBSTATE_T=0
7375 NCURSES_WCHAR_T=0
7376 NCURSES_WINT_T=0
7377
7378 # Check to define _XOPEN_SOURCE "automatically"
7379
7380 cf_XOPEN_SOURCE=500
7381 cf_POSIX_C_SOURCE=199506L
7382 cf_xopen_source=
7383
7384 case $host_os in #(vi
7385 aix[4-7]*) #(vi
7386         cf_xopen_source="-D_ALL_SOURCE"
7387         ;;
7388 cygwin|msys) #(vi
7389         cf_XOPEN_SOURCE=600
7390         ;;
7391 darwin[0-8].*) #(vi
7392         cf_xopen_source="-D_APPLE_C_SOURCE"
7393         ;;
7394 darwin*) #(vi
7395         cf_xopen_source="-D_DARWIN_C_SOURCE"
7396         cf_XOPEN_SOURCE=
7397         ;;
7398 freebsd*|dragonfly*) #(vi
7399         # 5.x headers associate
7400         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7401         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7402         cf_POSIX_C_SOURCE=200112L
7403         cf_XOPEN_SOURCE=600
7404         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7405         ;;
7406 hpux11*) #(vi
7407         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7408         ;;
7409 hpux*) #(vi
7410         cf_xopen_source="-D_HPUX_SOURCE"
7411         ;;
7412 irix[56].*) #(vi
7413         cf_xopen_source="-D_SGI_SOURCE"
7414         cf_XOPEN_SOURCE=
7415         ;;
7416 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7417
7418 echo "$as_me:7418: checking if we must define _GNU_SOURCE" >&5
7419 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7420 if test "${cf_cv_gnu_source+set}" = set; then
7421   echo $ECHO_N "(cached) $ECHO_C" >&6
7422 else
7423
7424 cat >conftest.$ac_ext <<_ACEOF
7425 #line 7425 "configure"
7426 #include "confdefs.h"
7427 #include <sys/types.h>
7428 int
7429 main ()
7430 {
7431
7432 #ifndef _XOPEN_SOURCE
7433 make an error
7434 #endif
7435   ;
7436   return 0;
7437 }
7438 _ACEOF
7439 rm -f conftest.$ac_objext
7440 if { (eval echo "$as_me:7440: \"$ac_compile\"") >&5
7441   (eval $ac_compile) 2>&5
7442   ac_status=$?
7443   echo "$as_me:7443: \$? = $ac_status" >&5
7444   (exit $ac_status); } &&
7445          { ac_try='test -s conftest.$ac_objext'
7446   { (eval echo "$as_me:7446: \"$ac_try\"") >&5
7447   (eval $ac_try) 2>&5
7448   ac_status=$?
7449   echo "$as_me:7449: \$? = $ac_status" >&5
7450   (exit $ac_status); }; }; then
7451   cf_cv_gnu_source=no
7452 else
7453   echo "$as_me: failed program was:" >&5
7454 cat conftest.$ac_ext >&5
7455 cf_save="$CPPFLAGS"
7456          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7457          cat >conftest.$ac_ext <<_ACEOF
7458 #line 7458 "configure"
7459 #include "confdefs.h"
7460 #include <sys/types.h>
7461 int
7462 main ()
7463 {
7464
7465 #ifdef _XOPEN_SOURCE
7466 make an error
7467 #endif
7468   ;
7469   return 0;
7470 }
7471 _ACEOF
7472 rm -f conftest.$ac_objext
7473 if { (eval echo "$as_me:7473: \"$ac_compile\"") >&5
7474   (eval $ac_compile) 2>&5
7475   ac_status=$?
7476   echo "$as_me:7476: \$? = $ac_status" >&5
7477   (exit $ac_status); } &&
7478          { ac_try='test -s conftest.$ac_objext'
7479   { (eval echo "$as_me:7479: \"$ac_try\"") >&5
7480   (eval $ac_try) 2>&5
7481   ac_status=$?
7482   echo "$as_me:7482: \$? = $ac_status" >&5
7483   (exit $ac_status); }; }; then
7484   cf_cv_gnu_source=no
7485 else
7486   echo "$as_me: failed program was:" >&5
7487 cat conftest.$ac_ext >&5
7488 cf_cv_gnu_source=yes
7489 fi
7490 rm -f conftest.$ac_objext conftest.$ac_ext
7491         CPPFLAGS="$cf_save"
7492
7493 fi
7494 rm -f conftest.$ac_objext conftest.$ac_ext
7495
7496 fi
7497 echo "$as_me:7497: result: $cf_cv_gnu_source" >&5
7498 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7499 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7500
7501         ;;
7502 minix*) #(vi
7503         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7504         ;;
7505 mirbsd*) #(vi
7506         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7507         cf_XOPEN_SOURCE=
7508
7509 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7510
7511 cf_save_CFLAGS="$CFLAGS"
7512 cf_save_CPPFLAGS="$CPPFLAGS"
7513
7514 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7515         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7516                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7517
7518 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7519         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7520                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7521
7522 echo "$as_me:7522: checking if we should define _POSIX_C_SOURCE" >&5
7523 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7524 if test "${cf_cv_posix_c_source+set}" = set; then
7525   echo $ECHO_N "(cached) $ECHO_C" >&6
7526 else
7527
7528 echo "${as_me:-configure}:7528: testing if the symbol is already defined go no further ..." 1>&5
7529
7530         cat >conftest.$ac_ext <<_ACEOF
7531 #line 7531 "configure"
7532 #include "confdefs.h"
7533 #include <sys/types.h>
7534 int
7535 main ()
7536 {
7537
7538 #ifndef _POSIX_C_SOURCE
7539 make an error
7540 #endif
7541   ;
7542   return 0;
7543 }
7544 _ACEOF
7545 rm -f conftest.$ac_objext
7546 if { (eval echo "$as_me:7546: \"$ac_compile\"") >&5
7547   (eval $ac_compile) 2>&5
7548   ac_status=$?
7549   echo "$as_me:7549: \$? = $ac_status" >&5
7550   (exit $ac_status); } &&
7551          { ac_try='test -s conftest.$ac_objext'
7552   { (eval echo "$as_me:7552: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); }; }; then
7557   cf_cv_posix_c_source=no
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
7561 cf_want_posix_source=no
7562          case .$cf_POSIX_C_SOURCE in #(vi
7563          .[12]??*) #(vi
7564                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7565                 ;;
7566          .2) #(vi
7567                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7568                 cf_want_posix_source=yes
7569                 ;;
7570          .*)
7571                 cf_want_posix_source=yes
7572                 ;;
7573          esac
7574          if test "$cf_want_posix_source" = yes ; then
7575                 cat >conftest.$ac_ext <<_ACEOF
7576 #line 7576 "configure"
7577 #include "confdefs.h"
7578 #include <sys/types.h>
7579 int
7580 main ()
7581 {
7582
7583 #ifdef _POSIX_SOURCE
7584 make an error
7585 #endif
7586   ;
7587   return 0;
7588 }
7589 _ACEOF
7590 rm -f conftest.$ac_objext
7591 if { (eval echo "$as_me:7591: \"$ac_compile\"") >&5
7592   (eval $ac_compile) 2>&5
7593   ac_status=$?
7594   echo "$as_me:7594: \$? = $ac_status" >&5
7595   (exit $ac_status); } &&
7596          { ac_try='test -s conftest.$ac_objext'
7597   { (eval echo "$as_me:7597: \"$ac_try\"") >&5
7598   (eval $ac_try) 2>&5
7599   ac_status=$?
7600   echo "$as_me:7600: \$? = $ac_status" >&5
7601   (exit $ac_status); }; }; then
7602   :
7603 else
7604   echo "$as_me: failed program was:" >&5
7605 cat conftest.$ac_ext >&5
7606 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7607 fi
7608 rm -f conftest.$ac_objext conftest.$ac_ext
7609          fi
7610
7611 echo "${as_me:-configure}:7611: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7612
7613          CFLAGS="$cf_trim_CFLAGS"
7614          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7615
7616 echo "${as_me:-configure}:7616: testing if the second compile does not leave our definition intact error ..." 1>&5
7617
7618          cat >conftest.$ac_ext <<_ACEOF
7619 #line 7619 "configure"
7620 #include "confdefs.h"
7621 #include <sys/types.h>
7622 int
7623 main ()
7624 {
7625
7626 #ifndef _POSIX_C_SOURCE
7627 make an error
7628 #endif
7629   ;
7630   return 0;
7631 }
7632 _ACEOF
7633 rm -f conftest.$ac_objext
7634 if { (eval echo "$as_me:7634: \"$ac_compile\"") >&5
7635   (eval $ac_compile) 2>&5
7636   ac_status=$?
7637   echo "$as_me:7637: \$? = $ac_status" >&5
7638   (exit $ac_status); } &&
7639          { ac_try='test -s conftest.$ac_objext'
7640   { (eval echo "$as_me:7640: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:7643: \$? = $ac_status" >&5
7644   (exit $ac_status); }; }; then
7645   :
7646 else
7647   echo "$as_me: failed program was:" >&5
7648 cat conftest.$ac_ext >&5
7649 cf_cv_posix_c_source=no
7650 fi
7651 rm -f conftest.$ac_objext conftest.$ac_ext
7652          CFLAGS="$cf_save_CFLAGS"
7653          CPPFLAGS="$cf_save_CPPFLAGS"
7654
7655 fi
7656 rm -f conftest.$ac_objext conftest.$ac_ext
7657
7658 fi
7659 echo "$as_me:7659: result: $cf_cv_posix_c_source" >&5
7660 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7661
7662 if test "$cf_cv_posix_c_source" != no ; then
7663         CFLAGS="$cf_trim_CFLAGS"
7664         CPPFLAGS="$cf_trim_CPPFLAGS"
7665
7666 cf_fix_cppflags=no
7667 cf_new_cflags=
7668 cf_new_cppflags=
7669 cf_new_extra_cppflags=
7670
7671 for cf_add_cflags in $cf_cv_posix_c_source
7672 do
7673 case $cf_fix_cppflags in
7674 no)
7675         case $cf_add_cflags in #(vi
7676         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7677                 case $cf_add_cflags in
7678                 -D*)
7679                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7680
7681                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7682                                 && test -z "${cf_tst_cflags}" \
7683                                 && cf_fix_cppflags=yes
7684
7685                         if test $cf_fix_cppflags = yes ; then
7686                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7687                                 continue
7688                         elif test "${cf_tst_cflags}" = "\"'" ; then
7689                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7690                                 continue
7691                         fi
7692                         ;;
7693                 esac
7694                 case "$CPPFLAGS" in
7695                 *$cf_add_cflags) #(vi
7696                         ;;
7697                 *) #(vi
7698                         case $cf_add_cflags in #(vi
7699                         -D*)
7700                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7701
7702 CPPFLAGS=`echo "$CPPFLAGS" | \
7703         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7704                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7705
7706                                 ;;
7707                         esac
7708                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7709                         ;;
7710                 esac
7711                 ;;
7712         *)
7713                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7714                 ;;
7715         esac
7716         ;;
7717 yes)
7718         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7719
7720         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7721
7722         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7723                 && test -z "${cf_tst_cflags}" \
7724                 && cf_fix_cppflags=no
7725         ;;
7726 esac
7727 done
7728
7729 if test -n "$cf_new_cflags" ; then
7730
7731         CFLAGS="$CFLAGS $cf_new_cflags"
7732 fi
7733
7734 if test -n "$cf_new_cppflags" ; then
7735
7736         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7737 fi
7738
7739 if test -n "$cf_new_extra_cppflags" ; then
7740
7741         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7742 fi
7743
7744 fi
7745
7746         ;;
7747 netbsd*) #(vi
7748         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7749         ;;
7750 openbsd[4-9]*) #(vi
7751         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7752         cf_xopen_source="-D_BSD_SOURCE"
7753         cf_XOPEN_SOURCE=600
7754         ;;
7755 openbsd*) #(vi
7756         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7757         ;;
7758 osf[45]*) #(vi
7759         cf_xopen_source="-D_OSF_SOURCE"
7760         ;;
7761 nto-qnx*) #(vi
7762         cf_xopen_source="-D_QNX_SOURCE"
7763         ;;
7764 sco*) #(vi
7765         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7766         ;;
7767 solaris2.*) #(vi
7768         cf_xopen_source="-D__EXTENSIONS__"
7769         cf_cv_xopen_source=broken
7770         ;;
7771 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
7772         cf_XOPEN_SOURCE=
7773         cf_POSIX_C_SOURCE=
7774         ;;
7775 *)
7776
7777 echo "$as_me:7777: checking if we should define _XOPEN_SOURCE" >&5
7778 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7779 if test "${cf_cv_xopen_source+set}" = set; then
7780   echo $ECHO_N "(cached) $ECHO_C" >&6
7781 else
7782
7783         cat >conftest.$ac_ext <<_ACEOF
7784 #line 7784 "configure"
7785 #include "confdefs.h"
7786
7787 #include <stdlib.h>
7788 #include <string.h>
7789 #include <sys/types.h>
7790
7791 int
7792 main ()
7793 {
7794
7795 #ifndef _XOPEN_SOURCE
7796 make an error
7797 #endif
7798   ;
7799   return 0;
7800 }
7801 _ACEOF
7802 rm -f conftest.$ac_objext
7803 if { (eval echo "$as_me:7803: \"$ac_compile\"") >&5
7804   (eval $ac_compile) 2>&5
7805   ac_status=$?
7806   echo "$as_me:7806: \$? = $ac_status" >&5
7807   (exit $ac_status); } &&
7808          { ac_try='test -s conftest.$ac_objext'
7809   { (eval echo "$as_me:7809: \"$ac_try\"") >&5
7810   (eval $ac_try) 2>&5
7811   ac_status=$?
7812   echo "$as_me:7812: \$? = $ac_status" >&5
7813   (exit $ac_status); }; }; then
7814   cf_cv_xopen_source=no
7815 else
7816   echo "$as_me: failed program was:" >&5
7817 cat conftest.$ac_ext >&5
7818 cf_save="$CPPFLAGS"
7819          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7820          cat >conftest.$ac_ext <<_ACEOF
7821 #line 7821 "configure"
7822 #include "confdefs.h"
7823
7824 #include <stdlib.h>
7825 #include <string.h>
7826 #include <sys/types.h>
7827
7828 int
7829 main ()
7830 {
7831
7832 #ifdef _XOPEN_SOURCE
7833 make an error
7834 #endif
7835   ;
7836   return 0;
7837 }
7838 _ACEOF
7839 rm -f conftest.$ac_objext
7840 if { (eval echo "$as_me:7840: \"$ac_compile\"") >&5
7841   (eval $ac_compile) 2>&5
7842   ac_status=$?
7843   echo "$as_me:7843: \$? = $ac_status" >&5
7844   (exit $ac_status); } &&
7845          { ac_try='test -s conftest.$ac_objext'
7846   { (eval echo "$as_me:7846: \"$ac_try\"") >&5
7847   (eval $ac_try) 2>&5
7848   ac_status=$?
7849   echo "$as_me:7849: \$? = $ac_status" >&5
7850   (exit $ac_status); }; }; then
7851   cf_cv_xopen_source=no
7852 else
7853   echo "$as_me: failed program was:" >&5
7854 cat conftest.$ac_ext >&5
7855 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7856 fi
7857 rm -f conftest.$ac_objext conftest.$ac_ext
7858         CPPFLAGS="$cf_save"
7859
7860 fi
7861 rm -f conftest.$ac_objext conftest.$ac_ext
7862
7863 fi
7864 echo "$as_me:7864: result: $cf_cv_xopen_source" >&5
7865 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7866
7867 if test "$cf_cv_xopen_source" != no ; then
7868
7869 CFLAGS=`echo "$CFLAGS" | \
7870         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7871                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7872
7873 CPPFLAGS=`echo "$CPPFLAGS" | \
7874         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7875                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7876
7877         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7878
7879 cf_fix_cppflags=no
7880 cf_new_cflags=
7881 cf_new_cppflags=
7882 cf_new_extra_cppflags=
7883
7884 for cf_add_cflags in $cf_temp_xopen_source
7885 do
7886 case $cf_fix_cppflags in
7887 no)
7888         case $cf_add_cflags in #(vi
7889         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7890                 case $cf_add_cflags in
7891                 -D*)
7892                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7893
7894                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7895                                 && test -z "${cf_tst_cflags}" \
7896                                 && cf_fix_cppflags=yes
7897
7898                         if test $cf_fix_cppflags = yes ; then
7899                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7900                                 continue
7901                         elif test "${cf_tst_cflags}" = "\"'" ; then
7902                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7903                                 continue
7904                         fi
7905                         ;;
7906                 esac
7907                 case "$CPPFLAGS" in
7908                 *$cf_add_cflags) #(vi
7909                         ;;
7910                 *) #(vi
7911                         case $cf_add_cflags in #(vi
7912                         -D*)
7913                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7914
7915 CPPFLAGS=`echo "$CPPFLAGS" | \
7916         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7917                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7918
7919                                 ;;
7920                         esac
7921                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7922                         ;;
7923                 esac
7924                 ;;
7925         *)
7926                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7927                 ;;
7928         esac
7929         ;;
7930 yes)
7931         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7932
7933         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7934
7935         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7936                 && test -z "${cf_tst_cflags}" \
7937                 && cf_fix_cppflags=no
7938         ;;
7939 esac
7940 done
7941
7942 if test -n "$cf_new_cflags" ; then
7943
7944         CFLAGS="$CFLAGS $cf_new_cflags"
7945 fi
7946
7947 if test -n "$cf_new_cppflags" ; then
7948
7949         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7950 fi
7951
7952 if test -n "$cf_new_extra_cppflags" ; then
7953
7954         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7955 fi
7956
7957 fi
7958
7959 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7960
7961 cf_save_CFLAGS="$CFLAGS"
7962 cf_save_CPPFLAGS="$CPPFLAGS"
7963
7964 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7965         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7966                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7967
7968 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7969         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7970                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7971
7972 echo "$as_me:7972: checking if we should define _POSIX_C_SOURCE" >&5
7973 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7974 if test "${cf_cv_posix_c_source+set}" = set; then
7975   echo $ECHO_N "(cached) $ECHO_C" >&6
7976 else
7977
7978 echo "${as_me:-configure}:7978: testing if the symbol is already defined go no further ..." 1>&5
7979
7980         cat >conftest.$ac_ext <<_ACEOF
7981 #line 7981 "configure"
7982 #include "confdefs.h"
7983 #include <sys/types.h>
7984 int
7985 main ()
7986 {
7987
7988 #ifndef _POSIX_C_SOURCE
7989 make an error
7990 #endif
7991   ;
7992   return 0;
7993 }
7994 _ACEOF
7995 rm -f conftest.$ac_objext
7996 if { (eval echo "$as_me:7996: \"$ac_compile\"") >&5
7997   (eval $ac_compile) 2>&5
7998   ac_status=$?
7999   echo "$as_me:7999: \$? = $ac_status" >&5
8000   (exit $ac_status); } &&
8001          { ac_try='test -s conftest.$ac_objext'
8002   { (eval echo "$as_me:8002: \"$ac_try\"") >&5
8003   (eval $ac_try) 2>&5
8004   ac_status=$?
8005   echo "$as_me:8005: \$? = $ac_status" >&5
8006   (exit $ac_status); }; }; then
8007   cf_cv_posix_c_source=no
8008 else
8009   echo "$as_me: failed program was:" >&5
8010 cat conftest.$ac_ext >&5
8011 cf_want_posix_source=no
8012          case .$cf_POSIX_C_SOURCE in #(vi
8013          .[12]??*) #(vi
8014                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8015                 ;;
8016          .2) #(vi
8017                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8018                 cf_want_posix_source=yes
8019                 ;;
8020          .*)
8021                 cf_want_posix_source=yes
8022                 ;;
8023          esac
8024          if test "$cf_want_posix_source" = yes ; then
8025                 cat >conftest.$ac_ext <<_ACEOF
8026 #line 8026 "configure"
8027 #include "confdefs.h"
8028 #include <sys/types.h>
8029 int
8030 main ()
8031 {
8032
8033 #ifdef _POSIX_SOURCE
8034 make an error
8035 #endif
8036   ;
8037   return 0;
8038 }
8039 _ACEOF
8040 rm -f conftest.$ac_objext
8041 if { (eval echo "$as_me:8041: \"$ac_compile\"") >&5
8042   (eval $ac_compile) 2>&5
8043   ac_status=$?
8044   echo "$as_me:8044: \$? = $ac_status" >&5
8045   (exit $ac_status); } &&
8046          { ac_try='test -s conftest.$ac_objext'
8047   { (eval echo "$as_me:8047: \"$ac_try\"") >&5
8048   (eval $ac_try) 2>&5
8049   ac_status=$?
8050   echo "$as_me:8050: \$? = $ac_status" >&5
8051   (exit $ac_status); }; }; then
8052   :
8053 else
8054   echo "$as_me: failed program was:" >&5
8055 cat conftest.$ac_ext >&5
8056 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8057 fi
8058 rm -f conftest.$ac_objext conftest.$ac_ext
8059          fi
8060
8061 echo "${as_me:-configure}:8061: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8062
8063          CFLAGS="$cf_trim_CFLAGS"
8064          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8065
8066 echo "${as_me:-configure}:8066: testing if the second compile does not leave our definition intact error ..." 1>&5
8067
8068          cat >conftest.$ac_ext <<_ACEOF
8069 #line 8069 "configure"
8070 #include "confdefs.h"
8071 #include <sys/types.h>
8072 int
8073 main ()
8074 {
8075
8076 #ifndef _POSIX_C_SOURCE
8077 make an error
8078 #endif
8079   ;
8080   return 0;
8081 }
8082 _ACEOF
8083 rm -f conftest.$ac_objext
8084 if { (eval echo "$as_me:8084: \"$ac_compile\"") >&5
8085   (eval $ac_compile) 2>&5
8086   ac_status=$?
8087   echo "$as_me:8087: \$? = $ac_status" >&5
8088   (exit $ac_status); } &&
8089          { ac_try='test -s conftest.$ac_objext'
8090   { (eval echo "$as_me:8090: \"$ac_try\"") >&5
8091   (eval $ac_try) 2>&5
8092   ac_status=$?
8093   echo "$as_me:8093: \$? = $ac_status" >&5
8094   (exit $ac_status); }; }; then
8095   :
8096 else
8097   echo "$as_me: failed program was:" >&5
8098 cat conftest.$ac_ext >&5
8099 cf_cv_posix_c_source=no
8100 fi
8101 rm -f conftest.$ac_objext conftest.$ac_ext
8102          CFLAGS="$cf_save_CFLAGS"
8103          CPPFLAGS="$cf_save_CPPFLAGS"
8104
8105 fi
8106 rm -f conftest.$ac_objext conftest.$ac_ext
8107
8108 fi
8109 echo "$as_me:8109: result: $cf_cv_posix_c_source" >&5
8110 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8111
8112 if test "$cf_cv_posix_c_source" != no ; then
8113         CFLAGS="$cf_trim_CFLAGS"
8114         CPPFLAGS="$cf_trim_CPPFLAGS"
8115
8116 cf_fix_cppflags=no
8117 cf_new_cflags=
8118 cf_new_cppflags=
8119 cf_new_extra_cppflags=
8120
8121 for cf_add_cflags in $cf_cv_posix_c_source
8122 do
8123 case $cf_fix_cppflags in
8124 no)
8125         case $cf_add_cflags in #(vi
8126         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8127                 case $cf_add_cflags in
8128                 -D*)
8129                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8130
8131                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8132                                 && test -z "${cf_tst_cflags}" \
8133                                 && cf_fix_cppflags=yes
8134
8135                         if test $cf_fix_cppflags = yes ; then
8136                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8137                                 continue
8138                         elif test "${cf_tst_cflags}" = "\"'" ; then
8139                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8140                                 continue
8141                         fi
8142                         ;;
8143                 esac
8144                 case "$CPPFLAGS" in
8145                 *$cf_add_cflags) #(vi
8146                         ;;
8147                 *) #(vi
8148                         case $cf_add_cflags in #(vi
8149                         -D*)
8150                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8151
8152 CPPFLAGS=`echo "$CPPFLAGS" | \
8153         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8154                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8155
8156                                 ;;
8157                         esac
8158                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8159                         ;;
8160                 esac
8161                 ;;
8162         *)
8163                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8164                 ;;
8165         esac
8166         ;;
8167 yes)
8168         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8169
8170         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8171
8172         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8173                 && test -z "${cf_tst_cflags}" \
8174                 && cf_fix_cppflags=no
8175         ;;
8176 esac
8177 done
8178
8179 if test -n "$cf_new_cflags" ; then
8180
8181         CFLAGS="$CFLAGS $cf_new_cflags"
8182 fi
8183
8184 if test -n "$cf_new_cppflags" ; then
8185
8186         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8187 fi
8188
8189 if test -n "$cf_new_extra_cppflags" ; then
8190
8191         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8192 fi
8193
8194 fi
8195
8196         ;;
8197 esac
8198
8199 if test -n "$cf_xopen_source" ; then
8200
8201 cf_fix_cppflags=no
8202 cf_new_cflags=
8203 cf_new_cppflags=
8204 cf_new_extra_cppflags=
8205
8206 for cf_add_cflags in $cf_xopen_source
8207 do
8208 case $cf_fix_cppflags in
8209 no)
8210         case $cf_add_cflags in #(vi
8211         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8212                 case $cf_add_cflags in
8213                 -D*)
8214                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8215
8216                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8217                                 && test -z "${cf_tst_cflags}" \
8218                                 && cf_fix_cppflags=yes
8219
8220                         if test $cf_fix_cppflags = yes ; then
8221                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8222                                 continue
8223                         elif test "${cf_tst_cflags}" = "\"'" ; then
8224                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8225                                 continue
8226                         fi
8227                         ;;
8228                 esac
8229                 case "$CPPFLAGS" in
8230                 *$cf_add_cflags) #(vi
8231                         ;;
8232                 *) #(vi
8233                         case $cf_add_cflags in #(vi
8234                         -D*)
8235                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8236
8237 CPPFLAGS=`echo "$CPPFLAGS" | \
8238         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8239                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8240
8241                                 ;;
8242                         esac
8243                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8244                         ;;
8245                 esac
8246                 ;;
8247         *)
8248                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8249                 ;;
8250         esac
8251         ;;
8252 yes)
8253         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8254
8255         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8256
8257         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8258                 && test -z "${cf_tst_cflags}" \
8259                 && cf_fix_cppflags=no
8260         ;;
8261 esac
8262 done
8263
8264 if test -n "$cf_new_cflags" ; then
8265         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8266
8267 echo "${as_me:-configure}:8267: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8268
8269         CFLAGS="$CFLAGS $cf_new_cflags"
8270 fi
8271
8272 if test -n "$cf_new_cppflags" ; then
8273         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8274
8275 echo "${as_me:-configure}:8275: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8276
8277         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8278 fi
8279
8280 if test -n "$cf_new_extra_cppflags" ; then
8281         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8282
8283 echo "${as_me:-configure}:8283: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8284
8285         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8286 fi
8287
8288 fi
8289
8290 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8291         echo "$as_me:8291: checking if _XOPEN_SOURCE really is set" >&5
8292 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8293         cat >conftest.$ac_ext <<_ACEOF
8294 #line 8294 "configure"
8295 #include "confdefs.h"
8296 #include <stdlib.h>
8297 int
8298 main ()
8299 {
8300
8301 #ifndef _XOPEN_SOURCE
8302 make an error
8303 #endif
8304   ;
8305   return 0;
8306 }
8307 _ACEOF
8308 rm -f conftest.$ac_objext
8309 if { (eval echo "$as_me:8309: \"$ac_compile\"") >&5
8310   (eval $ac_compile) 2>&5
8311   ac_status=$?
8312   echo "$as_me:8312: \$? = $ac_status" >&5
8313   (exit $ac_status); } &&
8314          { ac_try='test -s conftest.$ac_objext'
8315   { (eval echo "$as_me:8315: \"$ac_try\"") >&5
8316   (eval $ac_try) 2>&5
8317   ac_status=$?
8318   echo "$as_me:8318: \$? = $ac_status" >&5
8319   (exit $ac_status); }; }; then
8320   cf_XOPEN_SOURCE_set=yes
8321 else
8322   echo "$as_me: failed program was:" >&5
8323 cat conftest.$ac_ext >&5
8324 cf_XOPEN_SOURCE_set=no
8325 fi
8326 rm -f conftest.$ac_objext conftest.$ac_ext
8327         echo "$as_me:8327: result: $cf_XOPEN_SOURCE_set" >&5
8328 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8329         if test $cf_XOPEN_SOURCE_set = yes
8330         then
8331                 cat >conftest.$ac_ext <<_ACEOF
8332 #line 8332 "configure"
8333 #include "confdefs.h"
8334 #include <stdlib.h>
8335 int
8336 main ()
8337 {
8338
8339 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8340 make an error
8341 #endif
8342   ;
8343   return 0;
8344 }
8345 _ACEOF
8346 rm -f conftest.$ac_objext
8347 if { (eval echo "$as_me:8347: \"$ac_compile\"") >&5
8348   (eval $ac_compile) 2>&5
8349   ac_status=$?
8350   echo "$as_me:8350: \$? = $ac_status" >&5
8351   (exit $ac_status); } &&
8352          { ac_try='test -s conftest.$ac_objext'
8353   { (eval echo "$as_me:8353: \"$ac_try\"") >&5
8354   (eval $ac_try) 2>&5
8355   ac_status=$?
8356   echo "$as_me:8356: \$? = $ac_status" >&5
8357   (exit $ac_status); }; }; then
8358   cf_XOPEN_SOURCE_set_ok=yes
8359 else
8360   echo "$as_me: failed program was:" >&5
8361 cat conftest.$ac_ext >&5
8362 cf_XOPEN_SOURCE_set_ok=no
8363 fi
8364 rm -f conftest.$ac_objext conftest.$ac_ext
8365                 if test $cf_XOPEN_SOURCE_set_ok = no
8366                 then
8367                         { echo "$as_me:8367: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8368 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8369                 fi
8370         else
8371
8372 echo "$as_me:8372: checking if we should define _XOPEN_SOURCE" >&5
8373 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8374 if test "${cf_cv_xopen_source+set}" = set; then
8375   echo $ECHO_N "(cached) $ECHO_C" >&6
8376 else
8377
8378         cat >conftest.$ac_ext <<_ACEOF
8379 #line 8379 "configure"
8380 #include "confdefs.h"
8381
8382 #include <stdlib.h>
8383 #include <string.h>
8384 #include <sys/types.h>
8385
8386 int
8387 main ()
8388 {
8389
8390 #ifndef _XOPEN_SOURCE
8391 make an error
8392 #endif
8393   ;
8394   return 0;
8395 }
8396 _ACEOF
8397 rm -f conftest.$ac_objext
8398 if { (eval echo "$as_me:8398: \"$ac_compile\"") >&5
8399   (eval $ac_compile) 2>&5
8400   ac_status=$?
8401   echo "$as_me:8401: \$? = $ac_status" >&5
8402   (exit $ac_status); } &&
8403          { ac_try='test -s conftest.$ac_objext'
8404   { (eval echo "$as_me:8404: \"$ac_try\"") >&5
8405   (eval $ac_try) 2>&5
8406   ac_status=$?
8407   echo "$as_me:8407: \$? = $ac_status" >&5
8408   (exit $ac_status); }; }; then
8409   cf_cv_xopen_source=no
8410 else
8411   echo "$as_me: failed program was:" >&5
8412 cat conftest.$ac_ext >&5
8413 cf_save="$CPPFLAGS"
8414          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8415          cat >conftest.$ac_ext <<_ACEOF
8416 #line 8416 "configure"
8417 #include "confdefs.h"
8418
8419 #include <stdlib.h>
8420 #include <string.h>
8421 #include <sys/types.h>
8422
8423 int
8424 main ()
8425 {
8426
8427 #ifdef _XOPEN_SOURCE
8428 make an error
8429 #endif
8430   ;
8431   return 0;
8432 }
8433 _ACEOF
8434 rm -f conftest.$ac_objext
8435 if { (eval echo "$as_me:8435: \"$ac_compile\"") >&5
8436   (eval $ac_compile) 2>&5
8437   ac_status=$?
8438   echo "$as_me:8438: \$? = $ac_status" >&5
8439   (exit $ac_status); } &&
8440          { ac_try='test -s conftest.$ac_objext'
8441   { (eval echo "$as_me:8441: \"$ac_try\"") >&5
8442   (eval $ac_try) 2>&5
8443   ac_status=$?
8444   echo "$as_me:8444: \$? = $ac_status" >&5
8445   (exit $ac_status); }; }; then
8446   cf_cv_xopen_source=no
8447 else
8448   echo "$as_me: failed program was:" >&5
8449 cat conftest.$ac_ext >&5
8450 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8451 fi
8452 rm -f conftest.$ac_objext conftest.$ac_ext
8453         CPPFLAGS="$cf_save"
8454
8455 fi
8456 rm -f conftest.$ac_objext conftest.$ac_ext
8457
8458 fi
8459 echo "$as_me:8459: result: $cf_cv_xopen_source" >&5
8460 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8461
8462 if test "$cf_cv_xopen_source" != no ; then
8463
8464 CFLAGS=`echo "$CFLAGS" | \
8465         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8466                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8467
8468 CPPFLAGS=`echo "$CPPFLAGS" | \
8469         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8470                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8471
8472         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8473
8474 cf_fix_cppflags=no
8475 cf_new_cflags=
8476 cf_new_cppflags=
8477 cf_new_extra_cppflags=
8478
8479 for cf_add_cflags in $cf_temp_xopen_source
8480 do
8481 case $cf_fix_cppflags in
8482 no)
8483         case $cf_add_cflags in #(vi
8484         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8485                 case $cf_add_cflags in
8486                 -D*)
8487                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8488
8489                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8490                                 && test -z "${cf_tst_cflags}" \
8491                                 && cf_fix_cppflags=yes
8492
8493                         if test $cf_fix_cppflags = yes ; then
8494                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8495                                 continue
8496                         elif test "${cf_tst_cflags}" = "\"'" ; then
8497                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8498                                 continue
8499                         fi
8500                         ;;
8501                 esac
8502                 case "$CPPFLAGS" in
8503                 *$cf_add_cflags) #(vi
8504                         ;;
8505                 *) #(vi
8506                         case $cf_add_cflags in #(vi
8507                         -D*)
8508                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8509
8510 CPPFLAGS=`echo "$CPPFLAGS" | \
8511         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8512                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8513
8514                                 ;;
8515                         esac
8516                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8517                         ;;
8518                 esac
8519                 ;;
8520         *)
8521                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8522                 ;;
8523         esac
8524         ;;
8525 yes)
8526         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8527
8528         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8529
8530         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8531                 && test -z "${cf_tst_cflags}" \
8532                 && cf_fix_cppflags=no
8533         ;;
8534 esac
8535 done
8536
8537 if test -n "$cf_new_cflags" ; then
8538
8539         CFLAGS="$CFLAGS $cf_new_cflags"
8540 fi
8541
8542 if test -n "$cf_new_cppflags" ; then
8543
8544         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8545 fi
8546
8547 if test -n "$cf_new_extra_cppflags" ; then
8548
8549         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8550 fi
8551
8552 fi
8553
8554         fi
8555 fi
8556
8557 # Work around breakage on OS X
8558
8559 echo "$as_me:8559: checking if SIGWINCH is defined" >&5
8560 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8561 if test "${cf_cv_define_sigwinch+set}" = set; then
8562   echo $ECHO_N "(cached) $ECHO_C" >&6
8563 else
8564
8565         cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568
8569 #include <sys/types.h>
8570 #include <sys/signal.h>
8571
8572 int
8573 main ()
8574 {
8575 int x = SIGWINCH
8576   ;
8577   return 0;
8578 }
8579 _ACEOF
8580 rm -f conftest.$ac_objext
8581 if { (eval echo "$as_me:8581: \"$ac_compile\"") >&5
8582   (eval $ac_compile) 2>&5
8583   ac_status=$?
8584   echo "$as_me:8584: \$? = $ac_status" >&5
8585   (exit $ac_status); } &&
8586          { ac_try='test -s conftest.$ac_objext'
8587   { (eval echo "$as_me:8587: \"$ac_try\"") >&5
8588   (eval $ac_try) 2>&5
8589   ac_status=$?
8590   echo "$as_me:8590: \$? = $ac_status" >&5
8591   (exit $ac_status); }; }; then
8592   cf_cv_define_sigwinch=yes
8593 else
8594   echo "$as_me: failed program was:" >&5
8595 cat conftest.$ac_ext >&5
8596 cat >conftest.$ac_ext <<_ACEOF
8597 #line 8597 "configure"
8598 #include "confdefs.h"
8599
8600 #undef _XOPEN_SOURCE
8601 #undef _POSIX_SOURCE
8602 #undef _POSIX_C_SOURCE
8603 #include <sys/types.h>
8604 #include <sys/signal.h>
8605
8606 int
8607 main ()
8608 {
8609 int x = SIGWINCH
8610   ;
8611   return 0;
8612 }
8613 _ACEOF
8614 rm -f conftest.$ac_objext
8615 if { (eval echo "$as_me:8615: \"$ac_compile\"") >&5
8616   (eval $ac_compile) 2>&5
8617   ac_status=$?
8618   echo "$as_me:8618: \$? = $ac_status" >&5
8619   (exit $ac_status); } &&
8620          { ac_try='test -s conftest.$ac_objext'
8621   { (eval echo "$as_me:8621: \"$ac_try\"") >&5
8622   (eval $ac_try) 2>&5
8623   ac_status=$?
8624   echo "$as_me:8624: \$? = $ac_status" >&5
8625   (exit $ac_status); }; }; then
8626   cf_cv_define_sigwinch=maybe
8627 else
8628   echo "$as_me: failed program was:" >&5
8629 cat conftest.$ac_ext >&5
8630 cf_cv_define_sigwinch=no
8631 fi
8632 rm -f conftest.$ac_objext conftest.$ac_ext
8633
8634 fi
8635 rm -f conftest.$ac_objext conftest.$ac_ext
8636
8637 fi
8638 echo "$as_me:8638: result: $cf_cv_define_sigwinch" >&5
8639 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8640
8641 if test "$cf_cv_define_sigwinch" = maybe ; then
8642 echo "$as_me:8642: checking for actual SIGWINCH definition" >&5
8643 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8644 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8645   echo $ECHO_N "(cached) $ECHO_C" >&6
8646 else
8647
8648 cf_cv_fixup_sigwinch=unknown
8649 cf_sigwinch=32
8650 while test $cf_sigwinch != 1
8651 do
8652         cat >conftest.$ac_ext <<_ACEOF
8653 #line 8653 "configure"
8654 #include "confdefs.h"
8655
8656 #undef _XOPEN_SOURCE
8657 #undef _POSIX_SOURCE
8658 #undef _POSIX_C_SOURCE
8659 #include <sys/types.h>
8660 #include <sys/signal.h>
8661
8662 int
8663 main ()
8664 {
8665
8666 #if SIGWINCH != $cf_sigwinch
8667 make an error
8668 #endif
8669 int x = SIGWINCH
8670   ;
8671   return 0;
8672 }
8673 _ACEOF
8674 rm -f conftest.$ac_objext
8675 if { (eval echo "$as_me:8675: \"$ac_compile\"") >&5
8676   (eval $ac_compile) 2>&5
8677   ac_status=$?
8678   echo "$as_me:8678: \$? = $ac_status" >&5
8679   (exit $ac_status); } &&
8680          { ac_try='test -s conftest.$ac_objext'
8681   { (eval echo "$as_me:8681: \"$ac_try\"") >&5
8682   (eval $ac_try) 2>&5
8683   ac_status=$?
8684   echo "$as_me:8684: \$? = $ac_status" >&5
8685   (exit $ac_status); }; }; then
8686   cf_cv_fixup_sigwinch=$cf_sigwinch
8687          break
8688 else
8689   echo "$as_me: failed program was:" >&5
8690 cat conftest.$ac_ext >&5
8691 fi
8692 rm -f conftest.$ac_objext conftest.$ac_ext
8693
8694 cf_sigwinch=`expr $cf_sigwinch - 1`
8695 done
8696
8697 fi
8698 echo "$as_me:8698: result: $cf_cv_fixup_sigwinch" >&5
8699 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8700
8701         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8702                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8703         fi
8704 fi
8705
8706 # Checks for CODESET support.
8707
8708   echo "$as_me:8708: checking for nl_langinfo and CODESET" >&5
8709 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8710 if test "${am_cv_langinfo_codeset+set}" = set; then
8711   echo $ECHO_N "(cached) $ECHO_C" >&6
8712 else
8713   cat >conftest.$ac_ext <<_ACEOF
8714 #line 8714 "configure"
8715 #include "confdefs.h"
8716 #include <langinfo.h>
8717 int
8718 main ()
8719 {
8720 char* cs = nl_langinfo(CODESET);
8721   ;
8722   return 0;
8723 }
8724 _ACEOF
8725 rm -f conftest.$ac_objext conftest$ac_exeext
8726 if { (eval echo "$as_me:8726: \"$ac_link\"") >&5
8727   (eval $ac_link) 2>&5
8728   ac_status=$?
8729   echo "$as_me:8729: \$? = $ac_status" >&5
8730   (exit $ac_status); } &&
8731          { ac_try='test -s conftest$ac_exeext'
8732   { (eval echo "$as_me:8732: \"$ac_try\"") >&5
8733   (eval $ac_try) 2>&5
8734   ac_status=$?
8735   echo "$as_me:8735: \$? = $ac_status" >&5
8736   (exit $ac_status); }; }; then
8737   am_cv_langinfo_codeset=yes
8738 else
8739   echo "$as_me: failed program was:" >&5
8740 cat conftest.$ac_ext >&5
8741 am_cv_langinfo_codeset=no
8742 fi
8743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8744
8745 fi
8746 echo "$as_me:8746: result: $am_cv_langinfo_codeset" >&5
8747 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8748   if test $am_cv_langinfo_codeset = yes; then
8749
8750 cat >>confdefs.h <<\EOF
8751 #define HAVE_LANGINFO_CODESET 1
8752 EOF
8753
8754   fi
8755
8756 # use these variables to work around a defect in gcc's fixincludes.
8757 NCURSES_OK_WCHAR_T=
8758 NCURSES_OK_WINT_T=
8759
8760 echo "$as_me:8760: checking if you want wide-character code" >&5
8761 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8762
8763 # Check whether --enable-widec or --disable-widec was given.
8764 if test "${enable_widec+set}" = set; then
8765   enableval="$enable_widec"
8766   with_widec=$enableval
8767 else
8768   with_widec=no
8769 fi;
8770 echo "$as_me:8770: result: $with_widec" >&5
8771 echo "${ECHO_T}$with_widec" >&6
8772 if test "x$with_widec" = xyes ; then
8773         if test "x$disable_lib_suffixes" = xno ; then
8774                 LIB_SUFFIX="w${LIB_SUFFIX}"
8775         fi
8776
8777 cat >>confdefs.h <<\EOF
8778 #define USE_WIDEC_SUPPORT 1
8779 EOF
8780
8781 cat >>confdefs.h <<\EOF
8782 #define NCURSES_WIDECHAR 1
8783 EOF
8784
8785 echo "$as_me:8785: checking if wchar.h can be used as is" >&5
8786 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8787 if test "${cf_cv_wchar_h_okay+set}" = set; then
8788   echo $ECHO_N "(cached) $ECHO_C" >&6
8789 else
8790
8791 cat >conftest.$ac_ext <<_ACEOF
8792 #line 8792 "configure"
8793 #include "confdefs.h"
8794
8795 #include <stdlib.h>
8796 #include <wchar.h>
8797
8798 int
8799 main ()
8800 {
8801
8802         wint_t foo = 0;
8803         int bar = iswpunct(foo)
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   cf_cv_wchar_h_okay=yes
8821 else
8822   echo "$as_me: failed program was:" >&5
8823 cat conftest.$ac_ext >&5
8824 cf_cv_wchar_h_okay=no
8825 fi
8826 rm -f conftest.$ac_objext conftest.$ac_ext
8827 fi
8828 echo "$as_me:8828: result: $cf_cv_wchar_h_okay" >&5
8829 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8830
8831 if test $cf_cv_wchar_h_okay = no
8832 then
8833
8834 echo "$as_me:8834: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8835 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8836 cat >conftest.$ac_ext <<_ACEOF
8837 #line 8837 "configure"
8838 #include "confdefs.h"
8839 #include <sys/types.h>
8840
8841 int
8842 main ()
8843 {
8844
8845 #ifndef _XOPEN_SOURCE_EXTENDED
8846 make an error
8847 #endif
8848   ;
8849   return 0;
8850 }
8851 _ACEOF
8852 rm -f conftest.$ac_objext
8853 if { (eval echo "$as_me:8853: \"$ac_compile\"") >&5
8854   (eval $ac_compile) 2>&5
8855   ac_status=$?
8856   echo "$as_me:8856: \$? = $ac_status" >&5
8857   (exit $ac_status); } &&
8858          { ac_try='test -s conftest.$ac_objext'
8859   { (eval echo "$as_me:8859: \"$ac_try\"") >&5
8860   (eval $ac_try) 2>&5
8861   ac_status=$?
8862   echo "$as_me:8862: \$? = $ac_status" >&5
8863   (exit $ac_status); }; }; then
8864   cf_result=no
8865 else
8866   echo "$as_me: failed program was:" >&5
8867 cat conftest.$ac_ext >&5
8868 cf_result=yes
8869 fi
8870 rm -f conftest.$ac_objext conftest.$ac_ext
8871 echo "$as_me:8871: result: $cf_result" >&5
8872 echo "${ECHO_T}$cf_result" >&6
8873
8874 if test "$cf_result" = yes ; then
8875         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8876 elif test "x" != "x" ; then
8877         echo "$as_me:8877: checking checking for compatible value versus " >&5
8878 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8879         cat >conftest.$ac_ext <<_ACEOF
8880 #line 8880 "configure"
8881 #include "confdefs.h"
8882 #include <sys/types.h>
8883
8884 int
8885 main ()
8886 {
8887
8888 #if _XOPEN_SOURCE_EXTENDED- < 0
8889 make an error
8890 #endif
8891   ;
8892   return 0;
8893 }
8894 _ACEOF
8895 rm -f conftest.$ac_objext
8896 if { (eval echo "$as_me:8896: \"$ac_compile\"") >&5
8897   (eval $ac_compile) 2>&5
8898   ac_status=$?
8899   echo "$as_me:8899: \$? = $ac_status" >&5
8900   (exit $ac_status); } &&
8901          { ac_try='test -s conftest.$ac_objext'
8902   { (eval echo "$as_me:8902: \"$ac_try\"") >&5
8903   (eval $ac_try) 2>&5
8904   ac_status=$?
8905   echo "$as_me:8905: \$? = $ac_status" >&5
8906   (exit $ac_status); }; }; then
8907   cf_result=yes
8908 else
8909   echo "$as_me: failed program was:" >&5
8910 cat conftest.$ac_ext >&5
8911 cf_result=no
8912 fi
8913 rm -f conftest.$ac_objext conftest.$ac_ext
8914         echo "$as_me:8914: result: $cf_result" >&5
8915 echo "${ECHO_T}$cf_result" >&6
8916         if test "$cf_result" = no ; then
8917                 # perhaps we can override it - try...
8918                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8919         fi
8920 fi
8921
8922 fi
8923
8924         # with_overwrite=no
8925         NCURSES_CH_T=cchar_t
8926
8927 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8928 do
8929 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8930 echo "$as_me:8930: checking for $ac_func" >&5
8931 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8932 if eval "test \"\${$as_ac_var+set}\" = set"; then
8933   echo $ECHO_N "(cached) $ECHO_C" >&6
8934 else
8935   cat >conftest.$ac_ext <<_ACEOF
8936 #line 8936 "configure"
8937 #include "confdefs.h"
8938 /* System header to define __stub macros and hopefully few prototypes,
8939     which can conflict with char $ac_func (); below.  */
8940 #include <assert.h>
8941 /* Override any gcc2 internal prototype to avoid an error.  */
8942 #ifdef __cplusplus
8943 extern "C"
8944 #endif
8945 /* We use char because int might match the return type of a gcc2
8946    builtin and then its argument prototype would still apply.  */
8947 char $ac_func ();
8948 char (*f) ();
8949
8950 int
8951 main ()
8952 {
8953 /* The GNU C library defines this for functions which it implements
8954     to always fail with ENOSYS.  Some functions are actually named
8955     something starting with __ and the normal name is an alias.  */
8956 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8957 choke me
8958 #else
8959 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8960 #endif
8961
8962   ;
8963   return 0;
8964 }
8965 _ACEOF
8966 rm -f conftest.$ac_objext conftest$ac_exeext
8967 if { (eval echo "$as_me:8967: \"$ac_link\"") >&5
8968   (eval $ac_link) 2>&5
8969   ac_status=$?
8970   echo "$as_me:8970: \$? = $ac_status" >&5
8971   (exit $ac_status); } &&
8972          { ac_try='test -s conftest$ac_exeext'
8973   { (eval echo "$as_me:8973: \"$ac_try\"") >&5
8974   (eval $ac_try) 2>&5
8975   ac_status=$?
8976   echo "$as_me:8976: \$? = $ac_status" >&5
8977   (exit $ac_status); }; }; then
8978   eval "$as_ac_var=yes"
8979 else
8980   echo "$as_me: failed program was:" >&5
8981 cat conftest.$ac_ext >&5
8982 eval "$as_ac_var=no"
8983 fi
8984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8985 fi
8986 echo "$as_me:8986: result: `eval echo '${'$as_ac_var'}'`" >&5
8987 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8988 if test `eval echo '${'$as_ac_var'}'` = yes; then
8989   cat >>confdefs.h <<EOF
8990 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8991 EOF
8992
8993 fi
8994 done
8995
8996         if test "x$ac_cv_func_putwc" != xyes ; then
8997
8998 echo "$as_me:8998: checking for multibyte character support" >&5
8999 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9000 if test "${cf_cv_utf8_lib+set}" = set; then
9001   echo $ECHO_N "(cached) $ECHO_C" >&6
9002 else
9003
9004         cf_save_LIBS="$LIBS"
9005         cat >conftest.$ac_ext <<_ACEOF
9006 #line 9006 "configure"
9007 #include "confdefs.h"
9008
9009 #include <stdlib.h>
9010 int
9011 main ()
9012 {
9013 putwc(0,0);
9014   ;
9015   return 0;
9016 }
9017 _ACEOF
9018 rm -f conftest.$ac_objext conftest$ac_exeext
9019 if { (eval echo "$as_me:9019: \"$ac_link\"") >&5
9020   (eval $ac_link) 2>&5
9021   ac_status=$?
9022   echo "$as_me:9022: \$? = $ac_status" >&5
9023   (exit $ac_status); } &&
9024          { ac_try='test -s conftest$ac_exeext'
9025   { (eval echo "$as_me:9025: \"$ac_try\"") >&5
9026   (eval $ac_try) 2>&5
9027   ac_status=$?
9028   echo "$as_me:9028: \$? = $ac_status" >&5
9029   (exit $ac_status); }; }; then
9030   cf_cv_utf8_lib=yes
9031 else
9032   echo "$as_me: failed program was:" >&5
9033 cat conftest.$ac_ext >&5
9034
9035 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9036 # will be set on completion of the AC_TRY_LINK below.
9037 cf_cv_header_path_utf8=
9038 cf_cv_library_path_utf8=
9039
9040 echo "${as_me:-configure}:9040: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9041
9042 cf_save_LIBS="$LIBS"
9043
9044 cat >conftest.$ac_ext <<_ACEOF
9045 #line 9045 "configure"
9046 #include "confdefs.h"
9047
9048 #include <libutf8.h>
9049 int
9050 main ()
9051 {
9052 putwc(0,0);
9053   ;
9054   return 0;
9055 }
9056 _ACEOF
9057 rm -f conftest.$ac_objext conftest$ac_exeext
9058 if { (eval echo "$as_me:9058: \"$ac_link\"") >&5
9059   (eval $ac_link) 2>&5
9060   ac_status=$?
9061   echo "$as_me:9061: \$? = $ac_status" >&5
9062   (exit $ac_status); } &&
9063          { ac_try='test -s conftest$ac_exeext'
9064   { (eval echo "$as_me:9064: \"$ac_try\"") >&5
9065   (eval $ac_try) 2>&5
9066   ac_status=$?
9067   echo "$as_me:9067: \$? = $ac_status" >&5
9068   (exit $ac_status); }; }; then
9069
9070         cf_cv_find_linkage_utf8=yes
9071         cf_cv_header_path_utf8=/usr/include
9072         cf_cv_library_path_utf8=/usr/lib
9073
9074 else
9075   echo "$as_me: failed program was:" >&5
9076 cat conftest.$ac_ext >&5
9077
9078 LIBS="-lutf8  $cf_save_LIBS"
9079
9080 cat >conftest.$ac_ext <<_ACEOF
9081 #line 9081 "configure"
9082 #include "confdefs.h"
9083
9084 #include <libutf8.h>
9085 int
9086 main ()
9087 {
9088 putwc(0,0);
9089   ;
9090   return 0;
9091 }
9092 _ACEOF
9093 rm -f conftest.$ac_objext conftest$ac_exeext
9094 if { (eval echo "$as_me:9094: \"$ac_link\"") >&5
9095   (eval $ac_link) 2>&5
9096   ac_status=$?
9097   echo "$as_me:9097: \$? = $ac_status" >&5
9098   (exit $ac_status); } &&
9099          { ac_try='test -s conftest$ac_exeext'
9100   { (eval echo "$as_me:9100: \"$ac_try\"") >&5
9101   (eval $ac_try) 2>&5
9102   ac_status=$?
9103   echo "$as_me:9103: \$? = $ac_status" >&5
9104   (exit $ac_status); }; }; then
9105
9106         cf_cv_find_linkage_utf8=yes
9107         cf_cv_header_path_utf8=/usr/include
9108         cf_cv_library_path_utf8=/usr/lib
9109         cf_cv_library_file_utf8="-lutf8"
9110
9111 else
9112   echo "$as_me: failed program was:" >&5
9113 cat conftest.$ac_ext >&5
9114
9115         cf_cv_find_linkage_utf8=no
9116         LIBS="$cf_save_LIBS"
9117
9118     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9119
9120 echo "${as_me:-configure}:9120: testing find linkage for utf8 library ..." 1>&5
9121
9122 echo "${as_me:-configure}:9122: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9123
9124     cf_save_CPPFLAGS="$CPPFLAGS"
9125     cf_test_CPPFLAGS="$CPPFLAGS"
9126
9127 cf_search=
9128
9129 # collect the current set of include-directories from compiler flags
9130 cf_header_path_list=""
9131 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9132         for cf_header_path in $CPPFLAGS $CFLAGS
9133         do
9134                 case $cf_header_path in #(vi
9135                 -I*)
9136                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9137
9138 test "x$cf_header_path" != "xNONE" && \
9139 test -d "$cf_header_path" && \
9140  {
9141         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9142         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9143         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9144         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9145         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9146         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9147 }
9148
9149                         cf_header_path_list="$cf_header_path_list $cf_search"
9150                         ;;
9151                 esac
9152         done
9153 fi
9154
9155 # add the variations for the package we are looking for
9156
9157 cf_search=
9158
9159 test "x/usr" != "x$prefix" && \
9160 test -d "/usr" && \
9161 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9162         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
9163         test -d /usr/include &&          cf_search="$cf_search /usr/include"
9164         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
9165         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
9166         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
9167         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
9168 }
9169
9170 test "x$prefix" != "xNONE" && \
9171 test -d "$prefix" && \
9172  {
9173         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9174         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9175         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9176         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9177         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9178         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9179 }
9180
9181 test "x/usr/local" != "x$prefix" && \
9182 test -d "/usr/local" && \
9183 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9184         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9185         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9186         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9187         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9188         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9189         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9190 }
9191
9192 test "x/opt" != "x$prefix" && \
9193 test -d "/opt" && \
9194 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9195         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9196         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9197         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9198         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9199         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9200         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9201 }
9202
9203 test "x$HOME" != "x$prefix" && \
9204 test -d "$HOME" && \
9205 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9206         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9207         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9208         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9209         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9210         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9211         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9212 }
9213
9214 test "$includedir" != NONE && \
9215 test "$includedir" != "/usr/include" && \
9216 test -d "$includedir" && {
9217         test -d $includedir &&    cf_search="$cf_search $includedir"
9218         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9219 }
9220
9221 test "$oldincludedir" != NONE && \
9222 test "$oldincludedir" != "/usr/include" && \
9223 test -d "$oldincludedir" && {
9224         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9225         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9226 }
9227
9228 cf_search="$cf_search $cf_header_path_list"
9229
9230     for cf_cv_header_path_utf8 in $cf_search
9231     do
9232       if test -d $cf_cv_header_path_utf8 ; then
9233         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9234
9235 echo "${as_me:-configure}:9235: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9236
9237         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9238         cat >conftest.$ac_ext <<_ACEOF
9239 #line 9239 "configure"
9240 #include "confdefs.h"
9241
9242 #include <libutf8.h>
9243 int
9244 main ()
9245 {
9246 putwc(0,0);
9247   ;
9248   return 0;
9249 }
9250 _ACEOF
9251 rm -f conftest.$ac_objext
9252 if { (eval echo "$as_me:9252: \"$ac_compile\"") >&5
9253   (eval $ac_compile) 2>&5
9254   ac_status=$?
9255   echo "$as_me:9255: \$? = $ac_status" >&5
9256   (exit $ac_status); } &&
9257          { ac_try='test -s conftest.$ac_objext'
9258   { (eval echo "$as_me:9258: \"$ac_try\"") >&5
9259   (eval $ac_try) 2>&5
9260   ac_status=$?
9261   echo "$as_me:9261: \$? = $ac_status" >&5
9262   (exit $ac_status); }; }; then
9263
9264             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9265
9266 echo "${as_me:-configure}:9266: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9267
9268             cf_cv_find_linkage_utf8=maybe
9269             cf_test_CPPFLAGS="$CPPFLAGS"
9270             break
9271 else
9272   echo "$as_me: failed program was:" >&5
9273 cat conftest.$ac_ext >&5
9274
9275             CPPFLAGS="$cf_save_CPPFLAGS"
9276
9277 fi
9278 rm -f conftest.$ac_objext conftest.$ac_ext
9279       fi
9280     done
9281
9282     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9283
9284 echo "${as_me:-configure}:9284: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9285
9286       cf_save_LIBS="$LIBS"
9287       cf_save_LDFLAGS="$LDFLAGS"
9288
9289       if test "$cf_cv_find_linkage_utf8" != yes ; then
9290
9291 cf_search=
9292 cf_library_path_list=""
9293 if test -n "${LDFLAGS}${LIBS}" ; then
9294         for cf_library_path in $LDFLAGS $LIBS
9295         do
9296                 case $cf_library_path in #(vi
9297                 -L*)
9298                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9299
9300 test "x$cf_library_path" != "xNONE" && \
9301 test -d "$cf_library_path" && \
9302  {
9303         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9304         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9305         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9306         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9307         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9308         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9309 }
9310
9311                         cf_library_path_list="$cf_library_path_list $cf_search"
9312                         ;;
9313                 esac
9314         done
9315 fi
9316
9317 cf_search=
9318
9319 test "x/usr" != "x$prefix" && \
9320 test -d "/usr" && \
9321 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9322         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9323         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9324         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9325         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9326         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9327         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9328 }
9329
9330 test "x$prefix" != "xNONE" && \
9331 test -d "$prefix" && \
9332  {
9333         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9334         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9335         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9336         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9337         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9338         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9339 }
9340
9341 test "x/usr/local" != "x$prefix" && \
9342 test -d "/usr/local" && \
9343 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9344         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9345         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9346         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9347         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9348         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9349         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9350 }
9351
9352 test "x/opt" != "x$prefix" && \
9353 test -d "/opt" && \
9354 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9355         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9356         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9357         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9358         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9359         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9360         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9361 }
9362
9363 test "x$HOME" != "x$prefix" && \
9364 test -d "$HOME" && \
9365 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9366         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9367         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9368         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9369         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9370         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9371         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9372 }
9373
9374 cf_search="$cf_library_path_list $cf_search"
9375
9376         for cf_cv_library_path_utf8 in $cf_search
9377         do
9378           if test -d $cf_cv_library_path_utf8 ; then
9379             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9380
9381 echo "${as_me:-configure}:9381: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9382
9383             CPPFLAGS="$cf_test_CPPFLAGS"
9384             LIBS="-lutf8  $cf_save_LIBS"
9385             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9386             cat >conftest.$ac_ext <<_ACEOF
9387 #line 9387 "configure"
9388 #include "confdefs.h"
9389
9390 #include <libutf8.h>
9391 int
9392 main ()
9393 {
9394 putwc(0,0);
9395   ;
9396   return 0;
9397 }
9398 _ACEOF
9399 rm -f conftest.$ac_objext conftest$ac_exeext
9400 if { (eval echo "$as_me:9400: \"$ac_link\"") >&5
9401   (eval $ac_link) 2>&5
9402   ac_status=$?
9403   echo "$as_me:9403: \$? = $ac_status" >&5
9404   (exit $ac_status); } &&
9405          { ac_try='test -s conftest$ac_exeext'
9406   { (eval echo "$as_me:9406: \"$ac_try\"") >&5
9407   (eval $ac_try) 2>&5
9408   ac_status=$?
9409   echo "$as_me:9409: \$? = $ac_status" >&5
9410   (exit $ac_status); }; }; then
9411
9412                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9413
9414 echo "${as_me:-configure}:9414: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9415
9416                 cf_cv_find_linkage_utf8=yes
9417                 cf_cv_library_file_utf8="-lutf8"
9418                 break
9419 else
9420   echo "$as_me: failed program was:" >&5
9421 cat conftest.$ac_ext >&5
9422
9423                 CPPFLAGS="$cf_save_CPPFLAGS"
9424                 LIBS="$cf_save_LIBS"
9425                 LDFLAGS="$cf_save_LDFLAGS"
9426
9427 fi
9428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9429           fi
9430         done
9431         CPPFLAGS="$cf_save_CPPFLAGS"
9432         LDFLAGS="$cf_save_LDFLAGS"
9433       fi
9434
9435     else
9436       cf_cv_find_linkage_utf8=no
9437     fi
9438
9439 fi
9440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9441
9442 fi
9443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9444
9445 LIBS="$cf_save_LIBS"
9446
9447 if test "$cf_cv_find_linkage_utf8" = yes ; then
9448 cf_cv_utf8_lib=add-on
9449 else
9450 cf_cv_utf8_lib=no
9451 fi
9452
9453 fi
9454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9455 fi
9456 echo "$as_me:9456: result: $cf_cv_utf8_lib" >&5
9457 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9458
9459 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9460 # ncurses/ncursesw:
9461 if test "$cf_cv_utf8_lib" = "add-on" ; then
9462
9463 cat >>confdefs.h <<\EOF
9464 #define HAVE_LIBUTF8_H 1
9465 EOF
9466
9467 if test -n "$cf_cv_header_path_utf8" ; then
9468   for cf_add_incdir in $cf_cv_header_path_utf8
9469   do
9470         while test $cf_add_incdir != /usr/include
9471         do
9472           if test -d $cf_add_incdir
9473           then
9474                 cf_have_incdir=no
9475                 if test -n "$CFLAGS$CPPFLAGS" ; then
9476                   # a loop is needed to ensure we can add subdirs of existing dirs
9477                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9478                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9479                           cf_have_incdir=yes; break
9480                         fi
9481                   done
9482                 fi
9483
9484                 if test "$cf_have_incdir" = no ; then
9485                   if test "$cf_add_incdir" = /usr/local/include ; then
9486                         if test "$GCC" = yes
9487                         then
9488                           cf_save_CPPFLAGS=$CPPFLAGS
9489                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9490                           cat >conftest.$ac_ext <<_ACEOF
9491 #line 9491 "configure"
9492 #include "confdefs.h"
9493 #include <stdio.h>
9494 int
9495 main ()
9496 {
9497 printf("Hello")
9498   ;
9499   return 0;
9500 }
9501 _ACEOF
9502 rm -f conftest.$ac_objext
9503 if { (eval echo "$as_me:9503: \"$ac_compile\"") >&5
9504   (eval $ac_compile) 2>&5
9505   ac_status=$?
9506   echo "$as_me:9506: \$? = $ac_status" >&5
9507   (exit $ac_status); } &&
9508          { ac_try='test -s conftest.$ac_objext'
9509   { (eval echo "$as_me:9509: \"$ac_try\"") >&5
9510   (eval $ac_try) 2>&5
9511   ac_status=$?
9512   echo "$as_me:9512: \$? = $ac_status" >&5
9513   (exit $ac_status); }; }; then
9514   :
9515 else
9516   echo "$as_me: failed program was:" >&5
9517 cat conftest.$ac_ext >&5
9518 cf_have_incdir=yes
9519 fi
9520 rm -f conftest.$ac_objext conftest.$ac_ext
9521                           CPPFLAGS=$cf_save_CPPFLAGS
9522                         fi
9523                   fi
9524                 fi
9525
9526                 if test "$cf_have_incdir" = no ; then
9527                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9528
9529 echo "${as_me:-configure}:9529: testing adding $cf_add_incdir to include-path ..." 1>&5
9530
9531                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9532
9533                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9534                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9535                   cf_add_incdir="$cf_top_incdir"
9536                 else
9537                   break
9538                 fi
9539           fi
9540         done
9541   done
9542 fi
9543
9544 if test -n "$cf_cv_library_path_utf8" ; then
9545   for cf_add_libdir in $cf_cv_library_path_utf8
9546   do
9547     if test $cf_add_libdir = /usr/lib ; then
9548       :
9549     elif test -d $cf_add_libdir
9550     then
9551       cf_have_libdir=no
9552       if test -n "$LDFLAGS$LIBS" ; then
9553         # a loop is needed to ensure we can add subdirs of existing dirs
9554         for cf_test_libdir in $LDFLAGS $LIBS ; do
9555           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9556             cf_have_libdir=yes; break
9557           fi
9558         done
9559       fi
9560       if test "$cf_have_libdir" = no ; then
9561         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9562
9563 echo "${as_me:-configure}:9563: testing adding $cf_add_libdir to library-path ..." 1>&5
9564
9565         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9566       fi
9567     fi
9568   done
9569 fi
9570
9571 cf_add_libs="$cf_cv_library_file_utf8"
9572 # Filter out duplicates - this happens with badly-designed ".pc" files...
9573 for cf_add_1lib in $LIBS
9574 do
9575         for cf_add_2lib in $cf_add_libs
9576         do
9577                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9578                 then
9579                         cf_add_1lib=
9580                         break
9581                 fi
9582         done
9583         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9584 done
9585 LIBS="$cf_add_libs"
9586
9587 fi
9588
9589                 if test "$cf_cv_utf8_lib" != no ; then
9590                         NCURSES_LIBUTF8=1
9591                 fi
9592         fi
9593
9594 # This is needed on Tru64 5.0 to declare mbstate_t
9595 echo "$as_me:9595: checking if we must include wchar.h to declare mbstate_t" >&5
9596 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9597 if test "${cf_cv_mbstate_t+set}" = set; then
9598   echo $ECHO_N "(cached) $ECHO_C" >&6
9599 else
9600
9601 cat >conftest.$ac_ext <<_ACEOF
9602 #line 9602 "configure"
9603 #include "confdefs.h"
9604
9605 #include <stdlib.h>
9606 #include <stdarg.h>
9607 #include <stdio.h>
9608 #ifdef HAVE_LIBUTF8_H
9609 #include <libutf8.h>
9610 #endif
9611 int
9612 main ()
9613 {
9614 mbstate_t state
9615   ;
9616   return 0;
9617 }
9618 _ACEOF
9619 rm -f conftest.$ac_objext
9620 if { (eval echo "$as_me:9620: \"$ac_compile\"") >&5
9621   (eval $ac_compile) 2>&5
9622   ac_status=$?
9623   echo "$as_me:9623: \$? = $ac_status" >&5
9624   (exit $ac_status); } &&
9625          { ac_try='test -s conftest.$ac_objext'
9626   { (eval echo "$as_me:9626: \"$ac_try\"") >&5
9627   (eval $ac_try) 2>&5
9628   ac_status=$?
9629   echo "$as_me:9629: \$? = $ac_status" >&5
9630   (exit $ac_status); }; }; then
9631   cf_cv_mbstate_t=no
9632 else
9633   echo "$as_me: failed program was:" >&5
9634 cat conftest.$ac_ext >&5
9635 cat >conftest.$ac_ext <<_ACEOF
9636 #line 9636 "configure"
9637 #include "confdefs.h"
9638
9639 #include <stdlib.h>
9640 #include <stdarg.h>
9641 #include <stdio.h>
9642 #include <wchar.h>
9643 #ifdef HAVE_LIBUTF8_H
9644 #include <libutf8.h>
9645 #endif
9646 int
9647 main ()
9648 {
9649 mbstate_t value
9650   ;
9651   return 0;
9652 }
9653 _ACEOF
9654 rm -f conftest.$ac_objext
9655 if { (eval echo "$as_me:9655: \"$ac_compile\"") >&5
9656   (eval $ac_compile) 2>&5
9657   ac_status=$?
9658   echo "$as_me:9658: \$? = $ac_status" >&5
9659   (exit $ac_status); } &&
9660          { ac_try='test -s conftest.$ac_objext'
9661   { (eval echo "$as_me:9661: \"$ac_try\"") >&5
9662   (eval $ac_try) 2>&5
9663   ac_status=$?
9664   echo "$as_me:9664: \$? = $ac_status" >&5
9665   (exit $ac_status); }; }; then
9666   cf_cv_mbstate_t=yes
9667 else
9668   echo "$as_me: failed program was:" >&5
9669 cat conftest.$ac_ext >&5
9670 cf_cv_mbstate_t=unknown
9671 fi
9672 rm -f conftest.$ac_objext conftest.$ac_ext
9673 fi
9674 rm -f conftest.$ac_objext conftest.$ac_ext
9675 fi
9676 echo "$as_me:9676: result: $cf_cv_mbstate_t" >&5
9677 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9678
9679 if test "$cf_cv_mbstate_t" = yes ; then
9680
9681 cat >>confdefs.h <<\EOF
9682 #define NEED_WCHAR_H 1
9683 EOF
9684
9685         NEED_WCHAR_H=1
9686 fi
9687
9688 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9689 if test "$cf_cv_mbstate_t" = unknown ; then
9690         NCURSES_MBSTATE_T=1
9691 fi
9692
9693 # This is needed on Tru64 5.0 to declare wchar_t
9694 echo "$as_me:9694: checking if we must include wchar.h to declare wchar_t" >&5
9695 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9696 if test "${cf_cv_wchar_t+set}" = set; then
9697   echo $ECHO_N "(cached) $ECHO_C" >&6
9698 else
9699
9700 cat >conftest.$ac_ext <<_ACEOF
9701 #line 9701 "configure"
9702 #include "confdefs.h"
9703
9704 #include <stdlib.h>
9705 #include <stdarg.h>
9706 #include <stdio.h>
9707 #ifdef HAVE_LIBUTF8_H
9708 #include <libutf8.h>
9709 #endif
9710 int
9711 main ()
9712 {
9713 wchar_t state
9714   ;
9715   return 0;
9716 }
9717 _ACEOF
9718 rm -f conftest.$ac_objext
9719 if { (eval echo "$as_me:9719: \"$ac_compile\"") >&5
9720   (eval $ac_compile) 2>&5
9721   ac_status=$?
9722   echo "$as_me:9722: \$? = $ac_status" >&5
9723   (exit $ac_status); } &&
9724          { ac_try='test -s conftest.$ac_objext'
9725   { (eval echo "$as_me:9725: \"$ac_try\"") >&5
9726   (eval $ac_try) 2>&5
9727   ac_status=$?
9728   echo "$as_me:9728: \$? = $ac_status" >&5
9729   (exit $ac_status); }; }; then
9730   cf_cv_wchar_t=no
9731 else
9732   echo "$as_me: failed program was:" >&5
9733 cat conftest.$ac_ext >&5
9734 cat >conftest.$ac_ext <<_ACEOF
9735 #line 9735 "configure"
9736 #include "confdefs.h"
9737
9738 #include <stdlib.h>
9739 #include <stdarg.h>
9740 #include <stdio.h>
9741 #include <wchar.h>
9742 #ifdef HAVE_LIBUTF8_H
9743 #include <libutf8.h>
9744 #endif
9745 int
9746 main ()
9747 {
9748 wchar_t value
9749   ;
9750   return 0;
9751 }
9752 _ACEOF
9753 rm -f conftest.$ac_objext
9754 if { (eval echo "$as_me:9754: \"$ac_compile\"") >&5
9755   (eval $ac_compile) 2>&5
9756   ac_status=$?
9757   echo "$as_me:9757: \$? = $ac_status" >&5
9758   (exit $ac_status); } &&
9759          { ac_try='test -s conftest.$ac_objext'
9760   { (eval echo "$as_me:9760: \"$ac_try\"") >&5
9761   (eval $ac_try) 2>&5
9762   ac_status=$?
9763   echo "$as_me:9763: \$? = $ac_status" >&5
9764   (exit $ac_status); }; }; then
9765   cf_cv_wchar_t=yes
9766 else
9767   echo "$as_me: failed program was:" >&5
9768 cat conftest.$ac_ext >&5
9769 cf_cv_wchar_t=unknown
9770 fi
9771 rm -f conftest.$ac_objext conftest.$ac_ext
9772 fi
9773 rm -f conftest.$ac_objext conftest.$ac_ext
9774 fi
9775 echo "$as_me:9775: result: $cf_cv_wchar_t" >&5
9776 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9777
9778 if test "$cf_cv_wchar_t" = yes ; then
9779
9780 cat >>confdefs.h <<\EOF
9781 #define NEED_WCHAR_H 1
9782 EOF
9783
9784         NEED_WCHAR_H=1
9785 fi
9786
9787 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9788 if test "$cf_cv_wchar_t" = unknown ; then
9789         NCURSES_WCHAR_T=1
9790 fi
9791
9792 # if we find wchar_t in either place, use substitution to provide a fallback.
9793 if test "$cf_cv_wchar_t" != unknown ; then
9794         NCURSES_OK_WCHAR_T=1
9795 fi
9796
9797 # This is needed on Tru64 5.0 to declare wint_t
9798 echo "$as_me:9798: checking if we must include wchar.h to declare wint_t" >&5
9799 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9800 if test "${cf_cv_wint_t+set}" = set; then
9801   echo $ECHO_N "(cached) $ECHO_C" >&6
9802 else
9803
9804 cat >conftest.$ac_ext <<_ACEOF
9805 #line 9805 "configure"
9806 #include "confdefs.h"
9807
9808 #include <stdlib.h>
9809 #include <stdarg.h>
9810 #include <stdio.h>
9811 #ifdef HAVE_LIBUTF8_H
9812 #include <libutf8.h>
9813 #endif
9814 int
9815 main ()
9816 {
9817 wint_t state
9818   ;
9819   return 0;
9820 }
9821 _ACEOF
9822 rm -f conftest.$ac_objext
9823 if { (eval echo "$as_me:9823: \"$ac_compile\"") >&5
9824   (eval $ac_compile) 2>&5
9825   ac_status=$?
9826   echo "$as_me:9826: \$? = $ac_status" >&5
9827   (exit $ac_status); } &&
9828          { ac_try='test -s conftest.$ac_objext'
9829   { (eval echo "$as_me:9829: \"$ac_try\"") >&5
9830   (eval $ac_try) 2>&5
9831   ac_status=$?
9832   echo "$as_me:9832: \$? = $ac_status" >&5
9833   (exit $ac_status); }; }; then
9834   cf_cv_wint_t=no
9835 else
9836   echo "$as_me: failed program was:" >&5
9837 cat conftest.$ac_ext >&5
9838 cat >conftest.$ac_ext <<_ACEOF
9839 #line 9839 "configure"
9840 #include "confdefs.h"
9841
9842 #include <stdlib.h>
9843 #include <stdarg.h>
9844 #include <stdio.h>
9845 #include <wchar.h>
9846 #ifdef HAVE_LIBUTF8_H
9847 #include <libutf8.h>
9848 #endif
9849 int
9850 main ()
9851 {
9852 wint_t value
9853   ;
9854   return 0;
9855 }
9856 _ACEOF
9857 rm -f conftest.$ac_objext
9858 if { (eval echo "$as_me:9858: \"$ac_compile\"") >&5
9859   (eval $ac_compile) 2>&5
9860   ac_status=$?
9861   echo "$as_me:9861: \$? = $ac_status" >&5
9862   (exit $ac_status); } &&
9863          { ac_try='test -s conftest.$ac_objext'
9864   { (eval echo "$as_me:9864: \"$ac_try\"") >&5
9865   (eval $ac_try) 2>&5
9866   ac_status=$?
9867   echo "$as_me:9867: \$? = $ac_status" >&5
9868   (exit $ac_status); }; }; then
9869   cf_cv_wint_t=yes
9870 else
9871   echo "$as_me: failed program was:" >&5
9872 cat conftest.$ac_ext >&5
9873 cf_cv_wint_t=unknown
9874 fi
9875 rm -f conftest.$ac_objext conftest.$ac_ext
9876 fi
9877 rm -f conftest.$ac_objext conftest.$ac_ext
9878 fi
9879 echo "$as_me:9879: result: $cf_cv_wint_t" >&5
9880 echo "${ECHO_T}$cf_cv_wint_t" >&6
9881
9882 if test "$cf_cv_wint_t" = yes ; then
9883
9884 cat >>confdefs.h <<\EOF
9885 #define NEED_WCHAR_H 1
9886 EOF
9887
9888         NEED_WCHAR_H=1
9889 fi
9890
9891 # if we do not find wint_t in either place, use substitution to provide a fallback.
9892 if test "$cf_cv_wint_t" = unknown ; then
9893         NCURSES_WINT_T=1
9894 fi
9895
9896 # if we find wint_t in either place, use substitution to provide a fallback.
9897 if test "$cf_cv_wint_t" != unknown ; then
9898         NCURSES_OK_WINT_T=1
9899 fi
9900
9901         if test "$NCURSES_MBSTATE_T" != 0; then
9902
9903 cat >>confdefs.h <<\EOF
9904 #define NEED_MBSTATE_T_DEF 1
9905 EOF
9906
9907         fi
9908 fi
9909
9910 ###   use option --disable-lp64 to allow long chtype
9911 case $cf_cv_abi_version in
9912 [345]*)
9913         default_with_lp64=no
9914         ;;
9915 *)
9916         default_with_lp64=yes
9917         ;;
9918 esac
9919
9920 echo "$as_me:9920: checking whether to enable _LP64 definition in curses.h" >&5
9921 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9922
9923 # Check whether --enable-lp64 or --disable-lp64 was given.
9924 if test "${enable_lp64+set}" = set; then
9925   enableval="$enable_lp64"
9926   with_lp64=$enableval
9927 else
9928   with_lp64=$default_with_lp64
9929 fi;
9930 echo "$as_me:9930: result: $with_lp64" >&5
9931 echo "${ECHO_T}$with_lp64" >&6
9932
9933 if test "x$with_lp64" = xyes ; then
9934         cf_cv_enable_lp64=1
9935 else
9936         cf_cv_enable_lp64=0
9937 fi
9938
9939 # Check whether --enable-largefile or --disable-largefile was given.
9940 if test "${enable_largefile+set}" = set; then
9941   enableval="$enable_largefile"
9942
9943 fi;
9944 if test "$enable_largefile" != no; then
9945
9946   echo "$as_me:9946: checking for special C compiler options needed for large files" >&5
9947 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9948 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9949   echo $ECHO_N "(cached) $ECHO_C" >&6
9950 else
9951   ac_cv_sys_largefile_CC=no
9952      if test "$GCC" != yes; then
9953        ac_save_CC=$CC
9954        while :; do
9955          # IRIX 6.2 and later do not support large files by default,
9956          # so use the C compiler's -n32 option if that helps.
9957          cat >conftest.$ac_ext <<_ACEOF
9958 #line 9958 "configure"
9959 #include "confdefs.h"
9960 #include <sys/types.h>
9961  /* Check that off_t can represent 2**63 - 1 correctly.
9962     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9963     since some C++ compilers masquerading as C compilers
9964     incorrectly reject 9223372036854775807.  */
9965 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9966   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9967                        && LARGE_OFF_T % 2147483647 == 1)
9968                       ? 1 : -1];
9969 int
9970 main ()
9971 {
9972
9973   ;
9974   return 0;
9975 }
9976 _ACEOF
9977          rm -f conftest.$ac_objext
9978 if { (eval echo "$as_me:9978: \"$ac_compile\"") >&5
9979   (eval $ac_compile) 2>&5
9980   ac_status=$?
9981   echo "$as_me:9981: \$? = $ac_status" >&5
9982   (exit $ac_status); } &&
9983          { ac_try='test -s conftest.$ac_objext'
9984   { (eval echo "$as_me:9984: \"$ac_try\"") >&5
9985   (eval $ac_try) 2>&5
9986   ac_status=$?
9987   echo "$as_me:9987: \$? = $ac_status" >&5
9988   (exit $ac_status); }; }; then
9989   break
9990 else
9991   echo "$as_me: failed program was:" >&5
9992 cat conftest.$ac_ext >&5
9993 fi
9994 rm -f conftest.$ac_objext
9995          CC="$CC -n32"
9996          rm -f conftest.$ac_objext
9997 if { (eval echo "$as_me:9997: \"$ac_compile\"") >&5
9998   (eval $ac_compile) 2>&5
9999   ac_status=$?
10000   echo "$as_me:10000: \$? = $ac_status" >&5
10001   (exit $ac_status); } &&
10002          { ac_try='test -s conftest.$ac_objext'
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   ac_cv_sys_largefile_CC=' -n32'; break
10009 else
10010   echo "$as_me: failed program was:" >&5
10011 cat conftest.$ac_ext >&5
10012 fi
10013 rm -f conftest.$ac_objext
10014          break
10015        done
10016        CC=$ac_save_CC
10017        rm -f conftest.$ac_ext
10018     fi
10019 fi
10020 echo "$as_me:10020: result: $ac_cv_sys_largefile_CC" >&5
10021 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10022   if test "$ac_cv_sys_largefile_CC" != no; then
10023     CC=$CC$ac_cv_sys_largefile_CC
10024   fi
10025
10026   echo "$as_me:10026: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10027 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10028 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10029   echo $ECHO_N "(cached) $ECHO_C" >&6
10030 else
10031   while :; do
10032   ac_cv_sys_file_offset_bits=no
10033   cat >conftest.$ac_ext <<_ACEOF
10034 #line 10034 "configure"
10035 #include "confdefs.h"
10036 #include <sys/types.h>
10037  /* Check that off_t can represent 2**63 - 1 correctly.
10038     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10039     since some C++ compilers masquerading as C compilers
10040     incorrectly reject 9223372036854775807.  */
10041 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10042   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10043                        && LARGE_OFF_T % 2147483647 == 1)
10044                       ? 1 : -1];
10045 int
10046 main ()
10047 {
10048
10049   ;
10050   return 0;
10051 }
10052 _ACEOF
10053 rm -f conftest.$ac_objext
10054 if { (eval echo "$as_me:10054: \"$ac_compile\"") >&5
10055   (eval $ac_compile) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit $ac_status); } &&
10059          { ac_try='test -s conftest.$ac_objext'
10060   { (eval echo "$as_me:10060: \"$ac_try\"") >&5
10061   (eval $ac_try) 2>&5
10062   ac_status=$?
10063   echo "$as_me:10063: \$? = $ac_status" >&5
10064   (exit $ac_status); }; }; then
10065   break
10066 else
10067   echo "$as_me: failed program was:" >&5
10068 cat conftest.$ac_ext >&5
10069 fi
10070 rm -f conftest.$ac_objext conftest.$ac_ext
10071   cat >conftest.$ac_ext <<_ACEOF
10072 #line 10072 "configure"
10073 #include "confdefs.h"
10074 #define _FILE_OFFSET_BITS 64
10075 #include <sys/types.h>
10076  /* Check that off_t can represent 2**63 - 1 correctly.
10077     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10078     since some C++ compilers masquerading as C compilers
10079     incorrectly reject 9223372036854775807.  */
10080 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10081   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10082                        && LARGE_OFF_T % 2147483647 == 1)
10083                       ? 1 : -1];
10084 int
10085 main ()
10086 {
10087
10088   ;
10089   return 0;
10090 }
10091 _ACEOF
10092 rm -f conftest.$ac_objext
10093 if { (eval echo "$as_me:10093: \"$ac_compile\"") >&5
10094   (eval $ac_compile) 2>&5
10095   ac_status=$?
10096   echo "$as_me:10096: \$? = $ac_status" >&5
10097   (exit $ac_status); } &&
10098          { ac_try='test -s conftest.$ac_objext'
10099   { (eval echo "$as_me:10099: \"$ac_try\"") >&5
10100   (eval $ac_try) 2>&5
10101   ac_status=$?
10102   echo "$as_me:10102: \$? = $ac_status" >&5
10103   (exit $ac_status); }; }; then
10104   ac_cv_sys_file_offset_bits=64; break
10105 else
10106   echo "$as_me: failed program was:" >&5
10107 cat conftest.$ac_ext >&5
10108 fi
10109 rm -f conftest.$ac_objext conftest.$ac_ext
10110   break
10111 done
10112 fi
10113 echo "$as_me:10113: result: $ac_cv_sys_file_offset_bits" >&5
10114 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10115 if test "$ac_cv_sys_file_offset_bits" != no; then
10116
10117 cat >>confdefs.h <<EOF
10118 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10119 EOF
10120
10121 fi
10122 rm -rf conftest*
10123   echo "$as_me:10123: checking for _LARGE_FILES value needed for large files" >&5
10124 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10125 if test "${ac_cv_sys_large_files+set}" = set; then
10126   echo $ECHO_N "(cached) $ECHO_C" >&6
10127 else
10128   while :; do
10129   ac_cv_sys_large_files=no
10130   cat >conftest.$ac_ext <<_ACEOF
10131 #line 10131 "configure"
10132 #include "confdefs.h"
10133 #include <sys/types.h>
10134  /* Check that off_t can represent 2**63 - 1 correctly.
10135     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10136     since some C++ compilers masquerading as C compilers
10137     incorrectly reject 9223372036854775807.  */
10138 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10139   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10140                        && LARGE_OFF_T % 2147483647 == 1)
10141                       ? 1 : -1];
10142 int
10143 main ()
10144 {
10145
10146   ;
10147   return 0;
10148 }
10149 _ACEOF
10150 rm -f conftest.$ac_objext
10151 if { (eval echo "$as_me:10151: \"$ac_compile\"") >&5
10152   (eval $ac_compile) 2>&5
10153   ac_status=$?
10154   echo "$as_me:10154: \$? = $ac_status" >&5
10155   (exit $ac_status); } &&
10156          { ac_try='test -s conftest.$ac_objext'
10157   { (eval echo "$as_me:10157: \"$ac_try\"") >&5
10158   (eval $ac_try) 2>&5
10159   ac_status=$?
10160   echo "$as_me:10160: \$? = $ac_status" >&5
10161   (exit $ac_status); }; }; then
10162   break
10163 else
10164   echo "$as_me: failed program was:" >&5
10165 cat conftest.$ac_ext >&5
10166 fi
10167 rm -f conftest.$ac_objext conftest.$ac_ext
10168   cat >conftest.$ac_ext <<_ACEOF
10169 #line 10169 "configure"
10170 #include "confdefs.h"
10171 #define _LARGE_FILES 1
10172 #include <sys/types.h>
10173  /* Check that off_t can represent 2**63 - 1 correctly.
10174     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10175     since some C++ compilers masquerading as C compilers
10176     incorrectly reject 9223372036854775807.  */
10177 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10178   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10179                        && LARGE_OFF_T % 2147483647 == 1)
10180                       ? 1 : -1];
10181 int
10182 main ()
10183 {
10184
10185   ;
10186   return 0;
10187 }
10188 _ACEOF
10189 rm -f conftest.$ac_objext
10190 if { (eval echo "$as_me:10190: \"$ac_compile\"") >&5
10191   (eval $ac_compile) 2>&5
10192   ac_status=$?
10193   echo "$as_me:10193: \$? = $ac_status" >&5
10194   (exit $ac_status); } &&
10195          { ac_try='test -s conftest.$ac_objext'
10196   { (eval echo "$as_me:10196: \"$ac_try\"") >&5
10197   (eval $ac_try) 2>&5
10198   ac_status=$?
10199   echo "$as_me:10199: \$? = $ac_status" >&5
10200   (exit $ac_status); }; }; then
10201   ac_cv_sys_large_files=1; break
10202 else
10203   echo "$as_me: failed program was:" >&5
10204 cat conftest.$ac_ext >&5
10205 fi
10206 rm -f conftest.$ac_objext conftest.$ac_ext
10207   break
10208 done
10209 fi
10210 echo "$as_me:10210: result: $ac_cv_sys_large_files" >&5
10211 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10212 if test "$ac_cv_sys_large_files" != no; then
10213
10214 cat >>confdefs.h <<EOF
10215 #define _LARGE_FILES $ac_cv_sys_large_files
10216 EOF
10217
10218 fi
10219 rm -rf conftest*
10220 fi
10221
10222     if test "$enable_largefile" != no ; then
10223         echo "$as_me:10223: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10224 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10225 if test "${ac_cv_sys_largefile_source+set}" = set; then
10226   echo $ECHO_N "(cached) $ECHO_C" >&6
10227 else
10228   while :; do
10229   ac_cv_sys_largefile_source=no
10230   cat >conftest.$ac_ext <<_ACEOF
10231 #line 10231 "configure"
10232 #include "confdefs.h"
10233 #include <stdio.h>
10234 int
10235 main ()
10236 {
10237 return !fseeko;
10238   ;
10239   return 0;
10240 }
10241 _ACEOF
10242 rm -f conftest.$ac_objext
10243 if { (eval echo "$as_me:10243: \"$ac_compile\"") >&5
10244   (eval $ac_compile) 2>&5
10245   ac_status=$?
10246   echo "$as_me:10246: \$? = $ac_status" >&5
10247   (exit $ac_status); } &&
10248          { ac_try='test -s conftest.$ac_objext'
10249   { (eval echo "$as_me:10249: \"$ac_try\"") >&5
10250   (eval $ac_try) 2>&5
10251   ac_status=$?
10252   echo "$as_me:10252: \$? = $ac_status" >&5
10253   (exit $ac_status); }; }; then
10254   break
10255 else
10256   echo "$as_me: failed program was:" >&5
10257 cat conftest.$ac_ext >&5
10258 fi
10259 rm -f conftest.$ac_objext conftest.$ac_ext
10260   cat >conftest.$ac_ext <<_ACEOF
10261 #line 10261 "configure"
10262 #include "confdefs.h"
10263 #define _LARGEFILE_SOURCE 1
10264 #include <stdio.h>
10265 int
10266 main ()
10267 {
10268 return !fseeko;
10269   ;
10270   return 0;
10271 }
10272 _ACEOF
10273 rm -f conftest.$ac_objext
10274 if { (eval echo "$as_me:10274: \"$ac_compile\"") >&5
10275   (eval $ac_compile) 2>&5
10276   ac_status=$?
10277   echo "$as_me:10277: \$? = $ac_status" >&5
10278   (exit $ac_status); } &&
10279          { ac_try='test -s conftest.$ac_objext'
10280   { (eval echo "$as_me:10280: \"$ac_try\"") >&5
10281   (eval $ac_try) 2>&5
10282   ac_status=$?
10283   echo "$as_me:10283: \$? = $ac_status" >&5
10284   (exit $ac_status); }; }; then
10285   ac_cv_sys_largefile_source=1; break
10286 else
10287   echo "$as_me: failed program was:" >&5
10288 cat conftest.$ac_ext >&5
10289 fi
10290 rm -f conftest.$ac_objext conftest.$ac_ext
10291   break
10292 done
10293 fi
10294 echo "$as_me:10294: result: $ac_cv_sys_largefile_source" >&5
10295 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10296 if test "$ac_cv_sys_largefile_source" != no; then
10297
10298 cat >>confdefs.h <<EOF
10299 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10300 EOF
10301
10302 fi
10303 rm -rf conftest*
10304
10305 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10306 # in glibc 2.1.3, but that breaks too many other things.
10307 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10308 echo "$as_me:10308: checking for fseeko" >&5
10309 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10310 if test "${ac_cv_func_fseeko+set}" = set; then
10311   echo $ECHO_N "(cached) $ECHO_C" >&6
10312 else
10313   cat >conftest.$ac_ext <<_ACEOF
10314 #line 10314 "configure"
10315 #include "confdefs.h"
10316 #include <stdio.h>
10317 int
10318 main ()
10319 {
10320 return fseeko && fseeko (stdin, 0, 0);
10321   ;
10322   return 0;
10323 }
10324 _ACEOF
10325 rm -f conftest.$ac_objext conftest$ac_exeext
10326 if { (eval echo "$as_me:10326: \"$ac_link\"") >&5
10327   (eval $ac_link) 2>&5
10328   ac_status=$?
10329   echo "$as_me:10329: \$? = $ac_status" >&5
10330   (exit $ac_status); } &&
10331          { ac_try='test -s conftest$ac_exeext'
10332   { (eval echo "$as_me:10332: \"$ac_try\"") >&5
10333   (eval $ac_try) 2>&5
10334   ac_status=$?
10335   echo "$as_me:10335: \$? = $ac_status" >&5
10336   (exit $ac_status); }; }; then
10337   ac_cv_func_fseeko=yes
10338 else
10339   echo "$as_me: failed program was:" >&5
10340 cat conftest.$ac_ext >&5
10341 ac_cv_func_fseeko=no
10342 fi
10343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10344 fi
10345 echo "$as_me:10345: result: $ac_cv_func_fseeko" >&5
10346 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10347 if test $ac_cv_func_fseeko = yes; then
10348
10349 cat >>confdefs.h <<\EOF
10350 #define HAVE_FSEEKO 1
10351 EOF
10352
10353 fi
10354
10355         # Normally we would collect these definitions in the config.h,
10356         # but (like _XOPEN_SOURCE), some environments rely on having these
10357         # defined before any of the system headers are included.  Another
10358         # case comes up with C++, e.g., on AIX the compiler compiles the
10359         # header files by themselves before looking at the body files it is
10360         # told to compile.  For ncurses, those header files do not include
10361         # the config.h
10362         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10363         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10364         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10365
10366         echo "$as_me:10366: checking whether to use struct dirent64" >&5
10367 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10368 if test "${cf_cv_struct_dirent64+set}" = set; then
10369   echo $ECHO_N "(cached) $ECHO_C" >&6
10370 else
10371
10372                 cat >conftest.$ac_ext <<_ACEOF
10373 #line 10373 "configure"
10374 #include "confdefs.h"
10375
10376 #include <sys/types.h>
10377 #include <dirent.h>
10378
10379 int
10380 main ()
10381 {
10382
10383                 /* if transitional largefile support is setup, this is true */
10384                 extern struct dirent64 * readdir(DIR *);
10385                 struct dirent64 *x = readdir((DIR *)0);
10386                 struct dirent *y = readdir((DIR *)0);
10387                 int z = x - y;
10388
10389   ;
10390   return 0;
10391 }
10392 _ACEOF
10393 rm -f conftest.$ac_objext
10394 if { (eval echo "$as_me:10394: \"$ac_compile\"") >&5
10395   (eval $ac_compile) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); } &&
10399          { ac_try='test -s conftest.$ac_objext'
10400   { (eval echo "$as_me:10400: \"$ac_try\"") >&5
10401   (eval $ac_try) 2>&5
10402   ac_status=$?
10403   echo "$as_me:10403: \$? = $ac_status" >&5
10404   (exit $ac_status); }; }; then
10405   cf_cv_struct_dirent64=yes
10406 else
10407   echo "$as_me: failed program was:" >&5
10408 cat conftest.$ac_ext >&5
10409 cf_cv_struct_dirent64=no
10410 fi
10411 rm -f conftest.$ac_objext conftest.$ac_ext
10412
10413 fi
10414 echo "$as_me:10414: result: $cf_cv_struct_dirent64" >&5
10415 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10416         test "$cf_cv_struct_dirent64" = yes &&
10417 cat >>confdefs.h <<\EOF
10418 #define HAVE_STRUCT_DIRENT64 1
10419 EOF
10420
10421     fi
10422
10423 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10424 echo "$as_me:10424: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10425 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10426
10427 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10428 if test "${enable_tparm_varargs+set}" = set; then
10429   enableval="$enable_tparm_varargs"
10430   with_tparm_varargs=$enableval
10431 else
10432   with_tparm_varargs=yes
10433 fi;
10434 echo "$as_me:10434: result: $with_tparm_varargs" >&5
10435 echo "${ECHO_T}$with_tparm_varargs" >&6
10436 NCURSES_TPARM_VARARGS=0
10437 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10438
10439 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10440 if test "$with_ticlib" != no ; then
10441 echo "$as_me:10441: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10442 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10443
10444 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10445 if test "${enable_tic_depends+set}" = set; then
10446   enableval="$enable_tic_depends"
10447   with_tic_depends=$enableval
10448 else
10449   with_tic_depends=yes
10450 fi;
10451 echo "$as_me:10451: result: $with_tic_depends" >&5
10452 echo "${ECHO_T}$with_tic_depends" >&6
10453 else
10454         with_tic_depends=no
10455 fi
10456
10457 ###   use option --with-bool to override bool's type
10458 echo "$as_me:10458: checking for type of bool" >&5
10459 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10460
10461 # Check whether --with-bool or --without-bool was given.
10462 if test "${with_bool+set}" = set; then
10463   withval="$with_bool"
10464   NCURSES_BOOL="$withval"
10465 else
10466   NCURSES_BOOL=auto
10467 fi;
10468 echo "$as_me:10468: result: $NCURSES_BOOL" >&5
10469 echo "${ECHO_T}$NCURSES_BOOL" >&6
10470
10471 echo "$as_me:10471: checking for alternate terminal capabilities file" >&5
10472 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10473
10474 # Check whether --with-caps or --without-caps was given.
10475 if test "${with_caps+set}" = set; then
10476   withval="$with_caps"
10477   TERMINFO_CAPS=Caps.$withval
10478 else
10479   TERMINFO_CAPS=Caps
10480 fi;
10481 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10482 echo "$as_me:10482: result: $TERMINFO_CAPS" >&5
10483 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10484
10485 ###   use option --with-chtype to override chtype's type
10486 echo "$as_me:10486: checking for type of chtype" >&5
10487 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10488
10489 # Check whether --with-chtype or --without-chtype was given.
10490 if test "${with_chtype+set}" = set; then
10491   withval="$with_chtype"
10492   NCURSES_CHTYPE="$withval"
10493 else
10494   NCURSES_CHTYPE=auto
10495 fi;
10496 echo "$as_me:10496: result: $NCURSES_CHTYPE" >&5
10497 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10498
10499 ###   use option --with-ospeed to override ospeed's type
10500 echo "$as_me:10500: checking for type of ospeed" >&5
10501 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10502
10503 # Check whether --with-ospeed or --without-ospeed was given.
10504 if test "${with_ospeed+set}" = set; then
10505   withval="$with_ospeed"
10506   NCURSES_OSPEED="$withval"
10507 else
10508   NCURSES_OSPEED=short
10509 fi;
10510 echo "$as_me:10510: result: $NCURSES_OSPEED" >&5
10511 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10512
10513 ###   use option --with-mmask-t to override mmask_t's type
10514 echo "$as_me:10514: checking for type of mmask_t" >&5
10515 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10516
10517 # Check whether --with-mmask-t or --without-mmask-t was given.
10518 if test "${with_mmask_t+set}" = set; then
10519   withval="$with_mmask_t"
10520   NCURSES_MMASK_T="$withval"
10521 else
10522   NCURSES_MMASK_T=auto
10523 fi;
10524 echo "$as_me:10524: result: $NCURSES_MMASK_T" >&5
10525 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10526
10527 ###   use option --with-ccharw-max to override CCHARW_MAX size
10528 echo "$as_me:10528: checking for size CCHARW_MAX" >&5
10529 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10530
10531 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10532 if test "${with_ccharw_max+set}" = set; then
10533   withval="$with_ccharw_max"
10534   NCURSES_CCHARW_MAX="$withval"
10535 else
10536   NCURSES_CCHARW_MAX=5
10537 fi;
10538 echo "$as_me:10538: result: $NCURSES_CCHARW_MAX" >&5
10539 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10540
10541 ###   use option --with-tparm-arg to override tparm's argument type
10542 echo "$as_me:10542: checking for type of tparm args" >&5
10543 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10544
10545 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10546 if test "${with_tparm_arg+set}" = set; then
10547   withval="$with_tparm_arg"
10548   NCURSES_TPARM_ARG="$withval"
10549 else
10550   NCURSES_TPARM_ARG=long
10551 fi;
10552 echo "$as_me:10552: result: $NCURSES_TPARM_ARG" >&5
10553 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10554
10555 ### Enable compiling-in rcs id's
10556 echo "$as_me:10556: checking if RCS identifiers should be compiled-in" >&5
10557 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10558
10559 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10560 if test "${with_rcs_ids+set}" = set; then
10561   withval="$with_rcs_ids"
10562   with_rcs_ids=$withval
10563 else
10564   with_rcs_ids=no
10565 fi;
10566 echo "$as_me:10566: result: $with_rcs_ids" >&5
10567 echo "${ECHO_T}$with_rcs_ids" >&6
10568 test "x$with_rcs_ids" = xyes &&
10569 cat >>confdefs.h <<\EOF
10570 #define USE_RCS_IDS 1
10571 EOF
10572
10573 ###############################################################################
10574
10575 echo "$as_me:10575: checking format of man-pages" >&5
10576 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10577
10578 # Check whether --with-manpage-format or --without-manpage-format was given.
10579 if test "${with_manpage_format+set}" = set; then
10580   withval="$with_manpage_format"
10581   MANPAGE_FORMAT=$withval
10582 else
10583   MANPAGE_FORMAT=unknown
10584 fi;
10585
10586 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10587 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10588
10589 cf_unknown=
10590
10591 case $MANPAGE_FORMAT in
10592 unknown)
10593   if test -z "$MANPATH" ; then
10594     MANPATH="/usr/man:/usr/share/man"
10595   fi
10596
10597   # look for the 'date' man-page (it's most likely to be installed!)
10598   MANPAGE_FORMAT=
10599   cf_preform=no
10600   cf_catonly=yes
10601   cf_example=date
10602
10603   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10604   for cf_dir in $MANPATH; do
10605     test -z "$cf_dir" && cf_dir=/usr/man
10606     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
10607     do
10608       cf_test=`echo $cf_name | sed -e 's/*//'`
10609       if test "x$cf_test" = "x$cf_name" ; then
10610
10611         case "$cf_name" in
10612         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10613         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10614         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10615         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10616         esac
10617
10618         case "$cf_name" in
10619         $cf_dir/man*)
10620           cf_catonly=no
10621           ;;
10622         $cf_dir/cat*)
10623           cf_preform=yes
10624           ;;
10625         esac
10626         break
10627       fi
10628
10629       # if we found a match in either man* or cat*, stop looking
10630       if test -n "$MANPAGE_FORMAT" ; then
10631         cf_found=no
10632         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10633         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10634         case "$cf_name" in
10635         $cf_dir/cat*)
10636           cf_found=yes
10637           ;;
10638         esac
10639         test $cf_found=yes && break
10640       fi
10641     done
10642     # only check the first directory in $MANPATH where we find manpages
10643     if test -n "$MANPAGE_FORMAT" ; then
10644        break
10645     fi
10646   done
10647   # if we did not find the example, just assume it is normal
10648   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10649   IFS="$ac_save_ifs"
10650   ;;
10651 *)
10652   for cf_option in $MANPAGE_FORMAT; do
10653      case $cf_option in #(vi
10654      gzip|compress|BSDI|normal|formatted|catonly)
10655        ;;
10656      *)
10657        cf_unknown="$cf_unknown $cf_option"
10658        ;;
10659      esac
10660   done
10661   ;;
10662 esac
10663
10664 echo "$as_me:10664: result: $MANPAGE_FORMAT" >&5
10665 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10666 if test -n "$cf_unknown" ; then
10667   { echo "$as_me:10667: WARNING: Unexpected manpage-format $cf_unknown" >&5
10668 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10669 fi
10670
10671 echo "$as_me:10671: checking for manpage renaming" >&5
10672 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10673
10674 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10675 if test "${with_manpage_renames+set}" = set; then
10676   withval="$with_manpage_renames"
10677   MANPAGE_RENAMES=$withval
10678 else
10679   MANPAGE_RENAMES=yes
10680 fi;
10681
10682 case ".$MANPAGE_RENAMES" in #(vi
10683 .no) #(vi
10684   ;;
10685 .|.yes)
10686   # Debian 'man' program?
10687   if test -f /etc/debian_version ; then
10688     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10689   else
10690     MANPAGE_RENAMES=no
10691   fi
10692   ;;
10693 esac
10694
10695 if test "$MANPAGE_RENAMES" != no ; then
10696   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10697     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10698   elif test ! -f $MANPAGE_RENAMES ; then
10699     { { echo "$as_me:10699: error: not a filename: $MANPAGE_RENAMES" >&5
10700 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10701    { (exit 1); exit 1; }; }
10702   fi
10703
10704   test ! -d man && mkdir man
10705
10706   # Construct a sed-script to perform renaming within man-pages
10707   if test -n "$MANPAGE_RENAMES" ; then
10708     test ! -d man && mkdir man
10709     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10710   fi
10711 fi
10712
10713 echo "$as_me:10713: result: $MANPAGE_RENAMES" >&5
10714 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10715
10716 echo "$as_me:10716: checking if manpage aliases will be installed" >&5
10717 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10718
10719 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10720 if test "${with_manpage_aliases+set}" = set; then
10721   withval="$with_manpage_aliases"
10722   MANPAGE_ALIASES=$withval
10723 else
10724   MANPAGE_ALIASES=yes
10725 fi;
10726
10727 echo "$as_me:10727: result: $MANPAGE_ALIASES" >&5
10728 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10729
10730 case "x$LN_S" in #(vi
10731 xln*) #(vi
10732         cf_use_symlinks=yes
10733         ;;
10734 *)
10735         cf_use_symlinks=no
10736         ;;
10737 esac
10738
10739 MANPAGE_SYMLINKS=no
10740 if test "$MANPAGE_ALIASES" = yes ; then
10741 echo "$as_me:10741: checking if manpage symlinks should be used" >&5
10742 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10743
10744 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10745 if test "${with_manpage_symlinks+set}" = set; then
10746   withval="$with_manpage_symlinks"
10747   MANPAGE_SYMLINKS=$withval
10748 else
10749   MANPAGE_SYMLINKS=$cf_use_symlinks
10750 fi;
10751
10752 if test "$$cf_use_symlinks" = no; then
10753 if test "$MANPAGE_SYMLINKS" = yes ; then
10754         { echo "$as_me:10754: WARNING: cannot make symlinks" >&5
10755 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10756         MANPAGE_SYMLINKS=no
10757 fi
10758 fi
10759
10760 echo "$as_me:10760: result: $MANPAGE_SYMLINKS" >&5
10761 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10762 fi
10763
10764 echo "$as_me:10764: checking for manpage tbl" >&5
10765 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10766
10767 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10768 if test "${with_manpage_tbl+set}" = set; then
10769   withval="$with_manpage_tbl"
10770   MANPAGE_TBL=$withval
10771 else
10772   MANPAGE_TBL=no
10773 fi;
10774
10775 echo "$as_me:10775: result: $MANPAGE_TBL" >&5
10776 echo "${ECHO_T}$MANPAGE_TBL" >&6
10777
10778   if test "$prefix" = "NONE" ; then
10779      cf_prefix="$ac_default_prefix"
10780   else
10781      cf_prefix="$prefix"
10782   fi
10783
10784   case "$MANPAGE_FORMAT" in # (vi
10785   *catonly*) # (vi
10786     cf_format=yes
10787     cf_inboth=no
10788     ;;
10789   *formatted*) # (vi
10790     cf_format=yes
10791     cf_inboth=yes
10792     ;;
10793   *)
10794     cf_format=no
10795     cf_inboth=no
10796     ;;
10797   esac
10798
10799 test ! -d man && mkdir man
10800
10801 cf_so_strip=
10802 cf_compress=
10803 case "$MANPAGE_FORMAT" in #(vi
10804 *compress*) #(vi
10805         cf_so_strip="Z"
10806         cf_compress=compress
10807   ;;
10808 *gzip*)
10809         cf_so_strip="gz"
10810         cf_compress=gzip
10811   ;;
10812 esac
10813
10814 cf_edit_man=./edit_man.sh
10815 cf_man_alias=`pwd`/man_alias.sed
10816
10817 cat >$cf_edit_man <<CF_EOF
10818 #! /bin/sh
10819 # this script is generated by the configure-script CF_MAN_PAGES macro.
10820
10821 prefix="$cf_prefix"
10822 datarootdir="$datarootdir"
10823 datadir="$datadir"
10824
10825 NCURSES_MAJOR="$NCURSES_MAJOR"
10826 NCURSES_MINOR="$NCURSES_MINOR"
10827 NCURSES_PATCH="$NCURSES_PATCH"
10828
10829 NCURSES_OSPEED="$NCURSES_OSPEED"
10830 TERMINFO="$TERMINFO"
10831
10832 INSTALL="$INSTALL"
10833 INSTALL_DATA="$INSTALL_DATA"
10834
10835 transform="$program_transform_name"
10836
10837 TMP=\${TMPDIR:=/tmp}/man\$\$
10838 trap "rm -f \$TMP" 0 1 2 5 15
10839
10840 form=\$1
10841 shift || exit 1
10842
10843 verb=\$1
10844 shift || exit 1
10845
10846 mandir=\$1
10847 shift || exit 1
10848
10849 srcdir=\$1
10850 top_srcdir=\$srcdir/..
10851 shift || exit 1
10852
10853 if test "\$form" = normal ; then
10854         if test "$cf_format" = yes ; then
10855         if test "$cf_inboth" = no ; then
10856                 sh \$0 format \$verb \$mandir \$srcdir \$*
10857                 exit $?
10858         fi
10859         fi
10860         cf_subdir=\$mandir/man
10861         cf_tables=$MANPAGE_TBL
10862 else
10863         cf_subdir=\$mandir/cat
10864         cf_tables=yes
10865 fi
10866
10867 # process the list of source-files
10868 for i in \$* ; do
10869 case \$i in #(vi
10870 *.orig|*.rej) ;; #(vi
10871 *.[0-9]*)
10872         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10873         if test \$verb = installing ; then
10874         if test ! -d \$cf_subdir\${section} ; then
10875                 mkdir -p \$cf_subdir\$section
10876         fi
10877         fi
10878
10879         # replace variables in man page
10880         if test ! -f $cf_man_alias ; then
10881 cat >>$cf_man_alias <<-CF_EOF2
10882                 s,@DATADIR@,\$datadir,g
10883                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10884                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10885                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10886                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10887                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10888                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10889 CF_EOF
10890
10891         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10892         do
10893                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10894                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10895 cat >>$cf_edit_man <<-CF_EOF
10896                 s,@$cf_NAME@,$cf_name,g
10897 CF_EOF
10898         done
10899
10900 cat >>$cf_edit_man <<CF_EOF
10901 CF_EOF2
10902                 echo "...made $cf_man_alias"
10903         fi
10904
10905         aliases=
10906         cf_source=\`basename \$i\`
10907         inalias=\$cf_source
10908         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10909         if test ! -f \$inalias ; then
10910                 echo .. skipped \$cf_source
10911                 continue
10912         fi
10913 CF_EOF
10914
10915 if test "$MANPAGE_ALIASES" != no ; then
10916 cat >>$cf_edit_man <<CF_EOF
10917         nCurses=ignore.3x
10918         test $with_curses_h = yes && nCurses=ncurses.3x
10919         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10920 CF_EOF
10921 fi
10922
10923 if test "$MANPAGE_RENAMES" = no ; then
10924 cat >>$cf_edit_man <<CF_EOF
10925         # perform program transformations for section 1 man pages
10926         if test \$section = 1 ; then
10927                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10928         else
10929                 cf_target=\$cf_subdir\${section}/\$cf_source
10930         fi
10931 CF_EOF
10932 else
10933 cat >>$cf_edit_man <<CF_EOF
10934         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10935         if test -z "\$cf_target" ; then
10936                 echo '? missing rename for '\$cf_source
10937                 cf_target="\$cf_source"
10938         fi
10939         cf_target="\$cf_subdir\${section}/\${cf_target}"
10940
10941 CF_EOF
10942 fi
10943
10944 cat >>$cf_edit_man <<CF_EOF
10945         sed     -f $cf_man_alias \\
10946 CF_EOF
10947
10948 if test -f $MANPAGE_RENAMES ; then
10949 cat >>$cf_edit_man <<CF_EOF
10950                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10951 CF_EOF
10952 else
10953 cat >>$cf_edit_man <<CF_EOF
10954                 < \$i >\$TMP
10955 CF_EOF
10956 fi
10957
10958 cat >>$cf_edit_man <<CF_EOF
10959 if test \$cf_tables = yes ; then
10960         tbl \$TMP >\$TMP.out
10961         mv \$TMP.out \$TMP
10962 fi
10963 CF_EOF
10964
10965 if test $with_overwrite != yes ; then
10966 cat >>$cf_edit_man <<CF_EOF
10967         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10968         mv \$TMP.out \$TMP
10969 CF_EOF
10970 fi
10971
10972 if test $with_curses_h != yes ; then
10973 cat >>$cf_edit_man <<CF_EOF
10974         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10975         mv \$TMP.out \$TMP
10976 CF_EOF
10977 fi
10978
10979 cat >>$cf_edit_man <<CF_EOF
10980         if test \$form = format ; then
10981                 nroff -man \$TMP >\$TMP.out
10982                 mv \$TMP.out \$TMP
10983         fi
10984 CF_EOF
10985
10986 if test -n "$cf_compress" ; then
10987 cat >>$cf_edit_man <<CF_EOF
10988         if test \$verb = installing ; then
10989         if ( $cf_compress -f \$TMP )
10990         then
10991                 mv \$TMP.$cf_so_strip \$TMP
10992         fi
10993         fi
10994         cf_target="\$cf_target.$cf_so_strip"
10995 CF_EOF
10996 fi
10997
10998 case "$MANPAGE_FORMAT" in #(vi
10999 *BSDI*)
11000 cat >>$cf_edit_man <<CF_EOF
11001         if test \$form = format ; then
11002                 # BSDI installs only .0 suffixes in the cat directories
11003                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11004         fi
11005 CF_EOF
11006   ;;
11007 esac
11008
11009 cat >>$cf_edit_man <<CF_EOF
11010         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11011         if test \$verb = installing ; then
11012                 echo \$verb \$cf_target
11013                 \$INSTALL_DATA \$TMP \$cf_target
11014                 test -d \$cf_subdir\${section} &&
11015                 test -n "\$aliases" && (
11016                         cd \$cf_subdir\${section} && (
11017                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11018                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11019                                 cf_target=\`basename \$cf_target\`
11020                                 for cf_alias in \$aliases
11021                                 do
11022                                         if test \$section = 1 ; then
11023                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11024                                         fi
11025
11026                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11027                                                 if test -f \$cf_alias\${suffix} ; then
11028                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11029                                                         then
11030                                                                 continue
11031                                                         fi
11032                                                 fi
11033                                                 echo .. \$verb alias \$cf_alias\${suffix}
11034 CF_EOF
11035 case "x$LN_S" in #(vi
11036 *-f) #(vi
11037 cat >>$cf_edit_man <<CF_EOF
11038                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11039 CF_EOF
11040         ;;
11041 *)
11042 cat >>$cf_edit_man <<CF_EOF
11043                                                 rm -f \$cf_alias\${suffix}
11044                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11045 CF_EOF
11046         ;;
11047 esac
11048 cat >>$cf_edit_man <<CF_EOF
11049                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11050                                                 echo ".so \$cf_source" >\$TMP
11051 CF_EOF
11052 if test -n "$cf_compress" ; then
11053 cat >>$cf_edit_man <<CF_EOF
11054                                                 if test -n "$cf_so_strip" ; then
11055                                                         $cf_compress -f \$TMP
11056                                                         mv \$TMP.$cf_so_strip \$TMP
11057                                                 fi
11058 CF_EOF
11059 fi
11060 cat >>$cf_edit_man <<CF_EOF
11061                                                 echo .. \$verb alias \$cf_alias\${suffix}
11062                                                 rm -f \$cf_alias\${suffix}
11063                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11064                                         fi
11065                                 done
11066                         )
11067                 )
11068         elif test \$verb = removing ; then
11069                 test -f \$cf_target && (
11070                         echo \$verb \$cf_target
11071                         rm -f \$cf_target
11072                 )
11073                 test -d \$cf_subdir\${section} &&
11074                 test -n "\$aliases" && (
11075                         cd \$cf_subdir\${section} && (
11076                                 for cf_alias in \$aliases
11077                                 do
11078                                         if test \$section = 1 ; then
11079                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11080                                         fi
11081
11082                                         echo .. \$verb alias \$cf_alias\${suffix}
11083                                         rm -f \$cf_alias\${suffix}
11084                                 done
11085                         )
11086                 )
11087         else
11088 #               echo ".hy 0"
11089                 cat \$TMP
11090         fi
11091         ;;
11092 esac
11093 done
11094
11095 if test $cf_inboth = yes ; then
11096 if test \$form != format ; then
11097         sh \$0 format \$verb \$mandir \$srcdir \$*
11098 fi
11099 fi
11100
11101 exit 0
11102 CF_EOF
11103 chmod 755 $cf_edit_man
11104
11105 ###############################################################################
11106
11107 ### Note that some functions (such as const) are normally disabled anyway.
11108 echo "$as_me:11108: checking if you want to build with function extensions" >&5
11109 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11110
11111 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11112 if test "${enable_ext_funcs+set}" = set; then
11113   enableval="$enable_ext_funcs"
11114   with_ext_funcs=$enableval
11115 else
11116   with_ext_funcs=yes
11117 fi;
11118 echo "$as_me:11118: result: $with_ext_funcs" >&5
11119 echo "${ECHO_T}$with_ext_funcs" >&6
11120 if test "x$with_ext_funcs" = xyes ; then
11121         NCURSES_EXT_FUNCS=1
11122
11123 cat >>confdefs.h <<\EOF
11124 #define HAVE_ASSUME_DEFAULT_COLORS 1
11125 EOF
11126
11127 cat >>confdefs.h <<\EOF
11128 #define HAVE_CURSES_VERSION 1
11129 EOF
11130
11131 cat >>confdefs.h <<\EOF
11132 #define HAVE_HAS_KEY 1
11133 EOF
11134
11135 cat >>confdefs.h <<\EOF
11136 #define HAVE_RESIZETERM 1
11137 EOF
11138
11139 cat >>confdefs.h <<\EOF
11140 #define HAVE_RESIZE_TERM 1
11141 EOF
11142
11143 cat >>confdefs.h <<\EOF
11144 #define HAVE_TERM_ENTRY_H 1
11145 EOF
11146
11147 cat >>confdefs.h <<\EOF
11148 #define HAVE_USE_DEFAULT_COLORS 1
11149 EOF
11150
11151 cat >>confdefs.h <<\EOF
11152 #define HAVE_USE_SCREEN 1
11153 EOF
11154
11155 cat >>confdefs.h <<\EOF
11156 #define HAVE_USE_WINDOW 1
11157 EOF
11158
11159 cat >>confdefs.h <<\EOF
11160 #define HAVE_WRESIZE 1
11161 EOF
11162
11163 cat >>confdefs.h <<\EOF
11164 #define NCURSES_EXT_FUNCS 1
11165 EOF
11166
11167         GENERATED_EXT_FUNCS=generated
11168 else
11169         NCURSES_EXT_FUNCS=0
11170         GENERATED_EXT_FUNCS=
11171 fi
11172
11173 echo "$as_me:11173: checking if you want to build with experimental SCREEN extensions" >&5
11174 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11175
11176 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11177 if test "${enable_sp_funcs+set}" = set; then
11178   enableval="$enable_sp_funcs"
11179   with_sp_funcs=$enableval
11180 else
11181   with_sp_funcs=no
11182 fi;
11183 echo "$as_me:11183: result: $with_sp_funcs" >&5
11184 echo "${ECHO_T}$with_sp_funcs" >&6
11185 if test "x$with_sp_funcs" = xyes ; then
11186         NCURSES_SP_FUNCS=1
11187
11188 cat >>confdefs.h <<\EOF
11189 #define NCURSES_SP_FUNCS 1
11190 EOF
11191
11192         GENERATED_SP_FUNCS=generated
11193 else
11194         NCURSES_SP_FUNCS=0
11195         GENERATED_SP_FUNCS=
11196 fi
11197
11198 echo "$as_me:11198: checking if you want to build with experimental terminal-driver" >&5
11199 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11200
11201 # Check whether --enable-term-driver or --disable-term-driver was given.
11202 if test "${enable_term_driver+set}" = set; then
11203   enableval="$enable_term_driver"
11204   with_term_driver=$enableval
11205 else
11206   with_term_driver=no
11207 fi;
11208 echo "$as_me:11208: result: $with_term_driver" >&5
11209 echo "${ECHO_T}$with_term_driver" >&6
11210 if test "x$with_term_driver" = xyes ; then
11211
11212 cat >>confdefs.h <<\EOF
11213 #define USE_TERM_DRIVER 1
11214 EOF
11215
11216         if test "x$with_sp_funcs" != xyes ; then
11217                 { { echo "$as_me:11217: error: The term-driver option relies upon sp-funcs" >&5
11218 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11219    { (exit 1); exit 1; }; }
11220         fi
11221 fi
11222
11223 ###   use option --enable-const to turn on use of const beyond that in XSI.
11224 echo "$as_me:11224: checking for extended use of const keyword" >&5
11225 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11226
11227 # Check whether --enable-const or --disable-const was given.
11228 if test "${enable_const+set}" = set; then
11229   enableval="$enable_const"
11230   with_ext_const=$enableval
11231 else
11232   with_ext_const=no
11233 fi;
11234 echo "$as_me:11234: result: $with_ext_const" >&5
11235 echo "${ECHO_T}$with_ext_const" >&6
11236 NCURSES_CONST='/*nothing*/'
11237 if test "x$with_ext_const" = xyes ; then
11238         NCURSES_CONST=const
11239 fi
11240
11241 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11242 echo "$as_me:11242: checking if you want to use extended colors" >&5
11243 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11244
11245 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11246 if test "${enable_ext_colors+set}" = set; then
11247   enableval="$enable_ext_colors"
11248   with_ext_colors=$enableval
11249 else
11250   with_ext_colors=no
11251 fi;
11252 echo "$as_me:11252: result: $with_ext_colors" >&5
11253 echo "${ECHO_T}$with_ext_colors" >&6
11254 NCURSES_EXT_COLORS=0
11255 if test "x$with_ext_colors" = xyes ; then
11256         if test "x$with_widec" != xyes ; then
11257                 { { echo "$as_me:11257: error: This option applies only to wide-character library" >&5
11258 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11259    { (exit 1); exit 1; }; }
11260         else
11261                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11262
11263 if test "${with_abi_version+set}" != set; then
11264         case $cf_cv_rel_version in
11265         5.*)
11266                 cf_cv_rel_version=6.0
11267                 cf_cv_abi_version=6
11268                 { echo "$as_me:11268: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11269 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11270                 ;;
11271         esac
11272 fi
11273
11274         fi
11275         NCURSES_EXT_COLORS=1
11276
11277 cat >>confdefs.h <<\EOF
11278 #define NCURSES_EXT_COLORS 1
11279 EOF
11280
11281 fi
11282
11283 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11284 echo "$as_me:11284: checking if you want to use extended mouse encoding" >&5
11285 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11286
11287 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11288 if test "${enable_ext_mouse+set}" = set; then
11289   enableval="$enable_ext_mouse"
11290   with_ext_mouse=$enableval
11291 else
11292   with_ext_mouse=no
11293 fi;
11294 echo "$as_me:11294: result: $with_ext_mouse" >&5
11295 echo "${ECHO_T}$with_ext_mouse" >&6
11296 NCURSES_MOUSE_VERSION=1
11297 if test "x$with_ext_mouse" = xyes ; then
11298         NCURSES_MOUSE_VERSION=2
11299
11300 if test "${with_abi_version+set}" != set; then
11301         case $cf_cv_rel_version in
11302         5.*)
11303                 cf_cv_rel_version=6.0
11304                 cf_cv_abi_version=6
11305                 { echo "$as_me:11305: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11306 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11307                 ;;
11308         esac
11309 fi
11310
11311 fi
11312
11313 echo "$as_me:11313: checking if you want \$NCURSES_NO_PADDING code" >&5
11314 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11315
11316 # Check whether --enable-no-padding or --disable-no-padding was given.
11317 if test "${enable_no_padding+set}" = set; then
11318   enableval="$enable_no_padding"
11319   with_no_padding=$enableval
11320 else
11321   with_no_padding=$with_ext_funcs
11322 fi;
11323 echo "$as_me:11323: result: $with_no_padding" >&5
11324 echo "${ECHO_T}$with_no_padding" >&6
11325 test "x$with_no_padding" = xyes &&
11326 cat >>confdefs.h <<\EOF
11327 #define NCURSES_NO_PADDING 1
11328 EOF
11329
11330 echo "$as_me:11330: checking for ANSI C header files" >&5
11331 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11332 if test "${ac_cv_header_stdc+set}" = set; then
11333   echo $ECHO_N "(cached) $ECHO_C" >&6
11334 else
11335   cat >conftest.$ac_ext <<_ACEOF
11336 #line 11336 "configure"
11337 #include "confdefs.h"
11338 #include <stdlib.h>
11339 #include <stdarg.h>
11340 #include <string.h>
11341 #include <float.h>
11342
11343 _ACEOF
11344 if { (eval echo "$as_me:11344: \"$ac_cpp conftest.$ac_ext\"") >&5
11345   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11346   ac_status=$?
11347   egrep -v '^ *\+' conftest.er1 >conftest.err
11348   rm -f conftest.er1
11349   cat conftest.err >&5
11350   echo "$as_me:11350: \$? = $ac_status" >&5
11351   (exit $ac_status); } >/dev/null; then
11352   if test -s conftest.err; then
11353     ac_cpp_err=$ac_c_preproc_warn_flag
11354   else
11355     ac_cpp_err=
11356   fi
11357 else
11358   ac_cpp_err=yes
11359 fi
11360 if test -z "$ac_cpp_err"; then
11361   ac_cv_header_stdc=yes
11362 else
11363   echo "$as_me: failed program was:" >&5
11364   cat conftest.$ac_ext >&5
11365   ac_cv_header_stdc=no
11366 fi
11367 rm -f conftest.err conftest.$ac_ext
11368
11369 if test $ac_cv_header_stdc = yes; then
11370   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11371   cat >conftest.$ac_ext <<_ACEOF
11372 #line 11372 "configure"
11373 #include "confdefs.h"
11374 #include <string.h>
11375
11376 _ACEOF
11377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11378   egrep "memchr" >/dev/null 2>&1; then
11379   :
11380 else
11381   ac_cv_header_stdc=no
11382 fi
11383 rm -rf conftest*
11384
11385 fi
11386
11387 if test $ac_cv_header_stdc = yes; then
11388   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11389   cat >conftest.$ac_ext <<_ACEOF
11390 #line 11390 "configure"
11391 #include "confdefs.h"
11392 #include <stdlib.h>
11393
11394 _ACEOF
11395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11396   egrep "free" >/dev/null 2>&1; then
11397   :
11398 else
11399   ac_cv_header_stdc=no
11400 fi
11401 rm -rf conftest*
11402
11403 fi
11404
11405 if test $ac_cv_header_stdc = yes; then
11406   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11407   if test "$cross_compiling" = yes; then
11408   :
11409 else
11410   cat >conftest.$ac_ext <<_ACEOF
11411 #line 11411 "configure"
11412 #include "confdefs.h"
11413 #include <ctype.h>
11414 #if ((' ' & 0x0FF) == 0x020)
11415 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11416 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11417 #else
11418 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11419                      || ('j' <= (c) && (c) <= 'r') \
11420                      || ('s' <= (c) && (c) <= 'z'))
11421 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11422 #endif
11423
11424 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11425 int
11426 main ()
11427 {
11428   int i;
11429   for (i = 0; i < 256; i++)
11430     if (XOR (islower (i), ISLOWER (i))
11431         || toupper (i) != TOUPPER (i))
11432       $ac_main_return(2);
11433   $ac_main_return (0);
11434 }
11435 _ACEOF
11436 rm -f conftest$ac_exeext
11437 if { (eval echo "$as_me:11437: \"$ac_link\"") >&5
11438   (eval $ac_link) 2>&5
11439   ac_status=$?
11440   echo "$as_me:11440: \$? = $ac_status" >&5
11441   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11442   { (eval echo "$as_me:11442: \"$ac_try\"") >&5
11443   (eval $ac_try) 2>&5
11444   ac_status=$?
11445   echo "$as_me:11445: \$? = $ac_status" >&5
11446   (exit $ac_status); }; }; then
11447   :
11448 else
11449   echo "$as_me: program exited with status $ac_status" >&5
11450 echo "$as_me: failed program was:" >&5
11451 cat conftest.$ac_ext >&5
11452 ac_cv_header_stdc=no
11453 fi
11454 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11455 fi
11456 fi
11457 fi
11458 echo "$as_me:11458: result: $ac_cv_header_stdc" >&5
11459 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11460 if test $ac_cv_header_stdc = yes; then
11461
11462 cat >>confdefs.h <<\EOF
11463 #define STDC_HEADERS 1
11464 EOF
11465
11466 fi
11467
11468 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11469
11470 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11471                   inttypes.h stdint.h unistd.h
11472 do
11473 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11474 echo "$as_me:11474: checking for $ac_header" >&5
11475 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11476 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11477   echo $ECHO_N "(cached) $ECHO_C" >&6
11478 else
11479   cat >conftest.$ac_ext <<_ACEOF
11480 #line 11480 "configure"
11481 #include "confdefs.h"
11482 $ac_includes_default
11483 #include <$ac_header>
11484 _ACEOF
11485 rm -f conftest.$ac_objext
11486 if { (eval echo "$as_me:11486: \"$ac_compile\"") >&5
11487   (eval $ac_compile) 2>&5
11488   ac_status=$?
11489   echo "$as_me:11489: \$? = $ac_status" >&5
11490   (exit $ac_status); } &&
11491          { ac_try='test -s conftest.$ac_objext'
11492   { (eval echo "$as_me:11492: \"$ac_try\"") >&5
11493   (eval $ac_try) 2>&5
11494   ac_status=$?
11495   echo "$as_me:11495: \$? = $ac_status" >&5
11496   (exit $ac_status); }; }; then
11497   eval "$as_ac_Header=yes"
11498 else
11499   echo "$as_me: failed program was:" >&5
11500 cat conftest.$ac_ext >&5
11501 eval "$as_ac_Header=no"
11502 fi
11503 rm -f conftest.$ac_objext conftest.$ac_ext
11504 fi
11505 echo "$as_me:11505: result: `eval echo '${'$as_ac_Header'}'`" >&5
11506 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11507 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11508   cat >>confdefs.h <<EOF
11509 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11510 EOF
11511
11512 fi
11513 done
11514
11515 echo "$as_me:11515: checking for signed char" >&5
11516 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11517 if test "${ac_cv_type_signed_char+set}" = set; then
11518   echo $ECHO_N "(cached) $ECHO_C" >&6
11519 else
11520   cat >conftest.$ac_ext <<_ACEOF
11521 #line 11521 "configure"
11522 #include "confdefs.h"
11523 $ac_includes_default
11524 int
11525 main ()
11526 {
11527 if ((signed char *) 0)
11528   return 0;
11529 if (sizeof (signed char))
11530   return 0;
11531   ;
11532   return 0;
11533 }
11534 _ACEOF
11535 rm -f conftest.$ac_objext
11536 if { (eval echo "$as_me:11536: \"$ac_compile\"") >&5
11537   (eval $ac_compile) 2>&5
11538   ac_status=$?
11539   echo "$as_me:11539: \$? = $ac_status" >&5
11540   (exit $ac_status); } &&
11541          { ac_try='test -s conftest.$ac_objext'
11542   { (eval echo "$as_me:11542: \"$ac_try\"") >&5
11543   (eval $ac_try) 2>&5
11544   ac_status=$?
11545   echo "$as_me:11545: \$? = $ac_status" >&5
11546   (exit $ac_status); }; }; then
11547   ac_cv_type_signed_char=yes
11548 else
11549   echo "$as_me: failed program was:" >&5
11550 cat conftest.$ac_ext >&5
11551 ac_cv_type_signed_char=no
11552 fi
11553 rm -f conftest.$ac_objext conftest.$ac_ext
11554 fi
11555 echo "$as_me:11555: result: $ac_cv_type_signed_char" >&5
11556 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11557
11558 echo "$as_me:11558: checking size of signed char" >&5
11559 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11560 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11561   echo $ECHO_N "(cached) $ECHO_C" >&6
11562 else
11563   if test "$ac_cv_type_signed_char" = yes; then
11564   if test "$cross_compiling" = yes; then
11565   # Depending upon the size, compute the lo and hi bounds.
11566 cat >conftest.$ac_ext <<_ACEOF
11567 #line 11567 "configure"
11568 #include "confdefs.h"
11569 $ac_includes_default
11570 int
11571 main ()
11572 {
11573 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11574   ;
11575   return 0;
11576 }
11577 _ACEOF
11578 rm -f conftest.$ac_objext
11579 if { (eval echo "$as_me:11579: \"$ac_compile\"") >&5
11580   (eval $ac_compile) 2>&5
11581   ac_status=$?
11582   echo "$as_me:11582: \$? = $ac_status" >&5
11583   (exit $ac_status); } &&
11584          { ac_try='test -s conftest.$ac_objext'
11585   { (eval echo "$as_me:11585: \"$ac_try\"") >&5
11586   (eval $ac_try) 2>&5
11587   ac_status=$?
11588   echo "$as_me:11588: \$? = $ac_status" >&5
11589   (exit $ac_status); }; }; then
11590   ac_lo=0 ac_mid=0
11591   while :; do
11592     cat >conftest.$ac_ext <<_ACEOF
11593 #line 11593 "configure"
11594 #include "confdefs.h"
11595 $ac_includes_default
11596 int
11597 main ()
11598 {
11599 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11600   ;
11601   return 0;
11602 }
11603 _ACEOF
11604 rm -f conftest.$ac_objext
11605 if { (eval echo "$as_me:11605: \"$ac_compile\"") >&5
11606   (eval $ac_compile) 2>&5
11607   ac_status=$?
11608   echo "$as_me:11608: \$? = $ac_status" >&5
11609   (exit $ac_status); } &&
11610          { ac_try='test -s conftest.$ac_objext'
11611   { (eval echo "$as_me:11611: \"$ac_try\"") >&5
11612   (eval $ac_try) 2>&5
11613   ac_status=$?
11614   echo "$as_me:11614: \$? = $ac_status" >&5
11615   (exit $ac_status); }; }; then
11616   ac_hi=$ac_mid; break
11617 else
11618   echo "$as_me: failed program was:" >&5
11619 cat conftest.$ac_ext >&5
11620 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11621 fi
11622 rm -f conftest.$ac_objext conftest.$ac_ext
11623   done
11624 else
11625   echo "$as_me: failed program was:" >&5
11626 cat conftest.$ac_ext >&5
11627 ac_hi=-1 ac_mid=-1
11628   while :; do
11629     cat >conftest.$ac_ext <<_ACEOF
11630 #line 11630 "configure"
11631 #include "confdefs.h"
11632 $ac_includes_default
11633 int
11634 main ()
11635 {
11636 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11637   ;
11638   return 0;
11639 }
11640 _ACEOF
11641 rm -f conftest.$ac_objext
11642 if { (eval echo "$as_me:11642: \"$ac_compile\"") >&5
11643   (eval $ac_compile) 2>&5
11644   ac_status=$?
11645   echo "$as_me:11645: \$? = $ac_status" >&5
11646   (exit $ac_status); } &&
11647          { ac_try='test -s conftest.$ac_objext'
11648   { (eval echo "$as_me:11648: \"$ac_try\"") >&5
11649   (eval $ac_try) 2>&5
11650   ac_status=$?
11651   echo "$as_me:11651: \$? = $ac_status" >&5
11652   (exit $ac_status); }; }; then
11653   ac_lo=$ac_mid; break
11654 else
11655   echo "$as_me: failed program was:" >&5
11656 cat conftest.$ac_ext >&5
11657 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11658 fi
11659 rm -f conftest.$ac_objext conftest.$ac_ext
11660   done
11661 fi
11662 rm -f conftest.$ac_objext conftest.$ac_ext
11663 # Binary search between lo and hi bounds.
11664 while test "x$ac_lo" != "x$ac_hi"; do
11665   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11666   cat >conftest.$ac_ext <<_ACEOF
11667 #line 11667 "configure"
11668 #include "confdefs.h"
11669 $ac_includes_default
11670 int
11671 main ()
11672 {
11673 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11674   ;
11675   return 0;
11676 }
11677 _ACEOF
11678 rm -f conftest.$ac_objext
11679 if { (eval echo "$as_me:11679: \"$ac_compile\"") >&5
11680   (eval $ac_compile) 2>&5
11681   ac_status=$?
11682   echo "$as_me:11682: \$? = $ac_status" >&5
11683   (exit $ac_status); } &&
11684          { ac_try='test -s conftest.$ac_objext'
11685   { (eval echo "$as_me:11685: \"$ac_try\"") >&5
11686   (eval $ac_try) 2>&5
11687   ac_status=$?
11688   echo "$as_me:11688: \$? = $ac_status" >&5
11689   (exit $ac_status); }; }; then
11690   ac_hi=$ac_mid
11691 else
11692   echo "$as_me: failed program was:" >&5
11693 cat conftest.$ac_ext >&5
11694 ac_lo=`expr $ac_mid + 1`
11695 fi
11696 rm -f conftest.$ac_objext conftest.$ac_ext
11697 done
11698 ac_cv_sizeof_signed_char=$ac_lo
11699 else
11700   if test "$cross_compiling" = yes; then
11701   { { echo "$as_me:11701: error: cannot run test program while cross compiling" >&5
11702 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11703    { (exit 1); exit 1; }; }
11704 else
11705   cat >conftest.$ac_ext <<_ACEOF
11706 #line 11706 "configure"
11707 #include "confdefs.h"
11708 $ac_includes_default
11709 int
11710 main ()
11711 {
11712 FILE *f = fopen ("conftest.val", "w");
11713 if (!f)
11714   $ac_main_return (1);
11715 fprintf (f, "%d", (sizeof (signed char)));
11716 fclose (f);
11717   ;
11718   return 0;
11719 }
11720 _ACEOF
11721 rm -f conftest$ac_exeext
11722 if { (eval echo "$as_me:11722: \"$ac_link\"") >&5
11723   (eval $ac_link) 2>&5
11724   ac_status=$?
11725   echo "$as_me:11725: \$? = $ac_status" >&5
11726   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11727   { (eval echo "$as_me:11727: \"$ac_try\"") >&5
11728   (eval $ac_try) 2>&5
11729   ac_status=$?
11730   echo "$as_me:11730: \$? = $ac_status" >&5
11731   (exit $ac_status); }; }; then
11732   ac_cv_sizeof_signed_char=`cat conftest.val`
11733 else
11734   echo "$as_me: program exited with status $ac_status" >&5
11735 echo "$as_me: failed program was:" >&5
11736 cat conftest.$ac_ext >&5
11737 fi
11738 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11739 fi
11740 fi
11741 rm -f conftest.val
11742 else
11743   ac_cv_sizeof_signed_char=0
11744 fi
11745 fi
11746 echo "$as_me:11746: result: $ac_cv_sizeof_signed_char" >&5
11747 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11748 cat >>confdefs.h <<EOF
11749 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11750 EOF
11751
11752 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11753         NCURSES_SBOOL="signed char"
11754 else
11755         NCURSES_SBOOL="char"
11756 fi
11757 echo "$as_me:11757: checking if you want to use signed Boolean array in term.h" >&5
11758 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11759
11760 # Check whether --enable-signed-char or --disable-signed-char was given.
11761 if test "${enable_signed_char+set}" = set; then
11762   enableval="$enable_signed_char"
11763   with_signed_char=$enableval
11764 else
11765   with_signed_char=no
11766 fi;
11767 echo "$as_me:11767: result: $with_signed_char" >&5
11768 echo "${ECHO_T}$with_signed_char" >&6
11769 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11770
11771 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11772 echo "$as_me:11772: checking if you want SIGWINCH handler" >&5
11773 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11774
11775 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11776 if test "${enable_sigwinch+set}" = set; then
11777   enableval="$enable_sigwinch"
11778   with_sigwinch=$enableval
11779 else
11780   with_sigwinch=$with_ext_funcs
11781 fi;
11782 echo "$as_me:11782: result: $with_sigwinch" >&5
11783 echo "${ECHO_T}$with_sigwinch" >&6
11784 test "x$with_sigwinch" = xyes &&
11785 cat >>confdefs.h <<\EOF
11786 #define USE_SIGWINCH 1
11787 EOF
11788
11789 ###   use option --enable-tcap-names to allow user to define new capabilities
11790 echo "$as_me:11790: checking if you want user-definable terminal capabilities like termcap" >&5
11791 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11792
11793 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11794 if test "${enable_tcap_names+set}" = set; then
11795   enableval="$enable_tcap_names"
11796   with_tcap_names=$enableval
11797 else
11798   with_tcap_names=$with_ext_funcs
11799 fi;
11800 echo "$as_me:11800: result: $with_tcap_names" >&5
11801 echo "${ECHO_T}$with_tcap_names" >&6
11802 NCURSES_XNAMES=0
11803 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11804
11805 ###############################################################################
11806 # These options are relatively safe to experiment with.
11807
11808 echo "$as_me:11808: checking if you want all development code" >&5
11809 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11810
11811 # Check whether --with-develop or --without-develop was given.
11812 if test "${with_develop+set}" = set; then
11813   withval="$with_develop"
11814   with_develop=$withval
11815 else
11816   with_develop=no
11817 fi;
11818 echo "$as_me:11818: result: $with_develop" >&5
11819 echo "${ECHO_T}$with_develop" >&6
11820
11821 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11822 echo "$as_me:11822: checking if you want hard-tabs code" >&5
11823 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11824
11825 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11826 if test "${enable_hard_tabs+set}" = set; then
11827   enableval="$enable_hard_tabs"
11828
11829 else
11830   enable_hard_tabs=$with_develop
11831 fi;
11832 echo "$as_me:11832: result: $enable_hard_tabs" >&5
11833 echo "${ECHO_T}$enable_hard_tabs" >&6
11834 test "x$enable_hard_tabs" = xyes &&
11835 cat >>confdefs.h <<\EOF
11836 #define USE_HARD_TABS 1
11837 EOF
11838
11839 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11840 echo "$as_me:11840: checking if you want limited support for xmc" >&5
11841 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11842
11843 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11844 if test "${enable_xmc_glitch+set}" = set; then
11845   enableval="$enable_xmc_glitch"
11846
11847 else
11848   enable_xmc_glitch=$with_develop
11849 fi;
11850 echo "$as_me:11850: result: $enable_xmc_glitch" >&5
11851 echo "${ECHO_T}$enable_xmc_glitch" >&6
11852 test "x$enable_xmc_glitch" = xyes &&
11853 cat >>confdefs.h <<\EOF
11854 #define USE_XMC_SUPPORT 1
11855 EOF
11856
11857 ###############################################################################
11858 # These are just experimental, probably should not be in a package:
11859
11860 echo "$as_me:11860: checking if you do not want to assume colors are white-on-black" >&5
11861 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11862
11863 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11864 if test "${enable_assumed_color+set}" = set; then
11865   enableval="$enable_assumed_color"
11866   with_assumed_color=$enableval
11867 else
11868   with_assumed_color=yes
11869 fi;
11870 echo "$as_me:11870: result: $with_assumed_color" >&5
11871 echo "${ECHO_T}$with_assumed_color" >&6
11872 test "x$with_assumed_color" = xyes &&
11873 cat >>confdefs.h <<\EOF
11874 #define USE_ASSUMED_COLOR 1
11875 EOF
11876
11877 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11878 echo "$as_me:11878: checking if you want hashmap scrolling-optimization code" >&5
11879 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11880
11881 # Check whether --enable-hashmap or --disable-hashmap was given.
11882 if test "${enable_hashmap+set}" = set; then
11883   enableval="$enable_hashmap"
11884   with_hashmap=$enableval
11885 else
11886   with_hashmap=yes
11887 fi;
11888 echo "$as_me:11888: result: $with_hashmap" >&5
11889 echo "${ECHO_T}$with_hashmap" >&6
11890 test "x$with_hashmap" = xyes &&
11891 cat >>confdefs.h <<\EOF
11892 #define USE_HASHMAP 1
11893 EOF
11894
11895 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11896 echo "$as_me:11896: checking if you want colorfgbg code" >&5
11897 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11898
11899 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11900 if test "${enable_colorfgbg+set}" = set; then
11901   enableval="$enable_colorfgbg"
11902   with_colorfgbg=$enableval
11903 else
11904   with_colorfgbg=no
11905 fi;
11906 echo "$as_me:11906: result: $with_colorfgbg" >&5
11907 echo "${ECHO_T}$with_colorfgbg" >&6
11908 test "x$with_colorfgbg" = xyes &&
11909 cat >>confdefs.h <<\EOF
11910 #define USE_COLORFGBG 1
11911 EOF
11912
11913 ###   use option --enable-interop to turn on use of bindings used for interop
11914 echo "$as_me:11914: checking if you want interop bindings" >&5
11915 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11916
11917 # Check whether --enable-interop or --disable-interop was given.
11918 if test "${enable_interop+set}" = set; then
11919   enableval="$enable_interop"
11920   with_exp_interop=$enableval
11921 else
11922   with_exp_interop=no
11923 fi;
11924 echo "$as_me:11924: result: $with_exp_interop" >&5
11925 echo "${ECHO_T}$with_exp_interop" >&6
11926
11927 NCURSES_INTEROP_FUNCS=0
11928 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11929
11930 # This is still experimental (20080329), but should ultimately be moved to
11931 # the script-block --with-normal, etc.
11932
11933 echo "$as_me:11933: checking if you want to link with the pthread library" >&5
11934 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11935
11936 # Check whether --with-pthread or --without-pthread was given.
11937 if test "${with_pthread+set}" = set; then
11938   withval="$with_pthread"
11939   with_pthread=$withval
11940 else
11941   with_pthread=no
11942 fi;
11943 echo "$as_me:11943: result: $with_pthread" >&5
11944 echo "${ECHO_T}$with_pthread" >&6
11945
11946 if test "$with_pthread" != no ; then
11947     echo "$as_me:11947: checking for pthread.h" >&5
11948 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11949 if test "${ac_cv_header_pthread_h+set}" = set; then
11950   echo $ECHO_N "(cached) $ECHO_C" >&6
11951 else
11952   cat >conftest.$ac_ext <<_ACEOF
11953 #line 11953 "configure"
11954 #include "confdefs.h"
11955 #include <pthread.h>
11956 _ACEOF
11957 if { (eval echo "$as_me:11957: \"$ac_cpp conftest.$ac_ext\"") >&5
11958   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11959   ac_status=$?
11960   egrep -v '^ *\+' conftest.er1 >conftest.err
11961   rm -f conftest.er1
11962   cat conftest.err >&5
11963   echo "$as_me:11963: \$? = $ac_status" >&5
11964   (exit $ac_status); } >/dev/null; then
11965   if test -s conftest.err; then
11966     ac_cpp_err=$ac_c_preproc_warn_flag
11967   else
11968     ac_cpp_err=
11969   fi
11970 else
11971   ac_cpp_err=yes
11972 fi
11973 if test -z "$ac_cpp_err"; then
11974   ac_cv_header_pthread_h=yes
11975 else
11976   echo "$as_me: failed program was:" >&5
11977   cat conftest.$ac_ext >&5
11978   ac_cv_header_pthread_h=no
11979 fi
11980 rm -f conftest.err conftest.$ac_ext
11981 fi
11982 echo "$as_me:11982: result: $ac_cv_header_pthread_h" >&5
11983 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11984 if test $ac_cv_header_pthread_h = yes; then
11985
11986 cat >>confdefs.h <<\EOF
11987 #define HAVE_PTHREADS_H 1
11988 EOF
11989
11990         for cf_lib_pthread in pthread c_r
11991         do
11992             echo "$as_me:11992: checking if we can link with the $cf_lib_pthread library" >&5
11993 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11994             cf_save_LIBS="$LIBS"
11995
11996 cf_add_libs="-l$cf_lib_pthread"
11997 # Filter out duplicates - this happens with badly-designed ".pc" files...
11998 for cf_add_1lib in $LIBS
11999 do
12000         for cf_add_2lib in $cf_add_libs
12001         do
12002                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12003                 then
12004                         cf_add_1lib=
12005                         break
12006                 fi
12007         done
12008         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12009 done
12010 LIBS="$cf_add_libs"
12011
12012             cat >conftest.$ac_ext <<_ACEOF
12013 #line 12013 "configure"
12014 #include "confdefs.h"
12015
12016 #include <pthread.h>
12017
12018 int
12019 main ()
12020 {
12021
12022                 int rc = pthread_create(0,0,0,0);
12023                 int r2 = pthread_mutexattr_settype(0, 0);
12024
12025   ;
12026   return 0;
12027 }
12028 _ACEOF
12029 rm -f conftest.$ac_objext conftest$ac_exeext
12030 if { (eval echo "$as_me:12030: \"$ac_link\"") >&5
12031   (eval $ac_link) 2>&5
12032   ac_status=$?
12033   echo "$as_me:12033: \$? = $ac_status" >&5
12034   (exit $ac_status); } &&
12035          { ac_try='test -s conftest$ac_exeext'
12036   { (eval echo "$as_me:12036: \"$ac_try\"") >&5
12037   (eval $ac_try) 2>&5
12038   ac_status=$?
12039   echo "$as_me:12039: \$? = $ac_status" >&5
12040   (exit $ac_status); }; }; then
12041   with_pthread=yes
12042 else
12043   echo "$as_me: failed program was:" >&5
12044 cat conftest.$ac_ext >&5
12045 with_pthread=no
12046 fi
12047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12048             LIBS="$cf_save_LIBS"
12049             echo "$as_me:12049: result: $with_pthread" >&5
12050 echo "${ECHO_T}$with_pthread" >&6
12051             test "$with_pthread" = yes && break
12052         done
12053
12054         if test "$with_pthread" = yes ; then
12055
12056 cf_add_libs="-l$cf_lib_pthread"
12057 # Filter out duplicates - this happens with badly-designed ".pc" files...
12058 for cf_add_1lib in $LIBS
12059 do
12060         for cf_add_2lib in $cf_add_libs
12061         do
12062                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12063                 then
12064                         cf_add_1lib=
12065                         break
12066                 fi
12067         done
12068         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12069 done
12070 LIBS="$cf_add_libs"
12071
12072 cat >>confdefs.h <<\EOF
12073 #define HAVE_LIBPTHREADS 1
12074 EOF
12075
12076         else
12077             { { echo "$as_me:12077: error: Cannot link with pthread library" >&5
12078 echo "$as_me: error: Cannot link with pthread library" >&2;}
12079    { (exit 1); exit 1; }; }
12080         fi
12081
12082 fi
12083
12084 fi
12085
12086 if test "x$with_pthread" != xno; then
12087         echo "$as_me:12087: checking for pthread_kill" >&5
12088 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12089 if test "${ac_cv_func_pthread_kill+set}" = set; then
12090   echo $ECHO_N "(cached) $ECHO_C" >&6
12091 else
12092   cat >conftest.$ac_ext <<_ACEOF
12093 #line 12093 "configure"
12094 #include "confdefs.h"
12095 /* System header to define __stub macros and hopefully few prototypes,
12096     which can conflict with char pthread_kill (); below.  */
12097 #include <assert.h>
12098 /* Override any gcc2 internal prototype to avoid an error.  */
12099 #ifdef __cplusplus
12100 extern "C"
12101 #endif
12102 /* We use char because int might match the return type of a gcc2
12103    builtin and then its argument prototype would still apply.  */
12104 char pthread_kill ();
12105 char (*f) ();
12106
12107 int
12108 main ()
12109 {
12110 /* The GNU C library defines this for functions which it implements
12111     to always fail with ENOSYS.  Some functions are actually named
12112     something starting with __ and the normal name is an alias.  */
12113 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12114 choke me
12115 #else
12116 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12117 #endif
12118
12119   ;
12120   return 0;
12121 }
12122 _ACEOF
12123 rm -f conftest.$ac_objext conftest$ac_exeext
12124 if { (eval echo "$as_me:12124: \"$ac_link\"") >&5
12125   (eval $ac_link) 2>&5
12126   ac_status=$?
12127   echo "$as_me:12127: \$? = $ac_status" >&5
12128   (exit $ac_status); } &&
12129          { ac_try='test -s conftest$ac_exeext'
12130   { (eval echo "$as_me:12130: \"$ac_try\"") >&5
12131   (eval $ac_try) 2>&5
12132   ac_status=$?
12133   echo "$as_me:12133: \$? = $ac_status" >&5
12134   (exit $ac_status); }; }; then
12135   ac_cv_func_pthread_kill=yes
12136 else
12137   echo "$as_me: failed program was:" >&5
12138 cat conftest.$ac_ext >&5
12139 ac_cv_func_pthread_kill=no
12140 fi
12141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12142 fi
12143 echo "$as_me:12143: result: $ac_cv_func_pthread_kill" >&5
12144 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12145 if test $ac_cv_func_pthread_kill = yes; then
12146
12147                 echo "$as_me:12147: checking if you want to allow EINTR in wgetch with pthreads" >&5
12148 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12149
12150 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12151 if test "${enable_pthreads_eintr+set}" = set; then
12152   enableval="$enable_pthreads_eintr"
12153   use_pthreads_eintr=$enableval
12154 else
12155   use_pthreads_eintr=no
12156 fi;
12157                 echo "$as_me:12157: result: $use_pthreads_eintr" >&5
12158 echo "${ECHO_T}$use_pthreads_eintr" >&6
12159                 if test "x$use_pthreads_eintr" = xyes ; then
12160
12161 cat >>confdefs.h <<\EOF
12162 #define USE_PTHREADS_EINTR 1
12163 EOF
12164
12165                 fi
12166 fi
12167
12168         echo "$as_me:12168: checking if you want to use weak-symbols for pthreads" >&5
12169 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12170
12171 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12172 if test "${enable_weak_symbols+set}" = set; then
12173   enableval="$enable_weak_symbols"
12174   use_weak_symbols=$enableval
12175 else
12176   use_weak_symbols=no
12177 fi;
12178         echo "$as_me:12178: result: $use_weak_symbols" >&5
12179 echo "${ECHO_T}$use_weak_symbols" >&6
12180         if test "x$use_weak_symbols" = xyes ; then
12181
12182 echo "$as_me:12182: checking if $CC supports weak symbols" >&5
12183 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12184 if test "${cf_cv_weak_symbols+set}" = set; then
12185   echo $ECHO_N "(cached) $ECHO_C" >&6
12186 else
12187
12188 cat >conftest.$ac_ext <<_ACEOF
12189 #line 12189 "configure"
12190 #include "confdefs.h"
12191
12192 #include <stdio.h>
12193 int
12194 main ()
12195 {
12196
12197 #if defined(__GNUC__)
12198 #  if defined __USE_ISOC99
12199 #    define _cat_pragma(exp)    _Pragma(#exp)
12200 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12201 #  else
12202 #    define _weak_pragma(exp)
12203 #  endif
12204 #  define _declare(name)        __extension__ extern __typeof__(name) name
12205 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12206 #endif
12207
12208 weak_symbol(fopen);
12209
12210   ;
12211   return 0;
12212 }
12213 _ACEOF
12214 rm -f conftest.$ac_objext
12215 if { (eval echo "$as_me:12215: \"$ac_compile\"") >&5
12216   (eval $ac_compile) 2>&5
12217   ac_status=$?
12218   echo "$as_me:12218: \$? = $ac_status" >&5
12219   (exit $ac_status); } &&
12220          { ac_try='test -s conftest.$ac_objext'
12221   { (eval echo "$as_me:12221: \"$ac_try\"") >&5
12222   (eval $ac_try) 2>&5
12223   ac_status=$?
12224   echo "$as_me:12224: \$? = $ac_status" >&5
12225   (exit $ac_status); }; }; then
12226   cf_cv_weak_symbols=yes
12227 else
12228   echo "$as_me: failed program was:" >&5
12229 cat conftest.$ac_ext >&5
12230 cf_cv_weak_symbols=no
12231 fi
12232 rm -f conftest.$ac_objext conftest.$ac_ext
12233
12234 fi
12235 echo "$as_me:12235: result: $cf_cv_weak_symbols" >&5
12236 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12237
12238         else
12239                 cf_cv_weak_symbols=no
12240         fi
12241
12242         if test "x$cf_cv_weak_symbols" = xyes ; then
12243
12244 cat >>confdefs.h <<\EOF
12245 #define USE_WEAK_SYMBOLS 1
12246 EOF
12247
12248         fi
12249 fi
12250
12251 PTHREAD=
12252 if test "x$with_pthread" = "xyes" ; then
12253
12254 cat >>confdefs.h <<\EOF
12255 #define USE_PTHREADS 1
12256 EOF
12257
12258     enable_reentrant=yes
12259     if test "x$cf_cv_weak_symbols" = xyes ; then
12260         PTHREAD=-lpthread
12261     fi
12262 fi
12263
12264 # Reentrant code has to be opaque; there's little advantage to making ncurses
12265 # opaque outside of that, so there is no --enable-opaque option.  We can use
12266 # this option without --with-pthreads, but this will be always set for
12267 # pthreads.
12268 echo "$as_me:12268: checking if you want experimental reentrant code" >&5
12269 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12270
12271 # Check whether --enable-reentrant or --disable-reentrant was given.
12272 if test "${enable_reentrant+set}" = set; then
12273   enableval="$enable_reentrant"
12274   with_reentrant=$enableval
12275 else
12276   with_reentrant=no
12277 fi;
12278 echo "$as_me:12278: result: $with_reentrant" >&5
12279 echo "${ECHO_T}$with_reentrant" >&6
12280 if test "x$with_reentrant" = xyes ; then
12281         cf_cv_enable_reentrant=1
12282         cf_cv_enable_opaque="NCURSES_INTERNALS"
12283         NCURSES_OPAQUE=1
12284         NCURSES_SIZE_T=int
12285         if test "x$cf_cv_weak_symbols" = xyes ; then
12286
12287 # remove pthread library from $LIBS
12288 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12289
12290 cf_add_libs="-lpthread"
12291 # Filter out duplicates - this happens with badly-designed ".pc" files...
12292 for cf_add_1lib in $TEST_LIBS
12293 do
12294         for cf_add_2lib in $cf_add_libs
12295         do
12296                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12297                 then
12298                         cf_add_1lib=
12299                         break
12300                 fi
12301         done
12302         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12303 done
12304 TEST_LIBS="$cf_add_libs"
12305
12306 cf_add_libs="-lpthread"
12307 # Filter out duplicates - this happens with badly-designed ".pc" files...
12308 for cf_add_1lib in $TEST_LIBS2
12309 do
12310         for cf_add_2lib in $cf_add_libs
12311         do
12312                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12313                 then
12314                         cf_add_1lib=
12315                         break
12316                 fi
12317         done
12318         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12319 done
12320 TEST_LIBS2="$cf_add_libs"
12321
12322         else
12323                 # when not using weak symbols but with_reentrant,
12324                 # add 't' to the library suffix on all platforms
12325                 # except cygwin, where we only do that if ALSO
12326                 # compiling with full thread support.
12327                 case "$host" in
12328                 *cygwin* | *msys*) #(vi
12329                         if test "$with_pthread" = "yes" ; then
12330                                 if test "x$disable_lib_suffixes" = "xno" ; then
12331                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12332                                 fi
12333                         fi ;;
12334                 *)
12335                         if test "x$disable_lib_suffixes" = "xno" ; then
12336                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12337                         fi
12338                         ;;
12339                 esac
12340         fi
12341
12342 cat >>confdefs.h <<\EOF
12343 #define USE_REENTRANT 1
12344 EOF
12345
12346 if test "${with_abi_version+set}" != set; then
12347         case $cf_cv_rel_version in
12348         5.*)
12349                 cf_cv_rel_version=6.0
12350                 cf_cv_abi_version=6
12351                 { echo "$as_me:12351: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12352 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12353                 ;;
12354         esac
12355 fi
12356
12357 else
12358         cf_cv_enable_reentrant=0
12359         cf_cv_enable_opaque="NCURSES_OPAQUE"
12360         NCURSES_OPAQUE=0
12361         NCURSES_SIZE_T=short
12362 fi
12363
12364 ### Allow using a different wrap-prefix
12365 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12366         echo "$as_me:12366: checking for prefix used to wrap public variables" >&5
12367 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12368
12369 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12370 if test "${with_wrap_prefix+set}" = set; then
12371   withval="$with_wrap_prefix"
12372   NCURSES_WRAP_PREFIX=$withval
12373 else
12374   NCURSES_WRAP_PREFIX=_nc_
12375 fi;
12376         echo "$as_me:12376: result: $NCURSES_WRAP_PREFIX" >&5
12377 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12378 else
12379         NCURSES_WRAP_PREFIX=_nc_
12380 fi
12381
12382 cat >>confdefs.h <<EOF
12383 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12384 EOF
12385
12386 echo "$as_me:12386: checking if you want experimental safe-sprintf code" >&5
12387 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12388
12389 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12390 if test "${enable_safe_sprintf+set}" = set; then
12391   enableval="$enable_safe_sprintf"
12392   with_safe_sprintf=$enableval
12393 else
12394   with_safe_sprintf=no
12395 fi;
12396 echo "$as_me:12396: result: $with_safe_sprintf" >&5
12397 echo "${ECHO_T}$with_safe_sprintf" >&6
12398 test "x$with_safe_sprintf" = xyes &&
12399 cat >>confdefs.h <<\EOF
12400 #define USE_SAFE_SPRINTF 1
12401 EOF
12402
12403 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12404 # when hashmap is used scroll hints are useless
12405 if test "$with_hashmap" = no ; then
12406 echo "$as_me:12406: checking if you want to experiment without scrolling-hints code" >&5
12407 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12408
12409 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12410 if test "${enable_scroll_hints+set}" = set; then
12411   enableval="$enable_scroll_hints"
12412   with_scroll_hints=$enableval
12413 else
12414   with_scroll_hints=yes
12415 fi;
12416 echo "$as_me:12416: result: $with_scroll_hints" >&5
12417 echo "${ECHO_T}$with_scroll_hints" >&6
12418 test "x$with_scroll_hints" = xyes &&
12419 cat >>confdefs.h <<\EOF
12420 #define USE_SCROLL_HINTS 1
12421 EOF
12422
12423 fi
12424
12425 echo "$as_me:12425: checking if you want experimental wgetch-events code" >&5
12426 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12427
12428 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12429 if test "${enable_wgetch_events+set}" = set; then
12430   enableval="$enable_wgetch_events"
12431   with_wgetch_events=$enableval
12432 else
12433   with_wgetch_events=no
12434 fi;
12435 echo "$as_me:12435: result: $with_wgetch_events" >&5
12436 echo "${ECHO_T}$with_wgetch_events" >&6
12437 test "x$with_wgetch_events" = xyes &&
12438 cat >>confdefs.h <<\EOF
12439 #define NCURSES_WGETCH_EVENTS 1
12440 EOF
12441
12442 ###############################################################################
12443
12444 ###     use option --disable-echo to suppress full display compiling commands
12445
12446 echo "$as_me:12446: checking if you want to see long compiling messages" >&5
12447 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12448
12449 # Check whether --enable-echo or --disable-echo was given.
12450 if test "${enable_echo+set}" = set; then
12451   enableval="$enable_echo"
12452   test "$enableval" != no && enableval=yes
12453   if test "$enableval" != "yes" ; then
12454
12455     ECHO_LT='--silent'
12456     ECHO_LD='@echo linking $@;'
12457     RULE_CC='@echo compiling $<'
12458     SHOW_CC='@echo compiling $@'
12459     ECHO_CC='@'
12460
12461   else
12462
12463     ECHO_LT=''
12464     ECHO_LD=''
12465     RULE_CC=''
12466     SHOW_CC=''
12467     ECHO_CC=''
12468
12469   fi
12470 else
12471   enableval=yes
12472
12473     ECHO_LT=''
12474     ECHO_LD=''
12475     RULE_CC=''
12476     SHOW_CC=''
12477     ECHO_CC=''
12478
12479 fi;
12480 echo "$as_me:12480: result: $enableval" >&5
12481 echo "${ECHO_T}$enableval" >&6
12482
12483 if test "x$enable_echo" = xyes; then
12484         ECHO_LINK=
12485 else
12486         ECHO_LINK='@ echo linking $@ ... ;'
12487         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12488         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12489 fi
12490
12491 ###     use option --enable-warnings to turn on all gcc warnings
12492 echo "$as_me:12492: checking if you want to see compiler warnings" >&5
12493 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12494
12495 # Check whether --enable-warnings or --disable-warnings was given.
12496 if test "${enable_warnings+set}" = set; then
12497   enableval="$enable_warnings"
12498   with_warnings=$enableval
12499 fi;
12500 echo "$as_me:12500: result: $with_warnings" >&5
12501 echo "${ECHO_T}$with_warnings" >&6
12502
12503 if test "x$with_warnings" = "xyes"; then
12504
12505         ADAFLAGS="$ADAFLAGS -gnatg"
12506
12507 INTEL_COMPILER=no
12508
12509 if test "$GCC" = yes ; then
12510         case $host_os in
12511         linux*|gnu*)
12512                 echo "$as_me:12512: checking if this is really Intel C compiler" >&5
12513 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12514                 cf_save_CFLAGS="$CFLAGS"
12515                 CFLAGS="$CFLAGS -no-gcc"
12516                 cat >conftest.$ac_ext <<_ACEOF
12517 #line 12517 "configure"
12518 #include "confdefs.h"
12519
12520 int
12521 main ()
12522 {
12523
12524 #ifdef __INTEL_COMPILER
12525 #else
12526 make an error
12527 #endif
12528
12529   ;
12530   return 0;
12531 }
12532 _ACEOF
12533 rm -f conftest.$ac_objext
12534 if { (eval echo "$as_me:12534: \"$ac_compile\"") >&5
12535   (eval $ac_compile) 2>&5
12536   ac_status=$?
12537   echo "$as_me:12537: \$? = $ac_status" >&5
12538   (exit $ac_status); } &&
12539          { ac_try='test -s conftest.$ac_objext'
12540   { (eval echo "$as_me:12540: \"$ac_try\"") >&5
12541   (eval $ac_try) 2>&5
12542   ac_status=$?
12543   echo "$as_me:12543: \$? = $ac_status" >&5
12544   (exit $ac_status); }; }; then
12545   INTEL_COMPILER=yes
12546 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12547
12548 else
12549   echo "$as_me: failed program was:" >&5
12550 cat conftest.$ac_ext >&5
12551 fi
12552 rm -f conftest.$ac_objext conftest.$ac_ext
12553                 CFLAGS="$cf_save_CFLAGS"
12554                 echo "$as_me:12554: result: $INTEL_COMPILER" >&5
12555 echo "${ECHO_T}$INTEL_COMPILER" >&6
12556                 ;;
12557         esac
12558 fi
12559
12560 CLANG_COMPILER=no
12561
12562 if test "$GCC" = yes ; then
12563         echo "$as_me:12563: checking if this is really Clang C compiler" >&5
12564 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12565         cf_save_CFLAGS="$CFLAGS"
12566         CFLAGS="$CFLAGS -Qunused-arguments"
12567         cat >conftest.$ac_ext <<_ACEOF
12568 #line 12568 "configure"
12569 #include "confdefs.h"
12570
12571 int
12572 main ()
12573 {
12574
12575 #ifdef __clang__
12576 #else
12577 make an error
12578 #endif
12579
12580   ;
12581   return 0;
12582 }
12583 _ACEOF
12584 rm -f conftest.$ac_objext
12585 if { (eval echo "$as_me:12585: \"$ac_compile\"") >&5
12586   (eval $ac_compile) 2>&5
12587   ac_status=$?
12588   echo "$as_me:12588: \$? = $ac_status" >&5
12589   (exit $ac_status); } &&
12590          { ac_try='test -s conftest.$ac_objext'
12591   { (eval echo "$as_me:12591: \"$ac_try\"") >&5
12592   (eval $ac_try) 2>&5
12593   ac_status=$?
12594   echo "$as_me:12594: \$? = $ac_status" >&5
12595   (exit $ac_status); }; }; then
12596   CLANG_COMPILER=yes
12597 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12598
12599 else
12600   echo "$as_me: failed program was:" >&5
12601 cat conftest.$ac_ext >&5
12602 fi
12603 rm -f conftest.$ac_objext conftest.$ac_ext
12604         CFLAGS="$cf_save_CFLAGS"
12605         echo "$as_me:12605: result: $CLANG_COMPILER" >&5
12606 echo "${ECHO_T}$CLANG_COMPILER" >&6
12607 fi
12608
12609 cat > conftest.$ac_ext <<EOF
12610 #line 12610 "${as_me:-configure}"
12611 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12612 EOF
12613
12614 if test "$INTEL_COMPILER" = yes
12615 then
12616 # The "-wdXXX" options suppress warnings:
12617 # remark #1419: external declaration in primary source file
12618 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12619 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12620 # remark #193: zero used for undefined preprocessing identifier
12621 # remark #593: variable "curs_sb_left_arrow" was set but never used
12622 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12623 # remark #869: parameter "tw" was never referenced
12624 # remark #981: operands are evaluated in unspecified order
12625 # warning #279: controlling expression is constant
12626
12627         { echo "$as_me:12627: checking for $CC warning options..." >&5
12628 echo "$as_me: checking for $CC warning options..." >&6;}
12629         cf_save_CFLAGS="$CFLAGS"
12630         EXTRA_CFLAGS="-Wall"
12631         for cf_opt in \
12632                 wd1419 \
12633                 wd1683 \
12634                 wd1684 \
12635                 wd193 \
12636                 wd593 \
12637                 wd279 \
12638                 wd810 \
12639                 wd869 \
12640                 wd981
12641         do
12642                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12643                 if { (eval echo "$as_me:12643: \"$ac_compile\"") >&5
12644   (eval $ac_compile) 2>&5
12645   ac_status=$?
12646   echo "$as_me:12646: \$? = $ac_status" >&5
12647   (exit $ac_status); }; then
12648                         test -n "$verbose" && echo "$as_me:12648: result: ... -$cf_opt" >&5
12649 echo "${ECHO_T}... -$cf_opt" >&6
12650                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12651                 fi
12652         done
12653         CFLAGS="$cf_save_CFLAGS"
12654
12655 elif test "$GCC" = yes
12656 then
12657         { echo "$as_me:12657: checking for $CC warning options..." >&5
12658 echo "$as_me: checking for $CC warning options..." >&6;}
12659         cf_save_CFLAGS="$CFLAGS"
12660         EXTRA_CFLAGS=
12661         cf_warn_CONST=""
12662         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12663         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12664         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12665         for cf_opt in W Wall \
12666                 Wbad-function-cast \
12667                 Wcast-align \
12668                 Wcast-qual \
12669                 Wdeclaration-after-statement \
12670                 Wextra \
12671                 Winline \
12672                 Wmissing-declarations \
12673                 Wmissing-prototypes \
12674                 Wnested-externs \
12675                 Wpointer-arith \
12676                 Wshadow \
12677                 Wstrict-prototypes \
12678                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12679         do
12680                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12681                 if { (eval echo "$as_me:12681: \"$ac_compile\"") >&5
12682   (eval $ac_compile) 2>&5
12683   ac_status=$?
12684   echo "$as_me:12684: \$? = $ac_status" >&5
12685   (exit $ac_status); }; then
12686                         test -n "$verbose" && echo "$as_me:12686: result: ... -$cf_opt" >&5
12687 echo "${ECHO_T}... -$cf_opt" >&6
12688                         case $cf_opt in #(vi
12689                         Wcast-qual) #(vi
12690                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12691                                 ;;
12692                         Winline) #(vi
12693                                 case $GCC_VERSION in
12694                                 [34].*)
12695                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12696
12697 echo "${as_me:-configure}:12697: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12698
12699                                         continue;;
12700                                 esac
12701                                 ;;
12702                         Wpointer-arith) #(vi
12703                                 case $GCC_VERSION in
12704                                 [12].*)
12705                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12706
12707 echo "${as_me:-configure}:12707: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12708
12709                                         continue;;
12710                                 esac
12711                                 ;;
12712                         esac
12713                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12714                 fi
12715         done
12716         CFLAGS="$cf_save_CFLAGS"
12717 fi
12718 rm -rf conftest*
12719
12720         if test "x$cf_with_cxx" = xyes ; then
12721
12722 INTEL_CPLUSPLUS=no
12723
12724 if test "$GCC" = yes ; then
12725         case $host_os in
12726         linux*|gnu*)
12727                 echo "$as_me:12727: checking if this is really Intel C++ compiler" >&5
12728 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12729                 cf_save_CFLAGS="$CXXFLAGS"
12730                 CXXFLAGS="$CXXFLAGS -no-gcc"
12731                 cat >conftest.$ac_ext <<_ACEOF
12732 #line 12732 "configure"
12733 #include "confdefs.h"
12734
12735 int
12736 main ()
12737 {
12738
12739 #ifdef __INTEL_COMPILER
12740 #else
12741 make an error
12742 #endif
12743
12744   ;
12745   return 0;
12746 }
12747 _ACEOF
12748 rm -f conftest.$ac_objext
12749 if { (eval echo "$as_me:12749: \"$ac_compile\"") >&5
12750   (eval $ac_compile) 2>&5
12751   ac_status=$?
12752   echo "$as_me:12752: \$? = $ac_status" >&5
12753   (exit $ac_status); } &&
12754          { ac_try='test -s conftest.$ac_objext'
12755   { (eval echo "$as_me:12755: \"$ac_try\"") >&5
12756   (eval $ac_try) 2>&5
12757   ac_status=$?
12758   echo "$as_me:12758: \$? = $ac_status" >&5
12759   (exit $ac_status); }; }; then
12760   INTEL_CPLUSPLUS=yes
12761 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12762
12763 else
12764   echo "$as_me: failed program was:" >&5
12765 cat conftest.$ac_ext >&5
12766 fi
12767 rm -f conftest.$ac_objext conftest.$ac_ext
12768                 CXXFLAGS="$cf_save_CFLAGS"
12769                 echo "$as_me:12769: result: $INTEL_CPLUSPLUS" >&5
12770 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12771                 ;;
12772         esac
12773 fi
12774
12775 CLANG_CPLUSPLUS=no
12776
12777 if test "$GCC" = yes ; then
12778         echo "$as_me:12778: checking if this is really Clang C++ compiler" >&5
12779 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12780         cf_save_CFLAGS="$CXXFLAGS"
12781         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12782         cat >conftest.$ac_ext <<_ACEOF
12783 #line 12783 "configure"
12784 #include "confdefs.h"
12785
12786 int
12787 main ()
12788 {
12789
12790 #ifdef __clang__
12791 #else
12792 make an error
12793 #endif
12794
12795   ;
12796   return 0;
12797 }
12798 _ACEOF
12799 rm -f conftest.$ac_objext
12800 if { (eval echo "$as_me:12800: \"$ac_compile\"") >&5
12801   (eval $ac_compile) 2>&5
12802   ac_status=$?
12803   echo "$as_me:12803: \$? = $ac_status" >&5
12804   (exit $ac_status); } &&
12805          { ac_try='test -s conftest.$ac_objext'
12806   { (eval echo "$as_me:12806: \"$ac_try\"") >&5
12807   (eval $ac_try) 2>&5
12808   ac_status=$?
12809   echo "$as_me:12809: \$? = $ac_status" >&5
12810   (exit $ac_status); }; }; then
12811   CLANG_CPLUSPLUS=yes
12812 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12813
12814 else
12815   echo "$as_me: failed program was:" >&5
12816 cat conftest.$ac_ext >&5
12817 fi
12818 rm -f conftest.$ac_objext conftest.$ac_ext
12819         CXXFLAGS="$cf_save_CFLAGS"
12820         echo "$as_me:12820: result: $CLANG_CPLUSPLUS" >&5
12821 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12822 fi
12823
12824 ac_ext=cc
12825 ac_cpp='$CXXCPP $CPPFLAGS'
12826 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12827 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12828 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12829 ac_main_return=return
12830
12831 cat > conftest.$ac_ext <<EOF
12832 #line 12832 "configure"
12833 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12834 EOF
12835
12836 if test "$INTEL_CPLUSPLUS" = yes
12837 then
12838 # The "-wdXXX" options suppress warnings:
12839 # remark #1419: external declaration in primary source file
12840 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12841 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12842 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12843 # remark #193: zero used for undefined preprocessing identifier
12844 # remark #593: variable "curs_sb_left_arrow" was set but never used
12845 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12846 # remark #869: parameter "tw" was never referenced
12847 # remark #981: operands are evaluated in unspecified order
12848 # warning #269: invalid format string conversion
12849
12850         { echo "$as_me:12850: checking for $CC warning options..." >&5
12851 echo "$as_me: checking for $CC warning options..." >&6;}
12852         cf_save_CXXFLAGS="$CXXFLAGS"
12853         EXTRA_CXXFLAGS="-Wall"
12854         for cf_opt in \
12855                 wd1419 \
12856                 wd1682 \
12857                 wd1683 \
12858                 wd1684 \
12859                 wd193 \
12860                 wd279 \
12861                 wd593 \
12862                 wd810 \
12863                 wd869 \
12864                 wd981
12865         do
12866                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12867                 if { (eval echo "$as_me:12867: \"$ac_compile\"") >&5
12868   (eval $ac_compile) 2>&5
12869   ac_status=$?
12870   echo "$as_me:12870: \$? = $ac_status" >&5
12871   (exit $ac_status); }; then
12872                         test -n "$verbose" && echo "$as_me:12872: result: ... -$cf_opt" >&5
12873 echo "${ECHO_T}... -$cf_opt" >&6
12874                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12875                 fi
12876         done
12877         CXXFLAGS="$cf_save_CXXFLAGS"
12878
12879 elif test "$GXX" = yes
12880 then
12881         { echo "$as_me:12881: checking for $CXX warning options..." >&5
12882 echo "$as_me: checking for $CXX warning options..." >&6;}
12883         cf_save_CXXFLAGS="$CXXFLAGS"
12884         EXTRA_CXXFLAGS="-W -Wall"
12885         cf_gxx_extra_warnings=""
12886         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12887         case "$GCC_VERSION" in
12888         [1-2].*)
12889                 ;;
12890         *)
12891                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12892                 ;;
12893         esac
12894         for cf_opt in \
12895                 Wabi \
12896                 fabi-version=0 \
12897                 Wextra \
12898                 Wignored-qualifiers \
12899                 Wlogical-op \
12900                 Woverloaded-virtual \
12901                 Wsign-promo \
12902                 Wsynth \
12903                 Wold-style-cast \
12904                 Wcast-align \
12905                 Wcast-qual \
12906                 Wpointer-arith \
12907                 Wshadow \
12908                 Wundef $cf_gxx_extra_warnings Wno-unused
12909         do
12910                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12911                 if { (eval echo "$as_me:12911: \"$ac_compile\"") >&5
12912   (eval $ac_compile) 2>&5
12913   ac_status=$?
12914   echo "$as_me:12914: \$? = $ac_status" >&5
12915   (exit $ac_status); }; then
12916                         test -n "$verbose" && echo "$as_me:12916: result: ... -$cf_opt" >&5
12917 echo "${ECHO_T}... -$cf_opt" >&6
12918                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12919                 else
12920                         test -n "$verbose" && echo "$as_me:12920: result: ... no -$cf_opt" >&5
12921 echo "${ECHO_T}... no -$cf_opt" >&6
12922                 fi
12923         done
12924         CXXFLAGS="$cf_save_CXXFLAGS"
12925 fi
12926
12927 rm -rf conftest*
12928 ac_ext=c
12929 ac_cpp='$CPP $CPPFLAGS'
12930 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12931 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12932 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12933 ac_main_return=return
12934
12935         fi
12936 fi
12937
12938 if test "$GCC" = yes
12939 then
12940 cat > conftest.i <<EOF
12941 #ifndef GCC_PRINTF
12942 #define GCC_PRINTF 0
12943 #endif
12944 #ifndef GCC_SCANF
12945 #define GCC_SCANF 0
12946 #endif
12947 #ifndef GCC_NORETURN
12948 #define GCC_NORETURN /* nothing */
12949 #endif
12950 #ifndef GCC_UNUSED
12951 #define GCC_UNUSED /* nothing */
12952 #endif
12953 EOF
12954 if test "$GCC" = yes
12955 then
12956         { echo "$as_me:12956: checking for $CC __attribute__ directives..." >&5
12957 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12958 cat > conftest.$ac_ext <<EOF
12959 #line 12959 "${as_me:-configure}"
12960 #include "confdefs.h"
12961 #include "conftest.h"
12962 #include "conftest.i"
12963 #if     GCC_PRINTF
12964 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12965 #else
12966 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12967 #endif
12968 #if     GCC_SCANF
12969 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12970 #else
12971 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12972 #endif
12973 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12974 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12975 extern void foo(void) GCC_NORETURN;
12976 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12977 EOF
12978         cf_printf_attribute=no
12979         cf_scanf_attribute=no
12980         for cf_attribute in scanf printf unused noreturn
12981         do
12982
12983 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12984
12985                 cf_directive="__attribute__(($cf_attribute))"
12986                 echo "checking for $CC $cf_directive" 1>&5
12987
12988                 case $cf_attribute in #(vi
12989                 printf) #(vi
12990                         cf_printf_attribute=yes
12991                         cat >conftest.h <<EOF
12992 #define GCC_$cf_ATTRIBUTE 1
12993 EOF
12994                         ;;
12995                 scanf) #(vi
12996                         cf_scanf_attribute=yes
12997                         cat >conftest.h <<EOF
12998 #define GCC_$cf_ATTRIBUTE 1
12999 EOF
13000                         ;;
13001                 *) #(vi
13002                         cat >conftest.h <<EOF
13003 #define GCC_$cf_ATTRIBUTE $cf_directive
13004 EOF
13005                         ;;
13006                 esac
13007
13008                 if { (eval echo "$as_me:13008: \"$ac_compile\"") >&5
13009   (eval $ac_compile) 2>&5
13010   ac_status=$?
13011   echo "$as_me:13011: \$? = $ac_status" >&5
13012   (exit $ac_status); }; then
13013                         test -n "$verbose" && echo "$as_me:13013: result: ... $cf_attribute" >&5
13014 echo "${ECHO_T}... $cf_attribute" >&6
13015                         cat conftest.h >>confdefs.h
13016                         case $cf_attribute in #(vi
13017                         noreturn) #(vi
13018
13019 cat >>confdefs.h <<EOF
13020 #define GCC_NORETURN $cf_directive
13021 EOF
13022
13023                                 ;;
13024                         printf) #(vi
13025                                 cf_value='/* nothing */'
13026                                 if test "$cf_printf_attribute" != no ; then
13027                                         cf_value='__attribute__((format(printf,fmt,var)))'
13028
13029 cat >>confdefs.h <<\EOF
13030 #define GCC_PRINTF 1
13031 EOF
13032
13033                                 fi
13034
13035 cat >>confdefs.h <<EOF
13036 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13037 EOF
13038
13039                                 ;;
13040                         scanf) #(vi
13041                                 cf_value='/* nothing */'
13042                                 if test "$cf_scanf_attribute" != no ; then
13043                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13044
13045 cat >>confdefs.h <<\EOF
13046 #define GCC_SCANF 1
13047 EOF
13048
13049                                 fi
13050
13051 cat >>confdefs.h <<EOF
13052 #define GCC_SCANFLIKE(fmt,var) $cf_value
13053 EOF
13054
13055                                 ;;
13056                         unused) #(vi
13057
13058 cat >>confdefs.h <<EOF
13059 #define GCC_UNUSED $cf_directive
13060 EOF
13061
13062                                 ;;
13063                         esac
13064                 fi
13065         done
13066 else
13067         fgrep define conftest.i >>confdefs.h
13068 fi
13069 rm -rf conftest*
13070 fi
13071
13072 echo "$as_me:13072: checking if you want to work around bogus compiler/loader warnings" >&5
13073 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13074
13075 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13076 if test "${enable_string_hacks+set}" = set; then
13077   enableval="$enable_string_hacks"
13078   with_string_hacks=$enableval
13079 else
13080   with_string_hacks=no
13081 fi;
13082 echo "$as_me:13082: result: $with_string_hacks" >&5
13083 echo "${ECHO_T}$with_string_hacks" >&6
13084
13085 if test "x$with_string_hacks" = "xyes"; then
13086
13087 cat >>confdefs.h <<\EOF
13088 #define USE_STRING_HACKS 1
13089 EOF
13090
13091         { echo "$as_me:13091: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13092 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13093
13094 for ac_func in strlcat strlcpy snprintf
13095 do
13096 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13097 echo "$as_me:13097: checking for $ac_func" >&5
13098 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13099 if eval "test \"\${$as_ac_var+set}\" = set"; then
13100   echo $ECHO_N "(cached) $ECHO_C" >&6
13101 else
13102   cat >conftest.$ac_ext <<_ACEOF
13103 #line 13103 "configure"
13104 #include "confdefs.h"
13105 /* System header to define __stub macros and hopefully few prototypes,
13106     which can conflict with char $ac_func (); below.  */
13107 #include <assert.h>
13108 /* Override any gcc2 internal prototype to avoid an error.  */
13109 #ifdef __cplusplus
13110 extern "C"
13111 #endif
13112 /* We use char because int might match the return type of a gcc2
13113    builtin and then its argument prototype would still apply.  */
13114 char $ac_func ();
13115 char (*f) ();
13116
13117 int
13118 main ()
13119 {
13120 /* The GNU C library defines this for functions which it implements
13121     to always fail with ENOSYS.  Some functions are actually named
13122     something starting with __ and the normal name is an alias.  */
13123 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13124 choke me
13125 #else
13126 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13127 #endif
13128
13129   ;
13130   return 0;
13131 }
13132 _ACEOF
13133 rm -f conftest.$ac_objext conftest$ac_exeext
13134 if { (eval echo "$as_me:13134: \"$ac_link\"") >&5
13135   (eval $ac_link) 2>&5
13136   ac_status=$?
13137   echo "$as_me:13137: \$? = $ac_status" >&5
13138   (exit $ac_status); } &&
13139          { ac_try='test -s conftest$ac_exeext'
13140   { (eval echo "$as_me:13140: \"$ac_try\"") >&5
13141   (eval $ac_try) 2>&5
13142   ac_status=$?
13143   echo "$as_me:13143: \$? = $ac_status" >&5
13144   (exit $ac_status); }; }; then
13145   eval "$as_ac_var=yes"
13146 else
13147   echo "$as_me: failed program was:" >&5
13148 cat conftest.$ac_ext >&5
13149 eval "$as_ac_var=no"
13150 fi
13151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13152 fi
13153 echo "$as_me:13153: result: `eval echo '${'$as_ac_var'}'`" >&5
13154 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13155 if test `eval echo '${'$as_ac_var'}'` = yes; then
13156   cat >>confdefs.h <<EOF
13157 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13158 EOF
13159
13160 fi
13161 done
13162
13163 fi
13164
13165 ###     use option --enable-assertions to turn on generation of assertion code
13166 echo "$as_me:13166: checking if you want to enable runtime assertions" >&5
13167 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13168
13169 # Check whether --enable-assertions or --disable-assertions was given.
13170 if test "${enable_assertions+set}" = set; then
13171   enableval="$enable_assertions"
13172   with_assertions=$enableval
13173 else
13174   with_assertions=no
13175 fi;
13176 echo "$as_me:13176: result: $with_assertions" >&5
13177 echo "${ECHO_T}$with_assertions" >&6
13178 if test -n "$GCC"
13179 then
13180         if test "$with_assertions" = no
13181         then
13182                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13183         else
13184
13185         ADAFLAGS="$ADAFLAGS -gnata"
13186
13187         fi
13188 fi
13189
13190 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13191
13192 echo "$as_me:13192: checking if you want to use dmalloc for testing" >&5
13193 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13194
13195 # Check whether --with-dmalloc or --without-dmalloc was given.
13196 if test "${with_dmalloc+set}" = set; then
13197   withval="$with_dmalloc"
13198
13199 cat >>confdefs.h <<EOF
13200 #define USE_DMALLOC 1
13201 EOF
13202
13203         : ${with_cflags:=-g}
13204         : ${with_no_leaks:=yes}
13205          with_dmalloc=yes
13206 else
13207   with_dmalloc=
13208 fi;
13209 echo "$as_me:13209: result: ${with_dmalloc:-no}" >&5
13210 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13211
13212 case .$with_cflags in #(vi
13213 .*-g*)
13214         case .$CFLAGS in #(vi
13215         .*-g*) #(vi
13216                 ;;
13217         *)
13218
13219 cf_fix_cppflags=no
13220 cf_new_cflags=
13221 cf_new_cppflags=
13222 cf_new_extra_cppflags=
13223
13224 for cf_add_cflags in -g
13225 do
13226 case $cf_fix_cppflags in
13227 no)
13228         case $cf_add_cflags in #(vi
13229         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13230                 case $cf_add_cflags in
13231                 -D*)
13232                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13233
13234                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13235                                 && test -z "${cf_tst_cflags}" \
13236                                 && cf_fix_cppflags=yes
13237
13238                         if test $cf_fix_cppflags = yes ; then
13239                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13240                                 continue
13241                         elif test "${cf_tst_cflags}" = "\"'" ; then
13242                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13243                                 continue
13244                         fi
13245                         ;;
13246                 esac
13247                 case "$CPPFLAGS" in
13248                 *$cf_add_cflags) #(vi
13249                         ;;
13250                 *) #(vi
13251                         case $cf_add_cflags in #(vi
13252                         -D*)
13253                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13254
13255 CPPFLAGS=`echo "$CPPFLAGS" | \
13256         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13257                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13258
13259                                 ;;
13260                         esac
13261                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13262                         ;;
13263                 esac
13264                 ;;
13265         *)
13266                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13267                 ;;
13268         esac
13269         ;;
13270 yes)
13271         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13272
13273         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13274
13275         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13276                 && test -z "${cf_tst_cflags}" \
13277                 && cf_fix_cppflags=no
13278         ;;
13279 esac
13280 done
13281
13282 if test -n "$cf_new_cflags" ; then
13283
13284         CFLAGS="$CFLAGS $cf_new_cflags"
13285 fi
13286
13287 if test -n "$cf_new_cppflags" ; then
13288
13289         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13290 fi
13291
13292 if test -n "$cf_new_extra_cppflags" ; then
13293
13294         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13295 fi
13296
13297                 ;;
13298         esac
13299         ;;
13300 esac
13301
13302 if test "$with_dmalloc" = yes ; then
13303         echo "$as_me:13303: checking for dmalloc.h" >&5
13304 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13305 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13306   echo $ECHO_N "(cached) $ECHO_C" >&6
13307 else
13308   cat >conftest.$ac_ext <<_ACEOF
13309 #line 13309 "configure"
13310 #include "confdefs.h"
13311 #include <dmalloc.h>
13312 _ACEOF
13313 if { (eval echo "$as_me:13313: \"$ac_cpp conftest.$ac_ext\"") >&5
13314   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13315   ac_status=$?
13316   egrep -v '^ *\+' conftest.er1 >conftest.err
13317   rm -f conftest.er1
13318   cat conftest.err >&5
13319   echo "$as_me:13319: \$? = $ac_status" >&5
13320   (exit $ac_status); } >/dev/null; then
13321   if test -s conftest.err; then
13322     ac_cpp_err=$ac_c_preproc_warn_flag
13323   else
13324     ac_cpp_err=
13325   fi
13326 else
13327   ac_cpp_err=yes
13328 fi
13329 if test -z "$ac_cpp_err"; then
13330   ac_cv_header_dmalloc_h=yes
13331 else
13332   echo "$as_me: failed program was:" >&5
13333   cat conftest.$ac_ext >&5
13334   ac_cv_header_dmalloc_h=no
13335 fi
13336 rm -f conftest.err conftest.$ac_ext
13337 fi
13338 echo "$as_me:13338: result: $ac_cv_header_dmalloc_h" >&5
13339 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13340 if test $ac_cv_header_dmalloc_h = yes; then
13341
13342 echo "$as_me:13342: checking for dmalloc_debug in -ldmalloc" >&5
13343 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13344 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13345   echo $ECHO_N "(cached) $ECHO_C" >&6
13346 else
13347   ac_check_lib_save_LIBS=$LIBS
13348 LIBS="-ldmalloc  $LIBS"
13349 cat >conftest.$ac_ext <<_ACEOF
13350 #line 13350 "configure"
13351 #include "confdefs.h"
13352
13353 /* Override any gcc2 internal prototype to avoid an error.  */
13354 #ifdef __cplusplus
13355 extern "C"
13356 #endif
13357 /* We use char because int might match the return type of a gcc2
13358    builtin and then its argument prototype would still apply.  */
13359 char dmalloc_debug ();
13360 int
13361 main ()
13362 {
13363 dmalloc_debug ();
13364   ;
13365   return 0;
13366 }
13367 _ACEOF
13368 rm -f conftest.$ac_objext conftest$ac_exeext
13369 if { (eval echo "$as_me:13369: \"$ac_link\"") >&5
13370   (eval $ac_link) 2>&5
13371   ac_status=$?
13372   echo "$as_me:13372: \$? = $ac_status" >&5
13373   (exit $ac_status); } &&
13374          { ac_try='test -s conftest$ac_exeext'
13375   { (eval echo "$as_me:13375: \"$ac_try\"") >&5
13376   (eval $ac_try) 2>&5
13377   ac_status=$?
13378   echo "$as_me:13378: \$? = $ac_status" >&5
13379   (exit $ac_status); }; }; then
13380   ac_cv_lib_dmalloc_dmalloc_debug=yes
13381 else
13382   echo "$as_me: failed program was:" >&5
13383 cat conftest.$ac_ext >&5
13384 ac_cv_lib_dmalloc_dmalloc_debug=no
13385 fi
13386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13387 LIBS=$ac_check_lib_save_LIBS
13388 fi
13389 echo "$as_me:13389: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13390 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13391 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13392   cat >>confdefs.h <<EOF
13393 #define HAVE_LIBDMALLOC 1
13394 EOF
13395
13396   LIBS="-ldmalloc $LIBS"
13397
13398 fi
13399
13400 fi
13401
13402 fi
13403
13404 echo "$as_me:13404: checking if you want to use dbmalloc for testing" >&5
13405 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13406
13407 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13408 if test "${with_dbmalloc+set}" = set; then
13409   withval="$with_dbmalloc"
13410
13411 cat >>confdefs.h <<EOF
13412 #define USE_DBMALLOC 1
13413 EOF
13414
13415         : ${with_cflags:=-g}
13416         : ${with_no_leaks:=yes}
13417          with_dbmalloc=yes
13418 else
13419   with_dbmalloc=
13420 fi;
13421 echo "$as_me:13421: result: ${with_dbmalloc:-no}" >&5
13422 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13423
13424 case .$with_cflags in #(vi
13425 .*-g*)
13426         case .$CFLAGS in #(vi
13427         .*-g*) #(vi
13428                 ;;
13429         *)
13430
13431 cf_fix_cppflags=no
13432 cf_new_cflags=
13433 cf_new_cppflags=
13434 cf_new_extra_cppflags=
13435
13436 for cf_add_cflags in -g
13437 do
13438 case $cf_fix_cppflags in
13439 no)
13440         case $cf_add_cflags in #(vi
13441         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13442                 case $cf_add_cflags in
13443                 -D*)
13444                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13445
13446                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13447                                 && test -z "${cf_tst_cflags}" \
13448                                 && cf_fix_cppflags=yes
13449
13450                         if test $cf_fix_cppflags = yes ; then
13451                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13452                                 continue
13453                         elif test "${cf_tst_cflags}" = "\"'" ; then
13454                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13455                                 continue
13456                         fi
13457                         ;;
13458                 esac
13459                 case "$CPPFLAGS" in
13460                 *$cf_add_cflags) #(vi
13461                         ;;
13462                 *) #(vi
13463                         case $cf_add_cflags in #(vi
13464                         -D*)
13465                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13466
13467 CPPFLAGS=`echo "$CPPFLAGS" | \
13468         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13469                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13470
13471                                 ;;
13472                         esac
13473                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13474                         ;;
13475                 esac
13476                 ;;
13477         *)
13478                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13479                 ;;
13480         esac
13481         ;;
13482 yes)
13483         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13484
13485         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13486
13487         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13488                 && test -z "${cf_tst_cflags}" \
13489                 && cf_fix_cppflags=no
13490         ;;
13491 esac
13492 done
13493
13494 if test -n "$cf_new_cflags" ; then
13495
13496         CFLAGS="$CFLAGS $cf_new_cflags"
13497 fi
13498
13499 if test -n "$cf_new_cppflags" ; then
13500
13501         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13502 fi
13503
13504 if test -n "$cf_new_extra_cppflags" ; then
13505
13506         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13507 fi
13508
13509                 ;;
13510         esac
13511         ;;
13512 esac
13513
13514 if test "$with_dbmalloc" = yes ; then
13515         echo "$as_me:13515: checking for dbmalloc.h" >&5
13516 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13517 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13518   echo $ECHO_N "(cached) $ECHO_C" >&6
13519 else
13520   cat >conftest.$ac_ext <<_ACEOF
13521 #line 13521 "configure"
13522 #include "confdefs.h"
13523 #include <dbmalloc.h>
13524 _ACEOF
13525 if { (eval echo "$as_me:13525: \"$ac_cpp conftest.$ac_ext\"") >&5
13526   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13527   ac_status=$?
13528   egrep -v '^ *\+' conftest.er1 >conftest.err
13529   rm -f conftest.er1
13530   cat conftest.err >&5
13531   echo "$as_me:13531: \$? = $ac_status" >&5
13532   (exit $ac_status); } >/dev/null; then
13533   if test -s conftest.err; then
13534     ac_cpp_err=$ac_c_preproc_warn_flag
13535   else
13536     ac_cpp_err=
13537   fi
13538 else
13539   ac_cpp_err=yes
13540 fi
13541 if test -z "$ac_cpp_err"; then
13542   ac_cv_header_dbmalloc_h=yes
13543 else
13544   echo "$as_me: failed program was:" >&5
13545   cat conftest.$ac_ext >&5
13546   ac_cv_header_dbmalloc_h=no
13547 fi
13548 rm -f conftest.err conftest.$ac_ext
13549 fi
13550 echo "$as_me:13550: result: $ac_cv_header_dbmalloc_h" >&5
13551 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13552 if test $ac_cv_header_dbmalloc_h = yes; then
13553
13554 echo "$as_me:13554: checking for debug_malloc in -ldbmalloc" >&5
13555 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13556 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13557   echo $ECHO_N "(cached) $ECHO_C" >&6
13558 else
13559   ac_check_lib_save_LIBS=$LIBS
13560 LIBS="-ldbmalloc  $LIBS"
13561 cat >conftest.$ac_ext <<_ACEOF
13562 #line 13562 "configure"
13563 #include "confdefs.h"
13564
13565 /* Override any gcc2 internal prototype to avoid an error.  */
13566 #ifdef __cplusplus
13567 extern "C"
13568 #endif
13569 /* We use char because int might match the return type of a gcc2
13570    builtin and then its argument prototype would still apply.  */
13571 char debug_malloc ();
13572 int
13573 main ()
13574 {
13575 debug_malloc ();
13576   ;
13577   return 0;
13578 }
13579 _ACEOF
13580 rm -f conftest.$ac_objext conftest$ac_exeext
13581 if { (eval echo "$as_me:13581: \"$ac_link\"") >&5
13582   (eval $ac_link) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); } &&
13586          { ac_try='test -s conftest$ac_exeext'
13587   { (eval echo "$as_me:13587: \"$ac_try\"") >&5
13588   (eval $ac_try) 2>&5
13589   ac_status=$?
13590   echo "$as_me:13590: \$? = $ac_status" >&5
13591   (exit $ac_status); }; }; then
13592   ac_cv_lib_dbmalloc_debug_malloc=yes
13593 else
13594   echo "$as_me: failed program was:" >&5
13595 cat conftest.$ac_ext >&5
13596 ac_cv_lib_dbmalloc_debug_malloc=no
13597 fi
13598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13599 LIBS=$ac_check_lib_save_LIBS
13600 fi
13601 echo "$as_me:13601: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13602 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13603 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13604   cat >>confdefs.h <<EOF
13605 #define HAVE_LIBDBMALLOC 1
13606 EOF
13607
13608   LIBS="-ldbmalloc $LIBS"
13609
13610 fi
13611
13612 fi
13613
13614 fi
13615
13616 echo "$as_me:13616: checking if you want to use valgrind for testing" >&5
13617 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13618
13619 # Check whether --with-valgrind or --without-valgrind was given.
13620 if test "${with_valgrind+set}" = set; then
13621   withval="$with_valgrind"
13622
13623 cat >>confdefs.h <<EOF
13624 #define USE_VALGRIND 1
13625 EOF
13626
13627         : ${with_cflags:=-g}
13628         : ${with_no_leaks:=yes}
13629          with_valgrind=yes
13630 else
13631   with_valgrind=
13632 fi;
13633 echo "$as_me:13633: result: ${with_valgrind:-no}" >&5
13634 echo "${ECHO_T}${with_valgrind:-no}" >&6
13635
13636 case .$with_cflags in #(vi
13637 .*-g*)
13638         case .$CFLAGS in #(vi
13639         .*-g*) #(vi
13640                 ;;
13641         *)
13642
13643 cf_fix_cppflags=no
13644 cf_new_cflags=
13645 cf_new_cppflags=
13646 cf_new_extra_cppflags=
13647
13648 for cf_add_cflags in -g
13649 do
13650 case $cf_fix_cppflags in
13651 no)
13652         case $cf_add_cflags in #(vi
13653         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13654                 case $cf_add_cflags in
13655                 -D*)
13656                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13657
13658                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13659                                 && test -z "${cf_tst_cflags}" \
13660                                 && cf_fix_cppflags=yes
13661
13662                         if test $cf_fix_cppflags = yes ; then
13663                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13664                                 continue
13665                         elif test "${cf_tst_cflags}" = "\"'" ; then
13666                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13667                                 continue
13668                         fi
13669                         ;;
13670                 esac
13671                 case "$CPPFLAGS" in
13672                 *$cf_add_cflags) #(vi
13673                         ;;
13674                 *) #(vi
13675                         case $cf_add_cflags in #(vi
13676                         -D*)
13677                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13678
13679 CPPFLAGS=`echo "$CPPFLAGS" | \
13680         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13681                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13682
13683                                 ;;
13684                         esac
13685                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13686                         ;;
13687                 esac
13688                 ;;
13689         *)
13690                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13691                 ;;
13692         esac
13693         ;;
13694 yes)
13695         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13696
13697         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13698
13699         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13700                 && test -z "${cf_tst_cflags}" \
13701                 && cf_fix_cppflags=no
13702         ;;
13703 esac
13704 done
13705
13706 if test -n "$cf_new_cflags" ; then
13707
13708         CFLAGS="$CFLAGS $cf_new_cflags"
13709 fi
13710
13711 if test -n "$cf_new_cppflags" ; then
13712
13713         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13714 fi
13715
13716 if test -n "$cf_new_extra_cppflags" ; then
13717
13718         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13719 fi
13720
13721                 ;;
13722         esac
13723         ;;
13724 esac
13725
13726 echo "$as_me:13726: checking if you want to perform memory-leak testing" >&5
13727 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13728
13729 # Check whether --enable-leaks or --disable-leaks was given.
13730 if test "${enable_leaks+set}" = set; then
13731   enableval="$enable_leaks"
13732   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13733 else
13734   : ${with_no_leaks:=no}
13735 fi;
13736 echo "$as_me:13736: result: $with_no_leaks" >&5
13737 echo "${ECHO_T}$with_no_leaks" >&6
13738
13739 if test "$with_no_leaks" = yes ; then
13740
13741 cat >>confdefs.h <<\EOF
13742 #define NO_LEAKS 1
13743 EOF
13744
13745 cat >>confdefs.h <<\EOF
13746 #define YY_NO_LEAKS 1
13747 EOF
13748
13749 fi
13750
13751 cat >>confdefs.h <<\EOF
13752 #define HAVE_NC_ALLOC_H 1
13753 EOF
13754
13755 ###     use option --enable-expanded to generate certain macros as functions
13756
13757 # Check whether --enable-expanded or --disable-expanded was given.
13758 if test "${enable_expanded+set}" = set; then
13759   enableval="$enable_expanded"
13760   test "x$enableval" = xyes &&
13761 cat >>confdefs.h <<\EOF
13762 #define NCURSES_EXPANDED 1
13763 EOF
13764
13765 fi;
13766
13767 ###     use option --disable-macros to suppress macros in favor of functions
13768
13769 # Check whether --enable-macros or --disable-macros was given.
13770 if test "${enable_macros+set}" = set; then
13771   enableval="$enable_macros"
13772   test "$enableval" = no &&
13773 cat >>confdefs.h <<\EOF
13774 #define NCURSES_NOMACROS 1
13775 EOF
13776
13777 fi;
13778
13779 # Normally we only add trace() to the debug-library.  Allow this to be
13780 # extended to all models of the ncurses library:
13781 cf_all_traces=no
13782 case "$CFLAGS $CPPFLAGS" in
13783 *-DTRACE*)
13784         cf_all_traces=yes
13785         ;;
13786 esac
13787
13788 echo "$as_me:13788: checking whether to add trace feature to all models" >&5
13789 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13790
13791 # Check whether --with-trace or --without-trace was given.
13792 if test "${with_trace+set}" = set; then
13793   withval="$with_trace"
13794   cf_with_trace=$withval
13795 else
13796   cf_with_trace=$cf_all_traces
13797 fi;
13798 echo "$as_me:13798: result: $cf_with_trace" >&5
13799 echo "${ECHO_T}$cf_with_trace" >&6
13800
13801 if test "x$cf_with_trace" = xyes ; then
13802         LIB_TRACING=all
13803         ADA_TRACE=TRUE
13804
13805 cf_fix_cppflags=no
13806 cf_new_cflags=
13807 cf_new_cppflags=
13808 cf_new_extra_cppflags=
13809
13810 for cf_add_cflags in -DTRACE
13811 do
13812 case $cf_fix_cppflags in
13813 no)
13814         case $cf_add_cflags in #(vi
13815         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13816                 case $cf_add_cflags in
13817                 -D*)
13818                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13819
13820                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13821                                 && test -z "${cf_tst_cflags}" \
13822                                 && cf_fix_cppflags=yes
13823
13824                         if test $cf_fix_cppflags = yes ; then
13825                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13826                                 continue
13827                         elif test "${cf_tst_cflags}" = "\"'" ; then
13828                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13829                                 continue
13830                         fi
13831                         ;;
13832                 esac
13833                 case "$CPPFLAGS" in
13834                 *$cf_add_cflags) #(vi
13835                         ;;
13836                 *) #(vi
13837                         case $cf_add_cflags in #(vi
13838                         -D*)
13839                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13840
13841 CPPFLAGS=`echo "$CPPFLAGS" | \
13842         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13843                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13844
13845                                 ;;
13846                         esac
13847                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13848                         ;;
13849                 esac
13850                 ;;
13851         *)
13852                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13853                 ;;
13854         esac
13855         ;;
13856 yes)
13857         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13858
13859         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13860
13861         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13862                 && test -z "${cf_tst_cflags}" \
13863                 && cf_fix_cppflags=no
13864         ;;
13865 esac
13866 done
13867
13868 if test -n "$cf_new_cflags" ; then
13869
13870         CFLAGS="$CFLAGS $cf_new_cflags"
13871 fi
13872
13873 if test -n "$cf_new_cppflags" ; then
13874
13875         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13876 fi
13877
13878 if test -n "$cf_new_extra_cppflags" ; then
13879
13880         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13881 fi
13882
13883 else
13884         LIB_TRACING=DEBUG
13885         ADA_TRACE=FALSE
13886 fi
13887
13888 echo "$as_me:13888: checking if we want to use GNAT projects" >&5
13889 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
13890
13891 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
13892 if test "${enable_gnat_projects+set}" = set; then
13893   enableval="$enable_gnat_projects"
13894   test "$enableval" != no && enableval=yes
13895   if test "$enableval" != "yes" ; then
13896     enable_gnat_projects=no
13897   else
13898     enable_gnat_projects=yes
13899   fi
13900 else
13901   enableval=yes
13902   enable_gnat_projects=yes
13903
13904 fi;
13905 echo "$as_me:13905: result: $enable_gnat_projects" >&5
13906 echo "${ECHO_T}$enable_gnat_projects" >&6
13907
13908 ###     Checks for libraries.
13909 case $cf_cv_system_name in #(vi
13910 *mingw32*) #(vi
13911         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
13912         LIBS=" -lpsapi $LIBS"
13913         ;;
13914 *)
13915 echo "$as_me:13915: checking for gettimeofday" >&5
13916 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13917 if test "${ac_cv_func_gettimeofday+set}" = set; then
13918   echo $ECHO_N "(cached) $ECHO_C" >&6
13919 else
13920   cat >conftest.$ac_ext <<_ACEOF
13921 #line 13921 "configure"
13922 #include "confdefs.h"
13923 /* System header to define __stub macros and hopefully few prototypes,
13924     which can conflict with char gettimeofday (); below.  */
13925 #include <assert.h>
13926 /* Override any gcc2 internal prototype to avoid an error.  */
13927 #ifdef __cplusplus
13928 extern "C"
13929 #endif
13930 /* We use char because int might match the return type of a gcc2
13931    builtin and then its argument prototype would still apply.  */
13932 char gettimeofday ();
13933 char (*f) ();
13934
13935 int
13936 main ()
13937 {
13938 /* The GNU C library defines this for functions which it implements
13939     to always fail with ENOSYS.  Some functions are actually named
13940     something starting with __ and the normal name is an alias.  */
13941 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13942 choke me
13943 #else
13944 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13945 #endif
13946
13947   ;
13948   return 0;
13949 }
13950 _ACEOF
13951 rm -f conftest.$ac_objext conftest$ac_exeext
13952 if { (eval echo "$as_me:13952: \"$ac_link\"") >&5
13953   (eval $ac_link) 2>&5
13954   ac_status=$?
13955   echo "$as_me:13955: \$? = $ac_status" >&5
13956   (exit $ac_status); } &&
13957          { ac_try='test -s conftest$ac_exeext'
13958   { (eval echo "$as_me:13958: \"$ac_try\"") >&5
13959   (eval $ac_try) 2>&5
13960   ac_status=$?
13961   echo "$as_me:13961: \$? = $ac_status" >&5
13962   (exit $ac_status); }; }; then
13963   ac_cv_func_gettimeofday=yes
13964 else
13965   echo "$as_me: failed program was:" >&5
13966 cat conftest.$ac_ext >&5
13967 ac_cv_func_gettimeofday=no
13968 fi
13969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13970 fi
13971 echo "$as_me:13971: result: $ac_cv_func_gettimeofday" >&5
13972 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13973 if test $ac_cv_func_gettimeofday = yes; then
13974
13975 cat >>confdefs.h <<\EOF
13976 #define HAVE_GETTIMEOFDAY 1
13977 EOF
13978
13979 else
13980
13981 echo "$as_me:13981: checking for gettimeofday in -lbsd" >&5
13982 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13983 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13984   echo $ECHO_N "(cached) $ECHO_C" >&6
13985 else
13986   ac_check_lib_save_LIBS=$LIBS
13987 LIBS="-lbsd  $LIBS"
13988 cat >conftest.$ac_ext <<_ACEOF
13989 #line 13989 "configure"
13990 #include "confdefs.h"
13991
13992 /* Override any gcc2 internal prototype to avoid an error.  */
13993 #ifdef __cplusplus
13994 extern "C"
13995 #endif
13996 /* We use char because int might match the return type of a gcc2
13997    builtin and then its argument prototype would still apply.  */
13998 char gettimeofday ();
13999 int
14000 main ()
14001 {
14002 gettimeofday ();
14003   ;
14004   return 0;
14005 }
14006 _ACEOF
14007 rm -f conftest.$ac_objext conftest$ac_exeext
14008 if { (eval echo "$as_me:14008: \"$ac_link\"") >&5
14009   (eval $ac_link) 2>&5
14010   ac_status=$?
14011   echo "$as_me:14011: \$? = $ac_status" >&5
14012   (exit $ac_status); } &&
14013          { ac_try='test -s conftest$ac_exeext'
14014   { (eval echo "$as_me:14014: \"$ac_try\"") >&5
14015   (eval $ac_try) 2>&5
14016   ac_status=$?
14017   echo "$as_me:14017: \$? = $ac_status" >&5
14018   (exit $ac_status); }; }; then
14019   ac_cv_lib_bsd_gettimeofday=yes
14020 else
14021   echo "$as_me: failed program was:" >&5
14022 cat conftest.$ac_ext >&5
14023 ac_cv_lib_bsd_gettimeofday=no
14024 fi
14025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14026 LIBS=$ac_check_lib_save_LIBS
14027 fi
14028 echo "$as_me:14028: result: $ac_cv_lib_bsd_gettimeofday" >&5
14029 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14030 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14031
14032 cat >>confdefs.h <<\EOF
14033 #define HAVE_GETTIMEOFDAY 1
14034 EOF
14035
14036 cf_add_libs="-lbsd"
14037 # Filter out duplicates - this happens with badly-designed ".pc" files...
14038 for cf_add_1lib in $LIBS
14039 do
14040         for cf_add_2lib in $cf_add_libs
14041         do
14042                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14043                 then
14044                         cf_add_1lib=
14045                         break
14046                 fi
14047         done
14048         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14049 done
14050 LIBS="$cf_add_libs"
14051
14052 fi
14053
14054 fi
14055         ;;
14056 esac
14057
14058 echo "$as_me:14058: checking if -lm needed for math functions" >&5
14059 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14060 if test "${cf_cv_need_libm+set}" = set; then
14061   echo $ECHO_N "(cached) $ECHO_C" >&6
14062 else
14063
14064         cat >conftest.$ac_ext <<_ACEOF
14065 #line 14065 "configure"
14066 #include "confdefs.h"
14067
14068         #include <stdio.h>
14069         #include <math.h>
14070
14071 int
14072 main ()
14073 {
14074 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14075   ;
14076   return 0;
14077 }
14078 _ACEOF
14079 rm -f conftest.$ac_objext conftest$ac_exeext
14080 if { (eval echo "$as_me:14080: \"$ac_link\"") >&5
14081   (eval $ac_link) 2>&5
14082   ac_status=$?
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit $ac_status); } &&
14085          { ac_try='test -s conftest$ac_exeext'
14086   { (eval echo "$as_me:14086: \"$ac_try\"") >&5
14087   (eval $ac_try) 2>&5
14088   ac_status=$?
14089   echo "$as_me:14089: \$? = $ac_status" >&5
14090   (exit $ac_status); }; }; then
14091   cf_cv_need_libm=no
14092 else
14093   echo "$as_me: failed program was:" >&5
14094 cat conftest.$ac_ext >&5
14095 cf_cv_need_libm=yes
14096 fi
14097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14098 fi
14099 echo "$as_me:14099: result: $cf_cv_need_libm" >&5
14100 echo "${ECHO_T}$cf_cv_need_libm" >&6
14101 if test "$cf_cv_need_libm" = yes
14102 then
14103 MATH_LIB=-lm
14104 fi
14105
14106 ###     Checks for header files.
14107 echo "$as_me:14107: checking for ANSI C header files" >&5
14108 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14109 if test "${ac_cv_header_stdc+set}" = set; then
14110   echo $ECHO_N "(cached) $ECHO_C" >&6
14111 else
14112   cat >conftest.$ac_ext <<_ACEOF
14113 #line 14113 "configure"
14114 #include "confdefs.h"
14115 #include <stdlib.h>
14116 #include <stdarg.h>
14117 #include <string.h>
14118 #include <float.h>
14119
14120 _ACEOF
14121 if { (eval echo "$as_me:14121: \"$ac_cpp conftest.$ac_ext\"") >&5
14122   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14123   ac_status=$?
14124   egrep -v '^ *\+' conftest.er1 >conftest.err
14125   rm -f conftest.er1
14126   cat conftest.err >&5
14127   echo "$as_me:14127: \$? = $ac_status" >&5
14128   (exit $ac_status); } >/dev/null; then
14129   if test -s conftest.err; then
14130     ac_cpp_err=$ac_c_preproc_warn_flag
14131   else
14132     ac_cpp_err=
14133   fi
14134 else
14135   ac_cpp_err=yes
14136 fi
14137 if test -z "$ac_cpp_err"; then
14138   ac_cv_header_stdc=yes
14139 else
14140   echo "$as_me: failed program was:" >&5
14141   cat conftest.$ac_ext >&5
14142   ac_cv_header_stdc=no
14143 fi
14144 rm -f conftest.err conftest.$ac_ext
14145
14146 if test $ac_cv_header_stdc = yes; then
14147   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14148   cat >conftest.$ac_ext <<_ACEOF
14149 #line 14149 "configure"
14150 #include "confdefs.h"
14151 #include <string.h>
14152
14153 _ACEOF
14154 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14155   egrep "memchr" >/dev/null 2>&1; then
14156   :
14157 else
14158   ac_cv_header_stdc=no
14159 fi
14160 rm -rf conftest*
14161
14162 fi
14163
14164 if test $ac_cv_header_stdc = yes; then
14165   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14166   cat >conftest.$ac_ext <<_ACEOF
14167 #line 14167 "configure"
14168 #include "confdefs.h"
14169 #include <stdlib.h>
14170
14171 _ACEOF
14172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14173   egrep "free" >/dev/null 2>&1; then
14174   :
14175 else
14176   ac_cv_header_stdc=no
14177 fi
14178 rm -rf conftest*
14179
14180 fi
14181
14182 if test $ac_cv_header_stdc = yes; then
14183   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14184   if test "$cross_compiling" = yes; then
14185   :
14186 else
14187   cat >conftest.$ac_ext <<_ACEOF
14188 #line 14188 "configure"
14189 #include "confdefs.h"
14190 #include <ctype.h>
14191 #if ((' ' & 0x0FF) == 0x020)
14192 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14193 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14194 #else
14195 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14196                      || ('j' <= (c) && (c) <= 'r') \
14197                      || ('s' <= (c) && (c) <= 'z'))
14198 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14199 #endif
14200
14201 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14202 int
14203 main ()
14204 {
14205   int i;
14206   for (i = 0; i < 256; i++)
14207     if (XOR (islower (i), ISLOWER (i))
14208         || toupper (i) != TOUPPER (i))
14209       $ac_main_return(2);
14210   $ac_main_return (0);
14211 }
14212 _ACEOF
14213 rm -f conftest$ac_exeext
14214 if { (eval echo "$as_me:14214: \"$ac_link\"") >&5
14215   (eval $ac_link) 2>&5
14216   ac_status=$?
14217   echo "$as_me:14217: \$? = $ac_status" >&5
14218   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14219   { (eval echo "$as_me:14219: \"$ac_try\"") >&5
14220   (eval $ac_try) 2>&5
14221   ac_status=$?
14222   echo "$as_me:14222: \$? = $ac_status" >&5
14223   (exit $ac_status); }; }; then
14224   :
14225 else
14226   echo "$as_me: program exited with status $ac_status" >&5
14227 echo "$as_me: failed program was:" >&5
14228 cat conftest.$ac_ext >&5
14229 ac_cv_header_stdc=no
14230 fi
14231 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14232 fi
14233 fi
14234 fi
14235 echo "$as_me:14235: result: $ac_cv_header_stdc" >&5
14236 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14237 if test $ac_cv_header_stdc = yes; then
14238
14239 cat >>confdefs.h <<\EOF
14240 #define STDC_HEADERS 1
14241 EOF
14242
14243 fi
14244
14245 ac_header_dirent=no
14246 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14247   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14248 echo "$as_me:14248: checking for $ac_hdr that defines DIR" >&5
14249 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14250 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14251   echo $ECHO_N "(cached) $ECHO_C" >&6
14252 else
14253   cat >conftest.$ac_ext <<_ACEOF
14254 #line 14254 "configure"
14255 #include "confdefs.h"
14256 #include <sys/types.h>
14257 #include <$ac_hdr>
14258
14259 int
14260 main ()
14261 {
14262 if ((DIR *) 0)
14263 return 0;
14264   ;
14265   return 0;
14266 }
14267 _ACEOF
14268 rm -f conftest.$ac_objext
14269 if { (eval echo "$as_me:14269: \"$ac_compile\"") >&5
14270   (eval $ac_compile) 2>&5
14271   ac_status=$?
14272   echo "$as_me:14272: \$? = $ac_status" >&5
14273   (exit $ac_status); } &&
14274          { ac_try='test -s conftest.$ac_objext'
14275   { (eval echo "$as_me:14275: \"$ac_try\"") >&5
14276   (eval $ac_try) 2>&5
14277   ac_status=$?
14278   echo "$as_me:14278: \$? = $ac_status" >&5
14279   (exit $ac_status); }; }; then
14280   eval "$as_ac_Header=yes"
14281 else
14282   echo "$as_me: failed program was:" >&5
14283 cat conftest.$ac_ext >&5
14284 eval "$as_ac_Header=no"
14285 fi
14286 rm -f conftest.$ac_objext conftest.$ac_ext
14287 fi
14288 echo "$as_me:14288: result: `eval echo '${'$as_ac_Header'}'`" >&5
14289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14290 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14291   cat >>confdefs.h <<EOF
14292 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14293 EOF
14294
14295 ac_header_dirent=$ac_hdr; break
14296 fi
14297
14298 done
14299 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14300 if test $ac_header_dirent = dirent.h; then
14301   echo "$as_me:14301: checking for opendir in -ldir" >&5
14302 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14303 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14304   echo $ECHO_N "(cached) $ECHO_C" >&6
14305 else
14306   ac_check_lib_save_LIBS=$LIBS
14307 LIBS="-ldir  $LIBS"
14308 cat >conftest.$ac_ext <<_ACEOF
14309 #line 14309 "configure"
14310 #include "confdefs.h"
14311
14312 /* Override any gcc2 internal prototype to avoid an error.  */
14313 #ifdef __cplusplus
14314 extern "C"
14315 #endif
14316 /* We use char because int might match the return type of a gcc2
14317    builtin and then its argument prototype would still apply.  */
14318 char opendir ();
14319 int
14320 main ()
14321 {
14322 opendir ();
14323   ;
14324   return 0;
14325 }
14326 _ACEOF
14327 rm -f conftest.$ac_objext conftest$ac_exeext
14328 if { (eval echo "$as_me:14328: \"$ac_link\"") >&5
14329   (eval $ac_link) 2>&5
14330   ac_status=$?
14331   echo "$as_me:14331: \$? = $ac_status" >&5
14332   (exit $ac_status); } &&
14333          { ac_try='test -s conftest$ac_exeext'
14334   { (eval echo "$as_me:14334: \"$ac_try\"") >&5
14335   (eval $ac_try) 2>&5
14336   ac_status=$?
14337   echo "$as_me:14337: \$? = $ac_status" >&5
14338   (exit $ac_status); }; }; then
14339   ac_cv_lib_dir_opendir=yes
14340 else
14341   echo "$as_me: failed program was:" >&5
14342 cat conftest.$ac_ext >&5
14343 ac_cv_lib_dir_opendir=no
14344 fi
14345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14346 LIBS=$ac_check_lib_save_LIBS
14347 fi
14348 echo "$as_me:14348: result: $ac_cv_lib_dir_opendir" >&5
14349 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14350 if test $ac_cv_lib_dir_opendir = yes; then
14351   LIBS="$LIBS -ldir"
14352 fi
14353
14354 else
14355   echo "$as_me:14355: checking for opendir in -lx" >&5
14356 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14357 if test "${ac_cv_lib_x_opendir+set}" = set; then
14358   echo $ECHO_N "(cached) $ECHO_C" >&6
14359 else
14360   ac_check_lib_save_LIBS=$LIBS
14361 LIBS="-lx  $LIBS"
14362 cat >conftest.$ac_ext <<_ACEOF
14363 #line 14363 "configure"
14364 #include "confdefs.h"
14365
14366 /* Override any gcc2 internal prototype to avoid an error.  */
14367 #ifdef __cplusplus
14368 extern "C"
14369 #endif
14370 /* We use char because int might match the return type of a gcc2
14371    builtin and then its argument prototype would still apply.  */
14372 char opendir ();
14373 int
14374 main ()
14375 {
14376 opendir ();
14377   ;
14378   return 0;
14379 }
14380 _ACEOF
14381 rm -f conftest.$ac_objext conftest$ac_exeext
14382 if { (eval echo "$as_me:14382: \"$ac_link\"") >&5
14383   (eval $ac_link) 2>&5
14384   ac_status=$?
14385   echo "$as_me:14385: \$? = $ac_status" >&5
14386   (exit $ac_status); } &&
14387          { ac_try='test -s conftest$ac_exeext'
14388   { (eval echo "$as_me:14388: \"$ac_try\"") >&5
14389   (eval $ac_try) 2>&5
14390   ac_status=$?
14391   echo "$as_me:14391: \$? = $ac_status" >&5
14392   (exit $ac_status); }; }; then
14393   ac_cv_lib_x_opendir=yes
14394 else
14395   echo "$as_me: failed program was:" >&5
14396 cat conftest.$ac_ext >&5
14397 ac_cv_lib_x_opendir=no
14398 fi
14399 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14400 LIBS=$ac_check_lib_save_LIBS
14401 fi
14402 echo "$as_me:14402: result: $ac_cv_lib_x_opendir" >&5
14403 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14404 if test $ac_cv_lib_x_opendir = yes; then
14405   LIBS="$LIBS -lx"
14406 fi
14407
14408 fi
14409
14410 echo "$as_me:14410: checking whether time.h and sys/time.h may both be included" >&5
14411 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14412 if test "${ac_cv_header_time+set}" = set; then
14413   echo $ECHO_N "(cached) $ECHO_C" >&6
14414 else
14415   cat >conftest.$ac_ext <<_ACEOF
14416 #line 14416 "configure"
14417 #include "confdefs.h"
14418 #include <sys/types.h>
14419 #include <sys/time.h>
14420 #include <time.h>
14421
14422 int
14423 main ()
14424 {
14425 if ((struct tm *) 0)
14426 return 0;
14427   ;
14428   return 0;
14429 }
14430 _ACEOF
14431 rm -f conftest.$ac_objext
14432 if { (eval echo "$as_me:14432: \"$ac_compile\"") >&5
14433   (eval $ac_compile) 2>&5
14434   ac_status=$?
14435   echo "$as_me:14435: \$? = $ac_status" >&5
14436   (exit $ac_status); } &&
14437          { ac_try='test -s conftest.$ac_objext'
14438   { (eval echo "$as_me:14438: \"$ac_try\"") >&5
14439   (eval $ac_try) 2>&5
14440   ac_status=$?
14441   echo "$as_me:14441: \$? = $ac_status" >&5
14442   (exit $ac_status); }; }; then
14443   ac_cv_header_time=yes
14444 else
14445   echo "$as_me: failed program was:" >&5
14446 cat conftest.$ac_ext >&5
14447 ac_cv_header_time=no
14448 fi
14449 rm -f conftest.$ac_objext conftest.$ac_ext
14450 fi
14451 echo "$as_me:14451: result: $ac_cv_header_time" >&5
14452 echo "${ECHO_T}$ac_cv_header_time" >&6
14453 if test $ac_cv_header_time = yes; then
14454
14455 cat >>confdefs.h <<\EOF
14456 #define TIME_WITH_SYS_TIME 1
14457 EOF
14458
14459 fi
14460
14461 cf_regex_func=no
14462
14463 cf_regex_libs="regex re"
14464 case $host_os in #(vi
14465 mingw*)
14466         cf_regex_libs="gnurx $cf_regex_libs"
14467         ;;
14468 esac
14469
14470 echo "$as_me:14470: checking for regcomp" >&5
14471 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14472 if test "${ac_cv_func_regcomp+set}" = set; then
14473   echo $ECHO_N "(cached) $ECHO_C" >&6
14474 else
14475   cat >conftest.$ac_ext <<_ACEOF
14476 #line 14476 "configure"
14477 #include "confdefs.h"
14478 /* System header to define __stub macros and hopefully few prototypes,
14479     which can conflict with char regcomp (); below.  */
14480 #include <assert.h>
14481 /* Override any gcc2 internal prototype to avoid an error.  */
14482 #ifdef __cplusplus
14483 extern "C"
14484 #endif
14485 /* We use char because int might match the return type of a gcc2
14486    builtin and then its argument prototype would still apply.  */
14487 char regcomp ();
14488 char (*f) ();
14489
14490 int
14491 main ()
14492 {
14493 /* The GNU C library defines this for functions which it implements
14494     to always fail with ENOSYS.  Some functions are actually named
14495     something starting with __ and the normal name is an alias.  */
14496 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14497 choke me
14498 #else
14499 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14500 #endif
14501
14502   ;
14503   return 0;
14504 }
14505 _ACEOF
14506 rm -f conftest.$ac_objext conftest$ac_exeext
14507 if { (eval echo "$as_me:14507: \"$ac_link\"") >&5
14508   (eval $ac_link) 2>&5
14509   ac_status=$?
14510   echo "$as_me:14510: \$? = $ac_status" >&5
14511   (exit $ac_status); } &&
14512          { ac_try='test -s conftest$ac_exeext'
14513   { (eval echo "$as_me:14513: \"$ac_try\"") >&5
14514   (eval $ac_try) 2>&5
14515   ac_status=$?
14516   echo "$as_me:14516: \$? = $ac_status" >&5
14517   (exit $ac_status); }; }; then
14518   ac_cv_func_regcomp=yes
14519 else
14520   echo "$as_me: failed program was:" >&5
14521 cat conftest.$ac_ext >&5
14522 ac_cv_func_regcomp=no
14523 fi
14524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14525 fi
14526 echo "$as_me:14526: result: $ac_cv_func_regcomp" >&5
14527 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14528 if test $ac_cv_func_regcomp = yes; then
14529   cf_regex_func=regcomp
14530 else
14531
14532         for cf_regex_lib in $cf_regex_libs
14533         do
14534                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14535 echo "$as_me:14535: checking for regcomp in -l$cf_regex_lib" >&5
14536 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14537 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14538   echo $ECHO_N "(cached) $ECHO_C" >&6
14539 else
14540   ac_check_lib_save_LIBS=$LIBS
14541 LIBS="-l$cf_regex_lib  $LIBS"
14542 cat >conftest.$ac_ext <<_ACEOF
14543 #line 14543 "configure"
14544 #include "confdefs.h"
14545
14546 /* Override any gcc2 internal prototype to avoid an error.  */
14547 #ifdef __cplusplus
14548 extern "C"
14549 #endif
14550 /* We use char because int might match the return type of a gcc2
14551    builtin and then its argument prototype would still apply.  */
14552 char regcomp ();
14553 int
14554 main ()
14555 {
14556 regcomp ();
14557   ;
14558   return 0;
14559 }
14560 _ACEOF
14561 rm -f conftest.$ac_objext conftest$ac_exeext
14562 if { (eval echo "$as_me:14562: \"$ac_link\"") >&5
14563   (eval $ac_link) 2>&5
14564   ac_status=$?
14565   echo "$as_me:14565: \$? = $ac_status" >&5
14566   (exit $ac_status); } &&
14567          { ac_try='test -s conftest$ac_exeext'
14568   { (eval echo "$as_me:14568: \"$ac_try\"") >&5
14569   (eval $ac_try) 2>&5
14570   ac_status=$?
14571   echo "$as_me:14571: \$? = $ac_status" >&5
14572   (exit $ac_status); }; }; then
14573   eval "$as_ac_Lib=yes"
14574 else
14575   echo "$as_me: failed program was:" >&5
14576 cat conftest.$ac_ext >&5
14577 eval "$as_ac_Lib=no"
14578 fi
14579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14580 LIBS=$ac_check_lib_save_LIBS
14581 fi
14582 echo "$as_me:14582: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14583 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14584 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14585
14586 cf_add_libs="-l$cf_regex_lib"
14587 # Filter out duplicates - this happens with badly-designed ".pc" files...
14588 for cf_add_1lib in $LIBS
14589 do
14590         for cf_add_2lib in $cf_add_libs
14591         do
14592                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14593                 then
14594                         cf_add_1lib=
14595                         break
14596                 fi
14597         done
14598         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14599 done
14600 LIBS="$cf_add_libs"
14601
14602                                 cf_regex_func=regcomp
14603                                 break
14604 fi
14605
14606         done
14607
14608 fi
14609
14610 if test "$cf_regex_func" = no ; then
14611         echo "$as_me:14611: checking for compile" >&5
14612 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14613 if test "${ac_cv_func_compile+set}" = set; then
14614   echo $ECHO_N "(cached) $ECHO_C" >&6
14615 else
14616   cat >conftest.$ac_ext <<_ACEOF
14617 #line 14617 "configure"
14618 #include "confdefs.h"
14619 /* System header to define __stub macros and hopefully few prototypes,
14620     which can conflict with char compile (); below.  */
14621 #include <assert.h>
14622 /* Override any gcc2 internal prototype to avoid an error.  */
14623 #ifdef __cplusplus
14624 extern "C"
14625 #endif
14626 /* We use char because int might match the return type of a gcc2
14627    builtin and then its argument prototype would still apply.  */
14628 char compile ();
14629 char (*f) ();
14630
14631 int
14632 main ()
14633 {
14634 /* The GNU C library defines this for functions which it implements
14635     to always fail with ENOSYS.  Some functions are actually named
14636     something starting with __ and the normal name is an alias.  */
14637 #if defined (__stub_compile) || defined (__stub___compile)
14638 choke me
14639 #else
14640 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14641 #endif
14642
14643   ;
14644   return 0;
14645 }
14646 _ACEOF
14647 rm -f conftest.$ac_objext conftest$ac_exeext
14648 if { (eval echo "$as_me:14648: \"$ac_link\"") >&5
14649   (eval $ac_link) 2>&5
14650   ac_status=$?
14651   echo "$as_me:14651: \$? = $ac_status" >&5
14652   (exit $ac_status); } &&
14653          { ac_try='test -s conftest$ac_exeext'
14654   { (eval echo "$as_me:14654: \"$ac_try\"") >&5
14655   (eval $ac_try) 2>&5
14656   ac_status=$?
14657   echo "$as_me:14657: \$? = $ac_status" >&5
14658   (exit $ac_status); }; }; then
14659   ac_cv_func_compile=yes
14660 else
14661   echo "$as_me: failed program was:" >&5
14662 cat conftest.$ac_ext >&5
14663 ac_cv_func_compile=no
14664 fi
14665 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14666 fi
14667 echo "$as_me:14667: result: $ac_cv_func_compile" >&5
14668 echo "${ECHO_T}$ac_cv_func_compile" >&6
14669 if test $ac_cv_func_compile = yes; then
14670   cf_regex_func=compile
14671 else
14672
14673                 echo "$as_me:14673: checking for compile in -lgen" >&5
14674 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14675 if test "${ac_cv_lib_gen_compile+set}" = set; then
14676   echo $ECHO_N "(cached) $ECHO_C" >&6
14677 else
14678   ac_check_lib_save_LIBS=$LIBS
14679 LIBS="-lgen  $LIBS"
14680 cat >conftest.$ac_ext <<_ACEOF
14681 #line 14681 "configure"
14682 #include "confdefs.h"
14683
14684 /* Override any gcc2 internal prototype to avoid an error.  */
14685 #ifdef __cplusplus
14686 extern "C"
14687 #endif
14688 /* We use char because int might match the return type of a gcc2
14689    builtin and then its argument prototype would still apply.  */
14690 char compile ();
14691 int
14692 main ()
14693 {
14694 compile ();
14695   ;
14696   return 0;
14697 }
14698 _ACEOF
14699 rm -f conftest.$ac_objext conftest$ac_exeext
14700 if { (eval echo "$as_me:14700: \"$ac_link\"") >&5
14701   (eval $ac_link) 2>&5
14702   ac_status=$?
14703   echo "$as_me:14703: \$? = $ac_status" >&5
14704   (exit $ac_status); } &&
14705          { ac_try='test -s conftest$ac_exeext'
14706   { (eval echo "$as_me:14706: \"$ac_try\"") >&5
14707   (eval $ac_try) 2>&5
14708   ac_status=$?
14709   echo "$as_me:14709: \$? = $ac_status" >&5
14710   (exit $ac_status); }; }; then
14711   ac_cv_lib_gen_compile=yes
14712 else
14713   echo "$as_me: failed program was:" >&5
14714 cat conftest.$ac_ext >&5
14715 ac_cv_lib_gen_compile=no
14716 fi
14717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14718 LIBS=$ac_check_lib_save_LIBS
14719 fi
14720 echo "$as_me:14720: result: $ac_cv_lib_gen_compile" >&5
14721 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14722 if test $ac_cv_lib_gen_compile = yes; then
14723
14724 cf_add_libs="-lgen"
14725 # Filter out duplicates - this happens with badly-designed ".pc" files...
14726 for cf_add_1lib in $LIBS
14727 do
14728         for cf_add_2lib in $cf_add_libs
14729         do
14730                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14731                 then
14732                         cf_add_1lib=
14733                         break
14734                 fi
14735         done
14736         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14737 done
14738 LIBS="$cf_add_libs"
14739
14740                                 cf_regex_func=compile
14741 fi
14742
14743 fi
14744
14745 fi
14746
14747 if test "$cf_regex_func" = no ; then
14748         { echo "$as_me:14748: WARNING: cannot find regular expression library" >&5
14749 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14750 fi
14751
14752 echo "$as_me:14752: checking for regular-expression headers" >&5
14753 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14754 if test "${cf_cv_regex_hdrs+set}" = set; then
14755   echo $ECHO_N "(cached) $ECHO_C" >&6
14756 else
14757
14758 cf_cv_regex_hdrs=no
14759 case $cf_regex_func in #(vi
14760 compile) #(vi
14761         for cf_regex_hdr in regexp.h regexpr.h
14762         do
14763                 cat >conftest.$ac_ext <<_ACEOF
14764 #line 14764 "configure"
14765 #include "confdefs.h"
14766 #include <$cf_regex_hdr>
14767 int
14768 main ()
14769 {
14770
14771                         char *p = compile("", "", "", 0);
14772                         int x = step("", "");
14773
14774   ;
14775   return 0;
14776 }
14777 _ACEOF
14778 rm -f conftest.$ac_objext conftest$ac_exeext
14779 if { (eval echo "$as_me:14779: \"$ac_link\"") >&5
14780   (eval $ac_link) 2>&5
14781   ac_status=$?
14782   echo "$as_me:14782: \$? = $ac_status" >&5
14783   (exit $ac_status); } &&
14784          { ac_try='test -s conftest$ac_exeext'
14785   { (eval echo "$as_me:14785: \"$ac_try\"") >&5
14786   (eval $ac_try) 2>&5
14787   ac_status=$?
14788   echo "$as_me:14788: \$? = $ac_status" >&5
14789   (exit $ac_status); }; }; then
14790
14791                         cf_cv_regex_hdrs=$cf_regex_hdr
14792                         break
14793
14794 else
14795   echo "$as_me: failed program was:" >&5
14796 cat conftest.$ac_ext >&5
14797 fi
14798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14799         done
14800         ;;
14801 *)
14802         for cf_regex_hdr in regex.h
14803         do
14804                 cat >conftest.$ac_ext <<_ACEOF
14805 #line 14805 "configure"
14806 #include "confdefs.h"
14807 #include <sys/types.h>
14808 #include <$cf_regex_hdr>
14809 int
14810 main ()
14811 {
14812
14813                         regex_t *p;
14814                         int x = regcomp(p, "", 0);
14815                         int y = regexec(p, "", 0, 0, 0);
14816                         regfree(p);
14817
14818   ;
14819   return 0;
14820 }
14821 _ACEOF
14822 rm -f conftest.$ac_objext conftest$ac_exeext
14823 if { (eval echo "$as_me:14823: \"$ac_link\"") >&5
14824   (eval $ac_link) 2>&5
14825   ac_status=$?
14826   echo "$as_me:14826: \$? = $ac_status" >&5
14827   (exit $ac_status); } &&
14828          { ac_try='test -s conftest$ac_exeext'
14829   { (eval echo "$as_me:14829: \"$ac_try\"") >&5
14830   (eval $ac_try) 2>&5
14831   ac_status=$?
14832   echo "$as_me:14832: \$? = $ac_status" >&5
14833   (exit $ac_status); }; }; then
14834
14835                         cf_cv_regex_hdrs=$cf_regex_hdr
14836                         break
14837
14838 else
14839   echo "$as_me: failed program was:" >&5
14840 cat conftest.$ac_ext >&5
14841 fi
14842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14843         done
14844         ;;
14845 esac
14846
14847 fi
14848 echo "$as_me:14848: result: $cf_cv_regex_hdrs" >&5
14849 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14850
14851 case $cf_cv_regex_hdrs in #(vi
14852     no)        { echo "$as_me:14852: WARNING: no regular expression header found" >&5
14853 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14854     regex.h)
14855 cat >>confdefs.h <<\EOF
14856 #define HAVE_REGEX_H_FUNCS 1
14857 EOF
14858  ;; #(vi
14859     regexp.h)
14860 cat >>confdefs.h <<\EOF
14861 #define HAVE_REGEXP_H_FUNCS 1
14862 EOF
14863  ;; #(vi
14864     regexpr.h)
14865 cat >>confdefs.h <<\EOF
14866 #define HAVE_REGEXPR_H_FUNCS 1
14867 EOF
14868  ;;
14869 esac
14870
14871 for ac_header in \
14872 fcntl.h \
14873 getopt.h \
14874 limits.h \
14875 locale.h \
14876 math.h \
14877 poll.h \
14878 sys/bsdtypes.h \
14879 sys/ioctl.h \
14880 sys/param.h \
14881 sys/poll.h \
14882 sys/select.h \
14883 sys/time.h \
14884 sys/times.h \
14885 ttyent.h \
14886 unistd.h \
14887 wctype.h \
14888
14889 do
14890 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14891 echo "$as_me:14891: checking for $ac_header" >&5
14892 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14893 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14894   echo $ECHO_N "(cached) $ECHO_C" >&6
14895 else
14896   cat >conftest.$ac_ext <<_ACEOF
14897 #line 14897 "configure"
14898 #include "confdefs.h"
14899 #include <$ac_header>
14900 _ACEOF
14901 if { (eval echo "$as_me:14901: \"$ac_cpp conftest.$ac_ext\"") >&5
14902   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14903   ac_status=$?
14904   egrep -v '^ *\+' conftest.er1 >conftest.err
14905   rm -f conftest.er1
14906   cat conftest.err >&5
14907   echo "$as_me:14907: \$? = $ac_status" >&5
14908   (exit $ac_status); } >/dev/null; then
14909   if test -s conftest.err; then
14910     ac_cpp_err=$ac_c_preproc_warn_flag
14911   else
14912     ac_cpp_err=
14913   fi
14914 else
14915   ac_cpp_err=yes
14916 fi
14917 if test -z "$ac_cpp_err"; then
14918   eval "$as_ac_Header=yes"
14919 else
14920   echo "$as_me: failed program was:" >&5
14921   cat conftest.$ac_ext >&5
14922   eval "$as_ac_Header=no"
14923 fi
14924 rm -f conftest.err conftest.$ac_ext
14925 fi
14926 echo "$as_me:14926: result: `eval echo '${'$as_ac_Header'}'`" >&5
14927 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14928 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14929   cat >>confdefs.h <<EOF
14930 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14931 EOF
14932
14933 fi
14934 done
14935
14936 for ac_header in unistd.h getopt.h
14937 do
14938 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14939 echo "$as_me:14939: checking for $ac_header" >&5
14940 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14941 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14942   echo $ECHO_N "(cached) $ECHO_C" >&6
14943 else
14944   cat >conftest.$ac_ext <<_ACEOF
14945 #line 14945 "configure"
14946 #include "confdefs.h"
14947 #include <$ac_header>
14948 _ACEOF
14949 if { (eval echo "$as_me:14949: \"$ac_cpp conftest.$ac_ext\"") >&5
14950   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14951   ac_status=$?
14952   egrep -v '^ *\+' conftest.er1 >conftest.err
14953   rm -f conftest.er1
14954   cat conftest.err >&5
14955   echo "$as_me:14955: \$? = $ac_status" >&5
14956   (exit $ac_status); } >/dev/null; then
14957   if test -s conftest.err; then
14958     ac_cpp_err=$ac_c_preproc_warn_flag
14959   else
14960     ac_cpp_err=
14961   fi
14962 else
14963   ac_cpp_err=yes
14964 fi
14965 if test -z "$ac_cpp_err"; then
14966   eval "$as_ac_Header=yes"
14967 else
14968   echo "$as_me: failed program was:" >&5
14969   cat conftest.$ac_ext >&5
14970   eval "$as_ac_Header=no"
14971 fi
14972 rm -f conftest.err conftest.$ac_ext
14973 fi
14974 echo "$as_me:14974: result: `eval echo '${'$as_ac_Header'}'`" >&5
14975 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14976 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14977   cat >>confdefs.h <<EOF
14978 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14979 EOF
14980
14981 fi
14982 done
14983
14984 echo "$as_me:14984: checking for header declaring getopt variables" >&5
14985 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14986 if test "${cf_cv_getopt_header+set}" = set; then
14987   echo $ECHO_N "(cached) $ECHO_C" >&6
14988 else
14989
14990 cf_cv_getopt_header=none
14991 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14992 do
14993 cat >conftest.$ac_ext <<_ACEOF
14994 #line 14994 "configure"
14995 #include "confdefs.h"
14996
14997 #include <$cf_header>
14998 int
14999 main ()
15000 {
15001 int x = optind; char *y = optarg
15002   ;
15003   return 0;
15004 }
15005 _ACEOF
15006 rm -f conftest.$ac_objext
15007 if { (eval echo "$as_me:15007: \"$ac_compile\"") >&5
15008   (eval $ac_compile) 2>&5
15009   ac_status=$?
15010   echo "$as_me:15010: \$? = $ac_status" >&5
15011   (exit $ac_status); } &&
15012          { ac_try='test -s conftest.$ac_objext'
15013   { (eval echo "$as_me:15013: \"$ac_try\"") >&5
15014   (eval $ac_try) 2>&5
15015   ac_status=$?
15016   echo "$as_me:15016: \$? = $ac_status" >&5
15017   (exit $ac_status); }; }; then
15018   cf_cv_getopt_header=$cf_header
15019  break
15020 else
15021   echo "$as_me: failed program was:" >&5
15022 cat conftest.$ac_ext >&5
15023 fi
15024 rm -f conftest.$ac_objext conftest.$ac_ext
15025 done
15026
15027 fi
15028 echo "$as_me:15028: result: $cf_cv_getopt_header" >&5
15029 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15030 if test $cf_cv_getopt_header != none ; then
15031
15032 cat >>confdefs.h <<\EOF
15033 #define HAVE_GETOPT_HEADER 1
15034 EOF
15035
15036 fi
15037 if test $cf_cv_getopt_header = getopt.h ; then
15038
15039 cat >>confdefs.h <<\EOF
15040 #define NEED_GETOPT_H 1
15041 EOF
15042
15043 fi
15044
15045 # check for ISC (this may also define _POSIX_SOURCE)
15046 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15047 if test "x$ISC" = xyes ; then
15048
15049 echo "$as_me:15049: checking for main in -lcposix" >&5
15050 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15051 if test "${ac_cv_lib_cposix_main+set}" = set; then
15052   echo $ECHO_N "(cached) $ECHO_C" >&6
15053 else
15054   ac_check_lib_save_LIBS=$LIBS
15055 LIBS="-lcposix  $LIBS"
15056 cat >conftest.$ac_ext <<_ACEOF
15057 #line 15057 "configure"
15058 #include "confdefs.h"
15059
15060 int
15061 main ()
15062 {
15063 main ();
15064   ;
15065   return 0;
15066 }
15067 _ACEOF
15068 rm -f conftest.$ac_objext conftest$ac_exeext
15069 if { (eval echo "$as_me:15069: \"$ac_link\"") >&5
15070   (eval $ac_link) 2>&5
15071   ac_status=$?
15072   echo "$as_me:15072: \$? = $ac_status" >&5
15073   (exit $ac_status); } &&
15074          { ac_try='test -s conftest$ac_exeext'
15075   { (eval echo "$as_me:15075: \"$ac_try\"") >&5
15076   (eval $ac_try) 2>&5
15077   ac_status=$?
15078   echo "$as_me:15078: \$? = $ac_status" >&5
15079   (exit $ac_status); }; }; then
15080   ac_cv_lib_cposix_main=yes
15081 else
15082   echo "$as_me: failed program was:" >&5
15083 cat conftest.$ac_ext >&5
15084 ac_cv_lib_cposix_main=no
15085 fi
15086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15087 LIBS=$ac_check_lib_save_LIBS
15088 fi
15089 echo "$as_me:15089: result: $ac_cv_lib_cposix_main" >&5
15090 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15091 if test $ac_cv_lib_cposix_main = yes; then
15092   cat >>confdefs.h <<EOF
15093 #define HAVE_LIBCPOSIX 1
15094 EOF
15095
15096   LIBS="-lcposix $LIBS"
15097
15098 fi
15099
15100         echo "$as_me:15100: checking for bzero in -linet" >&5
15101 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15102 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15103   echo $ECHO_N "(cached) $ECHO_C" >&6
15104 else
15105   ac_check_lib_save_LIBS=$LIBS
15106 LIBS="-linet  $LIBS"
15107 cat >conftest.$ac_ext <<_ACEOF
15108 #line 15108 "configure"
15109 #include "confdefs.h"
15110
15111 /* Override any gcc2 internal prototype to avoid an error.  */
15112 #ifdef __cplusplus
15113 extern "C"
15114 #endif
15115 /* We use char because int might match the return type of a gcc2
15116    builtin and then its argument prototype would still apply.  */
15117 char bzero ();
15118 int
15119 main ()
15120 {
15121 bzero ();
15122   ;
15123   return 0;
15124 }
15125 _ACEOF
15126 rm -f conftest.$ac_objext conftest$ac_exeext
15127 if { (eval echo "$as_me:15127: \"$ac_link\"") >&5
15128   (eval $ac_link) 2>&5
15129   ac_status=$?
15130   echo "$as_me:15130: \$? = $ac_status" >&5
15131   (exit $ac_status); } &&
15132          { ac_try='test -s conftest$ac_exeext'
15133   { (eval echo "$as_me:15133: \"$ac_try\"") >&5
15134   (eval $ac_try) 2>&5
15135   ac_status=$?
15136   echo "$as_me:15136: \$? = $ac_status" >&5
15137   (exit $ac_status); }; }; then
15138   ac_cv_lib_inet_bzero=yes
15139 else
15140   echo "$as_me: failed program was:" >&5
15141 cat conftest.$ac_ext >&5
15142 ac_cv_lib_inet_bzero=no
15143 fi
15144 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15145 LIBS=$ac_check_lib_save_LIBS
15146 fi
15147 echo "$as_me:15147: result: $ac_cv_lib_inet_bzero" >&5
15148 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15149 if test $ac_cv_lib_inet_bzero = yes; then
15150
15151 cf_add_libs="-linet"
15152 # Filter out duplicates - this happens with badly-designed ".pc" files...
15153 for cf_add_1lib in $LIBS
15154 do
15155         for cf_add_2lib in $cf_add_libs
15156         do
15157                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15158                 then
15159                         cf_add_1lib=
15160                         break
15161                 fi
15162         done
15163         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15164 done
15165 LIBS="$cf_add_libs"
15166
15167 fi
15168 fi
15169
15170 echo "$as_me:15170: checking if sys/time.h works with sys/select.h" >&5
15171 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15172 if test "${cf_cv_sys_time_select+set}" = set; then
15173   echo $ECHO_N "(cached) $ECHO_C" >&6
15174 else
15175
15176 cat >conftest.$ac_ext <<_ACEOF
15177 #line 15177 "configure"
15178 #include "confdefs.h"
15179
15180 #include <sys/types.h>
15181 #ifdef HAVE_SYS_TIME_H
15182 #include <sys/time.h>
15183 #endif
15184 #ifdef HAVE_SYS_SELECT_H
15185 #include <sys/select.h>
15186 #endif
15187
15188 int
15189 main ()
15190 {
15191
15192   ;
15193   return 0;
15194 }
15195 _ACEOF
15196 rm -f conftest.$ac_objext
15197 if { (eval echo "$as_me:15197: \"$ac_compile\"") >&5
15198   (eval $ac_compile) 2>&5
15199   ac_status=$?
15200   echo "$as_me:15200: \$? = $ac_status" >&5
15201   (exit $ac_status); } &&
15202          { ac_try='test -s conftest.$ac_objext'
15203   { (eval echo "$as_me:15203: \"$ac_try\"") >&5
15204   (eval $ac_try) 2>&5
15205   ac_status=$?
15206   echo "$as_me:15206: \$? = $ac_status" >&5
15207   (exit $ac_status); }; }; then
15208   cf_cv_sys_time_select=yes
15209 else
15210   echo "$as_me: failed program was:" >&5
15211 cat conftest.$ac_ext >&5
15212 cf_cv_sys_time_select=no
15213 fi
15214 rm -f conftest.$ac_objext conftest.$ac_ext
15215
15216 fi
15217
15218 echo "$as_me:15218: result: $cf_cv_sys_time_select" >&5
15219 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15220 test "$cf_cv_sys_time_select" = yes &&
15221 cat >>confdefs.h <<\EOF
15222 #define HAVE_SYS_TIME_SELECT 1
15223 EOF
15224
15225 ###     checks for compiler characteristics
15226 ac_ext=c
15227 ac_cpp='$CPP $CPPFLAGS'
15228 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15229 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15230 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15231 ac_main_return=return
15232
15233 echo "$as_me:15233: checking for an ANSI C-conforming const" >&5
15234 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15235 if test "${ac_cv_c_const+set}" = set; then
15236   echo $ECHO_N "(cached) $ECHO_C" >&6
15237 else
15238   cat >conftest.$ac_ext <<_ACEOF
15239 #line 15239 "configure"
15240 #include "confdefs.h"
15241
15242 int
15243 main ()
15244 {
15245 /* FIXME: Include the comments suggested by Paul. */
15246 #ifndef __cplusplus
15247   /* Ultrix mips cc rejects this.  */
15248   typedef int charset[2];
15249   const charset x;
15250   /* SunOS 4.1.1 cc rejects this.  */
15251   char const *const *ccp;
15252   char **p;
15253   /* NEC SVR4.0.2 mips cc rejects this.  */
15254   struct point {int x, y;};
15255   static struct point const zero = {0,0};
15256   /* AIX XL C 1.02.0.0 rejects this.
15257      It does not let you subtract one const X* pointer from another in
15258      an arm of an if-expression whose if-part is not a constant
15259      expression */
15260   const char *g = "string";
15261   ccp = &g + (g ? g-g : 0);
15262   /* HPUX 7.0 cc rejects these. */
15263   ++ccp;
15264   p = (char**) ccp;
15265   ccp = (char const *const *) p;
15266   { /* SCO 3.2v4 cc rejects this.  */
15267     char *t;
15268     char const *s = 0 ? (char *) 0 : (char const *) 0;
15269
15270     *t++ = 0;
15271   }
15272   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15273     int x[] = {25, 17};
15274     const int *foo = &x[0];
15275     ++foo;
15276   }
15277   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15278     typedef const int *iptr;
15279     iptr p = 0;
15280     ++p;
15281   }
15282   { /* AIX XL C 1.02.0.0 rejects this saying
15283        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15284     struct s { int j; const int *ap[3]; };
15285     struct s *b; b->j = 5;
15286   }
15287   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15288     const int foo = 10;
15289   }
15290 #endif
15291
15292   ;
15293   return 0;
15294 }
15295 _ACEOF
15296 rm -f conftest.$ac_objext
15297 if { (eval echo "$as_me:15297: \"$ac_compile\"") >&5
15298   (eval $ac_compile) 2>&5
15299   ac_status=$?
15300   echo "$as_me:15300: \$? = $ac_status" >&5
15301   (exit $ac_status); } &&
15302          { ac_try='test -s conftest.$ac_objext'
15303   { (eval echo "$as_me:15303: \"$ac_try\"") >&5
15304   (eval $ac_try) 2>&5
15305   ac_status=$?
15306   echo "$as_me:15306: \$? = $ac_status" >&5
15307   (exit $ac_status); }; }; then
15308   ac_cv_c_const=yes
15309 else
15310   echo "$as_me: failed program was:" >&5
15311 cat conftest.$ac_ext >&5
15312 ac_cv_c_const=no
15313 fi
15314 rm -f conftest.$ac_objext conftest.$ac_ext
15315 fi
15316 echo "$as_me:15316: result: $ac_cv_c_const" >&5
15317 echo "${ECHO_T}$ac_cv_c_const" >&6
15318 if test $ac_cv_c_const = no; then
15319
15320 cat >>confdefs.h <<\EOF
15321 #define const
15322 EOF
15323
15324 fi
15325
15326 echo "$as_me:15326: checking for inline" >&5
15327 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15328 if test "${ac_cv_c_inline+set}" = set; then
15329   echo $ECHO_N "(cached) $ECHO_C" >&6
15330 else
15331   ac_cv_c_inline=no
15332 for ac_kw in inline __inline__ __inline; do
15333   cat >conftest.$ac_ext <<_ACEOF
15334 #line 15334 "configure"
15335 #include "confdefs.h"
15336 #ifndef __cplusplus
15337 static $ac_kw int static_foo () {return 0; }
15338 $ac_kw int foo () {return 0; }
15339 #endif
15340
15341 _ACEOF
15342 rm -f conftest.$ac_objext
15343 if { (eval echo "$as_me:15343: \"$ac_compile\"") >&5
15344   (eval $ac_compile) 2>&5
15345   ac_status=$?
15346   echo "$as_me:15346: \$? = $ac_status" >&5
15347   (exit $ac_status); } &&
15348          { ac_try='test -s conftest.$ac_objext'
15349   { (eval echo "$as_me:15349: \"$ac_try\"") >&5
15350   (eval $ac_try) 2>&5
15351   ac_status=$?
15352   echo "$as_me:15352: \$? = $ac_status" >&5
15353   (exit $ac_status); }; }; then
15354   ac_cv_c_inline=$ac_kw; break
15355 else
15356   echo "$as_me: failed program was:" >&5
15357 cat conftest.$ac_ext >&5
15358 fi
15359 rm -f conftest.$ac_objext conftest.$ac_ext
15360 done
15361
15362 fi
15363 echo "$as_me:15363: result: $ac_cv_c_inline" >&5
15364 echo "${ECHO_T}$ac_cv_c_inline" >&6
15365 case $ac_cv_c_inline in
15366   inline | yes) ;;
15367   no)
15368 cat >>confdefs.h <<\EOF
15369 #define inline
15370 EOF
15371  ;;
15372   *)  cat >>confdefs.h <<EOF
15373 #define inline $ac_cv_c_inline
15374 EOF
15375  ;;
15376 esac
15377
15378 NCURSES_INLINE=
15379 if test "$ac_cv_c_inline" != no ; then
15380   NCURSES_INLINE=inline
15381   if test "$INTEL_COMPILER" = yes
15382   then
15383     :
15384   elif test "$CLANG_COMPILER" = yes
15385   then
15386     :
15387   elif test "$GCC" = yes
15388   then
15389     echo "$as_me:15389: checking if $CC supports options to tune inlining" >&5
15390 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15391 if test "${cf_cv_gcc_inline+set}" = set; then
15392   echo $ECHO_N "(cached) $ECHO_C" >&6
15393 else
15394
15395       cf_save_CFLAGS=$CFLAGS
15396       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15397       cat >conftest.$ac_ext <<_ACEOF
15398 #line 15398 "configure"
15399 #include "confdefs.h"
15400 inline int foo(void) { return 1; }
15401 int
15402 main ()
15403 {
15404 ${cf_cv_main_return:-return} foo()
15405   ;
15406   return 0;
15407 }
15408 _ACEOF
15409 rm -f conftest.$ac_objext
15410 if { (eval echo "$as_me:15410: \"$ac_compile\"") >&5
15411   (eval $ac_compile) 2>&5
15412   ac_status=$?
15413   echo "$as_me:15413: \$? = $ac_status" >&5
15414   (exit $ac_status); } &&
15415          { ac_try='test -s conftest.$ac_objext'
15416   { (eval echo "$as_me:15416: \"$ac_try\"") >&5
15417   (eval $ac_try) 2>&5
15418   ac_status=$?
15419   echo "$as_me:15419: \$? = $ac_status" >&5
15420   (exit $ac_status); }; }; then
15421   cf_cv_gcc_inline=yes
15422 else
15423   echo "$as_me: failed program was:" >&5
15424 cat conftest.$ac_ext >&5
15425 cf_cv_gcc_inline=no
15426 fi
15427 rm -f conftest.$ac_objext conftest.$ac_ext
15428       CFLAGS=$cf_save_CFLAGS
15429
15430 fi
15431 echo "$as_me:15431: result: $cf_cv_gcc_inline" >&5
15432 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15433     if test "$cf_cv_gcc_inline" = yes ; then
15434
15435 cf_fix_cppflags=no
15436 cf_new_cflags=
15437 cf_new_cppflags=
15438 cf_new_extra_cppflags=
15439
15440 for cf_add_cflags in --param max-inline-insns-single=1200
15441 do
15442 case $cf_fix_cppflags in
15443 no)
15444         case $cf_add_cflags in #(vi
15445         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15446                 case $cf_add_cflags in
15447                 -D*)
15448                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15449
15450                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15451                                 && test -z "${cf_tst_cflags}" \
15452                                 && cf_fix_cppflags=yes
15453
15454                         if test $cf_fix_cppflags = yes ; then
15455                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15456                                 continue
15457                         elif test "${cf_tst_cflags}" = "\"'" ; then
15458                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15459                                 continue
15460                         fi
15461                         ;;
15462                 esac
15463                 case "$CPPFLAGS" in
15464                 *$cf_add_cflags) #(vi
15465                         ;;
15466                 *) #(vi
15467                         case $cf_add_cflags in #(vi
15468                         -D*)
15469                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15470
15471 CPPFLAGS=`echo "$CPPFLAGS" | \
15472         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15473                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15474
15475                                 ;;
15476                         esac
15477                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15478                         ;;
15479                 esac
15480                 ;;
15481         *)
15482                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15483                 ;;
15484         esac
15485         ;;
15486 yes)
15487         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15488
15489         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15490
15491         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15492                 && test -z "${cf_tst_cflags}" \
15493                 && cf_fix_cppflags=no
15494         ;;
15495 esac
15496 done
15497
15498 if test -n "$cf_new_cflags" ; then
15499
15500         CFLAGS="$CFLAGS $cf_new_cflags"
15501 fi
15502
15503 if test -n "$cf_new_cppflags" ; then
15504
15505         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15506 fi
15507
15508 if test -n "$cf_new_extra_cppflags" ; then
15509
15510         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15511 fi
15512
15513     fi
15514   fi
15515 fi
15516
15517 echo "$as_me:15517: checking for signal global datatype" >&5
15518 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15519 if test "${cf_cv_sig_atomic_t+set}" = set; then
15520   echo $ECHO_N "(cached) $ECHO_C" >&6
15521 else
15522
15523         for cf_type in \
15524                 "volatile sig_atomic_t" \
15525                 "sig_atomic_t" \
15526                 "int"
15527         do
15528         cat >conftest.$ac_ext <<_ACEOF
15529 #line 15529 "configure"
15530 #include "confdefs.h"
15531
15532 #include <sys/types.h>
15533 #include <signal.h>
15534 #include <stdio.h>
15535
15536 extern $cf_type x;
15537 $cf_type x;
15538 static void handler(int sig)
15539 {
15540         x = 5;
15541 }
15542 int
15543 main ()
15544 {
15545 signal(SIGINT, handler);
15546                  x = 1
15547   ;
15548   return 0;
15549 }
15550 _ACEOF
15551 rm -f conftest.$ac_objext
15552 if { (eval echo "$as_me:15552: \"$ac_compile\"") >&5
15553   (eval $ac_compile) 2>&5
15554   ac_status=$?
15555   echo "$as_me:15555: \$? = $ac_status" >&5
15556   (exit $ac_status); } &&
15557          { ac_try='test -s conftest.$ac_objext'
15558   { (eval echo "$as_me:15558: \"$ac_try\"") >&5
15559   (eval $ac_try) 2>&5
15560   ac_status=$?
15561   echo "$as_me:15561: \$? = $ac_status" >&5
15562   (exit $ac_status); }; }; then
15563   cf_cv_sig_atomic_t=$cf_type
15564 else
15565   echo "$as_me: failed program was:" >&5
15566 cat conftest.$ac_ext >&5
15567 cf_cv_sig_atomic_t=no
15568 fi
15569 rm -f conftest.$ac_objext conftest.$ac_ext
15570                 test "$cf_cv_sig_atomic_t" != no && break
15571         done
15572
15573 fi
15574
15575 echo "$as_me:15575: result: $cf_cv_sig_atomic_t" >&5
15576 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15577 test "$cf_cv_sig_atomic_t" != no &&
15578 cat >>confdefs.h <<EOF
15579 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15580 EOF
15581
15582 if test $NCURSES_CHTYPE = auto ; then
15583
15584 echo "$as_me:15584: checking for type of chtype" >&5
15585 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15586 if test "${cf_cv_typeof_chtype+set}" = set; then
15587   echo $ECHO_N "(cached) $ECHO_C" >&6
15588 else
15589
15590                 if test "$cross_compiling" = yes; then
15591   cf_cv_typeof_chtype=long
15592 else
15593   cat >conftest.$ac_ext <<_ACEOF
15594 #line 15594 "configure"
15595 #include "confdefs.h"
15596
15597 #define WANT_BITS 31
15598 #include <stdio.h>
15599 int main()
15600 {
15601         FILE *fp = fopen("cf_test.out", "w");
15602         if (fp != 0) {
15603                 char *result = "long";
15604                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15605                         int n;
15606                         unsigned int x, y;
15607                         for (n = 0; n < WANT_BITS; n++) {
15608                                 x = (1 << n);
15609                                 y = (x >> n);
15610                                 if (y != 1 || x == 0) {
15611                                         x = 0;
15612                                         break;
15613                                 }
15614                         }
15615                         /*
15616                          * If x is nonzero, an int is big enough for the bits
15617                          * that we want.
15618                          */
15619                         result = (x != 0) ? "int" : "long";
15620                 }
15621                 fputs(result, fp);
15622                 fclose(fp);
15623         }
15624         ${cf_cv_main_return:-return}(0);
15625 }
15626
15627 _ACEOF
15628 rm -f conftest$ac_exeext
15629 if { (eval echo "$as_me:15629: \"$ac_link\"") >&5
15630   (eval $ac_link) 2>&5
15631   ac_status=$?
15632   echo "$as_me:15632: \$? = $ac_status" >&5
15633   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15634   { (eval echo "$as_me:15634: \"$ac_try\"") >&5
15635   (eval $ac_try) 2>&5
15636   ac_status=$?
15637   echo "$as_me:15637: \$? = $ac_status" >&5
15638   (exit $ac_status); }; }; then
15639   cf_cv_typeof_chtype=`cat cf_test.out`
15640 else
15641   echo "$as_me: program exited with status $ac_status" >&5
15642 echo "$as_me: failed program was:" >&5
15643 cat conftest.$ac_ext >&5
15644 cf_cv_typeof_chtype=long
15645 fi
15646 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15647 fi
15648                 rm -f cf_test.out
15649
15650 fi
15651
15652 echo "$as_me:15652: result: $cf_cv_typeof_chtype" >&5
15653 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15654
15655 cat >>confdefs.h <<EOF
15656 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15657 EOF
15658
15659 else
15660         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15661 fi
15662 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15663
15664 echo "$as_me:15664: checking if unsigned literals are legal" >&5
15665 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15666 if test "${cf_cv_unsigned_literals+set}" = set; then
15667   echo $ECHO_N "(cached) $ECHO_C" >&6
15668 else
15669
15670         cat >conftest.$ac_ext <<_ACEOF
15671 #line 15671 "configure"
15672 #include "confdefs.h"
15673
15674 int
15675 main ()
15676 {
15677 long x = 1L + 1UL + 1U + 1
15678   ;
15679   return 0;
15680 }
15681 _ACEOF
15682 rm -f conftest.$ac_objext
15683 if { (eval echo "$as_me:15683: \"$ac_compile\"") >&5
15684   (eval $ac_compile) 2>&5
15685   ac_status=$?
15686   echo "$as_me:15686: \$? = $ac_status" >&5
15687   (exit $ac_status); } &&
15688          { ac_try='test -s conftest.$ac_objext'
15689   { (eval echo "$as_me:15689: \"$ac_try\"") >&5
15690   (eval $ac_try) 2>&5
15691   ac_status=$?
15692   echo "$as_me:15692: \$? = $ac_status" >&5
15693   (exit $ac_status); }; }; then
15694   cf_cv_unsigned_literals=yes
15695 else
15696   echo "$as_me: failed program was:" >&5
15697 cat conftest.$ac_ext >&5
15698 cf_cv_unsigned_literals=no
15699 fi
15700 rm -f conftest.$ac_objext conftest.$ac_ext
15701
15702 fi
15703
15704 echo "$as_me:15704: result: $cf_cv_unsigned_literals" >&5
15705 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15706
15707 cf_cv_1UL="1"
15708 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15709 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15710
15711 if test $NCURSES_MMASK_T = auto ; then
15712         cf_cv_typeof_mmask_t=long
15713 else
15714         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15715 fi
15716 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15717
15718 ###     Checks for external-data
15719
15720 echo "$as_me:15720: checking if external errno is declared" >&5
15721 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15722 if test "${cf_cv_dcl_errno+set}" = set; then
15723   echo $ECHO_N "(cached) $ECHO_C" >&6
15724 else
15725
15726     cat >conftest.$ac_ext <<_ACEOF
15727 #line 15727 "configure"
15728 #include "confdefs.h"
15729
15730 #ifdef HAVE_STDLIB_H
15731 #include <stdlib.h>
15732 #endif
15733 #include <stdio.h>
15734 #include <sys/types.h>
15735 #include <errno.h>
15736 int
15737 main ()
15738 {
15739 int x = (int) errno
15740   ;
15741   return 0;
15742 }
15743 _ACEOF
15744 rm -f conftest.$ac_objext
15745 if { (eval echo "$as_me:15745: \"$ac_compile\"") >&5
15746   (eval $ac_compile) 2>&5
15747   ac_status=$?
15748   echo "$as_me:15748: \$? = $ac_status" >&5
15749   (exit $ac_status); } &&
15750          { ac_try='test -s conftest.$ac_objext'
15751   { (eval echo "$as_me:15751: \"$ac_try\"") >&5
15752   (eval $ac_try) 2>&5
15753   ac_status=$?
15754   echo "$as_me:15754: \$? = $ac_status" >&5
15755   (exit $ac_status); }; }; then
15756   cf_cv_dcl_errno=yes
15757 else
15758   echo "$as_me: failed program was:" >&5
15759 cat conftest.$ac_ext >&5
15760 cf_cv_dcl_errno=no
15761 fi
15762 rm -f conftest.$ac_objext conftest.$ac_ext
15763
15764 fi
15765 echo "$as_me:15765: result: $cf_cv_dcl_errno" >&5
15766 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15767
15768 if test "$cf_cv_dcl_errno" = no ; then
15769
15770 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15771
15772     cat >>confdefs.h <<EOF
15773 #define $cf_result 1
15774 EOF
15775
15776 fi
15777
15778 # It's possible (for near-UNIX clones) that the data doesn't exist
15779
15780 echo "$as_me:15780: checking if external errno exists" >&5
15781 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15782 if test "${cf_cv_have_errno+set}" = set; then
15783   echo $ECHO_N "(cached) $ECHO_C" >&6
15784 else
15785
15786     cat >conftest.$ac_ext <<_ACEOF
15787 #line 15787 "configure"
15788 #include "confdefs.h"
15789
15790 #undef errno
15791 extern int errno;
15792
15793 int
15794 main ()
15795 {
15796 errno = 2
15797   ;
15798   return 0;
15799 }
15800 _ACEOF
15801 rm -f conftest.$ac_objext conftest$ac_exeext
15802 if { (eval echo "$as_me:15802: \"$ac_link\"") >&5
15803   (eval $ac_link) 2>&5
15804   ac_status=$?
15805   echo "$as_me:15805: \$? = $ac_status" >&5
15806   (exit $ac_status); } &&
15807          { ac_try='test -s conftest$ac_exeext'
15808   { (eval echo "$as_me:15808: \"$ac_try\"") >&5
15809   (eval $ac_try) 2>&5
15810   ac_status=$?
15811   echo "$as_me:15811: \$? = $ac_status" >&5
15812   (exit $ac_status); }; }; then
15813   cf_cv_have_errno=yes
15814 else
15815   echo "$as_me: failed program was:" >&5
15816 cat conftest.$ac_ext >&5
15817 cf_cv_have_errno=no
15818 fi
15819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15820
15821 fi
15822 echo "$as_me:15822: result: $cf_cv_have_errno" >&5
15823 echo "${ECHO_T}$cf_cv_have_errno" >&6
15824
15825 if test "$cf_cv_have_errno" = yes ; then
15826
15827 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15828
15829     cat >>confdefs.h <<EOF
15830 #define $cf_result 1
15831 EOF
15832
15833 fi
15834
15835 echo "$as_me:15835: checking if data-only library module links" >&5
15836 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15837 if test "${cf_cv_link_dataonly+set}" = set; then
15838   echo $ECHO_N "(cached) $ECHO_C" >&6
15839 else
15840
15841         rm -f conftest.a
15842         cat >conftest.$ac_ext <<EOF
15843 #line 15843 "configure"
15844 int     testdata[3] = { 123, 456, 789 };
15845 EOF
15846         if { (eval echo "$as_me:15846: \"$ac_compile\"") >&5
15847   (eval $ac_compile) 2>&5
15848   ac_status=$?
15849   echo "$as_me:15849: \$? = $ac_status" >&5
15850   (exit $ac_status); } ; then
15851                 mv conftest.o data.o && \
15852                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15853         fi
15854         rm -f conftest.$ac_ext data.o
15855         cat >conftest.$ac_ext <<EOF
15856 #line 15856 "configure"
15857 int     testfunc()
15858 {
15859 #if defined(NeXT)
15860         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15861 #else
15862         extern int testdata[3];
15863         return testdata[0] == 123
15864            &&  testdata[1] == 456
15865            &&  testdata[2] == 789;
15866 #endif
15867 }
15868 EOF
15869         if { (eval echo "$as_me:15869: \"$ac_compile\"") >&5
15870   (eval $ac_compile) 2>&5
15871   ac_status=$?
15872   echo "$as_me:15872: \$? = $ac_status" >&5
15873   (exit $ac_status); }; then
15874                 mv conftest.o func.o && \
15875                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15876         fi
15877         rm -f conftest.$ac_ext func.o
15878         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15879         cf_saveLIBS="$LIBS"
15880         LIBS="conftest.a $LIBS"
15881         if test "$cross_compiling" = yes; then
15882   cf_cv_link_dataonly=unknown
15883 else
15884   cat >conftest.$ac_ext <<_ACEOF
15885 #line 15885 "configure"
15886 #include "confdefs.h"
15887
15888         int main()
15889         {
15890                 extern int testfunc();
15891                 ${cf_cv_main_return:-return} (!testfunc());
15892         }
15893
15894 _ACEOF
15895 rm -f conftest$ac_exeext
15896 if { (eval echo "$as_me:15896: \"$ac_link\"") >&5
15897   (eval $ac_link) 2>&5
15898   ac_status=$?
15899   echo "$as_me:15899: \$? = $ac_status" >&5
15900   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15901   { (eval echo "$as_me:15901: \"$ac_try\"") >&5
15902   (eval $ac_try) 2>&5
15903   ac_status=$?
15904   echo "$as_me:15904: \$? = $ac_status" >&5
15905   (exit $ac_status); }; }; then
15906   cf_cv_link_dataonly=yes
15907 else
15908   echo "$as_me: program exited with status $ac_status" >&5
15909 echo "$as_me: failed program was:" >&5
15910 cat conftest.$ac_ext >&5
15911 cf_cv_link_dataonly=no
15912 fi
15913 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15914 fi
15915         LIBS="$cf_saveLIBS"
15916
15917 fi
15918
15919 echo "$as_me:15919: result: $cf_cv_link_dataonly" >&5
15920 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15921
15922 if test "$cf_cv_link_dataonly" = no ; then
15923
15924 cat >>confdefs.h <<\EOF
15925 #define BROKEN_LINKER 1
15926 EOF
15927
15928         BROKEN_LINKER=1
15929 fi
15930
15931 ###     Checks for library functions.
15932
15933 for ac_func in \
15934 getcwd \
15935 getegid \
15936 geteuid \
15937 getopt \
15938 getttynam \
15939 issetugid \
15940 poll \
15941 putenv \
15942 remove \
15943 select \
15944 setbuf \
15945 setbuffer \
15946 setenv \
15947 setvbuf \
15948 sigaction \
15949 sigvec \
15950 strdup \
15951 strstr \
15952 tcgetpgrp \
15953 times \
15954 vsnprintf \
15955
15956 do
15957 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15958 echo "$as_me:15958: checking for $ac_func" >&5
15959 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15960 if eval "test \"\${$as_ac_var+set}\" = set"; then
15961   echo $ECHO_N "(cached) $ECHO_C" >&6
15962 else
15963   cat >conftest.$ac_ext <<_ACEOF
15964 #line 15964 "configure"
15965 #include "confdefs.h"
15966 /* System header to define __stub macros and hopefully few prototypes,
15967     which can conflict with char $ac_func (); below.  */
15968 #include <assert.h>
15969 /* Override any gcc2 internal prototype to avoid an error.  */
15970 #ifdef __cplusplus
15971 extern "C"
15972 #endif
15973 /* We use char because int might match the return type of a gcc2
15974    builtin and then its argument prototype would still apply.  */
15975 char $ac_func ();
15976 char (*f) ();
15977
15978 int
15979 main ()
15980 {
15981 /* The GNU C library defines this for functions which it implements
15982     to always fail with ENOSYS.  Some functions are actually named
15983     something starting with __ and the normal name is an alias.  */
15984 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15985 choke me
15986 #else
15987 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15988 #endif
15989
15990   ;
15991   return 0;
15992 }
15993 _ACEOF
15994 rm -f conftest.$ac_objext conftest$ac_exeext
15995 if { (eval echo "$as_me:15995: \"$ac_link\"") >&5
15996   (eval $ac_link) 2>&5
15997   ac_status=$?
15998   echo "$as_me:15998: \$? = $ac_status" >&5
15999   (exit $ac_status); } &&
16000          { ac_try='test -s conftest$ac_exeext'
16001   { (eval echo "$as_me:16001: \"$ac_try\"") >&5
16002   (eval $ac_try) 2>&5
16003   ac_status=$?
16004   echo "$as_me:16004: \$? = $ac_status" >&5
16005   (exit $ac_status); }; }; then
16006   eval "$as_ac_var=yes"
16007 else
16008   echo "$as_me: failed program was:" >&5
16009 cat conftest.$ac_ext >&5
16010 eval "$as_ac_var=no"
16011 fi
16012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16013 fi
16014 echo "$as_me:16014: result: `eval echo '${'$as_ac_var'}'`" >&5
16015 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16016 if test `eval echo '${'$as_ac_var'}'` = yes; then
16017   cat >>confdefs.h <<EOF
16018 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16019 EOF
16020
16021 fi
16022 done
16023
16024 if test "x$ac_cv_func_getopt" = xno &&
16025    test "x$cf_with_progs$cf_with_tests" != xnono; then
16026         { { echo "$as_me:16026: error: getopt is required for building programs" >&5
16027 echo "$as_me: error: getopt is required for building programs" >&2;}
16028    { (exit 1); exit 1; }; }
16029 fi
16030
16031 if test "x$with_getcap" = "xyes" ; then
16032
16033 echo "$as_me:16033: checking for terminal-capability database functions" >&5
16034 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16035 if test "${cf_cv_cgetent+set}" = set; then
16036   echo $ECHO_N "(cached) $ECHO_C" >&6
16037 else
16038
16039 cat >conftest.$ac_ext <<_ACEOF
16040 #line 16040 "configure"
16041 #include "confdefs.h"
16042
16043 #include <stdlib.h>
16044 int
16045 main ()
16046 {
16047
16048         char temp[128];
16049         char *buf = temp;
16050         char *db_array = temp;
16051         cgetent(&buf, &db_array, "vt100");
16052         cgetcap(buf, "tc", '=');
16053         cgetmatch(buf, "tc");
16054
16055   ;
16056   return 0;
16057 }
16058 _ACEOF
16059 rm -f conftest.$ac_objext conftest$ac_exeext
16060 if { (eval echo "$as_me:16060: \"$ac_link\"") >&5
16061   (eval $ac_link) 2>&5
16062   ac_status=$?
16063   echo "$as_me:16063: \$? = $ac_status" >&5
16064   (exit $ac_status); } &&
16065          { ac_try='test -s conftest$ac_exeext'
16066   { (eval echo "$as_me:16066: \"$ac_try\"") >&5
16067   (eval $ac_try) 2>&5
16068   ac_status=$?
16069   echo "$as_me:16069: \$? = $ac_status" >&5
16070   (exit $ac_status); }; }; then
16071   cf_cv_cgetent=yes
16072 else
16073   echo "$as_me: failed program was:" >&5
16074 cat conftest.$ac_ext >&5
16075 cf_cv_cgetent=no
16076 fi
16077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16078
16079 fi
16080 echo "$as_me:16080: result: $cf_cv_cgetent" >&5
16081 echo "${ECHO_T}$cf_cv_cgetent" >&6
16082
16083 if test "$cf_cv_cgetent" = yes
16084 then
16085
16086 cat >>confdefs.h <<\EOF
16087 #define HAVE_BSD_CGETENT 1
16088 EOF
16089
16090 echo "$as_me:16090: checking if cgetent uses const parameter" >&5
16091 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16092 if test "${cf_cv_cgetent_const+set}" = set; then
16093   echo $ECHO_N "(cached) $ECHO_C" >&6
16094 else
16095
16096 cat >conftest.$ac_ext <<_ACEOF
16097 #line 16097 "configure"
16098 #include "confdefs.h"
16099
16100 #include <stdlib.h>
16101 int
16102 main ()
16103 {
16104
16105         char temp[128];
16106         char *buf = temp;
16107 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16108         const char *db_array = temp;
16109         cgetent(&buf, &db_array, "vt100");
16110 #endif
16111         cgetcap(buf, "tc", '=');
16112         cgetmatch(buf, "tc");
16113
16114   ;
16115   return 0;
16116 }
16117 _ACEOF
16118 rm -f conftest.$ac_objext conftest$ac_exeext
16119 if { (eval echo "$as_me:16119: \"$ac_link\"") >&5
16120   (eval $ac_link) 2>&5
16121   ac_status=$?
16122   echo "$as_me:16122: \$? = $ac_status" >&5
16123   (exit $ac_status); } &&
16124          { ac_try='test -s conftest$ac_exeext'
16125   { (eval echo "$as_me:16125: \"$ac_try\"") >&5
16126   (eval $ac_try) 2>&5
16127   ac_status=$?
16128   echo "$as_me:16128: \$? = $ac_status" >&5
16129   (exit $ac_status); }; }; then
16130   cf_cv_cgetent_const=yes
16131 else
16132   echo "$as_me: failed program was:" >&5
16133 cat conftest.$ac_ext >&5
16134 cf_cv_cgetent_const=no
16135 fi
16136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16137
16138 fi
16139 echo "$as_me:16139: result: $cf_cv_cgetent_const" >&5
16140 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16141         if test "$cf_cv_cgetent_const" = yes
16142         then
16143
16144 cat >>confdefs.h <<EOF
16145 #define CGETENT_CONST const
16146 EOF
16147
16148         fi
16149 fi
16150
16151 fi
16152
16153 echo "$as_me:16153: checking for isascii" >&5
16154 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16155 if test "${cf_cv_have_isascii+set}" = set; then
16156   echo $ECHO_N "(cached) $ECHO_C" >&6
16157 else
16158
16159         cat >conftest.$ac_ext <<_ACEOF
16160 #line 16160 "configure"
16161 #include "confdefs.h"
16162 #include <ctype.h>
16163 int
16164 main ()
16165 {
16166 int x = isascii(' ')
16167   ;
16168   return 0;
16169 }
16170 _ACEOF
16171 rm -f conftest.$ac_objext conftest$ac_exeext
16172 if { (eval echo "$as_me:16172: \"$ac_link\"") >&5
16173   (eval $ac_link) 2>&5
16174   ac_status=$?
16175   echo "$as_me:16175: \$? = $ac_status" >&5
16176   (exit $ac_status); } &&
16177          { ac_try='test -s conftest$ac_exeext'
16178   { (eval echo "$as_me:16178: \"$ac_try\"") >&5
16179   (eval $ac_try) 2>&5
16180   ac_status=$?
16181   echo "$as_me:16181: \$? = $ac_status" >&5
16182   (exit $ac_status); }; }; then
16183   cf_cv_have_isascii=yes
16184 else
16185   echo "$as_me: failed program was:" >&5
16186 cat conftest.$ac_ext >&5
16187 cf_cv_have_isascii=no
16188 fi
16189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16190
16191 fi
16192 echo "$as_me:16192: result: $cf_cv_have_isascii" >&5
16193 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16194 test "$cf_cv_have_isascii" = yes &&
16195 cat >>confdefs.h <<\EOF
16196 #define HAVE_ISASCII 1
16197 EOF
16198
16199 if test "$ac_cv_func_sigaction" = yes; then
16200 echo "$as_me:16200: checking whether sigaction needs _POSIX_SOURCE" >&5
16201 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16202 cat >conftest.$ac_ext <<_ACEOF
16203 #line 16203 "configure"
16204 #include "confdefs.h"
16205
16206 #include <sys/types.h>
16207 #include <signal.h>
16208 int
16209 main ()
16210 {
16211 struct sigaction act
16212   ;
16213   return 0;
16214 }
16215 _ACEOF
16216 rm -f conftest.$ac_objext
16217 if { (eval echo "$as_me:16217: \"$ac_compile\"") >&5
16218   (eval $ac_compile) 2>&5
16219   ac_status=$?
16220   echo "$as_me:16220: \$? = $ac_status" >&5
16221   (exit $ac_status); } &&
16222          { ac_try='test -s conftest.$ac_objext'
16223   { (eval echo "$as_me:16223: \"$ac_try\"") >&5
16224   (eval $ac_try) 2>&5
16225   ac_status=$?
16226   echo "$as_me:16226: \$? = $ac_status" >&5
16227   (exit $ac_status); }; }; then
16228   sigact_bad=no
16229 else
16230   echo "$as_me: failed program was:" >&5
16231 cat conftest.$ac_ext >&5
16232
16233 cat >conftest.$ac_ext <<_ACEOF
16234 #line 16234 "configure"
16235 #include "confdefs.h"
16236
16237 #define _POSIX_SOURCE
16238 #include <sys/types.h>
16239 #include <signal.h>
16240 int
16241 main ()
16242 {
16243 struct sigaction act
16244   ;
16245   return 0;
16246 }
16247 _ACEOF
16248 rm -f conftest.$ac_objext
16249 if { (eval echo "$as_me:16249: \"$ac_compile\"") >&5
16250   (eval $ac_compile) 2>&5
16251   ac_status=$?
16252   echo "$as_me:16252: \$? = $ac_status" >&5
16253   (exit $ac_status); } &&
16254          { ac_try='test -s conftest.$ac_objext'
16255   { (eval echo "$as_me:16255: \"$ac_try\"") >&5
16256   (eval $ac_try) 2>&5
16257   ac_status=$?
16258   echo "$as_me:16258: \$? = $ac_status" >&5
16259   (exit $ac_status); }; }; then
16260   sigact_bad=yes
16261
16262 cat >>confdefs.h <<\EOF
16263 #define _POSIX_SOURCE 1
16264 EOF
16265
16266 else
16267   echo "$as_me: failed program was:" >&5
16268 cat conftest.$ac_ext >&5
16269 sigact_bad=unknown
16270 fi
16271 rm -f conftest.$ac_objext conftest.$ac_ext
16272 fi
16273 rm -f conftest.$ac_objext conftest.$ac_ext
16274 echo "$as_me:16274: result: $sigact_bad" >&5
16275 echo "${ECHO_T}$sigact_bad" >&6
16276 fi
16277
16278 echo "$as_me:16278: checking if nanosleep really works" >&5
16279 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16280 if test "${cf_cv_func_nanosleep+set}" = set; then
16281   echo $ECHO_N "(cached) $ECHO_C" >&6
16282 else
16283
16284 if test "$cross_compiling" = yes; then
16285   cf_cv_func_nanosleep=unknown
16286 else
16287   cat >conftest.$ac_ext <<_ACEOF
16288 #line 16288 "configure"
16289 #include "confdefs.h"
16290
16291 #include <stdio.h>
16292 #include <errno.h>
16293 #include <time.h>
16294
16295 #ifdef HAVE_SYS_TIME_H
16296 #include <sys/time.h>
16297 #endif
16298
16299 int main() {
16300         struct timespec ts1, ts2;
16301         int code;
16302         ts1.tv_sec  = 0;
16303         ts1.tv_nsec = 750000000;
16304         ts2.tv_sec  = 0;
16305         ts2.tv_nsec = 0;
16306         errno = 0;
16307         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16308         ${cf_cv_main_return:-return}(code != 0);
16309 }
16310
16311 _ACEOF
16312 rm -f conftest$ac_exeext
16313 if { (eval echo "$as_me:16313: \"$ac_link\"") >&5
16314   (eval $ac_link) 2>&5
16315   ac_status=$?
16316   echo "$as_me:16316: \$? = $ac_status" >&5
16317   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16318   { (eval echo "$as_me:16318: \"$ac_try\"") >&5
16319   (eval $ac_try) 2>&5
16320   ac_status=$?
16321   echo "$as_me:16321: \$? = $ac_status" >&5
16322   (exit $ac_status); }; }; then
16323   cf_cv_func_nanosleep=yes
16324 else
16325   echo "$as_me: program exited with status $ac_status" >&5
16326 echo "$as_me: failed program was:" >&5
16327 cat conftest.$ac_ext >&5
16328 cf_cv_func_nanosleep=no
16329 fi
16330 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16331 fi
16332 fi
16333 echo "$as_me:16333: result: $cf_cv_func_nanosleep" >&5
16334 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16335
16336 test "$cf_cv_func_nanosleep" = "yes" &&
16337 cat >>confdefs.h <<\EOF
16338 #define HAVE_NANOSLEEP 1
16339 EOF
16340
16341 for ac_header in \
16342 termio.h \
16343 termios.h \
16344 unistd.h \
16345
16346 do
16347 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16348 echo "$as_me:16348: checking for $ac_header" >&5
16349 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16350 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16351   echo $ECHO_N "(cached) $ECHO_C" >&6
16352 else
16353   cat >conftest.$ac_ext <<_ACEOF
16354 #line 16354 "configure"
16355 #include "confdefs.h"
16356 #include <$ac_header>
16357 _ACEOF
16358 if { (eval echo "$as_me:16358: \"$ac_cpp conftest.$ac_ext\"") >&5
16359   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16360   ac_status=$?
16361   egrep -v '^ *\+' conftest.er1 >conftest.err
16362   rm -f conftest.er1
16363   cat conftest.err >&5
16364   echo "$as_me:16364: \$? = $ac_status" >&5
16365   (exit $ac_status); } >/dev/null; then
16366   if test -s conftest.err; then
16367     ac_cpp_err=$ac_c_preproc_warn_flag
16368   else
16369     ac_cpp_err=
16370   fi
16371 else
16372   ac_cpp_err=yes
16373 fi
16374 if test -z "$ac_cpp_err"; then
16375   eval "$as_ac_Header=yes"
16376 else
16377   echo "$as_me: failed program was:" >&5
16378   cat conftest.$ac_ext >&5
16379   eval "$as_ac_Header=no"
16380 fi
16381 rm -f conftest.err conftest.$ac_ext
16382 fi
16383 echo "$as_me:16383: result: `eval echo '${'$as_ac_Header'}'`" >&5
16384 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16385 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16386   cat >>confdefs.h <<EOF
16387 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16388 EOF
16389
16390 fi
16391 done
16392
16393 if test "$ISC" = yes ; then
16394
16395 for ac_header in sys/termio.h
16396 do
16397 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16398 echo "$as_me:16398: checking for $ac_header" >&5
16399 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16401   echo $ECHO_N "(cached) $ECHO_C" >&6
16402 else
16403   cat >conftest.$ac_ext <<_ACEOF
16404 #line 16404 "configure"
16405 #include "confdefs.h"
16406 #include <$ac_header>
16407 _ACEOF
16408 if { (eval echo "$as_me:16408: \"$ac_cpp conftest.$ac_ext\"") >&5
16409   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16410   ac_status=$?
16411   egrep -v '^ *\+' conftest.er1 >conftest.err
16412   rm -f conftest.er1
16413   cat conftest.err >&5
16414   echo "$as_me:16414: \$? = $ac_status" >&5
16415   (exit $ac_status); } >/dev/null; then
16416   if test -s conftest.err; then
16417     ac_cpp_err=$ac_c_preproc_warn_flag
16418   else
16419     ac_cpp_err=
16420   fi
16421 else
16422   ac_cpp_err=yes
16423 fi
16424 if test -z "$ac_cpp_err"; then
16425   eval "$as_ac_Header=yes"
16426 else
16427   echo "$as_me: failed program was:" >&5
16428   cat conftest.$ac_ext >&5
16429   eval "$as_ac_Header=no"
16430 fi
16431 rm -f conftest.err conftest.$ac_ext
16432 fi
16433 echo "$as_me:16433: result: `eval echo '${'$as_ac_Header'}'`" >&5
16434 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16435 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16436   cat >>confdefs.h <<EOF
16437 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16438 EOF
16439
16440 fi
16441 done
16442
16443 fi
16444 if test "$ac_cv_header_termios_h" = yes ; then
16445         case "$CFLAGS $CPPFLAGS" in
16446         *-D_POSIX_SOURCE*)
16447                 termios_bad=dunno ;;
16448         *)      termios_bad=maybe ;;
16449         esac
16450         if test "$termios_bad" = maybe ; then
16451         echo "$as_me:16451: checking whether termios.h needs _POSIX_SOURCE" >&5
16452 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16453         cat >conftest.$ac_ext <<_ACEOF
16454 #line 16454 "configure"
16455 #include "confdefs.h"
16456 #include <termios.h>
16457 int
16458 main ()
16459 {
16460 struct termios foo; int x = foo.c_iflag
16461   ;
16462   return 0;
16463 }
16464 _ACEOF
16465 rm -f conftest.$ac_objext
16466 if { (eval echo "$as_me:16466: \"$ac_compile\"") >&5
16467   (eval $ac_compile) 2>&5
16468   ac_status=$?
16469   echo "$as_me:16469: \$? = $ac_status" >&5
16470   (exit $ac_status); } &&
16471          { ac_try='test -s conftest.$ac_objext'
16472   { (eval echo "$as_me:16472: \"$ac_try\"") >&5
16473   (eval $ac_try) 2>&5
16474   ac_status=$?
16475   echo "$as_me:16475: \$? = $ac_status" >&5
16476   (exit $ac_status); }; }; then
16477   termios_bad=no
16478 else
16479   echo "$as_me: failed program was:" >&5
16480 cat conftest.$ac_ext >&5
16481
16482                 cat >conftest.$ac_ext <<_ACEOF
16483 #line 16483 "configure"
16484 #include "confdefs.h"
16485
16486 #define _POSIX_SOURCE
16487 #include <termios.h>
16488 int
16489 main ()
16490 {
16491 struct termios foo; int x = foo.c_iflag
16492   ;
16493   return 0;
16494 }
16495 _ACEOF
16496 rm -f conftest.$ac_objext
16497 if { (eval echo "$as_me:16497: \"$ac_compile\"") >&5
16498   (eval $ac_compile) 2>&5
16499   ac_status=$?
16500   echo "$as_me:16500: \$? = $ac_status" >&5
16501   (exit $ac_status); } &&
16502          { ac_try='test -s conftest.$ac_objext'
16503   { (eval echo "$as_me:16503: \"$ac_try\"") >&5
16504   (eval $ac_try) 2>&5
16505   ac_status=$?
16506   echo "$as_me:16506: \$? = $ac_status" >&5
16507   (exit $ac_status); }; }; then
16508   termios_bad=unknown
16509 else
16510   echo "$as_me: failed program was:" >&5
16511 cat conftest.$ac_ext >&5
16512 termios_bad=yes
16513 cat >>confdefs.h <<\EOF
16514 #define _POSIX_SOURCE 1
16515 EOF
16516
16517 fi
16518 rm -f conftest.$ac_objext conftest.$ac_ext
16519
16520 fi
16521 rm -f conftest.$ac_objext conftest.$ac_ext
16522         echo "$as_me:16522: result: $termios_bad" >&5
16523 echo "${ECHO_T}$termios_bad" >&6
16524         fi
16525 fi
16526
16527 echo "$as_me:16527: checking for tcgetattr" >&5
16528 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16529 if test "${cf_cv_have_tcgetattr+set}" = set; then
16530   echo $ECHO_N "(cached) $ECHO_C" >&6
16531 else
16532
16533 cat >conftest.$ac_ext <<_ACEOF
16534 #line 16534 "configure"
16535 #include "confdefs.h"
16536
16537 #include <sys/types.h>
16538 #ifdef HAVE_UNISTD_H
16539 #include <unistd.h>
16540 #endif
16541 #ifdef HAVE_TERMIOS_H
16542 #include <termios.h>
16543 #define TTY struct termios
16544 #else
16545 #ifdef HAVE_TERMIO_H
16546 #include <termio.h>
16547 #define TTY struct termio
16548 #endif
16549 #endif
16550
16551 int
16552 main ()
16553 {
16554
16555 TTY foo;
16556 tcgetattr(1, &foo);
16557   ;
16558   return 0;
16559 }
16560 _ACEOF
16561 rm -f conftest.$ac_objext conftest$ac_exeext
16562 if { (eval echo "$as_me:16562: \"$ac_link\"") >&5
16563   (eval $ac_link) 2>&5
16564   ac_status=$?
16565   echo "$as_me:16565: \$? = $ac_status" >&5
16566   (exit $ac_status); } &&
16567          { ac_try='test -s conftest$ac_exeext'
16568   { (eval echo "$as_me:16568: \"$ac_try\"") >&5
16569   (eval $ac_try) 2>&5
16570   ac_status=$?
16571   echo "$as_me:16571: \$? = $ac_status" >&5
16572   (exit $ac_status); }; }; then
16573   cf_cv_have_tcgetattr=yes
16574 else
16575   echo "$as_me: failed program was:" >&5
16576 cat conftest.$ac_ext >&5
16577 cf_cv_have_tcgetattr=no
16578 fi
16579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16580 fi
16581 echo "$as_me:16581: result: $cf_cv_have_tcgetattr" >&5
16582 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16583 test "$cf_cv_have_tcgetattr" = yes &&
16584 cat >>confdefs.h <<\EOF
16585 #define HAVE_TCGETATTR 1
16586 EOF
16587
16588 echo "$as_me:16588: checking for vsscanf function or workaround" >&5
16589 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16590 if test "${cf_cv_func_vsscanf+set}" = set; then
16591   echo $ECHO_N "(cached) $ECHO_C" >&6
16592 else
16593
16594 cat >conftest.$ac_ext <<_ACEOF
16595 #line 16595 "configure"
16596 #include "confdefs.h"
16597
16598 #include <stdarg.h>
16599 #include <stdio.h>
16600 int
16601 main ()
16602 {
16603
16604         va_list ap;
16605         vsscanf("from", "%d", ap)
16606   ;
16607   return 0;
16608 }
16609 _ACEOF
16610 rm -f conftest.$ac_objext conftest$ac_exeext
16611 if { (eval echo "$as_me:16611: \"$ac_link\"") >&5
16612   (eval $ac_link) 2>&5
16613   ac_status=$?
16614   echo "$as_me:16614: \$? = $ac_status" >&5
16615   (exit $ac_status); } &&
16616          { ac_try='test -s conftest$ac_exeext'
16617   { (eval echo "$as_me:16617: \"$ac_try\"") >&5
16618   (eval $ac_try) 2>&5
16619   ac_status=$?
16620   echo "$as_me:16620: \$? = $ac_status" >&5
16621   (exit $ac_status); }; }; then
16622   cf_cv_func_vsscanf=vsscanf
16623 else
16624   echo "$as_me: failed program was:" >&5
16625 cat conftest.$ac_ext >&5
16626
16627 cat >conftest.$ac_ext <<_ACEOF
16628 #line 16628 "configure"
16629 #include "confdefs.h"
16630
16631 #include <stdarg.h>
16632 #include <stdio.h>
16633 int
16634 main ()
16635 {
16636
16637     FILE strbuf;
16638     char *str = "from";
16639
16640     strbuf._flag = _IOREAD;
16641     strbuf._ptr = strbuf._base = (unsigned char *) str;
16642     strbuf._cnt = strlen(str);
16643     strbuf._file = _NFILE;
16644     return (vfscanf(&strbuf, "%d", ap))
16645   ;
16646   return 0;
16647 }
16648 _ACEOF
16649 rm -f conftest.$ac_objext conftest$ac_exeext
16650 if { (eval echo "$as_me:16650: \"$ac_link\"") >&5
16651   (eval $ac_link) 2>&5
16652   ac_status=$?
16653   echo "$as_me:16653: \$? = $ac_status" >&5
16654   (exit $ac_status); } &&
16655          { ac_try='test -s conftest$ac_exeext'
16656   { (eval echo "$as_me:16656: \"$ac_try\"") >&5
16657   (eval $ac_try) 2>&5
16658   ac_status=$?
16659   echo "$as_me:16659: \$? = $ac_status" >&5
16660   (exit $ac_status); }; }; then
16661   cf_cv_func_vsscanf=vfscanf
16662 else
16663   echo "$as_me: failed program was:" >&5
16664 cat conftest.$ac_ext >&5
16665
16666 cat >conftest.$ac_ext <<_ACEOF
16667 #line 16667 "configure"
16668 #include "confdefs.h"
16669
16670 #include <stdarg.h>
16671 #include <stdio.h>
16672 int
16673 main ()
16674 {
16675
16676     FILE strbuf;
16677     char *str = "from";
16678
16679     strbuf._flag = _IOREAD;
16680     strbuf._ptr = strbuf._base = (unsigned char *) str;
16681     strbuf._cnt = strlen(str);
16682     strbuf._file = _NFILE;
16683     return (_doscan(&strbuf, "%d", ap))
16684   ;
16685   return 0;
16686 }
16687 _ACEOF
16688 rm -f conftest.$ac_objext conftest$ac_exeext
16689 if { (eval echo "$as_me:16689: \"$ac_link\"") >&5
16690   (eval $ac_link) 2>&5
16691   ac_status=$?
16692   echo "$as_me:16692: \$? = $ac_status" >&5
16693   (exit $ac_status); } &&
16694          { ac_try='test -s conftest$ac_exeext'
16695   { (eval echo "$as_me:16695: \"$ac_try\"") >&5
16696   (eval $ac_try) 2>&5
16697   ac_status=$?
16698   echo "$as_me:16698: \$? = $ac_status" >&5
16699   (exit $ac_status); }; }; then
16700   cf_cv_func_vsscanf=_doscan
16701 else
16702   echo "$as_me: failed program was:" >&5
16703 cat conftest.$ac_ext >&5
16704
16705 cf_cv_func_vsscanf=no
16706 fi
16707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16708 fi
16709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16710 fi
16711 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16712 fi
16713 echo "$as_me:16713: result: $cf_cv_func_vsscanf" >&5
16714 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16715
16716 case $cf_cv_func_vsscanf in #(vi
16717 vsscanf)
16718 cat >>confdefs.h <<\EOF
16719 #define HAVE_VSSCANF 1
16720 EOF
16721 ;; #(vi
16722 vfscanf)
16723 cat >>confdefs.h <<\EOF
16724 #define HAVE_VFSCANF 1
16725 EOF
16726 ;; #(vi
16727 _doscan)
16728 cat >>confdefs.h <<\EOF
16729 #define HAVE__DOSCAN 1
16730 EOF
16731 ;;
16732 esac
16733
16734 echo "$as_me:16734: checking for working mkstemp" >&5
16735 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16736 if test "${cf_cv_func_mkstemp+set}" = set; then
16737   echo $ECHO_N "(cached) $ECHO_C" >&6
16738 else
16739
16740 rm -rf conftest*
16741 if test "$cross_compiling" = yes; then
16742   cf_cv_func_mkstemp=maybe
16743 else
16744   cat >conftest.$ac_ext <<_ACEOF
16745 #line 16745 "configure"
16746 #include "confdefs.h"
16747
16748 #include <sys/types.h>
16749 #include <stdlib.h>
16750 #include <stdio.h>
16751 #include <string.h>
16752 #include <sys/stat.h>
16753 int main()
16754 {
16755         char *tmpl = "conftestXXXXXX";
16756         char name[2][80];
16757         int n;
16758         int result = 0;
16759         int fd;
16760         struct stat sb;
16761
16762         umask(077);
16763         for (n = 0; n < 2; ++n) {
16764                 strcpy(name[n], tmpl);
16765                 if ((fd = mkstemp(name[n])) >= 0) {
16766                         if (!strcmp(name[n], tmpl)
16767                          || stat(name[n], &sb) != 0
16768                          || (sb.st_mode & S_IFMT) != S_IFREG
16769                          || (sb.st_mode & 077) != 0) {
16770                                 result = 1;
16771                         }
16772                         close(fd);
16773                 }
16774         }
16775         if (result == 0
16776          && !strcmp(name[0], name[1]))
16777                 result = 1;
16778         ${cf_cv_main_return:-return}(result);
16779 }
16780
16781 _ACEOF
16782 rm -f conftest$ac_exeext
16783 if { (eval echo "$as_me:16783: \"$ac_link\"") >&5
16784   (eval $ac_link) 2>&5
16785   ac_status=$?
16786   echo "$as_me:16786: \$? = $ac_status" >&5
16787   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16788   { (eval echo "$as_me:16788: \"$ac_try\"") >&5
16789   (eval $ac_try) 2>&5
16790   ac_status=$?
16791   echo "$as_me:16791: \$? = $ac_status" >&5
16792   (exit $ac_status); }; }; then
16793   cf_cv_func_mkstemp=yes
16794
16795 else
16796   echo "$as_me: program exited with status $ac_status" >&5
16797 echo "$as_me: failed program was:" >&5
16798 cat conftest.$ac_ext >&5
16799 cf_cv_func_mkstemp=no
16800
16801 fi
16802 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16803 fi
16804
16805 fi
16806 echo "$as_me:16806: result: $cf_cv_func_mkstemp" >&5
16807 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16808 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16809         echo "$as_me:16809: checking for mkstemp" >&5
16810 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16811 if test "${ac_cv_func_mkstemp+set}" = set; then
16812   echo $ECHO_N "(cached) $ECHO_C" >&6
16813 else
16814   cat >conftest.$ac_ext <<_ACEOF
16815 #line 16815 "configure"
16816 #include "confdefs.h"
16817 /* System header to define __stub macros and hopefully few prototypes,
16818     which can conflict with char mkstemp (); below.  */
16819 #include <assert.h>
16820 /* Override any gcc2 internal prototype to avoid an error.  */
16821 #ifdef __cplusplus
16822 extern "C"
16823 #endif
16824 /* We use char because int might match the return type of a gcc2
16825    builtin and then its argument prototype would still apply.  */
16826 char mkstemp ();
16827 char (*f) ();
16828
16829 int
16830 main ()
16831 {
16832 /* The GNU C library defines this for functions which it implements
16833     to always fail with ENOSYS.  Some functions are actually named
16834     something starting with __ and the normal name is an alias.  */
16835 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16836 choke me
16837 #else
16838 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16839 #endif
16840
16841   ;
16842   return 0;
16843 }
16844 _ACEOF
16845 rm -f conftest.$ac_objext conftest$ac_exeext
16846 if { (eval echo "$as_me:16846: \"$ac_link\"") >&5
16847   (eval $ac_link) 2>&5
16848   ac_status=$?
16849   echo "$as_me:16849: \$? = $ac_status" >&5
16850   (exit $ac_status); } &&
16851          { ac_try='test -s conftest$ac_exeext'
16852   { (eval echo "$as_me:16852: \"$ac_try\"") >&5
16853   (eval $ac_try) 2>&5
16854   ac_status=$?
16855   echo "$as_me:16855: \$? = $ac_status" >&5
16856   (exit $ac_status); }; }; then
16857   ac_cv_func_mkstemp=yes
16858 else
16859   echo "$as_me: failed program was:" >&5
16860 cat conftest.$ac_ext >&5
16861 ac_cv_func_mkstemp=no
16862 fi
16863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16864 fi
16865 echo "$as_me:16865: result: $ac_cv_func_mkstemp" >&5
16866 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16867
16868 fi
16869 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16870
16871 cat >>confdefs.h <<\EOF
16872 #define HAVE_MKSTEMP 1
16873 EOF
16874
16875 fi
16876
16877 # setup for prototype of fallback for vsscanf()
16878
16879 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16880         HAVE_VSSCANF=1
16881 else
16882         HAVE_VSSCANF=0
16883 fi
16884
16885 if test "x$cross_compiling" = xyes ; then
16886         { echo "$as_me:16886: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16887 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16888 else
16889         echo "$as_me:16889: checking whether setvbuf arguments are reversed" >&5
16890 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16891 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16892   echo $ECHO_N "(cached) $ECHO_C" >&6
16893 else
16894   if test "$cross_compiling" = yes; then
16895   { { echo "$as_me:16895: error: cannot run test program while cross compiling" >&5
16896 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16897    { (exit 1); exit 1; }; }
16898 else
16899   cat >conftest.$ac_ext <<_ACEOF
16900 #line 16900 "configure"
16901 #include "confdefs.h"
16902 #include <stdio.h>
16903 /* If setvbuf has the reversed format, exit 0. */
16904 int
16905 main ()
16906 {
16907   /* This call has the arguments reversed.
16908      A reversed system may check and see that the address of main
16909      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16910   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16911     $ac_main_return(1);
16912   putc('\r', stdout);
16913   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16914 }
16915 _ACEOF
16916 rm -f conftest$ac_exeext
16917 if { (eval echo "$as_me:16917: \"$ac_link\"") >&5
16918   (eval $ac_link) 2>&5
16919   ac_status=$?
16920   echo "$as_me:16920: \$? = $ac_status" >&5
16921   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16922   { (eval echo "$as_me:16922: \"$ac_try\"") >&5
16923   (eval $ac_try) 2>&5
16924   ac_status=$?
16925   echo "$as_me:16925: \$? = $ac_status" >&5
16926   (exit $ac_status); }; }; then
16927   ac_cv_func_setvbuf_reversed=yes
16928 else
16929   echo "$as_me: program exited with status $ac_status" >&5
16930 echo "$as_me: failed program was:" >&5
16931 cat conftest.$ac_ext >&5
16932 ac_cv_func_setvbuf_reversed=no
16933 fi
16934 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16935 fi
16936 rm -f core core.* *.core
16937 fi
16938 echo "$as_me:16938: result: $ac_cv_func_setvbuf_reversed" >&5
16939 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16940 if test $ac_cv_func_setvbuf_reversed = yes; then
16941
16942 cat >>confdefs.h <<\EOF
16943 #define SETVBUF_REVERSED 1
16944 EOF
16945
16946 fi
16947
16948 fi
16949 echo "$as_me:16949: checking for intptr_t" >&5
16950 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16951 if test "${ac_cv_type_intptr_t+set}" = set; then
16952   echo $ECHO_N "(cached) $ECHO_C" >&6
16953 else
16954   cat >conftest.$ac_ext <<_ACEOF
16955 #line 16955 "configure"
16956 #include "confdefs.h"
16957 $ac_includes_default
16958 int
16959 main ()
16960 {
16961 if ((intptr_t *) 0)
16962   return 0;
16963 if (sizeof (intptr_t))
16964   return 0;
16965   ;
16966   return 0;
16967 }
16968 _ACEOF
16969 rm -f conftest.$ac_objext
16970 if { (eval echo "$as_me:16970: \"$ac_compile\"") >&5
16971   (eval $ac_compile) 2>&5
16972   ac_status=$?
16973   echo "$as_me:16973: \$? = $ac_status" >&5
16974   (exit $ac_status); } &&
16975          { ac_try='test -s conftest.$ac_objext'
16976   { (eval echo "$as_me:16976: \"$ac_try\"") >&5
16977   (eval $ac_try) 2>&5
16978   ac_status=$?
16979   echo "$as_me:16979: \$? = $ac_status" >&5
16980   (exit $ac_status); }; }; then
16981   ac_cv_type_intptr_t=yes
16982 else
16983   echo "$as_me: failed program was:" >&5
16984 cat conftest.$ac_ext >&5
16985 ac_cv_type_intptr_t=no
16986 fi
16987 rm -f conftest.$ac_objext conftest.$ac_ext
16988 fi
16989 echo "$as_me:16989: result: $ac_cv_type_intptr_t" >&5
16990 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16991 if test $ac_cv_type_intptr_t = yes; then
16992   :
16993 else
16994
16995 cat >>confdefs.h <<EOF
16996 #define intptr_t long
16997 EOF
16998
16999 fi
17000
17001 echo "$as_me:17001: checking for type sigaction_t" >&5
17002 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17003 if test "${cf_cv_type_sigaction+set}" = set; then
17004   echo $ECHO_N "(cached) $ECHO_C" >&6
17005 else
17006
17007         cat >conftest.$ac_ext <<_ACEOF
17008 #line 17008 "configure"
17009 #include "confdefs.h"
17010
17011 #include <signal.h>
17012 int
17013 main ()
17014 {
17015 sigaction_t x
17016   ;
17017   return 0;
17018 }
17019 _ACEOF
17020 rm -f conftest.$ac_objext
17021 if { (eval echo "$as_me:17021: \"$ac_compile\"") >&5
17022   (eval $ac_compile) 2>&5
17023   ac_status=$?
17024   echo "$as_me:17024: \$? = $ac_status" >&5
17025   (exit $ac_status); } &&
17026          { ac_try='test -s conftest.$ac_objext'
17027   { (eval echo "$as_me:17027: \"$ac_try\"") >&5
17028   (eval $ac_try) 2>&5
17029   ac_status=$?
17030   echo "$as_me:17030: \$? = $ac_status" >&5
17031   (exit $ac_status); }; }; then
17032   cf_cv_type_sigaction=yes
17033 else
17034   echo "$as_me: failed program was:" >&5
17035 cat conftest.$ac_ext >&5
17036 cf_cv_type_sigaction=no
17037 fi
17038 rm -f conftest.$ac_objext conftest.$ac_ext
17039 fi
17040
17041 echo "$as_me:17041: result: $cf_cv_type_sigaction" >&5
17042 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17043 test "$cf_cv_type_sigaction" = yes &&
17044 cat >>confdefs.h <<\EOF
17045 #define HAVE_TYPE_SIGACTION 1
17046 EOF
17047
17048 echo "$as_me:17048: checking declaration of size-change" >&5
17049 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17050 if test "${cf_cv_sizechange+set}" = set; then
17051   echo $ECHO_N "(cached) $ECHO_C" >&6
17052 else
17053
17054     cf_cv_sizechange=unknown
17055     cf_save_CPPFLAGS="$CPPFLAGS"
17056
17057 for cf_opts in "" "NEED_PTEM_H"
17058 do
17059
17060     CPPFLAGS="$cf_save_CPPFLAGS"
17061     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17062     cat >conftest.$ac_ext <<_ACEOF
17063 #line 17063 "configure"
17064 #include "confdefs.h"
17065 #include <sys/types.h>
17066 #ifdef HAVE_TERMIOS_H
17067 #include <termios.h>
17068 #else
17069 #ifdef HAVE_TERMIO_H
17070 #include <termio.h>
17071 #endif
17072 #endif
17073 #ifdef NEED_PTEM_H
17074 /* This is a workaround for SCO:  they neglected to define struct winsize in
17075  * termios.h -- it's only in termio.h and ptem.h
17076  */
17077 #include        <sys/stream.h>
17078 #include        <sys/ptem.h>
17079 #endif
17080 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17081 #include <sys/ioctl.h>
17082 #endif
17083
17084 int
17085 main ()
17086 {
17087
17088 #ifdef TIOCGSIZE
17089         struct ttysize win;     /* FIXME: what system is this? */
17090         int y = win.ts_lines;
17091         int x = win.ts_cols;
17092 #else
17093 #ifdef TIOCGWINSZ
17094         struct winsize win;
17095         int y = win.ws_row;
17096         int x = win.ws_col;
17097 #else
17098         no TIOCGSIZE or TIOCGWINSZ
17099 #endif /* TIOCGWINSZ */
17100 #endif /* TIOCGSIZE */
17101
17102   ;
17103   return 0;
17104 }
17105 _ACEOF
17106 rm -f conftest.$ac_objext
17107 if { (eval echo "$as_me:17107: \"$ac_compile\"") >&5
17108   (eval $ac_compile) 2>&5
17109   ac_status=$?
17110   echo "$as_me:17110: \$? = $ac_status" >&5
17111   (exit $ac_status); } &&
17112          { ac_try='test -s conftest.$ac_objext'
17113   { (eval echo "$as_me:17113: \"$ac_try\"") >&5
17114   (eval $ac_try) 2>&5
17115   ac_status=$?
17116   echo "$as_me:17116: \$? = $ac_status" >&5
17117   (exit $ac_status); }; }; then
17118   cf_cv_sizechange=yes
17119 else
17120   echo "$as_me: failed program was:" >&5
17121 cat conftest.$ac_ext >&5
17122 cf_cv_sizechange=no
17123 fi
17124 rm -f conftest.$ac_objext conftest.$ac_ext
17125
17126         CPPFLAGS="$cf_save_CPPFLAGS"
17127         if test "$cf_cv_sizechange" = yes ; then
17128                 echo "size-change succeeded ($cf_opts)" >&5
17129                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17130                 break
17131         fi
17132 done
17133
17134 fi
17135 echo "$as_me:17135: result: $cf_cv_sizechange" >&5
17136 echo "${ECHO_T}$cf_cv_sizechange" >&6
17137 if test "$cf_cv_sizechange" != no ; then
17138
17139 cat >>confdefs.h <<\EOF
17140 #define HAVE_SIZECHANGE 1
17141 EOF
17142
17143         case $cf_cv_sizechange in #(vi
17144         NEED*)
17145                 cat >>confdefs.h <<EOF
17146 #define $cf_cv_sizechange  1
17147 EOF
17148
17149                 ;;
17150         esac
17151 fi
17152
17153 echo "$as_me:17153: checking for memmove" >&5
17154 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17155 if test "${ac_cv_func_memmove+set}" = set; then
17156   echo $ECHO_N "(cached) $ECHO_C" >&6
17157 else
17158   cat >conftest.$ac_ext <<_ACEOF
17159 #line 17159 "configure"
17160 #include "confdefs.h"
17161 /* System header to define __stub macros and hopefully few prototypes,
17162     which can conflict with char memmove (); below.  */
17163 #include <assert.h>
17164 /* Override any gcc2 internal prototype to avoid an error.  */
17165 #ifdef __cplusplus
17166 extern "C"
17167 #endif
17168 /* We use char because int might match the return type of a gcc2
17169    builtin and then its argument prototype would still apply.  */
17170 char memmove ();
17171 char (*f) ();
17172
17173 int
17174 main ()
17175 {
17176 /* The GNU C library defines this for functions which it implements
17177     to always fail with ENOSYS.  Some functions are actually named
17178     something starting with __ and the normal name is an alias.  */
17179 #if defined (__stub_memmove) || defined (__stub___memmove)
17180 choke me
17181 #else
17182 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17183 #endif
17184
17185   ;
17186   return 0;
17187 }
17188 _ACEOF
17189 rm -f conftest.$ac_objext conftest$ac_exeext
17190 if { (eval echo "$as_me:17190: \"$ac_link\"") >&5
17191   (eval $ac_link) 2>&5
17192   ac_status=$?
17193   echo "$as_me:17193: \$? = $ac_status" >&5
17194   (exit $ac_status); } &&
17195          { ac_try='test -s conftest$ac_exeext'
17196   { (eval echo "$as_me:17196: \"$ac_try\"") >&5
17197   (eval $ac_try) 2>&5
17198   ac_status=$?
17199   echo "$as_me:17199: \$? = $ac_status" >&5
17200   (exit $ac_status); }; }; then
17201   ac_cv_func_memmove=yes
17202 else
17203   echo "$as_me: failed program was:" >&5
17204 cat conftest.$ac_ext >&5
17205 ac_cv_func_memmove=no
17206 fi
17207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17208 fi
17209 echo "$as_me:17209: result: $ac_cv_func_memmove" >&5
17210 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17211 if test $ac_cv_func_memmove = yes; then
17212   :
17213 else
17214
17215 echo "$as_me:17215: checking for bcopy" >&5
17216 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17217 if test "${ac_cv_func_bcopy+set}" = set; then
17218   echo $ECHO_N "(cached) $ECHO_C" >&6
17219 else
17220   cat >conftest.$ac_ext <<_ACEOF
17221 #line 17221 "configure"
17222 #include "confdefs.h"
17223 /* System header to define __stub macros and hopefully few prototypes,
17224     which can conflict with char bcopy (); below.  */
17225 #include <assert.h>
17226 /* Override any gcc2 internal prototype to avoid an error.  */
17227 #ifdef __cplusplus
17228 extern "C"
17229 #endif
17230 /* We use char because int might match the return type of a gcc2
17231    builtin and then its argument prototype would still apply.  */
17232 char bcopy ();
17233 char (*f) ();
17234
17235 int
17236 main ()
17237 {
17238 /* The GNU C library defines this for functions which it implements
17239     to always fail with ENOSYS.  Some functions are actually named
17240     something starting with __ and the normal name is an alias.  */
17241 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17242 choke me
17243 #else
17244 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17245 #endif
17246
17247   ;
17248   return 0;
17249 }
17250 _ACEOF
17251 rm -f conftest.$ac_objext conftest$ac_exeext
17252 if { (eval echo "$as_me:17252: \"$ac_link\"") >&5
17253   (eval $ac_link) 2>&5
17254   ac_status=$?
17255   echo "$as_me:17255: \$? = $ac_status" >&5
17256   (exit $ac_status); } &&
17257          { ac_try='test -s conftest$ac_exeext'
17258   { (eval echo "$as_me:17258: \"$ac_try\"") >&5
17259   (eval $ac_try) 2>&5
17260   ac_status=$?
17261   echo "$as_me:17261: \$? = $ac_status" >&5
17262   (exit $ac_status); }; }; then
17263   ac_cv_func_bcopy=yes
17264 else
17265   echo "$as_me: failed program was:" >&5
17266 cat conftest.$ac_ext >&5
17267 ac_cv_func_bcopy=no
17268 fi
17269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17270 fi
17271 echo "$as_me:17271: result: $ac_cv_func_bcopy" >&5
17272 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17273 if test $ac_cv_func_bcopy = yes; then
17274
17275         echo "$as_me:17275: checking if bcopy does overlapping moves" >&5
17276 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17277 if test "${cf_cv_good_bcopy+set}" = set; then
17278   echo $ECHO_N "(cached) $ECHO_C" >&6
17279 else
17280
17281                 if test "$cross_compiling" = yes; then
17282   cf_cv_good_bcopy=unknown
17283 else
17284   cat >conftest.$ac_ext <<_ACEOF
17285 #line 17285 "configure"
17286 #include "confdefs.h"
17287
17288 int main() {
17289         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17290         char temp[40];
17291         bcopy(data, temp, sizeof(data));
17292         bcopy(temp+10, temp, 15);
17293         bcopy(temp+5, temp+15, 10);
17294         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17295 }
17296
17297 _ACEOF
17298 rm -f conftest$ac_exeext
17299 if { (eval echo "$as_me:17299: \"$ac_link\"") >&5
17300   (eval $ac_link) 2>&5
17301   ac_status=$?
17302   echo "$as_me:17302: \$? = $ac_status" >&5
17303   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17304   { (eval echo "$as_me:17304: \"$ac_try\"") >&5
17305   (eval $ac_try) 2>&5
17306   ac_status=$?
17307   echo "$as_me:17307: \$? = $ac_status" >&5
17308   (exit $ac_status); }; }; then
17309   cf_cv_good_bcopy=yes
17310 else
17311   echo "$as_me: program exited with status $ac_status" >&5
17312 echo "$as_me: failed program was:" >&5
17313 cat conftest.$ac_ext >&5
17314 cf_cv_good_bcopy=no
17315 fi
17316 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17317 fi
17318
17319 fi
17320 echo "$as_me:17320: result: $cf_cv_good_bcopy" >&5
17321 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17322
17323 else
17324   cf_cv_good_bcopy=no
17325 fi
17326
17327         if test "$cf_cv_good_bcopy" = yes ; then
17328
17329 cat >>confdefs.h <<\EOF
17330 #define USE_OK_BCOPY 1
17331 EOF
17332
17333         else
17334
17335 cat >>confdefs.h <<\EOF
17336 #define USE_MY_MEMMOVE 1
17337 EOF
17338
17339         fi
17340
17341 fi
17342
17343 echo "$as_me:17343: checking if poll really works" >&5
17344 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17345 if test "${cf_cv_working_poll+set}" = set; then
17346   echo $ECHO_N "(cached) $ECHO_C" >&6
17347 else
17348
17349 if test "$cross_compiling" = yes; then
17350   cf_cv_working_poll=unknown
17351 else
17352   cat >conftest.$ac_ext <<_ACEOF
17353 #line 17353 "configure"
17354 #include "confdefs.h"
17355
17356 #include <stdlib.h>
17357 #include <stdio.h>
17358 #include <unistd.h>
17359 #include <fcntl.h>
17360 #ifdef HAVE_POLL_H
17361 #include <poll.h>
17362 #else
17363 #include <sys/poll.h>
17364 #endif
17365 int main() {
17366         struct pollfd myfds;
17367         int ret;
17368
17369         /* check for Darwin bug with respect to "devices" */
17370         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17371         if (myfds.fd < 0)
17372                 myfds.fd = 0;
17373         myfds.events = POLLIN;
17374         myfds.revents = 0;
17375
17376         ret = poll(&myfds, 1, 100);
17377
17378         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17379                 ret = -1;
17380         } else {
17381                 int fd = 0;
17382                 if (!isatty(fd)) {
17383                         fd = open("/dev/tty", 2);       /* O_RDWR */
17384                 }
17385
17386                 if (fd >= 0) {
17387                         /* also check with standard input */
17388                         myfds.fd = fd;
17389                         myfds.events = POLLIN;
17390                         myfds.revents = 0;
17391                         ret = poll(&myfds, 1, 100);
17392                 } else {
17393                         ret = -1;
17394                 }
17395         }
17396         ${cf_cv_main_return:-return}(ret < 0);
17397 }
17398 _ACEOF
17399 rm -f conftest$ac_exeext
17400 if { (eval echo "$as_me:17400: \"$ac_link\"") >&5
17401   (eval $ac_link) 2>&5
17402   ac_status=$?
17403   echo "$as_me:17403: \$? = $ac_status" >&5
17404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17405   { (eval echo "$as_me:17405: \"$ac_try\"") >&5
17406   (eval $ac_try) 2>&5
17407   ac_status=$?
17408   echo "$as_me:17408: \$? = $ac_status" >&5
17409   (exit $ac_status); }; }; then
17410   cf_cv_working_poll=yes
17411 else
17412   echo "$as_me: program exited with status $ac_status" >&5
17413 echo "$as_me: failed program was:" >&5
17414 cat conftest.$ac_ext >&5
17415 cf_cv_working_poll=no
17416 fi
17417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17418 fi
17419 fi
17420 echo "$as_me:17420: result: $cf_cv_working_poll" >&5
17421 echo "${ECHO_T}$cf_cv_working_poll" >&6
17422 test "$cf_cv_working_poll" = "yes" &&
17423 cat >>confdefs.h <<\EOF
17424 #define HAVE_WORKING_POLL 1
17425 EOF
17426
17427 echo "$as_me:17427: checking for va_copy" >&5
17428 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17429 if test "${cf_cv_have_va_copy+set}" = set; then
17430   echo $ECHO_N "(cached) $ECHO_C" >&6
17431 else
17432
17433 cat >conftest.$ac_ext <<_ACEOF
17434 #line 17434 "configure"
17435 #include "confdefs.h"
17436
17437 #include <stdarg.h>
17438
17439 int
17440 main ()
17441 {
17442
17443         static va_list dst;
17444         static va_list src;
17445         va_copy(dst, src)
17446   ;
17447   return 0;
17448 }
17449 _ACEOF
17450 rm -f conftest.$ac_objext conftest$ac_exeext
17451 if { (eval echo "$as_me:17451: \"$ac_link\"") >&5
17452   (eval $ac_link) 2>&5
17453   ac_status=$?
17454   echo "$as_me:17454: \$? = $ac_status" >&5
17455   (exit $ac_status); } &&
17456          { ac_try='test -s conftest$ac_exeext'
17457   { (eval echo "$as_me:17457: \"$ac_try\"") >&5
17458   (eval $ac_try) 2>&5
17459   ac_status=$?
17460   echo "$as_me:17460: \$? = $ac_status" >&5
17461   (exit $ac_status); }; }; then
17462   cf_cv_have_va_copy=yes
17463 else
17464   echo "$as_me: failed program was:" >&5
17465 cat conftest.$ac_ext >&5
17466 cf_cv_have_va_copy=no
17467 fi
17468 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17469 fi
17470 echo "$as_me:17470: result: $cf_cv_have_va_copy" >&5
17471 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17472
17473 test "$cf_cv_have_va_copy" = yes &&
17474 cat >>confdefs.h <<\EOF
17475 #define HAVE_VA_COPY 1
17476 EOF
17477
17478 echo "$as_me:17478: checking for __va_copy" >&5
17479 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17480 if test "${cf_cv_have___va_copy+set}" = set; then
17481   echo $ECHO_N "(cached) $ECHO_C" >&6
17482 else
17483
17484 cat >conftest.$ac_ext <<_ACEOF
17485 #line 17485 "configure"
17486 #include "confdefs.h"
17487
17488 #include <stdarg.h>
17489
17490 int
17491 main ()
17492 {
17493
17494         static va_list dst;
17495         static va_list src;
17496         __va_copy(dst, src)
17497   ;
17498   return 0;
17499 }
17500 _ACEOF
17501 rm -f conftest.$ac_objext conftest$ac_exeext
17502 if { (eval echo "$as_me:17502: \"$ac_link\"") >&5
17503   (eval $ac_link) 2>&5
17504   ac_status=$?
17505   echo "$as_me:17505: \$? = $ac_status" >&5
17506   (exit $ac_status); } &&
17507          { ac_try='test -s conftest$ac_exeext'
17508   { (eval echo "$as_me:17508: \"$ac_try\"") >&5
17509   (eval $ac_try) 2>&5
17510   ac_status=$?
17511   echo "$as_me:17511: \$? = $ac_status" >&5
17512   (exit $ac_status); }; }; then
17513   cf_cv_have___va_copy=yes
17514 else
17515   echo "$as_me: failed program was:" >&5
17516 cat conftest.$ac_ext >&5
17517 cf_cv_have___va_copy=no
17518 fi
17519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17520 fi
17521 echo "$as_me:17521: result: $cf_cv_have___va_copy" >&5
17522 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17523
17524 test "$cf_cv_have___va_copy" = yes &&
17525 cat >>confdefs.h <<\EOF
17526 #define HAVE___VA_COPY 1
17527 EOF
17528
17529 echo "$as_me:17529: checking for pid_t" >&5
17530 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17531 if test "${ac_cv_type_pid_t+set}" = set; then
17532   echo $ECHO_N "(cached) $ECHO_C" >&6
17533 else
17534   cat >conftest.$ac_ext <<_ACEOF
17535 #line 17535 "configure"
17536 #include "confdefs.h"
17537 $ac_includes_default
17538 int
17539 main ()
17540 {
17541 if ((pid_t *) 0)
17542   return 0;
17543 if (sizeof (pid_t))
17544   return 0;
17545   ;
17546   return 0;
17547 }
17548 _ACEOF
17549 rm -f conftest.$ac_objext
17550 if { (eval echo "$as_me:17550: \"$ac_compile\"") >&5
17551   (eval $ac_compile) 2>&5
17552   ac_status=$?
17553   echo "$as_me:17553: \$? = $ac_status" >&5
17554   (exit $ac_status); } &&
17555          { ac_try='test -s conftest.$ac_objext'
17556   { (eval echo "$as_me:17556: \"$ac_try\"") >&5
17557   (eval $ac_try) 2>&5
17558   ac_status=$?
17559   echo "$as_me:17559: \$? = $ac_status" >&5
17560   (exit $ac_status); }; }; then
17561   ac_cv_type_pid_t=yes
17562 else
17563   echo "$as_me: failed program was:" >&5
17564 cat conftest.$ac_ext >&5
17565 ac_cv_type_pid_t=no
17566 fi
17567 rm -f conftest.$ac_objext conftest.$ac_ext
17568 fi
17569 echo "$as_me:17569: result: $ac_cv_type_pid_t" >&5
17570 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17571 if test $ac_cv_type_pid_t = yes; then
17572   :
17573 else
17574
17575 cat >>confdefs.h <<EOF
17576 #define pid_t int
17577 EOF
17578
17579 fi
17580
17581 for ac_header in unistd.h vfork.h
17582 do
17583 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17584 echo "$as_me:17584: checking for $ac_header" >&5
17585 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17586 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17587   echo $ECHO_N "(cached) $ECHO_C" >&6
17588 else
17589   cat >conftest.$ac_ext <<_ACEOF
17590 #line 17590 "configure"
17591 #include "confdefs.h"
17592 #include <$ac_header>
17593 _ACEOF
17594 if { (eval echo "$as_me:17594: \"$ac_cpp conftest.$ac_ext\"") >&5
17595   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17596   ac_status=$?
17597   egrep -v '^ *\+' conftest.er1 >conftest.err
17598   rm -f conftest.er1
17599   cat conftest.err >&5
17600   echo "$as_me:17600: \$? = $ac_status" >&5
17601   (exit $ac_status); } >/dev/null; then
17602   if test -s conftest.err; then
17603     ac_cpp_err=$ac_c_preproc_warn_flag
17604   else
17605     ac_cpp_err=
17606   fi
17607 else
17608   ac_cpp_err=yes
17609 fi
17610 if test -z "$ac_cpp_err"; then
17611   eval "$as_ac_Header=yes"
17612 else
17613   echo "$as_me: failed program was:" >&5
17614   cat conftest.$ac_ext >&5
17615   eval "$as_ac_Header=no"
17616 fi
17617 rm -f conftest.err conftest.$ac_ext
17618 fi
17619 echo "$as_me:17619: result: `eval echo '${'$as_ac_Header'}'`" >&5
17620 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17621 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17622   cat >>confdefs.h <<EOF
17623 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17624 EOF
17625
17626 fi
17627 done
17628
17629 for ac_func in fork vfork
17630 do
17631 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17632 echo "$as_me:17632: checking for $ac_func" >&5
17633 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17634 if eval "test \"\${$as_ac_var+set}\" = set"; then
17635   echo $ECHO_N "(cached) $ECHO_C" >&6
17636 else
17637   cat >conftest.$ac_ext <<_ACEOF
17638 #line 17638 "configure"
17639 #include "confdefs.h"
17640 /* System header to define __stub macros and hopefully few prototypes,
17641     which can conflict with char $ac_func (); below.  */
17642 #include <assert.h>
17643 /* Override any gcc2 internal prototype to avoid an error.  */
17644 #ifdef __cplusplus
17645 extern "C"
17646 #endif
17647 /* We use char because int might match the return type of a gcc2
17648    builtin and then its argument prototype would still apply.  */
17649 char $ac_func ();
17650 char (*f) ();
17651
17652 int
17653 main ()
17654 {
17655 /* The GNU C library defines this for functions which it implements
17656     to always fail with ENOSYS.  Some functions are actually named
17657     something starting with __ and the normal name is an alias.  */
17658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17659 choke me
17660 #else
17661 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17662 #endif
17663
17664   ;
17665   return 0;
17666 }
17667 _ACEOF
17668 rm -f conftest.$ac_objext conftest$ac_exeext
17669 if { (eval echo "$as_me:17669: \"$ac_link\"") >&5
17670   (eval $ac_link) 2>&5
17671   ac_status=$?
17672   echo "$as_me:17672: \$? = $ac_status" >&5
17673   (exit $ac_status); } &&
17674          { ac_try='test -s conftest$ac_exeext'
17675   { (eval echo "$as_me:17675: \"$ac_try\"") >&5
17676   (eval $ac_try) 2>&5
17677   ac_status=$?
17678   echo "$as_me:17678: \$? = $ac_status" >&5
17679   (exit $ac_status); }; }; then
17680   eval "$as_ac_var=yes"
17681 else
17682   echo "$as_me: failed program was:" >&5
17683 cat conftest.$ac_ext >&5
17684 eval "$as_ac_var=no"
17685 fi
17686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17687 fi
17688 echo "$as_me:17688: result: `eval echo '${'$as_ac_var'}'`" >&5
17689 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17690 if test `eval echo '${'$as_ac_var'}'` = yes; then
17691   cat >>confdefs.h <<EOF
17692 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17693 EOF
17694
17695 fi
17696 done
17697
17698 ac_cv_func_fork_works=$ac_cv_func_fork
17699 if test "x$ac_cv_func_fork" = xyes; then
17700   echo "$as_me:17700: checking for working fork" >&5
17701 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17702 if test "${ac_cv_func_fork_works+set}" = set; then
17703   echo $ECHO_N "(cached) $ECHO_C" >&6
17704 else
17705   if test "$cross_compiling" = yes; then
17706   ac_cv_func_fork_works=cross
17707 else
17708   cat >conftest.$ac_ext <<_ACEOF
17709 /* By Rüdiger Kuhlmann. */
17710       #include <sys/types.h>
17711       #if HAVE_UNISTD_H
17712       # include <unistd.h>
17713       #endif
17714       /* Some systems only have a dummy stub for fork() */
17715       int main ()
17716       {
17717         if (fork() < 0)
17718           $ac_main_return (1);
17719         $ac_main_return (0);
17720       }
17721 _ACEOF
17722 rm -f conftest$ac_exeext
17723 if { (eval echo "$as_me:17723: \"$ac_link\"") >&5
17724   (eval $ac_link) 2>&5
17725   ac_status=$?
17726   echo "$as_me:17726: \$? = $ac_status" >&5
17727   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17728   { (eval echo "$as_me:17728: \"$ac_try\"") >&5
17729   (eval $ac_try) 2>&5
17730   ac_status=$?
17731   echo "$as_me:17731: \$? = $ac_status" >&5
17732   (exit $ac_status); }; }; then
17733   ac_cv_func_fork_works=yes
17734 else
17735   echo "$as_me: program exited with status $ac_status" >&5
17736 echo "$as_me: failed program was:" >&5
17737 cat conftest.$ac_ext >&5
17738 ac_cv_func_fork_works=no
17739 fi
17740 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17741 fi
17742 fi
17743 echo "$as_me:17743: result: $ac_cv_func_fork_works" >&5
17744 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17745
17746 fi
17747 if test "x$ac_cv_func_fork_works" = xcross; then
17748   case $host in
17749     *-*-amigaos* | *-*-msdosdjgpp*)
17750       # Override, as these systems have only a dummy fork() stub
17751       ac_cv_func_fork_works=no
17752       ;;
17753     *)
17754       ac_cv_func_fork_works=yes
17755       ;;
17756   esac
17757   { echo "$as_me:17757: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17758 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17759 fi
17760 ac_cv_func_vfork_works=$ac_cv_func_vfork
17761 if test "x$ac_cv_func_vfork" = xyes; then
17762   echo "$as_me:17762: checking for working vfork" >&5
17763 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17764 if test "${ac_cv_func_vfork_works+set}" = set; then
17765   echo $ECHO_N "(cached) $ECHO_C" >&6
17766 else
17767   if test "$cross_compiling" = yes; then
17768   ac_cv_func_vfork_works=cross
17769 else
17770   cat >conftest.$ac_ext <<_ACEOF
17771 #line 17771 "configure"
17772 #include "confdefs.h"
17773 /* Thanks to Paul Eggert for this test.  */
17774 #include <stdio.h>
17775 #include <sys/types.h>
17776 #include <sys/stat.h>
17777 #if HAVE_UNISTD_H
17778 # include <unistd.h>
17779 #endif
17780 #if HAVE_VFORK_H
17781 # include <vfork.h>
17782 #endif
17783 /* On some sparc systems, changes by the child to local and incoming
17784    argument registers are propagated back to the parent.  The compiler
17785    is told about this with #include <vfork.h>, but some compilers
17786    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17787    static variable whose address is put into a register that is
17788    clobbered by the vfork.  */
17789 static
17790 #ifdef __cplusplus
17791 sparc_address_test (int arg)
17792 # else
17793 sparc_address_test (arg) int arg;
17794 #endif
17795 {
17796   static pid_t child;
17797   if (!child) {
17798     child = vfork ();
17799     if (child < 0) {
17800       perror ("vfork");
17801       _exit(2);
17802     }
17803     if (!child) {
17804       arg = getpid();
17805       write(-1, "", 0);
17806       _exit (arg);
17807     }
17808   }
17809 }
17810
17811 int
17812 main ()
17813 {
17814   pid_t parent = getpid ();
17815   pid_t child;
17816
17817   sparc_address_test ();
17818
17819   child = vfork ();
17820
17821   if (child == 0) {
17822     /* Here is another test for sparc vfork register problems.  This
17823        test uses lots of local variables, at least as many local
17824        variables as main has allocated so far including compiler
17825        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17826        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17827        reuse the register of parent for one of the local variables,
17828        since it will think that parent can't possibly be used any more
17829        in this routine.  Assigning to the local variable will thus
17830        munge parent in the parent process.  */
17831     pid_t
17832       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17833       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17834     /* Convince the compiler that p..p7 are live; otherwise, it might
17835        use the same hardware register for all 8 local variables.  */
17836     if (p != p1 || p != p2 || p != p3 || p != p4
17837         || p != p5 || p != p6 || p != p7)
17838       _exit(1);
17839
17840     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17841        from child file descriptors.  If the child closes a descriptor
17842        before it execs or exits, this munges the parent's descriptor
17843        as well.  Test for this by closing stdout in the child.  */
17844     _exit(close(fileno(stdout)) != 0);
17845   } else {
17846     int status;
17847     struct stat st;
17848
17849     while (wait(&status) != child)
17850       ;
17851     $ac_main_return(
17852          /* Was there some problem with vforking?  */
17853          child < 0
17854
17855          /* Did the child fail?  (This shouldn't happen.)  */
17856          || status
17857
17858          /* Did the vfork/compiler bug occur?  */
17859          || parent != getpid()
17860
17861          /* Did the file descriptor bug occur?  */
17862          || fstat(fileno(stdout), &st) != 0
17863          );
17864   }
17865 }
17866 _ACEOF
17867 rm -f conftest$ac_exeext
17868 if { (eval echo "$as_me:17868: \"$ac_link\"") >&5
17869   (eval $ac_link) 2>&5
17870   ac_status=$?
17871   echo "$as_me:17871: \$? = $ac_status" >&5
17872   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17873   { (eval echo "$as_me:17873: \"$ac_try\"") >&5
17874   (eval $ac_try) 2>&5
17875   ac_status=$?
17876   echo "$as_me:17876: \$? = $ac_status" >&5
17877   (exit $ac_status); }; }; then
17878   ac_cv_func_vfork_works=yes
17879 else
17880   echo "$as_me: program exited with status $ac_status" >&5
17881 echo "$as_me: failed program was:" >&5
17882 cat conftest.$ac_ext >&5
17883 ac_cv_func_vfork_works=no
17884 fi
17885 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17886 fi
17887 fi
17888 echo "$as_me:17888: result: $ac_cv_func_vfork_works" >&5
17889 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17890
17891 fi;
17892 if test "x$ac_cv_func_fork_works" = xcross; then
17893   ac_cv_func_vfork_works=ac_cv_func_vfork
17894   { echo "$as_me:17894: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17895 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17896 fi
17897
17898 if test "x$ac_cv_func_vfork_works" = xyes; then
17899
17900 cat >>confdefs.h <<\EOF
17901 #define HAVE_WORKING_VFORK 1
17902 EOF
17903
17904 else
17905
17906 cat >>confdefs.h <<\EOF
17907 #define vfork fork
17908 EOF
17909
17910 fi
17911 if test "x$ac_cv_func_fork_works" = xyes; then
17912
17913 cat >>confdefs.h <<\EOF
17914 #define HAVE_WORKING_FORK 1
17915 EOF
17916
17917 fi
17918
17919 # special check for test/ditto.c
17920
17921 echo "$as_me:17921: checking for openpty in -lutil" >&5
17922 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17923 if test "${ac_cv_lib_util_openpty+set}" = set; then
17924   echo $ECHO_N "(cached) $ECHO_C" >&6
17925 else
17926   ac_check_lib_save_LIBS=$LIBS
17927 LIBS="-lutil  $LIBS"
17928 cat >conftest.$ac_ext <<_ACEOF
17929 #line 17929 "configure"
17930 #include "confdefs.h"
17931
17932 /* Override any gcc2 internal prototype to avoid an error.  */
17933 #ifdef __cplusplus
17934 extern "C"
17935 #endif
17936 /* We use char because int might match the return type of a gcc2
17937    builtin and then its argument prototype would still apply.  */
17938 char openpty ();
17939 int
17940 main ()
17941 {
17942 openpty ();
17943   ;
17944   return 0;
17945 }
17946 _ACEOF
17947 rm -f conftest.$ac_objext conftest$ac_exeext
17948 if { (eval echo "$as_me:17948: \"$ac_link\"") >&5
17949   (eval $ac_link) 2>&5
17950   ac_status=$?
17951   echo "$as_me:17951: \$? = $ac_status" >&5
17952   (exit $ac_status); } &&
17953          { ac_try='test -s conftest$ac_exeext'
17954   { (eval echo "$as_me:17954: \"$ac_try\"") >&5
17955   (eval $ac_try) 2>&5
17956   ac_status=$?
17957   echo "$as_me:17957: \$? = $ac_status" >&5
17958   (exit $ac_status); }; }; then
17959   ac_cv_lib_util_openpty=yes
17960 else
17961   echo "$as_me: failed program was:" >&5
17962 cat conftest.$ac_ext >&5
17963 ac_cv_lib_util_openpty=no
17964 fi
17965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17966 LIBS=$ac_check_lib_save_LIBS
17967 fi
17968 echo "$as_me:17968: result: $ac_cv_lib_util_openpty" >&5
17969 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17970 if test $ac_cv_lib_util_openpty = yes; then
17971   cf_cv_lib_util=yes
17972 else
17973   cf_cv_lib_util=no
17974 fi
17975
17976 echo "$as_me:17976: checking for openpty header" >&5
17977 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17978 if test "${cf_cv_func_openpty+set}" = set; then
17979   echo $ECHO_N "(cached) $ECHO_C" >&6
17980 else
17981
17982     cf_save_LIBS="$LIBS"
17983     test $cf_cv_lib_util = yes &&
17984 cf_add_libs="-lutil"
17985 # Filter out duplicates - this happens with badly-designed ".pc" files...
17986 for cf_add_1lib in $LIBS
17987 do
17988         for cf_add_2lib in $cf_add_libs
17989         do
17990                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17991                 then
17992                         cf_add_1lib=
17993                         break
17994                 fi
17995         done
17996         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17997 done
17998 LIBS="$cf_add_libs"
17999
18000     for cf_header in pty.h libutil.h util.h
18001     do
18002     cat >conftest.$ac_ext <<_ACEOF
18003 #line 18003 "configure"
18004 #include "confdefs.h"
18005
18006 #include <$cf_header>
18007
18008 int
18009 main ()
18010 {
18011
18012     int x = openpty((int *)0, (int *)0, (char *)0,
18013                    (struct termios *)0, (struct winsize *)0);
18014
18015   ;
18016   return 0;
18017 }
18018 _ACEOF
18019 rm -f conftest.$ac_objext conftest$ac_exeext
18020 if { (eval echo "$as_me:18020: \"$ac_link\"") >&5
18021   (eval $ac_link) 2>&5
18022   ac_status=$?
18023   echo "$as_me:18023: \$? = $ac_status" >&5
18024   (exit $ac_status); } &&
18025          { ac_try='test -s conftest$ac_exeext'
18026   { (eval echo "$as_me:18026: \"$ac_try\"") >&5
18027   (eval $ac_try) 2>&5
18028   ac_status=$?
18029   echo "$as_me:18029: \$? = $ac_status" >&5
18030   (exit $ac_status); }; }; then
18031
18032         cf_cv_func_openpty=$cf_header
18033         break
18034
18035 else
18036   echo "$as_me: failed program was:" >&5
18037 cat conftest.$ac_ext >&5
18038
18039         cf_cv_func_openpty=no
18040
18041 fi
18042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18043     done
18044     LIBS="$cf_save_LIBS"
18045
18046 fi
18047 echo "$as_me:18047: result: $cf_cv_func_openpty" >&5
18048 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18049
18050 if test "$cf_cv_func_openpty" != no ; then
18051
18052 cat >>confdefs.h <<EOF
18053 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18054 EOF
18055
18056 cat >>confdefs.h <<\EOF
18057 #define USE_XTERM_PTY 1
18058 EOF
18059
18060     if test "x$cf_cv_lib_util" = xyes ; then
18061
18062 cf_add_libs="-lutil"
18063 # Filter out duplicates - this happens with badly-designed ".pc" files...
18064 for cf_add_1lib in $TEST_LIBS
18065 do
18066         for cf_add_2lib in $cf_add_libs
18067         do
18068                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18069                 then
18070                         cf_add_1lib=
18071                         break
18072                 fi
18073         done
18074         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18075 done
18076 TEST_LIBS="$cf_add_libs"
18077
18078     fi
18079 fi
18080
18081 if test "$with_hashed_db" != no ; then
18082
18083 cat >>confdefs.h <<\EOF
18084 #define USE_HASHED_DB 1
18085 EOF
18086
18087 case $with_hashed_db in #(vi
18088 yes|*able*) #(vi
18089     ;;
18090 *)
18091     if test -d "$with_hashed_db" ; then
18092
18093 if test -n "$with_hashed_db/include" ; then
18094   for cf_add_incdir in $with_hashed_db/include
18095   do
18096         while test $cf_add_incdir != /usr/include
18097         do
18098           if test -d $cf_add_incdir
18099           then
18100                 cf_have_incdir=no
18101                 if test -n "$CFLAGS$CPPFLAGS" ; then
18102                   # a loop is needed to ensure we can add subdirs of existing dirs
18103                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18104                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18105                           cf_have_incdir=yes; break
18106                         fi
18107                   done
18108                 fi
18109
18110                 if test "$cf_have_incdir" = no ; then
18111                   if test "$cf_add_incdir" = /usr/local/include ; then
18112                         if test "$GCC" = yes
18113                         then
18114                           cf_save_CPPFLAGS=$CPPFLAGS
18115                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18116                           cat >conftest.$ac_ext <<_ACEOF
18117 #line 18117 "configure"
18118 #include "confdefs.h"
18119 #include <stdio.h>
18120 int
18121 main ()
18122 {
18123 printf("Hello")
18124   ;
18125   return 0;
18126 }
18127 _ACEOF
18128 rm -f conftest.$ac_objext
18129 if { (eval echo "$as_me:18129: \"$ac_compile\"") >&5
18130   (eval $ac_compile) 2>&5
18131   ac_status=$?
18132   echo "$as_me:18132: \$? = $ac_status" >&5
18133   (exit $ac_status); } &&
18134          { ac_try='test -s conftest.$ac_objext'
18135   { (eval echo "$as_me:18135: \"$ac_try\"") >&5
18136   (eval $ac_try) 2>&5
18137   ac_status=$?
18138   echo "$as_me:18138: \$? = $ac_status" >&5
18139   (exit $ac_status); }; }; then
18140   :
18141 else
18142   echo "$as_me: failed program was:" >&5
18143 cat conftest.$ac_ext >&5
18144 cf_have_incdir=yes
18145 fi
18146 rm -f conftest.$ac_objext conftest.$ac_ext
18147                           CPPFLAGS=$cf_save_CPPFLAGS
18148                         fi
18149                   fi
18150                 fi
18151
18152                 if test "$cf_have_incdir" = no ; then
18153                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18154
18155 echo "${as_me:-configure}:18155: testing adding $cf_add_incdir to include-path ..." 1>&5
18156
18157                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18158
18159                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18160                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18161                   cf_add_incdir="$cf_top_incdir"
18162                 else
18163                   break
18164                 fi
18165           fi
18166         done
18167   done
18168 fi
18169
18170 if test -n "$with_hashed_db/lib" ; then
18171   for cf_add_libdir in $with_hashed_db/lib
18172   do
18173     if test $cf_add_libdir = /usr/lib ; then
18174       :
18175     elif test -d $cf_add_libdir
18176     then
18177       cf_have_libdir=no
18178       if test -n "$LDFLAGS$LIBS" ; then
18179         # a loop is needed to ensure we can add subdirs of existing dirs
18180         for cf_test_libdir in $LDFLAGS $LIBS ; do
18181           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18182             cf_have_libdir=yes; break
18183           fi
18184         done
18185       fi
18186       if test "$cf_have_libdir" = no ; then
18187         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18188
18189 echo "${as_me:-configure}:18189: testing adding $cf_add_libdir to library-path ..." 1>&5
18190
18191         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18192       fi
18193     fi
18194   done
18195 fi
18196
18197         else
18198                 case "$with_hashed_db" in #(vi
18199                 ./*|../*|/*)
18200                         { echo "$as_me:18200: WARNING: no such directory $with_hashed_db" >&5
18201 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18202                         ;; #(vi
18203                 *)
18204
18205 cf_search=
18206
18207 test "x/usr" != "x$prefix" && \
18208 test -d "/usr" && \
18209 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18210         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
18211         test -d /usr/include &&          cf_search="$cf_search /usr/include"
18212         test -d /usr/include/$with_hashed_db &&       cf_search="$cf_search /usr/include/$with_hashed_db"
18213         test -d /usr/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/include/$with_hashed_db/include"
18214         test -d /usr/$with_hashed_db/include &&       cf_search="$cf_search /usr/$with_hashed_db/include"
18215         test -d /usr/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/include/$with_hashed_db"
18216 }
18217
18218 test "x$prefix" != "xNONE" && \
18219 test -d "$prefix" && \
18220  {
18221         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18222         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18223         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18224         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18225         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18226         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18227 }
18228
18229 test "x/usr/local" != "x$prefix" && \
18230 test -d "/usr/local" && \
18231 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18232         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
18233         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
18234         test -d /usr/local/include/$with_hashed_db &&       cf_search="$cf_search /usr/local/include/$with_hashed_db"
18235         test -d /usr/local/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/local/include/$with_hashed_db/include"
18236         test -d /usr/local/$with_hashed_db/include &&       cf_search="$cf_search /usr/local/$with_hashed_db/include"
18237         test -d /usr/local/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/include/$with_hashed_db"
18238 }
18239
18240 test "x/opt" != "x$prefix" && \
18241 test -d "/opt" && \
18242 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18243         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
18244         test -d /opt/include &&          cf_search="$cf_search /opt/include"
18245         test -d /opt/include/$with_hashed_db &&       cf_search="$cf_search /opt/include/$with_hashed_db"
18246         test -d /opt/include/$with_hashed_db/include &&    cf_search="$cf_search /opt/include/$with_hashed_db/include"
18247         test -d /opt/$with_hashed_db/include &&       cf_search="$cf_search /opt/$with_hashed_db/include"
18248         test -d /opt/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/include/$with_hashed_db"
18249 }
18250
18251 test "x$HOME" != "x$prefix" && \
18252 test -d "$HOME" && \
18253 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18254         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
18255         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
18256         test -d $HOME/include/$with_hashed_db &&       cf_search="$cf_search $HOME/include/$with_hashed_db"
18257         test -d $HOME/include/$with_hashed_db/include &&    cf_search="$cf_search $HOME/include/$with_hashed_db/include"
18258         test -d $HOME/$with_hashed_db/include &&       cf_search="$cf_search $HOME/$with_hashed_db/include"
18259         test -d $HOME/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/include/$with_hashed_db"
18260 }
18261
18262         for cf_item in $cf_search
18263         do
18264                 case $cf_item in #(vi
18265                 */$with_hashed_db)
18266
18267 if test -n "$cf_item" ; then
18268   for cf_add_incdir in $cf_item
18269   do
18270         while test $cf_add_incdir != /usr/include
18271         do
18272           if test -d $cf_add_incdir
18273           then
18274                 cf_have_incdir=no
18275                 if test -n "$CFLAGS$CPPFLAGS" ; then
18276                   # a loop is needed to ensure we can add subdirs of existing dirs
18277                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18278                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18279                           cf_have_incdir=yes; break
18280                         fi
18281                   done
18282                 fi
18283
18284                 if test "$cf_have_incdir" = no ; then
18285                   if test "$cf_add_incdir" = /usr/local/include ; then
18286                         if test "$GCC" = yes
18287                         then
18288                           cf_save_CPPFLAGS=$CPPFLAGS
18289                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18290                           cat >conftest.$ac_ext <<_ACEOF
18291 #line 18291 "configure"
18292 #include "confdefs.h"
18293 #include <stdio.h>
18294 int
18295 main ()
18296 {
18297 printf("Hello")
18298   ;
18299   return 0;
18300 }
18301 _ACEOF
18302 rm -f conftest.$ac_objext
18303 if { (eval echo "$as_me:18303: \"$ac_compile\"") >&5
18304   (eval $ac_compile) 2>&5
18305   ac_status=$?
18306   echo "$as_me:18306: \$? = $ac_status" >&5
18307   (exit $ac_status); } &&
18308          { ac_try='test -s conftest.$ac_objext'
18309   { (eval echo "$as_me:18309: \"$ac_try\"") >&5
18310   (eval $ac_try) 2>&5
18311   ac_status=$?
18312   echo "$as_me:18312: \$? = $ac_status" >&5
18313   (exit $ac_status); }; }; then
18314   :
18315 else
18316   echo "$as_me: failed program was:" >&5
18317 cat conftest.$ac_ext >&5
18318 cf_have_incdir=yes
18319 fi
18320 rm -f conftest.$ac_objext conftest.$ac_ext
18321                           CPPFLAGS=$cf_save_CPPFLAGS
18322                         fi
18323                   fi
18324                 fi
18325
18326                 if test "$cf_have_incdir" = no ; then
18327                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18328
18329 echo "${as_me:-configure}:18329: testing adding $cf_add_incdir to include-path ..." 1>&5
18330
18331                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18332
18333                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18334                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18335                   cf_add_incdir="$cf_top_incdir"
18336                 else
18337                   break
18338                 fi
18339           fi
18340         done
18341   done
18342 fi
18343
18344                         ;;
18345                 esac
18346         done
18347
18348 cf_search=
18349
18350 test "x/usr" != "x$prefix" && \
18351 test -d "/usr" && \
18352 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18353         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
18354         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
18355         test -d /usr/lib/$with_hashed_db &&       cf_search="$cf_search /usr/lib/$with_hashed_db"
18356         test -d /usr/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/lib/$with_hashed_db/lib"
18357         test -d /usr/$with_hashed_db/lib &&       cf_search="$cf_search /usr/$with_hashed_db/lib"
18358         test -d /usr/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/lib/$with_hashed_db"
18359 }
18360
18361 test "x$prefix" != "xNONE" && \
18362 test -d "$prefix" && \
18363  {
18364         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18365         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18366         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18367         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18368         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18369         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18370 }
18371
18372 test "x/usr/local" != "x$prefix" && \
18373 test -d "/usr/local" && \
18374 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18375         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
18376         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
18377         test -d /usr/local/lib/$with_hashed_db &&       cf_search="$cf_search /usr/local/lib/$with_hashed_db"
18378         test -d /usr/local/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/local/lib/$with_hashed_db/lib"
18379         test -d /usr/local/$with_hashed_db/lib &&       cf_search="$cf_search /usr/local/$with_hashed_db/lib"
18380         test -d /usr/local/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/lib/$with_hashed_db"
18381 }
18382
18383 test "x/opt" != "x$prefix" && \
18384 test -d "/opt" && \
18385 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18386         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
18387         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
18388         test -d /opt/lib/$with_hashed_db &&       cf_search="$cf_search /opt/lib/$with_hashed_db"
18389         test -d /opt/lib/$with_hashed_db/lib &&    cf_search="$cf_search /opt/lib/$with_hashed_db/lib"
18390         test -d /opt/$with_hashed_db/lib &&       cf_search="$cf_search /opt/$with_hashed_db/lib"
18391         test -d /opt/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/lib/$with_hashed_db"
18392 }
18393
18394 test "x$HOME" != "x$prefix" && \
18395 test -d "$HOME" && \
18396 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18397         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
18398         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
18399         test -d $HOME/lib/$with_hashed_db &&       cf_search="$cf_search $HOME/lib/$with_hashed_db"
18400         test -d $HOME/lib/$with_hashed_db/lib &&    cf_search="$cf_search $HOME/lib/$with_hashed_db/lib"
18401         test -d $HOME/$with_hashed_db/lib &&       cf_search="$cf_search $HOME/$with_hashed_db/lib"
18402         test -d $HOME/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/lib/$with_hashed_db"
18403 }
18404
18405         for cf_item in $cf_search
18406         do
18407                 case $cf_item in #(vi
18408                 */$with_hashed_db)
18409
18410 if test -n "$cf_item" ; then
18411   for cf_add_libdir in $cf_item
18412   do
18413     if test $cf_add_libdir = /usr/lib ; then
18414       :
18415     elif test -d $cf_add_libdir
18416     then
18417       cf_have_libdir=no
18418       if test -n "$LDFLAGS$LIBS" ; then
18419         # a loop is needed to ensure we can add subdirs of existing dirs
18420         for cf_test_libdir in $LDFLAGS $LIBS ; do
18421           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18422             cf_have_libdir=yes; break
18423           fi
18424         done
18425       fi
18426       if test "$cf_have_libdir" = no ; then
18427         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18428
18429 echo "${as_me:-configure}:18429: testing adding $cf_add_libdir to library-path ..." 1>&5
18430
18431         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18432       fi
18433     fi
18434   done
18435 fi
18436
18437                         ;;
18438                 esac
18439         done
18440
18441                         ;;
18442                 esac
18443     fi
18444 esac
18445
18446 echo "$as_me:18446: checking for db.h" >&5
18447 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18448 if test "${ac_cv_header_db_h+set}" = set; then
18449   echo $ECHO_N "(cached) $ECHO_C" >&6
18450 else
18451   cat >conftest.$ac_ext <<_ACEOF
18452 #line 18452 "configure"
18453 #include "confdefs.h"
18454 #include <db.h>
18455 _ACEOF
18456 if { (eval echo "$as_me:18456: \"$ac_cpp conftest.$ac_ext\"") >&5
18457   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18458   ac_status=$?
18459   egrep -v '^ *\+' conftest.er1 >conftest.err
18460   rm -f conftest.er1
18461   cat conftest.err >&5
18462   echo "$as_me:18462: \$? = $ac_status" >&5
18463   (exit $ac_status); } >/dev/null; then
18464   if test -s conftest.err; then
18465     ac_cpp_err=$ac_c_preproc_warn_flag
18466   else
18467     ac_cpp_err=
18468   fi
18469 else
18470   ac_cpp_err=yes
18471 fi
18472 if test -z "$ac_cpp_err"; then
18473   ac_cv_header_db_h=yes
18474 else
18475   echo "$as_me: failed program was:" >&5
18476   cat conftest.$ac_ext >&5
18477   ac_cv_header_db_h=no
18478 fi
18479 rm -f conftest.err conftest.$ac_ext
18480 fi
18481 echo "$as_me:18481: result: $ac_cv_header_db_h" >&5
18482 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18483 if test $ac_cv_header_db_h = yes; then
18484
18485 echo "$as_me:18485: checking for version of db" >&5
18486 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18487 if test "${cf_cv_hashed_db_version+set}" = set; then
18488   echo $ECHO_N "(cached) $ECHO_C" >&6
18489 else
18490
18491 cf_cv_hashed_db_version=unknown
18492
18493 for cf_db_version in 1 2 3 4 5 6
18494 do
18495
18496 echo "${as_me:-configure}:18496: testing checking for db version $cf_db_version ..." 1>&5
18497
18498         cat >conftest.$ac_ext <<_ACEOF
18499 #line 18499 "configure"
18500 #include "confdefs.h"
18501
18502 $ac_includes_default
18503 #include <db.h>
18504
18505 #ifdef DB_VERSION_MAJOR
18506         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18507 #if $cf_db_version == DB_VERSION_MAJOR
18508         /* ok */
18509 #else
18510         make an error
18511 #endif
18512 #else
18513 #if $cf_db_version == 1
18514         /* ok: assuming this is DB 1.8.5 */
18515 #else
18516         make an error
18517 #endif
18518 #endif
18519
18520 int
18521 main ()
18522 {
18523 DBT *foo = 0
18524   ;
18525   return 0;
18526 }
18527 _ACEOF
18528 rm -f conftest.$ac_objext
18529 if { (eval echo "$as_me:18529: \"$ac_compile\"") >&5
18530   (eval $ac_compile) 2>&5
18531   ac_status=$?
18532   echo "$as_me:18532: \$? = $ac_status" >&5
18533   (exit $ac_status); } &&
18534          { ac_try='test -s conftest.$ac_objext'
18535   { (eval echo "$as_me:18535: \"$ac_try\"") >&5
18536   (eval $ac_try) 2>&5
18537   ac_status=$?
18538   echo "$as_me:18538: \$? = $ac_status" >&5
18539   (exit $ac_status); }; }; then
18540
18541         cf_cv_hashed_db_version=$cf_db_version
18542         break
18543
18544 else
18545   echo "$as_me: failed program was:" >&5
18546 cat conftest.$ac_ext >&5
18547 fi
18548 rm -f conftest.$ac_objext conftest.$ac_ext
18549 done
18550
18551 fi
18552 echo "$as_me:18552: result: $cf_cv_hashed_db_version" >&5
18553 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18554
18555 if test "$cf_cv_hashed_db_version" = unknown ; then
18556         { { echo "$as_me:18556: error: Cannot determine version of db" >&5
18557 echo "$as_me: error: Cannot determine version of db" >&2;}
18558    { (exit 1); exit 1; }; }
18559 else
18560
18561 echo "$as_me:18561: checking for db libraries" >&5
18562 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18563 if test "${cf_cv_hashed_db_libs+set}" = set; then
18564   echo $ECHO_N "(cached) $ECHO_C" >&6
18565 else
18566
18567 cf_cv_hashed_db_libs=unknown
18568 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18569 do
18570         cf_save_libs="$LIBS"
18571         if test -n "$cf_db_libs"; then
18572
18573 cf_add_libs="-l$cf_db_libs"
18574 # Filter out duplicates - this happens with badly-designed ".pc" files...
18575 for cf_add_1lib in $LIBS
18576 do
18577         for cf_add_2lib in $cf_add_libs
18578         do
18579                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18580                 then
18581                         cf_add_1lib=
18582                         break
18583                 fi
18584         done
18585         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18586 done
18587 LIBS="$cf_add_libs"
18588
18589         fi
18590
18591 echo "${as_me:-configure}:18591: testing checking for library "$cf_db_libs" ..." 1>&5
18592
18593         cat >conftest.$ac_ext <<_ACEOF
18594 #line 18594 "configure"
18595 #include "confdefs.h"
18596
18597 $ac_includes_default
18598 #include <db.h>
18599
18600 int
18601 main ()
18602 {
18603
18604         char *path = "/tmp/foo";
18605 #ifdef DB_VERSION_MAJOR
18606 #if DB_VERSION_MAJOR >= 4
18607         DB *result = 0;
18608         db_create(&result, NULL, 0);
18609         result->open(result,
18610                 NULL,
18611                 path,
18612                 path,
18613                 DB_HASH,
18614                 DB_CREATE,
18615                 0644);
18616 #elif DB_VERSION_MAJOR >= 3
18617         DB *result = 0;
18618         db_create(&result, NULL, 0);
18619         result->open(result,
18620                 path,
18621                 path,
18622                 DB_HASH,
18623                 DB_CREATE,
18624                 0644);
18625 #elif DB_VERSION_MAJOR >= 2
18626         DB *result = 0;
18627         db_open(path,
18628                 DB_HASH,
18629                 DB_CREATE,
18630                 0644,
18631                 (DB_ENV *) 0,
18632                 (DB_INFO *) 0,
18633                 &result);
18634 #endif /* DB_VERSION_MAJOR */
18635 #else
18636         DB *result = dbopen(path,
18637                      2,
18638                      0644,
18639                      DB_HASH,
18640                      0);
18641 #endif
18642         ${cf_cv_main_return:-return}(result != 0)
18643
18644   ;
18645   return 0;
18646 }
18647 _ACEOF
18648 rm -f conftest.$ac_objext conftest$ac_exeext
18649 if { (eval echo "$as_me:18649: \"$ac_link\"") >&5
18650   (eval $ac_link) 2>&5
18651   ac_status=$?
18652   echo "$as_me:18652: \$? = $ac_status" >&5
18653   (exit $ac_status); } &&
18654          { ac_try='test -s conftest$ac_exeext'
18655   { (eval echo "$as_me:18655: \"$ac_try\"") >&5
18656   (eval $ac_try) 2>&5
18657   ac_status=$?
18658   echo "$as_me:18658: \$? = $ac_status" >&5
18659   (exit $ac_status); }; }; then
18660
18661         if test -n "$cf_db_libs" ; then
18662                 cf_cv_hashed_db_libs=$cf_db_libs
18663         else
18664                 cf_cv_hashed_db_libs=default
18665         fi
18666         LIBS="$cf_save_libs"
18667         break
18668
18669 else
18670   echo "$as_me: failed program was:" >&5
18671 cat conftest.$ac_ext >&5
18672 fi
18673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18674         LIBS="$cf_save_libs"
18675 done
18676
18677 fi
18678 echo "$as_me:18678: result: $cf_cv_hashed_db_libs" >&5
18679 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18680
18681         if test "$cf_cv_hashed_db_libs" = unknown ; then
18682                 { { echo "$as_me:18682: error: Cannot determine library for db" >&5
18683 echo "$as_me: error: Cannot determine library for db" >&2;}
18684    { (exit 1); exit 1; }; }
18685         elif test "$cf_cv_hashed_db_libs" != default ; then
18686
18687 cf_add_libs="-l$cf_cv_hashed_db_libs"
18688 # Filter out duplicates - this happens with badly-designed ".pc" files...
18689 for cf_add_1lib in $LIBS
18690 do
18691         for cf_add_2lib in $cf_add_libs
18692         do
18693                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18694                 then
18695                         cf_add_1lib=
18696                         break
18697                 fi
18698         done
18699         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18700 done
18701 LIBS="$cf_add_libs"
18702
18703         fi
18704 fi
18705
18706 else
18707
18708         { { echo "$as_me:18708: error: Cannot find db.h" >&5
18709 echo "$as_me: error: Cannot find db.h" >&2;}
18710    { (exit 1); exit 1; }; }
18711
18712 fi
18713
18714 fi
18715
18716 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18717         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18718         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18719 fi
18720
18721 # Just in case, check if the C compiler has a bool type.
18722
18723 echo "$as_me:18723: checking if we should include stdbool.h" >&5
18724 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18725
18726 if test "${cf_cv_header_stdbool_h+set}" = set; then
18727   echo $ECHO_N "(cached) $ECHO_C" >&6
18728 else
18729
18730         cat >conftest.$ac_ext <<_ACEOF
18731 #line 18731 "configure"
18732 #include "confdefs.h"
18733
18734 int
18735 main ()
18736 {
18737 bool foo = false
18738   ;
18739   return 0;
18740 }
18741 _ACEOF
18742 rm -f conftest.$ac_objext
18743 if { (eval echo "$as_me:18743: \"$ac_compile\"") >&5
18744   (eval $ac_compile) 2>&5
18745   ac_status=$?
18746   echo "$as_me:18746: \$? = $ac_status" >&5
18747   (exit $ac_status); } &&
18748          { ac_try='test -s conftest.$ac_objext'
18749   { (eval echo "$as_me:18749: \"$ac_try\"") >&5
18750   (eval $ac_try) 2>&5
18751   ac_status=$?
18752   echo "$as_me:18752: \$? = $ac_status" >&5
18753   (exit $ac_status); }; }; then
18754   cf_cv_header_stdbool_h=0
18755 else
18756   echo "$as_me: failed program was:" >&5
18757 cat conftest.$ac_ext >&5
18758 cat >conftest.$ac_ext <<_ACEOF
18759 #line 18759 "configure"
18760 #include "confdefs.h"
18761
18762 #ifndef __BEOS__
18763 #include <stdbool.h>
18764 #endif
18765
18766 int
18767 main ()
18768 {
18769 bool foo = false
18770   ;
18771   return 0;
18772 }
18773 _ACEOF
18774 rm -f conftest.$ac_objext
18775 if { (eval echo "$as_me:18775: \"$ac_compile\"") >&5
18776   (eval $ac_compile) 2>&5
18777   ac_status=$?
18778   echo "$as_me:18778: \$? = $ac_status" >&5
18779   (exit $ac_status); } &&
18780          { ac_try='test -s conftest.$ac_objext'
18781   { (eval echo "$as_me:18781: \"$ac_try\"") >&5
18782   (eval $ac_try) 2>&5
18783   ac_status=$?
18784   echo "$as_me:18784: \$? = $ac_status" >&5
18785   (exit $ac_status); }; }; then
18786   cf_cv_header_stdbool_h=1
18787 else
18788   echo "$as_me: failed program was:" >&5
18789 cat conftest.$ac_ext >&5
18790 cf_cv_header_stdbool_h=0
18791 fi
18792 rm -f conftest.$ac_objext conftest.$ac_ext
18793 fi
18794 rm -f conftest.$ac_objext conftest.$ac_ext
18795 fi
18796
18797 if test "$cf_cv_header_stdbool_h" = 1
18798 then    echo "$as_me:18798: result: yes" >&5
18799 echo "${ECHO_T}yes" >&6
18800 else    echo "$as_me:18800: result: no" >&5
18801 echo "${ECHO_T}no" >&6
18802 fi
18803
18804 echo "$as_me:18804: checking for builtin bool type" >&5
18805 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18806
18807 if test "${cf_cv_cc_bool_type+set}" = set; then
18808   echo $ECHO_N "(cached) $ECHO_C" >&6
18809 else
18810
18811         cat >conftest.$ac_ext <<_ACEOF
18812 #line 18812 "configure"
18813 #include "confdefs.h"
18814
18815 #include <stdio.h>
18816 #include <sys/types.h>
18817
18818 int
18819 main ()
18820 {
18821 bool x = false
18822   ;
18823   return 0;
18824 }
18825 _ACEOF
18826 rm -f conftest.$ac_objext
18827 if { (eval echo "$as_me:18827: \"$ac_compile\"") >&5
18828   (eval $ac_compile) 2>&5
18829   ac_status=$?
18830   echo "$as_me:18830: \$? = $ac_status" >&5
18831   (exit $ac_status); } &&
18832          { ac_try='test -s conftest.$ac_objext'
18833   { (eval echo "$as_me:18833: \"$ac_try\"") >&5
18834   (eval $ac_try) 2>&5
18835   ac_status=$?
18836   echo "$as_me:18836: \$? = $ac_status" >&5
18837   (exit $ac_status); }; }; then
18838   cf_cv_cc_bool_type=1
18839 else
18840   echo "$as_me: failed program was:" >&5
18841 cat conftest.$ac_ext >&5
18842 cf_cv_cc_bool_type=0
18843 fi
18844 rm -f conftest.$ac_objext conftest.$ac_ext
18845
18846 fi
18847
18848 if test "$cf_cv_cc_bool_type" = 1
18849 then    echo "$as_me:18849: result: yes" >&5
18850 echo "${ECHO_T}yes" >&6
18851 else    echo "$as_me:18851: result: no" >&5
18852 echo "${ECHO_T}no" >&6
18853 fi
18854
18855 # Check for C++ compiler characteristics (and ensure that it's there!)
18856 if test -n "$CXX" ; then
18857         ac_ext=cc
18858 ac_cpp='$CXXCPP $CPPFLAGS'
18859 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18860 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18861 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18862 ac_main_return=return
18863
18864 if test -n "$GXX" ; then
18865 case $cf_cv_system_name in #(vi
18866 os2*) #(vi
18867         cf_stdcpp_libname=stdcpp
18868         ;;
18869 *)
18870         cf_stdcpp_libname=stdc++
18871         ;;
18872 esac
18873 echo "$as_me:18873: checking for library $cf_stdcpp_libname" >&5
18874 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18875 if test "${cf_cv_libstdcpp+set}" = set; then
18876   echo $ECHO_N "(cached) $ECHO_C" >&6
18877 else
18878
18879         cf_save="$LIBS"
18880
18881 cf_add_libs="-l$cf_stdcpp_libname"
18882 # Filter out duplicates - this happens with badly-designed ".pc" files...
18883 for cf_add_1lib in $LIBS
18884 do
18885         for cf_add_2lib in $cf_add_libs
18886         do
18887                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18888                 then
18889                         cf_add_1lib=
18890                         break
18891                 fi
18892         done
18893         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18894 done
18895 LIBS="$cf_add_libs"
18896
18897 cat >conftest.$ac_ext <<_ACEOF
18898 #line 18898 "configure"
18899 #include "confdefs.h"
18900
18901 #include <strstream.h>
18902 int
18903 main ()
18904 {
18905
18906 char buf[80];
18907 strstreambuf foo(buf, sizeof(buf))
18908
18909   ;
18910   return 0;
18911 }
18912 _ACEOF
18913 rm -f conftest.$ac_objext conftest$ac_exeext
18914 if { (eval echo "$as_me:18914: \"$ac_link\"") >&5
18915   (eval $ac_link) 2>&5
18916   ac_status=$?
18917   echo "$as_me:18917: \$? = $ac_status" >&5
18918   (exit $ac_status); } &&
18919          { ac_try='test -s conftest$ac_exeext'
18920   { (eval echo "$as_me:18920: \"$ac_try\"") >&5
18921   (eval $ac_try) 2>&5
18922   ac_status=$?
18923   echo "$as_me:18923: \$? = $ac_status" >&5
18924   (exit $ac_status); }; }; then
18925   cf_cv_libstdcpp=yes
18926 else
18927   echo "$as_me: failed program was:" >&5
18928 cat conftest.$ac_ext >&5
18929 cf_cv_libstdcpp=no
18930 fi
18931 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18932         LIBS="$cf_save"
18933
18934 fi
18935 echo "$as_me:18935: result: $cf_cv_libstdcpp" >&5
18936 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18937 test "$cf_cv_libstdcpp" = yes &&
18938 cf_add_libs="-l$cf_stdcpp_libname"
18939 # Filter out duplicates - this happens with badly-designed ".pc" files...
18940 for cf_add_1lib in $CXXLIBS
18941 do
18942         for cf_add_2lib in $cf_add_libs
18943         do
18944                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18945                 then
18946                         cf_add_1lib=
18947                         break
18948                 fi
18949         done
18950         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18951 done
18952 CXXLIBS="$cf_add_libs"
18953
18954 fi
18955
18956         echo "$as_me:18956: checking whether $CXX understands -c and -o together" >&5
18957 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18958 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18959   echo $ECHO_N "(cached) $ECHO_C" >&6
18960 else
18961
18962 cat > conftest.$ac_ext <<CF_EOF
18963 #include <stdio.h>
18964 int main()
18965 {
18966         ${cf_cv_main_return:-return}(0);
18967 }
18968 CF_EOF
18969 # We do the test twice because some compilers refuse to overwrite an
18970 # existing .o file with -o, though they will create one.
18971 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18972 if { (eval echo "$as_me:18972: \"$ac_try\"") >&5
18973   (eval $ac_try) 2>&5
18974   ac_status=$?
18975   echo "$as_me:18975: \$? = $ac_status" >&5
18976   (exit $ac_status); } &&
18977   test -f conftest2.$ac_objext && { (eval echo "$as_me:18977: \"$ac_try\"") >&5
18978   (eval $ac_try) 2>&5
18979   ac_status=$?
18980   echo "$as_me:18980: \$? = $ac_status" >&5
18981   (exit $ac_status); };
18982 then
18983   eval cf_cv_prog_CXX_c_o=yes
18984 else
18985   eval cf_cv_prog_CXX_c_o=no
18986 fi
18987 rm -rf conftest*
18988
18989 fi
18990 if test $cf_cv_prog_CXX_c_o = yes; then
18991   echo "$as_me:18991: result: yes" >&5
18992 echo "${ECHO_T}yes" >&6
18993 else
18994   echo "$as_me:18994: result: no" >&5
18995 echo "${ECHO_T}no" >&6
18996 fi
18997
18998         case $GXX_VERSION in
18999         1*|2.0-6*)
19000                 cf_cxx_library=yes
19001                 ;;
19002         *-2.7*|2.7*)
19003
19004 cf_cxx_library=unknown
19005 case $cf_cv_system_name in #(vi
19006 os2*) #(vi
19007         cf_gpp_libname=gpp
19008         ;;
19009 *)
19010         cf_gpp_libname=g++
19011         ;;
19012 esac
19013 if test "$GXX" = yes; then
19014         echo "$as_me:19014: checking for lib$cf_gpp_libname" >&5
19015 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19016         cf_save="$LIBS"
19017
19018 cf_add_libs="-l$cf_gpp_libname"
19019 # Filter out duplicates - this happens with badly-designed ".pc" files...
19020 for cf_add_1lib in $LIBS
19021 do
19022         for cf_add_2lib in $cf_add_libs
19023         do
19024                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19025                 then
19026                         cf_add_1lib=
19027                         break
19028                 fi
19029         done
19030         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19031 done
19032 LIBS="$cf_add_libs"
19033
19034         cat >conftest.$ac_ext <<_ACEOF
19035 #line 19035 "configure"
19036 #include "confdefs.h"
19037
19038 #include <$cf_gpp_libname/builtin.h>
19039
19040 int
19041 main ()
19042 {
19043 two_arg_error_handler_t foo2 = lib_error_handler
19044   ;
19045   return 0;
19046 }
19047 _ACEOF
19048 rm -f conftest.$ac_objext conftest$ac_exeext
19049 if { (eval echo "$as_me:19049: \"$ac_link\"") >&5
19050   (eval $ac_link) 2>&5
19051   ac_status=$?
19052   echo "$as_me:19052: \$? = $ac_status" >&5
19053   (exit $ac_status); } &&
19054          { ac_try='test -s conftest$ac_exeext'
19055   { (eval echo "$as_me:19055: \"$ac_try\"") >&5
19056   (eval $ac_try) 2>&5
19057   ac_status=$?
19058   echo "$as_me:19058: \$? = $ac_status" >&5
19059   (exit $ac_status); }; }; then
19060   cf_cxx_library=yes
19061
19062 cf_add_libs="-l$cf_gpp_libname"
19063 # Filter out duplicates - this happens with badly-designed ".pc" files...
19064 for cf_add_1lib in $CXXLIBS
19065 do
19066         for cf_add_2lib in $cf_add_libs
19067         do
19068                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19069                 then
19070                         cf_add_1lib=
19071                         break
19072                 fi
19073         done
19074         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19075 done
19076 CXXLIBS="$cf_add_libs"
19077
19078          if test "$cf_gpp_libname" = cpp ; then
19079
19080 cat >>confdefs.h <<\EOF
19081 #define HAVE_GPP_BUILTIN_H 1
19082 EOF
19083
19084          else
19085
19086 cat >>confdefs.h <<\EOF
19087 #define HAVE_GXX_BUILTIN_H 1
19088 EOF
19089
19090          fi
19091 else
19092   echo "$as_me: failed program was:" >&5
19093 cat conftest.$ac_ext >&5
19094 cat >conftest.$ac_ext <<_ACEOF
19095 #line 19095 "configure"
19096 #include "confdefs.h"
19097
19098 #include <builtin.h>
19099
19100 int
19101 main ()
19102 {
19103 two_arg_error_handler_t foo2 = lib_error_handler
19104   ;
19105   return 0;
19106 }
19107 _ACEOF
19108 rm -f conftest.$ac_objext conftest$ac_exeext
19109 if { (eval echo "$as_me:19109: \"$ac_link\"") >&5
19110   (eval $ac_link) 2>&5
19111   ac_status=$?
19112   echo "$as_me:19112: \$? = $ac_status" >&5
19113   (exit $ac_status); } &&
19114          { ac_try='test -s conftest$ac_exeext'
19115   { (eval echo "$as_me:19115: \"$ac_try\"") >&5
19116   (eval $ac_try) 2>&5
19117   ac_status=$?
19118   echo "$as_me:19118: \$? = $ac_status" >&5
19119   (exit $ac_status); }; }; then
19120   cf_cxx_library=yes
19121
19122 cf_add_libs="-l$cf_gpp_libname"
19123 # Filter out duplicates - this happens with badly-designed ".pc" files...
19124 for cf_add_1lib in $CXXLIBS
19125 do
19126         for cf_add_2lib in $cf_add_libs
19127         do
19128                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19129                 then
19130                         cf_add_1lib=
19131                         break
19132                 fi
19133         done
19134         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19135 done
19136 CXXLIBS="$cf_add_libs"
19137
19138 cat >>confdefs.h <<\EOF
19139 #define HAVE_BUILTIN_H 1
19140 EOF
19141
19142 else
19143   echo "$as_me: failed program was:" >&5
19144 cat conftest.$ac_ext >&5
19145 cf_cxx_library=no
19146 fi
19147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19148 fi
19149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19150         LIBS="$cf_save"
19151         echo "$as_me:19151: result: $cf_cxx_library" >&5
19152 echo "${ECHO_T}$cf_cxx_library" >&6
19153 fi
19154
19155                 ;;
19156         *)
19157                 cf_cxx_library=no
19158                 ;;
19159         esac
19160
19161         ac_ext=cc
19162 ac_cpp='$CXXCPP $CPPFLAGS'
19163 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19164 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19165 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19166 ac_main_return=return
19167 echo "$as_me:19167: checking how to run the C++ preprocessor" >&5
19168 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19169 if test -z "$CXXCPP"; then
19170   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19171   echo $ECHO_N "(cached) $ECHO_C" >&6
19172 else
19173       # Double quotes because CXXCPP needs to be expanded
19174     for CXXCPP in "$CXX -E" "/lib/cpp"
19175     do
19176       ac_preproc_ok=false
19177 for ac_cxx_preproc_warn_flag in '' yes
19178 do
19179   # Use a header file that comes with gcc, so configuring glibc
19180   # with a fresh cross-compiler works.
19181   # On the NeXT, cc -E runs the code through the compiler's parser,
19182   # not just through cpp. "Syntax error" is here to catch this case.
19183   cat >conftest.$ac_ext <<_ACEOF
19184 #line 19184 "configure"
19185 #include "confdefs.h"
19186 #include <assert.h>
19187                      Syntax error
19188 _ACEOF
19189 if { (eval echo "$as_me:19189: \"$ac_cpp conftest.$ac_ext\"") >&5
19190   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19191   ac_status=$?
19192   egrep -v '^ *\+' conftest.er1 >conftest.err
19193   rm -f conftest.er1
19194   cat conftest.err >&5
19195   echo "$as_me:19195: \$? = $ac_status" >&5
19196   (exit $ac_status); } >/dev/null; then
19197   if test -s conftest.err; then
19198     ac_cpp_err=$ac_cxx_preproc_warn_flag
19199   else
19200     ac_cpp_err=
19201   fi
19202 else
19203   ac_cpp_err=yes
19204 fi
19205 if test -z "$ac_cpp_err"; then
19206   :
19207 else
19208   echo "$as_me: failed program was:" >&5
19209   cat conftest.$ac_ext >&5
19210   # Broken: fails on valid input.
19211 continue
19212 fi
19213 rm -f conftest.err conftest.$ac_ext
19214
19215   # OK, works on sane cases.  Now check whether non-existent headers
19216   # can be detected and how.
19217   cat >conftest.$ac_ext <<_ACEOF
19218 #line 19218 "configure"
19219 #include "confdefs.h"
19220 #include <ac_nonexistent.h>
19221 _ACEOF
19222 if { (eval echo "$as_me:19222: \"$ac_cpp conftest.$ac_ext\"") >&5
19223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19224   ac_status=$?
19225   egrep -v '^ *\+' conftest.er1 >conftest.err
19226   rm -f conftest.er1
19227   cat conftest.err >&5
19228   echo "$as_me:19228: \$? = $ac_status" >&5
19229   (exit $ac_status); } >/dev/null; then
19230   if test -s conftest.err; then
19231     ac_cpp_err=$ac_cxx_preproc_warn_flag
19232   else
19233     ac_cpp_err=
19234   fi
19235 else
19236   ac_cpp_err=yes
19237 fi
19238 if test -z "$ac_cpp_err"; then
19239   # Broken: success on invalid input.
19240 continue
19241 else
19242   echo "$as_me: failed program was:" >&5
19243   cat conftest.$ac_ext >&5
19244   # Passes both tests.
19245 ac_preproc_ok=:
19246 break
19247 fi
19248 rm -f conftest.err conftest.$ac_ext
19249
19250 done
19251 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19252 rm -f conftest.err conftest.$ac_ext
19253 if $ac_preproc_ok; then
19254   break
19255 fi
19256
19257     done
19258     ac_cv_prog_CXXCPP=$CXXCPP
19259
19260 fi
19261   CXXCPP=$ac_cv_prog_CXXCPP
19262 else
19263   ac_cv_prog_CXXCPP=$CXXCPP
19264 fi
19265 echo "$as_me:19265: result: $CXXCPP" >&5
19266 echo "${ECHO_T}$CXXCPP" >&6
19267 ac_preproc_ok=false
19268 for ac_cxx_preproc_warn_flag in '' yes
19269 do
19270   # Use a header file that comes with gcc, so configuring glibc
19271   # with a fresh cross-compiler works.
19272   # On the NeXT, cc -E runs the code through the compiler's parser,
19273   # not just through cpp. "Syntax error" is here to catch this case.
19274   cat >conftest.$ac_ext <<_ACEOF
19275 #line 19275 "configure"
19276 #include "confdefs.h"
19277 #include <assert.h>
19278                      Syntax error
19279 _ACEOF
19280 if { (eval echo "$as_me:19280: \"$ac_cpp conftest.$ac_ext\"") >&5
19281   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19282   ac_status=$?
19283   egrep -v '^ *\+' conftest.er1 >conftest.err
19284   rm -f conftest.er1
19285   cat conftest.err >&5
19286   echo "$as_me:19286: \$? = $ac_status" >&5
19287   (exit $ac_status); } >/dev/null; then
19288   if test -s conftest.err; then
19289     ac_cpp_err=$ac_cxx_preproc_warn_flag
19290   else
19291     ac_cpp_err=
19292   fi
19293 else
19294   ac_cpp_err=yes
19295 fi
19296 if test -z "$ac_cpp_err"; then
19297   :
19298 else
19299   echo "$as_me: failed program was:" >&5
19300   cat conftest.$ac_ext >&5
19301   # Broken: fails on valid input.
19302 continue
19303 fi
19304 rm -f conftest.err conftest.$ac_ext
19305
19306   # OK, works on sane cases.  Now check whether non-existent headers
19307   # can be detected and how.
19308   cat >conftest.$ac_ext <<_ACEOF
19309 #line 19309 "configure"
19310 #include "confdefs.h"
19311 #include <ac_nonexistent.h>
19312 _ACEOF
19313 if { (eval echo "$as_me:19313: \"$ac_cpp conftest.$ac_ext\"") >&5
19314   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19315   ac_status=$?
19316   egrep -v '^ *\+' conftest.er1 >conftest.err
19317   rm -f conftest.er1
19318   cat conftest.err >&5
19319   echo "$as_me:19319: \$? = $ac_status" >&5
19320   (exit $ac_status); } >/dev/null; then
19321   if test -s conftest.err; then
19322     ac_cpp_err=$ac_cxx_preproc_warn_flag
19323   else
19324     ac_cpp_err=
19325   fi
19326 else
19327   ac_cpp_err=yes
19328 fi
19329 if test -z "$ac_cpp_err"; then
19330   # Broken: success on invalid input.
19331 continue
19332 else
19333   echo "$as_me: failed program was:" >&5
19334   cat conftest.$ac_ext >&5
19335   # Passes both tests.
19336 ac_preproc_ok=:
19337 break
19338 fi
19339 rm -f conftest.err conftest.$ac_ext
19340
19341 done
19342 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19343 rm -f conftest.err conftest.$ac_ext
19344 if $ac_preproc_ok; then
19345   :
19346 else
19347   { { echo "$as_me:19347: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19348 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19349    { (exit 1); exit 1; }; }
19350 fi
19351
19352 ac_ext=cc
19353 ac_cpp='$CXXCPP $CPPFLAGS'
19354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19355 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19357 ac_main_return=return
19358
19359 for ac_header in typeinfo
19360 do
19361 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19362 echo "$as_me:19362: checking for $ac_header" >&5
19363 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19364 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19365   echo $ECHO_N "(cached) $ECHO_C" >&6
19366 else
19367   cat >conftest.$ac_ext <<_ACEOF
19368 #line 19368 "configure"
19369 #include "confdefs.h"
19370 #include <$ac_header>
19371 _ACEOF
19372 if { (eval echo "$as_me:19372: \"$ac_cpp conftest.$ac_ext\"") >&5
19373   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19374   ac_status=$?
19375   egrep -v '^ *\+' conftest.er1 >conftest.err
19376   rm -f conftest.er1
19377   cat conftest.err >&5
19378   echo "$as_me:19378: \$? = $ac_status" >&5
19379   (exit $ac_status); } >/dev/null; then
19380   if test -s conftest.err; then
19381     ac_cpp_err=$ac_cxx_preproc_warn_flag
19382   else
19383     ac_cpp_err=
19384   fi
19385 else
19386   ac_cpp_err=yes
19387 fi
19388 if test -z "$ac_cpp_err"; then
19389   eval "$as_ac_Header=yes"
19390 else
19391   echo "$as_me: failed program was:" >&5
19392   cat conftest.$ac_ext >&5
19393   eval "$as_ac_Header=no"
19394 fi
19395 rm -f conftest.err conftest.$ac_ext
19396 fi
19397 echo "$as_me:19397: result: `eval echo '${'$as_ac_Header'}'`" >&5
19398 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19399 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19400   cat >>confdefs.h <<EOF
19401 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19402 EOF
19403
19404 fi
19405 done
19406
19407 for ac_header in iostream
19408 do
19409 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19410 echo "$as_me:19410: checking for $ac_header" >&5
19411 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19412 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19413   echo $ECHO_N "(cached) $ECHO_C" >&6
19414 else
19415   cat >conftest.$ac_ext <<_ACEOF
19416 #line 19416 "configure"
19417 #include "confdefs.h"
19418 #include <$ac_header>
19419 _ACEOF
19420 if { (eval echo "$as_me:19420: \"$ac_cpp conftest.$ac_ext\"") >&5
19421   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19422   ac_status=$?
19423   egrep -v '^ *\+' conftest.er1 >conftest.err
19424   rm -f conftest.er1
19425   cat conftest.err >&5
19426   echo "$as_me:19426: \$? = $ac_status" >&5
19427   (exit $ac_status); } >/dev/null; then
19428   if test -s conftest.err; then
19429     ac_cpp_err=$ac_cxx_preproc_warn_flag
19430   else
19431     ac_cpp_err=
19432   fi
19433 else
19434   ac_cpp_err=yes
19435 fi
19436 if test -z "$ac_cpp_err"; then
19437   eval "$as_ac_Header=yes"
19438 else
19439   echo "$as_me: failed program was:" >&5
19440   cat conftest.$ac_ext >&5
19441   eval "$as_ac_Header=no"
19442 fi
19443 rm -f conftest.err conftest.$ac_ext
19444 fi
19445 echo "$as_me:19445: result: `eval echo '${'$as_ac_Header'}'`" >&5
19446 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19447 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19448   cat >>confdefs.h <<EOF
19449 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19450 EOF
19451
19452 fi
19453 done
19454
19455 if test x"$ac_cv_header_iostream" = xyes ; then
19456         echo "$as_me:19456: checking if iostream uses std-namespace" >&5
19457 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19458         cat >conftest.$ac_ext <<_ACEOF
19459 #line 19459 "configure"
19460 #include "confdefs.h"
19461
19462 #include <iostream>
19463 using std::endl;
19464 using std::cerr;
19465 int
19466 main ()
19467 {
19468
19469 cerr << "testing" << endl;
19470
19471   ;
19472   return 0;
19473 }
19474 _ACEOF
19475 rm -f conftest.$ac_objext
19476 if { (eval echo "$as_me:19476: \"$ac_compile\"") >&5
19477   (eval $ac_compile) 2>&5
19478   ac_status=$?
19479   echo "$as_me:19479: \$? = $ac_status" >&5
19480   (exit $ac_status); } &&
19481          { ac_try='test -s conftest.$ac_objext'
19482   { (eval echo "$as_me:19482: \"$ac_try\"") >&5
19483   (eval $ac_try) 2>&5
19484   ac_status=$?
19485   echo "$as_me:19485: \$? = $ac_status" >&5
19486   (exit $ac_status); }; }; then
19487   cf_iostream_namespace=yes
19488 else
19489   echo "$as_me: failed program was:" >&5
19490 cat conftest.$ac_ext >&5
19491 cf_iostream_namespace=no
19492 fi
19493 rm -f conftest.$ac_objext conftest.$ac_ext
19494         echo "$as_me:19494: result: $cf_iostream_namespace" >&5
19495 echo "${ECHO_T}$cf_iostream_namespace" >&6
19496         if test "$cf_iostream_namespace" = yes ; then
19497
19498 cat >>confdefs.h <<\EOF
19499 #define IOSTREAM_NAMESPACE 1
19500 EOF
19501
19502         fi
19503 fi
19504
19505 echo "$as_me:19505: checking if we should include stdbool.h" >&5
19506 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19507
19508 if test "${cf_cv_header_stdbool_h+set}" = set; then
19509   echo $ECHO_N "(cached) $ECHO_C" >&6
19510 else
19511
19512         cat >conftest.$ac_ext <<_ACEOF
19513 #line 19513 "configure"
19514 #include "confdefs.h"
19515
19516 int
19517 main ()
19518 {
19519 bool foo = false
19520   ;
19521   return 0;
19522 }
19523 _ACEOF
19524 rm -f conftest.$ac_objext
19525 if { (eval echo "$as_me:19525: \"$ac_compile\"") >&5
19526   (eval $ac_compile) 2>&5
19527   ac_status=$?
19528   echo "$as_me:19528: \$? = $ac_status" >&5
19529   (exit $ac_status); } &&
19530          { ac_try='test -s conftest.$ac_objext'
19531   { (eval echo "$as_me:19531: \"$ac_try\"") >&5
19532   (eval $ac_try) 2>&5
19533   ac_status=$?
19534   echo "$as_me:19534: \$? = $ac_status" >&5
19535   (exit $ac_status); }; }; then
19536   cf_cv_header_stdbool_h=0
19537 else
19538   echo "$as_me: failed program was:" >&5
19539 cat conftest.$ac_ext >&5
19540 cat >conftest.$ac_ext <<_ACEOF
19541 #line 19541 "configure"
19542 #include "confdefs.h"
19543
19544 #ifndef __BEOS__
19545 #include <stdbool.h>
19546 #endif
19547
19548 int
19549 main ()
19550 {
19551 bool foo = false
19552   ;
19553   return 0;
19554 }
19555 _ACEOF
19556 rm -f conftest.$ac_objext
19557 if { (eval echo "$as_me:19557: \"$ac_compile\"") >&5
19558   (eval $ac_compile) 2>&5
19559   ac_status=$?
19560   echo "$as_me:19560: \$? = $ac_status" >&5
19561   (exit $ac_status); } &&
19562          { ac_try='test -s conftest.$ac_objext'
19563   { (eval echo "$as_me:19563: \"$ac_try\"") >&5
19564   (eval $ac_try) 2>&5
19565   ac_status=$?
19566   echo "$as_me:19566: \$? = $ac_status" >&5
19567   (exit $ac_status); }; }; then
19568   cf_cv_header_stdbool_h=1
19569 else
19570   echo "$as_me: failed program was:" >&5
19571 cat conftest.$ac_ext >&5
19572 cf_cv_header_stdbool_h=0
19573 fi
19574 rm -f conftest.$ac_objext conftest.$ac_ext
19575 fi
19576 rm -f conftest.$ac_objext conftest.$ac_ext
19577 fi
19578
19579 if test "$cf_cv_header_stdbool_h" = 1
19580 then    echo "$as_me:19580: result: yes" >&5
19581 echo "${ECHO_T}yes" >&6
19582 else    echo "$as_me:19582: result: no" >&5
19583 echo "${ECHO_T}no" >&6
19584 fi
19585
19586 echo "$as_me:19586: checking for builtin bool type" >&5
19587 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19588
19589 if test "${cf_cv_builtin_bool+set}" = set; then
19590   echo $ECHO_N "(cached) $ECHO_C" >&6
19591 else
19592
19593         cat >conftest.$ac_ext <<_ACEOF
19594 #line 19594 "configure"
19595 #include "confdefs.h"
19596
19597 #include <stdio.h>
19598 #include <sys/types.h>
19599
19600 int
19601 main ()
19602 {
19603 bool x = false
19604   ;
19605   return 0;
19606 }
19607 _ACEOF
19608 rm -f conftest.$ac_objext
19609 if { (eval echo "$as_me:19609: \"$ac_compile\"") >&5
19610   (eval $ac_compile) 2>&5
19611   ac_status=$?
19612   echo "$as_me:19612: \$? = $ac_status" >&5
19613   (exit $ac_status); } &&
19614          { ac_try='test -s conftest.$ac_objext'
19615   { (eval echo "$as_me:19615: \"$ac_try\"") >&5
19616   (eval $ac_try) 2>&5
19617   ac_status=$?
19618   echo "$as_me:19618: \$? = $ac_status" >&5
19619   (exit $ac_status); }; }; then
19620   cf_cv_builtin_bool=1
19621 else
19622   echo "$as_me: failed program was:" >&5
19623 cat conftest.$ac_ext >&5
19624 cf_cv_builtin_bool=0
19625 fi
19626 rm -f conftest.$ac_objext conftest.$ac_ext
19627
19628 fi
19629
19630 if test "$cf_cv_builtin_bool" = 1
19631 then    echo "$as_me:19631: result: yes" >&5
19632 echo "${ECHO_T}yes" >&6
19633 else    echo "$as_me:19633: result: no" >&5
19634 echo "${ECHO_T}no" >&6
19635 fi
19636
19637 echo "$as_me:19637: checking for size of bool" >&5
19638 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19639 if test "${cf_cv_type_of_bool+set}" = set; then
19640   echo $ECHO_N "(cached) $ECHO_C" >&6
19641 else
19642
19643         rm -f cf_test.out
19644         if test "$cross_compiling" = yes; then
19645   cf_cv_type_of_bool=unknown
19646 else
19647   cat >conftest.$ac_ext <<_ACEOF
19648 #line 19648 "configure"
19649 #include "confdefs.h"
19650
19651 #include <stdlib.h>
19652 #include <stdio.h>
19653
19654 #if defined(__cplusplus)
19655
19656 #ifdef HAVE_GXX_BUILTIN_H
19657 #include <g++/builtin.h>
19658 #elif HAVE_GPP_BUILTIN_H
19659 #include <gpp/builtin.h>
19660 #elif HAVE_BUILTIN_H
19661 #include <builtin.h>
19662 #endif
19663
19664 #else
19665
19666 #if $cf_cv_header_stdbool_h
19667 #include <stdbool.h>
19668 #endif
19669
19670 #endif
19671
19672 int main()
19673 {
19674         FILE *fp = fopen("cf_test.out", "w");
19675         if (fp != 0) {
19676                 bool x = true;
19677                 if ((bool)(-x) >= 0)
19678                         fputs("unsigned ", fp);
19679                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19680                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19681                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19682                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19683                 fclose(fp);
19684         }
19685         ${cf_cv_main_return:-return}(0);
19686 }
19687
19688 _ACEOF
19689 rm -f conftest$ac_exeext
19690 if { (eval echo "$as_me:19690: \"$ac_link\"") >&5
19691   (eval $ac_link) 2>&5
19692   ac_status=$?
19693   echo "$as_me:19693: \$? = $ac_status" >&5
19694   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19695   { (eval echo "$as_me:19695: \"$ac_try\"") >&5
19696   (eval $ac_try) 2>&5
19697   ac_status=$?
19698   echo "$as_me:19698: \$? = $ac_status" >&5
19699   (exit $ac_status); }; }; then
19700   cf_cv_type_of_bool=`cat cf_test.out`
19701                  if test -z "$cf_cv_type_of_bool"; then
19702                    cf_cv_type_of_bool=unknown
19703                  fi
19704 else
19705   echo "$as_me: program exited with status $ac_status" >&5
19706 echo "$as_me: failed program was:" >&5
19707 cat conftest.$ac_ext >&5
19708 cf_cv_type_of_bool=unknown
19709 fi
19710 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19711 fi
19712
19713 fi
19714
19715         rm -f cf_test.out
19716 echo "$as_me:19716: result: $cf_cv_type_of_bool" >&5
19717 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19718 if test "$cf_cv_type_of_bool" = unknown ; then
19719         case .$NCURSES_BOOL in #(vi
19720         .auto|.) NCURSES_BOOL=unsigned;;
19721         esac
19722         { echo "$as_me:19722: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19723 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19724         cf_cv_type_of_bool=$NCURSES_BOOL
19725 fi
19726
19727 echo "$as_me:19727: checking for special defines needed for etip.h" >&5
19728 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19729 cf_save_CXXFLAGS="$CXXFLAGS"
19730 cf_result="none"
19731
19732 # etip.h includes ncurses.h which includes ncurses_dll.h
19733 # But ncurses_dll.h is generated - fix here.
19734 test -d include || mkdir include
19735 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
19736
19737 for cf_math in "" MATH_H
19738 do
19739 for cf_excp in "" MATH_EXCEPTION
19740 do
19741         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19742         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19743         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19744 cat >conftest.$ac_ext <<_ACEOF
19745 #line 19745 "configure"
19746 #include "confdefs.h"
19747
19748 #include <etip.h.in>
19749
19750 int
19751 main ()
19752 {
19753
19754   ;
19755   return 0;
19756 }
19757 _ACEOF
19758 rm -f conftest.$ac_objext
19759 if { (eval echo "$as_me:19759: \"$ac_compile\"") >&5
19760   (eval $ac_compile) 2>&5
19761   ac_status=$?
19762   echo "$as_me:19762: \$? = $ac_status" >&5
19763   (exit $ac_status); } &&
19764          { ac_try='test -s conftest.$ac_objext'
19765   { (eval echo "$as_me:19765: \"$ac_try\"") >&5
19766   (eval $ac_try) 2>&5
19767   ac_status=$?
19768   echo "$as_me:19768: \$? = $ac_status" >&5
19769   (exit $ac_status); }; }; then
19770
19771         test -n "$cf_math" && cat >>confdefs.h <<EOF
19772 #define ETIP_NEEDS_${cf_math} 1
19773 EOF
19774
19775         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19776 #define ETIP_NEEDS_${cf_excp} 1
19777 EOF
19778
19779         cf_result="$cf_math $cf_excp"
19780         break 2
19781
19782 else
19783   echo "$as_me: failed program was:" >&5
19784 cat conftest.$ac_ext >&5
19785 fi
19786 rm -f conftest.$ac_objext conftest.$ac_ext
19787 done
19788 done
19789 echo "$as_me:19789: result: $cf_result" >&5
19790 echo "${ECHO_T}$cf_result" >&6
19791 CXXFLAGS="$cf_save_CXXFLAGS"
19792
19793 if test -n "$CXX"; then
19794 echo "$as_me:19794: checking if $CXX accepts parameter initialization" >&5
19795 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19796 if test "${cf_cv_cpp_param_init+set}" = set; then
19797   echo $ECHO_N "(cached) $ECHO_C" >&6
19798 else
19799
19800         ac_ext=cc
19801 ac_cpp='$CXXCPP $CPPFLAGS'
19802 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19803 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19804 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19805 ac_main_return=return
19806
19807         if test "$cross_compiling" = yes; then
19808   cf_cv_cpp_param_init=unknown
19809 else
19810   cat >conftest.$ac_ext <<_ACEOF
19811 #line 19811 "configure"
19812 #include "confdefs.h"
19813
19814 class TEST {
19815 private:
19816         int value;
19817 public:
19818         TEST(int x = 1);
19819         ~TEST();
19820 };
19821
19822 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19823 {
19824         value = x;
19825 }
19826 int main() { }
19827
19828 _ACEOF
19829 rm -f conftest$ac_exeext
19830 if { (eval echo "$as_me:19830: \"$ac_link\"") >&5
19831   (eval $ac_link) 2>&5
19832   ac_status=$?
19833   echo "$as_me:19833: \$? = $ac_status" >&5
19834   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19835   { (eval echo "$as_me:19835: \"$ac_try\"") >&5
19836   (eval $ac_try) 2>&5
19837   ac_status=$?
19838   echo "$as_me:19838: \$? = $ac_status" >&5
19839   (exit $ac_status); }; }; then
19840   cf_cv_cpp_param_init=yes
19841 else
19842   echo "$as_me: program exited with status $ac_status" >&5
19843 echo "$as_me: failed program was:" >&5
19844 cat conftest.$ac_ext >&5
19845 cf_cv_cpp_param_init=no
19846 fi
19847 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19848 fi
19849         ac_ext=cc
19850 ac_cpp='$CXXCPP $CPPFLAGS'
19851 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19852 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19853 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19854 ac_main_return=return
19855
19856 fi
19857 echo "$as_me:19857: result: $cf_cv_cpp_param_init" >&5
19858 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19859 fi
19860 test "$cf_cv_cpp_param_init" = yes &&
19861 cat >>confdefs.h <<\EOF
19862 #define CPP_HAS_PARAM_INIT 1
19863 EOF
19864
19865 if test -n "$CXX"; then
19866
19867 echo "$as_me:19867: checking if $CXX accepts static_cast" >&5
19868 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19869 if test "${cf_cv_cpp_static_cast+set}" = set; then
19870   echo $ECHO_N "(cached) $ECHO_C" >&6
19871 else
19872
19873         ac_ext=cc
19874 ac_cpp='$CXXCPP $CPPFLAGS'
19875 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19876 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19877 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19878 ac_main_return=return
19879
19880         cat >conftest.$ac_ext <<_ACEOF
19881 #line 19881 "configure"
19882 #include "confdefs.h"
19883
19884 class NCursesPanel
19885 {
19886 public:
19887   NCursesPanel(int nlines,
19888                int ncols,
19889                int begin_y = 0,
19890                int begin_x = 0)
19891   {
19892   }
19893   NCursesPanel();
19894   ~NCursesPanel();
19895 };
19896
19897 template<class T> class NCursesUserPanel : public NCursesPanel
19898 {
19899 public:
19900   NCursesUserPanel (int nlines,
19901                     int ncols,
19902                     int begin_y = 0,
19903                     int begin_x = 0,
19904                     const T* p_UserData = static_cast<T*>(0))
19905     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19906   {
19907   };
19908   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19909   {
19910   };
19911
19912   virtual ~NCursesUserPanel() {};
19913 };
19914
19915 int
19916 main ()
19917 {
19918
19919         const char* p_UserData = static_cast<char*>(0)
19920   ;
19921   return 0;
19922 }
19923 _ACEOF
19924 rm -f conftest.$ac_objext
19925 if { (eval echo "$as_me:19925: \"$ac_compile\"") >&5
19926   (eval $ac_compile) 2>&5
19927   ac_status=$?
19928   echo "$as_me:19928: \$? = $ac_status" >&5
19929   (exit $ac_status); } &&
19930          { ac_try='test -s conftest.$ac_objext'
19931   { (eval echo "$as_me:19931: \"$ac_try\"") >&5
19932   (eval $ac_try) 2>&5
19933   ac_status=$?
19934   echo "$as_me:19934: \$? = $ac_status" >&5
19935   (exit $ac_status); }; }; then
19936   cf_cv_cpp_static_cast=yes
19937 else
19938   echo "$as_me: failed program was:" >&5
19939 cat conftest.$ac_ext >&5
19940 cf_cv_cpp_static_cast=no
19941 fi
19942 rm -f conftest.$ac_objext conftest.$ac_ext
19943
19944         ac_ext=cc
19945 ac_cpp='$CXXCPP $CPPFLAGS'
19946 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19947 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19948 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19949 ac_main_return=return
19950
19951 fi
19952 echo "$as_me:19952: result: $cf_cv_cpp_static_cast" >&5
19953 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19954
19955 fi
19956
19957 test "$cf_cv_cpp_static_cast" = yes &&
19958 cat >>confdefs.h <<\EOF
19959 #define CPP_HAS_STATIC_CAST 1
19960 EOF
19961
19962         CXX_AR='$(AR)'
19963         CXX_ARFLAGS='$(ARFLAGS)'
19964         case $cf_cv_system_name in #(vi
19965         irix*) #(vi
19966             if test "$GXX" != yes ; then
19967                 CXX_AR='$(CXX)'
19968                 CXX_ARFLAGS='-ar -o'
19969             fi
19970             ;;
19971         sco3.2v5*) #(vi
19972             CXXLDFLAGS="-u main"
19973             ;;
19974         solaris2*)
19975             if test "$GXX" != yes ; then
19976                 CXX_AR='$(CXX)'
19977                 CXX_ARFLAGS='-xar -o'
19978             fi
19979             ;;
19980         esac
19981
19982 else
19983         cf_cxx_library=no
19984         cf_cv_builtin_bool=1
19985
19986         # Just because we are not configuring against C++ right now does not
19987         # mean that a user will not want to use C++.  Some distributors disable
19988         # the C++ portion of this configuration as a shortcut (or just to avoid
19989         # compiling the demo in the c++ directory).  So we need a reasonable
19990         # default for the 'bool' type.
19991         #
19992         # Caveat: since the storage of the bool type is not standardized, it
19993         # may change.
19994
19995         if test "$NCURSES_BOOL" != auto ; then
19996                 cf_cv_type_of_bool=$NCURSES_BOOL
19997                 cf_cv_header_stdbool_h=0
19998         else
19999                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20000
20001 echo "$as_me:20001: checking for size of bool" >&5
20002 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20003 if test "${cf_cv_type_of_bool+set}" = set; then
20004   echo $ECHO_N "(cached) $ECHO_C" >&6
20005 else
20006
20007         rm -f cf_test.out
20008         if test "$cross_compiling" = yes; then
20009   cf_cv_type_of_bool=unknown
20010 else
20011   cat >conftest.$ac_ext <<_ACEOF
20012 #line 20012 "configure"
20013 #include "confdefs.h"
20014
20015 #include <stdlib.h>
20016 #include <stdio.h>
20017
20018 #if defined(__cplusplus)
20019
20020 #ifdef HAVE_GXX_BUILTIN_H
20021 #include <g++/builtin.h>
20022 #elif HAVE_GPP_BUILTIN_H
20023 #include <gpp/builtin.h>
20024 #elif HAVE_BUILTIN_H
20025 #include <builtin.h>
20026 #endif
20027
20028 #else
20029
20030 #if $cf_cv_header_stdbool_h
20031 #include <stdbool.h>
20032 #endif
20033
20034 #endif
20035
20036 int main()
20037 {
20038         FILE *fp = fopen("cf_test.out", "w");
20039         if (fp != 0) {
20040                 bool x = true;
20041                 if ((bool)(-x) >= 0)
20042                         fputs("unsigned ", fp);
20043                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20044                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20045                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20046                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20047                 fclose(fp);
20048         }
20049         ${cf_cv_main_return:-return}(0);
20050 }
20051
20052 _ACEOF
20053 rm -f conftest$ac_exeext
20054 if { (eval echo "$as_me:20054: \"$ac_link\"") >&5
20055   (eval $ac_link) 2>&5
20056   ac_status=$?
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20059   { (eval echo "$as_me:20059: \"$ac_try\"") >&5
20060   (eval $ac_try) 2>&5
20061   ac_status=$?
20062   echo "$as_me:20062: \$? = $ac_status" >&5
20063   (exit $ac_status); }; }; then
20064   cf_cv_type_of_bool=`cat cf_test.out`
20065                  if test -z "$cf_cv_type_of_bool"; then
20066                    cf_cv_type_of_bool=unknown
20067                  fi
20068 else
20069   echo "$as_me: program exited with status $ac_status" >&5
20070 echo "$as_me: failed program was:" >&5
20071 cat conftest.$ac_ext >&5
20072 cf_cv_type_of_bool=unknown
20073 fi
20074 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20075 fi
20076
20077 fi
20078
20079         rm -f cf_test.out
20080 echo "$as_me:20080: result: $cf_cv_type_of_bool" >&5
20081 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20082 if test "$cf_cv_type_of_bool" = unknown ; then
20083         case .$NCURSES_BOOL in #(vi
20084         .auto|.) NCURSES_BOOL=unsigned;;
20085         esac
20086         { echo "$as_me:20086: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20087 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20088         cf_cv_type_of_bool=$NCURSES_BOOL
20089 fi
20090
20091                 else
20092                         echo "$as_me:20092: checking for fallback type of bool" >&5
20093 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20094                         case "$host_cpu" in #(vi
20095                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20096                         *)      cf_cv_type_of_bool=int  ;;
20097                         esac
20098                         echo "$as_me:20098: result: $cf_cv_type_of_bool" >&5
20099 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20100                 fi
20101         fi
20102 fi
20103
20104 # If the C compiler did not declare bool, and we did not determine that the C++
20105 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20106 # ncurses library use the same type as C++ bool.  Note that this allows one to
20107 # specify the type of bool in a configure-script option and postpone
20108 # integration with the C++ compiler provided that the types are compatible.
20109 USE_CXX_BOOL=1
20110 if test $cf_cv_cc_bool_type = 1
20111 then
20112         # oops: C has a bool.  Unlikely, but C++ could differ.
20113         USE_CXX_BOOL=0
20114 elif test $cf_cv_builtin_bool = 0
20115 then
20116         # C++ has no bool
20117         USE_CXX_BOOL=0
20118 else
20119         # this is the normal case
20120         USE_CXX_BOOL='defined(__cplusplus)'
20121 fi
20122
20123 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20124
20125         if test "$cf_with_ada" != "no" ; then
20126                 if test "$with_libtool" != "no"; then
20127                         { echo "$as_me:20127: WARNING: libtool does not support Ada - disabling feature" >&5
20128 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20129                         cf_with_ada=no
20130                 fi
20131         fi
20132
20133         if test "$cf_with_ada" != "no" ; then
20134
20135 cf_ada_make=gnatmake
20136 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20137 set dummy $cf_ada_make; ac_word=$2
20138 echo "$as_me:20138: checking for $ac_word" >&5
20139 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20140 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20141   echo $ECHO_N "(cached) $ECHO_C" >&6
20142 else
20143   if test -n "$gnat_exists"; then
20144   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20145 else
20146   ac_save_IFS=$IFS; IFS=$ac_path_separator
20147 ac_dummy="$PATH"
20148 for ac_dir in $ac_dummy; do
20149   IFS=$ac_save_IFS
20150   test -z "$ac_dir" && ac_dir=.
20151   $as_executable_p "$ac_dir/$ac_word" || continue
20152 ac_cv_prog_gnat_exists="yes"
20153 echo "$as_me:20153: found $ac_dir/$ac_word" >&5
20154 break
20155 done
20156
20157   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20158 fi
20159 fi
20160 gnat_exists=$ac_cv_prog_gnat_exists
20161 if test -n "$gnat_exists"; then
20162   echo "$as_me:20162: result: $gnat_exists" >&5
20163 echo "${ECHO_T}$gnat_exists" >&6
20164 else
20165   echo "$as_me:20165: result: no" >&5
20166 echo "${ECHO_T}no" >&6
20167 fi
20168
20169 if test "$ac_cv_prog_gnat_exists" = no; then
20170    cf_ada_make=
20171    cf_cv_prog_gnat_correct=no
20172 else
20173
20174 echo "$as_me:20174: checking for gnat version" >&5
20175 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20176 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20177         grep '[0-9].[0-9][0-9]*' |\
20178     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20179 echo "$as_me:20179: result: $cf_gnat_version" >&5
20180 echo "${ECHO_T}$cf_gnat_version" >&6
20181
20182 case $cf_gnat_version in #(vi
20183 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20184         cf_cv_prog_gnat_correct=yes
20185         ;;
20186 *)
20187         { echo "$as_me:20187: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20188 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20189         cf_cv_prog_gnat_correct=no
20190         ;;
20191 esac
20192
20193    # Extract the first word of "m4", so it can be a program name with args.
20194 set dummy m4; ac_word=$2
20195 echo "$as_me:20195: checking for $ac_word" >&5
20196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20197 if test "${ac_cv_prog_M4_exists+set}" = set; then
20198   echo $ECHO_N "(cached) $ECHO_C" >&6
20199 else
20200   if test -n "$M4_exists"; then
20201   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20202 else
20203   ac_save_IFS=$IFS; IFS=$ac_path_separator
20204 ac_dummy="$PATH"
20205 for ac_dir in $ac_dummy; do
20206   IFS=$ac_save_IFS
20207   test -z "$ac_dir" && ac_dir=.
20208   $as_executable_p "$ac_dir/$ac_word" || continue
20209 ac_cv_prog_M4_exists="yes"
20210 echo "$as_me:20210: found $ac_dir/$ac_word" >&5
20211 break
20212 done
20213
20214   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20215 fi
20216 fi
20217 M4_exists=$ac_cv_prog_M4_exists
20218 if test -n "$M4_exists"; then
20219   echo "$as_me:20219: result: $M4_exists" >&5
20220 echo "${ECHO_T}$M4_exists" >&6
20221 else
20222   echo "$as_me:20222: result: no" >&5
20223 echo "${ECHO_T}no" >&6
20224 fi
20225
20226    if test "$ac_cv_prog_M4_exists" = no; then
20227       cf_cv_prog_gnat_correct=no
20228       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20229    fi
20230    if test "$cf_cv_prog_gnat_correct" = yes; then
20231       echo "$as_me:20231: checking if GNAT works" >&5
20232 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20233
20234 rm -rf conftest* *~conftest*
20235 cat >>conftest.ads <<CF_EOF
20236 procedure conftest;
20237 CF_EOF
20238 cat >>conftest.adb <<CF_EOF
20239 with Text_IO;
20240 with GNAT.OS_Lib;
20241 procedure conftest is
20242 begin
20243    Text_IO.Put ("Hello World");
20244    Text_IO.New_Line;
20245    GNAT.OS_Lib.OS_Exit (0);
20246 end conftest;
20247 CF_EOF
20248 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20249    if ( ./conftest 1>&5 2>&1 ) ; then
20250       cf_cv_prog_gnat_correct=yes
20251    else
20252       cf_cv_prog_gnat_correct=no
20253    fi
20254 else
20255    cf_cv_prog_gnat_correct=no
20256 fi
20257 rm -rf conftest* *~conftest*
20258
20259       echo "$as_me:20259: result: $cf_cv_prog_gnat_correct" >&5
20260 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20261    fi
20262 fi
20263
20264                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20265
20266         ADAFLAGS="$ADAFLAGS -gnatpn"
20267
20268         echo "$as_me:20268: checking optimization options for ADAFLAGS" >&5
20269 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20270         case "$CFLAGS" in
20271         *-g*)
20272
20273         ADAFLAGS="$ADAFLAGS -g"
20274
20275                 ;;
20276         esac
20277         case "$CFLAGS" in
20278         *-O*)
20279                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20280
20281         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20282
20283                 ;;
20284         esac
20285         echo "$as_me:20285: result: $ADAFLAGS" >&5
20286 echo "${ECHO_T}$ADAFLAGS" >&6
20287
20288 echo "$as_me:20288: checking if GNATPREP supports -T option" >&5
20289 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20290 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20291   echo $ECHO_N "(cached) $ECHO_C" >&6
20292 else
20293
20294 cf_cv_gnatprep_opt_t=no
20295 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20296
20297 fi
20298 echo "$as_me:20298: result: $cf_cv_gnatprep_opt_t" >&5
20299 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20300 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20301
20302 echo "$as_me:20302: checking if GNAT supports generics" >&5
20303 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20304 case $cf_gnat_version in #(vi
20305 3.[1-9]*|[4-9].*) #(vi
20306         cf_gnat_generics=yes
20307         ;;
20308 *)
20309         cf_gnat_generics=no
20310         ;;
20311 esac
20312 echo "$as_me:20312: result: $cf_gnat_generics" >&5
20313 echo "${ECHO_T}$cf_gnat_generics" >&6
20314
20315 if test "$cf_gnat_generics" = yes
20316 then
20317         cf_compile_generics=generics
20318         cf_generic_objects="\${GENOBJS}"
20319 else
20320         cf_compile_generics=
20321         cf_generic_objects=
20322 fi
20323
20324 echo "$as_me:20324: checking if GNAT supports SIGINT" >&5
20325 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20326 if test "${cf_cv_gnat_sigint+set}" = set; then
20327   echo $ECHO_N "(cached) $ECHO_C" >&6
20328 else
20329
20330 rm -rf conftest* *~conftest*
20331 cat >>conftest.ads <<CF_EOF
20332 with Ada.Interrupts.Names;
20333
20334 package ConfTest is
20335
20336    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20337    pragma Unreserve_All_Interrupts;
20338    pragma Warnings (On);
20339
20340    protected Process is
20341       procedure Stop;
20342       function Continue return Boolean;
20343       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20344    private
20345       Done : Boolean := False;
20346    end Process;
20347
20348 end ConfTest;
20349 CF_EOF
20350 cat >>conftest.adb <<CF_EOF
20351 package body ConfTest is
20352    protected body Process is
20353       procedure Stop is
20354       begin
20355          Done := True;
20356       end Stop;
20357       function Continue return Boolean is
20358       begin
20359          return not Done;
20360       end Continue;
20361    end Process;
20362 end ConfTest;
20363 CF_EOF
20364 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20365       cf_cv_gnat_sigint=yes
20366 else
20367    cf_cv_gnat_sigint=no
20368 fi
20369 rm -rf conftest* *~conftest*
20370
20371 fi
20372 echo "$as_me:20372: result: $cf_cv_gnat_sigint" >&5
20373 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20374
20375 if test $cf_cv_gnat_sigint = yes ; then
20376         USE_GNAT_SIGINT=""
20377 else
20378         USE_GNAT_SIGINT="#"
20379 fi
20380
20381 cf_gnat_libraries=no
20382 cf_gnat_projects=no
20383
20384 if test "$enable_gnat_projects" != no ; then
20385 echo "$as_me:20385: checking if GNAT supports project files" >&5
20386 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20387 case $cf_gnat_version in #(vi
20388 3.[0-9]*) #(vi
20389         ;;
20390 *)
20391         case $cf_cv_system_name in #(vi
20392         cygwin*|msys*) #(vi
20393                 ;;
20394         *)
20395                 mkdir conftest.src conftest.bin conftest.lib
20396                 cd conftest.src
20397                 rm -rf conftest* *~conftest*
20398                 cat >>library.gpr <<CF_EOF
20399 project Library is
20400   Kind := External ("LIB_KIND");
20401   for Library_Name use "ConfTest";
20402   for Object_Dir use ".";
20403   for Library_ALI_Dir use External("LIBRARY_DIR");
20404   for Library_Version use External ("SONAME");
20405   for Library_Kind use Kind;
20406   for Library_Dir use External("BUILD_DIR");
20407   Source_Dir := External ("SOURCE_DIR");
20408   for Source_Dirs use (Source_Dir);
20409 end Library;
20410 CF_EOF
20411                 cat >>confpackage.ads <<CF_EOF
20412 package ConfPackage is
20413    procedure conftest;
20414 end ConfPackage;
20415 CF_EOF
20416                 cat >>confpackage.adb <<CF_EOF
20417 with Text_IO;
20418 package body ConfPackage is
20419    procedure conftest is
20420    begin
20421       Text_IO.Put ("Hello World");
20422       Text_IO.New_Line;
20423    end conftest;
20424 end ConfPackage;
20425 CF_EOF
20426                 if ( $cf_ada_make $ADAFLAGS \
20427                                 -Plibrary.gpr \
20428                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20429                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20430                                 -XSOURCE_DIR=`pwd` \
20431                                 -XSONAME=libConfTest.so.1 \
20432                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20433                         cf_gnat_projects=yes
20434                 fi
20435                 cd ..
20436                 if test -f conftest.lib/confpackage.ali
20437                 then
20438                         cf_gnat_libraries=yes
20439                 fi
20440                 rm -rf conftest* *~conftest*
20441                 ;;
20442         esac
20443         ;;
20444 esac
20445 echo "$as_me:20445: result: $cf_gnat_projects" >&5
20446 echo "${ECHO_T}$cf_gnat_projects" >&6
20447 fi # enable_gnat_projects
20448
20449 if test $cf_gnat_projects = yes
20450 then
20451         echo "$as_me:20451: checking if GNAT supports libraries" >&5
20452 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20453         echo "$as_me:20453: result: $cf_gnat_libraries" >&5
20454 echo "${ECHO_T}$cf_gnat_libraries" >&6
20455 fi
20456
20457 if test "$cf_gnat_projects" = yes
20458 then
20459         USE_OLD_MAKERULES="#"
20460         USE_GNAT_PROJECTS=""
20461 else
20462         USE_OLD_MAKERULES=""
20463         USE_GNAT_PROJECTS="#"
20464 fi
20465
20466 if test "$cf_gnat_libraries" = yes
20467 then
20468         USE_GNAT_LIBRARIES=""
20469 else
20470         USE_GNAT_LIBRARIES="#"
20471 fi
20472
20473 echo "$as_me:20473: checking for ada-compiler" >&5
20474 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20475
20476 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20477 if test "${with_ada_compiler+set}" = set; then
20478   withval="$with_ada_compiler"
20479   cf_ada_compiler=$withval
20480 else
20481   cf_ada_compiler=gnatmake
20482 fi;
20483
20484 echo "$as_me:20484: result: $cf_ada_compiler" >&5
20485 echo "${ECHO_T}$cf_ada_compiler" >&6
20486
20487                         cf_ada_package=terminal_interface
20488
20489 echo "$as_me:20489: checking for ada-include" >&5
20490 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20491
20492 # Check whether --with-ada-include or --without-ada-include was given.
20493 if test "${with_ada_include+set}" = set; then
20494   withval="$with_ada_include"
20495
20496 else
20497   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20498 fi; if test -n "$prefix/share/ada/adainclude" ; then
20499
20500 if test "x$prefix" != xNONE; then
20501   cf_path_syntax="$prefix"
20502 else
20503   cf_path_syntax="$ac_default_prefix"
20504 fi
20505
20506 case ".$withval" in #(vi
20507 .\$\(*\)*|.\'*\'*) #(vi
20508   ;;
20509 ..|./*|.\\*) #(vi
20510   ;;
20511 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20512   ;;
20513 .\${*prefix}*|.\${*dir}*) #(vi
20514   eval withval="$withval"
20515   case ".$withval" in #(vi
20516   .NONE/*)
20517     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20518     ;;
20519   esac
20520   ;; #(vi
20521 .no|.NONE/*)
20522   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20523   ;;
20524 *)
20525   { { echo "$as_me:20525: error: expected a pathname, not \"$withval\"" >&5
20526 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20527    { (exit 1); exit 1; }; }
20528   ;;
20529 esac
20530
20531 fi
20532 eval ADA_INCLUDE="$withval"
20533
20534 echo "$as_me:20534: result: $ADA_INCLUDE" >&5
20535 echo "${ECHO_T}$ADA_INCLUDE" >&6
20536
20537 echo "$as_me:20537: checking for ada-objects" >&5
20538 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20539
20540 # Check whether --with-ada-objects or --without-ada-objects was given.
20541 if test "${with_ada_objects+set}" = set; then
20542   withval="$with_ada_objects"
20543
20544 else
20545   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20546 fi; if test -n "$prefix/lib/ada/adalib" ; then
20547
20548 if test "x$prefix" != xNONE; then
20549   cf_path_syntax="$prefix"
20550 else
20551   cf_path_syntax="$ac_default_prefix"
20552 fi
20553
20554 case ".$withval" in #(vi
20555 .\$\(*\)*|.\'*\'*) #(vi
20556   ;;
20557 ..|./*|.\\*) #(vi
20558   ;;
20559 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20560   ;;
20561 .\${*prefix}*|.\${*dir}*) #(vi
20562   eval withval="$withval"
20563   case ".$withval" in #(vi
20564   .NONE/*)
20565     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20566     ;;
20567   esac
20568   ;; #(vi
20569 .no|.NONE/*)
20570   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20571   ;;
20572 *)
20573   { { echo "$as_me:20573: error: expected a pathname, not \"$withval\"" >&5
20574 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20575    { (exit 1); exit 1; }; }
20576   ;;
20577 esac
20578
20579 fi
20580 eval ADA_OBJECTS="$withval"
20581
20582 echo "$as_me:20582: result: $ADA_OBJECTS" >&5
20583 echo "${ECHO_T}$ADA_OBJECTS" >&6
20584
20585 echo "$as_me:20585: checking if an Ada95 shared-library should be built" >&5
20586 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20587
20588 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20589 if test "${with_ada_sharedlib+set}" = set; then
20590   withval="$with_ada_sharedlib"
20591   with_ada_sharedlib=$withval
20592 else
20593   with_ada_sharedlib=no
20594 fi;
20595 echo "$as_me:20595: result: $with_ada_sharedlib" >&5
20596 echo "${ECHO_T}$with_ada_sharedlib" >&6
20597
20598 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20599 MAKE_ADA_SHAREDLIB="#"
20600
20601 if test "x$with_ada_sharedlib" != xno
20602 then
20603         MAKE_ADA_SHAREDLIB=
20604         if test "x$with_ada_sharedlib" != xyes
20605         then
20606                 ADA_SHAREDLIB="$with_ada_sharedlib"
20607         fi
20608 fi
20609
20610                 fi
20611         fi
20612 else
20613         cf_with_ada=no
20614 fi
20615
20616 # do this "late" to avoid conflict with header-checks
20617 if test "x$with_widec" = xyes ; then
20618         echo "$as_me:20618: checking for wchar_t" >&5
20619 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20620 if test "${ac_cv_type_wchar_t+set}" = set; then
20621   echo $ECHO_N "(cached) $ECHO_C" >&6
20622 else
20623   cat >conftest.$ac_ext <<_ACEOF
20624 #line 20624 "configure"
20625 #include "confdefs.h"
20626 $ac_includes_default
20627 int
20628 main ()
20629 {
20630 if ((wchar_t *) 0)
20631   return 0;
20632 if (sizeof (wchar_t))
20633   return 0;
20634   ;
20635   return 0;
20636 }
20637 _ACEOF
20638 rm -f conftest.$ac_objext
20639 if { (eval echo "$as_me:20639: \"$ac_compile\"") >&5
20640   (eval $ac_compile) 2>&5
20641   ac_status=$?
20642   echo "$as_me:20642: \$? = $ac_status" >&5
20643   (exit $ac_status); } &&
20644          { ac_try='test -s conftest.$ac_objext'
20645   { (eval echo "$as_me:20645: \"$ac_try\"") >&5
20646   (eval $ac_try) 2>&5
20647   ac_status=$?
20648   echo "$as_me:20648: \$? = $ac_status" >&5
20649   (exit $ac_status); }; }; then
20650   ac_cv_type_wchar_t=yes
20651 else
20652   echo "$as_me: failed program was:" >&5
20653 cat conftest.$ac_ext >&5
20654 ac_cv_type_wchar_t=no
20655 fi
20656 rm -f conftest.$ac_objext conftest.$ac_ext
20657 fi
20658 echo "$as_me:20658: result: $ac_cv_type_wchar_t" >&5
20659 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20660
20661 echo "$as_me:20661: checking size of wchar_t" >&5
20662 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20663 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20664   echo $ECHO_N "(cached) $ECHO_C" >&6
20665 else
20666   if test "$ac_cv_type_wchar_t" = yes; then
20667   if test "$cross_compiling" = yes; then
20668   # Depending upon the size, compute the lo and hi bounds.
20669 cat >conftest.$ac_ext <<_ACEOF
20670 #line 20670 "configure"
20671 #include "confdefs.h"
20672 $ac_includes_default
20673 int
20674 main ()
20675 {
20676 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20677   ;
20678   return 0;
20679 }
20680 _ACEOF
20681 rm -f conftest.$ac_objext
20682 if { (eval echo "$as_me:20682: \"$ac_compile\"") >&5
20683   (eval $ac_compile) 2>&5
20684   ac_status=$?
20685   echo "$as_me:20685: \$? = $ac_status" >&5
20686   (exit $ac_status); } &&
20687          { ac_try='test -s conftest.$ac_objext'
20688   { (eval echo "$as_me:20688: \"$ac_try\"") >&5
20689   (eval $ac_try) 2>&5
20690   ac_status=$?
20691   echo "$as_me:20691: \$? = $ac_status" >&5
20692   (exit $ac_status); }; }; then
20693   ac_lo=0 ac_mid=0
20694   while :; do
20695     cat >conftest.$ac_ext <<_ACEOF
20696 #line 20696 "configure"
20697 #include "confdefs.h"
20698 $ac_includes_default
20699 int
20700 main ()
20701 {
20702 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20703   ;
20704   return 0;
20705 }
20706 _ACEOF
20707 rm -f conftest.$ac_objext
20708 if { (eval echo "$as_me:20708: \"$ac_compile\"") >&5
20709   (eval $ac_compile) 2>&5
20710   ac_status=$?
20711   echo "$as_me:20711: \$? = $ac_status" >&5
20712   (exit $ac_status); } &&
20713          { ac_try='test -s conftest.$ac_objext'
20714   { (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); }; }; then
20719   ac_hi=$ac_mid; break
20720 else
20721   echo "$as_me: failed program was:" >&5
20722 cat conftest.$ac_ext >&5
20723 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20724 fi
20725 rm -f conftest.$ac_objext conftest.$ac_ext
20726   done
20727 else
20728   echo "$as_me: failed program was:" >&5
20729 cat conftest.$ac_ext >&5
20730 ac_hi=-1 ac_mid=-1
20731   while :; do
20732     cat >conftest.$ac_ext <<_ACEOF
20733 #line 20733 "configure"
20734 #include "confdefs.h"
20735 $ac_includes_default
20736 int
20737 main ()
20738 {
20739 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20740   ;
20741   return 0;
20742 }
20743 _ACEOF
20744 rm -f conftest.$ac_objext
20745 if { (eval echo "$as_me:20745: \"$ac_compile\"") >&5
20746   (eval $ac_compile) 2>&5
20747   ac_status=$?
20748   echo "$as_me:20748: \$? = $ac_status" >&5
20749   (exit $ac_status); } &&
20750          { ac_try='test -s conftest.$ac_objext'
20751   { (eval echo "$as_me:20751: \"$ac_try\"") >&5
20752   (eval $ac_try) 2>&5
20753   ac_status=$?
20754   echo "$as_me:20754: \$? = $ac_status" >&5
20755   (exit $ac_status); }; }; then
20756   ac_lo=$ac_mid; break
20757 else
20758   echo "$as_me: failed program was:" >&5
20759 cat conftest.$ac_ext >&5
20760 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20761 fi
20762 rm -f conftest.$ac_objext conftest.$ac_ext
20763   done
20764 fi
20765 rm -f conftest.$ac_objext conftest.$ac_ext
20766 # Binary search between lo and hi bounds.
20767 while test "x$ac_lo" != "x$ac_hi"; do
20768   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20769   cat >conftest.$ac_ext <<_ACEOF
20770 #line 20770 "configure"
20771 #include "confdefs.h"
20772 $ac_includes_default
20773 int
20774 main ()
20775 {
20776 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20777   ;
20778   return 0;
20779 }
20780 _ACEOF
20781 rm -f conftest.$ac_objext
20782 if { (eval echo "$as_me:20782: \"$ac_compile\"") >&5
20783   (eval $ac_compile) 2>&5
20784   ac_status=$?
20785   echo "$as_me:20785: \$? = $ac_status" >&5
20786   (exit $ac_status); } &&
20787          { ac_try='test -s conftest.$ac_objext'
20788   { (eval echo "$as_me:20788: \"$ac_try\"") >&5
20789   (eval $ac_try) 2>&5
20790   ac_status=$?
20791   echo "$as_me:20791: \$? = $ac_status" >&5
20792   (exit $ac_status); }; }; then
20793   ac_hi=$ac_mid
20794 else
20795   echo "$as_me: failed program was:" >&5
20796 cat conftest.$ac_ext >&5
20797 ac_lo=`expr $ac_mid + 1`
20798 fi
20799 rm -f conftest.$ac_objext conftest.$ac_ext
20800 done
20801 ac_cv_sizeof_wchar_t=$ac_lo
20802 else
20803   if test "$cross_compiling" = yes; then
20804   { { echo "$as_me:20804: error: cannot run test program while cross compiling" >&5
20805 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20806    { (exit 1); exit 1; }; }
20807 else
20808   cat >conftest.$ac_ext <<_ACEOF
20809 #line 20809 "configure"
20810 #include "confdefs.h"
20811 $ac_includes_default
20812 int
20813 main ()
20814 {
20815 FILE *f = fopen ("conftest.val", "w");
20816 if (!f)
20817   $ac_main_return (1);
20818 fprintf (f, "%d", (sizeof (wchar_t)));
20819 fclose (f);
20820   ;
20821   return 0;
20822 }
20823 _ACEOF
20824 rm -f conftest$ac_exeext
20825 if { (eval echo "$as_me:20825: \"$ac_link\"") >&5
20826   (eval $ac_link) 2>&5
20827   ac_status=$?
20828   echo "$as_me:20828: \$? = $ac_status" >&5
20829   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20830   { (eval echo "$as_me:20830: \"$ac_try\"") >&5
20831   (eval $ac_try) 2>&5
20832   ac_status=$?
20833   echo "$as_me:20833: \$? = $ac_status" >&5
20834   (exit $ac_status); }; }; then
20835   ac_cv_sizeof_wchar_t=`cat conftest.val`
20836 else
20837   echo "$as_me: program exited with status $ac_status" >&5
20838 echo "$as_me: failed program was:" >&5
20839 cat conftest.$ac_ext >&5
20840 fi
20841 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20842 fi
20843 fi
20844 rm -f conftest.val
20845 else
20846   ac_cv_sizeof_wchar_t=0
20847 fi
20848 fi
20849 echo "$as_me:20849: result: $ac_cv_sizeof_wchar_t" >&5
20850 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20851 cat >>confdefs.h <<EOF
20852 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20853 EOF
20854
20855 fi
20856
20857 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20858 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20859 ###
20860 ### ticlib modules may be a separate library, otherwise contained in termlib.
20861 ### termlib modules may be a separate library, otherwise contained in ncurses.
20862 ###
20863 ### The of "+" or " " between the tokens controls the way the script
20864 ### chooses to split module lists into libraries.
20865 ###
20866 ### (see CF_LIB_RULES).
20867 echo "$as_me:20867: checking for library subsets" >&5
20868 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20869 LIB_SUBSETS=
20870
20871 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20872         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20873         if test "$with_ticlib" != no ; then
20874                 LIB_SUBSETS="${LIB_SUBSETS} "
20875         else
20876                 LIB_SUBSETS="${LIB_SUBSETS}+"
20877         fi
20878 fi
20879
20880 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20881 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20882
20883 if test "$with_termlib" != no ; then
20884         LIB_SUBSETS="${LIB_SUBSETS} "
20885 else
20886         LIB_SUBSETS="${LIB_SUBSETS}+"
20887 fi
20888
20889 LIB_SUBSETS="${LIB_SUBSETS}base"
20890
20891 # Most term-driver calls are to tinfo, but some like init_pair are to the
20892 # base library (so it resides in base).
20893 if test "$with_term_driver" != no ; then
20894         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20895         case $cf_cv_system_name in #(vi
20896         *mingw32*) #(vi
20897                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20898                 ;;
20899         *) #(vi
20900                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20901                 ;;
20902         esac
20903 fi
20904
20905 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20906 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20907
20908 echo "$as_me:20908: result: $LIB_SUBSETS" >&5
20909 echo "${ECHO_T}$LIB_SUBSETS" >&6
20910
20911 ### Construct the list of include-directories to be generated
20912
20913 if test "$srcdir" != "."; then
20914         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20915 fi
20916 CPPFLAGS="-I../include $CPPFLAGS"
20917 if test "$srcdir" != "."; then
20918         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
20919 fi
20920 CPPFLAGS="-I. $CPPFLAGS"
20921
20922 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20923 if test "$srcdir" != "."; then
20924         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20925 fi
20926 if test "$GCC" != yes; then
20927         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20928 elif test "$includedir" != "/usr/include"; then
20929         if test "$includedir" = '${prefix}/include' ; then
20930                 if test x$prefix != x/usr ; then
20931                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20932                 fi
20933         else
20934                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20935         fi
20936 fi
20937
20938 ### Build up pieces for makefile rules
20939 echo "$as_me:20939: checking default library suffix" >&5
20940 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20941
20942         case $DFT_LWR_MODEL in
20943         libtool) DFT_ARG_SUFFIX=''   ;;
20944         normal)  DFT_ARG_SUFFIX=''   ;;
20945         debug)   DFT_ARG_SUFFIX='_g' ;;
20946         profile) DFT_ARG_SUFFIX='_p' ;;
20947         shared)  DFT_ARG_SUFFIX=''   ;;
20948         esac
20949         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20950 echo "$as_me:20950: result: $DFT_ARG_SUFFIX" >&5
20951 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20952
20953 echo "$as_me:20953: checking default library-dependency suffix" >&5
20954 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20955
20956         case X$DFT_LWR_MODEL in #(vi
20957         Xlibtool) #(vi
20958                 DFT_LIB_SUFFIX='.la'
20959                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20960                 ;;
20961         Xdebug) #(vi
20962                 DFT_LIB_SUFFIX='_g.a'
20963                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20964                 ;;
20965         Xprofile) #(vi
20966                 DFT_LIB_SUFFIX='_p.a'
20967                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20968                 ;;
20969         Xshared) #(vi
20970                 case $cf_cv_system_name in
20971                 aix[5-7]*) #(vi
20972                         DFT_LIB_SUFFIX='.so'
20973                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20974                         ;;
20975                 cygwin*|msys*|mingw*) #(vi
20976                         DFT_LIB_SUFFIX='.dll'
20977                         DFT_DEP_SUFFIX='.dll.a'
20978                         ;;
20979                 darwin*) #(vi
20980                         DFT_LIB_SUFFIX='.dylib'
20981                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20982                         ;;
20983                 hpux*) #(vi
20984                         case $target in
20985                         ia64*) #(vi
20986                                 DFT_LIB_SUFFIX='.so'
20987                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20988                                 ;;
20989                         *) #(vi
20990                                 DFT_LIB_SUFFIX='.sl'
20991                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20992                                 ;;
20993                         esac
20994                         ;;
20995                 *) #(vi
20996                         DFT_LIB_SUFFIX='.so'
20997                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20998                         ;;
20999                 esac
21000                 ;;
21001         *)
21002                 DFT_LIB_SUFFIX='.a'
21003                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21004                 ;;
21005         esac
21006         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21007         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21008 echo "$as_me:21008: result: $DFT_DEP_SUFFIX" >&5
21009 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21010
21011 echo "$as_me:21011: checking default object directory" >&5
21012 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21013
21014         case $DFT_LWR_MODEL in
21015         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21016         normal)  DFT_OBJ_SUBDIR='objects' ;;
21017         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21018         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21019         shared)
21020                 case $cf_cv_system_name in #(vi
21021                 cygwin|msys) #(vi
21022                         DFT_OBJ_SUBDIR='objects' ;;
21023                 *)
21024                         DFT_OBJ_SUBDIR='obj_s' ;;
21025                 esac
21026         esac
21027 echo "$as_me:21027: result: $DFT_OBJ_SUBDIR" >&5
21028 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21029
21030 if test "x$cf_with_cxx" = xyes ; then
21031 echo "$as_me:21031: checking c++ library-dependency suffix" >&5
21032 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21033 if test "$with_libtool" != "no"; then
21034         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21035         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21036 elif test "$with_shared_cxx" != "no"; then
21037         # also for g++ users...
21038         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21039 else
21040         # we normally make a static library because C/C++ library rules differ
21041
21042         case Xnormal in #(vi
21043         Xlibtool) #(vi
21044                 CXX_LIB_SUFFIX='.la'
21045                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21046                 ;;
21047         Xdebug) #(vi
21048                 CXX_LIB_SUFFIX='_g.a'
21049                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21050                 ;;
21051         Xprofile) #(vi
21052                 CXX_LIB_SUFFIX='_p.a'
21053                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21054                 ;;
21055         Xshared) #(vi
21056                 case $cf_cv_system_name in
21057                 aix[5-7]*) #(vi
21058                         CXX_LIB_SUFFIX='.so'
21059                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21060                         ;;
21061                 cygwin*|msys*|mingw*) #(vi
21062                         CXX_LIB_SUFFIX='.dll'
21063                         CXX_DEP_SUFFIX='.dll.a'
21064                         ;;
21065                 darwin*) #(vi
21066                         CXX_LIB_SUFFIX='.dylib'
21067                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21068                         ;;
21069                 hpux*) #(vi
21070                         case $target in
21071                         ia64*) #(vi
21072                                 CXX_LIB_SUFFIX='.so'
21073                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21074                                 ;;
21075                         *) #(vi
21076                                 CXX_LIB_SUFFIX='.sl'
21077                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21078                                 ;;
21079                         esac
21080                         ;;
21081                 *) #(vi
21082                         CXX_LIB_SUFFIX='.so'
21083                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21084                         ;;
21085                 esac
21086                 ;;
21087         *)
21088                 CXX_LIB_SUFFIX='.a'
21089                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21090                 ;;
21091         esac
21092         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21093         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21094
21095 fi
21096 echo "$as_me:21096: result: $CXX_LIB_SUFFIX" >&5
21097 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21098
21099 fi
21100
21101 # do not want -ldl in build except as needed for -lncurses dependency
21102 if test "x$with_dlsym" = xyes ; then
21103 if test $DFT_LWR_MODEL = shared || \
21104    test $DFT_LWR_MODEL = libtool ; then
21105
21106 # remove dl library from $LIBS
21107 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21108
21109 fi
21110 fi
21111 ### Set up low-level terminfo dependencies for makefiles.
21112
21113 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21114 # do not need libdl
21115 TICS_LIST=
21116 if test "x$with_dlsym" = xyes ; then
21117
21118 # remove dl library from $SHLIB_LIST
21119 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21120
21121 fi
21122
21123 if test "$with_ticlib" != no ; then
21124
21125         if test "x$with_ticlib" != xyes ; then
21126                 TICS_NAME=$with_ticlib
21127                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21128                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21129                 TICS_LIB_SUFFIX="${with_ticlib}"
21130         else
21131                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21132                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21133                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21134         fi
21135         TICS_LDFLAGS="-L${LIB_DIR}"
21136         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21137 else
21138         TICS_LDFLAGS="-L${LIB_DIR}"
21139         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21140 fi
21141
21142 if test "$with_termlib" != no ; then
21143
21144         if test "x$with_termlib" != xyes ; then
21145                 TINFO_NAME=$with_termlib
21146                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21147                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21148                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21149                 TINFO_LIB_SUFFIX="${with_termlib}"
21150         else
21151                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21152                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21153                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21154                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21155         fi
21156
21157         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21158         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21159         if test "$DFT_LWR_MODEL" = "libtool"; then
21160                 TEST_ARGS="${TEST_DEPS}"
21161                 TEST_ARG2="${TEST_DEP2}"
21162                 TINFO_LDFLAGS="-L${LIB_DIR}"
21163                 TINFO_LIBS="$TEST_ARGS"
21164                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21165                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21166         else
21167                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21168                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21169                 if test "x$with_term_driver" != xno ; then
21170                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21171                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21172                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21173                 else
21174                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21175                         TINFO_LIBS="$TEST_ARGS"
21176                 fi
21177                 TINFO_LDFLAGS="-L${LIB_DIR}"
21178                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21179         fi
21180 else
21181         # the next lines are needed for linking libtic over libncurses
21182         TINFO_NAME=${LIB_NAME}
21183         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21184         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21185         if test "x$with_tic_depends" = xyes ; then
21186                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21187         else
21188                 TICS_LIST="$SHLIB_LIST"
21189         fi
21190
21191         TINFO_LDFLAGS="-L${LIB_DIR}"
21192         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21193 fi
21194
21195 if test "$DFT_LWR_MODEL" = shared ; then
21196         case $cf_cv_system_name in #(vi
21197         cygwin*|msys*)
21198                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21199                 TINFO_SUFFIX=.dll
21200                 ;;
21201         esac
21202 fi
21203
21204 if test "x$with_dlsym" = xyes ; then
21205
21206 # remove dl library from $TICS_LIST
21207 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21208
21209 fi
21210
21211 if test "$DFT_LWR_MODEL" = "libtool"; then
21212     OBJEXT=lo
21213 fi
21214
21215 # needed for Ada95
21216 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21217
21218 case $DFT_LWR_MODEL in
21219 normal|debug|profile)
21220
21221 if test "$GCC" = yes ; then
21222         case $cf_cv_system_name in #(
21223         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21224                 LDFLAGS_STATIC=
21225                 LDFLAGS_SHARED=
21226                 ;;
21227     *)  #( normally, except when broken
21228         LDFLAGS_STATIC=-static
21229         LDFLAGS_SHARED=-dynamic
21230         ;;
21231     esac
21232 else
21233         case $cf_cv_system_name in #(
21234         aix[4-7]*)      #( from ld manpage
21235                 LDFLAGS_STATIC=-bstatic
21236                 LDFLAGS_SHARED=-bdynamic
21237                 ;;
21238         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21239                 # We could also use just "archive" and "shared".
21240                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21241                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21242                 ;;
21243         irix*)          #( from ld manpage IRIX64
21244                 LDFLAGS_STATIC=-Bstatic
21245                 LDFLAGS_SHARED=-Bdynamic
21246                 ;;
21247         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21248                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21249                 LDFLAGS_STATIC=-noso
21250                 LDFLAGS_SHARED=-so_archive
21251                 ;;
21252         solaris2*)
21253                 LDFLAGS_STATIC=-Bstatic
21254                 LDFLAGS_SHARED=-Bdynamic
21255                 ;;
21256         esac
21257 fi
21258
21259 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21260 then
21261         echo "$as_me:21261: checking if linker supports switching between static/dynamic" >&5
21262 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21263
21264         rm -f libconftest.a
21265         cat >conftest.$ac_ext <<EOF
21266 #line 21266 "configure"
21267 #include <stdio.h>
21268 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21269 EOF
21270         if { (eval echo "$as_me:21270: \"$ac_compile\"") >&5
21271   (eval $ac_compile) 2>&5
21272   ac_status=$?
21273   echo "$as_me:21273: \$? = $ac_status" >&5
21274   (exit $ac_status); } ; then
21275                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21276                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21277         fi
21278         rm -f conftest.*
21279
21280         cf_save_LIBS="$LIBS"
21281
21282         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21283         cat >conftest.$ac_ext <<_ACEOF
21284 #line 21284 "configure"
21285 #include "confdefs.h"
21286
21287 #line 21287 "configure"
21288 #include <stdio.h>
21289 int cf_ldflags_static(FILE *fp);
21290
21291 int
21292 main ()
21293 {
21294
21295         return cf_ldflags_static(stdin);
21296
21297   ;
21298   return 0;
21299 }
21300 _ACEOF
21301 rm -f conftest.$ac_objext conftest$ac_exeext
21302 if { (eval echo "$as_me:21302: \"$ac_link\"") >&5
21303   (eval $ac_link) 2>&5
21304   ac_status=$?
21305   echo "$as_me:21305: \$? = $ac_status" >&5
21306   (exit $ac_status); } &&
21307          { ac_try='test -s conftest$ac_exeext'
21308   { (eval echo "$as_me:21308: \"$ac_try\"") >&5
21309   (eval $ac_try) 2>&5
21310   ac_status=$?
21311   echo "$as_me:21311: \$? = $ac_status" >&5
21312   (exit $ac_status); }; }; then
21313
21314         # some linkers simply ignore the -dynamic
21315         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21316         *static*) # (vi
21317                 cf_ldflags_static=no
21318                 ;;
21319         *)
21320                 cf_ldflags_static=yes
21321                 ;;
21322         esac
21323
21324 else
21325   echo "$as_me: failed program was:" >&5
21326 cat conftest.$ac_ext >&5
21327 cf_ldflags_static=no
21328 fi
21329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21330
21331         rm -f libconftest.*
21332         LIBS="$cf_save_LIBS"
21333
21334         echo "$as_me:21334: result: $cf_ldflags_static" >&5
21335 echo "${ECHO_T}$cf_ldflags_static" >&6
21336
21337         if test $cf_ldflags_static != yes
21338         then
21339                 LDFLAGS_STATIC=
21340                 LDFLAGS_SHARED=
21341         fi
21342 else
21343         LDFLAGS_STATIC=
21344         LDFLAGS_SHARED=
21345 fi
21346
21347         ;;
21348 esac
21349
21350 echo "$as_me:21350: checking where we will install curses.h" >&5
21351 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21352
21353 includesubdir=
21354 if test "$with_overwrite" = no && \
21355  ( test "x$includedir" = 'x${prefix}/include' || \
21356    test "x$includedir" = "x${prefix}/include" )
21357 then
21358         includesubdir="/ncurses${LIB_SUFFIX}"
21359 fi
21360 echo "$as_me:21360: result: ${includedir}${includesubdir}" >&5
21361 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21362
21363 ### Resolve a conflict between normal and wide-curses by forcing applications
21364 ### that will need libutf8 to add it to their configure script.
21365 if test "$with_overwrite" != no ; then
21366 if test "$NCURSES_LIBUTF8" = 1 ; then
21367         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21368         { echo "$as_me:21368: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21369 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21370 fi
21371 fi
21372 WITH_OVERWRITE=$with_overwrite
21373
21374 # used to separate tack out of the tree
21375 NCURSES_TREE=
21376
21377 ### predefined stuff for the test programs
21378
21379 cat >>confdefs.h <<\EOF
21380 #define HAVE_SLK_COLOR 1
21381 EOF
21382
21383 ### Construct the list of subdirectories for which we'll customize makefiles
21384 ### with the appropriate compile-rules.
21385
21386 echo "$as_me:21386: checking for src modules" >&5
21387 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21388
21389 # dependencies and linker-arguments for test-programs
21390 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21391 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21392 if test "$DFT_LWR_MODEL" = "libtool"; then
21393         TEST_ARGS="${TEST_DEPS}"
21394         TEST_ARG2="${TEST_DEP2}"
21395 else
21396         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21397         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21398 fi
21399
21400 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21401 cf_cv_src_modules=
21402 for cf_dir in $modules_to_build
21403 do
21404         if test -f $srcdir/$cf_dir/modules; then
21405
21406                 # We may/may not have tack in the distribution, though the
21407                 # makefile is.
21408                 if test $cf_dir = tack ; then
21409                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21410                                 continue
21411                         fi
21412                 fi
21413
21414                 if test -z "$cf_cv_src_modules"; then
21415                         cf_cv_src_modules=$cf_dir
21416                 else
21417                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21418                 fi
21419
21420                 # Make the ncurses_cfg.h file record the library interface files as
21421                 # well.  These are header files that are the same name as their
21422                 # directory.  Ncurses is the only library that does not follow
21423                 # that pattern.
21424                 if test $cf_dir = tack ; then
21425                         continue
21426                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21427
21428 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21429
21430                         cat >>confdefs.h <<EOF
21431 #define HAVE_${cf_have_include}_H 1
21432 EOF
21433
21434                         cat >>confdefs.h <<EOF
21435 #define HAVE_LIB${cf_have_include} 1
21436 EOF
21437
21438                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21439                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21440                         if test "$DFT_LWR_MODEL" = "libtool"; then
21441                                 TEST_ARGS="${TEST_DEPS}"
21442                                 TEST_ARG2="${TEST_DEP2}"
21443                         else
21444                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21445                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21446                         fi
21447                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21448                 fi
21449         fi
21450 done
21451 echo "$as_me:21451: result: $cf_cv_src_modules" >&5
21452 echo "${ECHO_T}$cf_cv_src_modules" >&6
21453
21454 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21455 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21456
21457 SRC_SUBDIRS=
21458 if test "x$cf_with_manpages" != xno ; then
21459         SRC_SUBDIRS="$SRC_SUBDIRS man"
21460 fi
21461 SRC_SUBDIRS="$SRC_SUBDIRS include"
21462 for cf_dir in $cf_cv_src_modules
21463 do
21464         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21465 done
21466 if test "x$cf_with_tests" != "xno" ; then
21467         SRC_SUBDIRS="$SRC_SUBDIRS test"
21468 fi
21469 # always make this, to install the ncurses-config script
21470 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21471 if test "$cf_with_cxx_binding" != no; then
21472         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21473         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21474 fi
21475
21476 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21477 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21478
21479 ADA_SUBDIRS=
21480 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21481         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21482         ADA_SUBDIRS="gen src"
21483         if test "x$cf_with_tests" != "xno" ; then
21484                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21485         fi
21486 fi
21487
21488 SUB_MAKEFILES=
21489 for cf_dir in $SRC_SUBDIRS
21490 do
21491         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21492 done
21493
21494 if test -n "$ADA_SUBDIRS"; then
21495         for cf_dir in $ADA_SUBDIRS
21496         do
21497                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21498         done
21499
21500 fi
21501
21502 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21503    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21504    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21505 fi
21506
21507 DIRS_TO_MAKE="lib"
21508 for cf_item in $cf_list_models
21509 do
21510
21511         case $cf_item in
21512         libtool) cf_subdir='obj_lo'  ;;
21513         normal)  cf_subdir='objects' ;;
21514         debug)   cf_subdir='obj_g' ;;
21515         profile) cf_subdir='obj_p' ;;
21516         shared)
21517                 case $cf_cv_system_name in #(vi
21518                 cygwin|msys) #(vi
21519                         cf_subdir='objects' ;;
21520                 *)
21521                         cf_subdir='obj_s' ;;
21522                 esac
21523         esac
21524
21525         for cf_item2 in $DIRS_TO_MAKE
21526         do
21527                 test $cf_item2 = $cf_subdir && break
21528         done
21529         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21530 done
21531 for cf_dir in $DIRS_TO_MAKE
21532 do
21533         test ! -d $cf_dir && mkdir $cf_dir
21534 done
21535
21536 # symbols that differ when compiling Ada95 by itself.
21537 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21538
21539 # values to use as strings
21540
21541 cat >>confdefs.h <<EOF
21542 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21543 EOF
21544
21545 cat >>confdefs.h <<EOF
21546 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21547 EOF
21548
21549 ### Now that we're done running tests, add the compiler-warnings, if any
21550
21551 cf_fix_cppflags=no
21552 cf_new_cflags=
21553 cf_new_cppflags=
21554 cf_new_extra_cppflags=
21555
21556 for cf_add_cflags in $EXTRA_CFLAGS
21557 do
21558 case $cf_fix_cppflags in
21559 no)
21560         case $cf_add_cflags in #(vi
21561         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21562                 case $cf_add_cflags in
21563                 -D*)
21564                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21565
21566                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21567                                 && test -z "${cf_tst_cflags}" \
21568                                 && cf_fix_cppflags=yes
21569
21570                         if test $cf_fix_cppflags = yes ; then
21571                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21572                                 continue
21573                         elif test "${cf_tst_cflags}" = "\"'" ; then
21574                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21575                                 continue
21576                         fi
21577                         ;;
21578                 esac
21579                 case "$CPPFLAGS" in
21580                 *$cf_add_cflags) #(vi
21581                         ;;
21582                 *) #(vi
21583                         case $cf_add_cflags in #(vi
21584                         -D*)
21585                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21586
21587 CPPFLAGS=`echo "$CPPFLAGS" | \
21588         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21589                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21590
21591                                 ;;
21592                         esac
21593                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21594                         ;;
21595                 esac
21596                 ;;
21597         *)
21598                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21599                 ;;
21600         esac
21601         ;;
21602 yes)
21603         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21604
21605         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21606
21607         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21608                 && test -z "${cf_tst_cflags}" \
21609                 && cf_fix_cppflags=no
21610         ;;
21611 esac
21612 done
21613
21614 if test -n "$cf_new_cflags" ; then
21615
21616         CFLAGS="$CFLAGS $cf_new_cflags"
21617 fi
21618
21619 if test -n "$cf_new_cppflags" ; then
21620
21621         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21622 fi
21623
21624 if test -n "$cf_new_extra_cppflags" ; then
21625
21626         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21627 fi
21628
21629 ### Define substitutions for header files to avoid name-pollution
21630
21631 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21632         HAVE_TCGETATTR=1
21633 else
21634         HAVE_TCGETATTR=0
21635 fi
21636
21637 if test "x$ac_cv_header_stdint_h" = xyes ; then
21638         HAVE_STDINT_H=1
21639 else
21640         HAVE_STDINT_H=0
21641 fi
21642
21643 if test "x$ac_cv_header_termio_h" = xyes ; then
21644         HAVE_TERMIO_H=1
21645 else
21646         HAVE_TERMIO_H=0
21647 fi
21648
21649 if test "x$ac_cv_header_termios_h" = xyes ; then
21650         HAVE_TERMIOS_H=1
21651 else
21652         HAVE_TERMIOS_H=0
21653 fi
21654
21655 ################################################################################
21656 test "x$use_database" = xyes && \
21657 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21658
21659 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21660 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21661
21662 if test "x$enable_pc_files" = xyes ; then \
21663 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21664 MAKE_PC_FILES=
21665 else
21666 MAKE_PC_FILES="#"
21667 fi
21668
21669 # Extract the first word of "tic", so it can be a program name with args.
21670 set dummy tic; ac_word=$2
21671 echo "$as_me:21671: checking for $ac_word" >&5
21672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21673 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21674   echo $ECHO_N "(cached) $ECHO_C" >&6
21675 else
21676   case $TIC_PATH in
21677   [\\/]* | ?:[\\/]*)
21678   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21679   ;;
21680   *)
21681   ac_save_IFS=$IFS; IFS=$ac_path_separator
21682 ac_dummy="$PATH:/usr/local/ncurses/bin"
21683 for ac_dir in $ac_dummy; do
21684   IFS=$ac_save_IFS
21685   test -z "$ac_dir" && ac_dir=.
21686   if $as_executable_p "$ac_dir/$ac_word"; then
21687    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21688    echo "$as_me:21688: found $ac_dir/$ac_word" >&5
21689    break
21690 fi
21691 done
21692
21693   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21694   ;;
21695 esac
21696 fi
21697 TIC_PATH=$ac_cv_path_TIC_PATH
21698
21699 if test -n "$TIC_PATH"; then
21700   echo "$as_me:21700: result: $TIC_PATH" >&5
21701 echo "${ECHO_T}$TIC_PATH" >&6
21702 else
21703   echo "$as_me:21703: result: no" >&5
21704 echo "${ECHO_T}no" >&6
21705 fi
21706
21707 if test -n "$FALLBACK_LIST"
21708 then
21709         if test "$TIC_PATH" = unknown
21710         then
21711                 { echo "$as_me:21711: WARNING: no tic program found for fallbacks" >&5
21712 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21713         fi
21714 fi
21715
21716 if test "x$cf_with_tests" != xno ; then
21717         MAKE_TESTS=
21718 else
21719         MAKE_TESTS="#"
21720 fi
21721
21722 ADAHTML_DIR=../../doc/html/ada
21723
21724 # these could be configurable, but are not currently
21725 PANEL_NAME=panel
21726 MENU_NAME=menu
21727 FORM_NAME=form
21728 CXX_NAME=ncurses++
21729
21730 # workaround for g++ versus Solaris (20131116)
21731 case $cf_cv_system_name in #(vi
21732 solaris2*) #(vi
21733         case "x$CPPFLAGS" in #(vi
21734         *-D_XOPEN_SOURCE_EXTENDED*)
21735                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21736
21737 echo "${as_me:-configure}:21737: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21738
21739                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21740                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21741                 ;;
21742         esac
21743         ;;
21744 esac
21745
21746 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21747 case "x$NCURSES_OSPEED" in #(vi
21748 *short*) #(vi
21749         cf_compatible=1
21750         ;;
21751 *)
21752         cf_compatible=0
21753         ;;
21754 esac
21755
21756 cat >>confdefs.h <<EOF
21757 #define NCURSES_OSPEED_COMPAT $cf_compatible
21758 EOF
21759
21760 case "x$cf_cv_typeof_chtype" in
21761 xshort|xint|xlong)
21762         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21763         ;;
21764 esac
21765
21766 case "x$cf_cv_typeof_mmask_t" in
21767 xshort|xint|xlong)
21768         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21769         ;;
21770 esac
21771
21772 # substitute into misc/Makefile to suppress
21773 # (un)install.data from the
21774 # (un)install rules.
21775 if test "x$cf_with_db_install" = "xno"; then
21776         MISC_INSTALL_DATA=
21777         MISC_UNINSTALL_DATA=
21778 else
21779         MISC_INSTALL_DATA=install.data
21780         MISC_UNINSTALL_DATA=uninstall.data
21781 fi
21782
21783 SUB_SCRIPTS=
21784
21785 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"
21786 ac_config_commands="$ac_config_commands default"
21787 cat >confcache <<\_ACEOF
21788 # This file is a shell script that caches the results of configure
21789 # tests run on this system so they can be shared between configure
21790 # scripts and configure runs, see configure's option --config-cache.
21791 # It is not useful on other systems.  If it contains results you don't
21792 # want to keep, you may remove or edit it.
21793 #
21794 # config.status only pays attention to the cache file if you give it
21795 # the --recheck option to rerun configure.
21796 #
21797 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21798 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21799 # following values.
21800
21801 _ACEOF
21802
21803 # The following way of writing the cache mishandles newlines in values,
21804 # but we know of no workaround that is simple, portable, and efficient.
21805 # So, don't put newlines in cache variables' values.
21806 # Ultrix sh set writes to stderr and can't be redirected directly,
21807 # and sets the high bit in the cache file unless we assign to the vars.
21808 {
21809   (set) 2>&1 |
21810     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21811     *ac_space=\ *)
21812       # `set' does not quote correctly, so add quotes (double-quote
21813       # substitution turns \\\\ into \\, and sed turns \\ into \).
21814       sed -n \
21815         "s/'/'\\\\''/g;
21816           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21817       ;;
21818     *)
21819       # `set' quotes correctly as required by POSIX, so do not add quotes.
21820       sed -n \
21821         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21822       ;;
21823     esac;
21824 } |
21825   sed '
21826      t clear
21827      : clear
21828      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21829      t end
21830      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21831      : end' >>confcache
21832 if cmp -s $cache_file confcache; then :; else
21833   if test -w $cache_file; then
21834     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21835     cat confcache >$cache_file
21836   else
21837     echo "not updating unwritable cache $cache_file"
21838   fi
21839 fi
21840 rm -f confcache
21841
21842 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21843 # Let make expand exec_prefix.
21844 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21845
21846 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21847 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21848 # trailing colons and then remove the whole line if VPATH becomes empty
21849 # (actually we leave an empty line to preserve line numbers).
21850 if test "x$srcdir" = x.; then
21851   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21852 s/:*\$(srcdir):*/:/;
21853 s/:*\${srcdir}:*/:/;
21854 s/:*@srcdir@:*/:/;
21855 s/^\([^=]*=[    ]*\):*/\1/;
21856 s/:*$//;
21857 s/^[^=]*=[      ]*$//;
21858 }'
21859 fi
21860
21861 DEFS=-DHAVE_CONFIG_H
21862
21863 : ${CONFIG_STATUS=./config.status}
21864 ac_clean_files_save=$ac_clean_files
21865 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21866 { echo "$as_me:21866: creating $CONFIG_STATUS" >&5
21867 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21868 cat >$CONFIG_STATUS <<_ACEOF
21869 #! $SHELL
21870 # Generated automatically by configure.
21871 # Run this file to recreate the current configuration.
21872 # Compiler output produced by configure, useful for debugging
21873 # configure, is in config.log if it exists.
21874
21875 debug=false
21876 SHELL=\${CONFIG_SHELL-$SHELL}
21877 ac_cs_invocation="\$0 \$@"
21878
21879 _ACEOF
21880
21881 cat >>$CONFIG_STATUS <<\_ACEOF
21882 # Be Bourne compatible
21883 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21884   emulate sh
21885   NULLCMD=:
21886 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21887   set -o posix
21888 fi
21889
21890 # Name of the executable.
21891 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21892
21893 if expr a : '\(a\)' >/dev/null 2>&1; then
21894   as_expr=expr
21895 else
21896   as_expr=false
21897 fi
21898
21899 rm -f conf$$ conf$$.exe conf$$.file
21900 echo >conf$$.file
21901 if ln -s conf$$.file conf$$ 2>/dev/null; then
21902   # We could just check for DJGPP; but this test a) works b) is more generic
21903   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21904   if test -f conf$$.exe; then
21905     # Don't use ln at all; we don't have any links
21906     as_ln_s='cp -p'
21907   else
21908     as_ln_s='ln -s'
21909   fi
21910 elif ln conf$$.file conf$$ 2>/dev/null; then
21911   as_ln_s=ln
21912 else
21913   as_ln_s='cp -p'
21914 fi
21915 rm -f conf$$ conf$$.exe conf$$.file
21916
21917 as_executable_p="test -f"
21918
21919 # Support unset when possible.
21920 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21921   as_unset=unset
21922 else
21923   as_unset=false
21924 fi
21925
21926 # NLS nuisances.
21927 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21928 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21929 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21930 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21931 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21932 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21933 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21934 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21935
21936 # IFS
21937 # We need space, tab and new line, in precisely that order.
21938 as_nl='
21939 '
21940 IFS="   $as_nl"
21941
21942 # CDPATH.
21943 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21944
21945 exec 6>&1
21946
21947 _ACEOF
21948
21949 # Files that config.status was made for.
21950 if test -n "$ac_config_files"; then
21951   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21952 fi
21953
21954 if test -n "$ac_config_headers"; then
21955   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21956 fi
21957
21958 if test -n "$ac_config_links"; then
21959   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21960 fi
21961
21962 if test -n "$ac_config_commands"; then
21963   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21964 fi
21965
21966 cat >>$CONFIG_STATUS <<\EOF
21967
21968 ac_cs_usage="\
21969 \`$as_me' instantiates files from templates according to the
21970 current configuration.
21971
21972 Usage: $0 [OPTIONS] [FILE]...
21973
21974   -h, --help       print this help, then exit
21975   -V, --version    print version number, then exit
21976   -d, --debug      don't remove temporary files
21977       --recheck    update $as_me by reconfiguring in the same conditions
21978   --file=FILE[:TEMPLATE]
21979                    instantiate the configuration file FILE
21980   --header=FILE[:TEMPLATE]
21981                    instantiate the configuration header FILE
21982
21983 Configuration files:
21984 $config_files
21985
21986 Configuration headers:
21987 $config_headers
21988
21989 Configuration commands:
21990 $config_commands
21991
21992 Report bugs to <dickey@invisible-island.net>."
21993 EOF
21994
21995 cat >>$CONFIG_STATUS <<EOF
21996 ac_cs_version="\\
21997 config.status
21998 configured by $0, generated by GNU Autoconf 2.52.20121002,
21999   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22000
22001 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22002 Free Software Foundation, Inc.
22003 This config.status script is free software; the Free Software Foundation
22004 gives unlimited permission to copy, distribute and modify it."
22005 srcdir=$srcdir
22006 INSTALL="$INSTALL"
22007 EOF
22008
22009 cat >>$CONFIG_STATUS <<\EOF
22010 # If no file are specified by the user, then we need to provide default
22011 # value.  By we need to know if files were specified by the user.
22012 ac_need_defaults=:
22013 while test $# != 0
22014 do
22015   case $1 in
22016   --*=*)
22017     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22018     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22019     shift
22020     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22021     shift
22022     ;;
22023   -*);;
22024   *) # This is not an option, so the user has probably given explicit
22025      # arguments.
22026      ac_need_defaults=false;;
22027   esac
22028
22029   case $1 in
22030   # Handling of the options.
22031 EOF
22032 cat >>$CONFIG_STATUS <<EOF
22033   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22034     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22035     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22036 EOF
22037 cat >>$CONFIG_STATUS <<\EOF
22038   --version | --vers* | -V )
22039     echo "$ac_cs_version"; exit 0 ;;
22040   --he | --h)
22041     # Conflict between --help and --header
22042     { { echo "$as_me:22042: error: ambiguous option: $1
22043 Try \`$0 --help' for more information." >&5
22044 echo "$as_me: error: ambiguous option: $1
22045 Try \`$0 --help' for more information." >&2;}
22046    { (exit 1); exit 1; }; };;
22047   --help | --hel | -h )
22048     echo "$ac_cs_usage"; exit 0 ;;
22049   --debug | --d* | -d )
22050     debug=: ;;
22051   --file | --fil | --fi | --f )
22052     shift
22053     CONFIG_FILES="$CONFIG_FILES $1"
22054     ac_need_defaults=false;;
22055   --header | --heade | --head | --hea )
22056     shift
22057     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22058     ac_need_defaults=false;;
22059
22060   # This is an error.
22061   -*) { { echo "$as_me:22061: error: unrecognized option: $1
22062 Try \`$0 --help' for more information." >&5
22063 echo "$as_me: error: unrecognized option: $1
22064 Try \`$0 --help' for more information." >&2;}
22065    { (exit 1); exit 1; }; } ;;
22066
22067   *) ac_config_targets="$ac_config_targets $1" ;;
22068
22069   esac
22070   shift
22071 done
22072
22073 exec 5>>config.log
22074 cat >&5 << _ACEOF
22075
22076 ## ----------------------- ##
22077 ## Running config.status.  ##
22078 ## ----------------------- ##
22079
22080 This file was extended by $as_me 2.52.20121002, executed with
22081   CONFIG_FILES    = $CONFIG_FILES
22082   CONFIG_HEADERS  = $CONFIG_HEADERS
22083   CONFIG_LINKS    = $CONFIG_LINKS
22084   CONFIG_COMMANDS = $CONFIG_COMMANDS
22085   > $ac_cs_invocation
22086 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22087
22088 _ACEOF
22089 EOF
22090
22091 cat >>$CONFIG_STATUS <<EOF
22092 #
22093 # INIT-COMMANDS section.
22094 #
22095
22096 ### Special initialization commands, used to pass information from the
22097 ### configuration-run into config.status
22098
22099 AWK="$AWK"
22100 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22101 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22102 ECHO_LD="$ECHO_LD"
22103 LDCONFIG="$LDCONFIG"
22104 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22105 LIB_NAME="$LIB_NAME"
22106 LIB_PREFIX="$LIB_PREFIX"
22107 LIB_SUBSETS="$LIB_SUBSETS"
22108 LIB_SUFFIX="$LIB_SUFFIX"
22109 LIB_TRACING="$LIB_TRACING"
22110 LN_S="$LN_S"
22111 MAKE_TERMINFO="$MAKE_TERMINFO"
22112 NCURSES_MAJOR="$NCURSES_MAJOR"
22113 NCURSES_MINOR="$NCURSES_MINOR"
22114 NCURSES_OSPEED="$NCURSES_OSPEED"
22115 NCURSES_PATCH="$NCURSES_PATCH"
22116 SRC_SUBDIRS="$SRC_SUBDIRS"
22117 TERMINFO="$TERMINFO"
22118 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22119 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22120 TICS_NAME="$TICS_NAME"
22121 TIC_PATH="$TIC_PATH"
22122 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22123 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22124 TINFO_NAME="$TINFO_NAME"
22125 TINFO_SUFFIX="$TINFO_SUFFIX"
22126 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22127 WITH_CURSES_H="$with_curses_h"
22128 WITH_ECHO="${enable_echo:=yes}"
22129 WITH_OVERWRITE="$with_overwrite"
22130 cf_LIST_MODELS="$cf_list_models"
22131 cf_cv_abi_version="$cf_cv_abi_version"
22132 cf_cv_do_relink="$cf_cv_do_relink"
22133 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22134 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22135 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22136 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22137 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22138 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22139 cf_cv_rel_version="$cf_cv_rel_version"
22140 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22141 cf_cv_shared_soname='$cf_cv_shared_soname'
22142 cf_cv_shlib_version="$cf_cv_shlib_version"
22143 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22144 cf_cv_system_name="$cf_cv_system_name"
22145 cf_cv_term_driver="$with_term_driver"
22146 cf_with_ada="$cf_with_ada"
22147 cf_with_cxx_binding="$cf_with_cxx_binding"
22148 cf_with_db_install="$cf_with_db_install"
22149 cf_with_manpages="$cf_with_manpages"
22150 cf_with_tests="$cf_with_tests"
22151 with_shared_cxx="$with_shared_cxx"
22152 host="$host"
22153 target="$target"
22154
22155 EOF
22156
22157 cat >>$CONFIG_STATUS <<\EOF
22158 for ac_config_target in $ac_config_targets
22159 do
22160   case "$ac_config_target" in
22161   # Handling of arguments.
22162   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22163   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22164   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22165   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22166   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22167   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22168   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22169   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22170   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22171   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22172   *) { { echo "$as_me:22172: error: invalid argument: $ac_config_target" >&5
22173 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22174    { (exit 1); exit 1; }; };;
22175   esac
22176 done
22177
22178 # If the user did not use the arguments to specify the items to instantiate,
22179 # then the envvar interface is used.  Set only those that are not.
22180 # We use the long form for the default assignment because of an extremely
22181 # bizarre bug on SunOS 4.1.3.
22182 if $ac_need_defaults; then
22183   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22184   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22185   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22186 fi
22187
22188 # Create a temporary directory, and hook for its removal unless debugging.
22189 $debug ||
22190 {
22191   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22192   trap '{ (exit 1); exit 1; }' 1 2 13 15
22193 }
22194
22195 # Create a (secure) tmp directory for tmp files.
22196 : ${TMPDIR=/tmp}
22197 {
22198   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22199   test -n "$tmp" && test -d "$tmp"
22200 }  ||
22201 {
22202   tmp=$TMPDIR/cs$$-$RANDOM
22203   (umask 077 && mkdir $tmp)
22204 } ||
22205 {
22206    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22207    { (exit 1); exit 1; }
22208 }
22209
22210 EOF
22211
22212 cat >>$CONFIG_STATUS <<EOF
22213
22214 #
22215 # CONFIG_FILES section.
22216 #
22217
22218 # No need to generate the scripts if there are no CONFIG_FILES.
22219 # This happens for instance when ./config.status config.h
22220 if test -n "\$CONFIG_FILES"; then
22221   # Protect against being on the right side of a sed subst in config.status.
22222   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22223    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22224 s,@SHELL@,$SHELL,;t t
22225 s,@exec_prefix@,$exec_prefix,;t t
22226 s,@prefix@,$prefix,;t t
22227 s,@program_transform_name@,$program_transform_name,;t t
22228 s,@bindir@,$bindir,;t t
22229 s,@sbindir@,$sbindir,;t t
22230 s,@libexecdir@,$libexecdir,;t t
22231 s,@datarootdir@,$datarootdir,;t t
22232 s,@datadir@,$datadir,;t t
22233 s,@sysconfdir@,$sysconfdir,;t t
22234 s,@sharedstatedir@,$sharedstatedir,;t t
22235 s,@localstatedir@,$localstatedir,;t t
22236 s,@libdir@,$libdir,;t t
22237 s,@includedir@,$includedir,;t t
22238 s,@oldincludedir@,$oldincludedir,;t t
22239 s,@infodir@,$infodir,;t t
22240 s,@mandir@,$mandir,;t t
22241 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22242 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22243 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22244 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22245 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22246 s,@build_alias@,$build_alias,;t t
22247 s,@host_alias@,$host_alias,;t t
22248 s,@target_alias@,$target_alias,;t t
22249 s,@ECHO_C@,$ECHO_C,;t t
22250 s,@ECHO_N@,$ECHO_N,;t t
22251 s,@ECHO_T@,$ECHO_T,;t t
22252 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22253 s,@DEFS@,$DEFS,;t t
22254 s,@LIBS@,$LIBS,;t t
22255 s,@top_builddir@,$top_builddir,;t t
22256 s,@EGREP@,$EGREP,;t t
22257 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22258 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22259 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22260 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22261 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22262 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22263 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22264 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22265 s,@build@,$build,;t t
22266 s,@build_cpu@,$build_cpu,;t t
22267 s,@build_vendor@,$build_vendor,;t t
22268 s,@build_os@,$build_os,;t t
22269 s,@host@,$host,;t t
22270 s,@host_cpu@,$host_cpu,;t t
22271 s,@host_vendor@,$host_vendor,;t t
22272 s,@host_os@,$host_os,;t t
22273 s,@target@,$target,;t t
22274 s,@target_cpu@,$target_cpu,;t t
22275 s,@target_vendor@,$target_vendor,;t t
22276 s,@target_os@,$target_os,;t t
22277 s,@CC@,$CC,;t t
22278 s,@CFLAGS@,$CFLAGS,;t t
22279 s,@LDFLAGS@,$LDFLAGS,;t t
22280 s,@CPPFLAGS@,$CPPFLAGS,;t t
22281 s,@ac_ct_CC@,$ac_ct_CC,;t t
22282 s,@EXEEXT@,$EXEEXT,;t t
22283 s,@OBJEXT@,$OBJEXT,;t t
22284 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22285 s,@CPP@,$CPP,;t t
22286 s,@LDCONFIG@,$LDCONFIG,;t t
22287 s,@CXX@,$CXX,;t t
22288 s,@CXXFLAGS@,$CXXFLAGS,;t t
22289 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22290 s,@AWK@,$AWK,;t t
22291 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22292 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22293 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22294 s,@LINT@,$LINT,;t t
22295 s,@LINT_OPTS@,$LINT_OPTS,;t t
22296 s,@LN_S@,$LN_S,;t t
22297 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22298 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22299 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22300 s,@SET_MAKE@,$SET_MAKE,;t t
22301 s,@CTAGS@,$CTAGS,;t t
22302 s,@ETAGS@,$ETAGS,;t t
22303 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22304 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22305 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22306 s,@RANLIB@,$RANLIB,;t t
22307 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22308 s,@LD@,$LD,;t t
22309 s,@ac_ct_LD@,$ac_ct_LD,;t t
22310 s,@AR@,$AR,;t t
22311 s,@ac_ct_AR@,$ac_ct_AR,;t t
22312 s,@NM@,$NM,;t t
22313 s,@ac_ct_NM@,$ac_ct_NM,;t t
22314 s,@ARFLAGS@,$ARFLAGS,;t t
22315 s,@DESTDIR@,$DESTDIR,;t t
22316 s,@BUILD_CC@,$BUILD_CC,;t t
22317 s,@BUILD_CPP@,$BUILD_CPP,;t t
22318 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22319 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22320 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22321 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22322 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22323 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22324 s,@cf_list_models@,$cf_list_models,;t t
22325 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22326 s,@LIBTOOL@,$LIBTOOL,;t t
22327 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22328 s,@LT_UNDEF@,$LT_UNDEF,;t t
22329 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22330 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22331 s,@LIB_CREATE@,$LIB_CREATE,;t t
22332 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22333 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22334 s,@LIB_PREP@,$LIB_PREP,;t t
22335 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22336 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22337 s,@LIB_LINK@,$LIB_LINK,;t t
22338 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22339 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22340 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22341 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22342 s,@TICS_NAME@,$TICS_NAME,;t t
22343 s,@TINFO_NAME@,$TINFO_NAME,;t t
22344 s,@LIB_NAME@,$LIB_NAME,;t t
22345 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22346 s,@CC_G_OPT@,$CC_G_OPT,;t t
22347 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22348 s,@LD_MODEL@,$LD_MODEL,;t t
22349 s,@shlibdir@,$shlibdir,;t t
22350 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22351 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22352 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22353 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22354 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22355 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22356 s,@LINK_PROGS@,$LINK_PROGS,;t t
22357 s,@LINK_TESTS@,$LINK_TESTS,;t t
22358 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22359 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22360 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22361 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22362 s,@RPATH_LIST@,$RPATH_LIST,;t t
22363 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22364 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22365 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22366 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22367 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22368 s,@XTERM_KBS@,$XTERM_KBS,;t t
22369 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22370 s,@TERMINFO@,$TERMINFO,;t t
22371 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22372 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22373 s,@TERMPATH@,$TERMPATH,;t t
22374 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22375 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22376 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22377 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22378 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22379 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22380 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22381 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22382 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22383 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22384 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22385 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22386 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22387 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22388 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22389 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22390 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22391 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22392 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22393 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22394 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22395 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22396 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22397 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22398 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22399 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22400 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22401 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22402 s,@PTHREAD@,$PTHREAD,;t t
22403 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22404 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22405 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22406 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22407 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22408 s,@ECHO_LT@,$ECHO_LT,;t t
22409 s,@ECHO_LD@,$ECHO_LD,;t t
22410 s,@RULE_CC@,$RULE_CC,;t t
22411 s,@SHOW_CC@,$SHOW_CC,;t t
22412 s,@ECHO_CC@,$ECHO_CC,;t t
22413 s,@ECHO_LINK@,$ECHO_LINK,;t t
22414 s,@ADAFLAGS@,$ADAFLAGS,;t t
22415 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22416 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22417 s,@ADA_TRACE@,$ADA_TRACE,;t t
22418 s,@MATH_LIB@,$MATH_LIB,;t t
22419 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22420 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22421 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22422 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22423 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22424 s,@TEST_LIBS@,$TEST_LIBS,;t t
22425 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22426 s,@CXXCPP@,$CXXCPP,;t t
22427 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22428 s,@CXX_AR@,$CXX_AR,;t t
22429 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22430 s,@CXXLIBS@,$CXXLIBS,;t t
22431 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22432 s,@gnat_exists@,$gnat_exists,;t t
22433 s,@M4_exists@,$M4_exists,;t t
22434 s,@cf_ada_make@,$cf_ada_make,;t t
22435 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22436 s,@cf_compile_generics@,$cf_compile_generics,;t t
22437 s,@cf_generic_objects@,$cf_generic_objects,;t t
22438 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22439 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22440 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22441 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22442 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22443 s,@cf_ada_package@,$cf_ada_package,;t t
22444 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22445 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22446 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22447 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22448 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22449 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22450 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22451 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22452 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22453 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22454 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22455 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22456 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22457 s,@TICS_LIBS@,$TICS_LIBS,;t t
22458 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22459 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22460 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22461 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22462 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22463 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22464 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22465 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22466 s,@includesubdir@,$includesubdir,;t t
22467 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22468 s,@TICS_LIST@,$TICS_LIST,;t t
22469 s,@TINFO_LIST@,$TINFO_LIST,;t t
22470 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22471 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22472 s,@TEST_ARGS@,$TEST_ARGS,;t t
22473 s,@TEST_DEPS@,$TEST_DEPS,;t t
22474 s,@TEST_ARG2@,$TEST_ARG2,;t t
22475 s,@TEST_DEP2@,$TEST_DEP2,;t t
22476 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22477 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22478 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22479 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22480 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22481 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22482 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22483 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22484 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22485 s,@cross_compiling@,$cross_compiling,;t t
22486 s,@TIC_PATH@,$TIC_PATH,;t t
22487 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22488 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22489 s,@PANEL_NAME@,$PANEL_NAME,;t t
22490 s,@MENU_NAME@,$MENU_NAME,;t t
22491 s,@FORM_NAME@,$FORM_NAME,;t t
22492 s,@CXX_NAME@,$CXX_NAME,;t t
22493 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22494 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22495 CEOF
22496
22497 EOF
22498
22499   cat >>$CONFIG_STATUS <<\EOF
22500   # Split the substitutions into bite-sized pieces for seds with
22501   # small command number limits, like on Digital OSF/1 and HP-UX.
22502   ac_max_sed_lines=48
22503   ac_sed_frag=1 # Number of current file.
22504   ac_beg=1 # First line for current file.
22505   ac_end=$ac_max_sed_lines # Line after last line for current file.
22506   ac_more_lines=:
22507   ac_sed_cmds=
22508   while $ac_more_lines; do
22509     if test $ac_beg -gt 1; then
22510       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22511     else
22512       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22513     fi
22514     if test ! -s $tmp/subs.frag; then
22515       ac_more_lines=false
22516     else
22517       # The purpose of the label and of the branching condition is to
22518       # speed up the sed processing (if there are no `@' at all, there
22519       # is no need to browse any of the substitutions).
22520       # These are the two extra sed commands mentioned above.
22521       (echo ':t
22522   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22523       if test -z "$ac_sed_cmds"; then
22524         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22525       else
22526         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22527       fi
22528       ac_sed_frag=`expr $ac_sed_frag + 1`
22529       ac_beg=$ac_end
22530       ac_end=`expr $ac_end + $ac_max_sed_lines`
22531     fi
22532   done
22533   if test -z "$ac_sed_cmds"; then
22534     ac_sed_cmds=cat
22535   fi
22536 fi # test -n "$CONFIG_FILES"
22537
22538 EOF
22539 cat >>$CONFIG_STATUS <<\EOF
22540 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22541   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22542   case $ac_file in
22543   - | *:- | *:-:* ) # input from stdin
22544         cat >$tmp/stdin
22545         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22546         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22547   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22548         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22549   * )   ac_file_in=$ac_file.in ;;
22550   esac
22551
22552   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22553   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22554          X"$ac_file" : 'X\(//\)[^/]' \| \
22555          X"$ac_file" : 'X\(//\)$' \| \
22556          X"$ac_file" : 'X\(/\)' \| \
22557          .     : '\(.\)' 2>/dev/null ||
22558 echo X"$ac_file" |
22559     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22560           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22561           /^X\(\/\/\)$/{ s//\1/; q; }
22562           /^X\(\/\).*/{ s//\1/; q; }
22563           s/.*/./; q'`
22564   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22565     { case "$ac_dir" in
22566   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22567   *)                      as_incr_dir=.;;
22568 esac
22569 as_dummy="$ac_dir"
22570 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22571   case $as_mkdir_dir in
22572     # Skip DOS drivespec
22573     ?:) as_incr_dir=$as_mkdir_dir ;;
22574     *)
22575       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22576       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22577     ;;
22578   esac
22579 done; }
22580
22581     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22582     # A "../" for each directory in $ac_dir_suffix.
22583     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22584   else
22585     ac_dir_suffix= ac_dots=
22586   fi
22587
22588   case $srcdir in
22589   .)  ac_srcdir=.
22590       if test -z "$ac_dots"; then
22591          ac_top_srcdir=.
22592       else
22593          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22594       fi ;;
22595   [\\/]* | ?:[\\/]* )
22596       ac_srcdir=$srcdir$ac_dir_suffix;
22597       ac_top_srcdir=$srcdir ;;
22598   *) # Relative path.
22599     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22600     ac_top_srcdir=$ac_dots$srcdir ;;
22601   esac
22602
22603   case $INSTALL in
22604   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22605   *) ac_INSTALL=$ac_dots$INSTALL ;;
22606   esac
22607
22608   if test x"$ac_file" != x-; then
22609     { echo "$as_me:22609: creating $ac_file" >&5
22610 echo "$as_me: creating $ac_file" >&6;}
22611     rm -f "$ac_file"
22612   fi
22613   # Let's still pretend it is `configure' which instantiates (i.e., don't
22614   # use $as_me), people would be surprised to read:
22615   #    /* config.h.  Generated automatically by config.status.  */
22616   configure_input="Generated automatically from `echo $ac_file_in |
22617                                                  sed 's,.*/,,'` by configure."
22618
22619   # First look for the input files in the build tree, otherwise in the
22620   # src tree.
22621   ac_file_inputs=`IFS=:
22622     for f in $ac_file_in; do
22623       case $f in
22624       -) echo $tmp/stdin ;;
22625       [\\/$]*)
22626          # Absolute (can't be DOS-style, as IFS=:)
22627          test -f "$f" || { { echo "$as_me:22627: error: cannot find input file: $f" >&5
22628 echo "$as_me: error: cannot find input file: $f" >&2;}
22629    { (exit 1); exit 1; }; }
22630          echo $f;;
22631       *) # Relative
22632          if test -f "$f"; then
22633            # Build tree
22634            echo $f
22635          elif test -f "$srcdir/$f"; then
22636            # Source tree
22637            echo $srcdir/$f
22638          else
22639            # /dev/null tree
22640            { { echo "$as_me:22640: error: cannot find input file: $f" >&5
22641 echo "$as_me: error: cannot find input file: $f" >&2;}
22642    { (exit 1); exit 1; }; }
22643          fi;;
22644       esac
22645     done` || { (exit 1); exit 1; }
22646 EOF
22647 cat >>$CONFIG_STATUS <<\EOF
22648   ac_warn_datarootdir=no
22649   if test x"$ac_file" != x-; then
22650     for ac_item in $ac_file_inputs
22651     do
22652       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22653       if test -n "$ac_seen"; then
22654         ac_used=`grep '@datarootdir@' $ac_item`
22655         if test -z "$ac_used"; then
22656           { echo "$as_me:22656: WARNING: datarootdir was used implicitly but not set:
22657 $ac_seen" >&5
22658 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22659 $ac_seen" >&2;}
22660           ac_warn_datarootdir=yes
22661         fi
22662       fi
22663       ac_seen=`grep '${datarootdir}' $ac_item`
22664       if test -n "$ac_seen"; then
22665         { echo "$as_me:22665: WARNING: datarootdir was used explicitly but not set:
22666 $ac_seen" >&5
22667 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22668 $ac_seen" >&2;}
22669         ac_warn_datarootdir=yes
22670       fi
22671     done
22672   fi
22673
22674 if test "x$ac_warn_datarootdir" = xyes; then
22675   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22676 fi
22677
22678 EOF
22679 cat >>$CONFIG_STATUS <<EOF
22680   sed "$ac_vpsub
22681 $extrasub
22682 EOF
22683 cat >>$CONFIG_STATUS <<\EOF
22684 :t
22685 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22686 s,@configure_input@,$configure_input,;t t
22687 s,@srcdir@,$ac_srcdir,;t t
22688 s,@top_srcdir@,$ac_top_srcdir,;t t
22689 s,@INSTALL@,$ac_INSTALL,;t t
22690 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22691   rm -f $tmp/stdin
22692   if test x"$ac_file" != x-; then
22693     cp $tmp/out $ac_file
22694
22695     for ac_name in prefix exec_prefix datarootdir
22696     do
22697         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22698         if test -n "$ac_seen"; then
22699             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22700             if test -z "$ac_init"; then
22701               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22702               { echo "$as_me:22702: WARNING: Variable $ac_name is used but was not set:
22703 $ac_seen" >&5
22704 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22705 $ac_seen" >&2;}
22706             fi
22707         fi
22708     done
22709     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22710     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22711     if test -s $tmp/out; then
22712       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22713       { echo "$as_me:22713: WARNING: Some variables may not be substituted:
22714 $ac_seen" >&5
22715 echo "$as_me: WARNING: Some variables may not be substituted:
22716 $ac_seen" >&2;}
22717     fi
22718   else
22719     cat $tmp/out
22720   fi
22721   rm -f $tmp/out
22722
22723 done
22724 EOF
22725 cat >>$CONFIG_STATUS <<\EOF
22726
22727 #
22728 # CONFIG_HEADER section.
22729 #
22730
22731 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22732 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22733 #
22734 # ac_d sets the value in "#define NAME VALUE" lines.
22735 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22736 ac_dB='[        ].*$,\1#\2'
22737 ac_dC=' '
22738 ac_dD=',;t'
22739 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22740 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22741 ac_iB='\([      ]\),\1#\2define\3'
22742 ac_iC=' '
22743 ac_iD='\4,;t'
22744 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22745 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22746 ac_uB='$,\1#\2define\3'
22747 ac_uC=' '
22748 ac_uD=',;t'
22749
22750 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22751   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22752   case $ac_file in
22753   - | *:- | *:-:* ) # input from stdin
22754         cat >$tmp/stdin
22755         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22756         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22757   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22758         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22759   * )   ac_file_in=$ac_file.in ;;
22760   esac
22761
22762   test x"$ac_file" != x- && { echo "$as_me:22762: creating $ac_file" >&5
22763 echo "$as_me: creating $ac_file" >&6;}
22764
22765   # First look for the input files in the build tree, otherwise in the
22766   # src tree.
22767   ac_file_inputs=`IFS=:
22768     for f in $ac_file_in; do
22769       case $f in
22770       -) echo $tmp/stdin ;;
22771       [\\/$]*)
22772          # Absolute (can't be DOS-style, as IFS=:)
22773          test -f "$f" || { { echo "$as_me:22773: error: cannot find input file: $f" >&5
22774 echo "$as_me: error: cannot find input file: $f" >&2;}
22775    { (exit 1); exit 1; }; }
22776          echo $f;;
22777       *) # Relative
22778          if test -f "$f"; then
22779            # Build tree
22780            echo $f
22781          elif test -f "$srcdir/$f"; then
22782            # Source tree
22783            echo $srcdir/$f
22784          else
22785            # /dev/null tree
22786            { { echo "$as_me:22786: error: cannot find input file: $f" >&5
22787 echo "$as_me: error: cannot find input file: $f" >&2;}
22788    { (exit 1); exit 1; }; }
22789          fi;;
22790       esac
22791     done` || { (exit 1); exit 1; }
22792   # Remove the trailing spaces.
22793   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22794
22795 EOF
22796
22797 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22798 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22799 # be either 'cat' or 'sort'.
22800 cat confdefs.h | uniq >conftest.vals
22801
22802 # Break up conftest.vals because some shells have a limit on
22803 # the size of here documents, and old seds have small limits too.
22804
22805 rm -f conftest.tail
22806 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22807 while grep . conftest.vals >/dev/null
22808 do
22809   # Write chunks of a limited-size here document to conftest.frag.
22810   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22811   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22812   echo 'CEOF' >> $CONFIG_STATUS
22813   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22814   rm -f conftest.vals
22815   mv conftest.tail conftest.vals
22816 done
22817 rm -f conftest.vals
22818
22819 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22820 # marker @DEFS@.
22821 echo '  cat >> conftest.edit <<CEOF
22822 /@DEFS@/r conftest.frag
22823 /@DEFS@/d
22824 CEOF
22825 sed -f conftest.edit $tmp/in > $tmp/out
22826 rm -f $tmp/in
22827 mv $tmp/out $tmp/in
22828 rm -f conftest.edit conftest.frag
22829 ' >> $CONFIG_STATUS
22830
22831 cat >>$CONFIG_STATUS <<\EOF
22832   # Let's still pretend it is `configure' which instantiates (i.e., don't
22833   # use $as_me), people would be surprised to read:
22834   #    /* config.h.  Generated automatically by config.status.  */
22835   if test x"$ac_file" = x-; then
22836     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22837   else
22838     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22839   fi
22840   cat $tmp/in >>$tmp/config.h
22841   rm -f $tmp/in
22842   if test x"$ac_file" != x-; then
22843     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22844       { echo "$as_me:22844: $ac_file is unchanged" >&5
22845 echo "$as_me: $ac_file is unchanged" >&6;}
22846     else
22847       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22848          X"$ac_file" : 'X\(//\)[^/]' \| \
22849          X"$ac_file" : 'X\(//\)$' \| \
22850          X"$ac_file" : 'X\(/\)' \| \
22851          .     : '\(.\)' 2>/dev/null ||
22852 echo X"$ac_file" |
22853     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22854           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22855           /^X\(\/\/\)$/{ s//\1/; q; }
22856           /^X\(\/\).*/{ s//\1/; q; }
22857           s/.*/./; q'`
22858       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22859         { case "$ac_dir" in
22860   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22861   *)                      as_incr_dir=.;;
22862 esac
22863 as_dummy="$ac_dir"
22864 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22865   case $as_mkdir_dir in
22866     # Skip DOS drivespec
22867     ?:) as_incr_dir=$as_mkdir_dir ;;
22868     *)
22869       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22870       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22871     ;;
22872   esac
22873 done; }
22874
22875       fi
22876       rm -f $ac_file
22877       mv $tmp/config.h $ac_file
22878     fi
22879   else
22880     cat $tmp/config.h
22881     rm -f $tmp/config.h
22882   fi
22883 done
22884 EOF
22885 cat >>$CONFIG_STATUS <<\EOF
22886 #
22887 # CONFIG_COMMANDS section.
22888 #
22889 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22890   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22891   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22892
22893   case $ac_dest in
22894     default )
22895 if test "x$cf_with_tests" != xno ; then
22896
22897 for cf_dir in test
22898 do
22899         if test ! -d $srcdir/$cf_dir; then
22900                 continue
22901         elif test -f $srcdir/$cf_dir/programs; then
22902                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22903         fi
22904 done
22905
22906 fi
22907
22908 cf_prefix=$LIB_PREFIX
22909
22910 case $cf_cv_shlib_version in #(vi
22911 cygdll|msysdll|mingw)
22912         TINFO_NAME=$TINFO_ARG_SUFFIX
22913         TINFO_SUFFIX=.dll
22914         ;;
22915 esac
22916
22917 if test -n "$TINFO_SUFFIX" ; then
22918         case $TINFO_SUFFIX in
22919         tw*)
22920                 TINFO_NAME="${TINFO_NAME}tw"
22921                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22922                 ;;
22923         t*)
22924                 TINFO_NAME="${TINFO_NAME}t"
22925                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22926                 ;;
22927         w*)
22928                 TINFO_NAME="${TINFO_NAME}w"
22929                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22930                 ;;
22931         esac
22932 fi
22933
22934 for cf_dir in $SRC_SUBDIRS
22935 do
22936         if test ! -d $srcdir/$cf_dir ; then
22937                 continue
22938         elif test -f $srcdir/$cf_dir/modules; then
22939
22940                 SHARED_LIB=
22941                 Libs_To_Make=
22942                 for cf_item in $cf_LIST_MODELS
22943                 do
22944
22945         case X$cf_item in #(vi
22946         Xlibtool) #(vi
22947                 cf_suffix='.la'
22948                 cf_depsuf=$cf_suffix
22949                 ;;
22950         Xdebug) #(vi
22951                 cf_suffix='_g.a'
22952                 cf_depsuf=$cf_suffix
22953                 ;;
22954         Xprofile) #(vi
22955                 cf_suffix='_p.a'
22956                 cf_depsuf=$cf_suffix
22957                 ;;
22958         Xshared) #(vi
22959                 case $cf_cv_system_name in
22960                 aix[5-7]*) #(vi
22961                         cf_suffix='.so'
22962                         cf_depsuf=$cf_suffix
22963                         ;;
22964                 cygwin*|msys*|mingw*) #(vi
22965                         cf_suffix='.dll'
22966                         cf_depsuf='.dll.a'
22967                         ;;
22968                 darwin*) #(vi
22969                         cf_suffix='.dylib'
22970                         cf_depsuf=$cf_suffix
22971                         ;;
22972                 hpux*) #(vi
22973                         case $target in
22974                         ia64*) #(vi
22975                                 cf_suffix='.so'
22976                                 cf_depsuf=$cf_suffix
22977                                 ;;
22978                         *) #(vi
22979                                 cf_suffix='.sl'
22980                                 cf_depsuf=$cf_suffix
22981                                 ;;
22982                         esac
22983                         ;;
22984                 *) #(vi
22985                         cf_suffix='.so'
22986                         cf_depsuf=$cf_suffix
22987                         ;;
22988                 esac
22989                 ;;
22990         *)
22991                 cf_suffix='.a'
22992                 cf_depsuf=$cf_suffix
22993                 ;;
22994         esac
22995         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22996         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22997
22998                         cf_libname=$cf_dir
22999                         test "$cf_dir" = c++ && cf_libname=ncurses++
23000                         if test $cf_item = shared ; then
23001                                 if test -n "${LIB_SUFFIX}"
23002                                 then
23003                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23004                                 else
23005                                         cf_shared_suffix="$cf_suffix"
23006                                 fi
23007                                 if test "$cf_cv_do_symlinks" = yes ; then
23008                                         cf_version_name=
23009
23010                                         case "$cf_cv_shlib_version" in #(vi
23011                                         rel) #(vi
23012                                                 cf_version_name=REL_VERSION
23013                                                 ;;
23014                                         abi)
23015                                                 cf_version_name=ABI_VERSION
23016                                                 ;;
23017                                         esac
23018
23019                                         if test -n "$cf_version_name"
23020                                         then
23021                                                 case "$cf_cv_system_name" in #(vi
23022                                                 darwin*)
23023                                                         # "w", etc?
23024                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23025                                                         ;; #(vi
23026                                                 *)
23027                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23028                                                         ;;
23029                                                 esac
23030                                         fi
23031                                         if test -n "${LIB_SUFFIX}"
23032                                         then
23033                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23034                                         else
23035                                                 cf_shared_suffix="$cf_suffix"
23036                                         fi
23037                                 fi
23038                                 # cygwin needs import library, and has unique naming convention
23039                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23040                                 # use 'cyg' prefix for shared lib.
23041                                 case $cf_cv_shlib_version in #(vi
23042                                 cygdll) #(vi
23043                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23044                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23045                                         continue
23046                                         ;;
23047                                 msysdll) #(vi
23048                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23049                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23050                                         continue
23051                                         ;;
23052                                 mingw)
23053                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23054                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23055                                         continue
23056                                         ;;
23057                                 esac
23058                         fi
23059                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23060                 done
23061
23062                 if test $cf_dir = ncurses ; then
23063                         cf_subsets="$LIB_SUBSETS"
23064                         cf_r_parts="$cf_subsets"
23065                         cf_liblist="$Libs_To_Make"
23066
23067                         while test -n "$cf_r_parts"
23068                         do
23069                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23070                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23071                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23072                                         cf_item=
23073                                         case $cf_l_parts in #(vi
23074                                         *termlib*) #(vi
23075                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23076                                                 ;;
23077                                         *ticlib*)
23078                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23079                                                 ;;
23080                                         *)
23081                                                 break
23082                                                 ;;
23083                                         esac
23084                                         if test -n "$cf_item"; then
23085                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23086                                         fi
23087                                 else
23088                                         break
23089                                 fi
23090                         done
23091                 else
23092                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23093                 fi
23094
23095                 if test $cf_dir = c++; then
23096                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23097                                 cf_list=
23098                                 for cf_item in $Libs_To_Make
23099                                 do
23100                                         case $cf_item in
23101                                         *.a)
23102                                                 ;;
23103                                         *)
23104                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23105                                                 ;;
23106                                         esac
23107                                         for cf_test in $cf_list
23108                                         do
23109                                                 if test "$cf_test" = "$cf_item"
23110                                                 then
23111                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23112                                                         cf_item=
23113                                                         break
23114                                                 fi
23115                                         done
23116                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23117                                 done
23118                                 Libs_To_Make="$cf_list"
23119                         fi
23120                 fi
23121
23122                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23123                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23124                         $cf_dir/Makefile >$cf_dir/Makefile.out
23125                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23126
23127                 $AWK -f $srcdir/mk-0th.awk \
23128                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23129                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23130
23131                 for cf_subset in $cf_subsets
23132                 do
23133                         cf_subdirs=
23134                         for cf_item in $cf_LIST_MODELS
23135                         do
23136
23137                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23138
23139 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23140
23141                         CXX_MODEL=$cf_ITEM
23142                         if test "$CXX_MODEL" = SHARED; then
23143                                 case $cf_cv_shlib_version in #(vi
23144                                 cygdll|msysdll|mingw) #(vi
23145                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23146
23147 echo "${as_me:-configure}:23147: testing overriding CXX_MODEL to SHARED ..." 1>&5
23148
23149                                         with_shared_cxx=yes
23150                                         ;;
23151                                 *)
23152                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23153                                         ;;
23154                                 esac
23155                         fi
23156
23157         case X$cf_item in #(vi
23158         Xlibtool) #(vi
23159                 cf_suffix='.la'
23160                 cf_depsuf=$cf_suffix
23161                 ;;
23162         Xdebug) #(vi
23163                 cf_suffix='_g.a'
23164                 cf_depsuf=$cf_suffix
23165                 ;;
23166         Xprofile) #(vi
23167                 cf_suffix='_p.a'
23168                 cf_depsuf=$cf_suffix
23169                 ;;
23170         Xshared) #(vi
23171                 case $cf_cv_system_name in
23172                 aix[5-7]*) #(vi
23173                         cf_suffix='.so'
23174                         cf_depsuf=$cf_suffix
23175                         ;;
23176                 cygwin*|msys*|mingw*) #(vi
23177                         cf_suffix='.dll'
23178                         cf_depsuf='.dll.a'
23179                         ;;
23180                 darwin*) #(vi
23181                         cf_suffix='.dylib'
23182                         cf_depsuf=$cf_suffix
23183                         ;;
23184                 hpux*) #(vi
23185                         case $target in
23186                         ia64*) #(vi
23187                                 cf_suffix='.so'
23188                                 cf_depsuf=$cf_suffix
23189                                 ;;
23190                         *) #(vi
23191                                 cf_suffix='.sl'
23192                                 cf_depsuf=$cf_suffix
23193                                 ;;
23194                         esac
23195                         ;;
23196                 *) #(vi
23197                         cf_suffix='.so'
23198                         cf_depsuf=$cf_suffix
23199                         ;;
23200                 esac
23201                 ;;
23202         *)
23203                 cf_suffix='.a'
23204                 cf_depsuf=$cf_suffix
23205                 ;;
23206         esac
23207         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23208         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23209
23210         case $cf_item in
23211         libtool) cf_subdir='obj_lo'  ;;
23212         normal)  cf_subdir='objects' ;;
23213         debug)   cf_subdir='obj_g' ;;
23214         profile) cf_subdir='obj_p' ;;
23215         shared)
23216                 case $cf_cv_system_name in #(vi
23217                 cygwin|msys) #(vi
23218                         cf_subdir='objects' ;;
23219                 *)
23220                         cf_subdir='obj_s' ;;
23221                 esac
23222         esac
23223
23224                         # Test for case where we build libtinfo with a different name.
23225                         cf_libname=$cf_dir
23226                         if test $cf_dir = ncurses ; then
23227                                 case $cf_subset in
23228                                 *base*)
23229                                         cf_libname=${cf_libname}$LIB_SUFFIX
23230                                         ;;
23231                                 *termlib*)
23232                                         cf_libname=$TINFO_LIB_SUFFIX
23233                                         ;;
23234                                 ticlib*)
23235                                         cf_libname=$TICS_LIB_SUFFIX
23236                                         ;;
23237                                 esac
23238                         elif test $cf_dir = c++ ; then
23239                                 cf_libname=ncurses++$LIB_SUFFIX
23240                         else
23241                                 cf_libname=${cf_libname}$LIB_SUFFIX
23242                         fi
23243                         if test -n "${DFT_ARG_SUFFIX}" ; then
23244                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23245                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23246                         fi
23247
23248                         # These dependencies really are for development, not
23249                         # builds, but they are useful in porting, too.
23250                         cf_depend="../include/ncurses_cfg.h"
23251                         if test "$srcdir" = "."; then
23252                                 cf_reldir="."
23253                         else
23254                                 cf_reldir="\${srcdir}"
23255                         fi
23256
23257                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23258                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23259                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23260                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23261                         fi
23262
23263                         cf_dir_suffix=
23264                         old_cf_suffix="$cf_suffix"
23265                         if test "$cf_cv_shlib_version_infix" = yes ; then
23266                         if test -n "$LIB_SUFFIX" ; then
23267                                 case $LIB_SUFFIX in
23268                                 tw*)
23269                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23270                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23271                                         cf_dir_suffix=tw
23272                                         ;;
23273                                 t*)
23274                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23275                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23276                                         cf_dir_suffix=t
23277                                         ;;
23278                                 w*)
23279                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23280                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23281                                         cf_dir_suffix=w
23282                                         ;;
23283                                 esac
23284                         fi
23285                         fi
23286
23287                         $AWK -f $srcdir/mk-1st.awk \
23288                                 name=${cf_libname}${cf_dir_suffix} \
23289                                 traces=$LIB_TRACING \
23290                                 MODEL=$cf_ITEM \
23291                                 CXX_MODEL=$CXX_MODEL \
23292                                 model=$cf_subdir \
23293                                 prefix=$cf_prefix \
23294                                 suffix=$cf_suffix \
23295                                 subset=$cf_subset \
23296                                 driver=$cf_cv_term_driver \
23297                                 SymLink="$LN_S" \
23298                                 TermlibRoot=$TINFO_NAME \
23299                                 TermlibSuffix=$TINFO_SUFFIX \
23300                                 ShlibVer=$cf_cv_shlib_version \
23301                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23302                                 ReLink=${cf_cv_do_relink:-no} \
23303                                 DoLinks=$cf_cv_do_symlinks \
23304                                 rmSoLocs=$cf_cv_rm_so_locs \
23305                                 ldconfig="$LDCONFIG" \
23306                                 overwrite=$WITH_OVERWRITE \
23307                                 depend="$cf_depend" \
23308                                 host="$host" \
23309                                 libtool_version="$LIBTOOL_VERSION" \
23310                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23311
23312                         cf_suffix="$old_cf_suffix"
23313
23314                         for cf_subdir2 in $cf_subdirs lib
23315                         do
23316                                 test $cf_subdir = $cf_subdir2 && break
23317                         done
23318                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23319                         $AWK -f $srcdir/mk-2nd.awk \
23320                                 name=$cf_dir \
23321                                 traces=$LIB_TRACING \
23322                                 MODEL=$cf_ITEM \
23323                                 model=$cf_subdir \
23324                                 subset=$cf_subset \
23325                                 srcdir=$srcdir \
23326                                 echo=$WITH_ECHO \
23327                                 crenames=$cf_cv_prog_CC_c_o \
23328                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23329                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23330                         cf_subdirs="$cf_subdirs $cf_subdir"
23331                         done
23332                 done
23333         fi
23334
23335         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23336 done
23337
23338 for cf_dir in $SRC_SUBDIRS
23339 do
23340         if test ! -d $srcdir/$cf_dir ; then
23341                 continue
23342         fi
23343
23344         if test -f $cf_dir/Makefile ; then
23345                 case "$cf_dir" in
23346                 Ada95) #(vi
23347                         echo 'libs \' >> Makefile
23348                         echo 'install.libs \' >> Makefile
23349                         echo 'uninstall.libs ::' >> Makefile
23350                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23351                         ;;
23352                 esac
23353         fi
23354
23355         if test -f $srcdir/$cf_dir/modules; then
23356                 echo >> Makefile
23357                 if test -f $srcdir/$cf_dir/headers; then
23358 cat >> Makefile <<CF_EOF
23359 install.includes \\
23360 uninstall.includes \\
23361 CF_EOF
23362                 fi
23363 if test "$cf_dir" != "c++" ; then
23364 echo 'lint \' >> Makefile
23365 fi
23366 cat >> Makefile <<CF_EOF
23367 libs \\
23368 lintlib \\
23369 install.libs \\
23370 uninstall.libs \\
23371 install.$cf_dir \\
23372 uninstall.$cf_dir ::
23373         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23374 CF_EOF
23375         elif test -f $srcdir/$cf_dir/headers; then
23376 cat >> Makefile <<CF_EOF
23377
23378 libs \\
23379 install.libs \\
23380 uninstall.libs \\
23381 install.includes \\
23382 uninstall.includes ::
23383         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23384 CF_EOF
23385 fi
23386 done
23387
23388 if test "x$cf_with_db_install" = xyes; then
23389 cat >> Makefile <<CF_EOF
23390
23391 install.libs uninstall.libs \\
23392 install.data uninstall.data ::
23393 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23394 CF_EOF
23395 else
23396 cat >> Makefile <<CF_EOF
23397
23398 install.libs uninstall.libs ::
23399         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23400 CF_EOF
23401 fi
23402
23403 if test "x$cf_with_manpages" = xyes; then
23404 cat >> Makefile <<CF_EOF
23405
23406 install.man \\
23407 uninstall.man ::
23408         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23409 CF_EOF
23410 fi
23411
23412 cat >> Makefile <<CF_EOF
23413
23414 distclean ::
23415         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23416         rm -f headers.sh headers.sed mk_shared_lib.sh
23417         rm -f edit_man.* man_alias.*
23418         rm -rf \${DIRS_TO_MAKE}
23419 CF_EOF
23420
23421 # Special case: tack's manpage lives in its own directory.
23422 if test "x$cf_with_manpages" = xyes; then
23423 if test -d tack ; then
23424 if test -f $srcdir/$tack.h; then
23425 cat >> Makefile <<CF_EOF
23426
23427 install.man \\
23428 uninstall.man ::
23429         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23430 CF_EOF
23431 fi
23432 fi
23433 fi
23434
23435 rm -f headers.sed headers.sh
23436
23437 echo creating headers.sh
23438 cat >headers.sh <<CF_EOF
23439 #! /bin/sh
23440 # This shell script is generated by the 'configure' script.  It is invoked in a
23441 # subdirectory of the build tree.  It generates a sed-script in the parent
23442 # directory that is used to adjust includes for header files that reside in a
23443 # subdirectory of /usr/include, etc.
23444 PRG=""
23445 while test \$# != 3
23446 do
23447 PRG="\$PRG \$1"; shift
23448 done
23449 DST=\$1
23450 REF=\$2
23451 SRC=\$3
23452 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23453 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23454 echo installing \$SRC in \$DST
23455 CF_EOF
23456
23457 if test $WITH_CURSES_H = yes; then
23458         cat >>headers.sh <<CF_EOF
23459 case \$DST in
23460 /*/include/*)
23461         END=\`basename \$DST\`
23462         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23463         do
23464                 NAME=\`basename \$i\`
23465                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23466         done
23467         ;;
23468 *)
23469         echo "" >> \$TMPSED
23470         ;;
23471 esac
23472 CF_EOF
23473
23474 else
23475         cat >>headers.sh <<CF_EOF
23476 case \$DST in
23477 /*/include/*)
23478         END=\`basename \$DST\`
23479         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23480         do
23481                 NAME=\`basename \$i\`
23482                 if test "\$NAME" = "curses.h"
23483                 then
23484                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23485                         NAME=ncurses.h
23486                 fi
23487                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23488         done
23489         ;;
23490 *)
23491         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23492         ;;
23493 esac
23494 CF_EOF
23495 fi
23496 cat >>headers.sh <<CF_EOF
23497 rm -f \$TMPSRC
23498 sed -f \$TMPSED \$SRC > \$TMPSRC
23499 NAME=\`basename \$SRC\`
23500 CF_EOF
23501 if test $WITH_CURSES_H != yes; then
23502         cat >>headers.sh <<CF_EOF
23503 test "\$NAME" = "curses.h" && NAME=ncurses.h
23504 CF_EOF
23505 fi
23506 cat >>headers.sh <<CF_EOF
23507 # Just in case someone gzip'd manpages, remove the conflicting copy.
23508 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23509
23510 eval \$PRG \$TMPSRC \$DST/\$NAME
23511 rm -f \$TMPSRC \$TMPSED
23512 CF_EOF
23513
23514 chmod 0755 headers.sh
23515
23516 for cf_dir in $SRC_SUBDIRS
23517 do
23518         if test ! -d $srcdir/$cf_dir ; then
23519                 continue
23520         fi
23521
23522         if test -f $srcdir/$cf_dir/headers; then
23523                 $AWK -f $srcdir/mk-hdr.awk \
23524                         subset="$LIB_SUBSETS" \
23525                         compat="$WITH_CURSES_H" \
23526                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23527         fi
23528
23529         if test -f $srcdir/$cf_dir/modules; then
23530                 if test "$cf_dir" != "c++" ; then
23531                         cat >>$cf_dir/Makefile <<"CF_EOF"
23532 depend : ${AUTO_SRC}
23533         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23534
23535 # DO NOT DELETE THIS LINE -- make depend depends on it.
23536 CF_EOF
23537                 fi
23538         fi
23539 done
23540
23541 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23542 if test -z "$USE_OLD_MAKERULES" ; then
23543         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23544 fi
23545 fi
23546  ;;
23547   esac
23548 done
23549 EOF
23550
23551 cat >>$CONFIG_STATUS <<\EOF
23552
23553 { (exit 0); exit 0; }
23554 EOF
23555 chmod +x $CONFIG_STATUS
23556 ac_clean_files=$ac_clean_files_save
23557
23558 # configure is writing to config.log, and then calls config.status.
23559 # config.status does its own redirection, appending to config.log.
23560 # Unfortunately, on DOS this fails, as config.log is still kept open
23561 # by configure, so config.status won't be able to write to it; its
23562 # output is simply discarded.  So we exec the FD to /dev/null,
23563 # effectively closing config.log, so it can be properly (re)opened and
23564 # appended to by config.status.  When coming back to configure, we
23565 # need to make the FD available again.
23566 if test "$no_create" != yes; then
23567   ac_cs_success=:
23568   exec 5>/dev/null
23569   $SHELL $CONFIG_STATUS || ac_cs_success=false
23570   exec 5>>config.log
23571   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23572   # would make configure fail if this is the last instruction.
23573   $ac_cs_success || { (exit 1); exit 1; }
23574 fi
23575 ${MAKE:-make} preinstall