]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20130119
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.560 .
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   --without-manpages      suppress install of manpages
710   --without-progs         suppress build with programs (e.g., tic)
711   --without-tests         suppress build with test-programs
712   --without-curses-h      install curses.h as ncurses.h only
713   --with-pkg-config{=path} enable/disable use of pkg-config
714   --with-pkg-config-libdir=XXX use given directory for installing pc-files
715   --enable-pc-files       generate and install .pc files for pkg-config
716   --enable-mixed-case     tic should assume mixed-case filenames
717   --with-install-prefix   prefixes actual install-location ($DESTDIR)
718 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
719   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
720   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
721   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
722   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
723   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
724   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
725 Options to Specify the Libraries Built/Used:
726   --disable-libtool-version  enable to use libtool's incompatible naming scheme
727   --with-libtool          generate libraries with libtool
728   --with-shared           generate shared-libraries
729   --with-normal           generate normal-libraries (default)
730   --with-debug            generate debug-libraries (default)
731   --with-profile          generate profile-libraries
732   --with-lib-prefix       override library-prefix
733   --with-termlib          generate separate terminfo library
734   --with-ticlib           generate separate tic library
735   --with-gpm              use Alessandro Rubini's GPM library
736   --without-dlsym         do not use dlsym() to load GPM dynamically
737   --with-sysmouse         use sysmouse (FreeBSD console)
738   --enable-rpath          use rpath option when generating shared libraries
739   --disable-relink        relink shared libraries during install
740   --with-shlib-version=X  Specify rel or abi version for shared libs
741   --disable-rpath-hack    don't add rpath options for additional libraries
742 Fine-Tuning Your Configuration:
743   --disable-overwrite     leave out the link to -lcurses
744   --disable-database      do not use terminfo, only fallbacks/termcap
745   --with-database=XXX     specify terminfo source to install
746   --with-hashed-db        specify hashed-database library
747   --with-fallbacks=XXX    specify list of fallback terminal descriptions
748   --without-xterm-new     specify if xterm terminfo should be old version
749   --with-xterm-kbs=XXX     specify if xterm backspace sends BS or DEL
750   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
751   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
752   --disable-big-core      assume machine has little memory
753   --disable-big-strings   assume compiler has only standard-size strings
754   --enable-termcap        compile in termcap fallback support
755   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
756   --enable-getcap         fast termcap load, no xrefs to terminfo
757   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
758   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
759   --disable-root-environ  restrict environment when running as root
760   --enable-symlinks       make tic use symbolic links not hard links
761   --enable-broken_linker  compile with broken-linker support code
762   --enable-bsdpad         recognize BSD-style prefix padding
763   --enable-widec          compile with wide-char/UTF-8 code
764   --disable-lp64          allow chtype to be long (ignore _LP64)
765   --disable-largefile     omit support for large files
766   --disable-tparm-varargs compile tparm() without varargs interface
767   --disable-tic-depends   link tic library without explicit dependency on ncurses library
768   --with-bool=TYPE        override fallback type of bool variable
769   --with-caps=alt         compile with alternate Caps file
770   --with-chtype=TYPE      override type of chtype
771   --with-ospeed=TYPE      override type of ospeed variable
772   --with-mmask-t=TYPE     override type of mmask_t
773   --with-ccharw-max=XXX   override size CCHARW_MAX
774   --with-tparm-arg=TYPE   override parameter type of tparm
775   --with-rcs-ids          compile-in RCS identifiers
776 Options to Specify How Manpages are Installed:
777   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
778                           optionally formatted/catonly, e.g., gzip,formatted
779   --with-manpage-renames  specify manpage-renaming
780   --with-manpage-aliases  specify manpage-aliases using .so
781   --with-manpage-symlinks specify manpage-aliases using symlinks
782   --with-manpage-tbl      specify manpage processing with tbl
783 Extensions:
784   --disable-ext-funcs     disable function-extensions
785   --enable-sp-funcs       enable experimental SCREEN-extensions
786   --enable-term-driver    enable experimental terminal-driver
787   --enable-const          compile with extra/non-standard const
788   --enable-ext-colors     compile for 256-color support
789   --enable-ext-mouse      compile for extended mouse-encoding
790   --enable-no-padding     compile with $NCURSES_NO_PADDING code
791   --enable-signed-char    compile using signed Boolean's in term.h
792   --enable-sigwinch       compile with SIGWINCH handler
793   --enable-tcap-names     compile with user-definable terminal capabilities
794 Development Code:
795   --without-develop       disable development options
796   --enable-hard-tabs      compile with hard-tabs code
797   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
798 Experimental Code:
799   --disable-assumed-color do not assume anything about default-colors
800   --disable-hashmap       compile without hashmap scrolling-optimization
801   --enable-colorfgbg      compile-in experimental $COLORFGBG code
802   --enable-interop        compile-in experimental interop bindings
803   --with-pthread          use POSIX thread library
804   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
805   --enable-weak-symbols   enable weak-symbols for pthreads
806   --enable-reentrant      compile with experimental reentrant code
807   --with-wrap-prefix=XXX  override prefix used for public variables
808   --enable-safe-sprintf   compile with experimental safe-sprintf code
809   --disable-scroll-hints  compile without scroll-hints code
810   --enable-wgetch-events  compile with experimental wgetch-events code
811 Testing/development Options:
812   --disable-echo          do not display "compiling" commands
813   --enable-warnings       build: turn on GCC compiler warnings
814   --enable-string-hacks  work around bogus compiler/loader warnings
815   --enable-assertions     test: turn on generation of assertion code
816   --with-dmalloc          test: use Gray Watson's dmalloc library
817   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
818   --with-valgrind         test: use valgrind
819   --disable-leaks         test: free permanent memory, analyze leaks
820   --enable-expanded       test: generate functions for certain macros
821   --disable-macros        test: use functions rather than macros
822   --with-trace            test: add trace() function to all models of ncurses
823 Ada95 Binding Options:
824   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
825   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
826   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
827   --with-ada-sharedlib=XX build Ada95 shared-library
828
829 Some influential environment variables:
830   CC          C compiler command
831   CFLAGS      C compiler flags
832   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
833               nonstandard directory <lib dir>
834   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
835               headers in a nonstandard directory <include dir>
836   CPP         C preprocessor
837   CXX         C++ compiler command
838   CXXFLAGS    C++ compiler flags
839   CXXCPP      C++ preprocessor
840
841 Use these variables to override the choices made by `configure' or to help
842 it to find libraries and programs with nonstandard names/locations.
843
844 EOF
845 fi
846
847 if test "$ac_init_help" = "recursive"; then
848   # If there are subdirs, report their specific --help.
849   ac_popdir=`pwd`
850   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
851     cd $ac_subdir
852     # A "../" for each directory in /$ac_subdir.
853     ac_dots=`echo $ac_subdir |
854              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
855
856     case $srcdir in
857     .) # No --srcdir option.  We are building in place.
858       ac_sub_srcdir=$srcdir ;;
859     [\\/]* | ?:[\\/]* ) # Absolute path.
860       ac_sub_srcdir=$srcdir/$ac_subdir ;;
861     *) # Relative path.
862       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
863     esac
864
865     # Check for guested configure; otherwise get Cygnus style configure.
866     if test -f $ac_sub_srcdir/configure.gnu; then
867       echo
868       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
869     elif test -f $ac_sub_srcdir/configure; then
870       echo
871       $SHELL $ac_sub_srcdir/configure  --help=recursive
872     elif test -f $ac_sub_srcdir/configure.ac ||
873            test -f $ac_sub_srcdir/configure.in; then
874       echo
875       $ac_configure --help
876     else
877       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
878     fi
879     cd $ac_popdir
880   done
881 fi
882
883 test -n "$ac_init_help" && exit 0
884 if $ac_init_version; then
885   cat <<\EOF
886
887 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
888 Free Software Foundation, Inc.
889 This configure script is free software; the Free Software Foundation
890 gives unlimited permission to copy, distribute and modify it.
891 EOF
892   exit 0
893 fi
894 exec 5>config.log
895 cat >&5 <<EOF
896 This file contains any messages produced by compilers while
897 running configure, to aid debugging if configure makes a mistake.
898
899 It was created by $as_me, which was
900 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
901
902   $ $0 $@
903
904 EOF
905 {
906 cat <<_ASUNAME
907 ## ---------- ##
908 ## Platform.  ##
909 ## ---------- ##
910
911 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
912 uname -m = `(uname -m) 2>/dev/null || echo unknown`
913 uname -r = `(uname -r) 2>/dev/null || echo unknown`
914 uname -s = `(uname -s) 2>/dev/null || echo unknown`
915 uname -v = `(uname -v) 2>/dev/null || echo unknown`
916
917 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
918 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
919
920 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
921 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
922 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
923 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
924 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
925 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
926 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
927
928 PATH = $PATH
929
930 _ASUNAME
931 } >&5
932
933 cat >&5 <<EOF
934 ## ------------ ##
935 ## Core tests.  ##
936 ## ------------ ##
937
938 EOF
939
940 # Keep a trace of the command line.
941 # Strip out --no-create and --no-recursion so they do not pile up.
942 # Also quote any args containing shell meta-characters.
943 ac_configure_args=
944 ac_sep=
945 for ac_arg
946 do
947   case $ac_arg in
948   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
949   | --no-cr | --no-c) ;;
950   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
951   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
952   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
953     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
954     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
955     ac_sep=" " ;;
956   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
957      ac_sep=" " ;;
958   esac
959   # Get rid of the leading space.
960 done
961
962 # When interrupted or exit'd, cleanup temporary files, and complete
963 # config.log.  We remove comments because anyway the quotes in there
964 # would cause problems or look ugly.
965 trap 'exit_status=$?
966   # Save into config.log some information that might help in debugging.
967   echo >&5
968   echo "## ----------------- ##" >&5
969   echo "## Cache variables.  ##" >&5
970   echo "## ----------------- ##" >&5
971   echo >&5
972   # The following way of writing the cache mishandles newlines in values,
973 {
974   (set) 2>&1 |
975     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
976     *ac_space=\ *)
977       sed -n \
978         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
979           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
980       ;;
981     *)
982       sed -n \
983         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
984       ;;
985     esac;
986 } >&5
987   sed "/^$/d" confdefs.h >conftest.log
988   if test -s conftest.log; then
989     echo >&5
990     echo "## ------------ ##" >&5
991     echo "## confdefs.h.  ##" >&5
992     echo "## ------------ ##" >&5
993     echo >&5
994     cat conftest.log >&5
995   fi
996   (echo; echo) >&5
997   test "$ac_signal" != 0 &&
998     echo "$as_me: caught signal $ac_signal" >&5
999   echo "$as_me: exit $exit_status" >&5
1000   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1001     exit $exit_status
1002      ' 0
1003 for ac_signal in 1 2 13 15; do
1004   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1005 done
1006 ac_signal=0
1007
1008 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1009 rm -rf conftest* confdefs.h
1010 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1011 echo >confdefs.h
1012
1013 # Let the site file select an alternate cache file if it wants to.
1014 # Prefer explicitly selected file to automatically selected ones.
1015 if test -z "$CONFIG_SITE"; then
1016   if test "x$prefix" != xNONE; then
1017     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1018   else
1019     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1020   fi
1021 fi
1022 for ac_site_file in $CONFIG_SITE; do
1023   if test -r "$ac_site_file"; then
1024     { echo "$as_me:1024: loading site script $ac_site_file" >&5
1025 echo "$as_me: loading site script $ac_site_file" >&6;}
1026     cat "$ac_site_file" >&5
1027     . "$ac_site_file"
1028   fi
1029 done
1030
1031 if test -r "$cache_file"; then
1032   # Some versions of bash will fail to source /dev/null (special
1033   # files actually), so we avoid doing that.
1034   if test -f "$cache_file"; then
1035     { echo "$as_me:1035: loading cache $cache_file" >&5
1036 echo "$as_me: loading cache $cache_file" >&6;}
1037     case $cache_file in
1038       [\\/]* | ?:[\\/]* ) . $cache_file;;
1039       *)                      . ./$cache_file;;
1040     esac
1041   fi
1042 else
1043   { echo "$as_me:1043: creating cache $cache_file" >&5
1044 echo "$as_me: creating cache $cache_file" >&6;}
1045   >$cache_file
1046 fi
1047
1048 # Check that the precious variables saved in the cache have kept the same
1049 # value.
1050 ac_cache_corrupted=false
1051 for ac_var in `(set) 2>&1 |
1052                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1053   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1054   eval ac_new_set=\$ac_env_${ac_var}_set
1055   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1056   eval ac_new_val="\$ac_env_${ac_var}_value"
1057   case $ac_old_set,$ac_new_set in
1058     set,)
1059       { echo "$as_me:1059: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1060 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1061       ac_cache_corrupted=: ;;
1062     ,set)
1063       { echo "$as_me:1063: error: \`$ac_var' was not set in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,);;
1067     *)
1068       if test "x$ac_old_val" != "x$ac_new_val"; then
1069         { echo "$as_me:1069: error: \`$ac_var' has changed since the previous run:" >&5
1070 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1071         { echo "$as_me:1071:   former value:  $ac_old_val" >&5
1072 echo "$as_me:   former value:  $ac_old_val" >&2;}
1073         { echo "$as_me:1073:   current value: $ac_new_val" >&5
1074 echo "$as_me:   current value: $ac_new_val" >&2;}
1075         ac_cache_corrupted=:
1076       fi;;
1077   esac
1078   # Pass precious variables to config.status.  It doesn't matter if
1079   # we pass some twice (in addition to the command line arguments).
1080   if test "$ac_new_set" = set; then
1081     case $ac_new_val in
1082     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1083       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1084       ac_configure_args="$ac_configure_args '$ac_arg'"
1085       ;;
1086     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1087        ;;
1088     esac
1089   fi
1090 done
1091 if $ac_cache_corrupted; then
1092   { echo "$as_me:1092: error: changes in the environment can compromise the build" >&5
1093 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1094   { { echo "$as_me:1094: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1095 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1096    { (exit 1); exit 1; }; }
1097 fi
1098
1099 ac_ext=c
1100 ac_cpp='$CPP $CPPFLAGS'
1101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1104 ac_main_return=return
1105
1106 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1107   *c*,-n*) ECHO_N= ECHO_C='
1108 ' ECHO_T='      ' ;;
1109   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1110   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1111 esac
1112 echo "#! $SHELL" >conftest.sh
1113 echo  "exit 0"   >>conftest.sh
1114 chmod +x conftest.sh
1115 if { (echo "$as_me:1115: PATH=\".;.\"; conftest.sh") >&5
1116   (PATH=".;."; conftest.sh) 2>&5
1117   ac_status=$?
1118   echo "$as_me:1118: \$? = $ac_status" >&5
1119   (exit $ac_status); }; then
1120   ac_path_separator=';'
1121 else
1122   ac_path_separator=:
1123 fi
1124 PATH_SEPARATOR="$ac_path_separator"
1125 rm -f conftest.sh
1126
1127 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1128
1129 top_builddir=`pwd`
1130
1131 echo "$as_me:1131: checking for egrep" >&5
1132 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1133 if test "${ac_cv_prog_egrep+set}" = set; then
1134   echo $ECHO_N "(cached) $ECHO_C" >&6
1135 else
1136   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1137     then ac_cv_prog_egrep='grep -E'
1138     else ac_cv_prog_egrep='egrep'
1139     fi
1140 fi
1141 echo "$as_me:1141: result: $ac_cv_prog_egrep" >&5
1142 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1143  EGREP=$ac_cv_prog_egrep
1144
1145 test -z "$EGREP" && { { echo "$as_me:1145: error: No egrep program found" >&5
1146 echo "$as_me: error: No egrep program found" >&2;}
1147    { (exit 1); exit 1; }; }
1148
1149 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1150 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1151 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 cf_cv_abi_version=${NCURSES_MAJOR}
1153 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1154 cf_cv_timestamp=`date`
1155 echo "$as_me:1155: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1156 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1157
1158 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1159
1160 # Check whether --with-rel-version or --without-rel-version was given.
1161 if test "${with_rel_version+set}" = set; then
1162   withval="$with_rel_version"
1163   { echo "$as_me:1163: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1164 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1165  cf_cv_rel_version=$withval
1166 fi;
1167
1168  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1169  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1170
1171 if test -n "$NCURSES_MAJOR" ; then
1172   case $NCURSES_MAJOR in #(vi
1173   [0-9]*) #(vi
1174         ;;
1175   *)
1176         { { echo "$as_me:1176: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1177 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1178    { (exit 1); exit 1; }; }
1179         ;;
1180   esac
1181 else
1182   { { echo "$as_me:1182: error: Release major-version value is empty" >&5
1183 echo "$as_me: error: Release major-version value is empty" >&2;}
1184    { (exit 1); exit 1; }; }
1185 fi
1186
1187 if test -n "$NCURSES_MINOR" ; then
1188   case $NCURSES_MINOR in #(vi
1189   [0-9]*) #(vi
1190         ;;
1191   *)
1192         { { echo "$as_me:1192: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1193 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1194    { (exit 1); exit 1; }; }
1195         ;;
1196   esac
1197 else
1198   { { echo "$as_me:1198: error: Release minor-version value is empty" >&5
1199 echo "$as_me: error: Release minor-version value is empty" >&2;}
1200    { (exit 1); exit 1; }; }
1201 fi
1202
1203 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1204
1205 # Check whether --with-abi-version or --without-abi-version was given.
1206 if test "${with_abi_version+set}" = set; then
1207   withval="$with_abi_version"
1208   { echo "$as_me:1208: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1209 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1210  cf_cv_abi_version=$withval
1211 fi;
1212
1213 if test -n "$cf_cv_abi_version" ; then
1214   case $cf_cv_abi_version in #(vi
1215   [0-9]*) #(vi
1216         ;;
1217   *)
1218         { { echo "$as_me:1218: error: ABI version is not a number: $cf_cv_abi_version" >&5
1219 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1220    { (exit 1); exit 1; }; }
1221         ;;
1222   esac
1223 else
1224   { { echo "$as_me:1224: error: ABI version value is empty" >&5
1225 echo "$as_me: error: ABI version value is empty" >&2;}
1226    { (exit 1); exit 1; }; }
1227 fi
1228
1229 ac_aux_dir=
1230 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1231   if test -f $ac_dir/install-sh; then
1232     ac_aux_dir=$ac_dir
1233     ac_install_sh="$ac_aux_dir/install-sh -c"
1234     break
1235   elif 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/shtool; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/shtool install -c"
1242     break
1243   fi
1244 done
1245 if test -z "$ac_aux_dir"; then
1246   { { echo "$as_me:1246: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1247 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1248    { (exit 1); exit 1; }; }
1249 fi
1250 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1251 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1252 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1253
1254 # Make sure we can run config.sub.
1255 $ac_config_sub sun4 >/dev/null 2>&1 ||
1256   { { echo "$as_me:1256: error: cannot run $ac_config_sub" >&5
1257 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1258    { (exit 1); exit 1; }; }
1259
1260 echo "$as_me:1260: checking build system type" >&5
1261 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1262 if test "${ac_cv_build+set}" = set; then
1263   echo $ECHO_N "(cached) $ECHO_C" >&6
1264 else
1265   ac_cv_build_alias=$build_alias
1266 test -z "$ac_cv_build_alias" &&
1267   ac_cv_build_alias=`$ac_config_guess`
1268 test -z "$ac_cv_build_alias" &&
1269   { { echo "$as_me:1269: error: cannot guess build type; you must specify one" >&5
1270 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1271    { (exit 1); exit 1; }; }
1272 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1273   { { echo "$as_me:1273: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1274 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1275    { (exit 1); exit 1; }; }
1276
1277 fi
1278 echo "$as_me:1278: result: $ac_cv_build" >&5
1279 echo "${ECHO_T}$ac_cv_build" >&6
1280 build=$ac_cv_build
1281 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1282 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1283 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1284
1285 echo "$as_me:1285: checking host system type" >&5
1286 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1287 if test "${ac_cv_host+set}" = set; then
1288   echo $ECHO_N "(cached) $ECHO_C" >&6
1289 else
1290   ac_cv_host_alias=$host_alias
1291 test -z "$ac_cv_host_alias" &&
1292   ac_cv_host_alias=$ac_cv_build_alias
1293 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1294   { { echo "$as_me:1294: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1295 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1296    { (exit 1); exit 1; }; }
1297
1298 fi
1299 echo "$as_me:1299: result: $ac_cv_host" >&5
1300 echo "${ECHO_T}$ac_cv_host" >&6
1301 host=$ac_cv_host
1302 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1303 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1304 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1305
1306 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1307         echo "$as_me:1307: checking target system type" >&5
1308 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1309 if test "${ac_cv_target+set}" = set; then
1310   echo $ECHO_N "(cached) $ECHO_C" >&6
1311 else
1312   ac_cv_target_alias=$target_alias
1313 test "x$ac_cv_target_alias" = "x" &&
1314   ac_cv_target_alias=$ac_cv_host_alias
1315 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1316   { { echo "$as_me:1316: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1317 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1318    { (exit 1); exit 1; }; }
1319
1320 fi
1321 echo "$as_me:1321: result: $ac_cv_target" >&5
1322 echo "${ECHO_T}$ac_cv_target" >&6
1323 target=$ac_cv_target
1324 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1325 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1326 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1327
1328 # The aliases save the names the user supplied, while $host etc.
1329 # will get canonicalized.
1330 test -n "$target_alias" &&
1331   test "$program_prefix$program_suffix$program_transform_name" = \
1332     NONENONEs,x,x, &&
1333   program_prefix=${target_alias}-
1334         system_name="$host_os"
1335 else
1336         system_name="`(uname -s -r) 2>/dev/null`"
1337         if test -z "$system_name" ; then
1338                 system_name="`(hostname) 2>/dev/null`"
1339         fi
1340 fi
1341 test -n "$system_name" &&
1342 cat >>confdefs.h <<EOF
1343 #define SYSTEM_NAME "$system_name"
1344 EOF
1345
1346 if test "${cf_cv_system_name+set}" = set; then
1347   echo $ECHO_N "(cached) $ECHO_C" >&6
1348 else
1349   cf_cv_system_name="$system_name"
1350 fi
1351
1352 test -z "$system_name" && system_name="$cf_cv_system_name"
1353 test -n "$cf_cv_system_name" && echo "$as_me:1353: result: Configuring for $cf_cv_system_name" >&5
1354 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1355
1356 if test ".$system_name" != ".$cf_cv_system_name" ; then
1357         echo "$as_me:1357: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1358 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1359         { { echo "$as_me:1359: error: \"Please remove config.cache and try again.\"" >&5
1360 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1361    { (exit 1); exit 1; }; }
1362 fi
1363
1364 # Check whether --with-system-type or --without-system-type was given.
1365 if test "${with_system_type+set}" = set; then
1366   withval="$with_system_type"
1367   { echo "$as_me:1367: WARNING: overriding system type to $withval" >&5
1368 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1369  cf_cv_system_name=$withval
1370 fi;
1371
1372 ###     Save the given $CFLAGS to allow user-override.
1373 cf_user_CFLAGS="$CFLAGS"
1374
1375 ###     Default install-location
1376
1377 echo "$as_me:1377: checking for prefix" >&5
1378 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1379 if test "x$prefix" = "xNONE" ; then
1380         case "$cf_cv_system_name" in
1381                 # non-vendor systems don't have a conflict
1382         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1383                 prefix=/usr
1384                 ;;
1385         *)      prefix=$ac_default_prefix
1386                 ;;
1387         esac
1388 fi
1389 echo "$as_me:1389: result: $prefix" >&5
1390 echo "${ECHO_T}$prefix" >&6
1391
1392 if test "x$prefix" = "xNONE" ; then
1393 echo "$as_me:1393: checking for default include-directory" >&5
1394 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1395 test -n "$verbose" && echo 1>&6
1396 for cf_symbol in \
1397         $includedir \
1398         $includedir/ncurses \
1399         $prefix/include \
1400         $prefix/include/ncurses \
1401         /usr/local/include \
1402         /usr/local/include/ncurses \
1403         /usr/include \
1404         /usr/include/ncurses
1405 do
1406         cf_dir=`eval echo $cf_symbol`
1407         if test -f $cf_dir/curses.h ; then
1408         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1409                 includedir="$cf_symbol"
1410                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1411                 break
1412         fi
1413         fi
1414         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1415 done
1416 echo "$as_me:1416: result: $includedir" >&5
1417 echo "${ECHO_T}$includedir" >&6
1418 fi
1419
1420 ###     Checks for programs.
1421
1422 # Check whether --with-ada or --without-ada was given.
1423 if test "${with_ada+set}" = set; then
1424   withval="$with_ada"
1425   cf_with_ada=$withval
1426 else
1427   cf_with_ada=yes
1428 fi;
1429 if test "x$cf_with_ada" = xyes
1430 then
1431         cf_PROG_CC="gnatgcc gcc cc"
1432 else
1433         cf_PROG_CC="gcc cc"
1434 fi
1435
1436 ac_ext=c
1437 ac_cpp='$CPP $CPPFLAGS'
1438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1441 ac_main_return=return
1442 if test -n "$ac_tool_prefix"; then
1443   for ac_prog in $cf_PROG_CC
1444   do
1445     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1446 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1447 echo "$as_me:1447: checking for $ac_word" >&5
1448 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1449 if test "${ac_cv_prog_CC+set}" = set; then
1450   echo $ECHO_N "(cached) $ECHO_C" >&6
1451 else
1452   if test -n "$CC"; then
1453   ac_cv_prog_CC="$CC" # Let the user override the test.
1454 else
1455   ac_save_IFS=$IFS; IFS=$ac_path_separator
1456 ac_dummy="$PATH"
1457 for ac_dir in $ac_dummy; do
1458   IFS=$ac_save_IFS
1459   test -z "$ac_dir" && ac_dir=.
1460   $as_executable_p "$ac_dir/$ac_word" || continue
1461 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1462 echo "$as_me:1462: found $ac_dir/$ac_word" >&5
1463 break
1464 done
1465
1466 fi
1467 fi
1468 CC=$ac_cv_prog_CC
1469 if test -n "$CC"; then
1470   echo "$as_me:1470: result: $CC" >&5
1471 echo "${ECHO_T}$CC" >&6
1472 else
1473   echo "$as_me:1473: result: no" >&5
1474 echo "${ECHO_T}no" >&6
1475 fi
1476
1477     test -n "$CC" && break
1478   done
1479 fi
1480 if test -z "$CC"; then
1481   ac_ct_CC=$CC
1482   for ac_prog in $cf_PROG_CC
1483 do
1484   # Extract the first word of "$ac_prog", so it can be a program name with args.
1485 set dummy $ac_prog; ac_word=$2
1486 echo "$as_me:1486: checking for $ac_word" >&5
1487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1488 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1489   echo $ECHO_N "(cached) $ECHO_C" >&6
1490 else
1491   if test -n "$ac_ct_CC"; then
1492   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1493 else
1494   ac_save_IFS=$IFS; IFS=$ac_path_separator
1495 ac_dummy="$PATH"
1496 for ac_dir in $ac_dummy; do
1497   IFS=$ac_save_IFS
1498   test -z "$ac_dir" && ac_dir=.
1499   $as_executable_p "$ac_dir/$ac_word" || continue
1500 ac_cv_prog_ac_ct_CC="$ac_prog"
1501 echo "$as_me:1501: found $ac_dir/$ac_word" >&5
1502 break
1503 done
1504
1505 fi
1506 fi
1507 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1508 if test -n "$ac_ct_CC"; then
1509   echo "$as_me:1509: result: $ac_ct_CC" >&5
1510 echo "${ECHO_T}$ac_ct_CC" >&6
1511 else
1512   echo "$as_me:1512: result: no" >&5
1513 echo "${ECHO_T}no" >&6
1514 fi
1515
1516   test -n "$ac_ct_CC" && break
1517 done
1518
1519   CC=$ac_ct_CC
1520 fi
1521
1522 test -z "$CC" && { { echo "$as_me:1522: error: no acceptable cc found in \$PATH" >&5
1523 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1524    { (exit 1); exit 1; }; }
1525
1526 # Provide some information about the compiler.
1527 echo "$as_me:1527:" \
1528      "checking for C compiler version" >&5
1529 ac_compiler=`set X $ac_compile; echo $2`
1530 { (eval echo "$as_me:1530: \"$ac_compiler --version </dev/null >&5\"") >&5
1531   (eval $ac_compiler --version </dev/null >&5) 2>&5
1532   ac_status=$?
1533   echo "$as_me:1533: \$? = $ac_status" >&5
1534   (exit $ac_status); }
1535 { (eval echo "$as_me:1535: \"$ac_compiler -v </dev/null >&5\"") >&5
1536   (eval $ac_compiler -v </dev/null >&5) 2>&5
1537   ac_status=$?
1538   echo "$as_me:1538: \$? = $ac_status" >&5
1539   (exit $ac_status); }
1540 { (eval echo "$as_me:1540: \"$ac_compiler -V </dev/null >&5\"") >&5
1541   (eval $ac_compiler -V </dev/null >&5) 2>&5
1542   ac_status=$?
1543   echo "$as_me:1543: \$? = $ac_status" >&5
1544   (exit $ac_status); }
1545
1546 cat >conftest.$ac_ext <<_ACEOF
1547 #line 1547 "configure"
1548 #include "confdefs.h"
1549
1550 int
1551 main ()
1552 {
1553
1554   ;
1555   return 0;
1556 }
1557 _ACEOF
1558 ac_clean_files_save=$ac_clean_files
1559 ac_clean_files="$ac_clean_files a.out a.exe"
1560 # Try to create an executable without -o first, disregard a.out.
1561 # It will help us diagnose broken compilers, and finding out an intuition
1562 # of exeext.
1563 echo "$as_me:1563: checking for C compiler default output" >&5
1564 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1565 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1566 if { (eval echo "$as_me:1566: \"$ac_link_default\"") >&5
1567   (eval $ac_link_default) 2>&5
1568   ac_status=$?
1569   echo "$as_me:1569: \$? = $ac_status" >&5
1570   (exit $ac_status); }; then
1571   # Find the output, starting from the most likely.  This scheme is
1572 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1573 # resort.
1574 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1575                 ls a.out conftest 2>/dev/null;
1576                 ls a.* conftest.* 2>/dev/null`; do
1577   case $ac_file in
1578     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1579     a.out ) # We found the default executable, but exeext='' is most
1580             # certainly right.
1581             break;;
1582     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1583           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1584           export ac_cv_exeext
1585           break;;
1586     * ) break;;
1587   esac
1588 done
1589 else
1590   echo "$as_me: failed program was:" >&5
1591 cat conftest.$ac_ext >&5
1592 { { echo "$as_me:1592: error: C compiler cannot create executables" >&5
1593 echo "$as_me: error: C compiler cannot create executables" >&2;}
1594    { (exit 77); exit 77; }; }
1595 fi
1596
1597 ac_exeext=$ac_cv_exeext
1598 echo "$as_me:1598: result: $ac_file" >&5
1599 echo "${ECHO_T}$ac_file" >&6
1600
1601 # Check the compiler produces executables we can run.  If not, either
1602 # the compiler is broken, or we cross compile.
1603 echo "$as_me:1603: checking whether the C compiler works" >&5
1604 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1605 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1606 # If not cross compiling, check that we can run a simple program.
1607 if test "$cross_compiling" != yes; then
1608   if { ac_try='./$ac_file'
1609   { (eval echo "$as_me:1609: \"$ac_try\"") >&5
1610   (eval $ac_try) 2>&5
1611   ac_status=$?
1612   echo "$as_me:1612: \$? = $ac_status" >&5
1613   (exit $ac_status); }; }; then
1614     cross_compiling=no
1615   else
1616     if test "$cross_compiling" = maybe; then
1617         cross_compiling=yes
1618     else
1619         { { echo "$as_me:1619: error: cannot run C compiled programs.
1620 If you meant to cross compile, use \`--host'." >&5
1621 echo "$as_me: error: cannot run C compiled programs.
1622 If you meant to cross compile, use \`--host'." >&2;}
1623    { (exit 1); exit 1; }; }
1624     fi
1625   fi
1626 fi
1627 echo "$as_me:1627: result: yes" >&5
1628 echo "${ECHO_T}yes" >&6
1629
1630 rm -f a.out a.exe conftest$ac_cv_exeext
1631 ac_clean_files=$ac_clean_files_save
1632 # Check the compiler produces executables we can run.  If not, either
1633 # the compiler is broken, or we cross compile.
1634 echo "$as_me:1634: checking whether we are cross compiling" >&5
1635 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1636 echo "$as_me:1636: result: $cross_compiling" >&5
1637 echo "${ECHO_T}$cross_compiling" >&6
1638
1639 echo "$as_me:1639: checking for executable suffix" >&5
1640 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1641 if { (eval echo "$as_me:1641: \"$ac_link\"") >&5
1642   (eval $ac_link) 2>&5
1643   ac_status=$?
1644   echo "$as_me:1644: \$? = $ac_status" >&5
1645   (exit $ac_status); }; then
1646   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1647 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1648 # work properly (i.e., refer to `conftest.exe'), while it won't with
1649 # `rm'.
1650 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1651   case $ac_file in
1652     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1653     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1654           export ac_cv_exeext
1655           break;;
1656     * ) break;;
1657   esac
1658 done
1659 else
1660   { { echo "$as_me:1660: error: cannot compute EXEEXT: cannot compile and link" >&5
1661 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1662    { (exit 1); exit 1; }; }
1663 fi
1664
1665 rm -f conftest$ac_cv_exeext
1666 echo "$as_me:1666: result: $ac_cv_exeext" >&5
1667 echo "${ECHO_T}$ac_cv_exeext" >&6
1668
1669 rm -f conftest.$ac_ext
1670 EXEEXT=$ac_cv_exeext
1671 ac_exeext=$EXEEXT
1672 echo "$as_me:1672: checking for object suffix" >&5
1673 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1674 if test "${ac_cv_objext+set}" = set; then
1675   echo $ECHO_N "(cached) $ECHO_C" >&6
1676 else
1677   cat >conftest.$ac_ext <<_ACEOF
1678 #line 1678 "configure"
1679 #include "confdefs.h"
1680
1681 int
1682 main ()
1683 {
1684
1685   ;
1686   return 0;
1687 }
1688 _ACEOF
1689 rm -f conftest.o conftest.obj
1690 if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
1691   (eval $ac_compile) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); }; then
1695   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1696   case $ac_file in
1697     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1698     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1699        break;;
1700   esac
1701 done
1702 else
1703   echo "$as_me: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1705 { { echo "$as_me:1705: error: cannot compute OBJEXT: cannot compile" >&5
1706 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1707    { (exit 1); exit 1; }; }
1708 fi
1709
1710 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1711 fi
1712 echo "$as_me:1712: result: $ac_cv_objext" >&5
1713 echo "${ECHO_T}$ac_cv_objext" >&6
1714 OBJEXT=$ac_cv_objext
1715 ac_objext=$OBJEXT
1716 echo "$as_me:1716: checking whether we are using the GNU C compiler" >&5
1717 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1718 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1719   echo $ECHO_N "(cached) $ECHO_C" >&6
1720 else
1721   cat >conftest.$ac_ext <<_ACEOF
1722 #line 1722 "configure"
1723 #include "confdefs.h"
1724
1725 int
1726 main ()
1727 {
1728 #ifndef __GNUC__
1729        choke me
1730 #endif
1731
1732   ;
1733   return 0;
1734 }
1735 _ACEOF
1736 rm -f conftest.$ac_objext
1737 if { (eval echo "$as_me:1737: \"$ac_compile\"") >&5
1738   (eval $ac_compile) 2>&5
1739   ac_status=$?
1740   echo "$as_me:1740: \$? = $ac_status" >&5
1741   (exit $ac_status); } &&
1742          { ac_try='test -s conftest.$ac_objext'
1743   { (eval echo "$as_me:1743: \"$ac_try\"") >&5
1744   (eval $ac_try) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); }; }; then
1748   ac_compiler_gnu=yes
1749 else
1750   echo "$as_me: failed program was:" >&5
1751 cat conftest.$ac_ext >&5
1752 ac_compiler_gnu=no
1753 fi
1754 rm -f conftest.$ac_objext conftest.$ac_ext
1755 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1756
1757 fi
1758 echo "$as_me:1758: result: $ac_cv_c_compiler_gnu" >&5
1759 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1760 GCC=`test $ac_compiler_gnu = yes && echo yes`
1761 ac_test_CFLAGS=${CFLAGS+set}
1762 ac_save_CFLAGS=$CFLAGS
1763 CFLAGS="-g"
1764 echo "$as_me:1764: checking whether $CC accepts -g" >&5
1765 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1766 if test "${ac_cv_prog_cc_g+set}" = set; then
1767   echo $ECHO_N "(cached) $ECHO_C" >&6
1768 else
1769   cat >conftest.$ac_ext <<_ACEOF
1770 #line 1770 "configure"
1771 #include "confdefs.h"
1772
1773 int
1774 main ()
1775 {
1776
1777   ;
1778   return 0;
1779 }
1780 _ACEOF
1781 rm -f conftest.$ac_objext
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783   (eval $ac_compile) 2>&5
1784   ac_status=$?
1785   echo "$as_me:1785: \$? = $ac_status" >&5
1786   (exit $ac_status); } &&
1787          { ac_try='test -s conftest.$ac_objext'
1788   { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1789   (eval $ac_try) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); }; }; then
1793   ac_cv_prog_cc_g=yes
1794 else
1795   echo "$as_me: failed program was:" >&5
1796 cat conftest.$ac_ext >&5
1797 ac_cv_prog_cc_g=no
1798 fi
1799 rm -f conftest.$ac_objext conftest.$ac_ext
1800 fi
1801 echo "$as_me:1801: result: $ac_cv_prog_cc_g" >&5
1802 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1803 if test "$ac_test_CFLAGS" = set; then
1804   CFLAGS=$ac_save_CFLAGS
1805 elif test $ac_cv_prog_cc_g = yes; then
1806   if test "$GCC" = yes; then
1807     CFLAGS="-g -O2"
1808   else
1809     CFLAGS="-g"
1810   fi
1811 else
1812   if test "$GCC" = yes; then
1813     CFLAGS="-O2"
1814   else
1815     CFLAGS=
1816   fi
1817 fi
1818 # Some people use a C++ compiler to compile C.  Since we use `exit',
1819 # in C++ we need to declare it.  In case someone uses the same compiler
1820 # for both compiling C and C++ we need to have the C++ compiler decide
1821 # the declaration of exit, since it's the most demanding environment.
1822 cat >conftest.$ac_ext <<_ACEOF
1823 #ifndef __cplusplus
1824   choke me
1825 #endif
1826 _ACEOF
1827 rm -f conftest.$ac_objext
1828 if { (eval echo "$as_me:1828: \"$ac_compile\"") >&5
1829   (eval $ac_compile) 2>&5
1830   ac_status=$?
1831   echo "$as_me:1831: \$? = $ac_status" >&5
1832   (exit $ac_status); } &&
1833          { ac_try='test -s conftest.$ac_objext'
1834   { (eval echo "$as_me:1834: \"$ac_try\"") >&5
1835   (eval $ac_try) 2>&5
1836   ac_status=$?
1837   echo "$as_me:1837: \$? = $ac_status" >&5
1838   (exit $ac_status); }; }; then
1839   for ac_declaration in \
1840    ''\
1841    '#include <stdlib.h>' \
1842    'extern "C" void std::exit (int) throw (); using std::exit;' \
1843    'extern "C" void std::exit (int); using std::exit;' \
1844    'extern "C" void exit (int) throw ();' \
1845    'extern "C" void exit (int);' \
1846    'void exit (int);'
1847 do
1848   cat >conftest.$ac_ext <<_ACEOF
1849 #line 1849 "configure"
1850 #include "confdefs.h"
1851 #include <stdlib.h>
1852 $ac_declaration
1853 int
1854 main ()
1855 {
1856 exit (42);
1857   ;
1858   return 0;
1859 }
1860 _ACEOF
1861 rm -f conftest.$ac_objext
1862 if { (eval echo "$as_me:1862: \"$ac_compile\"") >&5
1863   (eval $ac_compile) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit $ac_status); } &&
1867          { ac_try='test -s conftest.$ac_objext'
1868   { (eval echo "$as_me:1868: \"$ac_try\"") >&5
1869   (eval $ac_try) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); }; }; then
1873   :
1874 else
1875   echo "$as_me: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1877 continue
1878 fi
1879 rm -f conftest.$ac_objext conftest.$ac_ext
1880   cat >conftest.$ac_ext <<_ACEOF
1881 #line 1881 "configure"
1882 #include "confdefs.h"
1883 $ac_declaration
1884 int
1885 main ()
1886 {
1887 exit (42);
1888   ;
1889   return 0;
1890 }
1891 _ACEOF
1892 rm -f conftest.$ac_objext
1893 if { (eval echo "$as_me:1893: \"$ac_compile\"") >&5
1894   (eval $ac_compile) 2>&5
1895   ac_status=$?
1896   echo "$as_me:1896: \$? = $ac_status" >&5
1897   (exit $ac_status); } &&
1898          { ac_try='test -s conftest.$ac_objext'
1899   { (eval echo "$as_me:1899: \"$ac_try\"") >&5
1900   (eval $ac_try) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); }; }; then
1904   break
1905 else
1906   echo "$as_me: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 fi
1909 rm -f conftest.$ac_objext conftest.$ac_ext
1910 done
1911 rm -rf conftest*
1912 if test -n "$ac_declaration"; then
1913   echo '#ifdef __cplusplus' >>confdefs.h
1914   echo $ac_declaration      >>confdefs.h
1915   echo '#endif'             >>confdefs.h
1916 fi
1917
1918 else
1919   echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 fi
1922 rm -f conftest.$ac_objext conftest.$ac_ext
1923 ac_ext=c
1924 ac_cpp='$CPP $CPPFLAGS'
1925 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1926 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1927 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1928 ac_main_return=return
1929
1930 GCC_VERSION=none
1931 if test "$GCC" = yes ; then
1932         echo "$as_me:1932: checking version of $CC" >&5
1933 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1934         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.].*//'`"
1935         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1936         echo "$as_me:1936: result: $GCC_VERSION" >&5
1937 echo "${ECHO_T}$GCC_VERSION" >&6
1938 fi
1939
1940 echo "$as_me:1940: checking for $CC option to accept ANSI C" >&5
1941 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1942 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1943   echo $ECHO_N "(cached) $ECHO_C" >&6
1944 else
1945   ac_cv_prog_cc_stdc=no
1946 ac_save_CC=$CC
1947 cat >conftest.$ac_ext <<_ACEOF
1948 #line 1948 "configure"
1949 #include "confdefs.h"
1950 #include <stdarg.h>
1951 #include <stdio.h>
1952 #include <sys/types.h>
1953 #include <sys/stat.h>
1954 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1955 struct buf { int x; };
1956 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1957 static char *e (p, i)
1958      char **p;
1959      int i;
1960 {
1961   return p[i];
1962 }
1963 static char *f (char * (*g) (char **, int), char **p, ...)
1964 {
1965   char *s;
1966   va_list v;
1967   va_start (v,p);
1968   s = g (p, va_arg (v,int));
1969   va_end (v);
1970   return s;
1971 }
1972 int test (int i, double x);
1973 struct s1 {int (*f) (int a);};
1974 struct s2 {int (*f) (double a);};
1975 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1976 int argc;
1977 char **argv;
1978 int
1979 main ()
1980 {
1981 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1982   ;
1983   return 0;
1984 }
1985 _ACEOF
1986 # Don't try gcc -ansi; that turns off useful extensions and
1987 # breaks some systems' header files.
1988 # AIX                   -qlanglvl=ansi
1989 # Ultrix and OSF/1      -std1
1990 # HP-UX 10.20 and later -Ae
1991 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1992 # SVR4                  -Xc -D__EXTENSIONS__
1993 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1994 do
1995   CC="$ac_save_CC $ac_arg"
1996   rm -f conftest.$ac_objext
1997 if { (eval echo "$as_me:1997: \"$ac_compile\"") >&5
1998   (eval $ac_compile) 2>&5
1999   ac_status=$?
2000   echo "$as_me:2000: \$? = $ac_status" >&5
2001   (exit $ac_status); } &&
2002          { ac_try='test -s conftest.$ac_objext'
2003   { (eval echo "$as_me:2003: \"$ac_try\"") >&5
2004   (eval $ac_try) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); }; }; then
2008   ac_cv_prog_cc_stdc=$ac_arg
2009 break
2010 else
2011   echo "$as_me: failed program was:" >&5
2012 cat conftest.$ac_ext >&5
2013 fi
2014 rm -f conftest.$ac_objext
2015 done
2016 rm -f conftest.$ac_ext conftest.$ac_objext
2017 CC=$ac_save_CC
2018
2019 fi
2020
2021 case "x$ac_cv_prog_cc_stdc" in
2022   x|xno)
2023     echo "$as_me:2023: result: none needed" >&5
2024 echo "${ECHO_T}none needed" >&6 ;;
2025   *)
2026     echo "$as_me:2026: result: $ac_cv_prog_cc_stdc" >&5
2027 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2028     CC="$CC $ac_cv_prog_cc_stdc" ;;
2029 esac
2030
2031 # This should have been defined by AC_PROG_CC
2032 : ${CC:=cc}
2033
2034 echo "$as_me:2034: checking \$CC variable" >&5
2035 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2036 case "$CC" in #(vi
2037 *[\ \   ]-[IUD]*)
2038         echo "$as_me:2038: result: broken" >&5
2039 echo "${ECHO_T}broken" >&6
2040         { echo "$as_me:2040: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2041 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2042         # humor him...
2043         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2044         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2045
2046 cf_fix_cppflags=no
2047 cf_new_cflags=
2048 cf_new_cppflags=
2049 cf_new_extra_cppflags=
2050
2051 for cf_add_cflags in $cf_flags
2052 do
2053 case $cf_fix_cppflags in
2054 no)
2055         case $cf_add_cflags in #(vi
2056         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2057                 case $cf_add_cflags in
2058                 -D*)
2059                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2060
2061                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2062                                 && test -z "${cf_tst_cflags}" \
2063                                 && cf_fix_cppflags=yes
2064
2065                         if test $cf_fix_cppflags = yes ; then
2066                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2067                                 continue
2068                         elif test "${cf_tst_cflags}" = "\"'" ; then
2069                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2070                                 continue
2071                         fi
2072                         ;;
2073                 esac
2074                 case "$CPPFLAGS" in
2075                 *$cf_add_cflags) #(vi
2076                         ;;
2077                 *) #(vi
2078                         case $cf_add_cflags in #(vi
2079                         -D*)
2080                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2081
2082 CPPFLAGS=`echo "$CPPFLAGS" | \
2083         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2084                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2085
2086                                 ;;
2087                         esac
2088                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2089                         ;;
2090                 esac
2091                 ;;
2092         *)
2093                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2094                 ;;
2095         esac
2096         ;;
2097 yes)
2098         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2099
2100         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2101
2102         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2103                 && test -z "${cf_tst_cflags}" \
2104                 && cf_fix_cppflags=no
2105         ;;
2106 esac
2107 done
2108
2109 if test -n "$cf_new_cflags" ; then
2110
2111         CFLAGS="$CFLAGS $cf_new_cflags"
2112 fi
2113
2114 if test -n "$cf_new_cppflags" ; then
2115
2116         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2117 fi
2118
2119 if test -n "$cf_new_extra_cppflags" ; then
2120
2121         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2122 fi
2123
2124         ;;
2125 *)
2126         echo "$as_me:2126: result: ok" >&5
2127 echo "${ECHO_T}ok" >&6
2128         ;;
2129 esac
2130
2131 ac_ext=c
2132 ac_cpp='$CPP $CPPFLAGS'
2133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2136 ac_main_return=return
2137 echo "$as_me:2137: checking how to run the C preprocessor" >&5
2138 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2139 # On Suns, sometimes $CPP names a directory.
2140 if test -n "$CPP" && test -d "$CPP"; then
2141   CPP=
2142 fi
2143 if test -z "$CPP"; then
2144   if test "${ac_cv_prog_CPP+set}" = set; then
2145   echo $ECHO_N "(cached) $ECHO_C" >&6
2146 else
2147       # Double quotes because CPP needs to be expanded
2148     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2149     do
2150       ac_preproc_ok=false
2151 for ac_c_preproc_warn_flag in '' yes
2152 do
2153   # Use a header file that comes with gcc, so configuring glibc
2154   # with a fresh cross-compiler works.
2155   # On the NeXT, cc -E runs the code through the compiler's parser,
2156   # not just through cpp. "Syntax error" is here to catch this case.
2157   cat >conftest.$ac_ext <<_ACEOF
2158 #line 2158 "configure"
2159 #include "confdefs.h"
2160 #include <assert.h>
2161                      Syntax error
2162 _ACEOF
2163 if { (eval echo "$as_me:2163: \"$ac_cpp conftest.$ac_ext\"") >&5
2164   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2165   ac_status=$?
2166   egrep -v '^ *\+' conftest.er1 >conftest.err
2167   rm -f conftest.er1
2168   cat conftest.err >&5
2169   echo "$as_me:2169: \$? = $ac_status" >&5
2170   (exit $ac_status); } >/dev/null; then
2171   if test -s conftest.err; then
2172     ac_cpp_err=$ac_c_preproc_warn_flag
2173   else
2174     ac_cpp_err=
2175   fi
2176 else
2177   ac_cpp_err=yes
2178 fi
2179 if test -z "$ac_cpp_err"; then
2180   :
2181 else
2182   echo "$as_me: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   # Broken: fails on valid input.
2185 continue
2186 fi
2187 rm -f conftest.err conftest.$ac_ext
2188
2189   # OK, works on sane cases.  Now check whether non-existent headers
2190   # can be detected and how.
2191   cat >conftest.$ac_ext <<_ACEOF
2192 #line 2192 "configure"
2193 #include "confdefs.h"
2194 #include <ac_nonexistent.h>
2195 _ACEOF
2196 if { (eval echo "$as_me:2196: \"$ac_cpp conftest.$ac_ext\"") >&5
2197   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2198   ac_status=$?
2199   egrep -v '^ *\+' conftest.er1 >conftest.err
2200   rm -f conftest.er1
2201   cat conftest.err >&5
2202   echo "$as_me:2202: \$? = $ac_status" >&5
2203   (exit $ac_status); } >/dev/null; then
2204   if test -s conftest.err; then
2205     ac_cpp_err=$ac_c_preproc_warn_flag
2206   else
2207     ac_cpp_err=
2208   fi
2209 else
2210   ac_cpp_err=yes
2211 fi
2212 if test -z "$ac_cpp_err"; then
2213   # Broken: success on invalid input.
2214 continue
2215 else
2216   echo "$as_me: failed program was:" >&5
2217   cat conftest.$ac_ext >&5
2218   # Passes both tests.
2219 ac_preproc_ok=:
2220 break
2221 fi
2222 rm -f conftest.err conftest.$ac_ext
2223
2224 done
2225 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2226 rm -f conftest.err conftest.$ac_ext
2227 if $ac_preproc_ok; then
2228   break
2229 fi
2230
2231     done
2232     ac_cv_prog_CPP=$CPP
2233
2234 fi
2235   CPP=$ac_cv_prog_CPP
2236 else
2237   ac_cv_prog_CPP=$CPP
2238 fi
2239 echo "$as_me:2239: result: $CPP" >&5
2240 echo "${ECHO_T}$CPP" >&6
2241 ac_preproc_ok=false
2242 for ac_c_preproc_warn_flag in '' yes
2243 do
2244   # Use a header file that comes with gcc, so configuring glibc
2245   # with a fresh cross-compiler works.
2246   # On the NeXT, cc -E runs the code through the compiler's parser,
2247   # not just through cpp. "Syntax error" is here to catch this case.
2248   cat >conftest.$ac_ext <<_ACEOF
2249 #line 2249 "configure"
2250 #include "confdefs.h"
2251 #include <assert.h>
2252                      Syntax error
2253 _ACEOF
2254 if { (eval echo "$as_me:2254: \"$ac_cpp conftest.$ac_ext\"") >&5
2255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2256   ac_status=$?
2257   egrep -v '^ *\+' conftest.er1 >conftest.err
2258   rm -f conftest.er1
2259   cat conftest.err >&5
2260   echo "$as_me:2260: \$? = $ac_status" >&5
2261   (exit $ac_status); } >/dev/null; then
2262   if test -s conftest.err; then
2263     ac_cpp_err=$ac_c_preproc_warn_flag
2264   else
2265     ac_cpp_err=
2266   fi
2267 else
2268   ac_cpp_err=yes
2269 fi
2270 if test -z "$ac_cpp_err"; then
2271   :
2272 else
2273   echo "$as_me: failed program was:" >&5
2274   cat conftest.$ac_ext >&5
2275   # Broken: fails on valid input.
2276 continue
2277 fi
2278 rm -f conftest.err conftest.$ac_ext
2279
2280   # OK, works on sane cases.  Now check whether non-existent headers
2281   # can be detected and how.
2282   cat >conftest.$ac_ext <<_ACEOF
2283 #line 2283 "configure"
2284 #include "confdefs.h"
2285 #include <ac_nonexistent.h>
2286 _ACEOF
2287 if { (eval echo "$as_me:2287: \"$ac_cpp conftest.$ac_ext\"") >&5
2288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2289   ac_status=$?
2290   egrep -v '^ *\+' conftest.er1 >conftest.err
2291   rm -f conftest.er1
2292   cat conftest.err >&5
2293   echo "$as_me:2293: \$? = $ac_status" >&5
2294   (exit $ac_status); } >/dev/null; then
2295   if test -s conftest.err; then
2296     ac_cpp_err=$ac_c_preproc_warn_flag
2297   else
2298     ac_cpp_err=
2299   fi
2300 else
2301   ac_cpp_err=yes
2302 fi
2303 if test -z "$ac_cpp_err"; then
2304   # Broken: success on invalid input.
2305 continue
2306 else
2307   echo "$as_me: failed program was:" >&5
2308   cat conftest.$ac_ext >&5
2309   # Passes both tests.
2310 ac_preproc_ok=:
2311 break
2312 fi
2313 rm -f conftest.err conftest.$ac_ext
2314
2315 done
2316 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2317 rm -f conftest.err conftest.$ac_ext
2318 if $ac_preproc_ok; then
2319   :
2320 else
2321   { { echo "$as_me:2321: error: C preprocessor \"$CPP\" fails sanity check" >&5
2322 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2323    { (exit 1); exit 1; }; }
2324 fi
2325
2326 ac_ext=c
2327 ac_cpp='$CPP $CPPFLAGS'
2328 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2329 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2330 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2331 ac_main_return=return
2332
2333 if test $ac_cv_c_compiler_gnu = yes; then
2334     echo "$as_me:2334: checking whether $CC needs -traditional" >&5
2335 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2336 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2337   echo $ECHO_N "(cached) $ECHO_C" >&6
2338 else
2339     ac_pattern="Autoconf.*'x'"
2340   cat >conftest.$ac_ext <<_ACEOF
2341 #line 2341 "configure"
2342 #include "confdefs.h"
2343 #include <sgtty.h>
2344 int Autoconf = TIOCGETP;
2345 _ACEOF
2346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2347   egrep "$ac_pattern" >/dev/null 2>&1; then
2348   ac_cv_prog_gcc_traditional=yes
2349 else
2350   ac_cv_prog_gcc_traditional=no
2351 fi
2352 rm -rf conftest*
2353
2354   if test $ac_cv_prog_gcc_traditional = no; then
2355     cat >conftest.$ac_ext <<_ACEOF
2356 #line 2356 "configure"
2357 #include "confdefs.h"
2358 #include <termio.h>
2359 int Autoconf = TCGETA;
2360 _ACEOF
2361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2362   egrep "$ac_pattern" >/dev/null 2>&1; then
2363   ac_cv_prog_gcc_traditional=yes
2364 fi
2365 rm -rf conftest*
2366
2367   fi
2368 fi
2369 echo "$as_me:2369: result: $ac_cv_prog_gcc_traditional" >&5
2370 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2371   if test $ac_cv_prog_gcc_traditional = yes; then
2372     CC="$CC -traditional"
2373   fi
2374 fi
2375
2376 echo "$as_me:2376: checking whether $CC understands -c and -o together" >&5
2377 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2378 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2379   echo $ECHO_N "(cached) $ECHO_C" >&6
2380 else
2381
2382 cat > conftest.$ac_ext <<CF_EOF
2383 #include <stdio.h>
2384 int main()
2385 {
2386         ${cf_cv_main_return:-return}(0);
2387 }
2388 CF_EOF
2389 # We do the test twice because some compilers refuse to overwrite an
2390 # existing .o file with -o, though they will create one.
2391 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2392 if { (eval echo "$as_me:2392: \"$ac_try\"") >&5
2393   (eval $ac_try) 2>&5
2394   ac_status=$?
2395   echo "$as_me:2395: \$? = $ac_status" >&5
2396   (exit $ac_status); } &&
2397   test -f conftest2.$ac_objext && { (eval echo "$as_me:2397: \"$ac_try\"") >&5
2398   (eval $ac_try) 2>&5
2399   ac_status=$?
2400   echo "$as_me:2400: \$? = $ac_status" >&5
2401   (exit $ac_status); };
2402 then
2403   eval cf_cv_prog_CC_c_o=yes
2404 else
2405   eval cf_cv_prog_CC_c_o=no
2406 fi
2407 rm -rf conftest*
2408
2409 fi
2410 if test $cf_cv_prog_CC_c_o = yes; then
2411   echo "$as_me:2411: result: yes" >&5
2412 echo "${ECHO_T}yes" >&6
2413 else
2414   echo "$as_me:2414: result: no" >&5
2415 echo "${ECHO_T}no" >&6
2416 fi
2417
2418 if test "$cross_compiling" = yes ; then
2419   LDCONFIG=:
2420 else
2421 case "$cf_cv_system_name" in #(vi
2422 dragonfly*|mirbsd*|freebsd*) #(vi
2423   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2424   ;;
2425 *) LDPATH=$PATH:/sbin:/usr/sbin
2426   # Extract the first word of "ldconfig", so it can be a program name with args.
2427 set dummy ldconfig; ac_word=$2
2428 echo "$as_me:2428: checking for $ac_word" >&5
2429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2430 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2431   echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433   case $LDCONFIG in
2434   [\\/]* | ?:[\\/]*)
2435   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2436   ;;
2437   *)
2438   ac_save_IFS=$IFS; IFS=$ac_path_separator
2439 ac_dummy="$LDPATH"
2440 for ac_dir in $ac_dummy; do
2441   IFS=$ac_save_IFS
2442   test -z "$ac_dir" && ac_dir=.
2443   if $as_executable_p "$ac_dir/$ac_word"; then
2444    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2445    echo "$as_me:2445: found $ac_dir/$ac_word" >&5
2446    break
2447 fi
2448 done
2449
2450   ;;
2451 esac
2452 fi
2453 LDCONFIG=$ac_cv_path_LDCONFIG
2454
2455 if test -n "$LDCONFIG"; then
2456   echo "$as_me:2456: result: $LDCONFIG" >&5
2457 echo "${ECHO_T}$LDCONFIG" >&6
2458 else
2459   echo "$as_me:2459: result: no" >&5
2460 echo "${ECHO_T}no" >&6
2461 fi
2462
2463   ;;
2464 esac
2465 fi
2466
2467 echo "$as_me:2467: checking if you want to ensure bool is consistent with C++" >&5
2468 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2469
2470 # Check whether --with-cxx or --without-cxx was given.
2471 if test "${with_cxx+set}" = set; then
2472   withval="$with_cxx"
2473   cf_with_cxx=$withval
2474 else
2475   cf_with_cxx=yes
2476 fi;
2477 echo "$as_me:2477: result: $cf_with_cxx" >&5
2478 echo "${ECHO_T}$cf_with_cxx" >&6
2479 if test "X$cf_with_cxx" = Xno ; then
2480         CXX=""
2481         GXX=""
2482 else
2483         # with autoconf 2.13, we can change the error to a warning:
2484                 ac_ext=cc
2485 ac_cpp='$CXXCPP $CPPFLAGS'
2486 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2487 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2488 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2489 ac_main_return=return
2490 if test -n "$ac_tool_prefix"; then
2491   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2492   do
2493     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2494 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2495 echo "$as_me:2495: checking for $ac_word" >&5
2496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2497 if test "${ac_cv_prog_CXX+set}" = set; then
2498   echo $ECHO_N "(cached) $ECHO_C" >&6
2499 else
2500   if test -n "$CXX"; then
2501   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2502 else
2503   ac_save_IFS=$IFS; IFS=$ac_path_separator
2504 ac_dummy="$PATH"
2505 for ac_dir in $ac_dummy; do
2506   IFS=$ac_save_IFS
2507   test -z "$ac_dir" && ac_dir=.
2508   $as_executable_p "$ac_dir/$ac_word" || continue
2509 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2510 echo "$as_me:2510: found $ac_dir/$ac_word" >&5
2511 break
2512 done
2513
2514 fi
2515 fi
2516 CXX=$ac_cv_prog_CXX
2517 if test -n "$CXX"; then
2518   echo "$as_me:2518: result: $CXX" >&5
2519 echo "${ECHO_T}$CXX" >&6
2520 else
2521   echo "$as_me:2521: result: no" >&5
2522 echo "${ECHO_T}no" >&6
2523 fi
2524
2525     test -n "$CXX" && break
2526   done
2527 fi
2528 if test -z "$CXX"; then
2529   ac_ct_CXX=$CXX
2530   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2531 do
2532   # Extract the first word of "$ac_prog", so it can be a program name with args.
2533 set dummy $ac_prog; ac_word=$2
2534 echo "$as_me:2534: checking for $ac_word" >&5
2535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2536 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2537   echo $ECHO_N "(cached) $ECHO_C" >&6
2538 else
2539   if test -n "$ac_ct_CXX"; then
2540   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2541 else
2542   ac_save_IFS=$IFS; IFS=$ac_path_separator
2543 ac_dummy="$PATH"
2544 for ac_dir in $ac_dummy; do
2545   IFS=$ac_save_IFS
2546   test -z "$ac_dir" && ac_dir=.
2547   $as_executable_p "$ac_dir/$ac_word" || continue
2548 ac_cv_prog_ac_ct_CXX="$ac_prog"
2549 echo "$as_me:2549: found $ac_dir/$ac_word" >&5
2550 break
2551 done
2552
2553 fi
2554 fi
2555 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2556 if test -n "$ac_ct_CXX"; then
2557   echo "$as_me:2557: result: $ac_ct_CXX" >&5
2558 echo "${ECHO_T}$ac_ct_CXX" >&6
2559 else
2560   echo "$as_me:2560: result: no" >&5
2561 echo "${ECHO_T}no" >&6
2562 fi
2563
2564   test -n "$ac_ct_CXX" && break
2565 done
2566 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2567
2568   CXX=$ac_ct_CXX
2569 fi
2570
2571 # Provide some information about the compiler.
2572 echo "$as_me:2572:" \
2573      "checking for C++ compiler version" >&5
2574 ac_compiler=`set X $ac_compile; echo $2`
2575 { (eval echo "$as_me:2575: \"$ac_compiler --version </dev/null >&5\"") >&5
2576   (eval $ac_compiler --version </dev/null >&5) 2>&5
2577   ac_status=$?
2578   echo "$as_me:2578: \$? = $ac_status" >&5
2579   (exit $ac_status); }
2580 { (eval echo "$as_me:2580: \"$ac_compiler -v </dev/null >&5\"") >&5
2581   (eval $ac_compiler -v </dev/null >&5) 2>&5
2582   ac_status=$?
2583   echo "$as_me:2583: \$? = $ac_status" >&5
2584   (exit $ac_status); }
2585 { (eval echo "$as_me:2585: \"$ac_compiler -V </dev/null >&5\"") >&5
2586   (eval $ac_compiler -V </dev/null >&5) 2>&5
2587   ac_status=$?
2588   echo "$as_me:2588: \$? = $ac_status" >&5
2589   (exit $ac_status); }
2590
2591 echo "$as_me:2591: checking whether we are using the GNU C++ compiler" >&5
2592 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2593 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2594   echo $ECHO_N "(cached) $ECHO_C" >&6
2595 else
2596   cat >conftest.$ac_ext <<_ACEOF
2597 #line 2597 "configure"
2598 #include "confdefs.h"
2599
2600 int
2601 main ()
2602 {
2603 #ifndef __GNUC__
2604        choke me
2605 #endif
2606
2607   ;
2608   return 0;
2609 }
2610 _ACEOF
2611 rm -f conftest.$ac_objext
2612 if { (eval echo "$as_me:2612: \"$ac_compile\"") >&5
2613   (eval $ac_compile) 2>&5
2614   ac_status=$?
2615   echo "$as_me:2615: \$? = $ac_status" >&5
2616   (exit $ac_status); } &&
2617          { ac_try='test -s conftest.$ac_objext'
2618   { (eval echo "$as_me:2618: \"$ac_try\"") >&5
2619   (eval $ac_try) 2>&5
2620   ac_status=$?
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); }; }; then
2623   ac_compiler_gnu=yes
2624 else
2625   echo "$as_me: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 ac_compiler_gnu=no
2628 fi
2629 rm -f conftest.$ac_objext conftest.$ac_ext
2630 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2631
2632 fi
2633 echo "$as_me:2633: result: $ac_cv_cxx_compiler_gnu" >&5
2634 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2635 GXX=`test $ac_compiler_gnu = yes && echo yes`
2636 ac_test_CXXFLAGS=${CXXFLAGS+set}
2637 ac_save_CXXFLAGS=$CXXFLAGS
2638 CXXFLAGS="-g"
2639 echo "$as_me:2639: checking whether $CXX accepts -g" >&5
2640 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2641 if test "${ac_cv_prog_cxx_g+set}" = set; then
2642   echo $ECHO_N "(cached) $ECHO_C" >&6
2643 else
2644   cat >conftest.$ac_ext <<_ACEOF
2645 #line 2645 "configure"
2646 #include "confdefs.h"
2647
2648 int
2649 main ()
2650 {
2651
2652   ;
2653   return 0;
2654 }
2655 _ACEOF
2656 rm -f conftest.$ac_objext
2657 if { (eval echo "$as_me:2657: \"$ac_compile\"") >&5
2658   (eval $ac_compile) 2>&5
2659   ac_status=$?
2660   echo "$as_me:2660: \$? = $ac_status" >&5
2661   (exit $ac_status); } &&
2662          { ac_try='test -s conftest.$ac_objext'
2663   { (eval echo "$as_me:2663: \"$ac_try\"") >&5
2664   (eval $ac_try) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); }; }; then
2668   ac_cv_prog_cxx_g=yes
2669 else
2670   echo "$as_me: failed program was:" >&5
2671 cat conftest.$ac_ext >&5
2672 ac_cv_prog_cxx_g=no
2673 fi
2674 rm -f conftest.$ac_objext conftest.$ac_ext
2675 fi
2676 echo "$as_me:2676: result: $ac_cv_prog_cxx_g" >&5
2677 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2678 if test "$ac_test_CXXFLAGS" = set; then
2679   CXXFLAGS=$ac_save_CXXFLAGS
2680 elif test $ac_cv_prog_cxx_g = yes; then
2681   if test "$GXX" = yes; then
2682     CXXFLAGS="-g -O2"
2683   else
2684     CXXFLAGS="-g"
2685   fi
2686 else
2687   if test "$GXX" = yes; then
2688     CXXFLAGS="-O2"
2689   else
2690     CXXFLAGS=
2691   fi
2692 fi
2693 for ac_declaration in \
2694    ''\
2695    '#include <stdlib.h>' \
2696    'extern "C" void std::exit (int) throw (); using std::exit;' \
2697    'extern "C" void std::exit (int); using std::exit;' \
2698    'extern "C" void exit (int) throw ();' \
2699    'extern "C" void exit (int);' \
2700    'void exit (int);'
2701 do
2702   cat >conftest.$ac_ext <<_ACEOF
2703 #line 2703 "configure"
2704 #include "confdefs.h"
2705 #include <stdlib.h>
2706 $ac_declaration
2707 int
2708 main ()
2709 {
2710 exit (42);
2711   ;
2712   return 0;
2713 }
2714 _ACEOF
2715 rm -f conftest.$ac_objext
2716 if { (eval echo "$as_me:2716: \"$ac_compile\"") >&5
2717   (eval $ac_compile) 2>&5
2718   ac_status=$?
2719   echo "$as_me:2719: \$? = $ac_status" >&5
2720   (exit $ac_status); } &&
2721          { ac_try='test -s conftest.$ac_objext'
2722   { (eval echo "$as_me:2722: \"$ac_try\"") >&5
2723   (eval $ac_try) 2>&5
2724   ac_status=$?
2725   echo "$as_me:2725: \$? = $ac_status" >&5
2726   (exit $ac_status); }; }; then
2727   :
2728 else
2729   echo "$as_me: failed program was:" >&5
2730 cat conftest.$ac_ext >&5
2731 continue
2732 fi
2733 rm -f conftest.$ac_objext conftest.$ac_ext
2734   cat >conftest.$ac_ext <<_ACEOF
2735 #line 2735 "configure"
2736 #include "confdefs.h"
2737 $ac_declaration
2738 int
2739 main ()
2740 {
2741 exit (42);
2742   ;
2743   return 0;
2744 }
2745 _ACEOF
2746 rm -f conftest.$ac_objext
2747 if { (eval echo "$as_me:2747: \"$ac_compile\"") >&5
2748   (eval $ac_compile) 2>&5
2749   ac_status=$?
2750   echo "$as_me:2750: \$? = $ac_status" >&5
2751   (exit $ac_status); } &&
2752          { ac_try='test -s conftest.$ac_objext'
2753   { (eval echo "$as_me:2753: \"$ac_try\"") >&5
2754   (eval $ac_try) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); }; }; then
2758   break
2759 else
2760   echo "$as_me: failed program was:" >&5
2761 cat conftest.$ac_ext >&5
2762 fi
2763 rm -f conftest.$ac_objext conftest.$ac_ext
2764 done
2765 rm -rf conftest*
2766 if test -n "$ac_declaration"; then
2767   echo '#ifdef __cplusplus' >>confdefs.h
2768   echo $ac_declaration      >>confdefs.h
2769   echo '#endif'             >>confdefs.h
2770 fi
2771
2772 ac_ext=c
2773 ac_cpp='$CPP $CPPFLAGS'
2774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2777 ac_main_return=return
2778
2779                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2780         if test "$CXX" = "g++" ; then
2781                 # Extract the first word of "g++", so it can be a program name with args.
2782 set dummy g++; ac_word=$2
2783 echo "$as_me:2783: checking for $ac_word" >&5
2784 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2785 if test "${ac_cv_path_CXX+set}" = set; then
2786   echo $ECHO_N "(cached) $ECHO_C" >&6
2787 else
2788   case $CXX in
2789   [\\/]* | ?:[\\/]*)
2790   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2791   ;;
2792   *)
2793   ac_save_IFS=$IFS; IFS=$ac_path_separator
2794 ac_dummy="$PATH"
2795 for ac_dir in $ac_dummy; do
2796   IFS=$ac_save_IFS
2797   test -z "$ac_dir" && ac_dir=.
2798   if $as_executable_p "$ac_dir/$ac_word"; then
2799    ac_cv_path_CXX="$ac_dir/$ac_word"
2800    echo "$as_me:2800: found $ac_dir/$ac_word" >&5
2801    break
2802 fi
2803 done
2804
2805   ;;
2806 esac
2807 fi
2808 CXX=$ac_cv_path_CXX
2809
2810 if test -n "$CXX"; then
2811   echo "$as_me:2811: result: $CXX" >&5
2812 echo "${ECHO_T}$CXX" >&6
2813 else
2814   echo "$as_me:2814: result: no" >&5
2815 echo "${ECHO_T}no" >&6
2816 fi
2817
2818         fi
2819         case "x$CXX" in #(vi
2820         x|xg++)
2821                 { echo "$as_me:2821: WARNING: You don't have any C++ compiler, too bad" >&5
2822 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2823                 cf_with_cxx=no; CXX=""; GXX="";
2824                 ;;
2825         esac
2826 fi
2827
2828 GXX_VERSION=none
2829 if test "$GXX" = yes; then
2830         echo "$as_me:2830: checking version of ${CXX:-g++}" >&5
2831 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2832         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2833         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2834         echo "$as_me:2834: result: $GXX_VERSION" >&5
2835 echo "${ECHO_T}$GXX_VERSION" >&6
2836 fi
2837
2838 case $GXX_VERSION in
2839 1*|2.[0-6]*)
2840         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2841         # cf_cxx_library=no
2842         { echo "$as_me:2842: WARNING: templates do not work" >&5
2843 echo "$as_me: WARNING: templates do not work" >&2;}
2844         ;;
2845 esac
2846
2847 echo "$as_me:2847: checking if you want to build C++ binding and demo" >&5
2848 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2849
2850 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2851 if test "${with_cxx_binding+set}" = set; then
2852   withval="$with_cxx_binding"
2853   cf_with_cxx_binding=$withval
2854 else
2855   cf_with_cxx_binding=$cf_with_cxx
2856 fi;
2857 echo "$as_me:2857: result: $cf_with_cxx_binding" >&5
2858 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2859
2860 echo "$as_me:2860: checking if you want to build with Ada95" >&5
2861 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2862 echo "$as_me:2862: result: $cf_with_ada" >&5
2863 echo "${ECHO_T}$cf_with_ada" >&6
2864
2865 echo "$as_me:2865: checking if you want to install manpages" >&5
2866 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2867
2868 # Check whether --with-manpages or --without-manpages was given.
2869 if test "${with_manpages+set}" = set; then
2870   withval="$with_manpages"
2871   cf_with_manpages=$withval
2872 else
2873   cf_with_manpages=yes
2874 fi;
2875 echo "$as_me:2875: result: $cf_with_manpages" >&5
2876 echo "${ECHO_T}$cf_with_manpages" >&6
2877
2878 echo "$as_me:2878: checking if you want to build programs such as tic" >&5
2879 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2880
2881 # Check whether --with-progs or --without-progs was given.
2882 if test "${with_progs+set}" = set; then
2883   withval="$with_progs"
2884   cf_with_progs=$withval
2885 else
2886   cf_with_progs=yes
2887 fi;
2888 echo "$as_me:2888: result: $cf_with_progs" >&5
2889 echo "${ECHO_T}$cf_with_progs" >&6
2890
2891 echo "$as_me:2891: checking if you want to build test-programs" >&5
2892 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2893
2894 # Check whether --with-tests or --without-tests was given.
2895 if test "${with_tests+set}" = set; then
2896   withval="$with_tests"
2897   cf_with_tests=$withval
2898 else
2899   cf_with_tests=yes
2900 fi;
2901 echo "$as_me:2901: result: $cf_with_tests" >&5
2902 echo "${ECHO_T}$cf_with_tests" >&6
2903
2904 echo "$as_me:2904: checking if you wish to install curses.h" >&5
2905 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2906
2907 # Check whether --with-curses-h or --without-curses-h was given.
2908 if test "${with_curses_h+set}" = set; then
2909   withval="$with_curses_h"
2910   with_curses_h=$withval
2911 else
2912   with_curses_h=yes
2913 fi;
2914 echo "$as_me:2914: result: $with_curses_h" >&5
2915 echo "${ECHO_T}$with_curses_h" >&6
2916
2917 modules_to_build="ncurses"
2918 if test "X$cf_with_progs" != Xno ; then
2919 modules_to_build="$modules_to_build progs tack"
2920 fi
2921 modules_to_build="$modules_to_build panel menu form"
2922
2923 test "$program_prefix" != NONE &&
2924   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2925 # Use a double $ so make ignores it.
2926 test "$program_suffix" != NONE &&
2927   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2928 # Double any \ or $.  echo might interpret backslashes.
2929 # By default was `s,x,x', remove it if useless.
2930 cat <<\_ACEOF >conftest.sed
2931 s/[\\$]/&&/g;s/;s,x,x,$//
2932 _ACEOF
2933 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2934 rm conftest.sed
2935
2936 for ac_prog in mawk gawk nawk awk
2937 do
2938   # Extract the first word of "$ac_prog", so it can be a program name with args.
2939 set dummy $ac_prog; ac_word=$2
2940 echo "$as_me:2940: checking for $ac_word" >&5
2941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2942 if test "${ac_cv_prog_AWK+set}" = set; then
2943   echo $ECHO_N "(cached) $ECHO_C" >&6
2944 else
2945   if test -n "$AWK"; then
2946   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2947 else
2948   ac_save_IFS=$IFS; IFS=$ac_path_separator
2949 ac_dummy="$PATH"
2950 for ac_dir in $ac_dummy; do
2951   IFS=$ac_save_IFS
2952   test -z "$ac_dir" && ac_dir=.
2953   $as_executable_p "$ac_dir/$ac_word" || continue
2954 ac_cv_prog_AWK="$ac_prog"
2955 echo "$as_me:2955: found $ac_dir/$ac_word" >&5
2956 break
2957 done
2958
2959 fi
2960 fi
2961 AWK=$ac_cv_prog_AWK
2962 if test -n "$AWK"; then
2963   echo "$as_me:2963: result: $AWK" >&5
2964 echo "${ECHO_T}$AWK" >&6
2965 else
2966   echo "$as_me:2966: result: no" >&5
2967 echo "${ECHO_T}no" >&6
2968 fi
2969
2970   test -n "$AWK" && break
2971 done
2972
2973 test -z "$AWK" && { { echo "$as_me:2973: error: No awk program found" >&5
2974 echo "$as_me: error: No awk program found" >&2;}
2975    { (exit 1); exit 1; }; }
2976
2977 echo "$as_me:2977: checking for egrep" >&5
2978 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2979 if test "${ac_cv_prog_egrep+set}" = set; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2983     then ac_cv_prog_egrep='grep -E'
2984     else ac_cv_prog_egrep='egrep'
2985     fi
2986 fi
2987 echo "$as_me:2987: result: $ac_cv_prog_egrep" >&5
2988 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2989  EGREP=$ac_cv_prog_egrep
2990
2991 test -z "$EGREP" && { { echo "$as_me:2991: error: No egrep program found" >&5
2992 echo "$as_me: error: No egrep program found" >&2;}
2993    { (exit 1); exit 1; }; }
2994
2995 # Find a good install program.  We prefer a C program (faster),
2996 # so one script is as good as another.  But avoid the broken or
2997 # incompatible versions:
2998 # SysV /etc/install, /usr/sbin/install
2999 # SunOS /usr/etc/install
3000 # IRIX /sbin/install
3001 # AIX /bin/install
3002 # AmigaOS /C/install, which installs bootblocks on floppy discs
3003 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3004 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3005 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3006 # ./install, which can be erroneously created by make from ./install.sh.
3007 echo "$as_me:3007: checking for a BSD compatible install" >&5
3008 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3009 if test -z "$INSTALL"; then
3010 if test "${ac_cv_path_install+set}" = set; then
3011   echo $ECHO_N "(cached) $ECHO_C" >&6
3012 else
3013     ac_save_IFS=$IFS; IFS=$ac_path_separator
3014   for ac_dir in $PATH; do
3015     IFS=$ac_save_IFS
3016     # Account for people who put trailing slashes in PATH elements.
3017     case $ac_dir/ in
3018     / | ./ | .// | /cC/* \
3019     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3020     | /usr/ucb/* ) ;;
3021     *)
3022       # OSF1 and SCO ODT 3.0 have their own names for install.
3023       # Don't use installbsd from OSF since it installs stuff as root
3024       # by default.
3025       for ac_prog in ginstall scoinst install; do
3026         if $as_executable_p "$ac_dir/$ac_prog"; then
3027           if test $ac_prog = install &&
3028             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3029             # AIX install.  It has an incompatible calling convention.
3030             :
3031           elif test $ac_prog = install &&
3032             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3033             # program-specific install script used by HP pwplus--don't use.
3034             :
3035           else
3036             ac_cv_path_install="$ac_dir/$ac_prog -c"
3037             break 2
3038           fi
3039         fi
3040       done
3041       ;;
3042     esac
3043   done
3044
3045 fi
3046   if test "${ac_cv_path_install+set}" = set; then
3047     INSTALL=$ac_cv_path_install
3048   else
3049     # As a last resort, use the slow shell script.  We don't cache a
3050     # path for INSTALL within a source directory, because that will
3051     # break other packages using the cache if that directory is
3052     # removed, or if the path is relative.
3053     INSTALL=$ac_install_sh
3054   fi
3055 fi
3056 echo "$as_me:3056: result: $INSTALL" >&5
3057 echo "${ECHO_T}$INSTALL" >&6
3058
3059 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3060 # It thinks the first close brace ends the variable substitution.
3061 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3062
3063 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3064
3065 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3066
3067 case $INSTALL in
3068 /*)
3069   ;;
3070 *)
3071   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3072   test -z "$cf_dir" && cf_dir=.
3073   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3074   ;;
3075 esac
3076
3077 for ac_prog in tdlint lint alint splint lclint
3078 do
3079   # Extract the first word of "$ac_prog", so it can be a program name with args.
3080 set dummy $ac_prog; ac_word=$2
3081 echo "$as_me:3081: checking for $ac_word" >&5
3082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3083 if test "${ac_cv_prog_LINT+set}" = set; then
3084   echo $ECHO_N "(cached) $ECHO_C" >&6
3085 else
3086   if test -n "$LINT"; then
3087   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3088 else
3089   ac_save_IFS=$IFS; IFS=$ac_path_separator
3090 ac_dummy="$PATH"
3091 for ac_dir in $ac_dummy; do
3092   IFS=$ac_save_IFS
3093   test -z "$ac_dir" && ac_dir=.
3094   $as_executable_p "$ac_dir/$ac_word" || continue
3095 ac_cv_prog_LINT="$ac_prog"
3096 echo "$as_me:3096: found $ac_dir/$ac_word" >&5
3097 break
3098 done
3099
3100 fi
3101 fi
3102 LINT=$ac_cv_prog_LINT
3103 if test -n "$LINT"; then
3104   echo "$as_me:3104: result: $LINT" >&5
3105 echo "${ECHO_T}$LINT" >&6
3106 else
3107   echo "$as_me:3107: result: no" >&5
3108 echo "${ECHO_T}no" >&6
3109 fi
3110
3111   test -n "$LINT" && break
3112 done
3113
3114 echo "$as_me:3114: checking whether ln -s works" >&5
3115 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3116 LN_S=$as_ln_s
3117 if test "$LN_S" = "ln -s"; then
3118   echo "$as_me:3118: result: yes" >&5
3119 echo "${ECHO_T}yes" >&6
3120 else
3121   echo "$as_me:3121: result: no, using $LN_S" >&5
3122 echo "${ECHO_T}no, using $LN_S" >&6
3123 fi
3124
3125 echo "$as_me:3125: checking if $LN_S -f options work" >&5
3126 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3127
3128 rm -f conf$$.src conf$$dst
3129 echo >conf$$.dst
3130 echo first >conf$$.src
3131 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3132         cf_prog_ln_sf=yes
3133 else
3134         cf_prog_ln_sf=no
3135 fi
3136 rm -f conf$$.dst conf$$src
3137 echo "$as_me:3137: result: $cf_prog_ln_sf" >&5
3138 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3139
3140 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3141
3142 echo "$as_me:3142: checking for long file names" >&5
3143 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3144 if test "${ac_cv_sys_long_file_names+set}" = set; then
3145   echo $ECHO_N "(cached) $ECHO_C" >&6
3146 else
3147   ac_cv_sys_long_file_names=yes
3148 # Test for long file names in all the places we know might matter:
3149 #      .                the current directory, where building will happen
3150 #      $prefix/lib      where we will be installing things
3151 #      $exec_prefix/lib likewise
3152 # eval it to expand exec_prefix.
3153 #      $TMPDIR          if set, where it might want to write temporary files
3154 # if $TMPDIR is not set:
3155 #      /tmp             where it might want to write temporary files
3156 #      /var/tmp         likewise
3157 #      /usr/tmp         likewise
3158 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3159   ac_tmpdirs=$TMPDIR
3160 else
3161   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3162 fi
3163 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3164   test -d $ac_dir || continue
3165   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3166   ac_xdir=$ac_dir/cf$$
3167   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3168   ac_tf1=$ac_xdir/conftest9012345
3169   ac_tf2=$ac_xdir/conftest9012346
3170   (echo 1 >$ac_tf1) 2>/dev/null
3171   (echo 2 >$ac_tf2) 2>/dev/null
3172   ac_val=`cat $ac_tf1 2>/dev/null`
3173   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3174     ac_cv_sys_long_file_names=no
3175     rm -rf $ac_xdir 2>/dev/null
3176     break
3177   fi
3178   rm -rf $ac_xdir 2>/dev/null
3179 done
3180 fi
3181 echo "$as_me:3181: result: $ac_cv_sys_long_file_names" >&5
3182 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3183 if test $ac_cv_sys_long_file_names = yes; then
3184
3185 cat >>confdefs.h <<\EOF
3186 #define HAVE_LONG_FILE_NAMES 1
3187 EOF
3188
3189 fi
3190
3191 # if we find pkg-config, check if we should install the ".pc" files.
3192
3193 echo "$as_me:3193: checking if you want to use pkg-config" >&5
3194 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3195
3196 # Check whether --with-pkg-config or --without-pkg-config was given.
3197 if test "${with_pkg_config+set}" = set; then
3198   withval="$with_pkg_config"
3199   cf_pkg_config=$withval
3200 else
3201   cf_pkg_config=yes
3202 fi;
3203 echo "$as_me:3203: result: $cf_pkg_config" >&5
3204 echo "${ECHO_T}$cf_pkg_config" >&6
3205
3206 case $cf_pkg_config in #(vi
3207 no) #(vi
3208         PKG_CONFIG=none
3209         ;;
3210 yes) #(vi
3211
3212 if test -n "$ac_tool_prefix"; then
3213   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3214 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3215 echo "$as_me:3215: checking for $ac_word" >&5
3216 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3217 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3218   echo $ECHO_N "(cached) $ECHO_C" >&6
3219 else
3220   case $PKG_CONFIG in
3221   [\\/]* | ?:[\\/]*)
3222   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3223   ;;
3224   *)
3225   ac_save_IFS=$IFS; IFS=$ac_path_separator
3226 ac_dummy="$PATH"
3227 for ac_dir in $ac_dummy; do
3228   IFS=$ac_save_IFS
3229   test -z "$ac_dir" && ac_dir=.
3230   if $as_executable_p "$ac_dir/$ac_word"; then
3231    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3232    echo "$as_me:3232: found $ac_dir/$ac_word" >&5
3233    break
3234 fi
3235 done
3236
3237   ;;
3238 esac
3239 fi
3240 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3241
3242 if test -n "$PKG_CONFIG"; then
3243   echo "$as_me:3243: result: $PKG_CONFIG" >&5
3244 echo "${ECHO_T}$PKG_CONFIG" >&6
3245 else
3246   echo "$as_me:3246: result: no" >&5
3247 echo "${ECHO_T}no" >&6
3248 fi
3249
3250 fi
3251 if test -z "$ac_cv_path_PKG_CONFIG"; then
3252   ac_pt_PKG_CONFIG=$PKG_CONFIG
3253   # Extract the first word of "pkg-config", so it can be a program name with args.
3254 set dummy pkg-config; ac_word=$2
3255 echo "$as_me:3255: checking for $ac_word" >&5
3256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3257 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3258   echo $ECHO_N "(cached) $ECHO_C" >&6
3259 else
3260   case $ac_pt_PKG_CONFIG in
3261   [\\/]* | ?:[\\/]*)
3262   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3263   ;;
3264   *)
3265   ac_save_IFS=$IFS; IFS=$ac_path_separator
3266 ac_dummy="$PATH"
3267 for ac_dir in $ac_dummy; do
3268   IFS=$ac_save_IFS
3269   test -z "$ac_dir" && ac_dir=.
3270   if $as_executable_p "$ac_dir/$ac_word"; then
3271    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3272    echo "$as_me:3272: found $ac_dir/$ac_word" >&5
3273    break
3274 fi
3275 done
3276
3277   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3278   ;;
3279 esac
3280 fi
3281 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3282
3283 if test -n "$ac_pt_PKG_CONFIG"; then
3284   echo "$as_me:3284: result: $ac_pt_PKG_CONFIG" >&5
3285 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3286 else
3287   echo "$as_me:3287: result: no" >&5
3288 echo "${ECHO_T}no" >&6
3289 fi
3290
3291   PKG_CONFIG=$ac_pt_PKG_CONFIG
3292 else
3293   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3294 fi
3295
3296         ;;
3297 *)
3298         PKG_CONFIG=$withval
3299         ;;
3300 esac
3301
3302 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3303 if test "$PKG_CONFIG" != none ; then
3304
3305 if test "x$prefix" != xNONE; then
3306   cf_path_syntax="$prefix"
3307 else
3308   cf_path_syntax="$ac_default_prefix"
3309 fi
3310
3311 case ".$PKG_CONFIG" in #(vi
3312 .\$\(*\)*|.\'*\'*) #(vi
3313   ;;
3314 ..|./*|.\\*) #(vi
3315   ;;
3316 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3317   ;;
3318 .\${*prefix}*|.\${*dir}*) #(vi
3319   eval PKG_CONFIG="$PKG_CONFIG"
3320   case ".$PKG_CONFIG" in #(vi
3321   .NONE/*)
3322     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3323     ;;
3324   esac
3325   ;; #(vi
3326 .no|.NONE/*)
3327   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3328   ;;
3329 *)
3330   { { echo "$as_me:3330: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3331 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3332    { (exit 1); exit 1; }; }
3333   ;;
3334 esac
3335
3336 fi
3337
3338 if test "$PKG_CONFIG" != none ; then
3339         echo "$as_me:3339: checking for $PKG_CONFIG library directory" >&5
3340 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3341
3342 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3343 if test "${with_pkg_config_libdir+set}" = set; then
3344   withval="$with_pkg_config_libdir"
3345   PKG_CONFIG_LIBDIR=$withval
3346 else
3347   PKG_CONFIG_LIBDIR=yes
3348 fi;
3349
3350         case x$PKG_CONFIG_LIBDIR in #(vi
3351         x/*) #(vi
3352                 ;;
3353         xyes) #(vi
3354                 # look for the library directory using the same prefix as the executable
3355                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3356                 case x`(arch) 2>/dev/null` in #(vi
3357                 *64) #(vi
3358                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3359                         do
3360                                 if test -d $cf_config/pkgconfig
3361                                 then
3362                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3363                                         break
3364                                 fi
3365                         done
3366                         ;;
3367                 *)
3368                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3369                         ;;
3370                 esac
3371                 ;;
3372         *)
3373                 ;;
3374         esac
3375
3376         echo "$as_me:3376: result: $PKG_CONFIG_LIBDIR" >&5
3377 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3378 fi
3379
3380 if test "$PKG_CONFIG" != none ; then
3381         echo "$as_me:3381: checking if we should install .pc files for $PKG_CONFIG" >&5
3382 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3383
3384 # Check whether --enable-pc-files or --disable-pc-files was given.
3385 if test "${enable_pc_files+set}" = set; then
3386   enableval="$enable_pc_files"
3387   enable_pc_files=$enableval
3388 else
3389   enable_pc_files=no
3390 fi;
3391         echo "$as_me:3391: result: $enable_pc_files" >&5
3392 echo "${ECHO_T}$enable_pc_files" >&6
3393         if test "$enable_pc_files" != no
3394         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_LIBDIR" 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_LIBDIR="$PKG_CONFIG_LIBDIR"
3411   case ".$PKG_CONFIG_LIBDIR" in #(vi
3412   .NONE/*)
3413     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3414     ;;
3415   esac
3416   ;; #(vi
3417 .no|.NONE/*)
3418   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3419   ;;
3420 *)
3421   { { echo "$as_me:3421: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3422 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3423    { (exit 1); exit 1; }; }
3424   ;;
3425 esac
3426
3427         fi
3428 else
3429         enable_pc_files=no
3430 fi
3431
3432 echo "$as_me:3432: checking if we should assume mixed-case filenames" >&5
3433 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3434
3435 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3436 if test "${enable_mixed_case+set}" = set; then
3437   enableval="$enable_mixed_case"
3438   enable_mixedcase=$enableval
3439 else
3440   enable_mixedcase=auto
3441 fi;
3442 echo "$as_me:3442: result: $enable_mixedcase" >&5
3443 echo "${ECHO_T}$enable_mixedcase" >&6
3444 if test "$enable_mixedcase" = "auto" ; then
3445
3446 echo "$as_me:3446: checking if filesystem supports mixed-case filenames" >&5
3447 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3448 if test "${cf_cv_mixedcase+set}" = set; then
3449   echo $ECHO_N "(cached) $ECHO_C" >&6
3450 else
3451
3452 if test "$cross_compiling" = yes ; then
3453         case $target_alias in #(vi
3454         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3455                 cf_cv_mixedcase=no
3456                 ;;
3457         *)
3458                 cf_cv_mixedcase=yes
3459                 ;;
3460         esac
3461 else
3462         rm -f conftest CONFTEST
3463         echo test >conftest
3464         if test -f CONFTEST ; then
3465                 cf_cv_mixedcase=no
3466         else
3467                 cf_cv_mixedcase=yes
3468         fi
3469         rm -f conftest CONFTEST
3470 fi
3471
3472 fi
3473 echo "$as_me:3473: result: $cf_cv_mixedcase" >&5
3474 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3475 test "$cf_cv_mixedcase" = yes &&
3476 cat >>confdefs.h <<\EOF
3477 #define MIXEDCASE_FILENAMES 1
3478 EOF
3479
3480 else
3481     cf_cv_mixedcase=$enable_mixedcase
3482     if test "x$enable_mixedcase" = "xyes" ; then
3483
3484 cat >>confdefs.h <<\EOF
3485 #define MIXEDCASE_FILENAMES 1
3486 EOF
3487
3488     fi
3489 fi
3490
3491 # do this after mixed-case option (tags/TAGS is not as important as tic).
3492 echo "$as_me:3492: checking whether ${MAKE-make} sets \${MAKE}" >&5
3493 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3494 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3495 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3496   echo $ECHO_N "(cached) $ECHO_C" >&6
3497 else
3498   cat >conftest.make <<\EOF
3499 all:
3500         @echo 'ac_maketemp="${MAKE}"'
3501 EOF
3502 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3503 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3504 if test -n "$ac_maketemp"; then
3505   eval ac_cv_prog_make_${ac_make}_set=yes
3506 else
3507   eval ac_cv_prog_make_${ac_make}_set=no
3508 fi
3509 rm -f conftest.make
3510 fi
3511 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3512   echo "$as_me:3512: result: yes" >&5
3513 echo "${ECHO_T}yes" >&6
3514   SET_MAKE=
3515 else
3516   echo "$as_me:3516: result: no" >&5
3517 echo "${ECHO_T}no" >&6
3518   SET_MAKE="MAKE=${MAKE-make}"
3519 fi
3520
3521 for ac_prog in exctags ctags
3522 do
3523   # Extract the first word of "$ac_prog", so it can be a program name with args.
3524 set dummy $ac_prog; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_prog_CTAGS+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   if test -n "$CTAGS"; then
3531   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3532 else
3533   ac_save_IFS=$IFS; IFS=$ac_path_separator
3534 ac_dummy="$PATH"
3535 for ac_dir in $ac_dummy; do
3536   IFS=$ac_save_IFS
3537   test -z "$ac_dir" && ac_dir=.
3538   $as_executable_p "$ac_dir/$ac_word" || continue
3539 ac_cv_prog_CTAGS="$ac_prog"
3540 echo "$as_me:3540: found $ac_dir/$ac_word" >&5
3541 break
3542 done
3543
3544 fi
3545 fi
3546 CTAGS=$ac_cv_prog_CTAGS
3547 if test -n "$CTAGS"; then
3548   echo "$as_me:3548: result: $CTAGS" >&5
3549 echo "${ECHO_T}$CTAGS" >&6
3550 else
3551   echo "$as_me:3551: result: no" >&5
3552 echo "${ECHO_T}no" >&6
3553 fi
3554
3555   test -n "$CTAGS" && break
3556 done
3557
3558 for ac_prog in exetags etags
3559 do
3560   # Extract the first word of "$ac_prog", so it can be a program name with args.
3561 set dummy $ac_prog; ac_word=$2
3562 echo "$as_me:3562: checking for $ac_word" >&5
3563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3564 if test "${ac_cv_prog_ETAGS+set}" = set; then
3565   echo $ECHO_N "(cached) $ECHO_C" >&6
3566 else
3567   if test -n "$ETAGS"; then
3568   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3569 else
3570   ac_save_IFS=$IFS; IFS=$ac_path_separator
3571 ac_dummy="$PATH"
3572 for ac_dir in $ac_dummy; do
3573   IFS=$ac_save_IFS
3574   test -z "$ac_dir" && ac_dir=.
3575   $as_executable_p "$ac_dir/$ac_word" || continue
3576 ac_cv_prog_ETAGS="$ac_prog"
3577 echo "$as_me:3577: found $ac_dir/$ac_word" >&5
3578 break
3579 done
3580
3581 fi
3582 fi
3583 ETAGS=$ac_cv_prog_ETAGS
3584 if test -n "$ETAGS"; then
3585   echo "$as_me:3585: result: $ETAGS" >&5
3586 echo "${ECHO_T}$ETAGS" >&6
3587 else
3588   echo "$as_me:3588: result: no" >&5
3589 echo "${ECHO_T}no" >&6
3590 fi
3591
3592   test -n "$ETAGS" && break
3593 done
3594
3595 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3596 set dummy ${CTAGS:-ctags}; ac_word=$2
3597 echo "$as_me:3597: checking for $ac_word" >&5
3598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3599 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3600   echo $ECHO_N "(cached) $ECHO_C" >&6
3601 else
3602   if test -n "$MAKE_LOWER_TAGS"; then
3603   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3604 else
3605   ac_save_IFS=$IFS; IFS=$ac_path_separator
3606 ac_dummy="$PATH"
3607 for ac_dir in $ac_dummy; do
3608   IFS=$ac_save_IFS
3609   test -z "$ac_dir" && ac_dir=.
3610   $as_executable_p "$ac_dir/$ac_word" || continue
3611 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3612 echo "$as_me:3612: found $ac_dir/$ac_word" >&5
3613 break
3614 done
3615
3616   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3617 fi
3618 fi
3619 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3620 if test -n "$MAKE_LOWER_TAGS"; then
3621   echo "$as_me:3621: result: $MAKE_LOWER_TAGS" >&5
3622 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3623 else
3624   echo "$as_me:3624: result: no" >&5
3625 echo "${ECHO_T}no" >&6
3626 fi
3627
3628 if test "$cf_cv_mixedcase" = yes ; then
3629         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3630 set dummy ${ETAGS:-etags}; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   if test -n "$MAKE_UPPER_TAGS"; then
3637   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3638 else
3639   ac_save_IFS=$IFS; IFS=$ac_path_separator
3640 ac_dummy="$PATH"
3641 for ac_dir in $ac_dummy; do
3642   IFS=$ac_save_IFS
3643   test -z "$ac_dir" && ac_dir=.
3644   $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3647 break
3648 done
3649
3650   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3651 fi
3652 fi
3653 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3654 if test -n "$MAKE_UPPER_TAGS"; then
3655   echo "$as_me:3655: result: $MAKE_UPPER_TAGS" >&5
3656 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3657 else
3658   echo "$as_me:3658: result: no" >&5
3659 echo "${ECHO_T}no" >&6
3660 fi
3661
3662 else
3663         MAKE_UPPER_TAGS=no
3664 fi
3665
3666 if test "$MAKE_UPPER_TAGS" = yes ; then
3667         MAKE_UPPER_TAGS=
3668 else
3669         MAKE_UPPER_TAGS="#"
3670 fi
3671
3672 if test "$MAKE_LOWER_TAGS" = yes ; then
3673         MAKE_LOWER_TAGS=
3674 else
3675         MAKE_LOWER_TAGS="#"
3676 fi
3677
3678 echo "$as_me:3678: checking for makeflags variable" >&5
3679 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3680 if test "${cf_cv_makeflags+set}" = set; then
3681   echo $ECHO_N "(cached) $ECHO_C" >&6
3682 else
3683
3684         cf_cv_makeflags=''
3685         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3686         do
3687                 cat >cf_makeflags.tmp <<CF_EOF
3688 SHELL = /bin/sh
3689 all :
3690         @ echo '.$cf_option'
3691 CF_EOF
3692                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3693                 case "$cf_result" in
3694                 .*k)
3695                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3696                         case "$cf_result" in
3697                         .*CC=*) cf_cv_makeflags=
3698                                 ;;
3699                         *)      cf_cv_makeflags=$cf_option
3700                                 ;;
3701                         esac
3702                         break
3703                         ;;
3704                 .-)     ;;
3705                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3706                         ;;
3707                 esac
3708         done
3709         rm -f cf_makeflags.tmp
3710
3711 fi
3712 echo "$as_me:3712: result: $cf_cv_makeflags" >&5
3713 echo "${ECHO_T}$cf_cv_makeflags" >&6
3714
3715 if test -n "$ac_tool_prefix"; then
3716   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3717 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3718 echo "$as_me:3718: checking for $ac_word" >&5
3719 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3720 if test "${ac_cv_prog_RANLIB+set}" = set; then
3721   echo $ECHO_N "(cached) $ECHO_C" >&6
3722 else
3723   if test -n "$RANLIB"; then
3724   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3725 else
3726   ac_save_IFS=$IFS; IFS=$ac_path_separator
3727 ac_dummy="$PATH"
3728 for ac_dir in $ac_dummy; do
3729   IFS=$ac_save_IFS
3730   test -z "$ac_dir" && ac_dir=.
3731   $as_executable_p "$ac_dir/$ac_word" || continue
3732 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3733 echo "$as_me:3733: found $ac_dir/$ac_word" >&5
3734 break
3735 done
3736
3737 fi
3738 fi
3739 RANLIB=$ac_cv_prog_RANLIB
3740 if test -n "$RANLIB"; then
3741   echo "$as_me:3741: result: $RANLIB" >&5
3742 echo "${ECHO_T}$RANLIB" >&6
3743 else
3744   echo "$as_me:3744: result: no" >&5
3745 echo "${ECHO_T}no" >&6
3746 fi
3747
3748 fi
3749 if test -z "$ac_cv_prog_RANLIB"; then
3750   ac_ct_RANLIB=$RANLIB
3751   # Extract the first word of "ranlib", so it can be a program name with args.
3752 set dummy ranlib; ac_word=$2
3753 echo "$as_me:3753: checking for $ac_word" >&5
3754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3755 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3756   echo $ECHO_N "(cached) $ECHO_C" >&6
3757 else
3758   if test -n "$ac_ct_RANLIB"; then
3759   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3760 else
3761   ac_save_IFS=$IFS; IFS=$ac_path_separator
3762 ac_dummy="$PATH"
3763 for ac_dir in $ac_dummy; do
3764   IFS=$ac_save_IFS
3765   test -z "$ac_dir" && ac_dir=.
3766   $as_executable_p "$ac_dir/$ac_word" || continue
3767 ac_cv_prog_ac_ct_RANLIB="ranlib"
3768 echo "$as_me:3768: found $ac_dir/$ac_word" >&5
3769 break
3770 done
3771
3772   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3773 fi
3774 fi
3775 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3776 if test -n "$ac_ct_RANLIB"; then
3777   echo "$as_me:3777: result: $ac_ct_RANLIB" >&5
3778 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3779 else
3780   echo "$as_me:3780: result: no" >&5
3781 echo "${ECHO_T}no" >&6
3782 fi
3783
3784   RANLIB=$ac_ct_RANLIB
3785 else
3786   RANLIB="$ac_cv_prog_RANLIB"
3787 fi
3788
3789 if test -n "$ac_tool_prefix"; then
3790   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3791 set dummy ${ac_tool_prefix}ld; ac_word=$2
3792 echo "$as_me:3792: checking for $ac_word" >&5
3793 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3794 if test "${ac_cv_prog_LD+set}" = set; then
3795   echo $ECHO_N "(cached) $ECHO_C" >&6
3796 else
3797   if test -n "$LD"; then
3798   ac_cv_prog_LD="$LD" # Let the user override the test.
3799 else
3800   ac_save_IFS=$IFS; IFS=$ac_path_separator
3801 ac_dummy="$PATH"
3802 for ac_dir in $ac_dummy; do
3803   IFS=$ac_save_IFS
3804   test -z "$ac_dir" && ac_dir=.
3805   $as_executable_p "$ac_dir/$ac_word" || continue
3806 ac_cv_prog_LD="${ac_tool_prefix}ld"
3807 echo "$as_me:3807: found $ac_dir/$ac_word" >&5
3808 break
3809 done
3810
3811 fi
3812 fi
3813 LD=$ac_cv_prog_LD
3814 if test -n "$LD"; then
3815   echo "$as_me:3815: result: $LD" >&5
3816 echo "${ECHO_T}$LD" >&6
3817 else
3818   echo "$as_me:3818: result: no" >&5
3819 echo "${ECHO_T}no" >&6
3820 fi
3821
3822 fi
3823 if test -z "$ac_cv_prog_LD"; then
3824   ac_ct_LD=$LD
3825   # Extract the first word of "ld", so it can be a program name with args.
3826 set dummy ld; ac_word=$2
3827 echo "$as_me:3827: checking for $ac_word" >&5
3828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3829 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3830   echo $ECHO_N "(cached) $ECHO_C" >&6
3831 else
3832   if test -n "$ac_ct_LD"; then
3833   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3834 else
3835   ac_save_IFS=$IFS; IFS=$ac_path_separator
3836 ac_dummy="$PATH"
3837 for ac_dir in $ac_dummy; do
3838   IFS=$ac_save_IFS
3839   test -z "$ac_dir" && ac_dir=.
3840   $as_executable_p "$ac_dir/$ac_word" || continue
3841 ac_cv_prog_ac_ct_LD="ld"
3842 echo "$as_me:3842: found $ac_dir/$ac_word" >&5
3843 break
3844 done
3845
3846   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3847 fi
3848 fi
3849 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3850 if test -n "$ac_ct_LD"; then
3851   echo "$as_me:3851: result: $ac_ct_LD" >&5
3852 echo "${ECHO_T}$ac_ct_LD" >&6
3853 else
3854   echo "$as_me:3854: result: no" >&5
3855 echo "${ECHO_T}no" >&6
3856 fi
3857
3858   LD=$ac_ct_LD
3859 else
3860   LD="$ac_cv_prog_LD"
3861 fi
3862
3863 if test -n "$ac_tool_prefix"; then
3864   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3865 set dummy ${ac_tool_prefix}ar; ac_word=$2
3866 echo "$as_me:3866: checking for $ac_word" >&5
3867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3868 if test "${ac_cv_prog_AR+set}" = set; then
3869   echo $ECHO_N "(cached) $ECHO_C" >&6
3870 else
3871   if test -n "$AR"; then
3872   ac_cv_prog_AR="$AR" # Let the user override the test.
3873 else
3874   ac_save_IFS=$IFS; IFS=$ac_path_separator
3875 ac_dummy="$PATH"
3876 for ac_dir in $ac_dummy; do
3877   IFS=$ac_save_IFS
3878   test -z "$ac_dir" && ac_dir=.
3879   $as_executable_p "$ac_dir/$ac_word" || continue
3880 ac_cv_prog_AR="${ac_tool_prefix}ar"
3881 echo "$as_me:3881: found $ac_dir/$ac_word" >&5
3882 break
3883 done
3884
3885 fi
3886 fi
3887 AR=$ac_cv_prog_AR
3888 if test -n "$AR"; then
3889   echo "$as_me:3889: result: $AR" >&5
3890 echo "${ECHO_T}$AR" >&6
3891 else
3892   echo "$as_me:3892: result: no" >&5
3893 echo "${ECHO_T}no" >&6
3894 fi
3895
3896 fi
3897 if test -z "$ac_cv_prog_AR"; then
3898   ac_ct_AR=$AR
3899   # Extract the first word of "ar", so it can be a program name with args.
3900 set dummy ar; ac_word=$2
3901 echo "$as_me:3901: checking for $ac_word" >&5
3902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3903 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3904   echo $ECHO_N "(cached) $ECHO_C" >&6
3905 else
3906   if test -n "$ac_ct_AR"; then
3907   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3908 else
3909   ac_save_IFS=$IFS; IFS=$ac_path_separator
3910 ac_dummy="$PATH"
3911 for ac_dir in $ac_dummy; do
3912   IFS=$ac_save_IFS
3913   test -z "$ac_dir" && ac_dir=.
3914   $as_executable_p "$ac_dir/$ac_word" || continue
3915 ac_cv_prog_ac_ct_AR="ar"
3916 echo "$as_me:3916: found $ac_dir/$ac_word" >&5
3917 break
3918 done
3919
3920   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3921 fi
3922 fi
3923 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3924 if test -n "$ac_ct_AR"; then
3925   echo "$as_me:3925: result: $ac_ct_AR" >&5
3926 echo "${ECHO_T}$ac_ct_AR" >&6
3927 else
3928   echo "$as_me:3928: result: no" >&5
3929 echo "${ECHO_T}no" >&6
3930 fi
3931
3932   AR=$ac_ct_AR
3933 else
3934   AR="$ac_cv_prog_AR"
3935 fi
3936
3937 if test -n "$ac_tool_prefix"; then
3938   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3939 set dummy ${ac_tool_prefix}ar; ac_word=$2
3940 echo "$as_me:3940: checking for $ac_word" >&5
3941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942 if test "${ac_cv_prog_AR+set}" = set; then
3943   echo $ECHO_N "(cached) $ECHO_C" >&6
3944 else
3945   if test -n "$AR"; then
3946   ac_cv_prog_AR="$AR" # Let the user override the test.
3947 else
3948   ac_save_IFS=$IFS; IFS=$ac_path_separator
3949 ac_dummy="$PATH"
3950 for ac_dir in $ac_dummy; do
3951   IFS=$ac_save_IFS
3952   test -z "$ac_dir" && ac_dir=.
3953   $as_executable_p "$ac_dir/$ac_word" || continue
3954 ac_cv_prog_AR="${ac_tool_prefix}ar"
3955 echo "$as_me:3955: found $ac_dir/$ac_word" >&5
3956 break
3957 done
3958
3959 fi
3960 fi
3961 AR=$ac_cv_prog_AR
3962 if test -n "$AR"; then
3963   echo "$as_me:3963: result: $AR" >&5
3964 echo "${ECHO_T}$AR" >&6
3965 else
3966   echo "$as_me:3966: result: no" >&5
3967 echo "${ECHO_T}no" >&6
3968 fi
3969
3970 fi
3971 if test -z "$ac_cv_prog_AR"; then
3972   ac_ct_AR=$AR
3973   # Extract the first word of "ar", so it can be a program name with args.
3974 set dummy ar; ac_word=$2
3975 echo "$as_me:3975: checking for $ac_word" >&5
3976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3977 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3978   echo $ECHO_N "(cached) $ECHO_C" >&6
3979 else
3980   if test -n "$ac_ct_AR"; then
3981   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3982 else
3983   ac_save_IFS=$IFS; IFS=$ac_path_separator
3984 ac_dummy="$PATH"
3985 for ac_dir in $ac_dummy; do
3986   IFS=$ac_save_IFS
3987   test -z "$ac_dir" && ac_dir=.
3988   $as_executable_p "$ac_dir/$ac_word" || continue
3989 ac_cv_prog_ac_ct_AR="ar"
3990 echo "$as_me:3990: found $ac_dir/$ac_word" >&5
3991 break
3992 done
3993
3994   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3995 fi
3996 fi
3997 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3998 if test -n "$ac_ct_AR"; then
3999   echo "$as_me:3999: result: $ac_ct_AR" >&5
4000 echo "${ECHO_T}$ac_ct_AR" >&6
4001 else
4002   echo "$as_me:4002: result: no" >&5
4003 echo "${ECHO_T}no" >&6
4004 fi
4005
4006   AR=$ac_ct_AR
4007 else
4008   AR="$ac_cv_prog_AR"
4009 fi
4010
4011 echo "$as_me:4011: checking for options to update archives" >&5
4012 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4013 if test "${cf_cv_ar_flags+set}" = set; then
4014   echo $ECHO_N "(cached) $ECHO_C" >&6
4015 else
4016
4017         cf_cv_ar_flags=unknown
4018         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4019         do
4020
4021                 # check if $ARFLAGS already contains this choice
4022                 if test "x$ARFLAGS" != "x" ; then
4023                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4024                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4025                                 cf_cv_ar_flags=
4026                                 break
4027                         fi
4028                 fi
4029
4030                 rm -f conftest.$ac_cv_objext
4031                 rm -f conftest.a
4032
4033                 cat >conftest.$ac_ext <<EOF
4034 #line 4034 "configure"
4035 int     testdata[3] = { 123, 456, 789 };
4036 EOF
4037                 if { (eval echo "$as_me:4037: \"$ac_compile\"") >&5
4038   (eval $ac_compile) 2>&5
4039   ac_status=$?
4040   echo "$as_me:4040: \$? = $ac_status" >&5
4041   (exit $ac_status); } ; then
4042                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4043                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4044                         if test -f conftest.a ; then
4045                                 cf_cv_ar_flags=$cf_ar_flags
4046                                 break
4047                         fi
4048                 else
4049                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4050
4051 echo "${as_me:-configure}:4051: testing cannot compile test-program ..." 1>&5
4052
4053                         break
4054                 fi
4055         done
4056         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4057
4058 fi
4059 echo "$as_me:4059: result: $cf_cv_ar_flags" >&5
4060 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4061
4062 if test -n "$ARFLAGS" ; then
4063         if test -n "$cf_cv_ar_flags" ; then
4064                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4065         fi
4066 else
4067         ARFLAGS=$cf_cv_ar_flags
4068 fi
4069
4070 echo "$as_me:4070: checking if you have specified an install-prefix" >&5
4071 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4072
4073 # Check whether --with-install-prefix or --without-install-prefix was given.
4074 if test "${with_install_prefix+set}" = set; then
4075   withval="$with_install_prefix"
4076   case "x$withval" in #(vi
4077         xyes|xno) #(vi
4078                 ;;
4079         *)      DESTDIR="$withval"
4080                 ;;
4081         esac
4082 fi;
4083 echo "$as_me:4083: result: $DESTDIR" >&5
4084 echo "${ECHO_T}$DESTDIR" >&6
4085
4086 ###############################################################################
4087
4088 # If we're cross-compiling, allow the user to override the tools and their
4089 # options.  The configure script is oriented toward identifying the host
4090 # compiler, etc., but we need a build compiler to generate parts of the source.
4091
4092 if test "$cross_compiling" = yes ; then
4093
4094         # defaults that we might want to override
4095         : ${BUILD_CFLAGS:=''}
4096         : ${BUILD_CPPFLAGS:=''}
4097         : ${BUILD_LDFLAGS:=''}
4098         : ${BUILD_LIBS:=''}
4099         : ${BUILD_EXEEXT:='$x'}
4100         : ${BUILD_OBJEXT:='o'}
4101
4102 # Check whether --with-build-cc or --without-build-cc was given.
4103 if test "${with_build_cc+set}" = set; then
4104   withval="$with_build_cc"
4105   BUILD_CC="$withval"
4106 else
4107   for ac_prog in gcc cc cl
4108 do
4109   # Extract the first word of "$ac_prog", so it can be a program name with args.
4110 set dummy $ac_prog; ac_word=$2
4111 echo "$as_me:4111: checking for $ac_word" >&5
4112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4113 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4114   echo $ECHO_N "(cached) $ECHO_C" >&6
4115 else
4116   if test -n "$BUILD_CC"; then
4117   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4118 else
4119   ac_save_IFS=$IFS; IFS=$ac_path_separator
4120 ac_dummy="$PATH"
4121 for ac_dir in $ac_dummy; do
4122   IFS=$ac_save_IFS
4123   test -z "$ac_dir" && ac_dir=.
4124   $as_executable_p "$ac_dir/$ac_word" || continue
4125 ac_cv_prog_BUILD_CC="$ac_prog"
4126 echo "$as_me:4126: found $ac_dir/$ac_word" >&5
4127 break
4128 done
4129
4130 fi
4131 fi
4132 BUILD_CC=$ac_cv_prog_BUILD_CC
4133 if test -n "$BUILD_CC"; then
4134   echo "$as_me:4134: result: $BUILD_CC" >&5
4135 echo "${ECHO_T}$BUILD_CC" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141   test -n "$BUILD_CC" && break
4142 done
4143
4144 fi;
4145         echo "$as_me:4145: checking for native build C compiler" >&5
4146 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4147         echo "$as_me:4147: result: $BUILD_CC" >&5
4148 echo "${ECHO_T}$BUILD_CC" >&6
4149
4150         echo "$as_me:4150: checking for native build C preprocessor" >&5
4151 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4152
4153 # Check whether --with-build-cpp or --without-build-cpp was given.
4154 if test "${with_build_cpp+set}" = set; then
4155   withval="$with_build_cpp"
4156   BUILD_CPP="$withval"
4157 else
4158   BUILD_CPP='${BUILD_CC} -E'
4159 fi;
4160         echo "$as_me:4160: result: $BUILD_CPP" >&5
4161 echo "${ECHO_T}$BUILD_CPP" >&6
4162
4163         echo "$as_me:4163: checking for native build C flags" >&5
4164 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4165
4166 # Check whether --with-build-cflags or --without-build-cflags was given.
4167 if test "${with_build_cflags+set}" = set; then
4168   withval="$with_build_cflags"
4169   BUILD_CFLAGS="$withval"
4170 fi;
4171         echo "$as_me:4171: result: $BUILD_CFLAGS" >&5
4172 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4173
4174         echo "$as_me:4174: checking for native build C preprocessor-flags" >&5
4175 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4176
4177 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4178 if test "${with_build_cppflags+set}" = set; then
4179   withval="$with_build_cppflags"
4180   BUILD_CPPFLAGS="$withval"
4181 fi;
4182         echo "$as_me:4182: result: $BUILD_CPPFLAGS" >&5
4183 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4184
4185         echo "$as_me:4185: checking for native build linker-flags" >&5
4186 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4187
4188 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4189 if test "${with_build_ldflags+set}" = set; then
4190   withval="$with_build_ldflags"
4191   BUILD_LDFLAGS="$withval"
4192 fi;
4193         echo "$as_me:4193: result: $BUILD_LDFLAGS" >&5
4194 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4195
4196         echo "$as_me:4196: checking for native build linker-libraries" >&5
4197 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4198
4199 # Check whether --with-build-libs or --without-build-libs was given.
4200 if test "${with_build_libs+set}" = set; then
4201   withval="$with_build_libs"
4202   BUILD_LIBS="$withval"
4203 fi;
4204         echo "$as_me:4204: result: $BUILD_LIBS" >&5
4205 echo "${ECHO_T}$BUILD_LIBS" >&6
4206
4207         # this assumes we're on Unix.
4208         BUILD_EXEEXT=
4209         BUILD_OBJEXT=o
4210
4211         : ${BUILD_CC:='${CC}'}
4212
4213         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4214                 { { echo "$as_me:4214: error: Cross-build requires two compilers.
4215 Use --with-build-cc to specify the native compiler." >&5
4216 echo "$as_me: error: Cross-build requires two compilers.
4217 Use --with-build-cc to specify the native compiler." >&2;}
4218    { (exit 1); exit 1; }; }
4219         fi
4220
4221 else
4222         : ${BUILD_CC:='${CC}'}
4223         : ${BUILD_CPP:='${CPP}'}
4224         : ${BUILD_CFLAGS:='${CFLAGS}'}
4225         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4226         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4227         : ${BUILD_LIBS:='${LIBS}'}
4228         : ${BUILD_EXEEXT:='$x'}
4229         : ${BUILD_OBJEXT:='o'}
4230 fi
4231
4232 ###############################################################################
4233
4234 ### Options to allow the user to specify the set of libraries which are used.
4235 ### Use "--without-normal --with-shared" to allow the default model to be
4236 ### shared, for example.
4237 cf_list_models=""
4238
4239 echo "$as_me:4239: checking if libtool -version-number should be used" >&5
4240 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4241
4242 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4243 if test "${enable_libtool_version+set}" = set; then
4244   enableval="$enable_libtool_version"
4245   test "$enableval" != no && enableval=yes
4246   if test "$enableval" != "yes" ; then
4247     cf_libtool_version=no
4248   else
4249     cf_libtool_version=yes
4250   fi
4251 else
4252   enableval=yes
4253   cf_libtool_version=yes
4254
4255 fi;
4256 echo "$as_me:4256: result: $cf_libtool_version" >&5
4257 echo "${ECHO_T}$cf_libtool_version" >&6
4258
4259 if test "$cf_libtool_version" = yes ; then
4260         LIBTOOL_VERSION="-version-number"
4261 else
4262         LIBTOOL_VERSION="-version-info"
4263 fi
4264
4265 LIBTOOL=
4266
4267 # common library maintenance symbols that are convenient for libtool scripts:
4268 LIB_CREATE='${AR} -cr'
4269 LIB_OBJECT='${OBJECTS}'
4270 LIB_SUFFIX=.a
4271 LIB_PREP="$RANLIB"
4272
4273 # symbols used to prop libtool up to enable it to determine what it should be
4274 # doing:
4275 LIB_CLEAN=
4276 LIB_COMPILE=
4277 LIB_LINK='${CC}'
4278 LIB_INSTALL=
4279 LIB_UNINSTALL=
4280
4281 echo "$as_me:4281: checking if you want to build libraries with libtool" >&5
4282 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4283
4284 # Check whether --with-libtool or --without-libtool was given.
4285 if test "${with_libtool+set}" = set; then
4286   withval="$with_libtool"
4287   with_libtool=$withval
4288 else
4289   with_libtool=no
4290 fi;
4291 echo "$as_me:4291: result: $with_libtool" >&5
4292 echo "${ECHO_T}$with_libtool" >&6
4293 if test "$with_libtool" != "no"; then
4294
4295         if test "$with_libtool" != "yes" ; then
4296
4297 if test "x$prefix" != xNONE; then
4298   cf_path_syntax="$prefix"
4299 else
4300   cf_path_syntax="$ac_default_prefix"
4301 fi
4302
4303 case ".$with_libtool" in #(vi
4304 .\$\(*\)*|.\'*\'*) #(vi
4305   ;;
4306 ..|./*|.\\*) #(vi
4307   ;;
4308 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4309   ;;
4310 .\${*prefix}*|.\${*dir}*) #(vi
4311   eval with_libtool="$with_libtool"
4312   case ".$with_libtool" in #(vi
4313   .NONE/*)
4314     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4315     ;;
4316   esac
4317   ;; #(vi
4318 .no|.NONE/*)
4319   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4320   ;;
4321 *)
4322   { { echo "$as_me:4322: error: expected a pathname, not \"$with_libtool\"" >&5
4323 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4324    { (exit 1); exit 1; }; }
4325   ;;
4326 esac
4327
4328                 LIBTOOL=$with_libtool
4329         else
4330                 # Extract the first word of "libtool", so it can be a program name with args.
4331 set dummy libtool; ac_word=$2
4332 echo "$as_me:4332: checking for $ac_word" >&5
4333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4334 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4335   echo $ECHO_N "(cached) $ECHO_C" >&6
4336 else
4337   case $LIBTOOL in
4338   [\\/]* | ?:[\\/]*)
4339   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4340   ;;
4341   *)
4342   ac_save_IFS=$IFS; IFS=$ac_path_separator
4343 ac_dummy="$PATH"
4344 for ac_dir in $ac_dummy; do
4345   IFS=$ac_save_IFS
4346   test -z "$ac_dir" && ac_dir=.
4347   if $as_executable_p "$ac_dir/$ac_word"; then
4348    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4349    echo "$as_me:4349: found $ac_dir/$ac_word" >&5
4350    break
4351 fi
4352 done
4353
4354   ;;
4355 esac
4356 fi
4357 LIBTOOL=$ac_cv_path_LIBTOOL
4358
4359 if test -n "$LIBTOOL"; then
4360   echo "$as_me:4360: result: $LIBTOOL" >&5
4361 echo "${ECHO_T}$LIBTOOL" >&6
4362 else
4363   echo "$as_me:4363: result: no" >&5
4364 echo "${ECHO_T}no" >&6
4365 fi
4366
4367         fi
4368         if test -z "$LIBTOOL" ; then
4369                 { { echo "$as_me:4369: error: Cannot find libtool" >&5
4370 echo "$as_me: error: Cannot find libtool" >&2;}
4371    { (exit 1); exit 1; }; }
4372         fi
4373         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4374         LIB_OBJECT='${OBJECTS:.o=.lo}'
4375         LIB_SUFFIX=.la
4376         LIB_CLEAN='${LIBTOOL} --mode=clean'
4377         LIB_COMPILE='${LIBTOOL} --mode=compile'
4378         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4379         LIB_INSTALL='${LIBTOOL} --mode=install'
4380         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4381         LIB_PREP=:
4382
4383         # Show the version of libtool
4384         echo "$as_me:4384: checking version of libtool" >&5
4385 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4386
4387         # Save the version in a cache variable - this is not entirely a good
4388         # thing, but the version string from libtool is very ugly, and for
4389         # bug reports it might be useful to have the original string. "("
4390         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.].*//'`
4391         echo "$as_me:4391: result: $cf_cv_libtool_version" >&5
4392 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4393         if test -z "$cf_cv_libtool_version" ; then
4394                 { { echo "$as_me:4394: error: This is not GNU libtool" >&5
4395 echo "$as_me: error: This is not GNU libtool" >&2;}
4396    { (exit 1); exit 1; }; }
4397         fi
4398
4399         # special hack to add -no-undefined (which libtool should do for itself)
4400         LT_UNDEF=
4401         case "$cf_cv_system_name" in #(vi
4402         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4403                 LT_UNDEF=-no-undefined
4404                 ;;
4405         esac
4406
4407         # special hack to add --tag option for C++ compiler
4408         case $cf_cv_libtool_version in #(vi
4409         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4410                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4411                 LIBTOOL="$LIBTOOL --tag=CC"
4412                 ;;
4413         *)
4414                 LIBTOOL_CXX="$LIBTOOL"
4415                 ;;
4416         esac
4417 else
4418         LIBTOOL=""
4419         LIBTOOL_CXX=""
4420 fi
4421
4422 test -z "$LIBTOOL" && ECHO_LT=
4423
4424 if test "$with_libtool" != "no" ; then
4425
4426 cf_list_models="$cf_list_models libtool"
4427
4428 else
4429
4430 echo "$as_me:4430: checking if you want to build shared libraries" >&5
4431 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4432
4433 # Check whether --with-shared or --without-shared was given.
4434 if test "${with_shared+set}" = set; then
4435   withval="$with_shared"
4436   with_shared=$withval
4437 else
4438   with_shared=no
4439 fi;
4440 echo "$as_me:4440: result: $with_shared" >&5
4441 echo "${ECHO_T}$with_shared" >&6
4442 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4443
4444 echo "$as_me:4444: checking if you want to build static libraries" >&5
4445 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4446
4447 # Check whether --with-normal or --without-normal was given.
4448 if test "${with_normal+set}" = set; then
4449   withval="$with_normal"
4450   with_normal=$withval
4451 else
4452   with_normal=yes
4453 fi;
4454 echo "$as_me:4454: result: $with_normal" >&5
4455 echo "${ECHO_T}$with_normal" >&6
4456 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4457
4458 echo "$as_me:4458: checking if you want to build debug libraries" >&5
4459 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4460
4461 # Check whether --with-debug or --without-debug was given.
4462 if test "${with_debug+set}" = set; then
4463   withval="$with_debug"
4464   with_debug=$withval
4465 else
4466   with_debug=yes
4467 fi;
4468 echo "$as_me:4468: result: $with_debug" >&5
4469 echo "${ECHO_T}$with_debug" >&6
4470 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4471
4472 echo "$as_me:4472: checking if you want to build profiling libraries" >&5
4473 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4474
4475 # Check whether --with-profile or --without-profile was given.
4476 if test "${with_profile+set}" = set; then
4477   withval="$with_profile"
4478   with_profile=$withval
4479 else
4480   with_profile=no
4481 fi;
4482 echo "$as_me:4482: result: $with_profile" >&5
4483 echo "${ECHO_T}$with_profile" >&6
4484 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4485
4486 fi
4487
4488 ###############################################################################
4489
4490 echo "$as_me:4490: checking for specified models" >&5
4491 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4492 test -z "$cf_list_models" && cf_list_models=normal
4493 test "$with_libtool" != "no" && cf_list_models=libtool
4494 echo "$as_me:4494: result: $cf_list_models" >&5
4495 echo "${ECHO_T}$cf_list_models" >&6
4496
4497 ### Use the first model as the default, and save its suffix for use in building
4498 ### up test-applications.
4499 echo "$as_me:4499: checking for default model" >&5
4500 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4501 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4502 echo "$as_me:4502: result: $DFT_LWR_MODEL" >&5
4503 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4504
4505 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4506
4507 TICS_NAME=tic
4508
4509 TINFO_NAME=tinfo
4510
4511 LIB_NAME=ncurses
4512
4513 LIB_DIR=../lib
4514 LIB_2ND=../../lib
4515
4516 echo "$as_me:4516: checking if you want to have a library-prefix" >&5
4517 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4518
4519 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4520 if test "${with_lib_prefix+set}" = set; then
4521   withval="$with_lib_prefix"
4522   with_lib_prefix=$withval
4523 else
4524   with_lib_prefix=auto
4525 fi;
4526 echo "$as_me:4526: result: $with_lib_prefix" >&5
4527 echo "${ECHO_T}$with_lib_prefix" >&6
4528
4529 if test $with_lib_prefix = auto
4530 then
4531
4532         case $cf_cv_system_name in #(vi
4533         OS/2*|os2*) #(vi
4534         LIB_PREFIX=''
4535         ;;
4536         *)      LIB_PREFIX='lib'
4537         ;;
4538         esac
4539 cf_prefix=$LIB_PREFIX
4540
4541 elif test $with_lib_prefix = no
4542 then
4543         LIB_PREFIX=
4544 else
4545         LIB_PREFIX=$with_lib_prefix
4546 fi
4547
4548 LIB_SUFFIX=
4549
4550         echo "$as_me:4550: checking for PATH separator" >&5
4551 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4552         case $cf_cv_system_name in
4553         os2*)   PATH_SEPARATOR=';'  ;;
4554         *)      ${PATH_SEPARATOR:=':'}  ;;
4555         esac
4556
4557         echo "$as_me:4557: result: $PATH_SEPARATOR" >&5
4558 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4559
4560 ###############################################################################
4561
4562 echo "$as_me:4562: checking if you want to build a separate terminfo library" >&5
4563 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4564
4565 # Check whether --with-termlib or --without-termlib was given.
4566 if test "${with_termlib+set}" = set; then
4567   withval="$with_termlib"
4568   with_termlib=$withval
4569 else
4570   with_termlib=no
4571 fi;
4572 echo "$as_me:4572: result: $with_termlib" >&5
4573 echo "${ECHO_T}$with_termlib" >&6
4574
4575 echo "$as_me:4575: checking if you want to build a separate tic library" >&5
4576 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4577
4578 # Check whether --with-ticlib or --without-ticlib was given.
4579 if test "${with_ticlib+set}" = set; then
4580   withval="$with_ticlib"
4581   with_ticlib=$withval
4582 else
4583   with_ticlib=no
4584 fi;
4585 echo "$as_me:4585: result: $with_ticlib" >&5
4586 echo "${ECHO_T}$with_ticlib" >&6
4587
4588 ### Checks for special libraries, must be done up-front.
4589 SHLIB_LIST=""
4590
4591 echo "$as_me:4591: checking if you want to link with the GPM mouse library" >&5
4592 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4593
4594 # Check whether --with-gpm or --without-gpm was given.
4595 if test "${with_gpm+set}" = set; then
4596   withval="$with_gpm"
4597   with_gpm=$withval
4598 else
4599   with_gpm=maybe
4600 fi;
4601 echo "$as_me:4601: result: $with_gpm" >&5
4602 echo "${ECHO_T}$with_gpm" >&6
4603
4604 if test "$with_gpm" != no ; then
4605         echo "$as_me:4605: checking for gpm.h" >&5
4606 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4607 if test "${ac_cv_header_gpm_h+set}" = set; then
4608   echo $ECHO_N "(cached) $ECHO_C" >&6
4609 else
4610   cat >conftest.$ac_ext <<_ACEOF
4611 #line 4611 "configure"
4612 #include "confdefs.h"
4613 #include <gpm.h>
4614 _ACEOF
4615 if { (eval echo "$as_me:4615: \"$ac_cpp conftest.$ac_ext\"") >&5
4616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4617   ac_status=$?
4618   egrep -v '^ *\+' conftest.er1 >conftest.err
4619   rm -f conftest.er1
4620   cat conftest.err >&5
4621   echo "$as_me:4621: \$? = $ac_status" >&5
4622   (exit $ac_status); } >/dev/null; then
4623   if test -s conftest.err; then
4624     ac_cpp_err=$ac_c_preproc_warn_flag
4625   else
4626     ac_cpp_err=
4627   fi
4628 else
4629   ac_cpp_err=yes
4630 fi
4631 if test -z "$ac_cpp_err"; then
4632   ac_cv_header_gpm_h=yes
4633 else
4634   echo "$as_me: failed program was:" >&5
4635   cat conftest.$ac_ext >&5
4636   ac_cv_header_gpm_h=no
4637 fi
4638 rm -f conftest.err conftest.$ac_ext
4639 fi
4640 echo "$as_me:4640: result: $ac_cv_header_gpm_h" >&5
4641 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4642 if test $ac_cv_header_gpm_h = yes; then
4643
4644 cat >>confdefs.h <<\EOF
4645 #define HAVE_GPM_H 1
4646 EOF
4647
4648                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4649                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4650
4651 echo "${as_me:-configure}:4651: testing assuming we really have GPM library ..." 1>&5
4652
4653 cat >>confdefs.h <<\EOF
4654 #define HAVE_LIBGPM 1
4655 EOF
4656
4657                 else
4658                         echo "$as_me:4658: checking for Gpm_Open in -lgpm" >&5
4659 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4660 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   ac_check_lib_save_LIBS=$LIBS
4664 LIBS="-lgpm  $LIBS"
4665 cat >conftest.$ac_ext <<_ACEOF
4666 #line 4666 "configure"
4667 #include "confdefs.h"
4668
4669 /* Override any gcc2 internal prototype to avoid an error.  */
4670 #ifdef __cplusplus
4671 extern "C"
4672 #endif
4673 /* We use char because int might match the return type of a gcc2
4674    builtin and then its argument prototype would still apply.  */
4675 char Gpm_Open ();
4676 int
4677 main ()
4678 {
4679 Gpm_Open ();
4680   ;
4681   return 0;
4682 }
4683 _ACEOF
4684 rm -f conftest.$ac_objext conftest$ac_exeext
4685 if { (eval echo "$as_me:4685: \"$ac_link\"") >&5
4686   (eval $ac_link) 2>&5
4687   ac_status=$?
4688   echo "$as_me:4688: \$? = $ac_status" >&5
4689   (exit $ac_status); } &&
4690          { ac_try='test -s conftest$ac_exeext'
4691   { (eval echo "$as_me:4691: \"$ac_try\"") >&5
4692   (eval $ac_try) 2>&5
4693   ac_status=$?
4694   echo "$as_me:4694: \$? = $ac_status" >&5
4695   (exit $ac_status); }; }; then
4696   ac_cv_lib_gpm_Gpm_Open=yes
4697 else
4698   echo "$as_me: failed program was:" >&5
4699 cat conftest.$ac_ext >&5
4700 ac_cv_lib_gpm_Gpm_Open=no
4701 fi
4702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4703 LIBS=$ac_check_lib_save_LIBS
4704 fi
4705 echo "$as_me:4705: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4706 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4707 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4708   :
4709 else
4710
4711                                 { { echo "$as_me:4711: error: Cannot link with GPM library" >&5
4712 echo "$as_me: error: Cannot link with GPM library" >&2;}
4713    { (exit 1); exit 1; }; }
4714                 fi
4715                 with_gpm=yes
4716
4717 fi
4718
4719 else
4720
4721                 test "$with_gpm" != maybe && { echo "$as_me:4721: WARNING: Cannot find GPM header" >&5
4722 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4723                 with_gpm=no
4724
4725 fi
4726
4727 fi
4728
4729 if test "$with_gpm" != no ; then
4730         echo "$as_me:4730: checking if you want to load GPM dynamically" >&5
4731 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4732
4733 # Check whether --with-dlsym or --without-dlsym was given.
4734 if test "${with_dlsym+set}" = set; then
4735   withval="$with_dlsym"
4736   with_dlsym=$withval
4737 else
4738   with_dlsym=yes
4739 fi;
4740         echo "$as_me:4740: result: $with_dlsym" >&5
4741 echo "${ECHO_T}$with_dlsym" >&6
4742         if test "x$with_dlsym" = xyes ; then
4743
4744 cf_have_dlsym=no
4745 echo "$as_me:4745: checking for dlsym" >&5
4746 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4747 if test "${ac_cv_func_dlsym+set}" = set; then
4748   echo $ECHO_N "(cached) $ECHO_C" >&6
4749 else
4750   cat >conftest.$ac_ext <<_ACEOF
4751 #line 4751 "configure"
4752 #include "confdefs.h"
4753 /* System header to define __stub macros and hopefully few prototypes,
4754     which can conflict with char dlsym (); below.  */
4755 #include <assert.h>
4756 /* Override any gcc2 internal prototype to avoid an error.  */
4757 #ifdef __cplusplus
4758 extern "C"
4759 #endif
4760 /* We use char because int might match the return type of a gcc2
4761    builtin and then its argument prototype would still apply.  */
4762 char dlsym ();
4763 char (*f) ();
4764
4765 int
4766 main ()
4767 {
4768 /* The GNU C library defines this for functions which it implements
4769     to always fail with ENOSYS.  Some functions are actually named
4770     something starting with __ and the normal name is an alias.  */
4771 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4772 choke me
4773 #else
4774 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4775 #endif
4776
4777   ;
4778   return 0;
4779 }
4780 _ACEOF
4781 rm -f conftest.$ac_objext conftest$ac_exeext
4782 if { (eval echo "$as_me:4782: \"$ac_link\"") >&5
4783   (eval $ac_link) 2>&5
4784   ac_status=$?
4785   echo "$as_me:4785: \$? = $ac_status" >&5
4786   (exit $ac_status); } &&
4787          { ac_try='test -s conftest$ac_exeext'
4788   { (eval echo "$as_me:4788: \"$ac_try\"") >&5
4789   (eval $ac_try) 2>&5
4790   ac_status=$?
4791   echo "$as_me:4791: \$? = $ac_status" >&5
4792   (exit $ac_status); }; }; then
4793   ac_cv_func_dlsym=yes
4794 else
4795   echo "$as_me: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
4797 ac_cv_func_dlsym=no
4798 fi
4799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4800 fi
4801 echo "$as_me:4801: result: $ac_cv_func_dlsym" >&5
4802 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4803 if test $ac_cv_func_dlsym = yes; then
4804   cf_have_dlsym=yes
4805 else
4806
4807 cf_have_libdl=no
4808 echo "$as_me:4808: checking for dlsym in -ldl" >&5
4809 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4810 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4811   echo $ECHO_N "(cached) $ECHO_C" >&6
4812 else
4813   ac_check_lib_save_LIBS=$LIBS
4814 LIBS="-ldl  $LIBS"
4815 cat >conftest.$ac_ext <<_ACEOF
4816 #line 4816 "configure"
4817 #include "confdefs.h"
4818
4819 /* Override any gcc2 internal prototype to avoid an error.  */
4820 #ifdef __cplusplus
4821 extern "C"
4822 #endif
4823 /* We use char because int might match the return type of a gcc2
4824    builtin and then its argument prototype would still apply.  */
4825 char dlsym ();
4826 int
4827 main ()
4828 {
4829 dlsym ();
4830   ;
4831   return 0;
4832 }
4833 _ACEOF
4834 rm -f conftest.$ac_objext conftest$ac_exeext
4835 if { (eval echo "$as_me:4835: \"$ac_link\"") >&5
4836   (eval $ac_link) 2>&5
4837   ac_status=$?
4838   echo "$as_me:4838: \$? = $ac_status" >&5
4839   (exit $ac_status); } &&
4840          { ac_try='test -s conftest$ac_exeext'
4841   { (eval echo "$as_me:4841: \"$ac_try\"") >&5
4842   (eval $ac_try) 2>&5
4843   ac_status=$?
4844   echo "$as_me:4844: \$? = $ac_status" >&5
4845   (exit $ac_status); }; }; then
4846   ac_cv_lib_dl_dlsym=yes
4847 else
4848   echo "$as_me: failed program was:" >&5
4849 cat conftest.$ac_ext >&5
4850 ac_cv_lib_dl_dlsym=no
4851 fi
4852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4853 LIBS=$ac_check_lib_save_LIBS
4854 fi
4855 echo "$as_me:4855: result: $ac_cv_lib_dl_dlsym" >&5
4856 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4857 if test $ac_cv_lib_dl_dlsym = yes; then
4858
4859         cf_have_dlsym=yes
4860         cf_have_libdl=yes
4861 fi
4862
4863 fi
4864
4865 if test "$cf_have_dlsym" = yes ; then
4866         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4867
4868         echo "$as_me:4868: checking whether able to link to dl*() functions" >&5
4869 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4870         cat >conftest.$ac_ext <<_ACEOF
4871 #line 4871 "configure"
4872 #include "confdefs.h"
4873 #include <dlfcn.h>
4874 int
4875 main ()
4876 {
4877
4878                 void *obj;
4879                 if ((obj = dlopen("filename", 0)) != 0) {
4880                         if (dlsym(obj, "symbolname") == 0) {
4881                         dlclose(obj);
4882                         }
4883                 }
4884   ;
4885   return 0;
4886 }
4887 _ACEOF
4888 rm -f conftest.$ac_objext conftest$ac_exeext
4889 if { (eval echo "$as_me:4889: \"$ac_link\"") >&5
4890   (eval $ac_link) 2>&5
4891   ac_status=$?
4892   echo "$as_me:4892: \$? = $ac_status" >&5
4893   (exit $ac_status); } &&
4894          { ac_try='test -s conftest$ac_exeext'
4895   { (eval echo "$as_me:4895: \"$ac_try\"") >&5
4896   (eval $ac_try) 2>&5
4897   ac_status=$?
4898   echo "$as_me:4898: \$? = $ac_status" >&5
4899   (exit $ac_status); }; }; then
4900
4901 cat >>confdefs.h <<\EOF
4902 #define HAVE_LIBDL 1
4903 EOF
4904
4905 else
4906   echo "$as_me: failed program was:" >&5
4907 cat conftest.$ac_ext >&5
4908
4909                 { { echo "$as_me:4909: error: Cannot link test program for libdl" >&5
4910 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4911    { (exit 1); exit 1; }; }
4912 fi
4913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4914         echo "$as_me:4914: result: ok" >&5
4915 echo "${ECHO_T}ok" >&6
4916 else
4917         { { echo "$as_me:4917: error: Cannot find dlsym function" >&5
4918 echo "$as_me: error: Cannot find dlsym function" >&2;}
4919    { (exit 1); exit 1; }; }
4920 fi
4921
4922                 if test "x$with_gpm" != xyes ; then
4923                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4924
4925 echo "${as_me:-configure}:4925: testing assuming soname for gpm is $with_gpm ..." 1>&5
4926
4927                         cf_cv_gpm_soname="$with_gpm"
4928                 else
4929
4930 echo "$as_me:4930: checking for soname of gpm library" >&5
4931 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4932 if test "${cf_cv_gpm_soname+set}" = set; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935
4936 cf_cv_gpm_soname=unknown
4937 if test "$cross_compiling" != yes ; then
4938 cat >conftest.$ac_ext <<CF_EOF
4939 #include <gpm.h>
4940 int main()
4941 {
4942 if (Gpm_Open(0,0)) Gpm_Close();
4943         ${cf_cv_main_return:-return}(0);
4944 }
4945 CF_EOF
4946 cf_save_LIBS="$LIBS"
4947         LIBS="-lgpm $LIBS"
4948         if { (eval echo "$as_me:4948: \"$ac_compile\"") >&5
4949   (eval $ac_compile) 2>&5
4950   ac_status=$?
4951   echo "$as_me:4951: \$? = $ac_status" >&5
4952   (exit $ac_status); } ; then
4953                 if { (eval echo "$as_me:4953: \"$ac_link\"") >&5
4954   (eval $ac_link) 2>&5
4955   ac_status=$?
4956   echo "$as_me:4956: \$? = $ac_status" >&5
4957   (exit $ac_status); } ; then
4958                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4959                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4960                 fi
4961         fi
4962 rm -rf conftest*
4963 LIBS="$cf_save_LIBS"
4964 fi
4965
4966 fi
4967 echo "$as_me:4967: result: $cf_cv_gpm_soname" >&5
4968 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4969
4970                 fi
4971                 test "$cf_cv_gpm_soname" != "unknown" &&
4972 cat >>confdefs.h <<EOF
4973 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4974 EOF
4975
4976                 SHLIB_LIST="-ldl $SHLIB_LIST"
4977         else
4978                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4979                 TEST_LIBS="-lgpm $TEST_LIBS"
4980         fi
4981
4982 cat >>confdefs.h <<\EOF
4983 #define HAVE_LIBGPM 1
4984 EOF
4985
4986 echo "$as_me:4986: checking for Gpm_Wgetch in -lgpm" >&5
4987 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4988 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4989   echo $ECHO_N "(cached) $ECHO_C" >&6
4990 else
4991   ac_check_lib_save_LIBS=$LIBS
4992 LIBS="-lgpm  $LIBS"
4993 cat >conftest.$ac_ext <<_ACEOF
4994 #line 4994 "configure"
4995 #include "confdefs.h"
4996
4997 /* Override any gcc2 internal prototype to avoid an error.  */
4998 #ifdef __cplusplus
4999 extern "C"
5000 #endif
5001 /* We use char because int might match the return type of a gcc2
5002    builtin and then its argument prototype would still apply.  */
5003 char Gpm_Wgetch ();
5004 int
5005 main ()
5006 {
5007 Gpm_Wgetch ();
5008   ;
5009   return 0;
5010 }
5011 _ACEOF
5012 rm -f conftest.$ac_objext conftest$ac_exeext
5013 if { (eval echo "$as_me:5013: \"$ac_link\"") >&5
5014   (eval $ac_link) 2>&5
5015   ac_status=$?
5016   echo "$as_me:5016: \$? = $ac_status" >&5
5017   (exit $ac_status); } &&
5018          { ac_try='test -s conftest$ac_exeext'
5019   { (eval echo "$as_me:5019: \"$ac_try\"") >&5
5020   (eval $ac_try) 2>&5
5021   ac_status=$?
5022   echo "$as_me:5022: \$? = $ac_status" >&5
5023   (exit $ac_status); }; }; then
5024   ac_cv_lib_gpm_Gpm_Wgetch=yes
5025 else
5026   echo "$as_me: failed program was:" >&5
5027 cat conftest.$ac_ext >&5
5028 ac_cv_lib_gpm_Gpm_Wgetch=no
5029 fi
5030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5031 LIBS=$ac_check_lib_save_LIBS
5032 fi
5033 echo "$as_me:5033: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5034 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5035 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5036
5037 echo "$as_me:5037: checking if GPM is weakly bound to curses library" >&5
5038 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5039 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5040   echo $ECHO_N "(cached) $ECHO_C" >&6
5041 else
5042
5043 cf_cv_check_gpm_wgetch=unknown
5044 if test "$cross_compiling" != yes ; then
5045
5046 cat >conftest.$ac_ext <<CF_EOF
5047 #include <gpm.h>
5048 int main()
5049 {
5050         Gpm_Wgetch();
5051         ${cf_cv_main_return:-return}(0);
5052 }
5053 CF_EOF
5054
5055         cf_save_LIBS="$LIBS"
5056         # This only works if we can look at the symbol table.  If a shared
5057         # library is stripped for install, we cannot use that.  So we're forced
5058         # to rely on the static library, noting that some packagers may not
5059         # include it.
5060         LIBS="-static -lgpm -dynamic $LIBS"
5061         if { (eval echo "$as_me:5061: \"$ac_compile\"") >&5
5062   (eval $ac_compile) 2>&5
5063   ac_status=$?
5064   echo "$as_me:5064: \$? = $ac_status" >&5
5065   (exit $ac_status); } ; then
5066                 if { (eval echo "$as_me:5066: \"$ac_link\"") >&5
5067   (eval $ac_link) 2>&5
5068   ac_status=$?
5069   echo "$as_me:5069: \$? = $ac_status" >&5
5070   (exit $ac_status); } ; then
5071                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5072                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5073                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5074                 fi
5075         fi
5076         rm -rf conftest*
5077         LIBS="$cf_save_LIBS"
5078 fi
5079
5080 fi
5081 echo "$as_me:5081: result: $cf_cv_check_gpm_wgetch" >&5
5082 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5083
5084 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5085         { echo "$as_me:5085: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5086 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5087 fi
5088
5089 fi
5090
5091 fi
5092
5093 # not everyone has "test -c"
5094 if test -c /dev/sysmouse 2>/dev/null ; then
5095 echo "$as_me:5095: checking if you want to use sysmouse" >&5
5096 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5097
5098 # Check whether --with-sysmouse or --without-sysmouse was given.
5099 if test "${with_sysmouse+set}" = set; then
5100   withval="$with_sysmouse"
5101   cf_with_sysmouse=$withval
5102 else
5103   cf_with_sysmouse=maybe
5104 fi;
5105         if test "$cf_with_sysmouse" != no ; then
5106         cat >conftest.$ac_ext <<_ACEOF
5107 #line 5107 "configure"
5108 #include "confdefs.h"
5109
5110 #include <osreldate.h>
5111 #if (__FreeBSD_version >= 400017)
5112 #include <sys/consio.h>
5113 #include <sys/fbio.h>
5114 #else
5115 #include <machine/console.h>
5116 #endif
5117
5118 int
5119 main ()
5120 {
5121
5122         struct mouse_info the_mouse;
5123         ioctl(0, CONS_MOUSECTL, &the_mouse);
5124
5125   ;
5126   return 0;
5127 }
5128 _ACEOF
5129 rm -f conftest.$ac_objext
5130 if { (eval echo "$as_me:5130: \"$ac_compile\"") >&5
5131   (eval $ac_compile) 2>&5
5132   ac_status=$?
5133   echo "$as_me:5133: \$? = $ac_status" >&5
5134   (exit $ac_status); } &&
5135          { ac_try='test -s conftest.$ac_objext'
5136   { (eval echo "$as_me:5136: \"$ac_try\"") >&5
5137   (eval $ac_try) 2>&5
5138   ac_status=$?
5139   echo "$as_me:5139: \$? = $ac_status" >&5
5140   (exit $ac_status); }; }; then
5141   cf_with_sysmouse=yes
5142 else
5143   echo "$as_me: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
5145 cf_with_sysmouse=no
5146 fi
5147 rm -f conftest.$ac_objext conftest.$ac_ext
5148         fi
5149 echo "$as_me:5149: result: $cf_with_sysmouse" >&5
5150 echo "${ECHO_T}$cf_with_sysmouse" >&6
5151 test "$cf_with_sysmouse" = yes &&
5152 cat >>confdefs.h <<\EOF
5153 #define USE_SYSMOUSE 1
5154 EOF
5155
5156 fi
5157
5158 if test X"$CC_G_OPT" = X"" ; then
5159         CC_G_OPT='-g'
5160         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5161 fi
5162
5163 if test X"$CXX_G_OPT" = X"" ; then
5164         CXX_G_OPT='-g'
5165         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5166 fi
5167
5168 echo "$as_me:5168: checking for default loader flags" >&5
5169 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5170 case $DFT_LWR_MODEL in
5171 libtool) LD_MODEL=''   ;;
5172 normal)  LD_MODEL=''   ;;
5173 debug)   LD_MODEL=$CC_G_OPT ;;
5174 profile) LD_MODEL='-pg';;
5175 shared)  LD_MODEL=''   ;;
5176 esac
5177 echo "$as_me:5177: result: $LD_MODEL" >&5
5178 echo "${ECHO_T}$LD_MODEL" >&6
5179
5180 case $DFT_LWR_MODEL in
5181 shared)
5182
5183 echo "$as_me:5183: checking if rpath option should be used" >&5
5184 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5185
5186 # Check whether --enable-rpath or --disable-rpath was given.
5187 if test "${enable_rpath+set}" = set; then
5188   enableval="$enable_rpath"
5189   cf_cv_enable_rpath=$enableval
5190 else
5191   cf_cv_enable_rpath=no
5192 fi;
5193 echo "$as_me:5193: result: $cf_cv_enable_rpath" >&5
5194 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5195
5196 echo "$as_me:5196: checking if shared libraries should be relinked during install" >&5
5197 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5198
5199 # Check whether --enable-relink or --disable-relink was given.
5200 if test "${enable_relink+set}" = set; then
5201   enableval="$enable_relink"
5202   cf_cv_do_relink=$enableval
5203 else
5204   cf_cv_do_relink=yes
5205 fi;
5206 echo "$as_me:5206: result: $cf_cv_do_relink" >&5
5207 echo "${ECHO_T}$cf_cv_do_relink" >&6
5208         ;;
5209 esac
5210
5211 LD_RPATH_OPT=
5212 echo "$as_me:5212: checking for an rpath option" >&5
5213 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5214 case $cf_cv_system_name in #(vi
5215 irix*) #(vi
5216         if test "$GCC" = yes; then
5217                 LD_RPATH_OPT="-Wl,-rpath,"
5218         else
5219                 LD_RPATH_OPT="-rpath "
5220         fi
5221         ;;
5222 linux*|gnu*|k*bsd*-gnu) #(vi
5223         LD_RPATH_OPT="-Wl,-rpath,"
5224         ;;
5225 openbsd[2-9].*|mirbsd*) #(vi
5226         LD_RPATH_OPT="-Wl,-rpath,"
5227         ;;
5228 dragonfly*|freebsd*) #(vi
5229         LD_RPATH_OPT="-rpath "
5230         ;;
5231 netbsd*) #(vi
5232         LD_RPATH_OPT="-Wl,-rpath,"
5233         ;;
5234 osf*|mls+*) #(vi
5235         LD_RPATH_OPT="-rpath "
5236         ;;
5237 solaris2*) #(vi
5238         LD_RPATH_OPT="-R"
5239         ;;
5240 *)
5241         ;;
5242 esac
5243 echo "$as_me:5243: result: $LD_RPATH_OPT" >&5
5244 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5245
5246 case "x$LD_RPATH_OPT" in #(vi
5247 x-R*)
5248         echo "$as_me:5248: checking if we need a space after rpath option" >&5
5249 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5250         cf_save_LIBS="$LIBS"
5251         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5252         cat >conftest.$ac_ext <<_ACEOF
5253 #line 5253 "configure"
5254 #include "confdefs.h"
5255
5256 int
5257 main ()
5258 {
5259
5260   ;
5261   return 0;
5262 }
5263 _ACEOF
5264 rm -f conftest.$ac_objext conftest$ac_exeext
5265 if { (eval echo "$as_me:5265: \"$ac_link\"") >&5
5266   (eval $ac_link) 2>&5
5267   ac_status=$?
5268   echo "$as_me:5268: \$? = $ac_status" >&5
5269   (exit $ac_status); } &&
5270          { ac_try='test -s conftest$ac_exeext'
5271   { (eval echo "$as_me:5271: \"$ac_try\"") >&5
5272   (eval $ac_try) 2>&5
5273   ac_status=$?
5274   echo "$as_me:5274: \$? = $ac_status" >&5
5275   (exit $ac_status); }; }; then
5276   cf_rpath_space=no
5277 else
5278   echo "$as_me: failed program was:" >&5
5279 cat conftest.$ac_ext >&5
5280 cf_rpath_space=yes
5281 fi
5282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5283         LIBS="$cf_save_LIBS"
5284         echo "$as_me:5284: result: $cf_rpath_space" >&5
5285 echo "${ECHO_T}$cf_rpath_space" >&6
5286         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5287         ;;
5288 esac
5289
5290         LOCAL_LDFLAGS=
5291         LOCAL_LDFLAGS2=
5292         LD_SHARED_OPTS=
5293         INSTALL_LIB="-m 644"
5294
5295         cf_cv_do_symlinks=no
5296         cf_ld_rpath_opt=
5297         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5298
5299         echo "$as_me:5299: checking if release/abi version should be used for shared libs" >&5
5300 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5301
5302 # Check whether --with-shlib-version or --without-shlib-version was given.
5303 if test "${with_shlib_version+set}" = set; then
5304   withval="$with_shlib_version"
5305   test -z "$withval" && withval=auto
5306         case $withval in #(vi
5307         yes) #(vi
5308                 cf_cv_shlib_version=auto
5309                 ;;
5310         rel|abi|auto|no) #(vi
5311                 cf_cv_shlib_version=$withval
5312                 ;;
5313         *)
5314                 { { echo "$as_me:5314: error: option value must be one of: rel, abi, auto or no" >&5
5315 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5316    { (exit 1); exit 1; }; }
5317                 ;;
5318         esac
5319
5320 else
5321   cf_cv_shlib_version=auto
5322 fi;
5323         echo "$as_me:5323: result: $cf_cv_shlib_version" >&5
5324 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5325
5326         cf_cv_rm_so_locs=no
5327         cf_try_cflags=
5328
5329         # Some less-capable ports of gcc support only -fpic
5330         CC_SHARED_OPTS=
5331         if test "$GCC" = yes
5332         then
5333                 echo "$as_me:5333: checking which $CC option to use" >&5
5334 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5335                 cf_save_CFLAGS="$CFLAGS"
5336                 for CC_SHARED_OPTS in -fPIC -fpic ''
5337                 do
5338                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5339                         cat >conftest.$ac_ext <<_ACEOF
5340 #line 5340 "configure"
5341 #include "confdefs.h"
5342 #include <stdio.h>
5343 int
5344 main ()
5345 {
5346 int x = 1
5347   ;
5348   return 0;
5349 }
5350 _ACEOF
5351 rm -f conftest.$ac_objext
5352 if { (eval echo "$as_me:5352: \"$ac_compile\"") >&5
5353   (eval $ac_compile) 2>&5
5354   ac_status=$?
5355   echo "$as_me:5355: \$? = $ac_status" >&5
5356   (exit $ac_status); } &&
5357          { ac_try='test -s conftest.$ac_objext'
5358   { (eval echo "$as_me:5358: \"$ac_try\"") >&5
5359   (eval $ac_try) 2>&5
5360   ac_status=$?
5361   echo "$as_me:5361: \$? = $ac_status" >&5
5362   (exit $ac_status); }; }; then
5363   break
5364 else
5365   echo "$as_me: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5367 fi
5368 rm -f conftest.$ac_objext conftest.$ac_ext
5369                 done
5370                 echo "$as_me:5370: result: $CC_SHARED_OPTS" >&5
5371 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5372                 CFLAGS="$cf_save_CFLAGS"
5373         fi
5374
5375         cf_cv_shlib_version_infix=no
5376
5377         case $cf_cv_system_name in #(vi
5378         aix4.3-9*|aix[5-7]*) #(vi
5379                 if test "$GCC" = yes; then
5380                         CC_SHARED_OPTS=
5381                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5382                 else
5383                         # CC_SHARED_OPTS='-qpic=large -G'
5384                         # perhaps "-bM:SRE -bnoentry -bexpall"
5385                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5386                 fi
5387                 ;;
5388         beos*) #(vi
5389                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5390                 ;;
5391         cygwin*) #(vi
5392                 CC_SHARED_OPTS=
5393                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5394                 cf_cv_shlib_version=cygdll
5395                 cf_cv_shlib_version_infix=cygdll
5396                 cat >mk_shared_lib.sh <<-CF_EOF
5397                 #!/bin/sh
5398                 SHARED_LIB=\$1
5399                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5400                 shift
5401                 cat <<-EOF
5402                 Linking shared library
5403                 ** SHARED_LIB \$SHARED_LIB
5404                 ** IMPORT_LIB \$IMPORT_LIB
5405 EOF
5406                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5407 CF_EOF
5408                 chmod +x mk_shared_lib.sh
5409                 ;;
5410         darwin*) #(vi
5411                 cf_try_cflags="no-cpp-precomp"
5412                 CC_SHARED_OPTS="-dynamic"
5413                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5414                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5415                 cf_cv_shlib_version_infix=yes
5416                 echo "$as_me:5416: checking if ld -search_paths_first works" >&5
5417 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5418 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5419   echo $ECHO_N "(cached) $ECHO_C" >&6
5420 else
5421
5422                         cf_save_LDFLAGS=$LDFLAGS
5423                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5424                         cat >conftest.$ac_ext <<_ACEOF
5425 #line 5425 "configure"
5426 #include "confdefs.h"
5427
5428 int
5429 main ()
5430 {
5431 int i;
5432   ;
5433   return 0;
5434 }
5435 _ACEOF
5436 rm -f conftest.$ac_objext conftest$ac_exeext
5437 if { (eval echo "$as_me:5437: \"$ac_link\"") >&5
5438   (eval $ac_link) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); } &&
5442          { ac_try='test -s conftest$ac_exeext'
5443   { (eval echo "$as_me:5443: \"$ac_try\"") >&5
5444   (eval $ac_try) 2>&5
5445   ac_status=$?
5446   echo "$as_me:5446: \$? = $ac_status" >&5
5447   (exit $ac_status); }; }; then
5448   cf_cv_ldflags_search_paths_first=yes
5449 else
5450   echo "$as_me: failed program was:" >&5
5451 cat conftest.$ac_ext >&5
5452 cf_cv_ldflags_search_paths_first=no
5453 fi
5454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5455                                 LDFLAGS=$cf_save_LDFLAGS
5456 fi
5457 echo "$as_me:5457: result: $cf_cv_ldflags_search_paths_first" >&5
5458 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5459                 if test $cf_cv_ldflags_search_paths_first = yes; then
5460                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5461                 fi
5462                 ;;
5463         hpux*) #(vi
5464                 # (tested with gcc 2.7.2 -- I don't have c89)
5465                 if test "$GCC" = yes; then
5466                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5467                 else
5468                         CC_SHARED_OPTS='+Z'
5469                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5470                 fi
5471                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5472                 # HP-UX shared libraries must be executable, and should be
5473                 # readonly to exploit a quirk in the memory manager.
5474                 INSTALL_LIB="-m 555"
5475                 ;;
5476         interix*)
5477                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5478                 if test "$cf_cv_shlib_version" = rel; then
5479                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5480                 else
5481                         cf_shared_soname='`basename `'
5482                 fi
5483                 CC_SHARED_OPTS=
5484                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5485                 ;;
5486         irix*) #(vi
5487                 if test "$cf_cv_enable_rpath" = yes ; then
5488                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5489                 fi
5490                 # tested with IRIX 5.2 and 'cc'.
5491                 if test "$GCC" != yes; then
5492                         CC_SHARED_OPTS='-KPIC'
5493                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5494                 else
5495                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5496                 fi
5497                 cf_cv_rm_so_locs=yes
5498                 ;;
5499         linux*|gnu*|k*bsd*-gnu) #(vi
5500                 if test "$DFT_LWR_MODEL" = "shared" ; then
5501                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5502                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5503                 fi
5504                 if test "$cf_cv_enable_rpath" = yes ; then
5505                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5506                 fi
5507
5508         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5509         if test "$cf_cv_shlib_version" = rel; then
5510                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5511         else
5512                 cf_cv_shared_soname='`basename $@`'
5513         fi
5514
5515                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5516                 ;;
5517         mingw*) #(vi
5518                 cf_cv_shlib_version=mingw
5519                 cf_cv_shlib_version_infix=mingw
5520                 CC_SHARED_OPTS=
5521                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5522                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5523                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5524                 cat >mk_shared_lib.sh <<-CF_EOF
5525                 #!/bin/sh
5526                 SHARED_LIB=\$1
5527                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5528                 shift
5529                 cat <<-EOF
5530                 Linking shared library
5531                 ** SHARED_LIB \$SHARED_LIB
5532                 ** IMPORT_LIB \$IMPORT_LIB
5533 EOF
5534                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5535 CF_EOF
5536                 chmod +x mk_shared_lib.sh
5537                 ;;
5538         openbsd[2-9].*|mirbsd*) #(vi
5539                 if test "$DFT_LWR_MODEL" = "shared" ; then
5540                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5541                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5542                 fi
5543                 if test "$cf_cv_enable_rpath" = yes ; then
5544                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5545                 fi
5546                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5547
5548         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5549         if test "$cf_cv_shlib_version" = rel; then
5550                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5551         else
5552                 cf_cv_shared_soname='`basename $@`'
5553         fi
5554
5555                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5556                 ;;
5557         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5558                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5559                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5560                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5561                 ;;
5562         dragonfly*|freebsd*) #(vi
5563                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5564                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5565                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5566                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5567                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5568                 fi
5569
5570         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5571         if test "$cf_cv_shlib_version" = rel; then
5572                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5573         else
5574                 cf_cv_shared_soname='`basename $@`'
5575         fi
5576
5577                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5578                 ;;
5579         netbsd*) #(vi
5580                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5581                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5582                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5583                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5584                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5585                         if test "$cf_cv_shlib_version" = auto; then
5586                         if test -f /usr/libexec/ld.elf_so; then
5587                                 cf_cv_shlib_version=abi
5588                         else
5589                                 cf_cv_shlib_version=rel
5590                         fi
5591                         fi
5592
5593         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5594         if test "$cf_cv_shlib_version" = rel; then
5595                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5596         else
5597                 cf_cv_shared_soname='`basename $@`'
5598         fi
5599
5600                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5601                 else
5602                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5603                 fi
5604                 ;;
5605         osf*|mls+*) #(vi
5606                 # tested with OSF/1 V3.2 and 'cc'
5607                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5608                 # link with shared libs).
5609                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5610                 case $host_os in #(vi
5611                 osf4*)
5612                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5613                         ;;
5614                 esac
5615                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5616                 if test "$DFT_LWR_MODEL" = "shared" ; then
5617                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5618                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5619                 fi
5620                 cf_cv_rm_so_locs=yes
5621                 ;;
5622         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5623                 # tested with osr5.0.5
5624                 if test "$GCC" != yes; then
5625                         CC_SHARED_OPTS='-belf -KPIC'
5626                 fi
5627                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5628                 if test "$cf_cv_enable_rpath" = yes ; then
5629                         # only way is to set LD_RUN_PATH but no switch for it
5630                         RUN_PATH=$libdir
5631                 fi
5632                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5633                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5634                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5635                 ;;
5636         sunos4*) #(vi
5637                 # tested with SunOS 4.1.1 and gcc 2.7.0
5638                 if test "$GCC" != yes; then
5639                         CC_SHARED_OPTS='-KPIC'
5640                 fi
5641                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5642                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5643                 ;;
5644         solaris2*) #(vi
5645                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5646                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5647                 if test "$DFT_LWR_MODEL" = "shared" ; then
5648                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5649                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5650                 fi
5651                 if test "$cf_cv_enable_rpath" = yes ; then
5652                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5653                 fi
5654
5655         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5656         if test "$cf_cv_shlib_version" = rel; then
5657                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5658         else
5659                 cf_cv_shared_soname='`basename $@`'
5660         fi
5661
5662                 if test "$GCC" != yes; then
5663                         cf_save_CFLAGS="$CFLAGS"
5664                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5665                         do
5666                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5667                                 cat >conftest.$ac_ext <<_ACEOF
5668 #line 5668 "configure"
5669 #include "confdefs.h"
5670 #include <stdio.h>
5671 int
5672 main ()
5673 {
5674 printf("Hello\n");
5675   ;
5676   return 0;
5677 }
5678 _ACEOF
5679 rm -f conftest.$ac_objext
5680 if { (eval echo "$as_me:5680: \"$ac_compile\"") >&5
5681   (eval $ac_compile) 2>&5
5682   ac_status=$?
5683   echo "$as_me:5683: \$? = $ac_status" >&5
5684   (exit $ac_status); } &&
5685          { ac_try='test -s conftest.$ac_objext'
5686   { (eval echo "$as_me:5686: \"$ac_try\"") >&5
5687   (eval $ac_try) 2>&5
5688   ac_status=$?
5689   echo "$as_me:5689: \$? = $ac_status" >&5
5690   (exit $ac_status); }; }; then
5691   break
5692 else
5693   echo "$as_me: failed program was:" >&5
5694 cat conftest.$ac_ext >&5
5695 fi
5696 rm -f conftest.$ac_objext conftest.$ac_ext
5697                         done
5698                         CFLAGS="$cf_save_CFLAGS"
5699                         CC_SHARED_OPTS=$cf_shared_opts
5700                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5701                 else
5702                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5703                 fi
5704                 ;;
5705         sysv5uw7*|unix_sv*) #(vi
5706                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5707                 if test "$GCC" != yes; then
5708                         CC_SHARED_OPTS='-KPIC'
5709                 fi
5710                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5711                 ;;
5712         *)
5713                 CC_SHARED_OPTS='unknown'
5714                 MK_SHARED_LIB='echo unknown'
5715                 ;;
5716         esac
5717
5718         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5719         case "$cf_cv_shlib_version" in #(vi
5720         rel|abi)
5721                 case "$MK_SHARED_LIB" in #(vi
5722                 *'-o $@') #(vi
5723                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5724                         ;;
5725                 *)
5726                         { echo "$as_me:5726: WARNING: ignored --with-shlib-version" >&5
5727 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5728                         ;;
5729                 esac
5730                 ;;
5731         esac
5732
5733         if test -n "$cf_try_cflags"
5734         then
5735 cat > conftest.$ac_ext <<EOF
5736 #line 5736 "${as_me:-configure}"
5737 #include <stdio.h>
5738 int main(int argc, char *argv[])
5739 {
5740         printf("hello\n");
5741         return (argv[argc-1] == 0) ;
5742 }
5743 EOF
5744                 cf_save_CFLAGS="$CFLAGS"
5745                 for cf_opt in $cf_try_cflags
5746                 do
5747                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5748                         echo "$as_me:5748: checking if CFLAGS option -$cf_opt works" >&5
5749 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5750                         if { (eval echo "$as_me:5750: \"$ac_compile\"") >&5
5751   (eval $ac_compile) 2>&5
5752   ac_status=$?
5753   echo "$as_me:5753: \$? = $ac_status" >&5
5754   (exit $ac_status); }; then
5755                                 echo "$as_me:5755: result: yes" >&5
5756 echo "${ECHO_T}yes" >&6
5757                                 cf_save_CFLAGS="$CFLAGS"
5758                         else
5759                                 echo "$as_me:5759: result: no" >&5
5760 echo "${ECHO_T}no" >&6
5761                         fi
5762                 done
5763                 CFLAGS="$cf_save_CFLAGS"
5764         fi
5765
5766         # RPATH_LIST is a colon-separated list of directories
5767         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5768         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5769
5770         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5771
5772 echo "${as_me:-configure}:5772: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5773
5774         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5775
5776 echo "${as_me:-configure}:5776: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5777
5778 if test "$CC_SHARED_OPTS" = "unknown"; then
5779         for model in $cf_list_models; do
5780                 if test "$model" = "shared"; then
5781                         { { echo "$as_me:5781: error: Shared libraries are not supported in this version" >&5
5782 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5783    { (exit 1); exit 1; }; }
5784                 fi
5785         done
5786 fi
5787
5788 ### If we're building with rpath, try to link non-standard libs that way too.
5789 if test "$DFT_LWR_MODEL" = "shared"; then
5790
5791 echo "$as_me:5791: checking if rpath-hack should be disabled" >&5
5792 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5793
5794 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5795 if test "${enable_rpath_hack+set}" = set; then
5796   enableval="$enable_rpath_hack"
5797   test "$enableval" != no && enableval=yes
5798   if test "$enableval" != "yes" ; then
5799     cf_disable_rpath_hack=yes
5800   else
5801     cf_disable_rpath_hack=no
5802   fi
5803 else
5804   enableval=yes
5805   cf_disable_rpath_hack=no
5806
5807 fi;
5808 echo "$as_me:5808: result: $cf_disable_rpath_hack" >&5
5809 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5810 if test "$cf_disable_rpath_hack" = no ; then
5811
5812 echo "$as_me:5812: checking for updated LDFLAGS" >&5
5813 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5814 if test -n "$LD_RPATH_OPT" ; then
5815         echo "$as_me:5815: result: maybe" >&5
5816 echo "${ECHO_T}maybe" >&6
5817
5818         for ac_prog in ldd
5819 do
5820   # Extract the first word of "$ac_prog", so it can be a program name with args.
5821 set dummy $ac_prog; ac_word=$2
5822 echo "$as_me:5822: checking for $ac_word" >&5
5823 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5824 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5825   echo $ECHO_N "(cached) $ECHO_C" >&6
5826 else
5827   if test -n "$cf_ldd_prog"; then
5828   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5829 else
5830   ac_save_IFS=$IFS; IFS=$ac_path_separator
5831 ac_dummy="$PATH"
5832 for ac_dir in $ac_dummy; do
5833   IFS=$ac_save_IFS
5834   test -z "$ac_dir" && ac_dir=.
5835   $as_executable_p "$ac_dir/$ac_word" || continue
5836 ac_cv_prog_cf_ldd_prog="$ac_prog"
5837 echo "$as_me:5837: found $ac_dir/$ac_word" >&5
5838 break
5839 done
5840
5841 fi
5842 fi
5843 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5844 if test -n "$cf_ldd_prog"; then
5845   echo "$as_me:5845: result: $cf_ldd_prog" >&5
5846 echo "${ECHO_T}$cf_ldd_prog" >&6
5847 else
5848   echo "$as_me:5848: result: no" >&5
5849 echo "${ECHO_T}no" >&6
5850 fi
5851
5852   test -n "$cf_ldd_prog" && break
5853 done
5854 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5855
5856         cf_rpath_list="/usr/lib /lib"
5857         if test "$cf_ldd_prog" != no
5858         then
5859                 cf_rpath_oops=
5860
5861 cat >conftest.$ac_ext <<_ACEOF
5862 #line 5862 "configure"
5863 #include "confdefs.h"
5864 #include <stdio.h>
5865 int
5866 main ()
5867 {
5868 printf("Hello");
5869   ;
5870   return 0;
5871 }
5872 _ACEOF
5873 rm -f conftest.$ac_objext conftest$ac_exeext
5874 if { (eval echo "$as_me:5874: \"$ac_link\"") >&5
5875   (eval $ac_link) 2>&5
5876   ac_status=$?
5877   echo "$as_me:5877: \$? = $ac_status" >&5
5878   (exit $ac_status); } &&
5879          { ac_try='test -s conftest$ac_exeext'
5880   { (eval echo "$as_me:5880: \"$ac_try\"") >&5
5881   (eval $ac_try) 2>&5
5882   ac_status=$?
5883   echo "$as_me:5883: \$? = $ac_status" >&5
5884   (exit $ac_status); }; }; then
5885   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
5886                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5887 else
5888   echo "$as_me: failed program was:" >&5
5889 cat conftest.$ac_ext >&5
5890 fi
5891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5892
5893                 # If we passed the link-test, but get a "not found" on a given library,
5894                 # this could be due to inept reconfiguration of gcc to make it only
5895                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
5896                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
5897                 # /usr/local libraries.
5898                 if test -n "$cf_rpath_oops"
5899                 then
5900                         for cf_rpath_src in $cf_rpath_oops
5901                         do
5902                                 for cf_rpath_dir in \
5903                                         /usr/local \
5904                                         /usr/pkg \
5905                                         /opt/sfw
5906                                 do
5907                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
5908                                         then
5909                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
5910
5911 echo "${as_me:-configure}:5911: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
5912
5913                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
5914                                                 break
5915                                         fi
5916                                 done
5917                         done
5918                 fi
5919         fi
5920
5921         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5922
5923 echo "${as_me:-configure}:5923: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5924
5925 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5926
5927 echo "${as_me:-configure}:5927: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5928
5929 cf_rpath_dst=
5930 for cf_rpath_src in $LDFLAGS
5931 do
5932         case $cf_rpath_src in #(vi
5933         -L*) #(vi
5934
5935                 # check if this refers to a directory which we will ignore
5936                 cf_rpath_skip=no
5937                 if test -n "$cf_rpath_list"
5938                 then
5939                         for cf_rpath_item in $cf_rpath_list
5940                         do
5941                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5942                                 then
5943                                         cf_rpath_skip=yes
5944                                         break
5945                                 fi
5946                         done
5947                 fi
5948
5949                 if test "$cf_rpath_skip" = no
5950                 then
5951                         # transform the option
5952                         if test "$LD_RPATH_OPT" = "-R " ; then
5953                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5954                         else
5955                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5956                         fi
5957
5958                         # if we have not already added this, add it now
5959                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5960                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5961                         then
5962                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5963
5964 echo "${as_me:-configure}:5964: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5965
5966                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5967                         fi
5968                 fi
5969                 ;;
5970         esac
5971         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5972 done
5973 LDFLAGS=$cf_rpath_dst
5974
5975 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
5976
5977 echo "${as_me:-configure}:5977: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
5978
5979 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
5980
5981 echo "${as_me:-configure}:5981: testing ...checking LIBS $LIBS ..." 1>&5
5982
5983 cf_rpath_dst=
5984 for cf_rpath_src in $LIBS
5985 do
5986         case $cf_rpath_src in #(vi
5987         -L*) #(vi
5988
5989                 # check if this refers to a directory which we will ignore
5990                 cf_rpath_skip=no
5991                 if test -n "$cf_rpath_list"
5992                 then
5993                         for cf_rpath_item in $cf_rpath_list
5994                         do
5995                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5996                                 then
5997                                         cf_rpath_skip=yes
5998                                         break
5999                                 fi
6000                         done
6001                 fi
6002
6003                 if test "$cf_rpath_skip" = no
6004                 then
6005                         # transform the option
6006                         if test "$LD_RPATH_OPT" = "-R " ; then
6007                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6008                         else
6009                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6010                         fi
6011
6012                         # if we have not already added this, add it now
6013                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6014                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6015                         then
6016                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6017
6018 echo "${as_me:-configure}:6018: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6019
6020                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6021                         fi
6022                 fi
6023                 ;;
6024         esac
6025         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6026 done
6027 LIBS=$cf_rpath_dst
6028
6029 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6030
6031 echo "${as_me:-configure}:6031: testing ...checked LIBS $LIBS ..." 1>&5
6032
6033         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6034
6035 echo "${as_me:-configure}:6035: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6036
6037 fi
6038
6039 fi
6040
6041 fi
6042
6043 ###############################################################################
6044
6045 ###     use option --disable-overwrite to leave out the link to -lcurses
6046 echo "$as_me:6046: checking if you wish to install ncurses overwriting curses" >&5
6047 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6048
6049 # Check whether --enable-overwrite or --disable-overwrite was given.
6050 if test "${enable_overwrite+set}" = set; then
6051   enableval="$enable_overwrite"
6052   with_overwrite=$enableval
6053 else
6054   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6055 fi;
6056 echo "$as_me:6056: result: $with_overwrite" >&5
6057 echo "${ECHO_T}$with_overwrite" >&6
6058
6059 echo "$as_me:6059: checking if external terminfo-database is used" >&5
6060 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6061
6062 # Check whether --enable-database or --disable-database was given.
6063 if test "${enable_database+set}" = set; then
6064   enableval="$enable_database"
6065   use_database=$enableval
6066 else
6067   use_database=yes
6068 fi;
6069 echo "$as_me:6069: result: $use_database" >&5
6070 echo "${ECHO_T}$use_database" >&6
6071
6072 case $host_os in #(vi
6073 os2*) #(vi
6074         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6075         ;;
6076 *) #(vi
6077         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6078         ;;
6079 esac
6080
6081 if test "$use_database" != no ; then
6082
6083 cat >>confdefs.h <<\EOF
6084 #define USE_DATABASE 1
6085 EOF
6086
6087         echo "$as_me:6087: checking which terminfo source-file will be installed" >&5
6088 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6089
6090 # Check whether --with-database or --without-database was given.
6091 if test "${with_database+set}" = set; then
6092   withval="$with_database"
6093   TERMINFO_SRC=$withval
6094 fi;
6095         echo "$as_me:6095: result: $TERMINFO_SRC" >&5
6096 echo "${ECHO_T}$TERMINFO_SRC" >&6
6097
6098         echo "$as_me:6098: checking whether to use hashed database instead of directory/tree" >&5
6099 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6100
6101 # Check whether --with-hashed-db or --without-hashed-db was given.
6102 if test "${with_hashed_db+set}" = set; then
6103   withval="$with_hashed_db"
6104
6105 else
6106   with_hashed_db=no
6107 fi;
6108         echo "$as_me:6108: result: $with_hashed_db" >&5
6109 echo "${ECHO_T}$with_hashed_db" >&6
6110 else
6111         with_hashed_db=no
6112 fi
6113
6114 echo "$as_me:6114: checking for list of fallback descriptions" >&5
6115 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6116
6117 # Check whether --with-fallbacks or --without-fallbacks was given.
6118 if test "${with_fallbacks+set}" = set; then
6119   withval="$with_fallbacks"
6120   with_fallback=$withval
6121 else
6122   with_fallback=
6123 fi;
6124 echo "$as_me:6124: result: $with_fallback" >&5
6125 echo "${ECHO_T}$with_fallback" >&6
6126 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6127
6128 echo "$as_me:6128: checking if you want modern xterm or antique" >&5
6129 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6130
6131 # Check whether --with-xterm-new or --without-xterm-new was given.
6132 if test "${with_xterm_new+set}" = set; then
6133   withval="$with_xterm_new"
6134   with_xterm_new=$withval
6135 else
6136   with_xterm_new=yes
6137 fi;
6138 case $with_xterm_new in
6139 no)     with_xterm_new=xterm-old;;
6140 *)      with_xterm_new=xterm-new;;
6141 esac
6142 echo "$as_me:6142: result: $with_xterm_new" >&5
6143 echo "${ECHO_T}$with_xterm_new" >&6
6144 WHICH_XTERM=$with_xterm_new
6145
6146 echo "$as_me:6146: checking if xterm backspace sends BS or DEL" >&5
6147 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6148
6149 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6150 if test "${with_xterm_kbs+set}" = set; then
6151   withval="$with_xterm_kbs"
6152   with_xterm_kbs=$withval
6153 else
6154   with_xterm_kbs=BS
6155 fi;
6156 case x$with_xterm_kbs in
6157 xyes|xno|xBS|xbs|x8)
6158         with_xterm_kbs=BS
6159         ;;
6160 xDEL|xdel|x127)
6161         with_xterm_kbs=DEL
6162         ;;
6163 *)
6164         with_xterm_kbs=$withval
6165         ;;
6166 esac
6167 echo "$as_me:6167: result: $with_xterm_kbs" >&5
6168 echo "${ECHO_T}$with_xterm_kbs" >&6
6169 XTERM_KBS=$with_xterm_kbs
6170
6171 MAKE_TERMINFO=
6172 if test "$use_database" = no ; then
6173         TERMINFO="${datadir}/terminfo"
6174         MAKE_TERMINFO="#"
6175 else
6176
6177 echo "$as_me:6177: checking for list of terminfo directories" >&5
6178 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6179
6180 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6181 if test "${with_terminfo_dirs+set}" = set; then
6182   withval="$with_terminfo_dirs"
6183
6184 else
6185   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6186 fi;
6187 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6188 cf_dst_path=
6189 for cf_src_path in $withval
6190 do
6191
6192 if test "x$prefix" != xNONE; then
6193   cf_path_syntax="$prefix"
6194 else
6195   cf_path_syntax="$ac_default_prefix"
6196 fi
6197
6198 case ".$cf_src_path" in #(vi
6199 .\$\(*\)*|.\'*\'*) #(vi
6200   ;;
6201 ..|./*|.\\*) #(vi
6202   ;;
6203 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6204   ;;
6205 .\${*prefix}*|.\${*dir}*) #(vi
6206   eval cf_src_path="$cf_src_path"
6207   case ".$cf_src_path" in #(vi
6208   .NONE/*)
6209     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6210     ;;
6211   esac
6212   ;; #(vi
6213 .no|.NONE/*)
6214   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6215   ;;
6216 *)
6217   { { echo "$as_me:6217: error: expected a pathname, not \"$cf_src_path\"" >&5
6218 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6219    { (exit 1); exit 1; }; }
6220   ;;
6221 esac
6222
6223   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6224   cf_dst_path="${cf_dst_path}${cf_src_path}"
6225 done
6226 IFS="$ac_save_ifs"
6227
6228 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6229 # so we have to check/work around.  We do prefer the result of "eval"...
6230 eval cf_dst_eval="$cf_dst_path"
6231 case "x$cf_dst_eval" in #(vi
6232 xNONE*) #(vi
6233         TERMINFO_DIRS=$cf_dst_path
6234         ;;
6235 *)
6236         TERMINFO_DIRS="$cf_dst_eval"
6237         ;;
6238 esac
6239
6240 echo "$as_me:6240: result: $TERMINFO_DIRS" >&5
6241 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6242 test -n "$TERMINFO_DIRS" &&
6243 cat >>confdefs.h <<EOF
6244 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6245 EOF
6246
6247 echo "$as_me:6247: checking for default terminfo directory" >&5
6248 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6249
6250 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6251 if test "${with_default_terminfo_dir+set}" = set; then
6252   withval="$with_default_terminfo_dir"
6253
6254 else
6255   withval="${TERMINFO:-${datadir}/terminfo}"
6256 fi; if test -n "${datadir}/terminfo" ; then
6257
6258 if test "x$prefix" != xNONE; then
6259   cf_path_syntax="$prefix"
6260 else
6261   cf_path_syntax="$ac_default_prefix"
6262 fi
6263
6264 case ".$withval" in #(vi
6265 .\$\(*\)*|.\'*\'*) #(vi
6266   ;;
6267 ..|./*|.\\*) #(vi
6268   ;;
6269 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6270   ;;
6271 .\${*prefix}*|.\${*dir}*) #(vi
6272   eval withval="$withval"
6273   case ".$withval" in #(vi
6274   .NONE/*)
6275     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6276     ;;
6277   esac
6278   ;; #(vi
6279 .no|.NONE/*)
6280   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6281   ;;
6282 *)
6283   { { echo "$as_me:6283: error: expected a pathname, not \"$withval\"" >&5
6284 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6285    { (exit 1); exit 1; }; }
6286   ;;
6287 esac
6288
6289 fi
6290 eval TERMINFO="$withval"
6291
6292 echo "$as_me:6292: result: $TERMINFO" >&5
6293 echo "${ECHO_T}$TERMINFO" >&6
6294
6295 cat >>confdefs.h <<EOF
6296 #define TERMINFO "$TERMINFO"
6297 EOF
6298
6299 fi
6300
6301 ###     use option --disable-big-core to make tic run on small machines
6302 ###     We need 4Mb, check if we can allocate 50% more than that.
6303 echo "$as_me:6303: checking if big-core option selected" >&5
6304 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6305
6306 # Check whether --enable-big-core or --disable-big-core was given.
6307 if test "${enable_big_core+set}" = set; then
6308   enableval="$enable_big_core"
6309   with_big_core=$enableval
6310 else
6311   if test "$cross_compiling" = yes; then
6312   with_big_core=no
6313 else
6314   cat >conftest.$ac_ext <<_ACEOF
6315 #line 6315 "configure"
6316 #include "confdefs.h"
6317
6318 #include <stdlib.h>
6319 #include <string.h>
6320 int main() {
6321         unsigned long n = 6000000L;
6322         char *s = malloc(n);
6323         if (s != 0)
6324                 s[0] = s[n-1] = 0;
6325         ${cf_cv_main_return:-return}(s == 0);
6326 }
6327 _ACEOF
6328 rm -f conftest$ac_exeext
6329 if { (eval echo "$as_me:6329: \"$ac_link\"") >&5
6330   (eval $ac_link) 2>&5
6331   ac_status=$?
6332   echo "$as_me:6332: \$? = $ac_status" >&5
6333   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6334   { (eval echo "$as_me:6334: \"$ac_try\"") >&5
6335   (eval $ac_try) 2>&5
6336   ac_status=$?
6337   echo "$as_me:6337: \$? = $ac_status" >&5
6338   (exit $ac_status); }; }; then
6339   with_big_core=yes
6340 else
6341   echo "$as_me: program exited with status $ac_status" >&5
6342 echo "$as_me: failed program was:" >&5
6343 cat conftest.$ac_ext >&5
6344 with_big_core=no
6345 fi
6346 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6347 fi
6348 fi;
6349 echo "$as_me:6349: result: $with_big_core" >&5
6350 echo "${ECHO_T}$with_big_core" >&6
6351 test "x$with_big_core" = "xyes" &&
6352 cat >>confdefs.h <<\EOF
6353 #define HAVE_BIG_CORE 1
6354 EOF
6355
6356 ### ISO C only guarantees 512-char strings, we have tables which load faster
6357 ### when constructed using "big" strings.  More than the C compiler, the awk
6358 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6359 echo "$as_me:6359: checking if big-strings option selected" >&5
6360 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6361
6362 # Check whether --enable-big-strings or --disable-big-strings was given.
6363 if test "${enable_big_strings+set}" = set; then
6364   enableval="$enable_big_strings"
6365   with_big_strings=$enableval
6366 else
6367
6368         case x$AWK in #(vi
6369         x)
6370                 eval with_big_strings=no
6371                 ;;
6372         *) #(vi
6373                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6374                         | $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
6375                         eval with_big_strings=yes
6376                 else
6377                         eval with_big_strings=no
6378                 fi
6379                 ;;
6380         esac
6381
6382 fi;
6383 echo "$as_me:6383: result: $with_big_strings" >&5
6384 echo "${ECHO_T}$with_big_strings" >&6
6385
6386 USE_BIG_STRINGS=0
6387 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6388
6389 ###     use option --enable-termcap to compile in the termcap fallback support
6390 echo "$as_me:6390: checking if you want termcap-fallback support" >&5
6391 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6392
6393 # Check whether --enable-termcap or --disable-termcap was given.
6394 if test "${enable_termcap+set}" = set; then
6395   enableval="$enable_termcap"
6396   with_termcap=$enableval
6397 else
6398   with_termcap=no
6399 fi;
6400 echo "$as_me:6400: result: $with_termcap" >&5
6401 echo "${ECHO_T}$with_termcap" >&6
6402
6403 if test "x$with_termcap" != "xyes" ; then
6404         if test "$use_database" = no ; then
6405                 if test -z "$with_fallback" ; then
6406                         { { echo "$as_me:6406: error: You have disabled the database w/o specifying fallbacks" >&5
6407 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6408    { (exit 1); exit 1; }; }
6409                 fi
6410         fi
6411
6412 cat >>confdefs.h <<\EOF
6413 #define PURE_TERMINFO 1
6414 EOF
6415
6416 else
6417
6418 if test "$with_ticlib" != no ; then
6419         { { echo "$as_me:6419: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6420 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6421    { (exit 1); exit 1; }; }
6422 fi
6423
6424 cat >>confdefs.h <<\EOF
6425 #define USE_TERMCAP 1
6426 EOF
6427
6428 echo "$as_me:6428: checking for list of termcap files" >&5
6429 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6430
6431 # Check whether --with-termpath or --without-termpath was given.
6432 if test "${with_termpath+set}" = set; then
6433   withval="$with_termpath"
6434
6435 else
6436   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6437 fi;
6438 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6439 cf_dst_path=
6440 for cf_src_path in $withval
6441 do
6442
6443 if test "x$prefix" != xNONE; then
6444   cf_path_syntax="$prefix"
6445 else
6446   cf_path_syntax="$ac_default_prefix"
6447 fi
6448
6449 case ".$cf_src_path" in #(vi
6450 .\$\(*\)*|.\'*\'*) #(vi
6451   ;;
6452 ..|./*|.\\*) #(vi
6453   ;;
6454 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6455   ;;
6456 .\${*prefix}*|.\${*dir}*) #(vi
6457   eval cf_src_path="$cf_src_path"
6458   case ".$cf_src_path" in #(vi
6459   .NONE/*)
6460     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6461     ;;
6462   esac
6463   ;; #(vi
6464 .no|.NONE/*)
6465   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6466   ;;
6467 *)
6468   { { echo "$as_me:6468: error: expected a pathname, not \"$cf_src_path\"" >&5
6469 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6470    { (exit 1); exit 1; }; }
6471   ;;
6472 esac
6473
6474   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6475   cf_dst_path="${cf_dst_path}${cf_src_path}"
6476 done
6477 IFS="$ac_save_ifs"
6478
6479 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6480 # so we have to check/work around.  We do prefer the result of "eval"...
6481 eval cf_dst_eval="$cf_dst_path"
6482 case "x$cf_dst_eval" in #(vi
6483 xNONE*) #(vi
6484         TERMPATH=$cf_dst_path
6485         ;;
6486 *)
6487         TERMPATH="$cf_dst_eval"
6488         ;;
6489 esac
6490
6491 echo "$as_me:6491: result: $TERMPATH" >&5
6492 echo "${ECHO_T}$TERMPATH" >&6
6493 test -n "$TERMPATH" &&
6494 cat >>confdefs.h <<EOF
6495 #define TERMPATH "$TERMPATH"
6496 EOF
6497
6498 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6499 echo "$as_me:6499: checking if fast termcap-loader is needed" >&5
6500 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6501
6502 # Check whether --enable-getcap or --disable-getcap was given.
6503 if test "${enable_getcap+set}" = set; then
6504   enableval="$enable_getcap"
6505   with_getcap=$enableval
6506 else
6507   with_getcap=no
6508 fi;
6509 echo "$as_me:6509: result: $with_getcap" >&5
6510 echo "${ECHO_T}$with_getcap" >&6
6511 test "x$with_getcap" = "xyes" &&
6512 cat >>confdefs.h <<\EOF
6513 #define USE_GETCAP 1
6514 EOF
6515
6516 echo "$as_me:6516: checking if translated termcaps will be cached in ~/.terminfo" >&5
6517 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6518
6519 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6520 if test "${enable_getcap_cache+set}" = set; then
6521   enableval="$enable_getcap_cache"
6522   with_getcap_cache=$enableval
6523 else
6524   with_getcap_cache=no
6525 fi;
6526 echo "$as_me:6526: result: $with_getcap_cache" >&5
6527 echo "${ECHO_T}$with_getcap_cache" >&6
6528 test "x$with_getcap_cache" = "xyes" &&
6529 cat >>confdefs.h <<\EOF
6530 #define USE_GETCAP_CACHE 1
6531 EOF
6532
6533 fi
6534
6535 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6536 echo "$as_me:6536: checking if ~/.terminfo is wanted" >&5
6537 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6538
6539 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6540 if test "${enable_home_terminfo+set}" = set; then
6541   enableval="$enable_home_terminfo"
6542   with_home_terminfo=$enableval
6543 else
6544   with_home_terminfo=yes
6545 fi;
6546 echo "$as_me:6546: result: $with_home_terminfo" >&5
6547 echo "${ECHO_T}$with_home_terminfo" >&6
6548 test "x$with_home_terminfo" = "xyes" &&
6549 cat >>confdefs.h <<\EOF
6550 #define USE_HOME_TERMINFO 1
6551 EOF
6552
6553 echo "$as_me:6553: checking if you want to use restricted environment when running as root" >&5
6554 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6555
6556 # Check whether --enable-root-environ or --disable-root-environ was given.
6557 if test "${enable_root_environ+set}" = set; then
6558   enableval="$enable_root_environ"
6559   with_root_environ=$enableval
6560 else
6561   with_root_environ=yes
6562 fi;
6563 echo "$as_me:6563: result: $with_root_environ" >&5
6564 echo "${ECHO_T}$with_root_environ" >&6
6565 test "x$with_root_environ" = xyes &&
6566 cat >>confdefs.h <<\EOF
6567 #define USE_ROOT_ENVIRON 1
6568 EOF
6569
6570 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6571 ###   to reduce storage requirements for the terminfo database.
6572
6573 for ac_func in \
6574         remove \
6575         unlink
6576 do
6577 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6578 echo "$as_me:6578: checking for $ac_func" >&5
6579 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6580 if eval "test \"\${$as_ac_var+set}\" = set"; then
6581   echo $ECHO_N "(cached) $ECHO_C" >&6
6582 else
6583   cat >conftest.$ac_ext <<_ACEOF
6584 #line 6584 "configure"
6585 #include "confdefs.h"
6586 /* System header to define __stub macros and hopefully few prototypes,
6587     which can conflict with char $ac_func (); below.  */
6588 #include <assert.h>
6589 /* Override any gcc2 internal prototype to avoid an error.  */
6590 #ifdef __cplusplus
6591 extern "C"
6592 #endif
6593 /* We use char because int might match the return type of a gcc2
6594    builtin and then its argument prototype would still apply.  */
6595 char $ac_func ();
6596 char (*f) ();
6597
6598 int
6599 main ()
6600 {
6601 /* The GNU C library defines this for functions which it implements
6602     to always fail with ENOSYS.  Some functions are actually named
6603     something starting with __ and the normal name is an alias.  */
6604 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6605 choke me
6606 #else
6607 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6608 #endif
6609
6610   ;
6611   return 0;
6612 }
6613 _ACEOF
6614 rm -f conftest.$ac_objext conftest$ac_exeext
6615 if { (eval echo "$as_me:6615: \"$ac_link\"") >&5
6616   (eval $ac_link) 2>&5
6617   ac_status=$?
6618   echo "$as_me:6618: \$? = $ac_status" >&5
6619   (exit $ac_status); } &&
6620          { ac_try='test -s conftest$ac_exeext'
6621   { (eval echo "$as_me:6621: \"$ac_try\"") >&5
6622   (eval $ac_try) 2>&5
6623   ac_status=$?
6624   echo "$as_me:6624: \$? = $ac_status" >&5
6625   (exit $ac_status); }; }; then
6626   eval "$as_ac_var=yes"
6627 else
6628   echo "$as_me: failed program was:" >&5
6629 cat conftest.$ac_ext >&5
6630 eval "$as_ac_var=no"
6631 fi
6632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6633 fi
6634 echo "$as_me:6634: result: `eval echo '${'$as_ac_var'}'`" >&5
6635 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6636 if test `eval echo '${'$as_ac_var'}'` = yes; then
6637   cat >>confdefs.h <<EOF
6638 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6639 EOF
6640
6641 fi
6642 done
6643
6644 if test "$cross_compiling" = yes ; then
6645
6646 for ac_func in \
6647                 link \
6648                 symlink
6649 do
6650 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6651 echo "$as_me:6651: checking for $ac_func" >&5
6652 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6653 if eval "test \"\${$as_ac_var+set}\" = set"; then
6654   echo $ECHO_N "(cached) $ECHO_C" >&6
6655 else
6656   cat >conftest.$ac_ext <<_ACEOF
6657 #line 6657 "configure"
6658 #include "confdefs.h"
6659 /* System header to define __stub macros and hopefully few prototypes,
6660     which can conflict with char $ac_func (); below.  */
6661 #include <assert.h>
6662 /* Override any gcc2 internal prototype to avoid an error.  */
6663 #ifdef __cplusplus
6664 extern "C"
6665 #endif
6666 /* We use char because int might match the return type of a gcc2
6667    builtin and then its argument prototype would still apply.  */
6668 char $ac_func ();
6669 char (*f) ();
6670
6671 int
6672 main ()
6673 {
6674 /* The GNU C library defines this for functions which it implements
6675     to always fail with ENOSYS.  Some functions are actually named
6676     something starting with __ and the normal name is an alias.  */
6677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6678 choke me
6679 #else
6680 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6681 #endif
6682
6683   ;
6684   return 0;
6685 }
6686 _ACEOF
6687 rm -f conftest.$ac_objext conftest$ac_exeext
6688 if { (eval echo "$as_me:6688: \"$ac_link\"") >&5
6689   (eval $ac_link) 2>&5
6690   ac_status=$?
6691   echo "$as_me:6691: \$? = $ac_status" >&5
6692   (exit $ac_status); } &&
6693          { ac_try='test -s conftest$ac_exeext'
6694   { (eval echo "$as_me:6694: \"$ac_try\"") >&5
6695   (eval $ac_try) 2>&5
6696   ac_status=$?
6697   echo "$as_me:6697: \$? = $ac_status" >&5
6698   (exit $ac_status); }; }; then
6699   eval "$as_ac_var=yes"
6700 else
6701   echo "$as_me: failed program was:" >&5
6702 cat conftest.$ac_ext >&5
6703 eval "$as_ac_var=no"
6704 fi
6705 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6706 fi
6707 echo "$as_me:6707: result: `eval echo '${'$as_ac_var'}'`" >&5
6708 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6709 if test `eval echo '${'$as_ac_var'}'` = yes; then
6710   cat >>confdefs.h <<EOF
6711 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6712 EOF
6713
6714 fi
6715 done
6716
6717 else
6718         echo "$as_me:6718: checking if link/symlink functions work" >&5
6719 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6720 if test "${cf_cv_link_funcs+set}" = set; then
6721   echo $ECHO_N "(cached) $ECHO_C" >&6
6722 else
6723
6724                 cf_cv_link_funcs=
6725                 for cf_func in link symlink ; do
6726                         if test "$cross_compiling" = yes; then
6727
6728                         eval 'ac_cv_func_'$cf_func'=error'
6729 else
6730   cat >conftest.$ac_ext <<_ACEOF
6731 #line 6731 "configure"
6732 #include "confdefs.h"
6733
6734 #include <sys/types.h>
6735 #include <sys/stat.h>
6736 #ifdef HAVE_UNISTD_H
6737 #include <unistd.h>
6738 #endif
6739 int main()
6740 {
6741         int fail = 0;
6742         char *src = "config.log";
6743         char *dst = "conftest.chk";
6744         struct stat src_sb;
6745         struct stat dst_sb;
6746
6747         stat(src, &src_sb);
6748         fail = ($cf_func("config.log", "conftest.chk") < 0)
6749             || (stat(dst, &dst_sb) < 0)
6750             || (dst_sb.st_mtime != src_sb.st_mtime);
6751 #ifdef HAVE_UNLINK
6752         unlink(dst);
6753 #else
6754         remove(dst);
6755 #endif
6756         ${cf_cv_main_return:-return} (fail);
6757 }
6758
6759 _ACEOF
6760 rm -f conftest$ac_exeext
6761 if { (eval echo "$as_me:6761: \"$ac_link\"") >&5
6762   (eval $ac_link) 2>&5
6763   ac_status=$?
6764   echo "$as_me:6764: \$? = $ac_status" >&5
6765   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6766   { (eval echo "$as_me:6766: \"$ac_try\"") >&5
6767   (eval $ac_try) 2>&5
6768   ac_status=$?
6769   echo "$as_me:6769: \$? = $ac_status" >&5
6770   (exit $ac_status); }; }; then
6771
6772                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6773                         eval 'ac_cv_func_'$cf_func'=yes'
6774 else
6775   echo "$as_me: program exited with status $ac_status" >&5
6776 echo "$as_me: failed program was:" >&5
6777 cat conftest.$ac_ext >&5
6778
6779                         eval 'ac_cv_func_'$cf_func'=no'
6780 fi
6781 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6782 fi
6783                 done
6784                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6785
6786 fi
6787 echo "$as_me:6787: result: $cf_cv_link_funcs" >&5
6788 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6789         test "$ac_cv_func_link"    = yes &&
6790 cat >>confdefs.h <<\EOF
6791 #define HAVE_LINK 1
6792 EOF
6793
6794         test "$ac_cv_func_symlink" = yes &&
6795 cat >>confdefs.h <<\EOF
6796 #define HAVE_SYMLINK 1
6797 EOF
6798
6799 fi
6800
6801 with_links=no
6802 with_symlinks=no
6803
6804 # soft links (symbolic links) are useful for some systems where hard links do
6805 # not work, or to make it simpler to copy terminfo trees around.
6806 if test "x$ac_cv_func_symlink" = xyes ; then
6807     echo "$as_me:6807: checking if tic should use symbolic links" >&5
6808 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6809
6810 # Check whether --enable-symlinks or --disable-symlinks was given.
6811 if test "${enable_symlinks+set}" = set; then
6812   enableval="$enable_symlinks"
6813   with_symlinks=$enableval
6814 else
6815   with_symlinks=no
6816 fi;
6817     echo "$as_me:6817: result: $with_symlinks" >&5
6818 echo "${ECHO_T}$with_symlinks" >&6
6819 fi
6820
6821 # If we have hard links and did not choose to use soft links instead, there is
6822 # no reason to make this choice optional - use the hard links.
6823 if test "$with_symlinks" = no ; then
6824     echo "$as_me:6824: checking if tic should use hard links" >&5
6825 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6826     if test "x$ac_cv_func_link" = xyes ; then
6827         with_links=yes
6828     else
6829         with_links=no
6830     fi
6831     echo "$as_me:6831: result: $with_links" >&5
6832 echo "${ECHO_T}$with_links" >&6
6833 fi
6834
6835 test "x$with_links" = xyes &&
6836 cat >>confdefs.h <<\EOF
6837 #define USE_LINKS 1
6838 EOF
6839
6840 test "x$with_symlinks" = xyes &&
6841 cat >>confdefs.h <<\EOF
6842 #define USE_SYMLINKS 1
6843 EOF
6844
6845 ###   use option --enable-broken-linker to force on use of broken-linker support
6846 echo "$as_me:6846: checking if you want broken-linker support code" >&5
6847 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6848
6849 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6850 if test "${enable_broken_linker+set}" = set; then
6851   enableval="$enable_broken_linker"
6852   with_broken_linker=$enableval
6853 else
6854   with_broken_linker=${BROKEN_LINKER:-no}
6855 fi;
6856 echo "$as_me:6856: result: $with_broken_linker" >&5
6857 echo "${ECHO_T}$with_broken_linker" >&6
6858
6859 BROKEN_LINKER=0
6860 if test "x$with_broken_linker" = xyes ; then
6861
6862 cat >>confdefs.h <<\EOF
6863 #define BROKEN_LINKER 1
6864 EOF
6865
6866         BROKEN_LINKER=1
6867 elif test "$DFT_LWR_MODEL" = shared ; then
6868         case $cf_cv_system_name in #(vi
6869         cygwin*)
6870
6871 cat >>confdefs.h <<\EOF
6872 #define BROKEN_LINKER 1
6873 EOF
6874
6875                 BROKEN_LINKER=1
6876                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6877
6878 echo "${as_me:-configure}:6878: testing cygwin linker is broken anyway ..." 1>&5
6879
6880                 ;;
6881         esac
6882 fi
6883
6884 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6885 echo "$as_me:6885: checking if tputs should process BSD-style prefix padding" >&5
6886 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6887
6888 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6889 if test "${enable_bsdpad+set}" = set; then
6890   enableval="$enable_bsdpad"
6891   with_bsdpad=$enableval
6892 else
6893   with_bsdpad=no
6894 fi;
6895 echo "$as_me:6895: result: $with_bsdpad" >&5
6896 echo "${ECHO_T}$with_bsdpad" >&6
6897 test "x$with_bsdpad" = xyes &&
6898 cat >>confdefs.h <<\EOF
6899 #define BSD_TPUTS 1
6900 EOF
6901
6902 ###   use option --enable-widec to turn on use of wide-character support
6903 NCURSES_CH_T=chtype
6904 NCURSES_LIBUTF8=0
6905
6906 NEED_WCHAR_H=0
6907 NCURSES_MBSTATE_T=0
6908 NCURSES_WCHAR_T=0
6909 NCURSES_WINT_T=0
6910
6911 # Check to define _XOPEN_SOURCE "automatically"
6912
6913 cf_XOPEN_SOURCE=500
6914 cf_POSIX_C_SOURCE=199506L
6915 cf_xopen_source=
6916
6917 case $host_os in #(vi
6918 aix[4-7]*) #(vi
6919         cf_xopen_source="-D_ALL_SOURCE"
6920         ;;
6921 cygwin) #(vi
6922         cf_XOPEN_SOURCE=600
6923         ;;
6924 darwin[0-8].*) #(vi
6925         cf_xopen_source="-D_APPLE_C_SOURCE"
6926         ;;
6927 darwin*) #(vi
6928         cf_xopen_source="-D_DARWIN_C_SOURCE"
6929         cf_XOPEN_SOURCE=
6930         ;;
6931 freebsd*|dragonfly*) #(vi
6932         # 5.x headers associate
6933         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6934         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6935         cf_POSIX_C_SOURCE=200112L
6936         cf_XOPEN_SOURCE=600
6937         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6938         ;;
6939 hpux11*) #(vi
6940         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6941         ;;
6942 hpux*) #(vi
6943         cf_xopen_source="-D_HPUX_SOURCE"
6944         ;;
6945 irix[56].*) #(vi
6946         cf_xopen_source="-D_SGI_SOURCE"
6947         cf_XOPEN_SOURCE=
6948         ;;
6949 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6950
6951 echo "$as_me:6951: checking if we must define _GNU_SOURCE" >&5
6952 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6953 if test "${cf_cv_gnu_source+set}" = set; then
6954   echo $ECHO_N "(cached) $ECHO_C" >&6
6955 else
6956
6957 cat >conftest.$ac_ext <<_ACEOF
6958 #line 6958 "configure"
6959 #include "confdefs.h"
6960 #include <sys/types.h>
6961 int
6962 main ()
6963 {
6964
6965 #ifndef _XOPEN_SOURCE
6966 make an error
6967 #endif
6968   ;
6969   return 0;
6970 }
6971 _ACEOF
6972 rm -f conftest.$ac_objext
6973 if { (eval echo "$as_me:6973: \"$ac_compile\"") >&5
6974   (eval $ac_compile) 2>&5
6975   ac_status=$?
6976   echo "$as_me:6976: \$? = $ac_status" >&5
6977   (exit $ac_status); } &&
6978          { ac_try='test -s conftest.$ac_objext'
6979   { (eval echo "$as_me:6979: \"$ac_try\"") >&5
6980   (eval $ac_try) 2>&5
6981   ac_status=$?
6982   echo "$as_me:6982: \$? = $ac_status" >&5
6983   (exit $ac_status); }; }; then
6984   cf_cv_gnu_source=no
6985 else
6986   echo "$as_me: failed program was:" >&5
6987 cat conftest.$ac_ext >&5
6988 cf_save="$CPPFLAGS"
6989          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6990          cat >conftest.$ac_ext <<_ACEOF
6991 #line 6991 "configure"
6992 #include "confdefs.h"
6993 #include <sys/types.h>
6994 int
6995 main ()
6996 {
6997
6998 #ifdef _XOPEN_SOURCE
6999 make an error
7000 #endif
7001   ;
7002   return 0;
7003 }
7004 _ACEOF
7005 rm -f conftest.$ac_objext
7006 if { (eval echo "$as_me:7006: \"$ac_compile\"") >&5
7007   (eval $ac_compile) 2>&5
7008   ac_status=$?
7009   echo "$as_me:7009: \$? = $ac_status" >&5
7010   (exit $ac_status); } &&
7011          { ac_try='test -s conftest.$ac_objext'
7012   { (eval echo "$as_me:7012: \"$ac_try\"") >&5
7013   (eval $ac_try) 2>&5
7014   ac_status=$?
7015   echo "$as_me:7015: \$? = $ac_status" >&5
7016   (exit $ac_status); }; }; then
7017   cf_cv_gnu_source=no
7018 else
7019   echo "$as_me: failed program was:" >&5
7020 cat conftest.$ac_ext >&5
7021 cf_cv_gnu_source=yes
7022 fi
7023 rm -f conftest.$ac_objext conftest.$ac_ext
7024         CPPFLAGS="$cf_save"
7025
7026 fi
7027 rm -f conftest.$ac_objext conftest.$ac_ext
7028
7029 fi
7030 echo "$as_me:7030: result: $cf_cv_gnu_source" >&5
7031 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7032 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7033
7034         ;;
7035 mirbsd*) #(vi
7036         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7037         cf_XOPEN_SOURCE=
7038
7039 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7040
7041 cf_save_CFLAGS="$CFLAGS"
7042 cf_save_CPPFLAGS="$CPPFLAGS"
7043
7044 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7045         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7046                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7047
7048 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7049         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7050                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7051
7052 echo "$as_me:7052: checking if we should define _POSIX_C_SOURCE" >&5
7053 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7054 if test "${cf_cv_posix_c_source+set}" = set; then
7055   echo $ECHO_N "(cached) $ECHO_C" >&6
7056 else
7057
7058 echo "${as_me:-configure}:7058: testing if the symbol is already defined go no further ..." 1>&5
7059
7060         cat >conftest.$ac_ext <<_ACEOF
7061 #line 7061 "configure"
7062 #include "confdefs.h"
7063 #include <sys/types.h>
7064 int
7065 main ()
7066 {
7067
7068 #ifndef _POSIX_C_SOURCE
7069 make an error
7070 #endif
7071   ;
7072   return 0;
7073 }
7074 _ACEOF
7075 rm -f conftest.$ac_objext
7076 if { (eval echo "$as_me:7076: \"$ac_compile\"") >&5
7077   (eval $ac_compile) 2>&5
7078   ac_status=$?
7079   echo "$as_me:7079: \$? = $ac_status" >&5
7080   (exit $ac_status); } &&
7081          { ac_try='test -s conftest.$ac_objext'
7082   { (eval echo "$as_me:7082: \"$ac_try\"") >&5
7083   (eval $ac_try) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit $ac_status); }; }; then
7087   cf_cv_posix_c_source=no
7088 else
7089   echo "$as_me: failed program was:" >&5
7090 cat conftest.$ac_ext >&5
7091 cf_want_posix_source=no
7092          case .$cf_POSIX_C_SOURCE in #(vi
7093          .[12]??*) #(vi
7094                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7095                 ;;
7096          .2) #(vi
7097                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7098                 cf_want_posix_source=yes
7099                 ;;
7100          .*)
7101                 cf_want_posix_source=yes
7102                 ;;
7103          esac
7104          if test "$cf_want_posix_source" = yes ; then
7105                 cat >conftest.$ac_ext <<_ACEOF
7106 #line 7106 "configure"
7107 #include "confdefs.h"
7108 #include <sys/types.h>
7109 int
7110 main ()
7111 {
7112
7113 #ifdef _POSIX_SOURCE
7114 make an error
7115 #endif
7116   ;
7117   return 0;
7118 }
7119 _ACEOF
7120 rm -f conftest.$ac_objext
7121 if { (eval echo "$as_me:7121: \"$ac_compile\"") >&5
7122   (eval $ac_compile) 2>&5
7123   ac_status=$?
7124   echo "$as_me:7124: \$? = $ac_status" >&5
7125   (exit $ac_status); } &&
7126          { ac_try='test -s conftest.$ac_objext'
7127   { (eval echo "$as_me:7127: \"$ac_try\"") >&5
7128   (eval $ac_try) 2>&5
7129   ac_status=$?
7130   echo "$as_me:7130: \$? = $ac_status" >&5
7131   (exit $ac_status); }; }; then
7132   :
7133 else
7134   echo "$as_me: failed program was:" >&5
7135 cat conftest.$ac_ext >&5
7136 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7137 fi
7138 rm -f conftest.$ac_objext conftest.$ac_ext
7139          fi
7140
7141 echo "${as_me:-configure}:7141: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7142
7143          CFLAGS="$cf_trim_CFLAGS"
7144          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7145
7146 echo "${as_me:-configure}:7146: testing if the second compile does not leave our definition intact error ..." 1>&5
7147
7148          cat >conftest.$ac_ext <<_ACEOF
7149 #line 7149 "configure"
7150 #include "confdefs.h"
7151 #include <sys/types.h>
7152 int
7153 main ()
7154 {
7155
7156 #ifndef _POSIX_C_SOURCE
7157 make an error
7158 #endif
7159   ;
7160   return 0;
7161 }
7162 _ACEOF
7163 rm -f conftest.$ac_objext
7164 if { (eval echo "$as_me:7164: \"$ac_compile\"") >&5
7165   (eval $ac_compile) 2>&5
7166   ac_status=$?
7167   echo "$as_me:7167: \$? = $ac_status" >&5
7168   (exit $ac_status); } &&
7169          { ac_try='test -s conftest.$ac_objext'
7170   { (eval echo "$as_me:7170: \"$ac_try\"") >&5
7171   (eval $ac_try) 2>&5
7172   ac_status=$?
7173   echo "$as_me:7173: \$? = $ac_status" >&5
7174   (exit $ac_status); }; }; then
7175   :
7176 else
7177   echo "$as_me: failed program was:" >&5
7178 cat conftest.$ac_ext >&5
7179 cf_cv_posix_c_source=no
7180 fi
7181 rm -f conftest.$ac_objext conftest.$ac_ext
7182          CFLAGS="$cf_save_CFLAGS"
7183          CPPFLAGS="$cf_save_CPPFLAGS"
7184
7185 fi
7186 rm -f conftest.$ac_objext conftest.$ac_ext
7187
7188 fi
7189 echo "$as_me:7189: result: $cf_cv_posix_c_source" >&5
7190 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7191
7192 if test "$cf_cv_posix_c_source" != no ; then
7193         CFLAGS="$cf_trim_CFLAGS"
7194         CPPFLAGS="$cf_trim_CPPFLAGS"
7195
7196 cf_fix_cppflags=no
7197 cf_new_cflags=
7198 cf_new_cppflags=
7199 cf_new_extra_cppflags=
7200
7201 for cf_add_cflags in $cf_cv_posix_c_source
7202 do
7203 case $cf_fix_cppflags in
7204 no)
7205         case $cf_add_cflags in #(vi
7206         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7207                 case $cf_add_cflags in
7208                 -D*)
7209                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7210
7211                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7212                                 && test -z "${cf_tst_cflags}" \
7213                                 && cf_fix_cppflags=yes
7214
7215                         if test $cf_fix_cppflags = yes ; then
7216                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7217                                 continue
7218                         elif test "${cf_tst_cflags}" = "\"'" ; then
7219                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7220                                 continue
7221                         fi
7222                         ;;
7223                 esac
7224                 case "$CPPFLAGS" in
7225                 *$cf_add_cflags) #(vi
7226                         ;;
7227                 *) #(vi
7228                         case $cf_add_cflags in #(vi
7229                         -D*)
7230                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7231
7232 CPPFLAGS=`echo "$CPPFLAGS" | \
7233         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7234                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7235
7236                                 ;;
7237                         esac
7238                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7239                         ;;
7240                 esac
7241                 ;;
7242         *)
7243                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7244                 ;;
7245         esac
7246         ;;
7247 yes)
7248         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7249
7250         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7251
7252         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7253                 && test -z "${cf_tst_cflags}" \
7254                 && cf_fix_cppflags=no
7255         ;;
7256 esac
7257 done
7258
7259 if test -n "$cf_new_cflags" ; then
7260
7261         CFLAGS="$CFLAGS $cf_new_cflags"
7262 fi
7263
7264 if test -n "$cf_new_cppflags" ; then
7265
7266         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7267 fi
7268
7269 if test -n "$cf_new_extra_cppflags" ; then
7270
7271         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7272 fi
7273
7274 fi
7275
7276         ;;
7277 netbsd*) #(vi
7278         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7279         ;;
7280 openbsd[4-9]*) #(vi
7281         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7282         cf_xopen_source="-D_BSD_SOURCE"
7283         cf_XOPEN_SOURCE=600
7284         ;;
7285 openbsd*) #(vi
7286         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7287         ;;
7288 osf[45]*) #(vi
7289         cf_xopen_source="-D_OSF_SOURCE"
7290         ;;
7291 nto-qnx*) #(vi
7292         cf_xopen_source="-D_QNX_SOURCE"
7293         ;;
7294 sco*) #(vi
7295         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7296         ;;
7297 solaris2.*) #(vi
7298         cf_xopen_source="-D__EXTENSIONS__"
7299         ;;
7300 *)
7301
7302 echo "$as_me:7302: checking if we should define _XOPEN_SOURCE" >&5
7303 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7304 if test "${cf_cv_xopen_source+set}" = set; then
7305   echo $ECHO_N "(cached) $ECHO_C" >&6
7306 else
7307
7308         cat >conftest.$ac_ext <<_ACEOF
7309 #line 7309 "configure"
7310 #include "confdefs.h"
7311
7312 #include <stdlib.h>
7313 #include <string.h>
7314 #include <sys/types.h>
7315
7316 int
7317 main ()
7318 {
7319
7320 #ifndef _XOPEN_SOURCE
7321 make an error
7322 #endif
7323   ;
7324   return 0;
7325 }
7326 _ACEOF
7327 rm -f conftest.$ac_objext
7328 if { (eval echo "$as_me:7328: \"$ac_compile\"") >&5
7329   (eval $ac_compile) 2>&5
7330   ac_status=$?
7331   echo "$as_me:7331: \$? = $ac_status" >&5
7332   (exit $ac_status); } &&
7333          { ac_try='test -s conftest.$ac_objext'
7334   { (eval echo "$as_me:7334: \"$ac_try\"") >&5
7335   (eval $ac_try) 2>&5
7336   ac_status=$?
7337   echo "$as_me:7337: \$? = $ac_status" >&5
7338   (exit $ac_status); }; }; then
7339   cf_cv_xopen_source=no
7340 else
7341   echo "$as_me: failed program was:" >&5
7342 cat conftest.$ac_ext >&5
7343 cf_save="$CPPFLAGS"
7344          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7345          cat >conftest.$ac_ext <<_ACEOF
7346 #line 7346 "configure"
7347 #include "confdefs.h"
7348
7349 #include <stdlib.h>
7350 #include <string.h>
7351 #include <sys/types.h>
7352
7353 int
7354 main ()
7355 {
7356
7357 #ifdef _XOPEN_SOURCE
7358 make an error
7359 #endif
7360   ;
7361   return 0;
7362 }
7363 _ACEOF
7364 rm -f conftest.$ac_objext
7365 if { (eval echo "$as_me:7365: \"$ac_compile\"") >&5
7366   (eval $ac_compile) 2>&5
7367   ac_status=$?
7368   echo "$as_me:7368: \$? = $ac_status" >&5
7369   (exit $ac_status); } &&
7370          { ac_try='test -s conftest.$ac_objext'
7371   { (eval echo "$as_me:7371: \"$ac_try\"") >&5
7372   (eval $ac_try) 2>&5
7373   ac_status=$?
7374   echo "$as_me:7374: \$? = $ac_status" >&5
7375   (exit $ac_status); }; }; then
7376   cf_cv_xopen_source=no
7377 else
7378   echo "$as_me: failed program was:" >&5
7379 cat conftest.$ac_ext >&5
7380 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7381 fi
7382 rm -f conftest.$ac_objext conftest.$ac_ext
7383         CPPFLAGS="$cf_save"
7384
7385 fi
7386 rm -f conftest.$ac_objext conftest.$ac_ext
7387
7388 fi
7389 echo "$as_me:7389: result: $cf_cv_xopen_source" >&5
7390 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7391
7392 if test "$cf_cv_xopen_source" != no ; then
7393
7394 CFLAGS=`echo "$CFLAGS" | \
7395         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7396                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7397
7398 CPPFLAGS=`echo "$CPPFLAGS" | \
7399         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7400                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7401
7402         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7403
7404 cf_fix_cppflags=no
7405 cf_new_cflags=
7406 cf_new_cppflags=
7407 cf_new_extra_cppflags=
7408
7409 for cf_add_cflags in $cf_temp_xopen_source
7410 do
7411 case $cf_fix_cppflags in
7412 no)
7413         case $cf_add_cflags in #(vi
7414         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7415                 case $cf_add_cflags in
7416                 -D*)
7417                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7418
7419                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7420                                 && test -z "${cf_tst_cflags}" \
7421                                 && cf_fix_cppflags=yes
7422
7423                         if test $cf_fix_cppflags = yes ; then
7424                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7425                                 continue
7426                         elif test "${cf_tst_cflags}" = "\"'" ; then
7427                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7428                                 continue
7429                         fi
7430                         ;;
7431                 esac
7432                 case "$CPPFLAGS" in
7433                 *$cf_add_cflags) #(vi
7434                         ;;
7435                 *) #(vi
7436                         case $cf_add_cflags in #(vi
7437                         -D*)
7438                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7439
7440 CPPFLAGS=`echo "$CPPFLAGS" | \
7441         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7442                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7443
7444                                 ;;
7445                         esac
7446                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7447                         ;;
7448                 esac
7449                 ;;
7450         *)
7451                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7452                 ;;
7453         esac
7454         ;;
7455 yes)
7456         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7457
7458         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7459
7460         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7461                 && test -z "${cf_tst_cflags}" \
7462                 && cf_fix_cppflags=no
7463         ;;
7464 esac
7465 done
7466
7467 if test -n "$cf_new_cflags" ; then
7468
7469         CFLAGS="$CFLAGS $cf_new_cflags"
7470 fi
7471
7472 if test -n "$cf_new_cppflags" ; then
7473
7474         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7475 fi
7476
7477 if test -n "$cf_new_extra_cppflags" ; then
7478
7479         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7480 fi
7481
7482 fi
7483
7484 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7485
7486 cf_save_CFLAGS="$CFLAGS"
7487 cf_save_CPPFLAGS="$CPPFLAGS"
7488
7489 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7490         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7491                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7492
7493 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7494         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7495                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7496
7497 echo "$as_me:7497: checking if we should define _POSIX_C_SOURCE" >&5
7498 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7499 if test "${cf_cv_posix_c_source+set}" = set; then
7500   echo $ECHO_N "(cached) $ECHO_C" >&6
7501 else
7502
7503 echo "${as_me:-configure}:7503: testing if the symbol is already defined go no further ..." 1>&5
7504
7505         cat >conftest.$ac_ext <<_ACEOF
7506 #line 7506 "configure"
7507 #include "confdefs.h"
7508 #include <sys/types.h>
7509 int
7510 main ()
7511 {
7512
7513 #ifndef _POSIX_C_SOURCE
7514 make an error
7515 #endif
7516   ;
7517   return 0;
7518 }
7519 _ACEOF
7520 rm -f conftest.$ac_objext
7521 if { (eval echo "$as_me:7521: \"$ac_compile\"") >&5
7522   (eval $ac_compile) 2>&5
7523   ac_status=$?
7524   echo "$as_me:7524: \$? = $ac_status" >&5
7525   (exit $ac_status); } &&
7526          { ac_try='test -s conftest.$ac_objext'
7527   { (eval echo "$as_me:7527: \"$ac_try\"") >&5
7528   (eval $ac_try) 2>&5
7529   ac_status=$?
7530   echo "$as_me:7530: \$? = $ac_status" >&5
7531   (exit $ac_status); }; }; then
7532   cf_cv_posix_c_source=no
7533 else
7534   echo "$as_me: failed program was:" >&5
7535 cat conftest.$ac_ext >&5
7536 cf_want_posix_source=no
7537          case .$cf_POSIX_C_SOURCE in #(vi
7538          .[12]??*) #(vi
7539                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7540                 ;;
7541          .2) #(vi
7542                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7543                 cf_want_posix_source=yes
7544                 ;;
7545          .*)
7546                 cf_want_posix_source=yes
7547                 ;;
7548          esac
7549          if test "$cf_want_posix_source" = yes ; then
7550                 cat >conftest.$ac_ext <<_ACEOF
7551 #line 7551 "configure"
7552 #include "confdefs.h"
7553 #include <sys/types.h>
7554 int
7555 main ()
7556 {
7557
7558 #ifdef _POSIX_SOURCE
7559 make an error
7560 #endif
7561   ;
7562   return 0;
7563 }
7564 _ACEOF
7565 rm -f conftest.$ac_objext
7566 if { (eval echo "$as_me:7566: \"$ac_compile\"") >&5
7567   (eval $ac_compile) 2>&5
7568   ac_status=$?
7569   echo "$as_me:7569: \$? = $ac_status" >&5
7570   (exit $ac_status); } &&
7571          { ac_try='test -s conftest.$ac_objext'
7572   { (eval echo "$as_me:7572: \"$ac_try\"") >&5
7573   (eval $ac_try) 2>&5
7574   ac_status=$?
7575   echo "$as_me:7575: \$? = $ac_status" >&5
7576   (exit $ac_status); }; }; then
7577   :
7578 else
7579   echo "$as_me: failed program was:" >&5
7580 cat conftest.$ac_ext >&5
7581 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7582 fi
7583 rm -f conftest.$ac_objext conftest.$ac_ext
7584          fi
7585
7586 echo "${as_me:-configure}:7586: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7587
7588          CFLAGS="$cf_trim_CFLAGS"
7589          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7590
7591 echo "${as_me:-configure}:7591: testing if the second compile does not leave our definition intact error ..." 1>&5
7592
7593          cat >conftest.$ac_ext <<_ACEOF
7594 #line 7594 "configure"
7595 #include "confdefs.h"
7596 #include <sys/types.h>
7597 int
7598 main ()
7599 {
7600
7601 #ifndef _POSIX_C_SOURCE
7602 make an error
7603 #endif
7604   ;
7605   return 0;
7606 }
7607 _ACEOF
7608 rm -f conftest.$ac_objext
7609 if { (eval echo "$as_me:7609: \"$ac_compile\"") >&5
7610   (eval $ac_compile) 2>&5
7611   ac_status=$?
7612   echo "$as_me:7612: \$? = $ac_status" >&5
7613   (exit $ac_status); } &&
7614          { ac_try='test -s conftest.$ac_objext'
7615   { (eval echo "$as_me:7615: \"$ac_try\"") >&5
7616   (eval $ac_try) 2>&5
7617   ac_status=$?
7618   echo "$as_me:7618: \$? = $ac_status" >&5
7619   (exit $ac_status); }; }; then
7620   :
7621 else
7622   echo "$as_me: failed program was:" >&5
7623 cat conftest.$ac_ext >&5
7624 cf_cv_posix_c_source=no
7625 fi
7626 rm -f conftest.$ac_objext conftest.$ac_ext
7627          CFLAGS="$cf_save_CFLAGS"
7628          CPPFLAGS="$cf_save_CPPFLAGS"
7629
7630 fi
7631 rm -f conftest.$ac_objext conftest.$ac_ext
7632
7633 fi
7634 echo "$as_me:7634: result: $cf_cv_posix_c_source" >&5
7635 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7636
7637 if test "$cf_cv_posix_c_source" != no ; then
7638         CFLAGS="$cf_trim_CFLAGS"
7639         CPPFLAGS="$cf_trim_CPPFLAGS"
7640
7641 cf_fix_cppflags=no
7642 cf_new_cflags=
7643 cf_new_cppflags=
7644 cf_new_extra_cppflags=
7645
7646 for cf_add_cflags in $cf_cv_posix_c_source
7647 do
7648 case $cf_fix_cppflags in
7649 no)
7650         case $cf_add_cflags in #(vi
7651         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7652                 case $cf_add_cflags in
7653                 -D*)
7654                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7655
7656                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7657                                 && test -z "${cf_tst_cflags}" \
7658                                 && cf_fix_cppflags=yes
7659
7660                         if test $cf_fix_cppflags = yes ; then
7661                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7662                                 continue
7663                         elif test "${cf_tst_cflags}" = "\"'" ; then
7664                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7665                                 continue
7666                         fi
7667                         ;;
7668                 esac
7669                 case "$CPPFLAGS" in
7670                 *$cf_add_cflags) #(vi
7671                         ;;
7672                 *) #(vi
7673                         case $cf_add_cflags in #(vi
7674                         -D*)
7675                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7676
7677 CPPFLAGS=`echo "$CPPFLAGS" | \
7678         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7679                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7680
7681                                 ;;
7682                         esac
7683                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7684                         ;;
7685                 esac
7686                 ;;
7687         *)
7688                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7689                 ;;
7690         esac
7691         ;;
7692 yes)
7693         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7694
7695         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7696
7697         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7698                 && test -z "${cf_tst_cflags}" \
7699                 && cf_fix_cppflags=no
7700         ;;
7701 esac
7702 done
7703
7704 if test -n "$cf_new_cflags" ; then
7705
7706         CFLAGS="$CFLAGS $cf_new_cflags"
7707 fi
7708
7709 if test -n "$cf_new_cppflags" ; then
7710
7711         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7712 fi
7713
7714 if test -n "$cf_new_extra_cppflags" ; then
7715
7716         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7717 fi
7718
7719 fi
7720
7721         ;;
7722 esac
7723
7724 if test -n "$cf_xopen_source" ; then
7725
7726 cf_fix_cppflags=no
7727 cf_new_cflags=
7728 cf_new_cppflags=
7729 cf_new_extra_cppflags=
7730
7731 for cf_add_cflags in $cf_xopen_source
7732 do
7733 case $cf_fix_cppflags in
7734 no)
7735         case $cf_add_cflags in #(vi
7736         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7737                 case $cf_add_cflags in
7738                 -D*)
7739                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7740
7741                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7742                                 && test -z "${cf_tst_cflags}" \
7743                                 && cf_fix_cppflags=yes
7744
7745                         if test $cf_fix_cppflags = yes ; then
7746                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7747                                 continue
7748                         elif test "${cf_tst_cflags}" = "\"'" ; then
7749                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7750                                 continue
7751                         fi
7752                         ;;
7753                 esac
7754                 case "$CPPFLAGS" in
7755                 *$cf_add_cflags) #(vi
7756                         ;;
7757                 *) #(vi
7758                         case $cf_add_cflags in #(vi
7759                         -D*)
7760                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7761
7762 CPPFLAGS=`echo "$CPPFLAGS" | \
7763         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7764                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7765
7766                                 ;;
7767                         esac
7768                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7769                         ;;
7770                 esac
7771                 ;;
7772         *)
7773                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7774                 ;;
7775         esac
7776         ;;
7777 yes)
7778         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7779
7780         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7781
7782         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7783                 && test -z "${cf_tst_cflags}" \
7784                 && cf_fix_cppflags=no
7785         ;;
7786 esac
7787 done
7788
7789 if test -n "$cf_new_cflags" ; then
7790
7791         CFLAGS="$CFLAGS $cf_new_cflags"
7792 fi
7793
7794 if test -n "$cf_new_cppflags" ; then
7795
7796         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7797 fi
7798
7799 if test -n "$cf_new_extra_cppflags" ; then
7800
7801         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7802 fi
7803
7804 fi
7805
7806 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7807         echo "$as_me:7807: checking if _XOPEN_SOURCE really is set" >&5
7808 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7809         cat >conftest.$ac_ext <<_ACEOF
7810 #line 7810 "configure"
7811 #include "confdefs.h"
7812 #include <stdlib.h>
7813 int
7814 main ()
7815 {
7816
7817 #ifndef _XOPEN_SOURCE
7818 make an error
7819 #endif
7820   ;
7821   return 0;
7822 }
7823 _ACEOF
7824 rm -f conftest.$ac_objext
7825 if { (eval echo "$as_me:7825: \"$ac_compile\"") >&5
7826   (eval $ac_compile) 2>&5
7827   ac_status=$?
7828   echo "$as_me:7828: \$? = $ac_status" >&5
7829   (exit $ac_status); } &&
7830          { ac_try='test -s conftest.$ac_objext'
7831   { (eval echo "$as_me:7831: \"$ac_try\"") >&5
7832   (eval $ac_try) 2>&5
7833   ac_status=$?
7834   echo "$as_me:7834: \$? = $ac_status" >&5
7835   (exit $ac_status); }; }; then
7836   cf_XOPEN_SOURCE_set=yes
7837 else
7838   echo "$as_me: failed program was:" >&5
7839 cat conftest.$ac_ext >&5
7840 cf_XOPEN_SOURCE_set=no
7841 fi
7842 rm -f conftest.$ac_objext conftest.$ac_ext
7843         echo "$as_me:7843: result: $cf_XOPEN_SOURCE_set" >&5
7844 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7845         if test $cf_XOPEN_SOURCE_set = yes
7846         then
7847                 cat >conftest.$ac_ext <<_ACEOF
7848 #line 7848 "configure"
7849 #include "confdefs.h"
7850 #include <stdlib.h>
7851 int
7852 main ()
7853 {
7854
7855 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7856 make an error
7857 #endif
7858   ;
7859   return 0;
7860 }
7861 _ACEOF
7862 rm -f conftest.$ac_objext
7863 if { (eval echo "$as_me:7863: \"$ac_compile\"") >&5
7864   (eval $ac_compile) 2>&5
7865   ac_status=$?
7866   echo "$as_me:7866: \$? = $ac_status" >&5
7867   (exit $ac_status); } &&
7868          { ac_try='test -s conftest.$ac_objext'
7869   { (eval echo "$as_me:7869: \"$ac_try\"") >&5
7870   (eval $ac_try) 2>&5
7871   ac_status=$?
7872   echo "$as_me:7872: \$? = $ac_status" >&5
7873   (exit $ac_status); }; }; then
7874   cf_XOPEN_SOURCE_set_ok=yes
7875 else
7876   echo "$as_me: failed program was:" >&5
7877 cat conftest.$ac_ext >&5
7878 cf_XOPEN_SOURCE_set_ok=no
7879 fi
7880 rm -f conftest.$ac_objext conftest.$ac_ext
7881                 if test $cf_XOPEN_SOURCE_set_ok = no
7882                 then
7883                         { echo "$as_me:7883: WARNING: _XOPEN_SOURCE is lower than requested" >&5
7884 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
7885                 fi
7886         else
7887
7888 echo "$as_me:7888: checking if we should define _XOPEN_SOURCE" >&5
7889 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7890 if test "${cf_cv_xopen_source+set}" = set; then
7891   echo $ECHO_N "(cached) $ECHO_C" >&6
7892 else
7893
7894         cat >conftest.$ac_ext <<_ACEOF
7895 #line 7895 "configure"
7896 #include "confdefs.h"
7897
7898 #include <stdlib.h>
7899 #include <string.h>
7900 #include <sys/types.h>
7901
7902 int
7903 main ()
7904 {
7905
7906 #ifndef _XOPEN_SOURCE
7907 make an error
7908 #endif
7909   ;
7910   return 0;
7911 }
7912 _ACEOF
7913 rm -f conftest.$ac_objext
7914 if { (eval echo "$as_me:7914: \"$ac_compile\"") >&5
7915   (eval $ac_compile) 2>&5
7916   ac_status=$?
7917   echo "$as_me:7917: \$? = $ac_status" >&5
7918   (exit $ac_status); } &&
7919          { ac_try='test -s conftest.$ac_objext'
7920   { (eval echo "$as_me:7920: \"$ac_try\"") >&5
7921   (eval $ac_try) 2>&5
7922   ac_status=$?
7923   echo "$as_me:7923: \$? = $ac_status" >&5
7924   (exit $ac_status); }; }; then
7925   cf_cv_xopen_source=no
7926 else
7927   echo "$as_me: failed program was:" >&5
7928 cat conftest.$ac_ext >&5
7929 cf_save="$CPPFLAGS"
7930          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7931          cat >conftest.$ac_ext <<_ACEOF
7932 #line 7932 "configure"
7933 #include "confdefs.h"
7934
7935 #include <stdlib.h>
7936 #include <string.h>
7937 #include <sys/types.h>
7938
7939 int
7940 main ()
7941 {
7942
7943 #ifdef _XOPEN_SOURCE
7944 make an error
7945 #endif
7946   ;
7947   return 0;
7948 }
7949 _ACEOF
7950 rm -f conftest.$ac_objext
7951 if { (eval echo "$as_me:7951: \"$ac_compile\"") >&5
7952   (eval $ac_compile) 2>&5
7953   ac_status=$?
7954   echo "$as_me:7954: \$? = $ac_status" >&5
7955   (exit $ac_status); } &&
7956          { ac_try='test -s conftest.$ac_objext'
7957   { (eval echo "$as_me:7957: \"$ac_try\"") >&5
7958   (eval $ac_try) 2>&5
7959   ac_status=$?
7960   echo "$as_me:7960: \$? = $ac_status" >&5
7961   (exit $ac_status); }; }; then
7962   cf_cv_xopen_source=no
7963 else
7964   echo "$as_me: failed program was:" >&5
7965 cat conftest.$ac_ext >&5
7966 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7967 fi
7968 rm -f conftest.$ac_objext conftest.$ac_ext
7969         CPPFLAGS="$cf_save"
7970
7971 fi
7972 rm -f conftest.$ac_objext conftest.$ac_ext
7973
7974 fi
7975 echo "$as_me:7975: result: $cf_cv_xopen_source" >&5
7976 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7977
7978 if test "$cf_cv_xopen_source" != no ; then
7979
7980 CFLAGS=`echo "$CFLAGS" | \
7981         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7982                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7983
7984 CPPFLAGS=`echo "$CPPFLAGS" | \
7985         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7986                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7987
7988         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7989
7990 cf_fix_cppflags=no
7991 cf_new_cflags=
7992 cf_new_cppflags=
7993 cf_new_extra_cppflags=
7994
7995 for cf_add_cflags in $cf_temp_xopen_source
7996 do
7997 case $cf_fix_cppflags in
7998 no)
7999         case $cf_add_cflags in #(vi
8000         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8001                 case $cf_add_cflags in
8002                 -D*)
8003                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8004
8005                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8006                                 && test -z "${cf_tst_cflags}" \
8007                                 && cf_fix_cppflags=yes
8008
8009                         if test $cf_fix_cppflags = yes ; then
8010                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8011                                 continue
8012                         elif test "${cf_tst_cflags}" = "\"'" ; then
8013                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8014                                 continue
8015                         fi
8016                         ;;
8017                 esac
8018                 case "$CPPFLAGS" in
8019                 *$cf_add_cflags) #(vi
8020                         ;;
8021                 *) #(vi
8022                         case $cf_add_cflags in #(vi
8023                         -D*)
8024                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8025
8026 CPPFLAGS=`echo "$CPPFLAGS" | \
8027         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8028                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8029
8030                                 ;;
8031                         esac
8032                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8033                         ;;
8034                 esac
8035                 ;;
8036         *)
8037                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8038                 ;;
8039         esac
8040         ;;
8041 yes)
8042         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8043
8044         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8045
8046         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8047                 && test -z "${cf_tst_cflags}" \
8048                 && cf_fix_cppflags=no
8049         ;;
8050 esac
8051 done
8052
8053 if test -n "$cf_new_cflags" ; then
8054
8055         CFLAGS="$CFLAGS $cf_new_cflags"
8056 fi
8057
8058 if test -n "$cf_new_cppflags" ; then
8059
8060         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8061 fi
8062
8063 if test -n "$cf_new_extra_cppflags" ; then
8064
8065         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8066 fi
8067
8068 fi
8069
8070         fi
8071 fi
8072
8073 # Work around breakage on OS X
8074
8075 echo "$as_me:8075: checking if SIGWINCH is defined" >&5
8076 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8077 if test "${cf_cv_define_sigwinch+set}" = set; then
8078   echo $ECHO_N "(cached) $ECHO_C" >&6
8079 else
8080
8081         cat >conftest.$ac_ext <<_ACEOF
8082 #line 8082 "configure"
8083 #include "confdefs.h"
8084
8085 #include <sys/types.h>
8086 #include <sys/signal.h>
8087
8088 int
8089 main ()
8090 {
8091 int x = SIGWINCH
8092   ;
8093   return 0;
8094 }
8095 _ACEOF
8096 rm -f conftest.$ac_objext
8097 if { (eval echo "$as_me:8097: \"$ac_compile\"") >&5
8098   (eval $ac_compile) 2>&5
8099   ac_status=$?
8100   echo "$as_me:8100: \$? = $ac_status" >&5
8101   (exit $ac_status); } &&
8102          { ac_try='test -s conftest.$ac_objext'
8103   { (eval echo "$as_me:8103: \"$ac_try\"") >&5
8104   (eval $ac_try) 2>&5
8105   ac_status=$?
8106   echo "$as_me:8106: \$? = $ac_status" >&5
8107   (exit $ac_status); }; }; then
8108   cf_cv_define_sigwinch=yes
8109 else
8110   echo "$as_me: failed program was:" >&5
8111 cat conftest.$ac_ext >&5
8112 cat >conftest.$ac_ext <<_ACEOF
8113 #line 8113 "configure"
8114 #include "confdefs.h"
8115
8116 #undef _XOPEN_SOURCE
8117 #undef _POSIX_SOURCE
8118 #undef _POSIX_C_SOURCE
8119 #include <sys/types.h>
8120 #include <sys/signal.h>
8121
8122 int
8123 main ()
8124 {
8125 int x = SIGWINCH
8126   ;
8127   return 0;
8128 }
8129 _ACEOF
8130 rm -f conftest.$ac_objext
8131 if { (eval echo "$as_me:8131: \"$ac_compile\"") >&5
8132   (eval $ac_compile) 2>&5
8133   ac_status=$?
8134   echo "$as_me:8134: \$? = $ac_status" >&5
8135   (exit $ac_status); } &&
8136          { ac_try='test -s conftest.$ac_objext'
8137   { (eval echo "$as_me:8137: \"$ac_try\"") >&5
8138   (eval $ac_try) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); }; }; then
8142   cf_cv_define_sigwinch=maybe
8143 else
8144   echo "$as_me: failed program was:" >&5
8145 cat conftest.$ac_ext >&5
8146 cf_cv_define_sigwinch=no
8147 fi
8148 rm -f conftest.$ac_objext conftest.$ac_ext
8149
8150 fi
8151 rm -f conftest.$ac_objext conftest.$ac_ext
8152
8153 fi
8154 echo "$as_me:8154: result: $cf_cv_define_sigwinch" >&5
8155 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8156
8157 if test "$cf_cv_define_sigwinch" = maybe ; then
8158 echo "$as_me:8158: checking for actual SIGWINCH definition" >&5
8159 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8160 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8161   echo $ECHO_N "(cached) $ECHO_C" >&6
8162 else
8163
8164 cf_cv_fixup_sigwinch=unknown
8165 cf_sigwinch=32
8166 while test $cf_sigwinch != 1
8167 do
8168         cat >conftest.$ac_ext <<_ACEOF
8169 #line 8169 "configure"
8170 #include "confdefs.h"
8171
8172 #undef _XOPEN_SOURCE
8173 #undef _POSIX_SOURCE
8174 #undef _POSIX_C_SOURCE
8175 #include <sys/types.h>
8176 #include <sys/signal.h>
8177
8178 int
8179 main ()
8180 {
8181
8182 #if SIGWINCH != $cf_sigwinch
8183 make an error
8184 #endif
8185 int x = SIGWINCH
8186   ;
8187   return 0;
8188 }
8189 _ACEOF
8190 rm -f conftest.$ac_objext
8191 if { (eval echo "$as_me:8191: \"$ac_compile\"") >&5
8192   (eval $ac_compile) 2>&5
8193   ac_status=$?
8194   echo "$as_me:8194: \$? = $ac_status" >&5
8195   (exit $ac_status); } &&
8196          { ac_try='test -s conftest.$ac_objext'
8197   { (eval echo "$as_me:8197: \"$ac_try\"") >&5
8198   (eval $ac_try) 2>&5
8199   ac_status=$?
8200   echo "$as_me:8200: \$? = $ac_status" >&5
8201   (exit $ac_status); }; }; then
8202   cf_cv_fixup_sigwinch=$cf_sigwinch
8203          break
8204 else
8205   echo "$as_me: failed program was:" >&5
8206 cat conftest.$ac_ext >&5
8207 fi
8208 rm -f conftest.$ac_objext conftest.$ac_ext
8209
8210 cf_sigwinch=`expr $cf_sigwinch - 1`
8211 done
8212
8213 fi
8214 echo "$as_me:8214: result: $cf_cv_fixup_sigwinch" >&5
8215 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8216
8217         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8218                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8219         fi
8220 fi
8221
8222 # Checks for CODESET support.
8223
8224   echo "$as_me:8224: checking for nl_langinfo and CODESET" >&5
8225 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8226 if test "${am_cv_langinfo_codeset+set}" = set; then
8227   echo $ECHO_N "(cached) $ECHO_C" >&6
8228 else
8229   cat >conftest.$ac_ext <<_ACEOF
8230 #line 8230 "configure"
8231 #include "confdefs.h"
8232 #include <langinfo.h>
8233 int
8234 main ()
8235 {
8236 char* cs = nl_langinfo(CODESET);
8237   ;
8238   return 0;
8239 }
8240 _ACEOF
8241 rm -f conftest.$ac_objext conftest$ac_exeext
8242 if { (eval echo "$as_me:8242: \"$ac_link\"") >&5
8243   (eval $ac_link) 2>&5
8244   ac_status=$?
8245   echo "$as_me:8245: \$? = $ac_status" >&5
8246   (exit $ac_status); } &&
8247          { ac_try='test -s conftest$ac_exeext'
8248   { (eval echo "$as_me:8248: \"$ac_try\"") >&5
8249   (eval $ac_try) 2>&5
8250   ac_status=$?
8251   echo "$as_me:8251: \$? = $ac_status" >&5
8252   (exit $ac_status); }; }; then
8253   am_cv_langinfo_codeset=yes
8254 else
8255   echo "$as_me: failed program was:" >&5
8256 cat conftest.$ac_ext >&5
8257 am_cv_langinfo_codeset=no
8258 fi
8259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8260
8261 fi
8262 echo "$as_me:8262: result: $am_cv_langinfo_codeset" >&5
8263 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8264   if test $am_cv_langinfo_codeset = yes; then
8265
8266 cat >>confdefs.h <<\EOF
8267 #define HAVE_LANGINFO_CODESET 1
8268 EOF
8269
8270   fi
8271
8272 # use these variables to work around a defect in gcc's fixincludes.
8273 NCURSES_OK_WCHAR_T=
8274 NCURSES_OK_WINT_T=
8275
8276 echo "$as_me:8276: checking if you want wide-character code" >&5
8277 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8278
8279 # Check whether --enable-widec or --disable-widec was given.
8280 if test "${enable_widec+set}" = set; then
8281   enableval="$enable_widec"
8282   with_widec=$enableval
8283 else
8284   with_widec=no
8285 fi;
8286 echo "$as_me:8286: result: $with_widec" >&5
8287 echo "${ECHO_T}$with_widec" >&6
8288 if test "x$with_widec" = xyes ; then
8289         LIB_SUFFIX="w${LIB_SUFFIX}"
8290
8291 cat >>confdefs.h <<\EOF
8292 #define USE_WIDEC_SUPPORT 1
8293 EOF
8294
8295 cat >>confdefs.h <<\EOF
8296 #define NCURSES_WIDECHAR 1
8297 EOF
8298
8299 echo "$as_me:8299: checking if wchar.h can be used as is" >&5
8300 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8301 if test "${cf_cv_wchar_h_okay+set}" = set; then
8302   echo $ECHO_N "(cached) $ECHO_C" >&6
8303 else
8304
8305 cat >conftest.$ac_ext <<_ACEOF
8306 #line 8306 "configure"
8307 #include "confdefs.h"
8308
8309 #include <stdlib.h>
8310 #include <wchar.h>
8311
8312 int
8313 main ()
8314 {
8315
8316         wint_t foo = 0;
8317         int bar = iswpunct(foo)
8318   ;
8319   return 0;
8320 }
8321 _ACEOF
8322 rm -f conftest.$ac_objext
8323 if { (eval echo "$as_me:8323: \"$ac_compile\"") >&5
8324   (eval $ac_compile) 2>&5
8325   ac_status=$?
8326   echo "$as_me:8326: \$? = $ac_status" >&5
8327   (exit $ac_status); } &&
8328          { ac_try='test -s conftest.$ac_objext'
8329   { (eval echo "$as_me:8329: \"$ac_try\"") >&5
8330   (eval $ac_try) 2>&5
8331   ac_status=$?
8332   echo "$as_me:8332: \$? = $ac_status" >&5
8333   (exit $ac_status); }; }; then
8334   cf_cv_wchar_h_okay=yes
8335 else
8336   echo "$as_me: failed program was:" >&5
8337 cat conftest.$ac_ext >&5
8338 cf_cv_wchar_h_okay=no
8339 fi
8340 rm -f conftest.$ac_objext conftest.$ac_ext
8341 fi
8342 echo "$as_me:8342: result: $cf_cv_wchar_h_okay" >&5
8343 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8344
8345 if test $cf_cv_wchar_h_okay = no
8346 then
8347
8348 echo "$as_me:8348: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8349 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8350 cat >conftest.$ac_ext <<_ACEOF
8351 #line 8351 "configure"
8352 #include "confdefs.h"
8353 #include <sys/types.h>
8354
8355 int
8356 main ()
8357 {
8358
8359 #ifndef _XOPEN_SOURCE_EXTENDED
8360 make an error
8361 #endif
8362   ;
8363   return 0;
8364 }
8365 _ACEOF
8366 rm -f conftest.$ac_objext
8367 if { (eval echo "$as_me:8367: \"$ac_compile\"") >&5
8368   (eval $ac_compile) 2>&5
8369   ac_status=$?
8370   echo "$as_me:8370: \$? = $ac_status" >&5
8371   (exit $ac_status); } &&
8372          { ac_try='test -s conftest.$ac_objext'
8373   { (eval echo "$as_me:8373: \"$ac_try\"") >&5
8374   (eval $ac_try) 2>&5
8375   ac_status=$?
8376   echo "$as_me:8376: \$? = $ac_status" >&5
8377   (exit $ac_status); }; }; then
8378   cf_result=no
8379 else
8380   echo "$as_me: failed program was:" >&5
8381 cat conftest.$ac_ext >&5
8382 cf_result=yes
8383 fi
8384 rm -f conftest.$ac_objext conftest.$ac_ext
8385 echo "$as_me:8385: result: $cf_result" >&5
8386 echo "${ECHO_T}$cf_result" >&6
8387
8388 if test "$cf_result" = yes ; then
8389         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8390 elif test "x" != "x" ; then
8391         echo "$as_me:8391: checking checking for compatible value versus " >&5
8392 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8393         cat >conftest.$ac_ext <<_ACEOF
8394 #line 8394 "configure"
8395 #include "confdefs.h"
8396 #include <sys/types.h>
8397
8398 int
8399 main ()
8400 {
8401
8402 #if _XOPEN_SOURCE_EXTENDED- < 0
8403 make an error
8404 #endif
8405   ;
8406   return 0;
8407 }
8408 _ACEOF
8409 rm -f conftest.$ac_objext
8410 if { (eval echo "$as_me:8410: \"$ac_compile\"") >&5
8411   (eval $ac_compile) 2>&5
8412   ac_status=$?
8413   echo "$as_me:8413: \$? = $ac_status" >&5
8414   (exit $ac_status); } &&
8415          { ac_try='test -s conftest.$ac_objext'
8416   { (eval echo "$as_me:8416: \"$ac_try\"") >&5
8417   (eval $ac_try) 2>&5
8418   ac_status=$?
8419   echo "$as_me:8419: \$? = $ac_status" >&5
8420   (exit $ac_status); }; }; then
8421   cf_result=yes
8422 else
8423   echo "$as_me: failed program was:" >&5
8424 cat conftest.$ac_ext >&5
8425 cf_result=no
8426 fi
8427 rm -f conftest.$ac_objext conftest.$ac_ext
8428         echo "$as_me:8428: result: $cf_result" >&5
8429 echo "${ECHO_T}$cf_result" >&6
8430         if test "$cf_result" = no ; then
8431                 # perhaps we can override it - try...
8432                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8433         fi
8434 fi
8435
8436 fi
8437
8438         # with_overwrite=no
8439         NCURSES_CH_T=cchar_t
8440
8441 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8442 do
8443 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8444 echo "$as_me:8444: checking for $ac_func" >&5
8445 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8446 if eval "test \"\${$as_ac_var+set}\" = set"; then
8447   echo $ECHO_N "(cached) $ECHO_C" >&6
8448 else
8449   cat >conftest.$ac_ext <<_ACEOF
8450 #line 8450 "configure"
8451 #include "confdefs.h"
8452 /* System header to define __stub macros and hopefully few prototypes,
8453     which can conflict with char $ac_func (); below.  */
8454 #include <assert.h>
8455 /* Override any gcc2 internal prototype to avoid an error.  */
8456 #ifdef __cplusplus
8457 extern "C"
8458 #endif
8459 /* We use char because int might match the return type of a gcc2
8460    builtin and then its argument prototype would still apply.  */
8461 char $ac_func ();
8462 char (*f) ();
8463
8464 int
8465 main ()
8466 {
8467 /* The GNU C library defines this for functions which it implements
8468     to always fail with ENOSYS.  Some functions are actually named
8469     something starting with __ and the normal name is an alias.  */
8470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8471 choke me
8472 #else
8473 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8474 #endif
8475
8476   ;
8477   return 0;
8478 }
8479 _ACEOF
8480 rm -f conftest.$ac_objext conftest$ac_exeext
8481 if { (eval echo "$as_me:8481: \"$ac_link\"") >&5
8482   (eval $ac_link) 2>&5
8483   ac_status=$?
8484   echo "$as_me:8484: \$? = $ac_status" >&5
8485   (exit $ac_status); } &&
8486          { ac_try='test -s conftest$ac_exeext'
8487   { (eval echo "$as_me:8487: \"$ac_try\"") >&5
8488   (eval $ac_try) 2>&5
8489   ac_status=$?
8490   echo "$as_me:8490: \$? = $ac_status" >&5
8491   (exit $ac_status); }; }; then
8492   eval "$as_ac_var=yes"
8493 else
8494   echo "$as_me: failed program was:" >&5
8495 cat conftest.$ac_ext >&5
8496 eval "$as_ac_var=no"
8497 fi
8498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8499 fi
8500 echo "$as_me:8500: result: `eval echo '${'$as_ac_var'}'`" >&5
8501 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8502 if test `eval echo '${'$as_ac_var'}'` = yes; then
8503   cat >>confdefs.h <<EOF
8504 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8505 EOF
8506
8507 fi
8508 done
8509
8510         if test "x$ac_cv_func_putwc" != xyes ; then
8511
8512 echo "$as_me:8512: checking for multibyte character support" >&5
8513 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8514 if test "${cf_cv_utf8_lib+set}" = set; then
8515   echo $ECHO_N "(cached) $ECHO_C" >&6
8516 else
8517
8518         cf_save_LIBS="$LIBS"
8519         cat >conftest.$ac_ext <<_ACEOF
8520 #line 8520 "configure"
8521 #include "confdefs.h"
8522
8523 #include <stdlib.h>
8524 int
8525 main ()
8526 {
8527 putwc(0,0);
8528   ;
8529   return 0;
8530 }
8531 _ACEOF
8532 rm -f conftest.$ac_objext conftest$ac_exeext
8533 if { (eval echo "$as_me:8533: \"$ac_link\"") >&5
8534   (eval $ac_link) 2>&5
8535   ac_status=$?
8536   echo "$as_me:8536: \$? = $ac_status" >&5
8537   (exit $ac_status); } &&
8538          { ac_try='test -s conftest$ac_exeext'
8539   { (eval echo "$as_me:8539: \"$ac_try\"") >&5
8540   (eval $ac_try) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); }; }; then
8544   cf_cv_utf8_lib=yes
8545 else
8546   echo "$as_me: failed program was:" >&5
8547 cat conftest.$ac_ext >&5
8548
8549 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8550 # will be set on completion of the AC_TRY_LINK below.
8551 cf_cv_header_path_utf8=
8552 cf_cv_library_path_utf8=
8553
8554 echo "${as_me:-configure}:8554: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8555
8556 cf_save_LIBS="$LIBS"
8557
8558 cat >conftest.$ac_ext <<_ACEOF
8559 #line 8559 "configure"
8560 #include "confdefs.h"
8561
8562 #include <libutf8.h>
8563 int
8564 main ()
8565 {
8566 putwc(0,0);
8567   ;
8568   return 0;
8569 }
8570 _ACEOF
8571 rm -f conftest.$ac_objext conftest$ac_exeext
8572 if { (eval echo "$as_me:8572: \"$ac_link\"") >&5
8573   (eval $ac_link) 2>&5
8574   ac_status=$?
8575   echo "$as_me:8575: \$? = $ac_status" >&5
8576   (exit $ac_status); } &&
8577          { ac_try='test -s conftest$ac_exeext'
8578   { (eval echo "$as_me:8578: \"$ac_try\"") >&5
8579   (eval $ac_try) 2>&5
8580   ac_status=$?
8581   echo "$as_me:8581: \$? = $ac_status" >&5
8582   (exit $ac_status); }; }; then
8583
8584         cf_cv_find_linkage_utf8=yes
8585         cf_cv_header_path_utf8=/usr/include
8586         cf_cv_library_path_utf8=/usr/lib
8587
8588 else
8589   echo "$as_me: failed program was:" >&5
8590 cat conftest.$ac_ext >&5
8591
8592 LIBS="-lutf8  $cf_save_LIBS"
8593
8594 cat >conftest.$ac_ext <<_ACEOF
8595 #line 8595 "configure"
8596 #include "confdefs.h"
8597
8598 #include <libutf8.h>
8599 int
8600 main ()
8601 {
8602 putwc(0,0);
8603   ;
8604   return 0;
8605 }
8606 _ACEOF
8607 rm -f conftest.$ac_objext conftest$ac_exeext
8608 if { (eval echo "$as_me:8608: \"$ac_link\"") >&5
8609   (eval $ac_link) 2>&5
8610   ac_status=$?
8611   echo "$as_me:8611: \$? = $ac_status" >&5
8612   (exit $ac_status); } &&
8613          { ac_try='test -s conftest$ac_exeext'
8614   { (eval echo "$as_me:8614: \"$ac_try\"") >&5
8615   (eval $ac_try) 2>&5
8616   ac_status=$?
8617   echo "$as_me:8617: \$? = $ac_status" >&5
8618   (exit $ac_status); }; }; then
8619
8620         cf_cv_find_linkage_utf8=yes
8621         cf_cv_header_path_utf8=/usr/include
8622         cf_cv_library_path_utf8=/usr/lib
8623         cf_cv_library_file_utf8="-lutf8"
8624
8625 else
8626   echo "$as_me: failed program was:" >&5
8627 cat conftest.$ac_ext >&5
8628
8629         cf_cv_find_linkage_utf8=no
8630         LIBS="$cf_save_LIBS"
8631
8632     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8633
8634 echo "${as_me:-configure}:8634: testing find linkage for utf8 library ..." 1>&5
8635
8636 echo "${as_me:-configure}:8636: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8637
8638     cf_save_CPPFLAGS="$CPPFLAGS"
8639     cf_test_CPPFLAGS="$CPPFLAGS"
8640
8641 cf_search=
8642
8643 # collect the current set of include-directories from compiler flags
8644 cf_header_path_list=""
8645 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8646         for cf_header_path in $CPPFLAGS $CFLAGS
8647         do
8648                 case $cf_header_path in #(vi
8649                 -I*)
8650                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8651
8652 test "$cf_header_path" != "NONE" && \
8653 test -d "$cf_header_path" && \
8654  {
8655         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8656         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8657         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8658         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8659         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8660         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8661 }
8662
8663                         cf_header_path_list="$cf_header_path_list $cf_search"
8664                         ;;
8665                 esac
8666         done
8667 fi
8668
8669 # add the variations for the package we are looking for
8670
8671 cf_search=
8672
8673 test "/usr" != "$prefix" && \
8674 test -d "/usr" && \
8675 (test $prefix = NONE || test "/usr" != "$prefix") && {
8676         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8677         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8678         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8679         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8680         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8681         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8682 }
8683
8684 test "$prefix" != "NONE" && \
8685 test -d "$prefix" && \
8686  {
8687         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8688         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8689         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8690         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8691         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8692         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8693 }
8694
8695 test "/usr/local" != "$prefix" && \
8696 test -d "/usr/local" && \
8697 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8698         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8699         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8700         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8701         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8702         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8703         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8704 }
8705
8706 test "/opt" != "$prefix" && \
8707 test -d "/opt" && \
8708 (test $prefix = NONE || test "/opt" != "$prefix") && {
8709         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8710         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8711         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8712         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8713         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8714         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8715 }
8716
8717 test "$HOME" != "$prefix" && \
8718 test -d "$HOME" && \
8719 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8720         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8721         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8722         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8723         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8724         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8725         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8726 }
8727
8728 test "$includedir" != NONE && \
8729 test "$includedir" != "/usr/include" && \
8730 test -d "$includedir" && {
8731         test -d $includedir &&    cf_search="$cf_search $includedir"
8732         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8733 }
8734
8735 test "$oldincludedir" != NONE && \
8736 test "$oldincludedir" != "/usr/include" && \
8737 test -d "$oldincludedir" && {
8738         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8739         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8740 }
8741
8742 cf_search="$cf_search $cf_header_path_list"
8743
8744     for cf_cv_header_path_utf8 in $cf_search
8745     do
8746       if test -d $cf_cv_header_path_utf8 ; then
8747         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8748
8749 echo "${as_me:-configure}:8749: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8750
8751         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8752         cat >conftest.$ac_ext <<_ACEOF
8753 #line 8753 "configure"
8754 #include "confdefs.h"
8755
8756 #include <libutf8.h>
8757 int
8758 main ()
8759 {
8760 putwc(0,0);
8761   ;
8762   return 0;
8763 }
8764 _ACEOF
8765 rm -f conftest.$ac_objext
8766 if { (eval echo "$as_me:8766: \"$ac_compile\"") >&5
8767   (eval $ac_compile) 2>&5
8768   ac_status=$?
8769   echo "$as_me:8769: \$? = $ac_status" >&5
8770   (exit $ac_status); } &&
8771          { ac_try='test -s conftest.$ac_objext'
8772   { (eval echo "$as_me:8772: \"$ac_try\"") >&5
8773   (eval $ac_try) 2>&5
8774   ac_status=$?
8775   echo "$as_me:8775: \$? = $ac_status" >&5
8776   (exit $ac_status); }; }; then
8777
8778             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8779
8780 echo "${as_me:-configure}:8780: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8781
8782             cf_cv_find_linkage_utf8=maybe
8783             cf_test_CPPFLAGS="$CPPFLAGS"
8784             break
8785 else
8786   echo "$as_me: failed program was:" >&5
8787 cat conftest.$ac_ext >&5
8788
8789             CPPFLAGS="$cf_save_CPPFLAGS"
8790
8791 fi
8792 rm -f conftest.$ac_objext conftest.$ac_ext
8793       fi
8794     done
8795
8796     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8797
8798 echo "${as_me:-configure}:8798: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8799
8800       cf_save_LIBS="$LIBS"
8801       cf_save_LDFLAGS="$LDFLAGS"
8802
8803       if test "$cf_cv_find_linkage_utf8" != yes ; then
8804
8805 cf_search=
8806 cf_library_path_list=""
8807 if test -n "${LDFLAGS}${LIBS}" ; then
8808         for cf_library_path in $LDFLAGS $LIBS
8809         do
8810                 case $cf_library_path in #(vi
8811                 -L*)
8812                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8813
8814 test "$cf_library_path" != "NONE" && \
8815 test -d "$cf_library_path" && \
8816  {
8817         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8818         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8819         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8820         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8821         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8822         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8823 }
8824
8825                         cf_library_path_list="$cf_library_path_list $cf_search"
8826                         ;;
8827                 esac
8828         done
8829 fi
8830
8831 cf_search=
8832
8833 test "/usr" != "$prefix" && \
8834 test -d "/usr" && \
8835 (test $prefix = NONE || test "/usr" != "$prefix") && {
8836         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8837         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8838         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8839         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8840         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8841         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8842 }
8843
8844 test "$prefix" != "NONE" && \
8845 test -d "$prefix" && \
8846  {
8847         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8848         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8849         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8850         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8851         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8852         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8853 }
8854
8855 test "/usr/local" != "$prefix" && \
8856 test -d "/usr/local" && \
8857 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8858         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8859         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8860         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8861         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8862         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8863         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8864 }
8865
8866 test "/opt" != "$prefix" && \
8867 test -d "/opt" && \
8868 (test $prefix = NONE || test "/opt" != "$prefix") && {
8869         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8870         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8871         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8872         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8873         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8874         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8875 }
8876
8877 test "$HOME" != "$prefix" && \
8878 test -d "$HOME" && \
8879 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8880         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8881         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8882         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8883         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8884         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8885         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8886 }
8887
8888 cf_search="$cf_library_path_list $cf_search"
8889
8890         for cf_cv_library_path_utf8 in $cf_search
8891         do
8892           if test -d $cf_cv_library_path_utf8 ; then
8893             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8894
8895 echo "${as_me:-configure}:8895: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8896
8897             CPPFLAGS="$cf_test_CPPFLAGS"
8898             LIBS="-lutf8  $cf_save_LIBS"
8899             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8900             cat >conftest.$ac_ext <<_ACEOF
8901 #line 8901 "configure"
8902 #include "confdefs.h"
8903
8904 #include <libutf8.h>
8905 int
8906 main ()
8907 {
8908 putwc(0,0);
8909   ;
8910   return 0;
8911 }
8912 _ACEOF
8913 rm -f conftest.$ac_objext conftest$ac_exeext
8914 if { (eval echo "$as_me:8914: \"$ac_link\"") >&5
8915   (eval $ac_link) 2>&5
8916   ac_status=$?
8917   echo "$as_me:8917: \$? = $ac_status" >&5
8918   (exit $ac_status); } &&
8919          { ac_try='test -s conftest$ac_exeext'
8920   { (eval echo "$as_me:8920: \"$ac_try\"") >&5
8921   (eval $ac_try) 2>&5
8922   ac_status=$?
8923   echo "$as_me:8923: \$? = $ac_status" >&5
8924   (exit $ac_status); }; }; then
8925
8926                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8927
8928 echo "${as_me:-configure}:8928: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8929
8930                 cf_cv_find_linkage_utf8=yes
8931                 cf_cv_library_file_utf8="-lutf8"
8932                 break
8933 else
8934   echo "$as_me: failed program was:" >&5
8935 cat conftest.$ac_ext >&5
8936
8937                 CPPFLAGS="$cf_save_CPPFLAGS"
8938                 LIBS="$cf_save_LIBS"
8939                 LDFLAGS="$cf_save_LDFLAGS"
8940
8941 fi
8942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8943           fi
8944         done
8945         CPPFLAGS="$cf_save_CPPFLAGS"
8946         LDFLAGS="$cf_save_LDFLAGS"
8947       fi
8948
8949     else
8950       cf_cv_find_linkage_utf8=no
8951     fi
8952
8953 fi
8954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8955
8956 fi
8957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8958
8959 LIBS="$cf_save_LIBS"
8960
8961 if test "$cf_cv_find_linkage_utf8" = yes ; then
8962 cf_cv_utf8_lib=add-on
8963 else
8964 cf_cv_utf8_lib=no
8965 fi
8966
8967 fi
8968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8969 fi
8970 echo "$as_me:8970: result: $cf_cv_utf8_lib" >&5
8971 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8972
8973 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8974 # ncurses/ncursesw:
8975 if test "$cf_cv_utf8_lib" = "add-on" ; then
8976
8977 cat >>confdefs.h <<\EOF
8978 #define HAVE_LIBUTF8_H 1
8979 EOF
8980
8981 if test -n "$cf_cv_header_path_utf8" ; then
8982   for cf_add_incdir in $cf_cv_header_path_utf8
8983   do
8984         while test $cf_add_incdir != /usr/include
8985         do
8986           if test -d $cf_add_incdir
8987           then
8988                 cf_have_incdir=no
8989                 if test -n "$CFLAGS$CPPFLAGS" ; then
8990                   # a loop is needed to ensure we can add subdirs of existing dirs
8991                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8992                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8993                           cf_have_incdir=yes; break
8994                         fi
8995                   done
8996                 fi
8997
8998                 if test "$cf_have_incdir" = no ; then
8999                   if test "$cf_add_incdir" = /usr/local/include ; then
9000                         if test "$GCC" = yes
9001                         then
9002                           cf_save_CPPFLAGS=$CPPFLAGS
9003                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9004                           cat >conftest.$ac_ext <<_ACEOF
9005 #line 9005 "configure"
9006 #include "confdefs.h"
9007 #include <stdio.h>
9008 int
9009 main ()
9010 {
9011 printf("Hello")
9012   ;
9013   return 0;
9014 }
9015 _ACEOF
9016 rm -f conftest.$ac_objext
9017 if { (eval echo "$as_me:9017: \"$ac_compile\"") >&5
9018   (eval $ac_compile) 2>&5
9019   ac_status=$?
9020   echo "$as_me:9020: \$? = $ac_status" >&5
9021   (exit $ac_status); } &&
9022          { ac_try='test -s conftest.$ac_objext'
9023   { (eval echo "$as_me:9023: \"$ac_try\"") >&5
9024   (eval $ac_try) 2>&5
9025   ac_status=$?
9026   echo "$as_me:9026: \$? = $ac_status" >&5
9027   (exit $ac_status); }; }; then
9028   :
9029 else
9030   echo "$as_me: failed program was:" >&5
9031 cat conftest.$ac_ext >&5
9032 cf_have_incdir=yes
9033 fi
9034 rm -f conftest.$ac_objext conftest.$ac_ext
9035                           CPPFLAGS=$cf_save_CPPFLAGS
9036                         fi
9037                   fi
9038                 fi
9039
9040                 if test "$cf_have_incdir" = no ; then
9041                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9042
9043 echo "${as_me:-configure}:9043: testing adding $cf_add_incdir to include-path ..." 1>&5
9044
9045                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9046
9047                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9048                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9049                   cf_add_incdir="$cf_top_incdir"
9050                 else
9051                   break
9052                 fi
9053           fi
9054         done
9055   done
9056 fi
9057
9058 if test -n "$cf_cv_library_path_utf8" ; then
9059   for cf_add_libdir in $cf_cv_library_path_utf8
9060   do
9061     if test $cf_add_libdir = /usr/lib ; then
9062       :
9063     elif test -d $cf_add_libdir
9064     then
9065       cf_have_libdir=no
9066       if test -n "$LDFLAGS$LIBS" ; then
9067         # a loop is needed to ensure we can add subdirs of existing dirs
9068         for cf_test_libdir in $LDFLAGS $LIBS ; do
9069           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9070             cf_have_libdir=yes; break
9071           fi
9072         done
9073       fi
9074       if test "$cf_have_libdir" = no ; then
9075         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9076
9077 echo "${as_me:-configure}:9077: testing adding $cf_add_libdir to library-path ..." 1>&5
9078
9079         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9080       fi
9081     fi
9082   done
9083 fi
9084
9085         LIBS="$cf_cv_library_file_utf8 $LIBS"
9086 fi
9087
9088                 if test "$cf_cv_utf8_lib" != no ; then
9089                         NCURSES_LIBUTF8=1
9090                 fi
9091         fi
9092
9093 # This is needed on Tru64 5.0 to declare mbstate_t
9094 echo "$as_me:9094: checking if we must include wchar.h to declare mbstate_t" >&5
9095 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9096 if test "${cf_cv_mbstate_t+set}" = set; then
9097   echo $ECHO_N "(cached) $ECHO_C" >&6
9098 else
9099
9100 cat >conftest.$ac_ext <<_ACEOF
9101 #line 9101 "configure"
9102 #include "confdefs.h"
9103
9104 #include <stdlib.h>
9105 #include <stdarg.h>
9106 #include <stdio.h>
9107 #ifdef HAVE_LIBUTF8_H
9108 #include <libutf8.h>
9109 #endif
9110 int
9111 main ()
9112 {
9113 mbstate_t state
9114   ;
9115   return 0;
9116 }
9117 _ACEOF
9118 rm -f conftest.$ac_objext
9119 if { (eval echo "$as_me:9119: \"$ac_compile\"") >&5
9120   (eval $ac_compile) 2>&5
9121   ac_status=$?
9122   echo "$as_me:9122: \$? = $ac_status" >&5
9123   (exit $ac_status); } &&
9124          { ac_try='test -s conftest.$ac_objext'
9125   { (eval echo "$as_me:9125: \"$ac_try\"") >&5
9126   (eval $ac_try) 2>&5
9127   ac_status=$?
9128   echo "$as_me:9128: \$? = $ac_status" >&5
9129   (exit $ac_status); }; }; then
9130   cf_cv_mbstate_t=no
9131 else
9132   echo "$as_me: failed program was:" >&5
9133 cat conftest.$ac_ext >&5
9134 cat >conftest.$ac_ext <<_ACEOF
9135 #line 9135 "configure"
9136 #include "confdefs.h"
9137
9138 #include <stdlib.h>
9139 #include <stdarg.h>
9140 #include <stdio.h>
9141 #include <wchar.h>
9142 #ifdef HAVE_LIBUTF8_H
9143 #include <libutf8.h>
9144 #endif
9145 int
9146 main ()
9147 {
9148 mbstate_t value
9149   ;
9150   return 0;
9151 }
9152 _ACEOF
9153 rm -f conftest.$ac_objext
9154 if { (eval echo "$as_me:9154: \"$ac_compile\"") >&5
9155   (eval $ac_compile) 2>&5
9156   ac_status=$?
9157   echo "$as_me:9157: \$? = $ac_status" >&5
9158   (exit $ac_status); } &&
9159          { ac_try='test -s conftest.$ac_objext'
9160   { (eval echo "$as_me:9160: \"$ac_try\"") >&5
9161   (eval $ac_try) 2>&5
9162   ac_status=$?
9163   echo "$as_me:9163: \$? = $ac_status" >&5
9164   (exit $ac_status); }; }; then
9165   cf_cv_mbstate_t=yes
9166 else
9167   echo "$as_me: failed program was:" >&5
9168 cat conftest.$ac_ext >&5
9169 cf_cv_mbstate_t=unknown
9170 fi
9171 rm -f conftest.$ac_objext conftest.$ac_ext
9172 fi
9173 rm -f conftest.$ac_objext conftest.$ac_ext
9174 fi
9175 echo "$as_me:9175: result: $cf_cv_mbstate_t" >&5
9176 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9177
9178 if test "$cf_cv_mbstate_t" = yes ; then
9179
9180 cat >>confdefs.h <<\EOF
9181 #define NEED_WCHAR_H 1
9182 EOF
9183
9184         NEED_WCHAR_H=1
9185 fi
9186
9187 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9188 if test "$cf_cv_mbstate_t" = unknown ; then
9189         NCURSES_MBSTATE_T=1
9190 fi
9191
9192 # This is needed on Tru64 5.0 to declare wchar_t
9193 echo "$as_me:9193: checking if we must include wchar.h to declare wchar_t" >&5
9194 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9195 if test "${cf_cv_wchar_t+set}" = set; then
9196   echo $ECHO_N "(cached) $ECHO_C" >&6
9197 else
9198
9199 cat >conftest.$ac_ext <<_ACEOF
9200 #line 9200 "configure"
9201 #include "confdefs.h"
9202
9203 #include <stdlib.h>
9204 #include <stdarg.h>
9205 #include <stdio.h>
9206 #ifdef HAVE_LIBUTF8_H
9207 #include <libutf8.h>
9208 #endif
9209 int
9210 main ()
9211 {
9212 wchar_t state
9213   ;
9214   return 0;
9215 }
9216 _ACEOF
9217 rm -f conftest.$ac_objext
9218 if { (eval echo "$as_me:9218: \"$ac_compile\"") >&5
9219   (eval $ac_compile) 2>&5
9220   ac_status=$?
9221   echo "$as_me:9221: \$? = $ac_status" >&5
9222   (exit $ac_status); } &&
9223          { ac_try='test -s conftest.$ac_objext'
9224   { (eval echo "$as_me:9224: \"$ac_try\"") >&5
9225   (eval $ac_try) 2>&5
9226   ac_status=$?
9227   echo "$as_me:9227: \$? = $ac_status" >&5
9228   (exit $ac_status); }; }; then
9229   cf_cv_wchar_t=no
9230 else
9231   echo "$as_me: failed program was:" >&5
9232 cat conftest.$ac_ext >&5
9233 cat >conftest.$ac_ext <<_ACEOF
9234 #line 9234 "configure"
9235 #include "confdefs.h"
9236
9237 #include <stdlib.h>
9238 #include <stdarg.h>
9239 #include <stdio.h>
9240 #include <wchar.h>
9241 #ifdef HAVE_LIBUTF8_H
9242 #include <libutf8.h>
9243 #endif
9244 int
9245 main ()
9246 {
9247 wchar_t value
9248   ;
9249   return 0;
9250 }
9251 _ACEOF
9252 rm -f conftest.$ac_objext
9253 if { (eval echo "$as_me:9253: \"$ac_compile\"") >&5
9254   (eval $ac_compile) 2>&5
9255   ac_status=$?
9256   echo "$as_me:9256: \$? = $ac_status" >&5
9257   (exit $ac_status); } &&
9258          { ac_try='test -s conftest.$ac_objext'
9259   { (eval echo "$as_me:9259: \"$ac_try\"") >&5
9260   (eval $ac_try) 2>&5
9261   ac_status=$?
9262   echo "$as_me:9262: \$? = $ac_status" >&5
9263   (exit $ac_status); }; }; then
9264   cf_cv_wchar_t=yes
9265 else
9266   echo "$as_me: failed program was:" >&5
9267 cat conftest.$ac_ext >&5
9268 cf_cv_wchar_t=unknown
9269 fi
9270 rm -f conftest.$ac_objext conftest.$ac_ext
9271 fi
9272 rm -f conftest.$ac_objext conftest.$ac_ext
9273 fi
9274 echo "$as_me:9274: result: $cf_cv_wchar_t" >&5
9275 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9276
9277 if test "$cf_cv_wchar_t" = yes ; then
9278
9279 cat >>confdefs.h <<\EOF
9280 #define NEED_WCHAR_H 1
9281 EOF
9282
9283         NEED_WCHAR_H=1
9284 fi
9285
9286 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9287 if test "$cf_cv_wchar_t" = unknown ; then
9288         NCURSES_WCHAR_T=1
9289 fi
9290
9291 # if we find wchar_t in either place, use substitution to provide a fallback.
9292 if test "$cf_cv_wchar_t" != unknown ; then
9293         NCURSES_OK_WCHAR_T=1
9294 fi
9295
9296 # This is needed on Tru64 5.0 to declare wint_t
9297 echo "$as_me:9297: checking if we must include wchar.h to declare wint_t" >&5
9298 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9299 if test "${cf_cv_wint_t+set}" = set; then
9300   echo $ECHO_N "(cached) $ECHO_C" >&6
9301 else
9302
9303 cat >conftest.$ac_ext <<_ACEOF
9304 #line 9304 "configure"
9305 #include "confdefs.h"
9306
9307 #include <stdlib.h>
9308 #include <stdarg.h>
9309 #include <stdio.h>
9310 #ifdef HAVE_LIBUTF8_H
9311 #include <libutf8.h>
9312 #endif
9313 int
9314 main ()
9315 {
9316 wint_t state
9317   ;
9318   return 0;
9319 }
9320 _ACEOF
9321 rm -f conftest.$ac_objext
9322 if { (eval echo "$as_me:9322: \"$ac_compile\"") >&5
9323   (eval $ac_compile) 2>&5
9324   ac_status=$?
9325   echo "$as_me:9325: \$? = $ac_status" >&5
9326   (exit $ac_status); } &&
9327          { ac_try='test -s conftest.$ac_objext'
9328   { (eval echo "$as_me:9328: \"$ac_try\"") >&5
9329   (eval $ac_try) 2>&5
9330   ac_status=$?
9331   echo "$as_me:9331: \$? = $ac_status" >&5
9332   (exit $ac_status); }; }; then
9333   cf_cv_wint_t=no
9334 else
9335   echo "$as_me: failed program was:" >&5
9336 cat conftest.$ac_ext >&5
9337 cat >conftest.$ac_ext <<_ACEOF
9338 #line 9338 "configure"
9339 #include "confdefs.h"
9340
9341 #include <stdlib.h>
9342 #include <stdarg.h>
9343 #include <stdio.h>
9344 #include <wchar.h>
9345 #ifdef HAVE_LIBUTF8_H
9346 #include <libutf8.h>
9347 #endif
9348 int
9349 main ()
9350 {
9351 wint_t value
9352   ;
9353   return 0;
9354 }
9355 _ACEOF
9356 rm -f conftest.$ac_objext
9357 if { (eval echo "$as_me:9357: \"$ac_compile\"") >&5
9358   (eval $ac_compile) 2>&5
9359   ac_status=$?
9360   echo "$as_me:9360: \$? = $ac_status" >&5
9361   (exit $ac_status); } &&
9362          { ac_try='test -s conftest.$ac_objext'
9363   { (eval echo "$as_me:9363: \"$ac_try\"") >&5
9364   (eval $ac_try) 2>&5
9365   ac_status=$?
9366   echo "$as_me:9366: \$? = $ac_status" >&5
9367   (exit $ac_status); }; }; then
9368   cf_cv_wint_t=yes
9369 else
9370   echo "$as_me: failed program was:" >&5
9371 cat conftest.$ac_ext >&5
9372 cf_cv_wint_t=unknown
9373 fi
9374 rm -f conftest.$ac_objext conftest.$ac_ext
9375 fi
9376 rm -f conftest.$ac_objext conftest.$ac_ext
9377 fi
9378 echo "$as_me:9378: result: $cf_cv_wint_t" >&5
9379 echo "${ECHO_T}$cf_cv_wint_t" >&6
9380
9381 if test "$cf_cv_wint_t" = yes ; then
9382
9383 cat >>confdefs.h <<\EOF
9384 #define NEED_WCHAR_H 1
9385 EOF
9386
9387         NEED_WCHAR_H=1
9388 fi
9389
9390 # if we do not find wint_t in either place, use substitution to provide a fallback.
9391 if test "$cf_cv_wint_t" = unknown ; then
9392         NCURSES_WINT_T=1
9393 fi
9394
9395 # if we find wint_t in either place, use substitution to provide a fallback.
9396 if test "$cf_cv_wint_t" != unknown ; then
9397         NCURSES_OK_WINT_T=1
9398 fi
9399
9400         if test "$NCURSES_MBSTATE_T" != 0; then
9401
9402 cat >>confdefs.h <<\EOF
9403 #define NEED_MBSTATE_T_DEF 1
9404 EOF
9405
9406         fi
9407 fi
9408
9409 ###   use option --disable-lp64 to allow long chtype
9410 case $cf_cv_abi_version in
9411 [345]*)
9412         default_with_lp64=no
9413         ;;
9414 *)
9415         default_with_lp64=yes
9416         ;;
9417 esac
9418
9419 echo "$as_me:9419: checking whether to enable _LP64 definition in curses.h" >&5
9420 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9421
9422 # Check whether --enable-lp64 or --disable-lp64 was given.
9423 if test "${enable_lp64+set}" = set; then
9424   enableval="$enable_lp64"
9425   with_lp64=$enableval
9426 else
9427   with_lp64=$default_with_lp64
9428 fi;
9429 echo "$as_me:9429: result: $with_lp64" >&5
9430 echo "${ECHO_T}$with_lp64" >&6
9431
9432 if test "x$with_lp64" = xyes ; then
9433         cf_cv_enable_lp64=1
9434 else
9435         cf_cv_enable_lp64=0
9436 fi
9437
9438 # Check whether --enable-largefile or --disable-largefile was given.
9439 if test "${enable_largefile+set}" = set; then
9440   enableval="$enable_largefile"
9441
9442 fi;
9443 if test "$enable_largefile" != no; then
9444
9445   echo "$as_me:9445: checking for special C compiler options needed for large files" >&5
9446 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9447 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9448   echo $ECHO_N "(cached) $ECHO_C" >&6
9449 else
9450   ac_cv_sys_largefile_CC=no
9451      if test "$GCC" != yes; then
9452        ac_save_CC=$CC
9453        while :; do
9454          # IRIX 6.2 and later do not support large files by default,
9455          # so use the C compiler's -n32 option if that helps.
9456          cat >conftest.$ac_ext <<_ACEOF
9457 #line 9457 "configure"
9458 #include "confdefs.h"
9459 #include <sys/types.h>
9460  /* Check that off_t can represent 2**63 - 1 correctly.
9461     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9462     since some C++ compilers masquerading as C compilers
9463     incorrectly reject 9223372036854775807.  */
9464 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9465   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9466                        && LARGE_OFF_T % 2147483647 == 1)
9467                       ? 1 : -1];
9468 int
9469 main ()
9470 {
9471
9472   ;
9473   return 0;
9474 }
9475 _ACEOF
9476          rm -f conftest.$ac_objext
9477 if { (eval echo "$as_me:9477: \"$ac_compile\"") >&5
9478   (eval $ac_compile) 2>&5
9479   ac_status=$?
9480   echo "$as_me:9480: \$? = $ac_status" >&5
9481   (exit $ac_status); } &&
9482          { ac_try='test -s conftest.$ac_objext'
9483   { (eval echo "$as_me:9483: \"$ac_try\"") >&5
9484   (eval $ac_try) 2>&5
9485   ac_status=$?
9486   echo "$as_me:9486: \$? = $ac_status" >&5
9487   (exit $ac_status); }; }; then
9488   break
9489 else
9490   echo "$as_me: failed program was:" >&5
9491 cat conftest.$ac_ext >&5
9492 fi
9493 rm -f conftest.$ac_objext
9494          CC="$CC -n32"
9495          rm -f conftest.$ac_objext
9496 if { (eval echo "$as_me:9496: \"$ac_compile\"") >&5
9497   (eval $ac_compile) 2>&5
9498   ac_status=$?
9499   echo "$as_me:9499: \$? = $ac_status" >&5
9500   (exit $ac_status); } &&
9501          { ac_try='test -s conftest.$ac_objext'
9502   { (eval echo "$as_me:9502: \"$ac_try\"") >&5
9503   (eval $ac_try) 2>&5
9504   ac_status=$?
9505   echo "$as_me:9505: \$? = $ac_status" >&5
9506   (exit $ac_status); }; }; then
9507   ac_cv_sys_largefile_CC=' -n32'; break
9508 else
9509   echo "$as_me: failed program was:" >&5
9510 cat conftest.$ac_ext >&5
9511 fi
9512 rm -f conftest.$ac_objext
9513          break
9514        done
9515        CC=$ac_save_CC
9516        rm -f conftest.$ac_ext
9517     fi
9518 fi
9519 echo "$as_me:9519: result: $ac_cv_sys_largefile_CC" >&5
9520 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9521   if test "$ac_cv_sys_largefile_CC" != no; then
9522     CC=$CC$ac_cv_sys_largefile_CC
9523   fi
9524
9525   echo "$as_me:9525: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9526 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9527 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9528   echo $ECHO_N "(cached) $ECHO_C" >&6
9529 else
9530   while :; do
9531   ac_cv_sys_file_offset_bits=no
9532   cat >conftest.$ac_ext <<_ACEOF
9533 #line 9533 "configure"
9534 #include "confdefs.h"
9535 #include <sys/types.h>
9536  /* Check that off_t can represent 2**63 - 1 correctly.
9537     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9538     since some C++ compilers masquerading as C compilers
9539     incorrectly reject 9223372036854775807.  */
9540 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9541   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9542                        && LARGE_OFF_T % 2147483647 == 1)
9543                       ? 1 : -1];
9544 int
9545 main ()
9546 {
9547
9548   ;
9549   return 0;
9550 }
9551 _ACEOF
9552 rm -f conftest.$ac_objext
9553 if { (eval echo "$as_me:9553: \"$ac_compile\"") >&5
9554   (eval $ac_compile) 2>&5
9555   ac_status=$?
9556   echo "$as_me:9556: \$? = $ac_status" >&5
9557   (exit $ac_status); } &&
9558          { ac_try='test -s conftest.$ac_objext'
9559   { (eval echo "$as_me:9559: \"$ac_try\"") >&5
9560   (eval $ac_try) 2>&5
9561   ac_status=$?
9562   echo "$as_me:9562: \$? = $ac_status" >&5
9563   (exit $ac_status); }; }; then
9564   break
9565 else
9566   echo "$as_me: failed program was:" >&5
9567 cat conftest.$ac_ext >&5
9568 fi
9569 rm -f conftest.$ac_objext conftest.$ac_ext
9570   cat >conftest.$ac_ext <<_ACEOF
9571 #line 9571 "configure"
9572 #include "confdefs.h"
9573 #define _FILE_OFFSET_BITS 64
9574 #include <sys/types.h>
9575  /* Check that off_t can represent 2**63 - 1 correctly.
9576     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9577     since some C++ compilers masquerading as C compilers
9578     incorrectly reject 9223372036854775807.  */
9579 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9580   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9581                        && LARGE_OFF_T % 2147483647 == 1)
9582                       ? 1 : -1];
9583 int
9584 main ()
9585 {
9586
9587   ;
9588   return 0;
9589 }
9590 _ACEOF
9591 rm -f conftest.$ac_objext
9592 if { (eval echo "$as_me:9592: \"$ac_compile\"") >&5
9593   (eval $ac_compile) 2>&5
9594   ac_status=$?
9595   echo "$as_me:9595: \$? = $ac_status" >&5
9596   (exit $ac_status); } &&
9597          { ac_try='test -s conftest.$ac_objext'
9598   { (eval echo "$as_me:9598: \"$ac_try\"") >&5
9599   (eval $ac_try) 2>&5
9600   ac_status=$?
9601   echo "$as_me:9601: \$? = $ac_status" >&5
9602   (exit $ac_status); }; }; then
9603   ac_cv_sys_file_offset_bits=64; break
9604 else
9605   echo "$as_me: failed program was:" >&5
9606 cat conftest.$ac_ext >&5
9607 fi
9608 rm -f conftest.$ac_objext conftest.$ac_ext
9609   break
9610 done
9611 fi
9612 echo "$as_me:9612: result: $ac_cv_sys_file_offset_bits" >&5
9613 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9614 if test "$ac_cv_sys_file_offset_bits" != no; then
9615
9616 cat >>confdefs.h <<EOF
9617 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9618 EOF
9619
9620 fi
9621 rm -rf conftest*
9622   echo "$as_me:9622: checking for _LARGE_FILES value needed for large files" >&5
9623 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9624 if test "${ac_cv_sys_large_files+set}" = set; then
9625   echo $ECHO_N "(cached) $ECHO_C" >&6
9626 else
9627   while :; do
9628   ac_cv_sys_large_files=no
9629   cat >conftest.$ac_ext <<_ACEOF
9630 #line 9630 "configure"
9631 #include "confdefs.h"
9632 #include <sys/types.h>
9633  /* Check that off_t can represent 2**63 - 1 correctly.
9634     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9635     since some C++ compilers masquerading as C compilers
9636     incorrectly reject 9223372036854775807.  */
9637 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9638   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9639                        && LARGE_OFF_T % 2147483647 == 1)
9640                       ? 1 : -1];
9641 int
9642 main ()
9643 {
9644
9645   ;
9646   return 0;
9647 }
9648 _ACEOF
9649 rm -f conftest.$ac_objext
9650 if { (eval echo "$as_me:9650: \"$ac_compile\"") >&5
9651   (eval $ac_compile) 2>&5
9652   ac_status=$?
9653   echo "$as_me:9653: \$? = $ac_status" >&5
9654   (exit $ac_status); } &&
9655          { ac_try='test -s conftest.$ac_objext'
9656   { (eval echo "$as_me:9656: \"$ac_try\"") >&5
9657   (eval $ac_try) 2>&5
9658   ac_status=$?
9659   echo "$as_me:9659: \$? = $ac_status" >&5
9660   (exit $ac_status); }; }; then
9661   break
9662 else
9663   echo "$as_me: failed program was:" >&5
9664 cat conftest.$ac_ext >&5
9665 fi
9666 rm -f conftest.$ac_objext conftest.$ac_ext
9667   cat >conftest.$ac_ext <<_ACEOF
9668 #line 9668 "configure"
9669 #include "confdefs.h"
9670 #define _LARGE_FILES 1
9671 #include <sys/types.h>
9672  /* Check that off_t can represent 2**63 - 1 correctly.
9673     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9674     since some C++ compilers masquerading as C compilers
9675     incorrectly reject 9223372036854775807.  */
9676 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9677   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9678                        && LARGE_OFF_T % 2147483647 == 1)
9679                       ? 1 : -1];
9680 int
9681 main ()
9682 {
9683
9684   ;
9685   return 0;
9686 }
9687 _ACEOF
9688 rm -f conftest.$ac_objext
9689 if { (eval echo "$as_me:9689: \"$ac_compile\"") >&5
9690   (eval $ac_compile) 2>&5
9691   ac_status=$?
9692   echo "$as_me:9692: \$? = $ac_status" >&5
9693   (exit $ac_status); } &&
9694          { ac_try='test -s conftest.$ac_objext'
9695   { (eval echo "$as_me:9695: \"$ac_try\"") >&5
9696   (eval $ac_try) 2>&5
9697   ac_status=$?
9698   echo "$as_me:9698: \$? = $ac_status" >&5
9699   (exit $ac_status); }; }; then
9700   ac_cv_sys_large_files=1; break
9701 else
9702   echo "$as_me: failed program was:" >&5
9703 cat conftest.$ac_ext >&5
9704 fi
9705 rm -f conftest.$ac_objext conftest.$ac_ext
9706   break
9707 done
9708 fi
9709 echo "$as_me:9709: result: $ac_cv_sys_large_files" >&5
9710 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9711 if test "$ac_cv_sys_large_files" != no; then
9712
9713 cat >>confdefs.h <<EOF
9714 #define _LARGE_FILES $ac_cv_sys_large_files
9715 EOF
9716
9717 fi
9718 rm -rf conftest*
9719 fi
9720
9721     if test "$enable_largefile" != no ; then
9722         echo "$as_me:9722: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9723 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9724 if test "${ac_cv_sys_largefile_source+set}" = set; then
9725   echo $ECHO_N "(cached) $ECHO_C" >&6
9726 else
9727   while :; do
9728   ac_cv_sys_largefile_source=no
9729   cat >conftest.$ac_ext <<_ACEOF
9730 #line 9730 "configure"
9731 #include "confdefs.h"
9732 #include <stdio.h>
9733 int
9734 main ()
9735 {
9736 return !fseeko;
9737   ;
9738   return 0;
9739 }
9740 _ACEOF
9741 rm -f conftest.$ac_objext
9742 if { (eval echo "$as_me:9742: \"$ac_compile\"") >&5
9743   (eval $ac_compile) 2>&5
9744   ac_status=$?
9745   echo "$as_me:9745: \$? = $ac_status" >&5
9746   (exit $ac_status); } &&
9747          { ac_try='test -s conftest.$ac_objext'
9748   { (eval echo "$as_me:9748: \"$ac_try\"") >&5
9749   (eval $ac_try) 2>&5
9750   ac_status=$?
9751   echo "$as_me:9751: \$? = $ac_status" >&5
9752   (exit $ac_status); }; }; then
9753   break
9754 else
9755   echo "$as_me: failed program was:" >&5
9756 cat conftest.$ac_ext >&5
9757 fi
9758 rm -f conftest.$ac_objext conftest.$ac_ext
9759   cat >conftest.$ac_ext <<_ACEOF
9760 #line 9760 "configure"
9761 #include "confdefs.h"
9762 #define _LARGEFILE_SOURCE 1
9763 #include <stdio.h>
9764 int
9765 main ()
9766 {
9767 return !fseeko;
9768   ;
9769   return 0;
9770 }
9771 _ACEOF
9772 rm -f conftest.$ac_objext
9773 if { (eval echo "$as_me:9773: \"$ac_compile\"") >&5
9774   (eval $ac_compile) 2>&5
9775   ac_status=$?
9776   echo "$as_me:9776: \$? = $ac_status" >&5
9777   (exit $ac_status); } &&
9778          { ac_try='test -s conftest.$ac_objext'
9779   { (eval echo "$as_me:9779: \"$ac_try\"") >&5
9780   (eval $ac_try) 2>&5
9781   ac_status=$?
9782   echo "$as_me:9782: \$? = $ac_status" >&5
9783   (exit $ac_status); }; }; then
9784   ac_cv_sys_largefile_source=1; break
9785 else
9786   echo "$as_me: failed program was:" >&5
9787 cat conftest.$ac_ext >&5
9788 fi
9789 rm -f conftest.$ac_objext conftest.$ac_ext
9790   break
9791 done
9792 fi
9793 echo "$as_me:9793: result: $ac_cv_sys_largefile_source" >&5
9794 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9795 if test "$ac_cv_sys_largefile_source" != no; then
9796
9797 cat >>confdefs.h <<EOF
9798 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9799 EOF
9800
9801 fi
9802 rm -rf conftest*
9803
9804 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9805 # in glibc 2.1.3, but that breaks too many other things.
9806 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9807 echo "$as_me:9807: checking for fseeko" >&5
9808 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9809 if test "${ac_cv_func_fseeko+set}" = set; then
9810   echo $ECHO_N "(cached) $ECHO_C" >&6
9811 else
9812   cat >conftest.$ac_ext <<_ACEOF
9813 #line 9813 "configure"
9814 #include "confdefs.h"
9815 #include <stdio.h>
9816 int
9817 main ()
9818 {
9819 return fseeko && fseeko (stdin, 0, 0);
9820   ;
9821   return 0;
9822 }
9823 _ACEOF
9824 rm -f conftest.$ac_objext conftest$ac_exeext
9825 if { (eval echo "$as_me:9825: \"$ac_link\"") >&5
9826   (eval $ac_link) 2>&5
9827   ac_status=$?
9828   echo "$as_me:9828: \$? = $ac_status" >&5
9829   (exit $ac_status); } &&
9830          { ac_try='test -s conftest$ac_exeext'
9831   { (eval echo "$as_me:9831: \"$ac_try\"") >&5
9832   (eval $ac_try) 2>&5
9833   ac_status=$?
9834   echo "$as_me:9834: \$? = $ac_status" >&5
9835   (exit $ac_status); }; }; then
9836   ac_cv_func_fseeko=yes
9837 else
9838   echo "$as_me: failed program was:" >&5
9839 cat conftest.$ac_ext >&5
9840 ac_cv_func_fseeko=no
9841 fi
9842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9843 fi
9844 echo "$as_me:9844: result: $ac_cv_func_fseeko" >&5
9845 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9846 if test $ac_cv_func_fseeko = yes; then
9847
9848 cat >>confdefs.h <<\EOF
9849 #define HAVE_FSEEKO 1
9850 EOF
9851
9852 fi
9853
9854         # Normally we would collect these definitions in the config.h,
9855         # but (like _XOPEN_SOURCE), some environments rely on having these
9856         # defined before any of the system headers are included.  Another
9857         # case comes up with C++, e.g., on AIX the compiler compiles the
9858         # header files by themselves before looking at the body files it is
9859         # told to compile.  For ncurses, those header files do not include
9860         # the config.h
9861         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9862         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9863         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9864
9865         echo "$as_me:9865: checking whether to use struct dirent64" >&5
9866 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9867 if test "${cf_cv_struct_dirent64+set}" = set; then
9868   echo $ECHO_N "(cached) $ECHO_C" >&6
9869 else
9870
9871                 cat >conftest.$ac_ext <<_ACEOF
9872 #line 9872 "configure"
9873 #include "confdefs.h"
9874
9875 #include <sys/types.h>
9876 #include <dirent.h>
9877
9878 int
9879 main ()
9880 {
9881
9882                 /* if transitional largefile support is setup, this is true */
9883                 extern struct dirent64 * readdir(DIR *);
9884                 struct dirent64 *x = readdir((DIR *)0);
9885                 struct dirent *y = readdir((DIR *)0);
9886                 int z = x - y;
9887
9888   ;
9889   return 0;
9890 }
9891 _ACEOF
9892 rm -f conftest.$ac_objext
9893 if { (eval echo "$as_me:9893: \"$ac_compile\"") >&5
9894   (eval $ac_compile) 2>&5
9895   ac_status=$?
9896   echo "$as_me:9896: \$? = $ac_status" >&5
9897   (exit $ac_status); } &&
9898          { ac_try='test -s conftest.$ac_objext'
9899   { (eval echo "$as_me:9899: \"$ac_try\"") >&5
9900   (eval $ac_try) 2>&5
9901   ac_status=$?
9902   echo "$as_me:9902: \$? = $ac_status" >&5
9903   (exit $ac_status); }; }; then
9904   cf_cv_struct_dirent64=yes
9905 else
9906   echo "$as_me: failed program was:" >&5
9907 cat conftest.$ac_ext >&5
9908 cf_cv_struct_dirent64=no
9909 fi
9910 rm -f conftest.$ac_objext conftest.$ac_ext
9911
9912 fi
9913 echo "$as_me:9913: result: $cf_cv_struct_dirent64" >&5
9914 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9915         test "$cf_cv_struct_dirent64" = yes &&
9916 cat >>confdefs.h <<\EOF
9917 #define HAVE_STRUCT_DIRENT64 1
9918 EOF
9919
9920     fi
9921
9922 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9923 echo "$as_me:9923: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9924 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9925
9926 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9927 if test "${enable_tparm_varargs+set}" = set; then
9928   enableval="$enable_tparm_varargs"
9929   with_tparm_varargs=$enableval
9930 else
9931   with_tparm_varargs=yes
9932 fi;
9933 echo "$as_me:9933: result: $with_tparm_varargs" >&5
9934 echo "${ECHO_T}$with_tparm_varargs" >&6
9935 NCURSES_TPARM_VARARGS=0
9936 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
9937
9938 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9939 if test "$with_ticlib" != no ; then
9940 echo "$as_me:9940: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9941 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9942
9943 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9944 if test "${enable_tic_depends+set}" = set; then
9945   enableval="$enable_tic_depends"
9946   with_tic_depends=$enableval
9947 else
9948   with_tic_depends=yes
9949 fi;
9950 echo "$as_me:9950: result: $with_tic_depends" >&5
9951 echo "${ECHO_T}$with_tic_depends" >&6
9952 else
9953         with_tic_depends=no
9954 fi
9955
9956 ###   use option --with-bool to override bool's type
9957 echo "$as_me:9957: checking for type of bool" >&5
9958 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9959
9960 # Check whether --with-bool or --without-bool was given.
9961 if test "${with_bool+set}" = set; then
9962   withval="$with_bool"
9963   NCURSES_BOOL="$withval"
9964 else
9965   NCURSES_BOOL=auto
9966 fi;
9967 echo "$as_me:9967: result: $NCURSES_BOOL" >&5
9968 echo "${ECHO_T}$NCURSES_BOOL" >&6
9969
9970 echo "$as_me:9970: checking for alternate terminal capabilities file" >&5
9971 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9972
9973 # Check whether --with-caps or --without-caps was given.
9974 if test "${with_caps+set}" = set; then
9975   withval="$with_caps"
9976   TERMINFO_CAPS=Caps.$withval
9977 else
9978   TERMINFO_CAPS=Caps
9979 fi;
9980 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9981 echo "$as_me:9981: result: $TERMINFO_CAPS" >&5
9982 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9983
9984 ###   use option --with-chtype to override chtype's type
9985 echo "$as_me:9985: checking for type of chtype" >&5
9986 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9987
9988 # Check whether --with-chtype or --without-chtype was given.
9989 if test "${with_chtype+set}" = set; then
9990   withval="$with_chtype"
9991   NCURSES_CHTYPE="$withval"
9992 else
9993   NCURSES_CHTYPE=auto
9994 fi;
9995 echo "$as_me:9995: result: $NCURSES_CHTYPE" >&5
9996 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9997
9998 ###   use option --with-ospeed to override ospeed's type
9999 echo "$as_me:9999: checking for type of ospeed" >&5
10000 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10001
10002 # Check whether --with-ospeed or --without-ospeed was given.
10003 if test "${with_ospeed+set}" = set; then
10004   withval="$with_ospeed"
10005   NCURSES_OSPEED="$withval"
10006 else
10007   NCURSES_OSPEED=short
10008 fi;
10009 echo "$as_me:10009: result: $NCURSES_OSPEED" >&5
10010 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10011
10012 ###   use option --with-mmask-t to override mmask_t's type
10013 echo "$as_me:10013: checking for type of mmask_t" >&5
10014 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10015
10016 # Check whether --with-mmask-t or --without-mmask-t was given.
10017 if test "${with_mmask_t+set}" = set; then
10018   withval="$with_mmask_t"
10019   NCURSES_MMASK_T="$withval"
10020 else
10021   NCURSES_MMASK_T=auto
10022 fi;
10023 echo "$as_me:10023: result: $NCURSES_MMASK_T" >&5
10024 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10025
10026 ###   use option --with-ccharw-max to override CCHARW_MAX size
10027 echo "$as_me:10027: checking for size CCHARW_MAX" >&5
10028 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10029
10030 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10031 if test "${with_ccharw_max+set}" = set; then
10032   withval="$with_ccharw_max"
10033   NCURSES_CCHARW_MAX="$withval"
10034 else
10035   NCURSES_CCHARW_MAX=5
10036 fi;
10037 echo "$as_me:10037: result: $NCURSES_CCHARW_MAX" >&5
10038 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10039
10040 ###   use option --with-tparm-arg to override tparm's argument type
10041 echo "$as_me:10041: checking for type of tparm args" >&5
10042 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10043
10044 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10045 if test "${with_tparm_arg+set}" = set; then
10046   withval="$with_tparm_arg"
10047   NCURSES_TPARM_ARG="$withval"
10048 else
10049   NCURSES_TPARM_ARG=long
10050 fi;
10051 echo "$as_me:10051: result: $NCURSES_TPARM_ARG" >&5
10052 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10053
10054 ### Enable compiling-in rcs id's
10055 echo "$as_me:10055: checking if RCS identifiers should be compiled-in" >&5
10056 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10057
10058 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10059 if test "${with_rcs_ids+set}" = set; then
10060   withval="$with_rcs_ids"
10061   with_rcs_ids=$withval
10062 else
10063   with_rcs_ids=no
10064 fi;
10065 echo "$as_me:10065: result: $with_rcs_ids" >&5
10066 echo "${ECHO_T}$with_rcs_ids" >&6
10067 test "x$with_rcs_ids" = xyes &&
10068 cat >>confdefs.h <<\EOF
10069 #define USE_RCS_IDS 1
10070 EOF
10071
10072 ###############################################################################
10073
10074 echo "$as_me:10074: checking format of man-pages" >&5
10075 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10076
10077 # Check whether --with-manpage-format or --without-manpage-format was given.
10078 if test "${with_manpage_format+set}" = set; then
10079   withval="$with_manpage_format"
10080   MANPAGE_FORMAT=$withval
10081 else
10082   MANPAGE_FORMAT=unknown
10083 fi;
10084
10085 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10086 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10087
10088 cf_unknown=
10089
10090 case $MANPAGE_FORMAT in
10091 unknown)
10092   if test -z "$MANPATH" ; then
10093     MANPATH="/usr/man:/usr/share/man"
10094   fi
10095
10096   # look for the 'date' man-page (it's most likely to be installed!)
10097   MANPAGE_FORMAT=
10098   cf_preform=no
10099   cf_catonly=yes
10100   cf_example=date
10101
10102   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10103   for cf_dir in $MANPATH; do
10104     test -z "$cf_dir" && cf_dir=/usr/man
10105     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
10106     do
10107       cf_test=`echo $cf_name | sed -e 's/*//'`
10108       if test "x$cf_test" = "x$cf_name" ; then
10109
10110         case "$cf_name" in
10111         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10112         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10113         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10114         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10115         esac
10116
10117         case "$cf_name" in
10118         $cf_dir/man*)
10119           cf_catonly=no
10120           ;;
10121         $cf_dir/cat*)
10122           cf_preform=yes
10123           ;;
10124         esac
10125         break
10126       fi
10127
10128       # if we found a match in either man* or cat*, stop looking
10129       if test -n "$MANPAGE_FORMAT" ; then
10130         cf_found=no
10131         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10132         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10133         case "$cf_name" in
10134         $cf_dir/cat*)
10135           cf_found=yes
10136           ;;
10137         esac
10138         test $cf_found=yes && break
10139       fi
10140     done
10141     # only check the first directory in $MANPATH where we find manpages
10142     if test -n "$MANPAGE_FORMAT" ; then
10143        break
10144     fi
10145   done
10146   # if we did not find the example, just assume it is normal
10147   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10148   IFS="$ac_save_ifs"
10149   ;;
10150 *)
10151   for cf_option in $MANPAGE_FORMAT; do
10152      case $cf_option in #(vi
10153      gzip|compress|BSDI|normal|formatted|catonly)
10154        ;;
10155      *)
10156        cf_unknown="$cf_unknown $cf_option"
10157        ;;
10158      esac
10159   done
10160   ;;
10161 esac
10162
10163 echo "$as_me:10163: result: $MANPAGE_FORMAT" >&5
10164 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10165 if test -n "$cf_unknown" ; then
10166   { echo "$as_me:10166: WARNING: Unexpected manpage-format $cf_unknown" >&5
10167 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10168 fi
10169
10170 echo "$as_me:10170: checking for manpage renaming" >&5
10171 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10172
10173 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10174 if test "${with_manpage_renames+set}" = set; then
10175   withval="$with_manpage_renames"
10176   MANPAGE_RENAMES=$withval
10177 else
10178   MANPAGE_RENAMES=yes
10179 fi;
10180
10181 case ".$MANPAGE_RENAMES" in #(vi
10182 .no) #(vi
10183   ;;
10184 .|.yes)
10185   # Debian 'man' program?
10186   if test -f /etc/debian_version ; then
10187     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10188   else
10189     MANPAGE_RENAMES=no
10190   fi
10191   ;;
10192 esac
10193
10194 if test "$MANPAGE_RENAMES" != no ; then
10195   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10196     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10197   elif test ! -f $MANPAGE_RENAMES ; then
10198     { { echo "$as_me:10198: error: not a filename: $MANPAGE_RENAMES" >&5
10199 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10200    { (exit 1); exit 1; }; }
10201   fi
10202
10203   test ! -d man && mkdir man
10204
10205   # Construct a sed-script to perform renaming within man-pages
10206   if test -n "$MANPAGE_RENAMES" ; then
10207     test ! -d man && mkdir man
10208     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10209   fi
10210 fi
10211
10212 echo "$as_me:10212: result: $MANPAGE_RENAMES" >&5
10213 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10214
10215 echo "$as_me:10215: checking if manpage aliases will be installed" >&5
10216 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10217
10218 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10219 if test "${with_manpage_aliases+set}" = set; then
10220   withval="$with_manpage_aliases"
10221   MANPAGE_ALIASES=$withval
10222 else
10223   MANPAGE_ALIASES=yes
10224 fi;
10225
10226 echo "$as_me:10226: result: $MANPAGE_ALIASES" >&5
10227 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10228
10229 case "x$LN_S" in #(vi
10230 xln*) #(vi
10231         cf_use_symlinks=yes
10232         ;;
10233 *)
10234         cf_use_symlinks=no
10235         ;;
10236 esac
10237
10238 MANPAGE_SYMLINKS=no
10239 if test "$MANPAGE_ALIASES" = yes ; then
10240 echo "$as_me:10240: checking if manpage symlinks should be used" >&5
10241 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10242
10243 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10244 if test "${with_manpage_symlinks+set}" = set; then
10245   withval="$with_manpage_symlinks"
10246   MANPAGE_SYMLINKS=$withval
10247 else
10248   MANPAGE_SYMLINKS=$cf_use_symlinks
10249 fi;
10250
10251 if test "$$cf_use_symlinks" = no; then
10252 if test "$MANPAGE_SYMLINKS" = yes ; then
10253         { echo "$as_me:10253: WARNING: cannot make symlinks" >&5
10254 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10255         MANPAGE_SYMLINKS=no
10256 fi
10257 fi
10258
10259 echo "$as_me:10259: result: $MANPAGE_SYMLINKS" >&5
10260 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10261 fi
10262
10263 echo "$as_me:10263: checking for manpage tbl" >&5
10264 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10265
10266 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10267 if test "${with_manpage_tbl+set}" = set; then
10268   withval="$with_manpage_tbl"
10269   MANPAGE_TBL=$withval
10270 else
10271   MANPAGE_TBL=no
10272 fi;
10273
10274 echo "$as_me:10274: result: $MANPAGE_TBL" >&5
10275 echo "${ECHO_T}$MANPAGE_TBL" >&6
10276
10277   if test "$prefix" = "NONE" ; then
10278      cf_prefix="$ac_default_prefix"
10279   else
10280      cf_prefix="$prefix"
10281   fi
10282
10283   case "$MANPAGE_FORMAT" in # (vi
10284   *catonly*) # (vi
10285     cf_format=yes
10286     cf_inboth=no
10287     ;;
10288   *formatted*) # (vi
10289     cf_format=yes
10290     cf_inboth=yes
10291     ;;
10292   *)
10293     cf_format=no
10294     cf_inboth=no
10295     ;;
10296   esac
10297
10298 test ! -d man && mkdir man
10299
10300 cf_so_strip=
10301 cf_compress=
10302 case "$MANPAGE_FORMAT" in #(vi
10303 *compress*) #(vi
10304         cf_so_strip="Z"
10305         cf_compress=compress
10306   ;;
10307 *gzip*)
10308         cf_so_strip="gz"
10309         cf_compress=gzip
10310   ;;
10311 esac
10312
10313 cf_edit_man=./edit_man.sh
10314 cf_man_alias=`pwd`/man_alias.sed
10315
10316 cat >$cf_edit_man <<CF_EOF
10317 #! /bin/sh
10318 # this script is generated by the configure-script CF_MAN_PAGES macro.
10319
10320 prefix="$cf_prefix"
10321 datarootdir="$datarootdir"
10322 datadir="$datadir"
10323
10324 NCURSES_MAJOR="$NCURSES_MAJOR"
10325 NCURSES_MINOR="$NCURSES_MINOR"
10326 NCURSES_PATCH="$NCURSES_PATCH"
10327
10328 NCURSES_OSPEED="$NCURSES_OSPEED"
10329 TERMINFO="$TERMINFO"
10330
10331 INSTALL="$INSTALL"
10332 INSTALL_DATA="$INSTALL_DATA"
10333
10334 transform="$program_transform_name"
10335
10336 TMP=\${TMPDIR:=/tmp}/man\$\$
10337 trap "rm -f \$TMP" 0 1 2 5 15
10338
10339 form=\$1
10340 shift || exit 1
10341
10342 verb=\$1
10343 shift || exit 1
10344
10345 mandir=\$1
10346 shift || exit 1
10347
10348 srcdir=\$1
10349 top_srcdir=\$srcdir/..
10350 shift || exit 1
10351
10352 if test "\$form" = normal ; then
10353         if test "$cf_format" = yes ; then
10354         if test "$cf_inboth" = no ; then
10355                 sh \$0 format \$verb \$mandir \$srcdir \$*
10356                 exit $?
10357         fi
10358         fi
10359         cf_subdir=\$mandir/man
10360         cf_tables=$MANPAGE_TBL
10361 else
10362         cf_subdir=\$mandir/cat
10363         cf_tables=yes
10364 fi
10365
10366 # process the list of source-files
10367 for i in \$* ; do
10368 case \$i in #(vi
10369 *.orig|*.rej) ;; #(vi
10370 *.[0-9]*)
10371         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10372         if test \$verb = installing ; then
10373         if test ! -d \$cf_subdir\${section} ; then
10374                 mkdir -p \$cf_subdir\$section
10375         fi
10376         fi
10377
10378         # replace variables in man page
10379         if test ! -f $cf_man_alias ; then
10380 cat >>$cf_man_alias <<-CF_EOF2
10381                 s,@DATADIR@,\$datadir,g
10382                 s,@TERMINFO@,\$TERMINFO,g
10383                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10384                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10385                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10386                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10387 CF_EOF
10388
10389         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10390         do
10391                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10392                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10393 cat >>$cf_edit_man <<-CF_EOF
10394                 s,@$cf_NAME@,$cf_name,g
10395 CF_EOF
10396         done
10397
10398 cat >>$cf_edit_man <<CF_EOF
10399 CF_EOF2
10400                 echo "...made $cf_man_alias"
10401         fi
10402
10403         aliases=
10404         cf_source=\`basename \$i\`
10405         inalias=\$cf_source
10406         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10407         if test ! -f \$inalias ; then
10408                 echo .. skipped \$cf_source
10409                 continue
10410         fi
10411 CF_EOF
10412
10413 if test "$MANPAGE_ALIASES" != no ; then
10414 cat >>$cf_edit_man <<CF_EOF
10415         nCurses=ignore.3x
10416         test $with_curses_h = yes && nCurses=ncurses.3x
10417         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10418 CF_EOF
10419 fi
10420
10421 if test "$MANPAGE_RENAMES" = no ; then
10422 cat >>$cf_edit_man <<CF_EOF
10423         # perform program transformations for section 1 man pages
10424         if test \$section = 1 ; then
10425                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10426         else
10427                 cf_target=\$cf_subdir\${section}/\$cf_source
10428         fi
10429 CF_EOF
10430 else
10431 cat >>$cf_edit_man <<CF_EOF
10432         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10433         if test -z "\$cf_target" ; then
10434                 echo '? missing rename for '\$cf_source
10435                 cf_target="\$cf_source"
10436         fi
10437         cf_target="\$cf_subdir\${section}/\${cf_target}"
10438
10439 CF_EOF
10440 fi
10441
10442 cat >>$cf_edit_man <<CF_EOF
10443         sed     -f $cf_man_alias \\
10444 CF_EOF
10445
10446 if test -f $MANPAGE_RENAMES ; then
10447 cat >>$cf_edit_man <<CF_EOF
10448                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10449 CF_EOF
10450 else
10451 cat >>$cf_edit_man <<CF_EOF
10452                 < \$i >\$TMP
10453 CF_EOF
10454 fi
10455
10456 cat >>$cf_edit_man <<CF_EOF
10457 if test \$cf_tables = yes ; then
10458         tbl \$TMP >\$TMP.out
10459         mv \$TMP.out \$TMP
10460 fi
10461 CF_EOF
10462
10463 if test $with_overwrite != yes ; then
10464 cat >>$cf_edit_man <<CF_EOF
10465         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10466         mv \$TMP.out \$TMP
10467 CF_EOF
10468 fi
10469
10470 if test $with_curses_h != yes ; then
10471 cat >>$cf_edit_man <<CF_EOF
10472         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10473         mv \$TMP.out \$TMP
10474 CF_EOF
10475 fi
10476
10477 cat >>$cf_edit_man <<CF_EOF
10478         if test \$form = format ; then
10479                 nroff -man \$TMP >\$TMP.out
10480                 mv \$TMP.out \$TMP
10481         fi
10482 CF_EOF
10483
10484 if test -n "$cf_compress" ; then
10485 cat >>$cf_edit_man <<CF_EOF
10486         if test \$verb = installing ; then
10487         if ( $cf_compress -f \$TMP )
10488         then
10489                 mv \$TMP.$cf_so_strip \$TMP
10490         fi
10491         fi
10492         cf_target="\$cf_target.$cf_so_strip"
10493 CF_EOF
10494 fi
10495
10496 case "$MANPAGE_FORMAT" in #(vi
10497 *BSDI*)
10498 cat >>$cf_edit_man <<CF_EOF
10499         if test \$form = format ; then
10500                 # BSDI installs only .0 suffixes in the cat directories
10501                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10502         fi
10503 CF_EOF
10504   ;;
10505 esac
10506
10507 cat >>$cf_edit_man <<CF_EOF
10508         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10509         if test \$verb = installing ; then
10510                 echo \$verb \$cf_target
10511                 \$INSTALL_DATA \$TMP \$cf_target
10512                 test -d \$cf_subdir\${section} &&
10513                 test -n "\$aliases" && (
10514                         cd \$cf_subdir\${section} && (
10515                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10516                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10517                                 cf_target=\`basename \$cf_target\`
10518                                 for cf_alias in \$aliases
10519                                 do
10520                                         if test \$section = 1 ; then
10521                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10522                                         fi
10523
10524                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10525                                                 if test -f \$cf_alias\${suffix} ; then
10526                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10527                                                         then
10528                                                                 continue
10529                                                         fi
10530                                                 fi
10531                                                 echo .. \$verb alias \$cf_alias\${suffix}
10532 CF_EOF
10533 case "x$LN_S" in #(vi
10534 *-f) #(vi
10535 cat >>$cf_edit_man <<CF_EOF
10536                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10537 CF_EOF
10538         ;;
10539 *)
10540 cat >>$cf_edit_man <<CF_EOF
10541                                                 rm -f \$cf_alias\${suffix}
10542                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10543 CF_EOF
10544         ;;
10545 esac
10546 cat >>$cf_edit_man <<CF_EOF
10547                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10548                                                 echo ".so \$cf_source" >\$TMP
10549 CF_EOF
10550 if test -n "$cf_compress" ; then
10551 cat >>$cf_edit_man <<CF_EOF
10552                                                 if test -n "$cf_so_strip" ; then
10553                                                         $cf_compress -f \$TMP
10554                                                         mv \$TMP.$cf_so_strip \$TMP
10555                                                 fi
10556 CF_EOF
10557 fi
10558 cat >>$cf_edit_man <<CF_EOF
10559                                                 echo .. \$verb alias \$cf_alias\${suffix}
10560                                                 rm -f \$cf_alias\${suffix}
10561                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10562                                         fi
10563                                 done
10564                         )
10565                 )
10566         elif test \$verb = removing ; then
10567                 test -f \$cf_target && (
10568                         echo \$verb \$cf_target
10569                         rm -f \$cf_target
10570                 )
10571                 test -d \$cf_subdir\${section} &&
10572                 test -n "\$aliases" && (
10573                         cd \$cf_subdir\${section} && (
10574                                 for cf_alias in \$aliases
10575                                 do
10576                                         if test \$section = 1 ; then
10577                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10578                                         fi
10579
10580                                         echo .. \$verb alias \$cf_alias\${suffix}
10581                                         rm -f \$cf_alias\${suffix}
10582                                 done
10583                         )
10584                 )
10585         else
10586 #               echo ".hy 0"
10587                 cat \$TMP
10588         fi
10589         ;;
10590 esac
10591 done
10592
10593 if test $cf_inboth = yes ; then
10594 if test \$form != format ; then
10595         sh \$0 format \$verb \$mandir \$srcdir \$*
10596 fi
10597 fi
10598
10599 exit 0
10600 CF_EOF
10601 chmod 755 $cf_edit_man
10602
10603 ###############################################################################
10604
10605 ### Note that some functions (such as const) are normally disabled anyway.
10606 echo "$as_me:10606: checking if you want to build with function extensions" >&5
10607 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10608
10609 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10610 if test "${enable_ext_funcs+set}" = set; then
10611   enableval="$enable_ext_funcs"
10612   with_ext_funcs=$enableval
10613 else
10614   with_ext_funcs=yes
10615 fi;
10616 echo "$as_me:10616: result: $with_ext_funcs" >&5
10617 echo "${ECHO_T}$with_ext_funcs" >&6
10618 if test "x$with_ext_funcs" = xyes ; then
10619         NCURSES_EXT_FUNCS=1
10620
10621 cat >>confdefs.h <<\EOF
10622 #define HAVE_ASSUME_DEFAULT_COLORS 1
10623 EOF
10624
10625 cat >>confdefs.h <<\EOF
10626 #define HAVE_CURSES_VERSION 1
10627 EOF
10628
10629 cat >>confdefs.h <<\EOF
10630 #define HAVE_HAS_KEY 1
10631 EOF
10632
10633 cat >>confdefs.h <<\EOF
10634 #define HAVE_RESIZETERM 1
10635 EOF
10636
10637 cat >>confdefs.h <<\EOF
10638 #define HAVE_RESIZE_TERM 1
10639 EOF
10640
10641 cat >>confdefs.h <<\EOF
10642 #define HAVE_TERM_ENTRY_H 1
10643 EOF
10644
10645 cat >>confdefs.h <<\EOF
10646 #define HAVE_USE_DEFAULT_COLORS 1
10647 EOF
10648
10649 cat >>confdefs.h <<\EOF
10650 #define HAVE_USE_SCREEN 1
10651 EOF
10652
10653 cat >>confdefs.h <<\EOF
10654 #define HAVE_USE_WINDOW 1
10655 EOF
10656
10657 cat >>confdefs.h <<\EOF
10658 #define HAVE_WRESIZE 1
10659 EOF
10660
10661 cat >>confdefs.h <<\EOF
10662 #define NCURSES_EXT_FUNCS 1
10663 EOF
10664
10665         GENERATED_EXT_FUNCS=generated
10666 else
10667         NCURSES_EXT_FUNCS=0
10668         GENERATED_EXT_FUNCS=
10669 fi
10670
10671 echo "$as_me:10671: checking if you want to build with experimental SCREEN extensions" >&5
10672 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10673
10674 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10675 if test "${enable_sp_funcs+set}" = set; then
10676   enableval="$enable_sp_funcs"
10677   with_sp_funcs=$enableval
10678 else
10679   with_sp_funcs=no
10680 fi;
10681 echo "$as_me:10681: result: $with_sp_funcs" >&5
10682 echo "${ECHO_T}$with_sp_funcs" >&6
10683 if test "x$with_sp_funcs" = xyes ; then
10684         NCURSES_SP_FUNCS=1
10685
10686 cat >>confdefs.h <<\EOF
10687 #define NCURSES_SP_FUNCS 1
10688 EOF
10689
10690         GENERATED_SP_FUNCS=generated
10691 else
10692         NCURSES_SP_FUNCS=0
10693         GENERATED_SP_FUNCS=
10694 fi
10695
10696 echo "$as_me:10696: checking if you want to build with experimental terminal-driver" >&5
10697 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10698
10699 # Check whether --enable-term-driver or --disable-term-driver was given.
10700 if test "${enable_term_driver+set}" = set; then
10701   enableval="$enable_term_driver"
10702   with_term_driver=$enableval
10703 else
10704   with_term_driver=no
10705 fi;
10706 echo "$as_me:10706: result: $with_term_driver" >&5
10707 echo "${ECHO_T}$with_term_driver" >&6
10708 if test "x$with_term_driver" = xyes ; then
10709
10710 cat >>confdefs.h <<\EOF
10711 #define USE_TERM_DRIVER 1
10712 EOF
10713
10714         if test "x$with_sp_funcs" != xyes ; then
10715                 { { echo "$as_me:10715: error: The term-driver option relies upon sp-funcs" >&5
10716 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10717    { (exit 1); exit 1; }; }
10718         fi
10719 fi
10720
10721 ###   use option --enable-const to turn on use of const beyond that in XSI.
10722 echo "$as_me:10722: checking for extended use of const keyword" >&5
10723 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10724
10725 # Check whether --enable-const or --disable-const was given.
10726 if test "${enable_const+set}" = set; then
10727   enableval="$enable_const"
10728   with_ext_const=$enableval
10729 else
10730   with_ext_const=no
10731 fi;
10732 echo "$as_me:10732: result: $with_ext_const" >&5
10733 echo "${ECHO_T}$with_ext_const" >&6
10734 NCURSES_CONST='/*nothing*/'
10735 if test "x$with_ext_const" = xyes ; then
10736         NCURSES_CONST=const
10737 fi
10738
10739 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10740 echo "$as_me:10740: checking if you want to use extended colors" >&5
10741 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10742
10743 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10744 if test "${enable_ext_colors+set}" = set; then
10745   enableval="$enable_ext_colors"
10746   with_ext_colors=$enableval
10747 else
10748   with_ext_colors=no
10749 fi;
10750 echo "$as_me:10750: result: $with_ext_colors" >&5
10751 echo "${ECHO_T}$with_ext_colors" >&6
10752 NCURSES_EXT_COLORS=0
10753 if test "x$with_ext_colors" = xyes ; then
10754         if test "x$with_widec" != xyes ; then
10755                 { { echo "$as_me:10755: error: This option applies only to wide-character library" >&5
10756 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10757    { (exit 1); exit 1; }; }
10758         else
10759                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10760
10761 if test "${with_abi_version+set}" != set; then
10762         case $cf_cv_rel_version in
10763         5.*)
10764                 cf_cv_rel_version=6.0
10765                 cf_cv_abi_version=6
10766                 { echo "$as_me:10766: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10767 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10768                 ;;
10769         esac
10770 fi
10771
10772         fi
10773         NCURSES_EXT_COLORS=1
10774
10775 cat >>confdefs.h <<\EOF
10776 #define NCURSES_EXT_COLORS 1
10777 EOF
10778
10779 fi
10780
10781 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10782 echo "$as_me:10782: checking if you want to use extended mouse encoding" >&5
10783 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10784
10785 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10786 if test "${enable_ext_mouse+set}" = set; then
10787   enableval="$enable_ext_mouse"
10788   with_ext_mouse=$enableval
10789 else
10790   with_ext_mouse=no
10791 fi;
10792 echo "$as_me:10792: result: $with_ext_mouse" >&5
10793 echo "${ECHO_T}$with_ext_mouse" >&6
10794 NCURSES_MOUSE_VERSION=1
10795 if test "x$with_ext_mouse" = xyes ; then
10796         NCURSES_MOUSE_VERSION=2
10797
10798 if test "${with_abi_version+set}" != set; then
10799         case $cf_cv_rel_version in
10800         5.*)
10801                 cf_cv_rel_version=6.0
10802                 cf_cv_abi_version=6
10803                 { echo "$as_me:10803: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10804 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10805                 ;;
10806         esac
10807 fi
10808
10809 fi
10810
10811 echo "$as_me:10811: checking if you want \$NCURSES_NO_PADDING code" >&5
10812 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10813
10814 # Check whether --enable-no-padding or --disable-no-padding was given.
10815 if test "${enable_no_padding+set}" = set; then
10816   enableval="$enable_no_padding"
10817   with_no_padding=$enableval
10818 else
10819   with_no_padding=$with_ext_funcs
10820 fi;
10821 echo "$as_me:10821: result: $with_no_padding" >&5
10822 echo "${ECHO_T}$with_no_padding" >&6
10823 test "x$with_no_padding" = xyes &&
10824 cat >>confdefs.h <<\EOF
10825 #define NCURSES_NO_PADDING 1
10826 EOF
10827
10828 echo "$as_me:10828: checking for ANSI C header files" >&5
10829 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10830 if test "${ac_cv_header_stdc+set}" = set; then
10831   echo $ECHO_N "(cached) $ECHO_C" >&6
10832 else
10833   cat >conftest.$ac_ext <<_ACEOF
10834 #line 10834 "configure"
10835 #include "confdefs.h"
10836 #include <stdlib.h>
10837 #include <stdarg.h>
10838 #include <string.h>
10839 #include <float.h>
10840
10841 _ACEOF
10842 if { (eval echo "$as_me:10842: \"$ac_cpp conftest.$ac_ext\"") >&5
10843   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10844   ac_status=$?
10845   egrep -v '^ *\+' conftest.er1 >conftest.err
10846   rm -f conftest.er1
10847   cat conftest.err >&5
10848   echo "$as_me:10848: \$? = $ac_status" >&5
10849   (exit $ac_status); } >/dev/null; then
10850   if test -s conftest.err; then
10851     ac_cpp_err=$ac_c_preproc_warn_flag
10852   else
10853     ac_cpp_err=
10854   fi
10855 else
10856   ac_cpp_err=yes
10857 fi
10858 if test -z "$ac_cpp_err"; then
10859   ac_cv_header_stdc=yes
10860 else
10861   echo "$as_me: failed program was:" >&5
10862   cat conftest.$ac_ext >&5
10863   ac_cv_header_stdc=no
10864 fi
10865 rm -f conftest.err conftest.$ac_ext
10866
10867 if test $ac_cv_header_stdc = yes; then
10868   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10869   cat >conftest.$ac_ext <<_ACEOF
10870 #line 10870 "configure"
10871 #include "confdefs.h"
10872 #include <string.h>
10873
10874 _ACEOF
10875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10876   egrep "memchr" >/dev/null 2>&1; then
10877   :
10878 else
10879   ac_cv_header_stdc=no
10880 fi
10881 rm -rf conftest*
10882
10883 fi
10884
10885 if test $ac_cv_header_stdc = yes; then
10886   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10887   cat >conftest.$ac_ext <<_ACEOF
10888 #line 10888 "configure"
10889 #include "confdefs.h"
10890 #include <stdlib.h>
10891
10892 _ACEOF
10893 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10894   egrep "free" >/dev/null 2>&1; then
10895   :
10896 else
10897   ac_cv_header_stdc=no
10898 fi
10899 rm -rf conftest*
10900
10901 fi
10902
10903 if test $ac_cv_header_stdc = yes; then
10904   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10905   if test "$cross_compiling" = yes; then
10906   :
10907 else
10908   cat >conftest.$ac_ext <<_ACEOF
10909 #line 10909 "configure"
10910 #include "confdefs.h"
10911 #include <ctype.h>
10912 #if ((' ' & 0x0FF) == 0x020)
10913 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10914 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10915 #else
10916 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10917                      || ('j' <= (c) && (c) <= 'r') \
10918                      || ('s' <= (c) && (c) <= 'z'))
10919 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10920 #endif
10921
10922 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10923 int
10924 main ()
10925 {
10926   int i;
10927   for (i = 0; i < 256; i++)
10928     if (XOR (islower (i), ISLOWER (i))
10929         || toupper (i) != TOUPPER (i))
10930       $ac_main_return(2);
10931   $ac_main_return (0);
10932 }
10933 _ACEOF
10934 rm -f conftest$ac_exeext
10935 if { (eval echo "$as_me:10935: \"$ac_link\"") >&5
10936   (eval $ac_link) 2>&5
10937   ac_status=$?
10938   echo "$as_me:10938: \$? = $ac_status" >&5
10939   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10940   { (eval echo "$as_me:10940: \"$ac_try\"") >&5
10941   (eval $ac_try) 2>&5
10942   ac_status=$?
10943   echo "$as_me:10943: \$? = $ac_status" >&5
10944   (exit $ac_status); }; }; then
10945   :
10946 else
10947   echo "$as_me: program exited with status $ac_status" >&5
10948 echo "$as_me: failed program was:" >&5
10949 cat conftest.$ac_ext >&5
10950 ac_cv_header_stdc=no
10951 fi
10952 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10953 fi
10954 fi
10955 fi
10956 echo "$as_me:10956: result: $ac_cv_header_stdc" >&5
10957 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10958 if test $ac_cv_header_stdc = yes; then
10959
10960 cat >>confdefs.h <<\EOF
10961 #define STDC_HEADERS 1
10962 EOF
10963
10964 fi
10965
10966 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10967
10968 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10969                   inttypes.h stdint.h unistd.h
10970 do
10971 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10972 echo "$as_me:10972: checking for $ac_header" >&5
10973 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10974 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10975   echo $ECHO_N "(cached) $ECHO_C" >&6
10976 else
10977   cat >conftest.$ac_ext <<_ACEOF
10978 #line 10978 "configure"
10979 #include "confdefs.h"
10980 $ac_includes_default
10981 #include <$ac_header>
10982 _ACEOF
10983 rm -f conftest.$ac_objext
10984 if { (eval echo "$as_me:10984: \"$ac_compile\"") >&5
10985   (eval $ac_compile) 2>&5
10986   ac_status=$?
10987   echo "$as_me:10987: \$? = $ac_status" >&5
10988   (exit $ac_status); } &&
10989          { ac_try='test -s conftest.$ac_objext'
10990   { (eval echo "$as_me:10990: \"$ac_try\"") >&5
10991   (eval $ac_try) 2>&5
10992   ac_status=$?
10993   echo "$as_me:10993: \$? = $ac_status" >&5
10994   (exit $ac_status); }; }; then
10995   eval "$as_ac_Header=yes"
10996 else
10997   echo "$as_me: failed program was:" >&5
10998 cat conftest.$ac_ext >&5
10999 eval "$as_ac_Header=no"
11000 fi
11001 rm -f conftest.$ac_objext conftest.$ac_ext
11002 fi
11003 echo "$as_me:11003: result: `eval echo '${'$as_ac_Header'}'`" >&5
11004 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11005 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11006   cat >>confdefs.h <<EOF
11007 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11008 EOF
11009
11010 fi
11011 done
11012
11013 echo "$as_me:11013: checking for signed char" >&5
11014 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11015 if test "${ac_cv_type_signed_char+set}" = set; then
11016   echo $ECHO_N "(cached) $ECHO_C" >&6
11017 else
11018   cat >conftest.$ac_ext <<_ACEOF
11019 #line 11019 "configure"
11020 #include "confdefs.h"
11021 $ac_includes_default
11022 int
11023 main ()
11024 {
11025 if ((signed char *) 0)
11026   return 0;
11027 if (sizeof (signed char))
11028   return 0;
11029   ;
11030   return 0;
11031 }
11032 _ACEOF
11033 rm -f conftest.$ac_objext
11034 if { (eval echo "$as_me:11034: \"$ac_compile\"") >&5
11035   (eval $ac_compile) 2>&5
11036   ac_status=$?
11037   echo "$as_me:11037: \$? = $ac_status" >&5
11038   (exit $ac_status); } &&
11039          { ac_try='test -s conftest.$ac_objext'
11040   { (eval echo "$as_me:11040: \"$ac_try\"") >&5
11041   (eval $ac_try) 2>&5
11042   ac_status=$?
11043   echo "$as_me:11043: \$? = $ac_status" >&5
11044   (exit $ac_status); }; }; then
11045   ac_cv_type_signed_char=yes
11046 else
11047   echo "$as_me: failed program was:" >&5
11048 cat conftest.$ac_ext >&5
11049 ac_cv_type_signed_char=no
11050 fi
11051 rm -f conftest.$ac_objext conftest.$ac_ext
11052 fi
11053 echo "$as_me:11053: result: $ac_cv_type_signed_char" >&5
11054 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11055
11056 echo "$as_me:11056: checking size of signed char" >&5
11057 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11058 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11059   echo $ECHO_N "(cached) $ECHO_C" >&6
11060 else
11061   if test "$ac_cv_type_signed_char" = yes; then
11062   if test "$cross_compiling" = yes; then
11063   # Depending upon the size, compute the lo and hi bounds.
11064 cat >conftest.$ac_ext <<_ACEOF
11065 #line 11065 "configure"
11066 #include "confdefs.h"
11067 $ac_includes_default
11068 int
11069 main ()
11070 {
11071 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11072   ;
11073   return 0;
11074 }
11075 _ACEOF
11076 rm -f conftest.$ac_objext
11077 if { (eval echo "$as_me:11077: \"$ac_compile\"") >&5
11078   (eval $ac_compile) 2>&5
11079   ac_status=$?
11080   echo "$as_me:11080: \$? = $ac_status" >&5
11081   (exit $ac_status); } &&
11082          { ac_try='test -s conftest.$ac_objext'
11083   { (eval echo "$as_me:11083: \"$ac_try\"") >&5
11084   (eval $ac_try) 2>&5
11085   ac_status=$?
11086   echo "$as_me:11086: \$? = $ac_status" >&5
11087   (exit $ac_status); }; }; then
11088   ac_lo=0 ac_mid=0
11089   while :; do
11090     cat >conftest.$ac_ext <<_ACEOF
11091 #line 11091 "configure"
11092 #include "confdefs.h"
11093 $ac_includes_default
11094 int
11095 main ()
11096 {
11097 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11098   ;
11099   return 0;
11100 }
11101 _ACEOF
11102 rm -f conftest.$ac_objext
11103 if { (eval echo "$as_me:11103: \"$ac_compile\"") >&5
11104   (eval $ac_compile) 2>&5
11105   ac_status=$?
11106   echo "$as_me:11106: \$? = $ac_status" >&5
11107   (exit $ac_status); } &&
11108          { ac_try='test -s conftest.$ac_objext'
11109   { (eval echo "$as_me:11109: \"$ac_try\"") >&5
11110   (eval $ac_try) 2>&5
11111   ac_status=$?
11112   echo "$as_me:11112: \$? = $ac_status" >&5
11113   (exit $ac_status); }; }; then
11114   ac_hi=$ac_mid; break
11115 else
11116   echo "$as_me: failed program was:" >&5
11117 cat conftest.$ac_ext >&5
11118 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11119 fi
11120 rm -f conftest.$ac_objext conftest.$ac_ext
11121   done
11122 else
11123   echo "$as_me: failed program was:" >&5
11124 cat conftest.$ac_ext >&5
11125 ac_hi=-1 ac_mid=-1
11126   while :; do
11127     cat >conftest.$ac_ext <<_ACEOF
11128 #line 11128 "configure"
11129 #include "confdefs.h"
11130 $ac_includes_default
11131 int
11132 main ()
11133 {
11134 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11135   ;
11136   return 0;
11137 }
11138 _ACEOF
11139 rm -f conftest.$ac_objext
11140 if { (eval echo "$as_me:11140: \"$ac_compile\"") >&5
11141   (eval $ac_compile) 2>&5
11142   ac_status=$?
11143   echo "$as_me:11143: \$? = $ac_status" >&5
11144   (exit $ac_status); } &&
11145          { ac_try='test -s conftest.$ac_objext'
11146   { (eval echo "$as_me:11146: \"$ac_try\"") >&5
11147   (eval $ac_try) 2>&5
11148   ac_status=$?
11149   echo "$as_me:11149: \$? = $ac_status" >&5
11150   (exit $ac_status); }; }; then
11151   ac_lo=$ac_mid; break
11152 else
11153   echo "$as_me: failed program was:" >&5
11154 cat conftest.$ac_ext >&5
11155 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11156 fi
11157 rm -f conftest.$ac_objext conftest.$ac_ext
11158   done
11159 fi
11160 rm -f conftest.$ac_objext conftest.$ac_ext
11161 # Binary search between lo and hi bounds.
11162 while test "x$ac_lo" != "x$ac_hi"; do
11163   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11164   cat >conftest.$ac_ext <<_ACEOF
11165 #line 11165 "configure"
11166 #include "confdefs.h"
11167 $ac_includes_default
11168 int
11169 main ()
11170 {
11171 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11172   ;
11173   return 0;
11174 }
11175 _ACEOF
11176 rm -f conftest.$ac_objext
11177 if { (eval echo "$as_me:11177: \"$ac_compile\"") >&5
11178   (eval $ac_compile) 2>&5
11179   ac_status=$?
11180   echo "$as_me:11180: \$? = $ac_status" >&5
11181   (exit $ac_status); } &&
11182          { ac_try='test -s conftest.$ac_objext'
11183   { (eval echo "$as_me:11183: \"$ac_try\"") >&5
11184   (eval $ac_try) 2>&5
11185   ac_status=$?
11186   echo "$as_me:11186: \$? = $ac_status" >&5
11187   (exit $ac_status); }; }; then
11188   ac_hi=$ac_mid
11189 else
11190   echo "$as_me: failed program was:" >&5
11191 cat conftest.$ac_ext >&5
11192 ac_lo=`expr $ac_mid + 1`
11193 fi
11194 rm -f conftest.$ac_objext conftest.$ac_ext
11195 done
11196 ac_cv_sizeof_signed_char=$ac_lo
11197 else
11198   if test "$cross_compiling" = yes; then
11199   { { echo "$as_me:11199: error: cannot run test program while cross compiling" >&5
11200 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11201    { (exit 1); exit 1; }; }
11202 else
11203   cat >conftest.$ac_ext <<_ACEOF
11204 #line 11204 "configure"
11205 #include "confdefs.h"
11206 $ac_includes_default
11207 int
11208 main ()
11209 {
11210 FILE *f = fopen ("conftest.val", "w");
11211 if (!f)
11212   $ac_main_return (1);
11213 fprintf (f, "%d", (sizeof (signed char)));
11214 fclose (f);
11215   ;
11216   return 0;
11217 }
11218 _ACEOF
11219 rm -f conftest$ac_exeext
11220 if { (eval echo "$as_me:11220: \"$ac_link\"") >&5
11221   (eval $ac_link) 2>&5
11222   ac_status=$?
11223   echo "$as_me:11223: \$? = $ac_status" >&5
11224   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11225   { (eval echo "$as_me:11225: \"$ac_try\"") >&5
11226   (eval $ac_try) 2>&5
11227   ac_status=$?
11228   echo "$as_me:11228: \$? = $ac_status" >&5
11229   (exit $ac_status); }; }; then
11230   ac_cv_sizeof_signed_char=`cat conftest.val`
11231 else
11232   echo "$as_me: program exited with status $ac_status" >&5
11233 echo "$as_me: failed program was:" >&5
11234 cat conftest.$ac_ext >&5
11235 fi
11236 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11237 fi
11238 fi
11239 rm -f conftest.val
11240 else
11241   ac_cv_sizeof_signed_char=0
11242 fi
11243 fi
11244 echo "$as_me:11244: result: $ac_cv_sizeof_signed_char" >&5
11245 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11246 cat >>confdefs.h <<EOF
11247 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11248 EOF
11249
11250 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11251         NCURSES_SBOOL="signed char"
11252 else
11253         NCURSES_SBOOL="char"
11254 fi
11255 echo "$as_me:11255: checking if you want to use signed Boolean array in term.h" >&5
11256 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11257
11258 # Check whether --enable-signed-char or --disable-signed-char was given.
11259 if test "${enable_signed_char+set}" = set; then
11260   enableval="$enable_signed_char"
11261   with_signed_char=$enableval
11262 else
11263   with_signed_char=no
11264 fi;
11265 echo "$as_me:11265: result: $with_signed_char" >&5
11266 echo "${ECHO_T}$with_signed_char" >&6
11267 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11268
11269 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11270 echo "$as_me:11270: checking if you want SIGWINCH handler" >&5
11271 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11272
11273 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11274 if test "${enable_sigwinch+set}" = set; then
11275   enableval="$enable_sigwinch"
11276   with_sigwinch=$enableval
11277 else
11278   with_sigwinch=$with_ext_funcs
11279 fi;
11280 echo "$as_me:11280: result: $with_sigwinch" >&5
11281 echo "${ECHO_T}$with_sigwinch" >&6
11282 test "x$with_sigwinch" = xyes &&
11283 cat >>confdefs.h <<\EOF
11284 #define USE_SIGWINCH 1
11285 EOF
11286
11287 ###   use option --enable-tcap-names to allow user to define new capabilities
11288 echo "$as_me:11288: checking if you want user-definable terminal capabilities like termcap" >&5
11289 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11290
11291 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11292 if test "${enable_tcap_names+set}" = set; then
11293   enableval="$enable_tcap_names"
11294   with_tcap_names=$enableval
11295 else
11296   with_tcap_names=$with_ext_funcs
11297 fi;
11298 echo "$as_me:11298: result: $with_tcap_names" >&5
11299 echo "${ECHO_T}$with_tcap_names" >&6
11300 NCURSES_XNAMES=0
11301 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11302
11303 ###############################################################################
11304 # These options are relatively safe to experiment with.
11305
11306 echo "$as_me:11306: checking if you want all development code" >&5
11307 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11308
11309 # Check whether --with-develop or --without-develop was given.
11310 if test "${with_develop+set}" = set; then
11311   withval="$with_develop"
11312   with_develop=$withval
11313 else
11314   with_develop=no
11315 fi;
11316 echo "$as_me:11316: result: $with_develop" >&5
11317 echo "${ECHO_T}$with_develop" >&6
11318
11319 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11320 echo "$as_me:11320: checking if you want hard-tabs code" >&5
11321 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11322
11323 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11324 if test "${enable_hard_tabs+set}" = set; then
11325   enableval="$enable_hard_tabs"
11326
11327 else
11328   enable_hard_tabs=$with_develop
11329 fi;
11330 echo "$as_me:11330: result: $enable_hard_tabs" >&5
11331 echo "${ECHO_T}$enable_hard_tabs" >&6
11332 test "x$enable_hard_tabs" = xyes &&
11333 cat >>confdefs.h <<\EOF
11334 #define USE_HARD_TABS 1
11335 EOF
11336
11337 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11338 echo "$as_me:11338: checking if you want limited support for xmc" >&5
11339 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11340
11341 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11342 if test "${enable_xmc_glitch+set}" = set; then
11343   enableval="$enable_xmc_glitch"
11344
11345 else
11346   enable_xmc_glitch=$with_develop
11347 fi;
11348 echo "$as_me:11348: result: $enable_xmc_glitch" >&5
11349 echo "${ECHO_T}$enable_xmc_glitch" >&6
11350 test "x$enable_xmc_glitch" = xyes &&
11351 cat >>confdefs.h <<\EOF
11352 #define USE_XMC_SUPPORT 1
11353 EOF
11354
11355 ###############################################################################
11356 # These are just experimental, probably should not be in a package:
11357
11358 echo "$as_me:11358: checking if you do not want to assume colors are white-on-black" >&5
11359 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11360
11361 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11362 if test "${enable_assumed_color+set}" = set; then
11363   enableval="$enable_assumed_color"
11364   with_assumed_color=$enableval
11365 else
11366   with_assumed_color=yes
11367 fi;
11368 echo "$as_me:11368: result: $with_assumed_color" >&5
11369 echo "${ECHO_T}$with_assumed_color" >&6
11370 test "x$with_assumed_color" = xyes &&
11371 cat >>confdefs.h <<\EOF
11372 #define USE_ASSUMED_COLOR 1
11373 EOF
11374
11375 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11376 echo "$as_me:11376: checking if you want hashmap scrolling-optimization code" >&5
11377 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11378
11379 # Check whether --enable-hashmap or --disable-hashmap was given.
11380 if test "${enable_hashmap+set}" = set; then
11381   enableval="$enable_hashmap"
11382   with_hashmap=$enableval
11383 else
11384   with_hashmap=yes
11385 fi;
11386 echo "$as_me:11386: result: $with_hashmap" >&5
11387 echo "${ECHO_T}$with_hashmap" >&6
11388 test "x$with_hashmap" = xyes &&
11389 cat >>confdefs.h <<\EOF
11390 #define USE_HASHMAP 1
11391 EOF
11392
11393 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11394 echo "$as_me:11394: checking if you want colorfgbg code" >&5
11395 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11396
11397 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11398 if test "${enable_colorfgbg+set}" = set; then
11399   enableval="$enable_colorfgbg"
11400   with_colorfgbg=$enableval
11401 else
11402   with_colorfgbg=no
11403 fi;
11404 echo "$as_me:11404: result: $with_colorfgbg" >&5
11405 echo "${ECHO_T}$with_colorfgbg" >&6
11406 test "x$with_colorfgbg" = xyes &&
11407 cat >>confdefs.h <<\EOF
11408 #define USE_COLORFGBG 1
11409 EOF
11410
11411 ###   use option --enable-interop to turn on use of bindings used for interop
11412 echo "$as_me:11412: checking if you want interop bindings" >&5
11413 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11414
11415 # Check whether --enable-interop or --disable-interop was given.
11416 if test "${enable_interop+set}" = set; then
11417   enableval="$enable_interop"
11418   with_exp_interop=$enableval
11419 else
11420   with_exp_interop=no
11421 fi;
11422 echo "$as_me:11422: result: $with_exp_interop" >&5
11423 echo "${ECHO_T}$with_exp_interop" >&6
11424
11425 NCURSES_INTEROP_FUNCS=0
11426 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11427
11428 # This is still experimental (20080329), but should ultimately be moved to
11429 # the script-block --with-normal, etc.
11430
11431 echo "$as_me:11431: checking if you want to link with the pthread library" >&5
11432 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11433
11434 # Check whether --with-pthread or --without-pthread was given.
11435 if test "${with_pthread+set}" = set; then
11436   withval="$with_pthread"
11437   with_pthread=$withval
11438 else
11439   with_pthread=no
11440 fi;
11441 echo "$as_me:11441: result: $with_pthread" >&5
11442 echo "${ECHO_T}$with_pthread" >&6
11443
11444 if test "$with_pthread" != no ; then
11445     echo "$as_me:11445: checking for pthread.h" >&5
11446 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11447 if test "${ac_cv_header_pthread_h+set}" = set; then
11448   echo $ECHO_N "(cached) $ECHO_C" >&6
11449 else
11450   cat >conftest.$ac_ext <<_ACEOF
11451 #line 11451 "configure"
11452 #include "confdefs.h"
11453 #include <pthread.h>
11454 _ACEOF
11455 if { (eval echo "$as_me:11455: \"$ac_cpp conftest.$ac_ext\"") >&5
11456   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11457   ac_status=$?
11458   egrep -v '^ *\+' conftest.er1 >conftest.err
11459   rm -f conftest.er1
11460   cat conftest.err >&5
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit $ac_status); } >/dev/null; then
11463   if test -s conftest.err; then
11464     ac_cpp_err=$ac_c_preproc_warn_flag
11465   else
11466     ac_cpp_err=
11467   fi
11468 else
11469   ac_cpp_err=yes
11470 fi
11471 if test -z "$ac_cpp_err"; then
11472   ac_cv_header_pthread_h=yes
11473 else
11474   echo "$as_me: failed program was:" >&5
11475   cat conftest.$ac_ext >&5
11476   ac_cv_header_pthread_h=no
11477 fi
11478 rm -f conftest.err conftest.$ac_ext
11479 fi
11480 echo "$as_me:11480: result: $ac_cv_header_pthread_h" >&5
11481 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11482 if test $ac_cv_header_pthread_h = yes; then
11483
11484 cat >>confdefs.h <<\EOF
11485 #define HAVE_PTHREADS_H 1
11486 EOF
11487
11488         for cf_lib_pthread in pthread c_r
11489         do
11490             echo "$as_me:11490: checking if we can link with the $cf_lib_pthread library" >&5
11491 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11492             cf_save_LIBS="$LIBS"
11493             LIBS="-l$cf_lib_pthread $LIBS"
11494             cat >conftest.$ac_ext <<_ACEOF
11495 #line 11495 "configure"
11496 #include "confdefs.h"
11497
11498 #include <pthread.h>
11499
11500 int
11501 main ()
11502 {
11503
11504                 int rc = pthread_create(0,0,0,0);
11505                 int r2 = pthread_mutexattr_settype(0, 0);
11506
11507   ;
11508   return 0;
11509 }
11510 _ACEOF
11511 rm -f conftest.$ac_objext conftest$ac_exeext
11512 if { (eval echo "$as_me:11512: \"$ac_link\"") >&5
11513   (eval $ac_link) 2>&5
11514   ac_status=$?
11515   echo "$as_me:11515: \$? = $ac_status" >&5
11516   (exit $ac_status); } &&
11517          { ac_try='test -s conftest$ac_exeext'
11518   { (eval echo "$as_me:11518: \"$ac_try\"") >&5
11519   (eval $ac_try) 2>&5
11520   ac_status=$?
11521   echo "$as_me:11521: \$? = $ac_status" >&5
11522   (exit $ac_status); }; }; then
11523   with_pthread=yes
11524 else
11525   echo "$as_me: failed program was:" >&5
11526 cat conftest.$ac_ext >&5
11527 with_pthread=no
11528 fi
11529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11530             LIBS="$cf_save_LIBS"
11531             echo "$as_me:11531: result: $with_pthread" >&5
11532 echo "${ECHO_T}$with_pthread" >&6
11533             test "$with_pthread" = yes && break
11534         done
11535
11536         if test "$with_pthread" = yes ; then
11537             LIBS="-l$cf_lib_pthread $LIBS"
11538
11539 cat >>confdefs.h <<\EOF
11540 #define HAVE_LIBPTHREADS 1
11541 EOF
11542
11543         else
11544             { { echo "$as_me:11544: error: Cannot link with pthread library" >&5
11545 echo "$as_me: error: Cannot link with pthread library" >&2;}
11546    { (exit 1); exit 1; }; }
11547         fi
11548
11549 fi
11550
11551 fi
11552
11553 if test "x$with_pthread" != xno; then
11554         echo "$as_me:11554: checking for pthread_kill" >&5
11555 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11556 if test "${ac_cv_func_pthread_kill+set}" = set; then
11557   echo $ECHO_N "(cached) $ECHO_C" >&6
11558 else
11559   cat >conftest.$ac_ext <<_ACEOF
11560 #line 11560 "configure"
11561 #include "confdefs.h"
11562 /* System header to define __stub macros and hopefully few prototypes,
11563     which can conflict with char pthread_kill (); below.  */
11564 #include <assert.h>
11565 /* Override any gcc2 internal prototype to avoid an error.  */
11566 #ifdef __cplusplus
11567 extern "C"
11568 #endif
11569 /* We use char because int might match the return type of a gcc2
11570    builtin and then its argument prototype would still apply.  */
11571 char pthread_kill ();
11572 char (*f) ();
11573
11574 int
11575 main ()
11576 {
11577 /* The GNU C library defines this for functions which it implements
11578     to always fail with ENOSYS.  Some functions are actually named
11579     something starting with __ and the normal name is an alias.  */
11580 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11581 choke me
11582 #else
11583 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11584 #endif
11585
11586   ;
11587   return 0;
11588 }
11589 _ACEOF
11590 rm -f conftest.$ac_objext conftest$ac_exeext
11591 if { (eval echo "$as_me:11591: \"$ac_link\"") >&5
11592   (eval $ac_link) 2>&5
11593   ac_status=$?
11594   echo "$as_me:11594: \$? = $ac_status" >&5
11595   (exit $ac_status); } &&
11596          { ac_try='test -s conftest$ac_exeext'
11597   { (eval echo "$as_me:11597: \"$ac_try\"") >&5
11598   (eval $ac_try) 2>&5
11599   ac_status=$?
11600   echo "$as_me:11600: \$? = $ac_status" >&5
11601   (exit $ac_status); }; }; then
11602   ac_cv_func_pthread_kill=yes
11603 else
11604   echo "$as_me: failed program was:" >&5
11605 cat conftest.$ac_ext >&5
11606 ac_cv_func_pthread_kill=no
11607 fi
11608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11609 fi
11610 echo "$as_me:11610: result: $ac_cv_func_pthread_kill" >&5
11611 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11612 if test $ac_cv_func_pthread_kill = yes; then
11613
11614                 echo "$as_me:11614: checking if you want to allow EINTR in wgetch with pthreads" >&5
11615 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11616
11617 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11618 if test "${enable_pthreads_eintr+set}" = set; then
11619   enableval="$enable_pthreads_eintr"
11620   use_pthreads_eintr=$enableval
11621 else
11622   use_pthreads_eintr=no
11623 fi;
11624                 echo "$as_me:11624: result: $use_pthreads_eintr" >&5
11625 echo "${ECHO_T}$use_pthreads_eintr" >&6
11626                 if test "x$use_pthreads_eintr" = xyes ; then
11627
11628 cat >>confdefs.h <<\EOF
11629 #define USE_PTHREADS_EINTR 1
11630 EOF
11631
11632                 fi
11633 fi
11634
11635         echo "$as_me:11635: checking if you want to use weak-symbols for pthreads" >&5
11636 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11637
11638 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11639 if test "${enable_weak_symbols+set}" = set; then
11640   enableval="$enable_weak_symbols"
11641   use_weak_symbols=$enableval
11642 else
11643   use_weak_symbols=no
11644 fi;
11645         echo "$as_me:11645: result: $use_weak_symbols" >&5
11646 echo "${ECHO_T}$use_weak_symbols" >&6
11647         if test "x$use_weak_symbols" = xyes ; then
11648
11649 echo "$as_me:11649: checking if $CC supports weak symbols" >&5
11650 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11651 if test "${cf_cv_weak_symbols+set}" = set; then
11652   echo $ECHO_N "(cached) $ECHO_C" >&6
11653 else
11654
11655 cat >conftest.$ac_ext <<_ACEOF
11656 #line 11656 "configure"
11657 #include "confdefs.h"
11658
11659 #include <stdio.h>
11660 int
11661 main ()
11662 {
11663
11664 #if defined(__GNUC__)
11665 #  if defined __USE_ISOC99
11666 #    define _cat_pragma(exp)    _Pragma(#exp)
11667 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11668 #  else
11669 #    define _weak_pragma(exp)
11670 #  endif
11671 #  define _declare(name)        __extension__ extern __typeof__(name) name
11672 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11673 #endif
11674
11675 weak_symbol(fopen);
11676
11677   ;
11678   return 0;
11679 }
11680 _ACEOF
11681 rm -f conftest.$ac_objext
11682 if { (eval echo "$as_me:11682: \"$ac_compile\"") >&5
11683   (eval $ac_compile) 2>&5
11684   ac_status=$?
11685   echo "$as_me:11685: \$? = $ac_status" >&5
11686   (exit $ac_status); } &&
11687          { ac_try='test -s conftest.$ac_objext'
11688   { (eval echo "$as_me:11688: \"$ac_try\"") >&5
11689   (eval $ac_try) 2>&5
11690   ac_status=$?
11691   echo "$as_me:11691: \$? = $ac_status" >&5
11692   (exit $ac_status); }; }; then
11693   cf_cv_weak_symbols=yes
11694 else
11695   echo "$as_me: failed program was:" >&5
11696 cat conftest.$ac_ext >&5
11697 cf_cv_weak_symbols=no
11698 fi
11699 rm -f conftest.$ac_objext conftest.$ac_ext
11700
11701 fi
11702 echo "$as_me:11702: result: $cf_cv_weak_symbols" >&5
11703 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11704
11705         else
11706                 cf_cv_weak_symbols=no
11707         fi
11708
11709         if test "x$cf_cv_weak_symbols" = xyes ; then
11710
11711 cat >>confdefs.h <<\EOF
11712 #define USE_WEAK_SYMBOLS 1
11713 EOF
11714
11715         fi
11716 fi
11717
11718 PTHREAD=
11719 if test "x$with_pthread" = "xyes" ; then
11720
11721 cat >>confdefs.h <<\EOF
11722 #define USE_PTHREADS 1
11723 EOF
11724
11725     enable_reentrant=yes
11726     if test "x$cf_cv_weak_symbols" = xyes ; then
11727         PTHREAD=-lpthread
11728     fi
11729 fi
11730
11731 # Reentrant code has to be opaque; there's little advantage to making ncurses
11732 # opaque outside of that, so there is no --enable-opaque option.  We can use
11733 # this option without --with-pthreads, but this will be always set for
11734 # pthreads.
11735 echo "$as_me:11735: checking if you want experimental reentrant code" >&5
11736 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11737
11738 # Check whether --enable-reentrant or --disable-reentrant was given.
11739 if test "${enable_reentrant+set}" = set; then
11740   enableval="$enable_reentrant"
11741   with_reentrant=$enableval
11742 else
11743   with_reentrant=no
11744 fi;
11745 echo "$as_me:11745: result: $with_reentrant" >&5
11746 echo "${ECHO_T}$with_reentrant" >&6
11747 if test "x$with_reentrant" = xyes ; then
11748         cf_cv_enable_reentrant=1
11749         cf_cv_enable_opaque="NCURSES_INTERNALS"
11750         NCURSES_OPAQUE=1
11751         NCURSES_SIZE_T=int
11752         if test "x$cf_cv_weak_symbols" = xyes ; then
11753
11754 # remove pthread library from $LIBS
11755 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11756
11757                 TEST_LIBS="-lpthread $TEST_LIBS"
11758                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11759         else
11760                 LIB_SUFFIX="t${LIB_SUFFIX}"
11761         fi
11762
11763 cat >>confdefs.h <<\EOF
11764 #define USE_REENTRANT 1
11765 EOF
11766
11767 if test "${with_abi_version+set}" != set; then
11768         case $cf_cv_rel_version in
11769         5.*)
11770                 cf_cv_rel_version=6.0
11771                 cf_cv_abi_version=6
11772                 { echo "$as_me:11772: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11773 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11774                 ;;
11775         esac
11776 fi
11777
11778 else
11779         cf_cv_enable_reentrant=0
11780         cf_cv_enable_opaque="NCURSES_OPAQUE"
11781         NCURSES_OPAQUE=0
11782         NCURSES_SIZE_T=short
11783 fi
11784
11785 ### Allow using a different wrap-prefix
11786 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11787         echo "$as_me:11787: checking for prefix used to wrap public variables" >&5
11788 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11789
11790 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11791 if test "${with_wrap_prefix+set}" = set; then
11792   withval="$with_wrap_prefix"
11793   NCURSES_WRAP_PREFIX=$withval
11794 else
11795   NCURSES_WRAP_PREFIX=_nc_
11796 fi;
11797         echo "$as_me:11797: result: $NCURSES_WRAP_PREFIX" >&5
11798 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11799 else
11800         NCURSES_WRAP_PREFIX=_nc_
11801 fi
11802
11803 cat >>confdefs.h <<EOF
11804 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11805 EOF
11806
11807 echo "$as_me:11807: checking if you want experimental safe-sprintf code" >&5
11808 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11809
11810 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11811 if test "${enable_safe_sprintf+set}" = set; then
11812   enableval="$enable_safe_sprintf"
11813   with_safe_sprintf=$enableval
11814 else
11815   with_safe_sprintf=no
11816 fi;
11817 echo "$as_me:11817: result: $with_safe_sprintf" >&5
11818 echo "${ECHO_T}$with_safe_sprintf" >&6
11819 test "x$with_safe_sprintf" = xyes &&
11820 cat >>confdefs.h <<\EOF
11821 #define USE_SAFE_SPRINTF 1
11822 EOF
11823
11824 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11825 # when hashmap is used scroll hints are useless
11826 if test "$with_hashmap" = no ; then
11827 echo "$as_me:11827: checking if you want to experiment without scrolling-hints code" >&5
11828 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11829
11830 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11831 if test "${enable_scroll_hints+set}" = set; then
11832   enableval="$enable_scroll_hints"
11833   with_scroll_hints=$enableval
11834 else
11835   with_scroll_hints=yes
11836 fi;
11837 echo "$as_me:11837: result: $with_scroll_hints" >&5
11838 echo "${ECHO_T}$with_scroll_hints" >&6
11839 test "x$with_scroll_hints" = xyes &&
11840 cat >>confdefs.h <<\EOF
11841 #define USE_SCROLL_HINTS 1
11842 EOF
11843
11844 fi
11845
11846 echo "$as_me:11846: checking if you want experimental wgetch-events code" >&5
11847 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11848
11849 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11850 if test "${enable_wgetch_events+set}" = set; then
11851   enableval="$enable_wgetch_events"
11852   with_wgetch_events=$enableval
11853 else
11854   with_wgetch_events=no
11855 fi;
11856 echo "$as_me:11856: result: $with_wgetch_events" >&5
11857 echo "${ECHO_T}$with_wgetch_events" >&6
11858 test "x$with_wgetch_events" = xyes &&
11859 cat >>confdefs.h <<\EOF
11860 #define NCURSES_WGETCH_EVENTS 1
11861 EOF
11862
11863 ###############################################################################
11864
11865 ###     use option --disable-echo to suppress full display compiling commands
11866
11867 echo "$as_me:11867: checking if you want to see long compiling messages" >&5
11868 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11869
11870 # Check whether --enable-echo or --disable-echo was given.
11871 if test "${enable_echo+set}" = set; then
11872   enableval="$enable_echo"
11873   test "$enableval" != no && enableval=yes
11874   if test "$enableval" != "yes" ; then
11875
11876     ECHO_LT='--silent'
11877     ECHO_LD='@echo linking $@;'
11878     RULE_CC='@echo compiling $<'
11879     SHOW_CC='@echo compiling $@'
11880     ECHO_CC='@'
11881
11882   else
11883
11884     ECHO_LT=''
11885     ECHO_LD=''
11886     RULE_CC=''
11887     SHOW_CC=''
11888     ECHO_CC=''
11889
11890   fi
11891 else
11892   enableval=yes
11893
11894     ECHO_LT=''
11895     ECHO_LD=''
11896     RULE_CC=''
11897     SHOW_CC=''
11898     ECHO_CC=''
11899
11900 fi;
11901 echo "$as_me:11901: result: $enableval" >&5
11902 echo "${ECHO_T}$enableval" >&6
11903
11904 if test "x$enable_echo" = xyes; then
11905         ECHO_LINK=
11906 else
11907         ECHO_LINK='@ echo linking $@ ... ;'
11908         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11909         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11910 fi
11911
11912 ###     use option --enable-warnings to turn on all gcc warnings
11913 echo "$as_me:11913: checking if you want to see compiler warnings" >&5
11914 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11915
11916 # Check whether --enable-warnings or --disable-warnings was given.
11917 if test "${enable_warnings+set}" = set; then
11918   enableval="$enable_warnings"
11919   with_warnings=$enableval
11920 fi;
11921 echo "$as_me:11921: result: $with_warnings" >&5
11922 echo "${ECHO_T}$with_warnings" >&6
11923
11924 if test "x$with_warnings" = "xyes"; then
11925
11926         ADAFLAGS="$ADAFLAGS -gnatg"
11927
11928 INTEL_COMPILER=no
11929
11930 if test "$GCC" = yes ; then
11931         case $host_os in
11932         linux*|gnu*)
11933                 echo "$as_me:11933: checking if this is really Intel C compiler" >&5
11934 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11935                 cf_save_CFLAGS="$CFLAGS"
11936                 CFLAGS="$CFLAGS -no-gcc"
11937                 cat >conftest.$ac_ext <<_ACEOF
11938 #line 11938 "configure"
11939 #include "confdefs.h"
11940
11941 int
11942 main ()
11943 {
11944
11945 #ifdef __INTEL_COMPILER
11946 #else
11947 make an error
11948 #endif
11949
11950   ;
11951   return 0;
11952 }
11953 _ACEOF
11954 rm -f conftest.$ac_objext
11955 if { (eval echo "$as_me:11955: \"$ac_compile\"") >&5
11956   (eval $ac_compile) 2>&5
11957   ac_status=$?
11958   echo "$as_me:11958: \$? = $ac_status" >&5
11959   (exit $ac_status); } &&
11960          { ac_try='test -s conftest.$ac_objext'
11961   { (eval echo "$as_me:11961: \"$ac_try\"") >&5
11962   (eval $ac_try) 2>&5
11963   ac_status=$?
11964   echo "$as_me:11964: \$? = $ac_status" >&5
11965   (exit $ac_status); }; }; then
11966   INTEL_COMPILER=yes
11967 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11968
11969 else
11970   echo "$as_me: failed program was:" >&5
11971 cat conftest.$ac_ext >&5
11972 fi
11973 rm -f conftest.$ac_objext conftest.$ac_ext
11974                 CFLAGS="$cf_save_CFLAGS"
11975                 echo "$as_me:11975: result: $INTEL_COMPILER" >&5
11976 echo "${ECHO_T}$INTEL_COMPILER" >&6
11977                 ;;
11978         esac
11979 fi
11980
11981 CLANG_COMPILER=no
11982
11983 if test "$GCC" = yes ; then
11984         echo "$as_me:11984: checking if this is really Clang C compiler" >&5
11985 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11986         cf_save_CFLAGS="$CFLAGS"
11987         CFLAGS="$CFLAGS -Qunused-arguments"
11988         cat >conftest.$ac_ext <<_ACEOF
11989 #line 11989 "configure"
11990 #include "confdefs.h"
11991
11992 int
11993 main ()
11994 {
11995
11996 #ifdef __clang__
11997 #else
11998 make an error
11999 #endif
12000
12001   ;
12002   return 0;
12003 }
12004 _ACEOF
12005 rm -f conftest.$ac_objext
12006 if { (eval echo "$as_me:12006: \"$ac_compile\"") >&5
12007   (eval $ac_compile) 2>&5
12008   ac_status=$?
12009   echo "$as_me:12009: \$? = $ac_status" >&5
12010   (exit $ac_status); } &&
12011          { ac_try='test -s conftest.$ac_objext'
12012   { (eval echo "$as_me:12012: \"$ac_try\"") >&5
12013   (eval $ac_try) 2>&5
12014   ac_status=$?
12015   echo "$as_me:12015: \$? = $ac_status" >&5
12016   (exit $ac_status); }; }; then
12017   CLANG_COMPILER=yes
12018 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12019
12020 else
12021   echo "$as_me: failed program was:" >&5
12022 cat conftest.$ac_ext >&5
12023 fi
12024 rm -f conftest.$ac_objext conftest.$ac_ext
12025         CFLAGS="$cf_save_CFLAGS"
12026         echo "$as_me:12026: result: $CLANG_COMPILER" >&5
12027 echo "${ECHO_T}$CLANG_COMPILER" >&6
12028 fi
12029
12030 cat > conftest.$ac_ext <<EOF
12031 #line 12031 "${as_me:-configure}"
12032 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12033 EOF
12034
12035 if test "$INTEL_COMPILER" = yes
12036 then
12037 # The "-wdXXX" options suppress warnings:
12038 # remark #1419: external declaration in primary source file
12039 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12040 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12041 # remark #193: zero used for undefined preprocessing identifier
12042 # remark #593: variable "curs_sb_left_arrow" was set but never used
12043 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12044 # remark #869: parameter "tw" was never referenced
12045 # remark #981: operands are evaluated in unspecified order
12046 # warning #279: controlling expression is constant
12047
12048         { echo "$as_me:12048: checking for $CC warning options..." >&5
12049 echo "$as_me: checking for $CC warning options..." >&6;}
12050         cf_save_CFLAGS="$CFLAGS"
12051         EXTRA_CFLAGS="-Wall"
12052         for cf_opt in \
12053                 wd1419 \
12054                 wd1683 \
12055                 wd1684 \
12056                 wd193 \
12057                 wd593 \
12058                 wd279 \
12059                 wd810 \
12060                 wd869 \
12061                 wd981
12062         do
12063                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12064                 if { (eval echo "$as_me:12064: \"$ac_compile\"") >&5
12065   (eval $ac_compile) 2>&5
12066   ac_status=$?
12067   echo "$as_me:12067: \$? = $ac_status" >&5
12068   (exit $ac_status); }; then
12069                         test -n "$verbose" && echo "$as_me:12069: result: ... -$cf_opt" >&5
12070 echo "${ECHO_T}... -$cf_opt" >&6
12071                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12072                 fi
12073         done
12074         CFLAGS="$cf_save_CFLAGS"
12075
12076 elif test "$GCC" = yes
12077 then
12078         { echo "$as_me:12078: checking for $CC warning options..." >&5
12079 echo "$as_me: checking for $CC warning options..." >&6;}
12080         cf_save_CFLAGS="$CFLAGS"
12081         EXTRA_CFLAGS=
12082         cf_warn_CONST=""
12083         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12084         for cf_opt in W Wall \
12085                 Wbad-function-cast \
12086                 Wcast-align \
12087                 Wcast-qual \
12088                 Winline \
12089                 Wmissing-declarations \
12090                 Wmissing-prototypes \
12091                 Wnested-externs \
12092                 Wpointer-arith \
12093                 Wshadow \
12094                 Wstrict-prototypes \
12095                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12096         do
12097                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12098                 if { (eval echo "$as_me:12098: \"$ac_compile\"") >&5
12099   (eval $ac_compile) 2>&5
12100   ac_status=$?
12101   echo "$as_me:12101: \$? = $ac_status" >&5
12102   (exit $ac_status); }; then
12103                         test -n "$verbose" && echo "$as_me:12103: result: ... -$cf_opt" >&5
12104 echo "${ECHO_T}... -$cf_opt" >&6
12105                         case $cf_opt in #(vi
12106                         Wcast-qual) #(vi
12107                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12108                                 ;;
12109                         Winline) #(vi
12110                                 case $GCC_VERSION in
12111                                 [34].*)
12112                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12113
12114 echo "${as_me:-configure}:12114: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12115
12116                                         continue;;
12117                                 esac
12118                                 ;;
12119                         Wpointer-arith) #(vi
12120                                 case $GCC_VERSION in
12121                                 [12].*)
12122                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12123
12124 echo "${as_me:-configure}:12124: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12125
12126                                         continue;;
12127                                 esac
12128                                 ;;
12129                         esac
12130                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12131                 fi
12132         done
12133         CFLAGS="$cf_save_CFLAGS"
12134 fi
12135 rm -rf conftest*
12136
12137         if test "x$cf_with_cxx" = xyes ; then
12138
12139 INTEL_CPLUSPLUS=no
12140
12141 if test "$GCC" = yes ; then
12142         case $host_os in
12143         linux*|gnu*)
12144                 echo "$as_me:12144: checking if this is really Intel C++ compiler" >&5
12145 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12146                 cf_save_CFLAGS="$CXXFLAGS"
12147                 CXXFLAGS="$CXXFLAGS -no-gcc"
12148                 cat >conftest.$ac_ext <<_ACEOF
12149 #line 12149 "configure"
12150 #include "confdefs.h"
12151
12152 int
12153 main ()
12154 {
12155
12156 #ifdef __INTEL_COMPILER
12157 #else
12158 make an error
12159 #endif
12160
12161   ;
12162   return 0;
12163 }
12164 _ACEOF
12165 rm -f conftest.$ac_objext
12166 if { (eval echo "$as_me:12166: \"$ac_compile\"") >&5
12167   (eval $ac_compile) 2>&5
12168   ac_status=$?
12169   echo "$as_me:12169: \$? = $ac_status" >&5
12170   (exit $ac_status); } &&
12171          { ac_try='test -s conftest.$ac_objext'
12172   { (eval echo "$as_me:12172: \"$ac_try\"") >&5
12173   (eval $ac_try) 2>&5
12174   ac_status=$?
12175   echo "$as_me:12175: \$? = $ac_status" >&5
12176   (exit $ac_status); }; }; then
12177   INTEL_CPLUSPLUS=yes
12178 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12179
12180 else
12181   echo "$as_me: failed program was:" >&5
12182 cat conftest.$ac_ext >&5
12183 fi
12184 rm -f conftest.$ac_objext conftest.$ac_ext
12185                 CXXFLAGS="$cf_save_CFLAGS"
12186                 echo "$as_me:12186: result: $INTEL_CPLUSPLUS" >&5
12187 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12188                 ;;
12189         esac
12190 fi
12191
12192 CLANG_CPLUSPLUS=no
12193
12194 if test "$GCC" = yes ; then
12195         echo "$as_me:12195: checking if this is really Clang C++ compiler" >&5
12196 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12197         cf_save_CFLAGS="$CXXFLAGS"
12198         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12199         cat >conftest.$ac_ext <<_ACEOF
12200 #line 12200 "configure"
12201 #include "confdefs.h"
12202
12203 int
12204 main ()
12205 {
12206
12207 #ifdef __clang__
12208 #else
12209 make an error
12210 #endif
12211
12212   ;
12213   return 0;
12214 }
12215 _ACEOF
12216 rm -f conftest.$ac_objext
12217 if { (eval echo "$as_me:12217: \"$ac_compile\"") >&5
12218   (eval $ac_compile) 2>&5
12219   ac_status=$?
12220   echo "$as_me:12220: \$? = $ac_status" >&5
12221   (exit $ac_status); } &&
12222          { ac_try='test -s conftest.$ac_objext'
12223   { (eval echo "$as_me:12223: \"$ac_try\"") >&5
12224   (eval $ac_try) 2>&5
12225   ac_status=$?
12226   echo "$as_me:12226: \$? = $ac_status" >&5
12227   (exit $ac_status); }; }; then
12228   CLANG_CPLUSPLUS=yes
12229 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12230
12231 else
12232   echo "$as_me: failed program was:" >&5
12233 cat conftest.$ac_ext >&5
12234 fi
12235 rm -f conftest.$ac_objext conftest.$ac_ext
12236         CXXFLAGS="$cf_save_CFLAGS"
12237         echo "$as_me:12237: result: $CLANG_CPLUSPLUS" >&5
12238 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12239 fi
12240
12241 ac_ext=cc
12242 ac_cpp='$CXXCPP $CPPFLAGS'
12243 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12244 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12245 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12246 ac_main_return=return
12247
12248 cat > conftest.$ac_ext <<EOF
12249 #line 12249 "configure"
12250 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12251 EOF
12252
12253 if test "$INTEL_CPLUSPLUS" = yes
12254 then
12255 # The "-wdXXX" options suppress warnings:
12256 # remark #1419: external declaration in primary source file
12257 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12258 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12259 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12260 # remark #193: zero used for undefined preprocessing identifier
12261 # remark #593: variable "curs_sb_left_arrow" was set but never used
12262 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12263 # remark #869: parameter "tw" was never referenced
12264 # remark #981: operands are evaluated in unspecified order
12265 # warning #269: invalid format string conversion
12266
12267         { echo "$as_me:12267: checking for $CC warning options..." >&5
12268 echo "$as_me: checking for $CC warning options..." >&6;}
12269         cf_save_CXXFLAGS="$CXXFLAGS"
12270         EXTRA_CXXFLAGS="-Wall"
12271         for cf_opt in \
12272                 wd1419 \
12273                 wd1682 \
12274                 wd1683 \
12275                 wd1684 \
12276                 wd193 \
12277                 wd279 \
12278                 wd593 \
12279                 wd810 \
12280                 wd869 \
12281                 wd981
12282         do
12283                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12284                 if { (eval echo "$as_me:12284: \"$ac_compile\"") >&5
12285   (eval $ac_compile) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit $ac_status); }; then
12289                         test -n "$verbose" && echo "$as_me:12289: result: ... -$cf_opt" >&5
12290 echo "${ECHO_T}... -$cf_opt" >&6
12291                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12292                 fi
12293         done
12294         CXXFLAGS="$cf_save_CXXFLAGS"
12295
12296 elif test "$GXX" = yes
12297 then
12298         { echo "$as_me:12298: checking for $CXX warning options..." >&5
12299 echo "$as_me: checking for $CXX warning options..." >&6;}
12300         cf_save_CXXFLAGS="$CXXFLAGS"
12301         EXTRA_CXXFLAGS="-W -Wall"
12302         cf_gxx_extra_warnings=""
12303         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12304         case "$GCC_VERSION" in
12305         [1-2].*)
12306                 ;;
12307         *)
12308                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12309                 ;;
12310         esac
12311         for cf_opt in \
12312                 Wabi \
12313                 fabi-version=0 \
12314                 Woverloaded-virtual \
12315                 Wsign-promo \
12316                 Wsynth \
12317                 Wold-style-cast \
12318                 Wcast-align \
12319                 Wcast-qual \
12320                 Wmissing-prototypes \
12321                 Wpointer-arith \
12322                 Wshadow \
12323                 Wstrict-prototypes \
12324                 Wundef $cf_gxx_extra_warnings Wno-unused
12325         do
12326                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12327                 if { (eval echo "$as_me:12327: \"$ac_compile\"") >&5
12328   (eval $ac_compile) 2>&5
12329   ac_status=$?
12330   echo "$as_me:12330: \$? = $ac_status" >&5
12331   (exit $ac_status); }; then
12332                         test -n "$verbose" && echo "$as_me:12332: result: ... -$cf_opt" >&5
12333 echo "${ECHO_T}... -$cf_opt" >&6
12334                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12335                 else
12336                         test -n "$verbose" && echo "$as_me:12336: result: ... no -$cf_opt" >&5
12337 echo "${ECHO_T}... no -$cf_opt" >&6
12338                 fi
12339         done
12340         CXXFLAGS="$cf_save_CXXFLAGS"
12341 fi
12342
12343 rm -rf conftest*
12344 ac_ext=c
12345 ac_cpp='$CPP $CPPFLAGS'
12346 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12347 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12348 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12349 ac_main_return=return
12350
12351         fi
12352 fi
12353
12354 if test "$GCC" = yes
12355 then
12356 cat > conftest.i <<EOF
12357 #ifndef GCC_PRINTF
12358 #define GCC_PRINTF 0
12359 #endif
12360 #ifndef GCC_SCANF
12361 #define GCC_SCANF 0
12362 #endif
12363 #ifndef GCC_NORETURN
12364 #define GCC_NORETURN /* nothing */
12365 #endif
12366 #ifndef GCC_UNUSED
12367 #define GCC_UNUSED /* nothing */
12368 #endif
12369 EOF
12370 if test "$GCC" = yes
12371 then
12372         { echo "$as_me:12372: checking for $CC __attribute__ directives..." >&5
12373 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12374 cat > conftest.$ac_ext <<EOF
12375 #line 12375 "${as_me:-configure}"
12376 #include "confdefs.h"
12377 #include "conftest.h"
12378 #include "conftest.i"
12379 #if     GCC_PRINTF
12380 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12381 #else
12382 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12383 #endif
12384 #if     GCC_SCANF
12385 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12386 #else
12387 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12388 #endif
12389 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12390 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12391 extern void foo(void) GCC_NORETURN;
12392 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12393 EOF
12394         cf_printf_attribute=no
12395         cf_scanf_attribute=no
12396         for cf_attribute in scanf printf unused noreturn
12397         do
12398
12399 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12400
12401                 cf_directive="__attribute__(($cf_attribute))"
12402                 echo "checking for $CC $cf_directive" 1>&5
12403
12404                 case $cf_attribute in #(vi
12405                 printf) #(vi
12406                         cf_printf_attribute=yes
12407                         cat >conftest.h <<EOF
12408 #define GCC_$cf_ATTRIBUTE 1
12409 EOF
12410                         ;;
12411                 scanf) #(vi
12412                         cf_scanf_attribute=yes
12413                         cat >conftest.h <<EOF
12414 #define GCC_$cf_ATTRIBUTE 1
12415 EOF
12416                         ;;
12417                 *) #(vi
12418                         cat >conftest.h <<EOF
12419 #define GCC_$cf_ATTRIBUTE $cf_directive
12420 EOF
12421                         ;;
12422                 esac
12423
12424                 if { (eval echo "$as_me:12424: \"$ac_compile\"") >&5
12425   (eval $ac_compile) 2>&5
12426   ac_status=$?
12427   echo "$as_me:12427: \$? = $ac_status" >&5
12428   (exit $ac_status); }; then
12429                         test -n "$verbose" && echo "$as_me:12429: result: ... $cf_attribute" >&5
12430 echo "${ECHO_T}... $cf_attribute" >&6
12431                         cat conftest.h >>confdefs.h
12432                         case $cf_attribute in #(vi
12433                         noreturn) #(vi
12434
12435 cat >>confdefs.h <<EOF
12436 #define GCC_NORETURN $cf_directive
12437 EOF
12438
12439                                 ;;
12440                         printf) #(vi
12441                                 cf_value='/* nothing */'
12442                                 if test "$cf_printf_attribute" != no ; then
12443                                         cf_value='__attribute__((format(printf,fmt,var)))'
12444
12445 cat >>confdefs.h <<\EOF
12446 #define GCC_PRINTF 1
12447 EOF
12448
12449                                 fi
12450
12451 cat >>confdefs.h <<EOF
12452 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12453 EOF
12454
12455                                 ;;
12456                         scanf) #(vi
12457                                 cf_value='/* nothing */'
12458                                 if test "$cf_scanf_attribute" != no ; then
12459                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12460
12461 cat >>confdefs.h <<\EOF
12462 #define GCC_SCANF 1
12463 EOF
12464
12465                                 fi
12466
12467 cat >>confdefs.h <<EOF
12468 #define GCC_SCANFLIKE(fmt,var) $cf_value
12469 EOF
12470
12471                                 ;;
12472                         unused) #(vi
12473
12474 cat >>confdefs.h <<EOF
12475 #define GCC_UNUSED $cf_directive
12476 EOF
12477
12478                                 ;;
12479                         esac
12480                 fi
12481         done
12482 else
12483         fgrep define conftest.i >>confdefs.h
12484 fi
12485 rm -rf conftest*
12486 fi
12487
12488 echo "$as_me:12488: checking if you want to work around bogus compiler/loader warnings" >&5
12489 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12490
12491 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12492 if test "${enable_string_hacks+set}" = set; then
12493   enableval="$enable_string_hacks"
12494   with_string_hacks=$enableval
12495 else
12496   with_string_hacks=no
12497 fi;
12498 echo "$as_me:12498: result: $with_string_hacks" >&5
12499 echo "${ECHO_T}$with_string_hacks" >&6
12500
12501 if test "x$with_string_hacks" = "xyes"; then
12502
12503 cat >>confdefs.h <<\EOF
12504 #define USE_STRING_HACKS 1
12505 EOF
12506
12507         { echo "$as_me:12507: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12508 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12509
12510 for ac_func in strlcat strlcpy snprintf
12511 do
12512 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12513 echo "$as_me:12513: checking for $ac_func" >&5
12514 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12515 if eval "test \"\${$as_ac_var+set}\" = set"; then
12516   echo $ECHO_N "(cached) $ECHO_C" >&6
12517 else
12518   cat >conftest.$ac_ext <<_ACEOF
12519 #line 12519 "configure"
12520 #include "confdefs.h"
12521 /* System header to define __stub macros and hopefully few prototypes,
12522     which can conflict with char $ac_func (); below.  */
12523 #include <assert.h>
12524 /* Override any gcc2 internal prototype to avoid an error.  */
12525 #ifdef __cplusplus
12526 extern "C"
12527 #endif
12528 /* We use char because int might match the return type of a gcc2
12529    builtin and then its argument prototype would still apply.  */
12530 char $ac_func ();
12531 char (*f) ();
12532
12533 int
12534 main ()
12535 {
12536 /* The GNU C library defines this for functions which it implements
12537     to always fail with ENOSYS.  Some functions are actually named
12538     something starting with __ and the normal name is an alias.  */
12539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12540 choke me
12541 #else
12542 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12543 #endif
12544
12545   ;
12546   return 0;
12547 }
12548 _ACEOF
12549 rm -f conftest.$ac_objext conftest$ac_exeext
12550 if { (eval echo "$as_me:12550: \"$ac_link\"") >&5
12551   (eval $ac_link) 2>&5
12552   ac_status=$?
12553   echo "$as_me:12553: \$? = $ac_status" >&5
12554   (exit $ac_status); } &&
12555          { ac_try='test -s conftest$ac_exeext'
12556   { (eval echo "$as_me:12556: \"$ac_try\"") >&5
12557   (eval $ac_try) 2>&5
12558   ac_status=$?
12559   echo "$as_me:12559: \$? = $ac_status" >&5
12560   (exit $ac_status); }; }; then
12561   eval "$as_ac_var=yes"
12562 else
12563   echo "$as_me: failed program was:" >&5
12564 cat conftest.$ac_ext >&5
12565 eval "$as_ac_var=no"
12566 fi
12567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12568 fi
12569 echo "$as_me:12569: result: `eval echo '${'$as_ac_var'}'`" >&5
12570 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12571 if test `eval echo '${'$as_ac_var'}'` = yes; then
12572   cat >>confdefs.h <<EOF
12573 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12574 EOF
12575
12576 fi
12577 done
12578
12579 fi
12580
12581 ###     use option --enable-assertions to turn on generation of assertion code
12582 echo "$as_me:12582: checking if you want to enable runtime assertions" >&5
12583 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12584
12585 # Check whether --enable-assertions or --disable-assertions was given.
12586 if test "${enable_assertions+set}" = set; then
12587   enableval="$enable_assertions"
12588   with_assertions=$enableval
12589 else
12590   with_assertions=no
12591 fi;
12592 echo "$as_me:12592: result: $with_assertions" >&5
12593 echo "${ECHO_T}$with_assertions" >&6
12594 if test -n "$GCC"
12595 then
12596         if test "$with_assertions" = no
12597         then
12598                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12599         else
12600
12601         ADAFLAGS="$ADAFLAGS -gnata"
12602
12603         fi
12604 fi
12605
12606 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12607
12608 echo "$as_me:12608: checking if you want to use dmalloc for testing" >&5
12609 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12610
12611 # Check whether --with-dmalloc or --without-dmalloc was given.
12612 if test "${with_dmalloc+set}" = set; then
12613   withval="$with_dmalloc"
12614
12615 cat >>confdefs.h <<EOF
12616 #define USE_DMALLOC 1
12617 EOF
12618
12619         : ${with_cflags:=-g}
12620         : ${with_no_leaks:=yes}
12621          with_dmalloc=yes
12622 else
12623   with_dmalloc=
12624 fi;
12625 echo "$as_me:12625: result: ${with_dmalloc:-no}" >&5
12626 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12627
12628 case .$with_cflags in #(vi
12629 .*-g*)
12630         case .$CFLAGS in #(vi
12631         .*-g*) #(vi
12632                 ;;
12633         *)
12634
12635 cf_fix_cppflags=no
12636 cf_new_cflags=
12637 cf_new_cppflags=
12638 cf_new_extra_cppflags=
12639
12640 for cf_add_cflags in -g
12641 do
12642 case $cf_fix_cppflags in
12643 no)
12644         case $cf_add_cflags in #(vi
12645         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12646                 case $cf_add_cflags in
12647                 -D*)
12648                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12649
12650                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12651                                 && test -z "${cf_tst_cflags}" \
12652                                 && cf_fix_cppflags=yes
12653
12654                         if test $cf_fix_cppflags = yes ; then
12655                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12656                                 continue
12657                         elif test "${cf_tst_cflags}" = "\"'" ; then
12658                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12659                                 continue
12660                         fi
12661                         ;;
12662                 esac
12663                 case "$CPPFLAGS" in
12664                 *$cf_add_cflags) #(vi
12665                         ;;
12666                 *) #(vi
12667                         case $cf_add_cflags in #(vi
12668                         -D*)
12669                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12670
12671 CPPFLAGS=`echo "$CPPFLAGS" | \
12672         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12673                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12674
12675                                 ;;
12676                         esac
12677                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12678                         ;;
12679                 esac
12680                 ;;
12681         *)
12682                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12683                 ;;
12684         esac
12685         ;;
12686 yes)
12687         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12688
12689         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12690
12691         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12692                 && test -z "${cf_tst_cflags}" \
12693                 && cf_fix_cppflags=no
12694         ;;
12695 esac
12696 done
12697
12698 if test -n "$cf_new_cflags" ; then
12699
12700         CFLAGS="$CFLAGS $cf_new_cflags"
12701 fi
12702
12703 if test -n "$cf_new_cppflags" ; then
12704
12705         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12706 fi
12707
12708 if test -n "$cf_new_extra_cppflags" ; then
12709
12710         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12711 fi
12712
12713                 ;;
12714         esac
12715         ;;
12716 esac
12717
12718 if test "$with_dmalloc" = yes ; then
12719         echo "$as_me:12719: checking for dmalloc.h" >&5
12720 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12721 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12722   echo $ECHO_N "(cached) $ECHO_C" >&6
12723 else
12724   cat >conftest.$ac_ext <<_ACEOF
12725 #line 12725 "configure"
12726 #include "confdefs.h"
12727 #include <dmalloc.h>
12728 _ACEOF
12729 if { (eval echo "$as_me:12729: \"$ac_cpp conftest.$ac_ext\"") >&5
12730   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12731   ac_status=$?
12732   egrep -v '^ *\+' conftest.er1 >conftest.err
12733   rm -f conftest.er1
12734   cat conftest.err >&5
12735   echo "$as_me:12735: \$? = $ac_status" >&5
12736   (exit $ac_status); } >/dev/null; then
12737   if test -s conftest.err; then
12738     ac_cpp_err=$ac_c_preproc_warn_flag
12739   else
12740     ac_cpp_err=
12741   fi
12742 else
12743   ac_cpp_err=yes
12744 fi
12745 if test -z "$ac_cpp_err"; then
12746   ac_cv_header_dmalloc_h=yes
12747 else
12748   echo "$as_me: failed program was:" >&5
12749   cat conftest.$ac_ext >&5
12750   ac_cv_header_dmalloc_h=no
12751 fi
12752 rm -f conftest.err conftest.$ac_ext
12753 fi
12754 echo "$as_me:12754: result: $ac_cv_header_dmalloc_h" >&5
12755 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12756 if test $ac_cv_header_dmalloc_h = yes; then
12757
12758 echo "$as_me:12758: checking for dmalloc_debug in -ldmalloc" >&5
12759 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12760 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12761   echo $ECHO_N "(cached) $ECHO_C" >&6
12762 else
12763   ac_check_lib_save_LIBS=$LIBS
12764 LIBS="-ldmalloc  $LIBS"
12765 cat >conftest.$ac_ext <<_ACEOF
12766 #line 12766 "configure"
12767 #include "confdefs.h"
12768
12769 /* Override any gcc2 internal prototype to avoid an error.  */
12770 #ifdef __cplusplus
12771 extern "C"
12772 #endif
12773 /* We use char because int might match the return type of a gcc2
12774    builtin and then its argument prototype would still apply.  */
12775 char dmalloc_debug ();
12776 int
12777 main ()
12778 {
12779 dmalloc_debug ();
12780   ;
12781   return 0;
12782 }
12783 _ACEOF
12784 rm -f conftest.$ac_objext conftest$ac_exeext
12785 if { (eval echo "$as_me:12785: \"$ac_link\"") >&5
12786   (eval $ac_link) 2>&5
12787   ac_status=$?
12788   echo "$as_me:12788: \$? = $ac_status" >&5
12789   (exit $ac_status); } &&
12790          { ac_try='test -s conftest$ac_exeext'
12791   { (eval echo "$as_me:12791: \"$ac_try\"") >&5
12792   (eval $ac_try) 2>&5
12793   ac_status=$?
12794   echo "$as_me:12794: \$? = $ac_status" >&5
12795   (exit $ac_status); }; }; then
12796   ac_cv_lib_dmalloc_dmalloc_debug=yes
12797 else
12798   echo "$as_me: failed program was:" >&5
12799 cat conftest.$ac_ext >&5
12800 ac_cv_lib_dmalloc_dmalloc_debug=no
12801 fi
12802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12803 LIBS=$ac_check_lib_save_LIBS
12804 fi
12805 echo "$as_me:12805: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12806 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12807 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12808   cat >>confdefs.h <<EOF
12809 #define HAVE_LIBDMALLOC 1
12810 EOF
12811
12812   LIBS="-ldmalloc $LIBS"
12813
12814 fi
12815
12816 fi
12817
12818 fi
12819
12820 echo "$as_me:12820: checking if you want to use dbmalloc for testing" >&5
12821 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12822
12823 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12824 if test "${with_dbmalloc+set}" = set; then
12825   withval="$with_dbmalloc"
12826
12827 cat >>confdefs.h <<EOF
12828 #define USE_DBMALLOC 1
12829 EOF
12830
12831         : ${with_cflags:=-g}
12832         : ${with_no_leaks:=yes}
12833          with_dbmalloc=yes
12834 else
12835   with_dbmalloc=
12836 fi;
12837 echo "$as_me:12837: result: ${with_dbmalloc:-no}" >&5
12838 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12839
12840 case .$with_cflags in #(vi
12841 .*-g*)
12842         case .$CFLAGS in #(vi
12843         .*-g*) #(vi
12844                 ;;
12845         *)
12846
12847 cf_fix_cppflags=no
12848 cf_new_cflags=
12849 cf_new_cppflags=
12850 cf_new_extra_cppflags=
12851
12852 for cf_add_cflags in -g
12853 do
12854 case $cf_fix_cppflags in
12855 no)
12856         case $cf_add_cflags in #(vi
12857         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12858                 case $cf_add_cflags in
12859                 -D*)
12860                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12861
12862                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12863                                 && test -z "${cf_tst_cflags}" \
12864                                 && cf_fix_cppflags=yes
12865
12866                         if test $cf_fix_cppflags = yes ; then
12867                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12868                                 continue
12869                         elif test "${cf_tst_cflags}" = "\"'" ; then
12870                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12871                                 continue
12872                         fi
12873                         ;;
12874                 esac
12875                 case "$CPPFLAGS" in
12876                 *$cf_add_cflags) #(vi
12877                         ;;
12878                 *) #(vi
12879                         case $cf_add_cflags in #(vi
12880                         -D*)
12881                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12882
12883 CPPFLAGS=`echo "$CPPFLAGS" | \
12884         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12885                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12886
12887                                 ;;
12888                         esac
12889                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12890                         ;;
12891                 esac
12892                 ;;
12893         *)
12894                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12895                 ;;
12896         esac
12897         ;;
12898 yes)
12899         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12900
12901         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12902
12903         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12904                 && test -z "${cf_tst_cflags}" \
12905                 && cf_fix_cppflags=no
12906         ;;
12907 esac
12908 done
12909
12910 if test -n "$cf_new_cflags" ; then
12911
12912         CFLAGS="$CFLAGS $cf_new_cflags"
12913 fi
12914
12915 if test -n "$cf_new_cppflags" ; then
12916
12917         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12918 fi
12919
12920 if test -n "$cf_new_extra_cppflags" ; then
12921
12922         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12923 fi
12924
12925                 ;;
12926         esac
12927         ;;
12928 esac
12929
12930 if test "$with_dbmalloc" = yes ; then
12931         echo "$as_me:12931: checking for dbmalloc.h" >&5
12932 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12933 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12934   echo $ECHO_N "(cached) $ECHO_C" >&6
12935 else
12936   cat >conftest.$ac_ext <<_ACEOF
12937 #line 12937 "configure"
12938 #include "confdefs.h"
12939 #include <dbmalloc.h>
12940 _ACEOF
12941 if { (eval echo "$as_me:12941: \"$ac_cpp conftest.$ac_ext\"") >&5
12942   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12943   ac_status=$?
12944   egrep -v '^ *\+' conftest.er1 >conftest.err
12945   rm -f conftest.er1
12946   cat conftest.err >&5
12947   echo "$as_me:12947: \$? = $ac_status" >&5
12948   (exit $ac_status); } >/dev/null; then
12949   if test -s conftest.err; then
12950     ac_cpp_err=$ac_c_preproc_warn_flag
12951   else
12952     ac_cpp_err=
12953   fi
12954 else
12955   ac_cpp_err=yes
12956 fi
12957 if test -z "$ac_cpp_err"; then
12958   ac_cv_header_dbmalloc_h=yes
12959 else
12960   echo "$as_me: failed program was:" >&5
12961   cat conftest.$ac_ext >&5
12962   ac_cv_header_dbmalloc_h=no
12963 fi
12964 rm -f conftest.err conftest.$ac_ext
12965 fi
12966 echo "$as_me:12966: result: $ac_cv_header_dbmalloc_h" >&5
12967 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12968 if test $ac_cv_header_dbmalloc_h = yes; then
12969
12970 echo "$as_me:12970: checking for debug_malloc in -ldbmalloc" >&5
12971 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12972 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12973   echo $ECHO_N "(cached) $ECHO_C" >&6
12974 else
12975   ac_check_lib_save_LIBS=$LIBS
12976 LIBS="-ldbmalloc  $LIBS"
12977 cat >conftest.$ac_ext <<_ACEOF
12978 #line 12978 "configure"
12979 #include "confdefs.h"
12980
12981 /* Override any gcc2 internal prototype to avoid an error.  */
12982 #ifdef __cplusplus
12983 extern "C"
12984 #endif
12985 /* We use char because int might match the return type of a gcc2
12986    builtin and then its argument prototype would still apply.  */
12987 char debug_malloc ();
12988 int
12989 main ()
12990 {
12991 debug_malloc ();
12992   ;
12993   return 0;
12994 }
12995 _ACEOF
12996 rm -f conftest.$ac_objext conftest$ac_exeext
12997 if { (eval echo "$as_me:12997: \"$ac_link\"") >&5
12998   (eval $ac_link) 2>&5
12999   ac_status=$?
13000   echo "$as_me:13000: \$? = $ac_status" >&5
13001   (exit $ac_status); } &&
13002          { ac_try='test -s conftest$ac_exeext'
13003   { (eval echo "$as_me:13003: \"$ac_try\"") >&5
13004   (eval $ac_try) 2>&5
13005   ac_status=$?
13006   echo "$as_me:13006: \$? = $ac_status" >&5
13007   (exit $ac_status); }; }; then
13008   ac_cv_lib_dbmalloc_debug_malloc=yes
13009 else
13010   echo "$as_me: failed program was:" >&5
13011 cat conftest.$ac_ext >&5
13012 ac_cv_lib_dbmalloc_debug_malloc=no
13013 fi
13014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13015 LIBS=$ac_check_lib_save_LIBS
13016 fi
13017 echo "$as_me:13017: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13018 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13019 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13020   cat >>confdefs.h <<EOF
13021 #define HAVE_LIBDBMALLOC 1
13022 EOF
13023
13024   LIBS="-ldbmalloc $LIBS"
13025
13026 fi
13027
13028 fi
13029
13030 fi
13031
13032 echo "$as_me:13032: checking if you want to use valgrind for testing" >&5
13033 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13034
13035 # Check whether --with-valgrind or --without-valgrind was given.
13036 if test "${with_valgrind+set}" = set; then
13037   withval="$with_valgrind"
13038
13039 cat >>confdefs.h <<EOF
13040 #define USE_VALGRIND 1
13041 EOF
13042
13043         : ${with_cflags:=-g}
13044         : ${with_no_leaks:=yes}
13045          with_valgrind=yes
13046 else
13047   with_valgrind=
13048 fi;
13049 echo "$as_me:13049: result: ${with_valgrind:-no}" >&5
13050 echo "${ECHO_T}${with_valgrind:-no}" >&6
13051
13052 case .$with_cflags in #(vi
13053 .*-g*)
13054         case .$CFLAGS in #(vi
13055         .*-g*) #(vi
13056                 ;;
13057         *)
13058
13059 cf_fix_cppflags=no
13060 cf_new_cflags=
13061 cf_new_cppflags=
13062 cf_new_extra_cppflags=
13063
13064 for cf_add_cflags in -g
13065 do
13066 case $cf_fix_cppflags in
13067 no)
13068         case $cf_add_cflags in #(vi
13069         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13070                 case $cf_add_cflags in
13071                 -D*)
13072                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13073
13074                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13075                                 && test -z "${cf_tst_cflags}" \
13076                                 && cf_fix_cppflags=yes
13077
13078                         if test $cf_fix_cppflags = yes ; then
13079                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13080                                 continue
13081                         elif test "${cf_tst_cflags}" = "\"'" ; then
13082                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13083                                 continue
13084                         fi
13085                         ;;
13086                 esac
13087                 case "$CPPFLAGS" in
13088                 *$cf_add_cflags) #(vi
13089                         ;;
13090                 *) #(vi
13091                         case $cf_add_cflags in #(vi
13092                         -D*)
13093                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13094
13095 CPPFLAGS=`echo "$CPPFLAGS" | \
13096         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13097                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13098
13099                                 ;;
13100                         esac
13101                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13102                         ;;
13103                 esac
13104                 ;;
13105         *)
13106                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13107                 ;;
13108         esac
13109         ;;
13110 yes)
13111         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13112
13113         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13114
13115         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13116                 && test -z "${cf_tst_cflags}" \
13117                 && cf_fix_cppflags=no
13118         ;;
13119 esac
13120 done
13121
13122 if test -n "$cf_new_cflags" ; then
13123
13124         CFLAGS="$CFLAGS $cf_new_cflags"
13125 fi
13126
13127 if test -n "$cf_new_cppflags" ; then
13128
13129         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13130 fi
13131
13132 if test -n "$cf_new_extra_cppflags" ; then
13133
13134         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13135 fi
13136
13137                 ;;
13138         esac
13139         ;;
13140 esac
13141
13142 echo "$as_me:13142: checking if you want to perform memory-leak testing" >&5
13143 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13144
13145 # Check whether --enable-leaks or --disable-leaks was given.
13146 if test "${enable_leaks+set}" = set; then
13147   enableval="$enable_leaks"
13148   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13149 else
13150   : ${with_no_leaks:=no}
13151 fi;
13152 echo "$as_me:13152: result: $with_no_leaks" >&5
13153 echo "${ECHO_T}$with_no_leaks" >&6
13154
13155 if test "$with_no_leaks" = yes ; then
13156
13157 cat >>confdefs.h <<\EOF
13158 #define NO_LEAKS 1
13159 EOF
13160
13161 cat >>confdefs.h <<\EOF
13162 #define YY_NO_LEAKS 1
13163 EOF
13164
13165 fi
13166
13167 cat >>confdefs.h <<\EOF
13168 #define HAVE_NC_ALLOC_H 1
13169 EOF
13170
13171 ###     use option --enable-expanded to generate certain macros as functions
13172
13173 # Check whether --enable-expanded or --disable-expanded was given.
13174 if test "${enable_expanded+set}" = set; then
13175   enableval="$enable_expanded"
13176   test "x$enableval" = xyes &&
13177 cat >>confdefs.h <<\EOF
13178 #define NCURSES_EXPANDED 1
13179 EOF
13180
13181 fi;
13182
13183 ###     use option --disable-macros to suppress macros in favor of functions
13184
13185 # Check whether --enable-macros or --disable-macros was given.
13186 if test "${enable_macros+set}" = set; then
13187   enableval="$enable_macros"
13188   test "$enableval" = no &&
13189 cat >>confdefs.h <<\EOF
13190 #define NCURSES_NOMACROS 1
13191 EOF
13192
13193 fi;
13194
13195 # Normally we only add trace() to the debug-library.  Allow this to be
13196 # extended to all models of the ncurses library:
13197 cf_all_traces=no
13198 case "$CFLAGS $CPPFLAGS" in
13199 *-DTRACE*)
13200         cf_all_traces=yes
13201         ;;
13202 esac
13203
13204 echo "$as_me:13204: checking whether to add trace feature to all models" >&5
13205 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13206
13207 # Check whether --with-trace or --without-trace was given.
13208 if test "${with_trace+set}" = set; then
13209   withval="$with_trace"
13210   cf_with_trace=$withval
13211 else
13212   cf_with_trace=$cf_all_traces
13213 fi;
13214 echo "$as_me:13214: result: $cf_with_trace" >&5
13215 echo "${ECHO_T}$cf_with_trace" >&6
13216
13217 if test "x$cf_with_trace" = xyes ; then
13218         LIB_TRACING=all
13219         ADA_TRACE=TRUE
13220
13221 cf_fix_cppflags=no
13222 cf_new_cflags=
13223 cf_new_cppflags=
13224 cf_new_extra_cppflags=
13225
13226 for cf_add_cflags in -DTRACE
13227 do
13228 case $cf_fix_cppflags in
13229 no)
13230         case $cf_add_cflags in #(vi
13231         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13232                 case $cf_add_cflags in
13233                 -D*)
13234                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13235
13236                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13237                                 && test -z "${cf_tst_cflags}" \
13238                                 && cf_fix_cppflags=yes
13239
13240                         if test $cf_fix_cppflags = yes ; then
13241                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13242                                 continue
13243                         elif test "${cf_tst_cflags}" = "\"'" ; then
13244                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13245                                 continue
13246                         fi
13247                         ;;
13248                 esac
13249                 case "$CPPFLAGS" in
13250                 *$cf_add_cflags) #(vi
13251                         ;;
13252                 *) #(vi
13253                         case $cf_add_cflags in #(vi
13254                         -D*)
13255                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13256
13257 CPPFLAGS=`echo "$CPPFLAGS" | \
13258         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13259                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13260
13261                                 ;;
13262                         esac
13263                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13264                         ;;
13265                 esac
13266                 ;;
13267         *)
13268                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13269                 ;;
13270         esac
13271         ;;
13272 yes)
13273         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13274
13275         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13276
13277         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13278                 && test -z "${cf_tst_cflags}" \
13279                 && cf_fix_cppflags=no
13280         ;;
13281 esac
13282 done
13283
13284 if test -n "$cf_new_cflags" ; then
13285
13286         CFLAGS="$CFLAGS $cf_new_cflags"
13287 fi
13288
13289 if test -n "$cf_new_cppflags" ; then
13290
13291         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13292 fi
13293
13294 if test -n "$cf_new_extra_cppflags" ; then
13295
13296         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13297 fi
13298
13299 else
13300         LIB_TRACING=DEBUG
13301         ADA_TRACE=FALSE
13302 fi
13303
13304 ###     Checks for libraries.
13305 case $cf_cv_system_name in #(vi
13306 *mingw32*) #(vi
13307         ;;
13308 *)
13309 echo "$as_me:13309: checking for gettimeofday" >&5
13310 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13311 if test "${ac_cv_func_gettimeofday+set}" = set; then
13312   echo $ECHO_N "(cached) $ECHO_C" >&6
13313 else
13314   cat >conftest.$ac_ext <<_ACEOF
13315 #line 13315 "configure"
13316 #include "confdefs.h"
13317 /* System header to define __stub macros and hopefully few prototypes,
13318     which can conflict with char gettimeofday (); below.  */
13319 #include <assert.h>
13320 /* Override any gcc2 internal prototype to avoid an error.  */
13321 #ifdef __cplusplus
13322 extern "C"
13323 #endif
13324 /* We use char because int might match the return type of a gcc2
13325    builtin and then its argument prototype would still apply.  */
13326 char gettimeofday ();
13327 char (*f) ();
13328
13329 int
13330 main ()
13331 {
13332 /* The GNU C library defines this for functions which it implements
13333     to always fail with ENOSYS.  Some functions are actually named
13334     something starting with __ and the normal name is an alias.  */
13335 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13336 choke me
13337 #else
13338 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13339 #endif
13340
13341   ;
13342   return 0;
13343 }
13344 _ACEOF
13345 rm -f conftest.$ac_objext conftest$ac_exeext
13346 if { (eval echo "$as_me:13346: \"$ac_link\"") >&5
13347   (eval $ac_link) 2>&5
13348   ac_status=$?
13349   echo "$as_me:13349: \$? = $ac_status" >&5
13350   (exit $ac_status); } &&
13351          { ac_try='test -s conftest$ac_exeext'
13352   { (eval echo "$as_me:13352: \"$ac_try\"") >&5
13353   (eval $ac_try) 2>&5
13354   ac_status=$?
13355   echo "$as_me:13355: \$? = $ac_status" >&5
13356   (exit $ac_status); }; }; then
13357   ac_cv_func_gettimeofday=yes
13358 else
13359   echo "$as_me: failed program was:" >&5
13360 cat conftest.$ac_ext >&5
13361 ac_cv_func_gettimeofday=no
13362 fi
13363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13364 fi
13365 echo "$as_me:13365: result: $ac_cv_func_gettimeofday" >&5
13366 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13367 if test $ac_cv_func_gettimeofday = yes; then
13368
13369 cat >>confdefs.h <<\EOF
13370 #define HAVE_GETTIMEOFDAY 1
13371 EOF
13372
13373 else
13374
13375 echo "$as_me:13375: checking for gettimeofday in -lbsd" >&5
13376 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13377 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13378   echo $ECHO_N "(cached) $ECHO_C" >&6
13379 else
13380   ac_check_lib_save_LIBS=$LIBS
13381 LIBS="-lbsd  $LIBS"
13382 cat >conftest.$ac_ext <<_ACEOF
13383 #line 13383 "configure"
13384 #include "confdefs.h"
13385
13386 /* Override any gcc2 internal prototype to avoid an error.  */
13387 #ifdef __cplusplus
13388 extern "C"
13389 #endif
13390 /* We use char because int might match the return type of a gcc2
13391    builtin and then its argument prototype would still apply.  */
13392 char gettimeofday ();
13393 int
13394 main ()
13395 {
13396 gettimeofday ();
13397   ;
13398   return 0;
13399 }
13400 _ACEOF
13401 rm -f conftest.$ac_objext conftest$ac_exeext
13402 if { (eval echo "$as_me:13402: \"$ac_link\"") >&5
13403   (eval $ac_link) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit $ac_status); } &&
13407          { ac_try='test -s conftest$ac_exeext'
13408   { (eval echo "$as_me:13408: \"$ac_try\"") >&5
13409   (eval $ac_try) 2>&5
13410   ac_status=$?
13411   echo "$as_me:13411: \$? = $ac_status" >&5
13412   (exit $ac_status); }; }; then
13413   ac_cv_lib_bsd_gettimeofday=yes
13414 else
13415   echo "$as_me: failed program was:" >&5
13416 cat conftest.$ac_ext >&5
13417 ac_cv_lib_bsd_gettimeofday=no
13418 fi
13419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13420 LIBS=$ac_check_lib_save_LIBS
13421 fi
13422 echo "$as_me:13422: result: $ac_cv_lib_bsd_gettimeofday" >&5
13423 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13424 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13425
13426 cat >>confdefs.h <<\EOF
13427 #define HAVE_GETTIMEOFDAY 1
13428 EOF
13429
13430         LIBS="-lbsd $LIBS"
13431 fi
13432
13433 fi
13434         ;;
13435 esac
13436
13437 echo "$as_me:13437: checking if -lm needed for math functions" >&5
13438 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13439 if test "${cf_cv_need_libm+set}" = set; then
13440   echo $ECHO_N "(cached) $ECHO_C" >&6
13441 else
13442
13443         cat >conftest.$ac_ext <<_ACEOF
13444 #line 13444 "configure"
13445 #include "confdefs.h"
13446
13447         #include <stdio.h>
13448         #include <math.h>
13449
13450 int
13451 main ()
13452 {
13453 double x = rand(); printf("result = %g\n", sin(x))
13454   ;
13455   return 0;
13456 }
13457 _ACEOF
13458 rm -f conftest.$ac_objext conftest$ac_exeext
13459 if { (eval echo "$as_me:13459: \"$ac_link\"") >&5
13460   (eval $ac_link) 2>&5
13461   ac_status=$?
13462   echo "$as_me:13462: \$? = $ac_status" >&5
13463   (exit $ac_status); } &&
13464          { ac_try='test -s conftest$ac_exeext'
13465   { (eval echo "$as_me:13465: \"$ac_try\"") >&5
13466   (eval $ac_try) 2>&5
13467   ac_status=$?
13468   echo "$as_me:13468: \$? = $ac_status" >&5
13469   (exit $ac_status); }; }; then
13470   cf_cv_need_libm=no
13471 else
13472   echo "$as_me: failed program was:" >&5
13473 cat conftest.$ac_ext >&5
13474 cf_cv_need_libm=yes
13475 fi
13476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13477 fi
13478 echo "$as_me:13478: result: $cf_cv_need_libm" >&5
13479 echo "${ECHO_T}$cf_cv_need_libm" >&6
13480 if test "$cf_cv_need_libm" = yes
13481 then
13482 MATH_LIB=-lm
13483 fi
13484
13485 ###     Checks for header files.
13486 echo "$as_me:13486: checking for ANSI C header files" >&5
13487 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13488 if test "${ac_cv_header_stdc+set}" = set; then
13489   echo $ECHO_N "(cached) $ECHO_C" >&6
13490 else
13491   cat >conftest.$ac_ext <<_ACEOF
13492 #line 13492 "configure"
13493 #include "confdefs.h"
13494 #include <stdlib.h>
13495 #include <stdarg.h>
13496 #include <string.h>
13497 #include <float.h>
13498
13499 _ACEOF
13500 if { (eval echo "$as_me:13500: \"$ac_cpp conftest.$ac_ext\"") >&5
13501   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13502   ac_status=$?
13503   egrep -v '^ *\+' conftest.er1 >conftest.err
13504   rm -f conftest.er1
13505   cat conftest.err >&5
13506   echo "$as_me:13506: \$? = $ac_status" >&5
13507   (exit $ac_status); } >/dev/null; then
13508   if test -s conftest.err; then
13509     ac_cpp_err=$ac_c_preproc_warn_flag
13510   else
13511     ac_cpp_err=
13512   fi
13513 else
13514   ac_cpp_err=yes
13515 fi
13516 if test -z "$ac_cpp_err"; then
13517   ac_cv_header_stdc=yes
13518 else
13519   echo "$as_me: failed program was:" >&5
13520   cat conftest.$ac_ext >&5
13521   ac_cv_header_stdc=no
13522 fi
13523 rm -f conftest.err conftest.$ac_ext
13524
13525 if test $ac_cv_header_stdc = yes; then
13526   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13527   cat >conftest.$ac_ext <<_ACEOF
13528 #line 13528 "configure"
13529 #include "confdefs.h"
13530 #include <string.h>
13531
13532 _ACEOF
13533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13534   egrep "memchr" >/dev/null 2>&1; then
13535   :
13536 else
13537   ac_cv_header_stdc=no
13538 fi
13539 rm -rf conftest*
13540
13541 fi
13542
13543 if test $ac_cv_header_stdc = yes; then
13544   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13545   cat >conftest.$ac_ext <<_ACEOF
13546 #line 13546 "configure"
13547 #include "confdefs.h"
13548 #include <stdlib.h>
13549
13550 _ACEOF
13551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13552   egrep "free" >/dev/null 2>&1; then
13553   :
13554 else
13555   ac_cv_header_stdc=no
13556 fi
13557 rm -rf conftest*
13558
13559 fi
13560
13561 if test $ac_cv_header_stdc = yes; then
13562   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13563   if test "$cross_compiling" = yes; then
13564   :
13565 else
13566   cat >conftest.$ac_ext <<_ACEOF
13567 #line 13567 "configure"
13568 #include "confdefs.h"
13569 #include <ctype.h>
13570 #if ((' ' & 0x0FF) == 0x020)
13571 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13572 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13573 #else
13574 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13575                      || ('j' <= (c) && (c) <= 'r') \
13576                      || ('s' <= (c) && (c) <= 'z'))
13577 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13578 #endif
13579
13580 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13581 int
13582 main ()
13583 {
13584   int i;
13585   for (i = 0; i < 256; i++)
13586     if (XOR (islower (i), ISLOWER (i))
13587         || toupper (i) != TOUPPER (i))
13588       $ac_main_return(2);
13589   $ac_main_return (0);
13590 }
13591 _ACEOF
13592 rm -f conftest$ac_exeext
13593 if { (eval echo "$as_me:13593: \"$ac_link\"") >&5
13594   (eval $ac_link) 2>&5
13595   ac_status=$?
13596   echo "$as_me:13596: \$? = $ac_status" >&5
13597   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13598   { (eval echo "$as_me:13598: \"$ac_try\"") >&5
13599   (eval $ac_try) 2>&5
13600   ac_status=$?
13601   echo "$as_me:13601: \$? = $ac_status" >&5
13602   (exit $ac_status); }; }; then
13603   :
13604 else
13605   echo "$as_me: program exited with status $ac_status" >&5
13606 echo "$as_me: failed program was:" >&5
13607 cat conftest.$ac_ext >&5
13608 ac_cv_header_stdc=no
13609 fi
13610 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13611 fi
13612 fi
13613 fi
13614 echo "$as_me:13614: result: $ac_cv_header_stdc" >&5
13615 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13616 if test $ac_cv_header_stdc = yes; then
13617
13618 cat >>confdefs.h <<\EOF
13619 #define STDC_HEADERS 1
13620 EOF
13621
13622 fi
13623
13624 ac_header_dirent=no
13625 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13626   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13627 echo "$as_me:13627: checking for $ac_hdr that defines DIR" >&5
13628 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13629 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13630   echo $ECHO_N "(cached) $ECHO_C" >&6
13631 else
13632   cat >conftest.$ac_ext <<_ACEOF
13633 #line 13633 "configure"
13634 #include "confdefs.h"
13635 #include <sys/types.h>
13636 #include <$ac_hdr>
13637
13638 int
13639 main ()
13640 {
13641 if ((DIR *) 0)
13642 return 0;
13643   ;
13644   return 0;
13645 }
13646 _ACEOF
13647 rm -f conftest.$ac_objext
13648 if { (eval echo "$as_me:13648: \"$ac_compile\"") >&5
13649   (eval $ac_compile) 2>&5
13650   ac_status=$?
13651   echo "$as_me:13651: \$? = $ac_status" >&5
13652   (exit $ac_status); } &&
13653          { ac_try='test -s conftest.$ac_objext'
13654   { (eval echo "$as_me:13654: \"$ac_try\"") >&5
13655   (eval $ac_try) 2>&5
13656   ac_status=$?
13657   echo "$as_me:13657: \$? = $ac_status" >&5
13658   (exit $ac_status); }; }; then
13659   eval "$as_ac_Header=yes"
13660 else
13661   echo "$as_me: failed program was:" >&5
13662 cat conftest.$ac_ext >&5
13663 eval "$as_ac_Header=no"
13664 fi
13665 rm -f conftest.$ac_objext conftest.$ac_ext
13666 fi
13667 echo "$as_me:13667: result: `eval echo '${'$as_ac_Header'}'`" >&5
13668 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13669 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13670   cat >>confdefs.h <<EOF
13671 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13672 EOF
13673
13674 ac_header_dirent=$ac_hdr; break
13675 fi
13676
13677 done
13678 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13679 if test $ac_header_dirent = dirent.h; then
13680   echo "$as_me:13680: checking for opendir in -ldir" >&5
13681 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13682 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13683   echo $ECHO_N "(cached) $ECHO_C" >&6
13684 else
13685   ac_check_lib_save_LIBS=$LIBS
13686 LIBS="-ldir  $LIBS"
13687 cat >conftest.$ac_ext <<_ACEOF
13688 #line 13688 "configure"
13689 #include "confdefs.h"
13690
13691 /* Override any gcc2 internal prototype to avoid an error.  */
13692 #ifdef __cplusplus
13693 extern "C"
13694 #endif
13695 /* We use char because int might match the return type of a gcc2
13696    builtin and then its argument prototype would still apply.  */
13697 char opendir ();
13698 int
13699 main ()
13700 {
13701 opendir ();
13702   ;
13703   return 0;
13704 }
13705 _ACEOF
13706 rm -f conftest.$ac_objext conftest$ac_exeext
13707 if { (eval echo "$as_me:13707: \"$ac_link\"") >&5
13708   (eval $ac_link) 2>&5
13709   ac_status=$?
13710   echo "$as_me:13710: \$? = $ac_status" >&5
13711   (exit $ac_status); } &&
13712          { ac_try='test -s conftest$ac_exeext'
13713   { (eval echo "$as_me:13713: \"$ac_try\"") >&5
13714   (eval $ac_try) 2>&5
13715   ac_status=$?
13716   echo "$as_me:13716: \$? = $ac_status" >&5
13717   (exit $ac_status); }; }; then
13718   ac_cv_lib_dir_opendir=yes
13719 else
13720   echo "$as_me: failed program was:" >&5
13721 cat conftest.$ac_ext >&5
13722 ac_cv_lib_dir_opendir=no
13723 fi
13724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13725 LIBS=$ac_check_lib_save_LIBS
13726 fi
13727 echo "$as_me:13727: result: $ac_cv_lib_dir_opendir" >&5
13728 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13729 if test $ac_cv_lib_dir_opendir = yes; then
13730   LIBS="$LIBS -ldir"
13731 fi
13732
13733 else
13734   echo "$as_me:13734: checking for opendir in -lx" >&5
13735 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13736 if test "${ac_cv_lib_x_opendir+set}" = set; then
13737   echo $ECHO_N "(cached) $ECHO_C" >&6
13738 else
13739   ac_check_lib_save_LIBS=$LIBS
13740 LIBS="-lx  $LIBS"
13741 cat >conftest.$ac_ext <<_ACEOF
13742 #line 13742 "configure"
13743 #include "confdefs.h"
13744
13745 /* Override any gcc2 internal prototype to avoid an error.  */
13746 #ifdef __cplusplus
13747 extern "C"
13748 #endif
13749 /* We use char because int might match the return type of a gcc2
13750    builtin and then its argument prototype would still apply.  */
13751 char opendir ();
13752 int
13753 main ()
13754 {
13755 opendir ();
13756   ;
13757   return 0;
13758 }
13759 _ACEOF
13760 rm -f conftest.$ac_objext conftest$ac_exeext
13761 if { (eval echo "$as_me:13761: \"$ac_link\"") >&5
13762   (eval $ac_link) 2>&5
13763   ac_status=$?
13764   echo "$as_me:13764: \$? = $ac_status" >&5
13765   (exit $ac_status); } &&
13766          { ac_try='test -s conftest$ac_exeext'
13767   { (eval echo "$as_me:13767: \"$ac_try\"") >&5
13768   (eval $ac_try) 2>&5
13769   ac_status=$?
13770   echo "$as_me:13770: \$? = $ac_status" >&5
13771   (exit $ac_status); }; }; then
13772   ac_cv_lib_x_opendir=yes
13773 else
13774   echo "$as_me: failed program was:" >&5
13775 cat conftest.$ac_ext >&5
13776 ac_cv_lib_x_opendir=no
13777 fi
13778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13779 LIBS=$ac_check_lib_save_LIBS
13780 fi
13781 echo "$as_me:13781: result: $ac_cv_lib_x_opendir" >&5
13782 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13783 if test $ac_cv_lib_x_opendir = yes; then
13784   LIBS="$LIBS -lx"
13785 fi
13786
13787 fi
13788
13789 echo "$as_me:13789: checking whether time.h and sys/time.h may both be included" >&5
13790 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13791 if test "${ac_cv_header_time+set}" = set; then
13792   echo $ECHO_N "(cached) $ECHO_C" >&6
13793 else
13794   cat >conftest.$ac_ext <<_ACEOF
13795 #line 13795 "configure"
13796 #include "confdefs.h"
13797 #include <sys/types.h>
13798 #include <sys/time.h>
13799 #include <time.h>
13800
13801 int
13802 main ()
13803 {
13804 if ((struct tm *) 0)
13805 return 0;
13806   ;
13807   return 0;
13808 }
13809 _ACEOF
13810 rm -f conftest.$ac_objext
13811 if { (eval echo "$as_me:13811: \"$ac_compile\"") >&5
13812   (eval $ac_compile) 2>&5
13813   ac_status=$?
13814   echo "$as_me:13814: \$? = $ac_status" >&5
13815   (exit $ac_status); } &&
13816          { ac_try='test -s conftest.$ac_objext'
13817   { (eval echo "$as_me:13817: \"$ac_try\"") >&5
13818   (eval $ac_try) 2>&5
13819   ac_status=$?
13820   echo "$as_me:13820: \$? = $ac_status" >&5
13821   (exit $ac_status); }; }; then
13822   ac_cv_header_time=yes
13823 else
13824   echo "$as_me: failed program was:" >&5
13825 cat conftest.$ac_ext >&5
13826 ac_cv_header_time=no
13827 fi
13828 rm -f conftest.$ac_objext conftest.$ac_ext
13829 fi
13830 echo "$as_me:13830: result: $ac_cv_header_time" >&5
13831 echo "${ECHO_T}$ac_cv_header_time" >&6
13832 if test $ac_cv_header_time = yes; then
13833
13834 cat >>confdefs.h <<\EOF
13835 #define TIME_WITH_SYS_TIME 1
13836 EOF
13837
13838 fi
13839
13840 cf_regex_func=no
13841
13842 cf_regex_libs="regex re"
13843 case $host_os in #(vi
13844 mingw*)
13845         cf_regex_libs="gnurx $cf_regex_libs"
13846         ;;
13847 esac
13848
13849 echo "$as_me:13849: checking for regcomp" >&5
13850 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13851 if test "${ac_cv_func_regcomp+set}" = set; then
13852   echo $ECHO_N "(cached) $ECHO_C" >&6
13853 else
13854   cat >conftest.$ac_ext <<_ACEOF
13855 #line 13855 "configure"
13856 #include "confdefs.h"
13857 /* System header to define __stub macros and hopefully few prototypes,
13858     which can conflict with char regcomp (); below.  */
13859 #include <assert.h>
13860 /* Override any gcc2 internal prototype to avoid an error.  */
13861 #ifdef __cplusplus
13862 extern "C"
13863 #endif
13864 /* We use char because int might match the return type of a gcc2
13865    builtin and then its argument prototype would still apply.  */
13866 char regcomp ();
13867 char (*f) ();
13868
13869 int
13870 main ()
13871 {
13872 /* The GNU C library defines this for functions which it implements
13873     to always fail with ENOSYS.  Some functions are actually named
13874     something starting with __ and the normal name is an alias.  */
13875 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13876 choke me
13877 #else
13878 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13879 #endif
13880
13881   ;
13882   return 0;
13883 }
13884 _ACEOF
13885 rm -f conftest.$ac_objext conftest$ac_exeext
13886 if { (eval echo "$as_me:13886: \"$ac_link\"") >&5
13887   (eval $ac_link) 2>&5
13888   ac_status=$?
13889   echo "$as_me:13889: \$? = $ac_status" >&5
13890   (exit $ac_status); } &&
13891          { ac_try='test -s conftest$ac_exeext'
13892   { (eval echo "$as_me:13892: \"$ac_try\"") >&5
13893   (eval $ac_try) 2>&5
13894   ac_status=$?
13895   echo "$as_me:13895: \$? = $ac_status" >&5
13896   (exit $ac_status); }; }; then
13897   ac_cv_func_regcomp=yes
13898 else
13899   echo "$as_me: failed program was:" >&5
13900 cat conftest.$ac_ext >&5
13901 ac_cv_func_regcomp=no
13902 fi
13903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13904 fi
13905 echo "$as_me:13905: result: $ac_cv_func_regcomp" >&5
13906 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13907 if test $ac_cv_func_regcomp = yes; then
13908   cf_regex_func=regcomp
13909 else
13910
13911         for cf_regex_lib in $cf_regex_libs
13912         do
13913                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13914 echo "$as_me:13914: checking for regcomp in -l$cf_regex_lib" >&5
13915 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13916 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13917   echo $ECHO_N "(cached) $ECHO_C" >&6
13918 else
13919   ac_check_lib_save_LIBS=$LIBS
13920 LIBS="-l$cf_regex_lib  $LIBS"
13921 cat >conftest.$ac_ext <<_ACEOF
13922 #line 13922 "configure"
13923 #include "confdefs.h"
13924
13925 /* Override any gcc2 internal prototype to avoid an error.  */
13926 #ifdef __cplusplus
13927 extern "C"
13928 #endif
13929 /* We use char because int might match the return type of a gcc2
13930    builtin and then its argument prototype would still apply.  */
13931 char regcomp ();
13932 int
13933 main ()
13934 {
13935 regcomp ();
13936   ;
13937   return 0;
13938 }
13939 _ACEOF
13940 rm -f conftest.$ac_objext conftest$ac_exeext
13941 if { (eval echo "$as_me:13941: \"$ac_link\"") >&5
13942   (eval $ac_link) 2>&5
13943   ac_status=$?
13944   echo "$as_me:13944: \$? = $ac_status" >&5
13945   (exit $ac_status); } &&
13946          { ac_try='test -s conftest$ac_exeext'
13947   { (eval echo "$as_me:13947: \"$ac_try\"") >&5
13948   (eval $ac_try) 2>&5
13949   ac_status=$?
13950   echo "$as_me:13950: \$? = $ac_status" >&5
13951   (exit $ac_status); }; }; then
13952   eval "$as_ac_Lib=yes"
13953 else
13954   echo "$as_me: failed program was:" >&5
13955 cat conftest.$ac_ext >&5
13956 eval "$as_ac_Lib=no"
13957 fi
13958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13959 LIBS=$ac_check_lib_save_LIBS
13960 fi
13961 echo "$as_me:13961: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13962 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13963 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13964
13965                                 LIBS="-l$cf_regex_lib $LIBS"
13966                                 cf_regex_func=regcomp
13967                                 break
13968 fi
13969
13970         done
13971
13972 fi
13973
13974 if test "$cf_regex_func" = no ; then
13975         echo "$as_me:13975: checking for compile" >&5
13976 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13977 if test "${ac_cv_func_compile+set}" = set; then
13978   echo $ECHO_N "(cached) $ECHO_C" >&6
13979 else
13980   cat >conftest.$ac_ext <<_ACEOF
13981 #line 13981 "configure"
13982 #include "confdefs.h"
13983 /* System header to define __stub macros and hopefully few prototypes,
13984     which can conflict with char compile (); below.  */
13985 #include <assert.h>
13986 /* Override any gcc2 internal prototype to avoid an error.  */
13987 #ifdef __cplusplus
13988 extern "C"
13989 #endif
13990 /* We use char because int might match the return type of a gcc2
13991    builtin and then its argument prototype would still apply.  */
13992 char compile ();
13993 char (*f) ();
13994
13995 int
13996 main ()
13997 {
13998 /* The GNU C library defines this for functions which it implements
13999     to always fail with ENOSYS.  Some functions are actually named
14000     something starting with __ and the normal name is an alias.  */
14001 #if defined (__stub_compile) || defined (__stub___compile)
14002 choke me
14003 #else
14004 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14005 #endif
14006
14007   ;
14008   return 0;
14009 }
14010 _ACEOF
14011 rm -f conftest.$ac_objext conftest$ac_exeext
14012 if { (eval echo "$as_me:14012: \"$ac_link\"") >&5
14013   (eval $ac_link) 2>&5
14014   ac_status=$?
14015   echo "$as_me:14015: \$? = $ac_status" >&5
14016   (exit $ac_status); } &&
14017          { ac_try='test -s conftest$ac_exeext'
14018   { (eval echo "$as_me:14018: \"$ac_try\"") >&5
14019   (eval $ac_try) 2>&5
14020   ac_status=$?
14021   echo "$as_me:14021: \$? = $ac_status" >&5
14022   (exit $ac_status); }; }; then
14023   ac_cv_func_compile=yes
14024 else
14025   echo "$as_me: failed program was:" >&5
14026 cat conftest.$ac_ext >&5
14027 ac_cv_func_compile=no
14028 fi
14029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14030 fi
14031 echo "$as_me:14031: result: $ac_cv_func_compile" >&5
14032 echo "${ECHO_T}$ac_cv_func_compile" >&6
14033 if test $ac_cv_func_compile = yes; then
14034   cf_regex_func=compile
14035 else
14036
14037                 echo "$as_me:14037: checking for compile in -lgen" >&5
14038 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14039 if test "${ac_cv_lib_gen_compile+set}" = set; then
14040   echo $ECHO_N "(cached) $ECHO_C" >&6
14041 else
14042   ac_check_lib_save_LIBS=$LIBS
14043 LIBS="-lgen  $LIBS"
14044 cat >conftest.$ac_ext <<_ACEOF
14045 #line 14045 "configure"
14046 #include "confdefs.h"
14047
14048 /* Override any gcc2 internal prototype to avoid an error.  */
14049 #ifdef __cplusplus
14050 extern "C"
14051 #endif
14052 /* We use char because int might match the return type of a gcc2
14053    builtin and then its argument prototype would still apply.  */
14054 char compile ();
14055 int
14056 main ()
14057 {
14058 compile ();
14059   ;
14060   return 0;
14061 }
14062 _ACEOF
14063 rm -f conftest.$ac_objext conftest$ac_exeext
14064 if { (eval echo "$as_me:14064: \"$ac_link\"") >&5
14065   (eval $ac_link) 2>&5
14066   ac_status=$?
14067   echo "$as_me:14067: \$? = $ac_status" >&5
14068   (exit $ac_status); } &&
14069          { ac_try='test -s conftest$ac_exeext'
14070   { (eval echo "$as_me:14070: \"$ac_try\"") >&5
14071   (eval $ac_try) 2>&5
14072   ac_status=$?
14073   echo "$as_me:14073: \$? = $ac_status" >&5
14074   (exit $ac_status); }; }; then
14075   ac_cv_lib_gen_compile=yes
14076 else
14077   echo "$as_me: failed program was:" >&5
14078 cat conftest.$ac_ext >&5
14079 ac_cv_lib_gen_compile=no
14080 fi
14081 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14082 LIBS=$ac_check_lib_save_LIBS
14083 fi
14084 echo "$as_me:14084: result: $ac_cv_lib_gen_compile" >&5
14085 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14086 if test $ac_cv_lib_gen_compile = yes; then
14087
14088                                 LIBS="-lgen $LIBS"
14089                                 cf_regex_func=compile
14090 fi
14091
14092 fi
14093
14094 fi
14095
14096 if test "$cf_regex_func" = no ; then
14097         { echo "$as_me:14097: WARNING: cannot find regular expression library" >&5
14098 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14099 fi
14100
14101 echo "$as_me:14101: checking for regular-expression headers" >&5
14102 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14103 if test "${cf_cv_regex_hdrs+set}" = set; then
14104   echo $ECHO_N "(cached) $ECHO_C" >&6
14105 else
14106
14107 cf_cv_regex_hdrs=no
14108 case $cf_regex_func in #(vi
14109 compile) #(vi
14110         for cf_regex_hdr in regexp.h regexpr.h
14111         do
14112                 cat >conftest.$ac_ext <<_ACEOF
14113 #line 14113 "configure"
14114 #include "confdefs.h"
14115 #include <$cf_regex_hdr>
14116 int
14117 main ()
14118 {
14119
14120                         char *p = compile("", "", "", 0);
14121                         int x = step("", "");
14122
14123   ;
14124   return 0;
14125 }
14126 _ACEOF
14127 rm -f conftest.$ac_objext conftest$ac_exeext
14128 if { (eval echo "$as_me:14128: \"$ac_link\"") >&5
14129   (eval $ac_link) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit $ac_status); } &&
14133          { ac_try='test -s conftest$ac_exeext'
14134   { (eval echo "$as_me:14134: \"$ac_try\"") >&5
14135   (eval $ac_try) 2>&5
14136   ac_status=$?
14137   echo "$as_me:14137: \$? = $ac_status" >&5
14138   (exit $ac_status); }; }; then
14139
14140                         cf_cv_regex_hdrs=$cf_regex_hdr
14141                         break
14142
14143 else
14144   echo "$as_me: failed program was:" >&5
14145 cat conftest.$ac_ext >&5
14146 fi
14147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14148         done
14149         ;;
14150 *)
14151         for cf_regex_hdr in regex.h
14152         do
14153                 cat >conftest.$ac_ext <<_ACEOF
14154 #line 14154 "configure"
14155 #include "confdefs.h"
14156 #include <sys/types.h>
14157 #include <$cf_regex_hdr>
14158 int
14159 main ()
14160 {
14161
14162                         regex_t *p;
14163                         int x = regcomp(p, "", 0);
14164                         int y = regexec(p, "", 0, 0, 0);
14165                         regfree(p);
14166
14167   ;
14168   return 0;
14169 }
14170 _ACEOF
14171 rm -f conftest.$ac_objext conftest$ac_exeext
14172 if { (eval echo "$as_me:14172: \"$ac_link\"") >&5
14173   (eval $ac_link) 2>&5
14174   ac_status=$?
14175   echo "$as_me:14175: \$? = $ac_status" >&5
14176   (exit $ac_status); } &&
14177          { ac_try='test -s conftest$ac_exeext'
14178   { (eval echo "$as_me:14178: \"$ac_try\"") >&5
14179   (eval $ac_try) 2>&5
14180   ac_status=$?
14181   echo "$as_me:14181: \$? = $ac_status" >&5
14182   (exit $ac_status); }; }; then
14183
14184                         cf_cv_regex_hdrs=$cf_regex_hdr
14185                         break
14186
14187 else
14188   echo "$as_me: failed program was:" >&5
14189 cat conftest.$ac_ext >&5
14190 fi
14191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14192         done
14193         ;;
14194 esac
14195
14196 fi
14197 echo "$as_me:14197: result: $cf_cv_regex_hdrs" >&5
14198 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14199
14200 case $cf_cv_regex_hdrs in #(vi
14201     no)        { echo "$as_me:14201: WARNING: no regular expression header found" >&5
14202 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14203     regex.h)
14204 cat >>confdefs.h <<\EOF
14205 #define HAVE_REGEX_H_FUNCS 1
14206 EOF
14207  ;; #(vi
14208     regexp.h)
14209 cat >>confdefs.h <<\EOF
14210 #define HAVE_REGEXP_H_FUNCS 1
14211 EOF
14212  ;; #(vi
14213     regexpr.h)
14214 cat >>confdefs.h <<\EOF
14215 #define HAVE_REGEXPR_H_FUNCS 1
14216 EOF
14217  ;;
14218 esac
14219
14220 for ac_header in \
14221 fcntl.h \
14222 getopt.h \
14223 limits.h \
14224 locale.h \
14225 math.h \
14226 poll.h \
14227 sys/bsdtypes.h \
14228 sys/ioctl.h \
14229 sys/param.h \
14230 sys/poll.h \
14231 sys/select.h \
14232 sys/time.h \
14233 sys/times.h \
14234 ttyent.h \
14235 unistd.h \
14236 wctype.h \
14237
14238 do
14239 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14240 echo "$as_me:14240: checking for $ac_header" >&5
14241 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14242 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14243   echo $ECHO_N "(cached) $ECHO_C" >&6
14244 else
14245   cat >conftest.$ac_ext <<_ACEOF
14246 #line 14246 "configure"
14247 #include "confdefs.h"
14248 #include <$ac_header>
14249 _ACEOF
14250 if { (eval echo "$as_me:14250: \"$ac_cpp conftest.$ac_ext\"") >&5
14251   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14252   ac_status=$?
14253   egrep -v '^ *\+' conftest.er1 >conftest.err
14254   rm -f conftest.er1
14255   cat conftest.err >&5
14256   echo "$as_me:14256: \$? = $ac_status" >&5
14257   (exit $ac_status); } >/dev/null; then
14258   if test -s conftest.err; then
14259     ac_cpp_err=$ac_c_preproc_warn_flag
14260   else
14261     ac_cpp_err=
14262   fi
14263 else
14264   ac_cpp_err=yes
14265 fi
14266 if test -z "$ac_cpp_err"; then
14267   eval "$as_ac_Header=yes"
14268 else
14269   echo "$as_me: failed program was:" >&5
14270   cat conftest.$ac_ext >&5
14271   eval "$as_ac_Header=no"
14272 fi
14273 rm -f conftest.err conftest.$ac_ext
14274 fi
14275 echo "$as_me:14275: result: `eval echo '${'$as_ac_Header'}'`" >&5
14276 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14277 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14278   cat >>confdefs.h <<EOF
14279 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14280 EOF
14281
14282 fi
14283 done
14284
14285 for ac_header in unistd.h getopt.h
14286 do
14287 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14288 echo "$as_me:14288: checking for $ac_header" >&5
14289 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14290 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14291   echo $ECHO_N "(cached) $ECHO_C" >&6
14292 else
14293   cat >conftest.$ac_ext <<_ACEOF
14294 #line 14294 "configure"
14295 #include "confdefs.h"
14296 #include <$ac_header>
14297 _ACEOF
14298 if { (eval echo "$as_me:14298: \"$ac_cpp conftest.$ac_ext\"") >&5
14299   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14300   ac_status=$?
14301   egrep -v '^ *\+' conftest.er1 >conftest.err
14302   rm -f conftest.er1
14303   cat conftest.err >&5
14304   echo "$as_me:14304: \$? = $ac_status" >&5
14305   (exit $ac_status); } >/dev/null; then
14306   if test -s conftest.err; then
14307     ac_cpp_err=$ac_c_preproc_warn_flag
14308   else
14309     ac_cpp_err=
14310   fi
14311 else
14312   ac_cpp_err=yes
14313 fi
14314 if test -z "$ac_cpp_err"; then
14315   eval "$as_ac_Header=yes"
14316 else
14317   echo "$as_me: failed program was:" >&5
14318   cat conftest.$ac_ext >&5
14319   eval "$as_ac_Header=no"
14320 fi
14321 rm -f conftest.err conftest.$ac_ext
14322 fi
14323 echo "$as_me:14323: result: `eval echo '${'$as_ac_Header'}'`" >&5
14324 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14325 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14326   cat >>confdefs.h <<EOF
14327 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14328 EOF
14329
14330 fi
14331 done
14332
14333 echo "$as_me:14333: checking for header declaring getopt variables" >&5
14334 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14335 if test "${cf_cv_getopt_header+set}" = set; then
14336   echo $ECHO_N "(cached) $ECHO_C" >&6
14337 else
14338
14339 cf_cv_getopt_header=none
14340 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14341 do
14342 cat >conftest.$ac_ext <<_ACEOF
14343 #line 14343 "configure"
14344 #include "confdefs.h"
14345
14346 #include <$cf_header>
14347 int
14348 main ()
14349 {
14350 int x = optind; char *y = optarg
14351   ;
14352   return 0;
14353 }
14354 _ACEOF
14355 rm -f conftest.$ac_objext
14356 if { (eval echo "$as_me:14356: \"$ac_compile\"") >&5
14357   (eval $ac_compile) 2>&5
14358   ac_status=$?
14359   echo "$as_me:14359: \$? = $ac_status" >&5
14360   (exit $ac_status); } &&
14361          { ac_try='test -s conftest.$ac_objext'
14362   { (eval echo "$as_me:14362: \"$ac_try\"") >&5
14363   (eval $ac_try) 2>&5
14364   ac_status=$?
14365   echo "$as_me:14365: \$? = $ac_status" >&5
14366   (exit $ac_status); }; }; then
14367   cf_cv_getopt_header=$cf_header
14368  break
14369 else
14370   echo "$as_me: failed program was:" >&5
14371 cat conftest.$ac_ext >&5
14372 fi
14373 rm -f conftest.$ac_objext conftest.$ac_ext
14374 done
14375
14376 fi
14377 echo "$as_me:14377: result: $cf_cv_getopt_header" >&5
14378 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14379 if test $cf_cv_getopt_header != none ; then
14380
14381 cat >>confdefs.h <<\EOF
14382 #define HAVE_GETOPT_HEADER 1
14383 EOF
14384
14385 fi
14386
14387 # check for ISC (this may also define _POSIX_SOURCE)
14388 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14389 if test "x$ISC" = xyes ; then
14390
14391 echo "$as_me:14391: checking for main in -lcposix" >&5
14392 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14393 if test "${ac_cv_lib_cposix_main+set}" = set; then
14394   echo $ECHO_N "(cached) $ECHO_C" >&6
14395 else
14396   ac_check_lib_save_LIBS=$LIBS
14397 LIBS="-lcposix  $LIBS"
14398 cat >conftest.$ac_ext <<_ACEOF
14399 #line 14399 "configure"
14400 #include "confdefs.h"
14401
14402 int
14403 main ()
14404 {
14405 main ();
14406   ;
14407   return 0;
14408 }
14409 _ACEOF
14410 rm -f conftest.$ac_objext conftest$ac_exeext
14411 if { (eval echo "$as_me:14411: \"$ac_link\"") >&5
14412   (eval $ac_link) 2>&5
14413   ac_status=$?
14414   echo "$as_me:14414: \$? = $ac_status" >&5
14415   (exit $ac_status); } &&
14416          { ac_try='test -s conftest$ac_exeext'
14417   { (eval echo "$as_me:14417: \"$ac_try\"") >&5
14418   (eval $ac_try) 2>&5
14419   ac_status=$?
14420   echo "$as_me:14420: \$? = $ac_status" >&5
14421   (exit $ac_status); }; }; then
14422   ac_cv_lib_cposix_main=yes
14423 else
14424   echo "$as_me: failed program was:" >&5
14425 cat conftest.$ac_ext >&5
14426 ac_cv_lib_cposix_main=no
14427 fi
14428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14429 LIBS=$ac_check_lib_save_LIBS
14430 fi
14431 echo "$as_me:14431: result: $ac_cv_lib_cposix_main" >&5
14432 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14433 if test $ac_cv_lib_cposix_main = yes; then
14434   cat >>confdefs.h <<EOF
14435 #define HAVE_LIBCPOSIX 1
14436 EOF
14437
14438   LIBS="-lcposix $LIBS"
14439
14440 fi
14441
14442         echo "$as_me:14442: checking for bzero in -linet" >&5
14443 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14444 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14445   echo $ECHO_N "(cached) $ECHO_C" >&6
14446 else
14447   ac_check_lib_save_LIBS=$LIBS
14448 LIBS="-linet  $LIBS"
14449 cat >conftest.$ac_ext <<_ACEOF
14450 #line 14450 "configure"
14451 #include "confdefs.h"
14452
14453 /* Override any gcc2 internal prototype to avoid an error.  */
14454 #ifdef __cplusplus
14455 extern "C"
14456 #endif
14457 /* We use char because int might match the return type of a gcc2
14458    builtin and then its argument prototype would still apply.  */
14459 char bzero ();
14460 int
14461 main ()
14462 {
14463 bzero ();
14464   ;
14465   return 0;
14466 }
14467 _ACEOF
14468 rm -f conftest.$ac_objext conftest$ac_exeext
14469 if { (eval echo "$as_me:14469: \"$ac_link\"") >&5
14470   (eval $ac_link) 2>&5
14471   ac_status=$?
14472   echo "$as_me:14472: \$? = $ac_status" >&5
14473   (exit $ac_status); } &&
14474          { ac_try='test -s conftest$ac_exeext'
14475   { (eval echo "$as_me:14475: \"$ac_try\"") >&5
14476   (eval $ac_try) 2>&5
14477   ac_status=$?
14478   echo "$as_me:14478: \$? = $ac_status" >&5
14479   (exit $ac_status); }; }; then
14480   ac_cv_lib_inet_bzero=yes
14481 else
14482   echo "$as_me: failed program was:" >&5
14483 cat conftest.$ac_ext >&5
14484 ac_cv_lib_inet_bzero=no
14485 fi
14486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14487 LIBS=$ac_check_lib_save_LIBS
14488 fi
14489 echo "$as_me:14489: result: $ac_cv_lib_inet_bzero" >&5
14490 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14491 if test $ac_cv_lib_inet_bzero = yes; then
14492   LIBS="-linet $LIBS"
14493 fi
14494 fi
14495
14496 echo "$as_me:14496: checking if sys/time.h works with sys/select.h" >&5
14497 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14498 if test "${cf_cv_sys_time_select+set}" = set; then
14499   echo $ECHO_N "(cached) $ECHO_C" >&6
14500 else
14501
14502 cat >conftest.$ac_ext <<_ACEOF
14503 #line 14503 "configure"
14504 #include "confdefs.h"
14505
14506 #include <sys/types.h>
14507 #ifdef HAVE_SYS_TIME_H
14508 #include <sys/time.h>
14509 #endif
14510 #ifdef HAVE_SYS_SELECT_H
14511 #include <sys/select.h>
14512 #endif
14513
14514 int
14515 main ()
14516 {
14517
14518   ;
14519   return 0;
14520 }
14521 _ACEOF
14522 rm -f conftest.$ac_objext
14523 if { (eval echo "$as_me:14523: \"$ac_compile\"") >&5
14524   (eval $ac_compile) 2>&5
14525   ac_status=$?
14526   echo "$as_me:14526: \$? = $ac_status" >&5
14527   (exit $ac_status); } &&
14528          { ac_try='test -s conftest.$ac_objext'
14529   { (eval echo "$as_me:14529: \"$ac_try\"") >&5
14530   (eval $ac_try) 2>&5
14531   ac_status=$?
14532   echo "$as_me:14532: \$? = $ac_status" >&5
14533   (exit $ac_status); }; }; then
14534   cf_cv_sys_time_select=yes
14535 else
14536   echo "$as_me: failed program was:" >&5
14537 cat conftest.$ac_ext >&5
14538 cf_cv_sys_time_select=no
14539 fi
14540 rm -f conftest.$ac_objext conftest.$ac_ext
14541
14542 fi
14543
14544 echo "$as_me:14544: result: $cf_cv_sys_time_select" >&5
14545 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14546 test "$cf_cv_sys_time_select" = yes &&
14547 cat >>confdefs.h <<\EOF
14548 #define HAVE_SYS_TIME_SELECT 1
14549 EOF
14550
14551 ###     checks for compiler characteristics
14552 ac_ext=c
14553 ac_cpp='$CPP $CPPFLAGS'
14554 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14555 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14556 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14557 ac_main_return=return
14558
14559 echo "$as_me:14559: checking for an ANSI C-conforming const" >&5
14560 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14561 if test "${ac_cv_c_const+set}" = set; then
14562   echo $ECHO_N "(cached) $ECHO_C" >&6
14563 else
14564   cat >conftest.$ac_ext <<_ACEOF
14565 #line 14565 "configure"
14566 #include "confdefs.h"
14567
14568 int
14569 main ()
14570 {
14571 /* FIXME: Include the comments suggested by Paul. */
14572 #ifndef __cplusplus
14573   /* Ultrix mips cc rejects this.  */
14574   typedef int charset[2];
14575   const charset x;
14576   /* SunOS 4.1.1 cc rejects this.  */
14577   char const *const *ccp;
14578   char **p;
14579   /* NEC SVR4.0.2 mips cc rejects this.  */
14580   struct point {int x, y;};
14581   static struct point const zero = {0,0};
14582   /* AIX XL C 1.02.0.0 rejects this.
14583      It does not let you subtract one const X* pointer from another in
14584      an arm of an if-expression whose if-part is not a constant
14585      expression */
14586   const char *g = "string";
14587   ccp = &g + (g ? g-g : 0);
14588   /* HPUX 7.0 cc rejects these. */
14589   ++ccp;
14590   p = (char**) ccp;
14591   ccp = (char const *const *) p;
14592   { /* SCO 3.2v4 cc rejects this.  */
14593     char *t;
14594     char const *s = 0 ? (char *) 0 : (char const *) 0;
14595
14596     *t++ = 0;
14597   }
14598   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14599     int x[] = {25, 17};
14600     const int *foo = &x[0];
14601     ++foo;
14602   }
14603   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14604     typedef const int *iptr;
14605     iptr p = 0;
14606     ++p;
14607   }
14608   { /* AIX XL C 1.02.0.0 rejects this saying
14609        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14610     struct s { int j; const int *ap[3]; };
14611     struct s *b; b->j = 5;
14612   }
14613   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14614     const int foo = 10;
14615   }
14616 #endif
14617
14618   ;
14619   return 0;
14620 }
14621 _ACEOF
14622 rm -f conftest.$ac_objext
14623 if { (eval echo "$as_me:14623: \"$ac_compile\"") >&5
14624   (eval $ac_compile) 2>&5
14625   ac_status=$?
14626   echo "$as_me:14626: \$? = $ac_status" >&5
14627   (exit $ac_status); } &&
14628          { ac_try='test -s conftest.$ac_objext'
14629   { (eval echo "$as_me:14629: \"$ac_try\"") >&5
14630   (eval $ac_try) 2>&5
14631   ac_status=$?
14632   echo "$as_me:14632: \$? = $ac_status" >&5
14633   (exit $ac_status); }; }; then
14634   ac_cv_c_const=yes
14635 else
14636   echo "$as_me: failed program was:" >&5
14637 cat conftest.$ac_ext >&5
14638 ac_cv_c_const=no
14639 fi
14640 rm -f conftest.$ac_objext conftest.$ac_ext
14641 fi
14642 echo "$as_me:14642: result: $ac_cv_c_const" >&5
14643 echo "${ECHO_T}$ac_cv_c_const" >&6
14644 if test $ac_cv_c_const = no; then
14645
14646 cat >>confdefs.h <<\EOF
14647 #define const
14648 EOF
14649
14650 fi
14651
14652 echo "$as_me:14652: checking for inline" >&5
14653 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14654 if test "${ac_cv_c_inline+set}" = set; then
14655   echo $ECHO_N "(cached) $ECHO_C" >&6
14656 else
14657   ac_cv_c_inline=no
14658 for ac_kw in inline __inline__ __inline; do
14659   cat >conftest.$ac_ext <<_ACEOF
14660 #line 14660 "configure"
14661 #include "confdefs.h"
14662 #ifndef __cplusplus
14663 static $ac_kw int static_foo () {return 0; }
14664 $ac_kw int foo () {return 0; }
14665 #endif
14666
14667 _ACEOF
14668 rm -f conftest.$ac_objext
14669 if { (eval echo "$as_me:14669: \"$ac_compile\"") >&5
14670   (eval $ac_compile) 2>&5
14671   ac_status=$?
14672   echo "$as_me:14672: \$? = $ac_status" >&5
14673   (exit $ac_status); } &&
14674          { ac_try='test -s conftest.$ac_objext'
14675   { (eval echo "$as_me:14675: \"$ac_try\"") >&5
14676   (eval $ac_try) 2>&5
14677   ac_status=$?
14678   echo "$as_me:14678: \$? = $ac_status" >&5
14679   (exit $ac_status); }; }; then
14680   ac_cv_c_inline=$ac_kw; break
14681 else
14682   echo "$as_me: failed program was:" >&5
14683 cat conftest.$ac_ext >&5
14684 fi
14685 rm -f conftest.$ac_objext conftest.$ac_ext
14686 done
14687
14688 fi
14689 echo "$as_me:14689: result: $ac_cv_c_inline" >&5
14690 echo "${ECHO_T}$ac_cv_c_inline" >&6
14691 case $ac_cv_c_inline in
14692   inline | yes) ;;
14693   no)
14694 cat >>confdefs.h <<\EOF
14695 #define inline
14696 EOF
14697  ;;
14698   *)  cat >>confdefs.h <<EOF
14699 #define inline $ac_cv_c_inline
14700 EOF
14701  ;;
14702 esac
14703
14704 NCURSES_INLINE=
14705 if test "$ac_cv_c_inline" != no ; then
14706   NCURSES_INLINE=inline
14707   if test "$INTEL_COMPILER" = yes
14708   then
14709     :
14710   elif test "$CLANG_COMPILER" = yes
14711   then
14712     :
14713   elif test "$GCC" = yes
14714   then
14715     echo "$as_me:14715: checking if $CC supports options to tune inlining" >&5
14716 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14717 if test "${cf_cv_gcc_inline+set}" = set; then
14718   echo $ECHO_N "(cached) $ECHO_C" >&6
14719 else
14720
14721       cf_save_CFLAGS=$CFLAGS
14722       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14723       cat >conftest.$ac_ext <<_ACEOF
14724 #line 14724 "configure"
14725 #include "confdefs.h"
14726 inline int foo(void) { return 1; }
14727 int
14728 main ()
14729 {
14730 ${cf_cv_main_return:-return} foo()
14731   ;
14732   return 0;
14733 }
14734 _ACEOF
14735 rm -f conftest.$ac_objext
14736 if { (eval echo "$as_me:14736: \"$ac_compile\"") >&5
14737   (eval $ac_compile) 2>&5
14738   ac_status=$?
14739   echo "$as_me:14739: \$? = $ac_status" >&5
14740   (exit $ac_status); } &&
14741          { ac_try='test -s conftest.$ac_objext'
14742   { (eval echo "$as_me:14742: \"$ac_try\"") >&5
14743   (eval $ac_try) 2>&5
14744   ac_status=$?
14745   echo "$as_me:14745: \$? = $ac_status" >&5
14746   (exit $ac_status); }; }; then
14747   cf_cv_gcc_inline=yes
14748 else
14749   echo "$as_me: failed program was:" >&5
14750 cat conftest.$ac_ext >&5
14751 cf_cv_gcc_inline=no
14752 fi
14753 rm -f conftest.$ac_objext conftest.$ac_ext
14754       CFLAGS=$cf_save_CFLAGS
14755
14756 fi
14757 echo "$as_me:14757: result: $cf_cv_gcc_inline" >&5
14758 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14759     if test "$cf_cv_gcc_inline" = yes ; then
14760
14761 cf_fix_cppflags=no
14762 cf_new_cflags=
14763 cf_new_cppflags=
14764 cf_new_extra_cppflags=
14765
14766 for cf_add_cflags in --param max-inline-insns-single=1200
14767 do
14768 case $cf_fix_cppflags in
14769 no)
14770         case $cf_add_cflags in #(vi
14771         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14772                 case $cf_add_cflags in
14773                 -D*)
14774                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14775
14776                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14777                                 && test -z "${cf_tst_cflags}" \
14778                                 && cf_fix_cppflags=yes
14779
14780                         if test $cf_fix_cppflags = yes ; then
14781                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14782                                 continue
14783                         elif test "${cf_tst_cflags}" = "\"'" ; then
14784                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14785                                 continue
14786                         fi
14787                         ;;
14788                 esac
14789                 case "$CPPFLAGS" in
14790                 *$cf_add_cflags) #(vi
14791                         ;;
14792                 *) #(vi
14793                         case $cf_add_cflags in #(vi
14794                         -D*)
14795                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14796
14797 CPPFLAGS=`echo "$CPPFLAGS" | \
14798         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14799                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14800
14801                                 ;;
14802                         esac
14803                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14804                         ;;
14805                 esac
14806                 ;;
14807         *)
14808                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14809                 ;;
14810         esac
14811         ;;
14812 yes)
14813         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14814
14815         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14816
14817         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14818                 && test -z "${cf_tst_cflags}" \
14819                 && cf_fix_cppflags=no
14820         ;;
14821 esac
14822 done
14823
14824 if test -n "$cf_new_cflags" ; then
14825
14826         CFLAGS="$CFLAGS $cf_new_cflags"
14827 fi
14828
14829 if test -n "$cf_new_cppflags" ; then
14830
14831         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14832 fi
14833
14834 if test -n "$cf_new_extra_cppflags" ; then
14835
14836         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14837 fi
14838
14839     fi
14840   fi
14841 fi
14842
14843 echo "$as_me:14843: checking for signal global datatype" >&5
14844 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14845 if test "${cf_cv_sig_atomic_t+set}" = set; then
14846   echo $ECHO_N "(cached) $ECHO_C" >&6
14847 else
14848
14849         for cf_type in \
14850                 "volatile sig_atomic_t" \
14851                 "sig_atomic_t" \
14852                 "int"
14853         do
14854         cat >conftest.$ac_ext <<_ACEOF
14855 #line 14855 "configure"
14856 #include "confdefs.h"
14857
14858 #include <sys/types.h>
14859 #include <signal.h>
14860 #include <stdio.h>
14861
14862 extern $cf_type x;
14863 $cf_type x;
14864 static void handler(int sig)
14865 {
14866         x = 5;
14867 }
14868 int
14869 main ()
14870 {
14871 signal(SIGINT, handler);
14872                  x = 1
14873   ;
14874   return 0;
14875 }
14876 _ACEOF
14877 rm -f conftest.$ac_objext
14878 if { (eval echo "$as_me:14878: \"$ac_compile\"") >&5
14879   (eval $ac_compile) 2>&5
14880   ac_status=$?
14881   echo "$as_me:14881: \$? = $ac_status" >&5
14882   (exit $ac_status); } &&
14883          { ac_try='test -s conftest.$ac_objext'
14884   { (eval echo "$as_me:14884: \"$ac_try\"") >&5
14885   (eval $ac_try) 2>&5
14886   ac_status=$?
14887   echo "$as_me:14887: \$? = $ac_status" >&5
14888   (exit $ac_status); }; }; then
14889   cf_cv_sig_atomic_t=$cf_type
14890 else
14891   echo "$as_me: failed program was:" >&5
14892 cat conftest.$ac_ext >&5
14893 cf_cv_sig_atomic_t=no
14894 fi
14895 rm -f conftest.$ac_objext conftest.$ac_ext
14896                 test "$cf_cv_sig_atomic_t" != no && break
14897         done
14898
14899 fi
14900
14901 echo "$as_me:14901: result: $cf_cv_sig_atomic_t" >&5
14902 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14903 test "$cf_cv_sig_atomic_t" != no &&
14904 cat >>confdefs.h <<EOF
14905 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14906 EOF
14907
14908 if test $NCURSES_CHTYPE = auto ; then
14909
14910 echo "$as_me:14910: checking for type of chtype" >&5
14911 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14912 if test "${cf_cv_typeof_chtype+set}" = set; then
14913   echo $ECHO_N "(cached) $ECHO_C" >&6
14914 else
14915
14916                 if test "$cross_compiling" = yes; then
14917   cf_cv_typeof_chtype=long
14918 else
14919   cat >conftest.$ac_ext <<_ACEOF
14920 #line 14920 "configure"
14921 #include "confdefs.h"
14922
14923 #define WANT_BITS 31
14924 #include <stdio.h>
14925 int main()
14926 {
14927         FILE *fp = fopen("cf_test.out", "w");
14928         if (fp != 0) {
14929                 char *result = "long";
14930                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14931                         int n;
14932                         unsigned int x, y;
14933                         for (n = 0; n < WANT_BITS; n++) {
14934                                 x = (1 << n);
14935                                 y = (x >> n);
14936                                 if (y != 1 || x == 0) {
14937                                         x = 0;
14938                                         break;
14939                                 }
14940                         }
14941                         /*
14942                          * If x is nonzero, an int is big enough for the bits
14943                          * that we want.
14944                          */
14945                         result = (x != 0) ? "int" : "long";
14946                 }
14947                 fputs(result, fp);
14948                 fclose(fp);
14949         }
14950         ${cf_cv_main_return:-return}(0);
14951 }
14952
14953 _ACEOF
14954 rm -f conftest$ac_exeext
14955 if { (eval echo "$as_me:14955: \"$ac_link\"") >&5
14956   (eval $ac_link) 2>&5
14957   ac_status=$?
14958   echo "$as_me:14958: \$? = $ac_status" >&5
14959   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14960   { (eval echo "$as_me:14960: \"$ac_try\"") >&5
14961   (eval $ac_try) 2>&5
14962   ac_status=$?
14963   echo "$as_me:14963: \$? = $ac_status" >&5
14964   (exit $ac_status); }; }; then
14965   cf_cv_typeof_chtype=`cat cf_test.out`
14966 else
14967   echo "$as_me: program exited with status $ac_status" >&5
14968 echo "$as_me: failed program was:" >&5
14969 cat conftest.$ac_ext >&5
14970 cf_cv_typeof_chtype=long
14971 fi
14972 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14973 fi
14974                 rm -f cf_test.out
14975
14976 fi
14977
14978 echo "$as_me:14978: result: $cf_cv_typeof_chtype" >&5
14979 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14980
14981 cat >>confdefs.h <<EOF
14982 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14983 EOF
14984
14985 else
14986         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14987 fi
14988 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14989
14990 echo "$as_me:14990: checking if unsigned literals are legal" >&5
14991 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14992 if test "${cf_cv_unsigned_literals+set}" = set; then
14993   echo $ECHO_N "(cached) $ECHO_C" >&6
14994 else
14995
14996         cat >conftest.$ac_ext <<_ACEOF
14997 #line 14997 "configure"
14998 #include "confdefs.h"
14999
15000 int
15001 main ()
15002 {
15003 long x = 1L + 1UL + 1U + 1
15004   ;
15005   return 0;
15006 }
15007 _ACEOF
15008 rm -f conftest.$ac_objext
15009 if { (eval echo "$as_me:15009: \"$ac_compile\"") >&5
15010   (eval $ac_compile) 2>&5
15011   ac_status=$?
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); } &&
15014          { ac_try='test -s conftest.$ac_objext'
15015   { (eval echo "$as_me:15015: \"$ac_try\"") >&5
15016   (eval $ac_try) 2>&5
15017   ac_status=$?
15018   echo "$as_me:15018: \$? = $ac_status" >&5
15019   (exit $ac_status); }; }; then
15020   cf_cv_unsigned_literals=yes
15021 else
15022   echo "$as_me: failed program was:" >&5
15023 cat conftest.$ac_ext >&5
15024 cf_cv_unsigned_literals=no
15025 fi
15026 rm -f conftest.$ac_objext conftest.$ac_ext
15027
15028 fi
15029
15030 echo "$as_me:15030: result: $cf_cv_unsigned_literals" >&5
15031 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15032
15033 cf_cv_1UL="1"
15034 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15035 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15036
15037 if test $NCURSES_MMASK_T = auto ; then
15038         cf_cv_typeof_mmask_t=long
15039 else
15040         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15041 fi
15042 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15043
15044 ###     Checks for external-data
15045
15046 echo "$as_me:15046: checking if external errno is declared" >&5
15047 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15048 if test "${cf_cv_dcl_errno+set}" = set; then
15049   echo $ECHO_N "(cached) $ECHO_C" >&6
15050 else
15051
15052     cat >conftest.$ac_ext <<_ACEOF
15053 #line 15053 "configure"
15054 #include "confdefs.h"
15055
15056 #ifdef HAVE_STDLIB_H
15057 #include <stdlib.h>
15058 #endif
15059 #include <stdio.h>
15060 #include <sys/types.h>
15061 #include <errno.h>
15062 int
15063 main ()
15064 {
15065 int x = (int) errno
15066   ;
15067   return 0;
15068 }
15069 _ACEOF
15070 rm -f conftest.$ac_objext
15071 if { (eval echo "$as_me:15071: \"$ac_compile\"") >&5
15072   (eval $ac_compile) 2>&5
15073   ac_status=$?
15074   echo "$as_me:15074: \$? = $ac_status" >&5
15075   (exit $ac_status); } &&
15076          { ac_try='test -s conftest.$ac_objext'
15077   { (eval echo "$as_me:15077: \"$ac_try\"") >&5
15078   (eval $ac_try) 2>&5
15079   ac_status=$?
15080   echo "$as_me:15080: \$? = $ac_status" >&5
15081   (exit $ac_status); }; }; then
15082   cf_cv_dcl_errno=yes
15083 else
15084   echo "$as_me: failed program was:" >&5
15085 cat conftest.$ac_ext >&5
15086 cf_cv_dcl_errno=no
15087 fi
15088 rm -f conftest.$ac_objext conftest.$ac_ext
15089
15090 fi
15091 echo "$as_me:15091: result: $cf_cv_dcl_errno" >&5
15092 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15093
15094 if test "$cf_cv_dcl_errno" = no ; then
15095
15096 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15097
15098     cat >>confdefs.h <<EOF
15099 #define $cf_result 1
15100 EOF
15101
15102 fi
15103
15104 # It's possible (for near-UNIX clones) that the data doesn't exist
15105
15106 echo "$as_me:15106: checking if external errno exists" >&5
15107 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15108 if test "${cf_cv_have_errno+set}" = set; then
15109   echo $ECHO_N "(cached) $ECHO_C" >&6
15110 else
15111
15112     cat >conftest.$ac_ext <<_ACEOF
15113 #line 15113 "configure"
15114 #include "confdefs.h"
15115
15116 #undef errno
15117 extern int errno;
15118
15119 int
15120 main ()
15121 {
15122 errno = 2
15123   ;
15124   return 0;
15125 }
15126 _ACEOF
15127 rm -f conftest.$ac_objext conftest$ac_exeext
15128 if { (eval echo "$as_me:15128: \"$ac_link\"") >&5
15129   (eval $ac_link) 2>&5
15130   ac_status=$?
15131   echo "$as_me:15131: \$? = $ac_status" >&5
15132   (exit $ac_status); } &&
15133          { ac_try='test -s conftest$ac_exeext'
15134   { (eval echo "$as_me:15134: \"$ac_try\"") >&5
15135   (eval $ac_try) 2>&5
15136   ac_status=$?
15137   echo "$as_me:15137: \$? = $ac_status" >&5
15138   (exit $ac_status); }; }; then
15139   cf_cv_have_errno=yes
15140 else
15141   echo "$as_me: failed program was:" >&5
15142 cat conftest.$ac_ext >&5
15143 cf_cv_have_errno=no
15144 fi
15145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15146
15147 fi
15148 echo "$as_me:15148: result: $cf_cv_have_errno" >&5
15149 echo "${ECHO_T}$cf_cv_have_errno" >&6
15150
15151 if test "$cf_cv_have_errno" = yes ; then
15152
15153 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15154
15155     cat >>confdefs.h <<EOF
15156 #define $cf_result 1
15157 EOF
15158
15159 fi
15160
15161 echo "$as_me:15161: checking if data-only library module links" >&5
15162 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15163 if test "${cf_cv_link_dataonly+set}" = set; then
15164   echo $ECHO_N "(cached) $ECHO_C" >&6
15165 else
15166
15167         rm -f conftest.a
15168         cat >conftest.$ac_ext <<EOF
15169 #line 15169 "configure"
15170 int     testdata[3] = { 123, 456, 789 };
15171 EOF
15172         if { (eval echo "$as_me:15172: \"$ac_compile\"") >&5
15173   (eval $ac_compile) 2>&5
15174   ac_status=$?
15175   echo "$as_me:15175: \$? = $ac_status" >&5
15176   (exit $ac_status); } ; then
15177                 mv conftest.o data.o && \
15178                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15179         fi
15180         rm -f conftest.$ac_ext data.o
15181         cat >conftest.$ac_ext <<EOF
15182 #line 15182 "configure"
15183 int     testfunc()
15184 {
15185 #if defined(NeXT)
15186         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15187 #else
15188         extern int testdata[3];
15189         return testdata[0] == 123
15190            &&  testdata[1] == 456
15191            &&  testdata[2] == 789;
15192 #endif
15193 }
15194 EOF
15195         if { (eval echo "$as_me:15195: \"$ac_compile\"") >&5
15196   (eval $ac_compile) 2>&5
15197   ac_status=$?
15198   echo "$as_me:15198: \$? = $ac_status" >&5
15199   (exit $ac_status); }; then
15200                 mv conftest.o func.o && \
15201                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15202         fi
15203         rm -f conftest.$ac_ext func.o
15204         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15205         cf_saveLIBS="$LIBS"
15206         LIBS="conftest.a $LIBS"
15207         if test "$cross_compiling" = yes; then
15208   cf_cv_link_dataonly=unknown
15209 else
15210   cat >conftest.$ac_ext <<_ACEOF
15211 #line 15211 "configure"
15212 #include "confdefs.h"
15213
15214         int main()
15215         {
15216                 extern int testfunc();
15217                 ${cf_cv_main_return:-return} (!testfunc());
15218         }
15219
15220 _ACEOF
15221 rm -f conftest$ac_exeext
15222 if { (eval echo "$as_me:15222: \"$ac_link\"") >&5
15223   (eval $ac_link) 2>&5
15224   ac_status=$?
15225   echo "$as_me:15225: \$? = $ac_status" >&5
15226   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15227   { (eval echo "$as_me:15227: \"$ac_try\"") >&5
15228   (eval $ac_try) 2>&5
15229   ac_status=$?
15230   echo "$as_me:15230: \$? = $ac_status" >&5
15231   (exit $ac_status); }; }; then
15232   cf_cv_link_dataonly=yes
15233 else
15234   echo "$as_me: program exited with status $ac_status" >&5
15235 echo "$as_me: failed program was:" >&5
15236 cat conftest.$ac_ext >&5
15237 cf_cv_link_dataonly=no
15238 fi
15239 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15240 fi
15241         LIBS="$cf_saveLIBS"
15242
15243 fi
15244
15245 echo "$as_me:15245: result: $cf_cv_link_dataonly" >&5
15246 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15247
15248 if test "$cf_cv_link_dataonly" = no ; then
15249
15250 cat >>confdefs.h <<\EOF
15251 #define BROKEN_LINKER 1
15252 EOF
15253
15254         BROKEN_LINKER=1
15255 fi
15256
15257 ###     Checks for library functions.
15258
15259 for ac_func in \
15260 getcwd \
15261 getegid \
15262 geteuid \
15263 getttynam \
15264 issetugid \
15265 poll \
15266 putenv \
15267 remove \
15268 select \
15269 setbuf \
15270 setbuffer \
15271 setenv \
15272 setvbuf \
15273 sigaction \
15274 sigvec \
15275 strstr \
15276 tcgetpgrp \
15277 times \
15278 vsnprintf \
15279
15280 do
15281 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15282 echo "$as_me:15282: checking for $ac_func" >&5
15283 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15284 if eval "test \"\${$as_ac_var+set}\" = set"; then
15285   echo $ECHO_N "(cached) $ECHO_C" >&6
15286 else
15287   cat >conftest.$ac_ext <<_ACEOF
15288 #line 15288 "configure"
15289 #include "confdefs.h"
15290 /* System header to define __stub macros and hopefully few prototypes,
15291     which can conflict with char $ac_func (); below.  */
15292 #include <assert.h>
15293 /* Override any gcc2 internal prototype to avoid an error.  */
15294 #ifdef __cplusplus
15295 extern "C"
15296 #endif
15297 /* We use char because int might match the return type of a gcc2
15298    builtin and then its argument prototype would still apply.  */
15299 char $ac_func ();
15300 char (*f) ();
15301
15302 int
15303 main ()
15304 {
15305 /* The GNU C library defines this for functions which it implements
15306     to always fail with ENOSYS.  Some functions are actually named
15307     something starting with __ and the normal name is an alias.  */
15308 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15309 choke me
15310 #else
15311 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15312 #endif
15313
15314   ;
15315   return 0;
15316 }
15317 _ACEOF
15318 rm -f conftest.$ac_objext conftest$ac_exeext
15319 if { (eval echo "$as_me:15319: \"$ac_link\"") >&5
15320   (eval $ac_link) 2>&5
15321   ac_status=$?
15322   echo "$as_me:15322: \$? = $ac_status" >&5
15323   (exit $ac_status); } &&
15324          { ac_try='test -s conftest$ac_exeext'
15325   { (eval echo "$as_me:15325: \"$ac_try\"") >&5
15326   (eval $ac_try) 2>&5
15327   ac_status=$?
15328   echo "$as_me:15328: \$? = $ac_status" >&5
15329   (exit $ac_status); }; }; then
15330   eval "$as_ac_var=yes"
15331 else
15332   echo "$as_me: failed program was:" >&5
15333 cat conftest.$ac_ext >&5
15334 eval "$as_ac_var=no"
15335 fi
15336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15337 fi
15338 echo "$as_me:15338: result: `eval echo '${'$as_ac_var'}'`" >&5
15339 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15340 if test `eval echo '${'$as_ac_var'}'` = yes; then
15341   cat >>confdefs.h <<EOF
15342 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15343 EOF
15344
15345 fi
15346 done
15347
15348 if test "x$with_getcap" = "xyes" ; then
15349
15350 echo "$as_me:15350: checking for terminal-capability database functions" >&5
15351 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15352 if test "${cf_cv_cgetent+set}" = set; then
15353   echo $ECHO_N "(cached) $ECHO_C" >&6
15354 else
15355
15356 cat >conftest.$ac_ext <<_ACEOF
15357 #line 15357 "configure"
15358 #include "confdefs.h"
15359
15360 #include <stdlib.h>
15361 int
15362 main ()
15363 {
15364
15365         char temp[128];
15366         char *buf = temp;
15367         char *db_array = temp;
15368         cgetent(&buf, &db_array, "vt100");
15369         cgetcap(buf, "tc", '=');
15370         cgetmatch(buf, "tc");
15371
15372   ;
15373   return 0;
15374 }
15375 _ACEOF
15376 rm -f conftest.$ac_objext conftest$ac_exeext
15377 if { (eval echo "$as_me:15377: \"$ac_link\"") >&5
15378   (eval $ac_link) 2>&5
15379   ac_status=$?
15380   echo "$as_me:15380: \$? = $ac_status" >&5
15381   (exit $ac_status); } &&
15382          { ac_try='test -s conftest$ac_exeext'
15383   { (eval echo "$as_me:15383: \"$ac_try\"") >&5
15384   (eval $ac_try) 2>&5
15385   ac_status=$?
15386   echo "$as_me:15386: \$? = $ac_status" >&5
15387   (exit $ac_status); }; }; then
15388   cf_cv_cgetent=yes
15389 else
15390   echo "$as_me: failed program was:" >&5
15391 cat conftest.$ac_ext >&5
15392 cf_cv_cgetent=no
15393 fi
15394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15395
15396 fi
15397 echo "$as_me:15397: result: $cf_cv_cgetent" >&5
15398 echo "${ECHO_T}$cf_cv_cgetent" >&6
15399
15400 if test "$cf_cv_cgetent" = yes
15401 then
15402
15403 cat >>confdefs.h <<\EOF
15404 #define HAVE_BSD_CGETENT 1
15405 EOF
15406
15407 echo "$as_me:15407: checking if cgetent uses const parameter" >&5
15408 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15409 if test "${cf_cv_cgetent_const+set}" = set; then
15410   echo $ECHO_N "(cached) $ECHO_C" >&6
15411 else
15412
15413 cat >conftest.$ac_ext <<_ACEOF
15414 #line 15414 "configure"
15415 #include "confdefs.h"
15416
15417 #include <stdlib.h>
15418 int
15419 main ()
15420 {
15421
15422         char temp[128];
15423         char *buf = temp;
15424 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15425         const char *db_array = temp;
15426         cgetent(&buf, &db_array, "vt100");
15427 #endif
15428         cgetcap(buf, "tc", '=');
15429         cgetmatch(buf, "tc");
15430
15431   ;
15432   return 0;
15433 }
15434 _ACEOF
15435 rm -f conftest.$ac_objext conftest$ac_exeext
15436 if { (eval echo "$as_me:15436: \"$ac_link\"") >&5
15437   (eval $ac_link) 2>&5
15438   ac_status=$?
15439   echo "$as_me:15439: \$? = $ac_status" >&5
15440   (exit $ac_status); } &&
15441          { ac_try='test -s conftest$ac_exeext'
15442   { (eval echo "$as_me:15442: \"$ac_try\"") >&5
15443   (eval $ac_try) 2>&5
15444   ac_status=$?
15445   echo "$as_me:15445: \$? = $ac_status" >&5
15446   (exit $ac_status); }; }; then
15447   cf_cv_cgetent_const=yes
15448 else
15449   echo "$as_me: failed program was:" >&5
15450 cat conftest.$ac_ext >&5
15451 cf_cv_cgetent_const=no
15452 fi
15453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15454
15455 fi
15456 echo "$as_me:15456: result: $cf_cv_cgetent_const" >&5
15457 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15458         if test "$cf_cv_cgetent_const" = yes
15459         then
15460
15461 cat >>confdefs.h <<EOF
15462 #define CGETENT_CONST const
15463 EOF
15464
15465         fi
15466 fi
15467
15468 fi
15469
15470 echo "$as_me:15470: checking for isascii" >&5
15471 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15472 if test "${cf_cv_have_isascii+set}" = set; then
15473   echo $ECHO_N "(cached) $ECHO_C" >&6
15474 else
15475
15476         cat >conftest.$ac_ext <<_ACEOF
15477 #line 15477 "configure"
15478 #include "confdefs.h"
15479 #include <ctype.h>
15480 int
15481 main ()
15482 {
15483 int x = isascii(' ')
15484   ;
15485   return 0;
15486 }
15487 _ACEOF
15488 rm -f conftest.$ac_objext conftest$ac_exeext
15489 if { (eval echo "$as_me:15489: \"$ac_link\"") >&5
15490   (eval $ac_link) 2>&5
15491   ac_status=$?
15492   echo "$as_me:15492: \$? = $ac_status" >&5
15493   (exit $ac_status); } &&
15494          { ac_try='test -s conftest$ac_exeext'
15495   { (eval echo "$as_me:15495: \"$ac_try\"") >&5
15496   (eval $ac_try) 2>&5
15497   ac_status=$?
15498   echo "$as_me:15498: \$? = $ac_status" >&5
15499   (exit $ac_status); }; }; then
15500   cf_cv_have_isascii=yes
15501 else
15502   echo "$as_me: failed program was:" >&5
15503 cat conftest.$ac_ext >&5
15504 cf_cv_have_isascii=no
15505 fi
15506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15507
15508 fi
15509 echo "$as_me:15509: result: $cf_cv_have_isascii" >&5
15510 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15511 test "$cf_cv_have_isascii" = yes &&
15512 cat >>confdefs.h <<\EOF
15513 #define HAVE_ISASCII 1
15514 EOF
15515
15516 if test "$ac_cv_func_sigaction" = yes; then
15517 echo "$as_me:15517: checking whether sigaction needs _POSIX_SOURCE" >&5
15518 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15519 cat >conftest.$ac_ext <<_ACEOF
15520 #line 15520 "configure"
15521 #include "confdefs.h"
15522
15523 #include <sys/types.h>
15524 #include <signal.h>
15525 int
15526 main ()
15527 {
15528 struct sigaction act
15529   ;
15530   return 0;
15531 }
15532 _ACEOF
15533 rm -f conftest.$ac_objext
15534 if { (eval echo "$as_me:15534: \"$ac_compile\"") >&5
15535   (eval $ac_compile) 2>&5
15536   ac_status=$?
15537   echo "$as_me:15537: \$? = $ac_status" >&5
15538   (exit $ac_status); } &&
15539          { ac_try='test -s conftest.$ac_objext'
15540   { (eval echo "$as_me:15540: \"$ac_try\"") >&5
15541   (eval $ac_try) 2>&5
15542   ac_status=$?
15543   echo "$as_me:15543: \$? = $ac_status" >&5
15544   (exit $ac_status); }; }; then
15545   sigact_bad=no
15546 else
15547   echo "$as_me: failed program was:" >&5
15548 cat conftest.$ac_ext >&5
15549
15550 cat >conftest.$ac_ext <<_ACEOF
15551 #line 15551 "configure"
15552 #include "confdefs.h"
15553
15554 #define _POSIX_SOURCE
15555 #include <sys/types.h>
15556 #include <signal.h>
15557 int
15558 main ()
15559 {
15560 struct sigaction act
15561   ;
15562   return 0;
15563 }
15564 _ACEOF
15565 rm -f conftest.$ac_objext
15566 if { (eval echo "$as_me:15566: \"$ac_compile\"") >&5
15567   (eval $ac_compile) 2>&5
15568   ac_status=$?
15569   echo "$as_me:15569: \$? = $ac_status" >&5
15570   (exit $ac_status); } &&
15571          { ac_try='test -s conftest.$ac_objext'
15572   { (eval echo "$as_me:15572: \"$ac_try\"") >&5
15573   (eval $ac_try) 2>&5
15574   ac_status=$?
15575   echo "$as_me:15575: \$? = $ac_status" >&5
15576   (exit $ac_status); }; }; then
15577   sigact_bad=yes
15578
15579 cat >>confdefs.h <<\EOF
15580 #define _POSIX_SOURCE 1
15581 EOF
15582
15583 else
15584   echo "$as_me: failed program was:" >&5
15585 cat conftest.$ac_ext >&5
15586 sigact_bad=unknown
15587 fi
15588 rm -f conftest.$ac_objext conftest.$ac_ext
15589 fi
15590 rm -f conftest.$ac_objext conftest.$ac_ext
15591 echo "$as_me:15591: result: $sigact_bad" >&5
15592 echo "${ECHO_T}$sigact_bad" >&6
15593 fi
15594
15595 echo "$as_me:15595: checking if nanosleep really works" >&5
15596 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15597 if test "${cf_cv_func_nanosleep+set}" = set; then
15598   echo $ECHO_N "(cached) $ECHO_C" >&6
15599 else
15600
15601 if test "$cross_compiling" = yes; then
15602   cf_cv_func_nanosleep=unknown
15603 else
15604   cat >conftest.$ac_ext <<_ACEOF
15605 #line 15605 "configure"
15606 #include "confdefs.h"
15607
15608 #include <stdio.h>
15609 #include <errno.h>
15610 #include <time.h>
15611
15612 #ifdef HAVE_SYS_TIME_H
15613 #include <sys/time.h>
15614 #endif
15615
15616 int main() {
15617         struct timespec ts1, ts2;
15618         int code;
15619         ts1.tv_sec  = 0;
15620         ts1.tv_nsec = 750000000;
15621         ts2.tv_sec  = 0;
15622         ts2.tv_nsec = 0;
15623         errno = 0;
15624         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15625         ${cf_cv_main_return:-return}(code != 0);
15626 }
15627
15628 _ACEOF
15629 rm -f conftest$ac_exeext
15630 if { (eval echo "$as_me:15630: \"$ac_link\"") >&5
15631   (eval $ac_link) 2>&5
15632   ac_status=$?
15633   echo "$as_me:15633: \$? = $ac_status" >&5
15634   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15635   { (eval echo "$as_me:15635: \"$ac_try\"") >&5
15636   (eval $ac_try) 2>&5
15637   ac_status=$?
15638   echo "$as_me:15638: \$? = $ac_status" >&5
15639   (exit $ac_status); }; }; then
15640   cf_cv_func_nanosleep=yes
15641 else
15642   echo "$as_me: program exited with status $ac_status" >&5
15643 echo "$as_me: failed program was:" >&5
15644 cat conftest.$ac_ext >&5
15645 cf_cv_func_nanosleep=no
15646 fi
15647 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15648 fi
15649 fi
15650 echo "$as_me:15650: result: $cf_cv_func_nanosleep" >&5
15651 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15652
15653 test "$cf_cv_func_nanosleep" = "yes" &&
15654 cat >>confdefs.h <<\EOF
15655 #define HAVE_NANOSLEEP 1
15656 EOF
15657
15658 for ac_header in \
15659 termio.h \
15660 termios.h \
15661 unistd.h \
15662
15663 do
15664 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15665 echo "$as_me:15665: checking for $ac_header" >&5
15666 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15667 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15668   echo $ECHO_N "(cached) $ECHO_C" >&6
15669 else
15670   cat >conftest.$ac_ext <<_ACEOF
15671 #line 15671 "configure"
15672 #include "confdefs.h"
15673 #include <$ac_header>
15674 _ACEOF
15675 if { (eval echo "$as_me:15675: \"$ac_cpp conftest.$ac_ext\"") >&5
15676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15677   ac_status=$?
15678   egrep -v '^ *\+' conftest.er1 >conftest.err
15679   rm -f conftest.er1
15680   cat conftest.err >&5
15681   echo "$as_me:15681: \$? = $ac_status" >&5
15682   (exit $ac_status); } >/dev/null; then
15683   if test -s conftest.err; then
15684     ac_cpp_err=$ac_c_preproc_warn_flag
15685   else
15686     ac_cpp_err=
15687   fi
15688 else
15689   ac_cpp_err=yes
15690 fi
15691 if test -z "$ac_cpp_err"; then
15692   eval "$as_ac_Header=yes"
15693 else
15694   echo "$as_me: failed program was:" >&5
15695   cat conftest.$ac_ext >&5
15696   eval "$as_ac_Header=no"
15697 fi
15698 rm -f conftest.err conftest.$ac_ext
15699 fi
15700 echo "$as_me:15700: result: `eval echo '${'$as_ac_Header'}'`" >&5
15701 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15702 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15703   cat >>confdefs.h <<EOF
15704 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15705 EOF
15706
15707 fi
15708 done
15709
15710 if test "$ISC" = yes ; then
15711
15712 for ac_header in sys/termio.h
15713 do
15714 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15715 echo "$as_me:15715: checking for $ac_header" >&5
15716 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15717 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15718   echo $ECHO_N "(cached) $ECHO_C" >&6
15719 else
15720   cat >conftest.$ac_ext <<_ACEOF
15721 #line 15721 "configure"
15722 #include "confdefs.h"
15723 #include <$ac_header>
15724 _ACEOF
15725 if { (eval echo "$as_me:15725: \"$ac_cpp conftest.$ac_ext\"") >&5
15726   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15727   ac_status=$?
15728   egrep -v '^ *\+' conftest.er1 >conftest.err
15729   rm -f conftest.er1
15730   cat conftest.err >&5
15731   echo "$as_me:15731: \$? = $ac_status" >&5
15732   (exit $ac_status); } >/dev/null; then
15733   if test -s conftest.err; then
15734     ac_cpp_err=$ac_c_preproc_warn_flag
15735   else
15736     ac_cpp_err=
15737   fi
15738 else
15739   ac_cpp_err=yes
15740 fi
15741 if test -z "$ac_cpp_err"; then
15742   eval "$as_ac_Header=yes"
15743 else
15744   echo "$as_me: failed program was:" >&5
15745   cat conftest.$ac_ext >&5
15746   eval "$as_ac_Header=no"
15747 fi
15748 rm -f conftest.err conftest.$ac_ext
15749 fi
15750 echo "$as_me:15750: result: `eval echo '${'$as_ac_Header'}'`" >&5
15751 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15752 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15753   cat >>confdefs.h <<EOF
15754 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15755 EOF
15756
15757 fi
15758 done
15759
15760 fi
15761 if test "$ac_cv_header_termios_h" = yes ; then
15762         case "$CFLAGS $CPPFLAGS" in
15763         *-D_POSIX_SOURCE*)
15764                 termios_bad=dunno ;;
15765         *)      termios_bad=maybe ;;
15766         esac
15767         if test "$termios_bad" = maybe ; then
15768         echo "$as_me:15768: checking whether termios.h needs _POSIX_SOURCE" >&5
15769 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15770         cat >conftest.$ac_ext <<_ACEOF
15771 #line 15771 "configure"
15772 #include "confdefs.h"
15773 #include <termios.h>
15774 int
15775 main ()
15776 {
15777 struct termios foo; int x = foo.c_iflag
15778   ;
15779   return 0;
15780 }
15781 _ACEOF
15782 rm -f conftest.$ac_objext
15783 if { (eval echo "$as_me:15783: \"$ac_compile\"") >&5
15784   (eval $ac_compile) 2>&5
15785   ac_status=$?
15786   echo "$as_me:15786: \$? = $ac_status" >&5
15787   (exit $ac_status); } &&
15788          { ac_try='test -s conftest.$ac_objext'
15789   { (eval echo "$as_me:15789: \"$ac_try\"") >&5
15790   (eval $ac_try) 2>&5
15791   ac_status=$?
15792   echo "$as_me:15792: \$? = $ac_status" >&5
15793   (exit $ac_status); }; }; then
15794   termios_bad=no
15795 else
15796   echo "$as_me: failed program was:" >&5
15797 cat conftest.$ac_ext >&5
15798
15799                 cat >conftest.$ac_ext <<_ACEOF
15800 #line 15800 "configure"
15801 #include "confdefs.h"
15802
15803 #define _POSIX_SOURCE
15804 #include <termios.h>
15805 int
15806 main ()
15807 {
15808 struct termios foo; int x = foo.c_iflag
15809   ;
15810   return 0;
15811 }
15812 _ACEOF
15813 rm -f conftest.$ac_objext
15814 if { (eval echo "$as_me:15814: \"$ac_compile\"") >&5
15815   (eval $ac_compile) 2>&5
15816   ac_status=$?
15817   echo "$as_me:15817: \$? = $ac_status" >&5
15818   (exit $ac_status); } &&
15819          { ac_try='test -s conftest.$ac_objext'
15820   { (eval echo "$as_me:15820: \"$ac_try\"") >&5
15821   (eval $ac_try) 2>&5
15822   ac_status=$?
15823   echo "$as_me:15823: \$? = $ac_status" >&5
15824   (exit $ac_status); }; }; then
15825   termios_bad=unknown
15826 else
15827   echo "$as_me: failed program was:" >&5
15828 cat conftest.$ac_ext >&5
15829 termios_bad=yes
15830 cat >>confdefs.h <<\EOF
15831 #define _POSIX_SOURCE 1
15832 EOF
15833
15834 fi
15835 rm -f conftest.$ac_objext conftest.$ac_ext
15836
15837 fi
15838 rm -f conftest.$ac_objext conftest.$ac_ext
15839         echo "$as_me:15839: result: $termios_bad" >&5
15840 echo "${ECHO_T}$termios_bad" >&6
15841         fi
15842 fi
15843
15844 echo "$as_me:15844: checking for tcgetattr" >&5
15845 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15846 if test "${cf_cv_have_tcgetattr+set}" = set; then
15847   echo $ECHO_N "(cached) $ECHO_C" >&6
15848 else
15849
15850 cat >conftest.$ac_ext <<_ACEOF
15851 #line 15851 "configure"
15852 #include "confdefs.h"
15853
15854 #include <sys/types.h>
15855 #ifdef HAVE_UNISTD_H
15856 #include <unistd.h>
15857 #endif
15858 #ifdef HAVE_TERMIOS_H
15859 #include <termios.h>
15860 #define TTY struct termios
15861 #else
15862 #ifdef HAVE_TERMIO_H
15863 #include <termio.h>
15864 #define TTY struct termio
15865 #endif
15866 #endif
15867
15868 int
15869 main ()
15870 {
15871
15872 TTY foo;
15873 tcgetattr(1, &foo);
15874   ;
15875   return 0;
15876 }
15877 _ACEOF
15878 rm -f conftest.$ac_objext conftest$ac_exeext
15879 if { (eval echo "$as_me:15879: \"$ac_link\"") >&5
15880   (eval $ac_link) 2>&5
15881   ac_status=$?
15882   echo "$as_me:15882: \$? = $ac_status" >&5
15883   (exit $ac_status); } &&
15884          { ac_try='test -s conftest$ac_exeext'
15885   { (eval echo "$as_me:15885: \"$ac_try\"") >&5
15886   (eval $ac_try) 2>&5
15887   ac_status=$?
15888   echo "$as_me:15888: \$? = $ac_status" >&5
15889   (exit $ac_status); }; }; then
15890   cf_cv_have_tcgetattr=yes
15891 else
15892   echo "$as_me: failed program was:" >&5
15893 cat conftest.$ac_ext >&5
15894 cf_cv_have_tcgetattr=no
15895 fi
15896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15897 fi
15898 echo "$as_me:15898: result: $cf_cv_have_tcgetattr" >&5
15899 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15900 test "$cf_cv_have_tcgetattr" = yes &&
15901 cat >>confdefs.h <<\EOF
15902 #define HAVE_TCGETATTR 1
15903 EOF
15904
15905 echo "$as_me:15905: checking for vsscanf function or workaround" >&5
15906 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15907 if test "${cf_cv_func_vsscanf+set}" = set; then
15908   echo $ECHO_N "(cached) $ECHO_C" >&6
15909 else
15910
15911 cat >conftest.$ac_ext <<_ACEOF
15912 #line 15912 "configure"
15913 #include "confdefs.h"
15914
15915 #include <stdarg.h>
15916 #include <stdio.h>
15917 int
15918 main ()
15919 {
15920
15921         va_list ap;
15922         vsscanf("from", "%d", ap)
15923   ;
15924   return 0;
15925 }
15926 _ACEOF
15927 rm -f conftest.$ac_objext conftest$ac_exeext
15928 if { (eval echo "$as_me:15928: \"$ac_link\"") >&5
15929   (eval $ac_link) 2>&5
15930   ac_status=$?
15931   echo "$as_me:15931: \$? = $ac_status" >&5
15932   (exit $ac_status); } &&
15933          { ac_try='test -s conftest$ac_exeext'
15934   { (eval echo "$as_me:15934: \"$ac_try\"") >&5
15935   (eval $ac_try) 2>&5
15936   ac_status=$?
15937   echo "$as_me:15937: \$? = $ac_status" >&5
15938   (exit $ac_status); }; }; then
15939   cf_cv_func_vsscanf=vsscanf
15940 else
15941   echo "$as_me: failed program was:" >&5
15942 cat conftest.$ac_ext >&5
15943
15944 cat >conftest.$ac_ext <<_ACEOF
15945 #line 15945 "configure"
15946 #include "confdefs.h"
15947
15948 #include <stdarg.h>
15949 #include <stdio.h>
15950 int
15951 main ()
15952 {
15953
15954     FILE strbuf;
15955     char *str = "from";
15956
15957     strbuf._flag = _IOREAD;
15958     strbuf._ptr = strbuf._base = (unsigned char *) str;
15959     strbuf._cnt = strlen(str);
15960     strbuf._file = _NFILE;
15961     return (vfscanf(&strbuf, "%d", ap))
15962   ;
15963   return 0;
15964 }
15965 _ACEOF
15966 rm -f conftest.$ac_objext conftest$ac_exeext
15967 if { (eval echo "$as_me:15967: \"$ac_link\"") >&5
15968   (eval $ac_link) 2>&5
15969   ac_status=$?
15970   echo "$as_me:15970: \$? = $ac_status" >&5
15971   (exit $ac_status); } &&
15972          { ac_try='test -s conftest$ac_exeext'
15973   { (eval echo "$as_me:15973: \"$ac_try\"") >&5
15974   (eval $ac_try) 2>&5
15975   ac_status=$?
15976   echo "$as_me:15976: \$? = $ac_status" >&5
15977   (exit $ac_status); }; }; then
15978   cf_cv_func_vsscanf=vfscanf
15979 else
15980   echo "$as_me: failed program was:" >&5
15981 cat conftest.$ac_ext >&5
15982
15983 cat >conftest.$ac_ext <<_ACEOF
15984 #line 15984 "configure"
15985 #include "confdefs.h"
15986
15987 #include <stdarg.h>
15988 #include <stdio.h>
15989 int
15990 main ()
15991 {
15992
15993     FILE strbuf;
15994     char *str = "from";
15995
15996     strbuf._flag = _IOREAD;
15997     strbuf._ptr = strbuf._base = (unsigned char *) str;
15998     strbuf._cnt = strlen(str);
15999     strbuf._file = _NFILE;
16000     return (_doscan(&strbuf, "%d", ap))
16001   ;
16002   return 0;
16003 }
16004 _ACEOF
16005 rm -f conftest.$ac_objext conftest$ac_exeext
16006 if { (eval echo "$as_me:16006: \"$ac_link\"") >&5
16007   (eval $ac_link) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit $ac_status); } &&
16011          { ac_try='test -s conftest$ac_exeext'
16012   { (eval echo "$as_me:16012: \"$ac_try\"") >&5
16013   (eval $ac_try) 2>&5
16014   ac_status=$?
16015   echo "$as_me:16015: \$? = $ac_status" >&5
16016   (exit $ac_status); }; }; then
16017   cf_cv_func_vsscanf=_doscan
16018 else
16019   echo "$as_me: failed program was:" >&5
16020 cat conftest.$ac_ext >&5
16021
16022 cf_cv_func_vsscanf=no
16023 fi
16024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16025 fi
16026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16027 fi
16028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16029 fi
16030 echo "$as_me:16030: result: $cf_cv_func_vsscanf" >&5
16031 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16032
16033 case $cf_cv_func_vsscanf in #(vi
16034 vsscanf)
16035 cat >>confdefs.h <<\EOF
16036 #define HAVE_VSSCANF 1
16037 EOF
16038 ;; #(vi
16039 vfscanf)
16040 cat >>confdefs.h <<\EOF
16041 #define HAVE_VFSCANF 1
16042 EOF
16043 ;; #(vi
16044 _doscan)
16045 cat >>confdefs.h <<\EOF
16046 #define HAVE__DOSCAN 1
16047 EOF
16048 ;;
16049 esac
16050
16051 echo "$as_me:16051: checking for working mkstemp" >&5
16052 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16053 if test "${cf_cv_func_mkstemp+set}" = set; then
16054   echo $ECHO_N "(cached) $ECHO_C" >&6
16055 else
16056
16057 rm -rf conftest*
16058 if test "$cross_compiling" = yes; then
16059   cf_cv_func_mkstemp=maybe
16060 else
16061   cat >conftest.$ac_ext <<_ACEOF
16062 #line 16062 "configure"
16063 #include "confdefs.h"
16064
16065 #include <sys/types.h>
16066 #include <stdlib.h>
16067 #include <stdio.h>
16068 #include <string.h>
16069 #include <sys/stat.h>
16070 int main()
16071 {
16072         char *tmpl = "conftestXXXXXX";
16073         char name[2][80];
16074         int n;
16075         int result = 0;
16076         int fd;
16077         struct stat sb;
16078
16079         umask(077);
16080         for (n = 0; n < 2; ++n) {
16081                 strcpy(name[n], tmpl);
16082                 if ((fd = mkstemp(name[n])) >= 0) {
16083                         if (!strcmp(name[n], tmpl)
16084                          || stat(name[n], &sb) != 0
16085                          || (sb.st_mode & S_IFMT) != S_IFREG
16086                          || (sb.st_mode & 077) != 0) {
16087                                 result = 1;
16088                         }
16089                         close(fd);
16090                 }
16091         }
16092         if (result == 0
16093          && !strcmp(name[0], name[1]))
16094                 result = 1;
16095         ${cf_cv_main_return:-return}(result);
16096 }
16097
16098 _ACEOF
16099 rm -f conftest$ac_exeext
16100 if { (eval echo "$as_me:16100: \"$ac_link\"") >&5
16101   (eval $ac_link) 2>&5
16102   ac_status=$?
16103   echo "$as_me:16103: \$? = $ac_status" >&5
16104   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16105   { (eval echo "$as_me:16105: \"$ac_try\"") >&5
16106   (eval $ac_try) 2>&5
16107   ac_status=$?
16108   echo "$as_me:16108: \$? = $ac_status" >&5
16109   (exit $ac_status); }; }; then
16110   cf_cv_func_mkstemp=yes
16111
16112 else
16113   echo "$as_me: program exited with status $ac_status" >&5
16114 echo "$as_me: failed program was:" >&5
16115 cat conftest.$ac_ext >&5
16116 cf_cv_func_mkstemp=no
16117
16118 fi
16119 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16120 fi
16121
16122 fi
16123 echo "$as_me:16123: result: $cf_cv_func_mkstemp" >&5
16124 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16125 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16126         echo "$as_me:16126: checking for mkstemp" >&5
16127 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16128 if test "${ac_cv_func_mkstemp+set}" = set; then
16129   echo $ECHO_N "(cached) $ECHO_C" >&6
16130 else
16131   cat >conftest.$ac_ext <<_ACEOF
16132 #line 16132 "configure"
16133 #include "confdefs.h"
16134 /* System header to define __stub macros and hopefully few prototypes,
16135     which can conflict with char mkstemp (); below.  */
16136 #include <assert.h>
16137 /* Override any gcc2 internal prototype to avoid an error.  */
16138 #ifdef __cplusplus
16139 extern "C"
16140 #endif
16141 /* We use char because int might match the return type of a gcc2
16142    builtin and then its argument prototype would still apply.  */
16143 char mkstemp ();
16144 char (*f) ();
16145
16146 int
16147 main ()
16148 {
16149 /* The GNU C library defines this for functions which it implements
16150     to always fail with ENOSYS.  Some functions are actually named
16151     something starting with __ and the normal name is an alias.  */
16152 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16153 choke me
16154 #else
16155 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16156 #endif
16157
16158   ;
16159   return 0;
16160 }
16161 _ACEOF
16162 rm -f conftest.$ac_objext conftest$ac_exeext
16163 if { (eval echo "$as_me:16163: \"$ac_link\"") >&5
16164   (eval $ac_link) 2>&5
16165   ac_status=$?
16166   echo "$as_me:16166: \$? = $ac_status" >&5
16167   (exit $ac_status); } &&
16168          { ac_try='test -s conftest$ac_exeext'
16169   { (eval echo "$as_me:16169: \"$ac_try\"") >&5
16170   (eval $ac_try) 2>&5
16171   ac_status=$?
16172   echo "$as_me:16172: \$? = $ac_status" >&5
16173   (exit $ac_status); }; }; then
16174   ac_cv_func_mkstemp=yes
16175 else
16176   echo "$as_me: failed program was:" >&5
16177 cat conftest.$ac_ext >&5
16178 ac_cv_func_mkstemp=no
16179 fi
16180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16181 fi
16182 echo "$as_me:16182: result: $ac_cv_func_mkstemp" >&5
16183 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16184
16185 fi
16186 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16187
16188 cat >>confdefs.h <<\EOF
16189 #define HAVE_MKSTEMP 1
16190 EOF
16191
16192 fi
16193
16194 # setup for prototype of fallback for vsscanf()
16195
16196 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16197         HAVE_VSSCANF=1
16198 else
16199         HAVE_VSSCANF=0
16200 fi
16201
16202 if test "x$cross_compiling" = xyes ; then
16203         { echo "$as_me:16203: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16204 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16205 else
16206         echo "$as_me:16206: checking whether setvbuf arguments are reversed" >&5
16207 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16208 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16209   echo $ECHO_N "(cached) $ECHO_C" >&6
16210 else
16211   if test "$cross_compiling" = yes; then
16212   { { echo "$as_me:16212: error: cannot run test program while cross compiling" >&5
16213 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16214    { (exit 1); exit 1; }; }
16215 else
16216   cat >conftest.$ac_ext <<_ACEOF
16217 #line 16217 "configure"
16218 #include "confdefs.h"
16219 #include <stdio.h>
16220 /* If setvbuf has the reversed format, exit 0. */
16221 int
16222 main ()
16223 {
16224   /* This call has the arguments reversed.
16225      A reversed system may check and see that the address of main
16226      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16227   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16228     $ac_main_return(1);
16229   putc('\r', stdout);
16230   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16231 }
16232 _ACEOF
16233 rm -f conftest$ac_exeext
16234 if { (eval echo "$as_me:16234: \"$ac_link\"") >&5
16235   (eval $ac_link) 2>&5
16236   ac_status=$?
16237   echo "$as_me:16237: \$? = $ac_status" >&5
16238   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16239   { (eval echo "$as_me:16239: \"$ac_try\"") >&5
16240   (eval $ac_try) 2>&5
16241   ac_status=$?
16242   echo "$as_me:16242: \$? = $ac_status" >&5
16243   (exit $ac_status); }; }; then
16244   ac_cv_func_setvbuf_reversed=yes
16245 else
16246   echo "$as_me: program exited with status $ac_status" >&5
16247 echo "$as_me: failed program was:" >&5
16248 cat conftest.$ac_ext >&5
16249 ac_cv_func_setvbuf_reversed=no
16250 fi
16251 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16252 fi
16253 rm -f core core.* *.core
16254 fi
16255 echo "$as_me:16255: result: $ac_cv_func_setvbuf_reversed" >&5
16256 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16257 if test $ac_cv_func_setvbuf_reversed = yes; then
16258
16259 cat >>confdefs.h <<\EOF
16260 #define SETVBUF_REVERSED 1
16261 EOF
16262
16263 fi
16264
16265 fi
16266 echo "$as_me:16266: checking return type of signal handlers" >&5
16267 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16268 if test "${ac_cv_type_signal+set}" = set; then
16269   echo $ECHO_N "(cached) $ECHO_C" >&6
16270 else
16271   cat >conftest.$ac_ext <<_ACEOF
16272 #line 16272 "configure"
16273 #include "confdefs.h"
16274 #include <sys/types.h>
16275 #include <signal.h>
16276 #ifdef signal
16277 # undef signal
16278 #endif
16279 #ifdef __cplusplus
16280 extern "C" void (*signal (int, void (*)(int)))(int);
16281 #else
16282 void (*signal ()) ();
16283 #endif
16284
16285 int
16286 main ()
16287 {
16288 int i;
16289   ;
16290   return 0;
16291 }
16292 _ACEOF
16293 rm -f conftest.$ac_objext
16294 if { (eval echo "$as_me:16294: \"$ac_compile\"") >&5
16295   (eval $ac_compile) 2>&5
16296   ac_status=$?
16297   echo "$as_me:16297: \$? = $ac_status" >&5
16298   (exit $ac_status); } &&
16299          { ac_try='test -s conftest.$ac_objext'
16300   { (eval echo "$as_me:16300: \"$ac_try\"") >&5
16301   (eval $ac_try) 2>&5
16302   ac_status=$?
16303   echo "$as_me:16303: \$? = $ac_status" >&5
16304   (exit $ac_status); }; }; then
16305   ac_cv_type_signal=void
16306 else
16307   echo "$as_me: failed program was:" >&5
16308 cat conftest.$ac_ext >&5
16309 ac_cv_type_signal=int
16310 fi
16311 rm -f conftest.$ac_objext conftest.$ac_ext
16312 fi
16313 echo "$as_me:16313: result: $ac_cv_type_signal" >&5
16314 echo "${ECHO_T}$ac_cv_type_signal" >&6
16315
16316 cat >>confdefs.h <<EOF
16317 #define RETSIGTYPE $ac_cv_type_signal
16318 EOF
16319
16320 echo "$as_me:16320: checking for intptr_t" >&5
16321 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16322 if test "${ac_cv_type_intptr_t+set}" = set; then
16323   echo $ECHO_N "(cached) $ECHO_C" >&6
16324 else
16325   cat >conftest.$ac_ext <<_ACEOF
16326 #line 16326 "configure"
16327 #include "confdefs.h"
16328 $ac_includes_default
16329 int
16330 main ()
16331 {
16332 if ((intptr_t *) 0)
16333   return 0;
16334 if (sizeof (intptr_t))
16335   return 0;
16336   ;
16337   return 0;
16338 }
16339 _ACEOF
16340 rm -f conftest.$ac_objext
16341 if { (eval echo "$as_me:16341: \"$ac_compile\"") >&5
16342   (eval $ac_compile) 2>&5
16343   ac_status=$?
16344   echo "$as_me:16344: \$? = $ac_status" >&5
16345   (exit $ac_status); } &&
16346          { ac_try='test -s conftest.$ac_objext'
16347   { (eval echo "$as_me:16347: \"$ac_try\"") >&5
16348   (eval $ac_try) 2>&5
16349   ac_status=$?
16350   echo "$as_me:16350: \$? = $ac_status" >&5
16351   (exit $ac_status); }; }; then
16352   ac_cv_type_intptr_t=yes
16353 else
16354   echo "$as_me: failed program was:" >&5
16355 cat conftest.$ac_ext >&5
16356 ac_cv_type_intptr_t=no
16357 fi
16358 rm -f conftest.$ac_objext conftest.$ac_ext
16359 fi
16360 echo "$as_me:16360: result: $ac_cv_type_intptr_t" >&5
16361 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16362 if test $ac_cv_type_intptr_t = yes; then
16363   :
16364 else
16365
16366 cat >>confdefs.h <<EOF
16367 #define intptr_t long
16368 EOF
16369
16370 fi
16371
16372 echo "$as_me:16372: checking for type sigaction_t" >&5
16373 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16374 if test "${cf_cv_type_sigaction+set}" = set; then
16375   echo $ECHO_N "(cached) $ECHO_C" >&6
16376 else
16377
16378         cat >conftest.$ac_ext <<_ACEOF
16379 #line 16379 "configure"
16380 #include "confdefs.h"
16381
16382 #include <signal.h>
16383 int
16384 main ()
16385 {
16386 sigaction_t x
16387   ;
16388   return 0;
16389 }
16390 _ACEOF
16391 rm -f conftest.$ac_objext
16392 if { (eval echo "$as_me:16392: \"$ac_compile\"") >&5
16393   (eval $ac_compile) 2>&5
16394   ac_status=$?
16395   echo "$as_me:16395: \$? = $ac_status" >&5
16396   (exit $ac_status); } &&
16397          { ac_try='test -s conftest.$ac_objext'
16398   { (eval echo "$as_me:16398: \"$ac_try\"") >&5
16399   (eval $ac_try) 2>&5
16400   ac_status=$?
16401   echo "$as_me:16401: \$? = $ac_status" >&5
16402   (exit $ac_status); }; }; then
16403   cf_cv_type_sigaction=yes
16404 else
16405   echo "$as_me: failed program was:" >&5
16406 cat conftest.$ac_ext >&5
16407 cf_cv_type_sigaction=no
16408 fi
16409 rm -f conftest.$ac_objext conftest.$ac_ext
16410 fi
16411
16412 echo "$as_me:16412: result: $cf_cv_type_sigaction" >&5
16413 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16414 test "$cf_cv_type_sigaction" = yes &&
16415 cat >>confdefs.h <<\EOF
16416 #define HAVE_TYPE_SIGACTION 1
16417 EOF
16418
16419 echo "$as_me:16419: checking declaration of size-change" >&5
16420 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16421 if test "${cf_cv_sizechange+set}" = set; then
16422   echo $ECHO_N "(cached) $ECHO_C" >&6
16423 else
16424
16425     cf_cv_sizechange=unknown
16426     cf_save_CPPFLAGS="$CPPFLAGS"
16427
16428 for cf_opts in "" "NEED_PTEM_H"
16429 do
16430
16431     CPPFLAGS="$cf_save_CPPFLAGS"
16432     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16433     cat >conftest.$ac_ext <<_ACEOF
16434 #line 16434 "configure"
16435 #include "confdefs.h"
16436 #include <sys/types.h>
16437 #ifdef HAVE_TERMIOS_H
16438 #include <termios.h>
16439 #else
16440 #ifdef HAVE_TERMIO_H
16441 #include <termio.h>
16442 #endif
16443 #endif
16444 #ifdef NEED_PTEM_H
16445 /* This is a workaround for SCO:  they neglected to define struct winsize in
16446  * termios.h -- it's only in termio.h and ptem.h
16447  */
16448 #include        <sys/stream.h>
16449 #include        <sys/ptem.h>
16450 #endif
16451 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16452 #include <sys/ioctl.h>
16453 #endif
16454
16455 int
16456 main ()
16457 {
16458
16459 #ifdef TIOCGSIZE
16460         struct ttysize win;     /* FIXME: what system is this? */
16461         int y = win.ts_lines;
16462         int x = win.ts_cols;
16463 #else
16464 #ifdef TIOCGWINSZ
16465         struct winsize win;
16466         int y = win.ws_row;
16467         int x = win.ws_col;
16468 #else
16469         no TIOCGSIZE or TIOCGWINSZ
16470 #endif /* TIOCGWINSZ */
16471 #endif /* TIOCGSIZE */
16472
16473   ;
16474   return 0;
16475 }
16476 _ACEOF
16477 rm -f conftest.$ac_objext
16478 if { (eval echo "$as_me:16478: \"$ac_compile\"") >&5
16479   (eval $ac_compile) 2>&5
16480   ac_status=$?
16481   echo "$as_me:16481: \$? = $ac_status" >&5
16482   (exit $ac_status); } &&
16483          { ac_try='test -s conftest.$ac_objext'
16484   { (eval echo "$as_me:16484: \"$ac_try\"") >&5
16485   (eval $ac_try) 2>&5
16486   ac_status=$?
16487   echo "$as_me:16487: \$? = $ac_status" >&5
16488   (exit $ac_status); }; }; then
16489   cf_cv_sizechange=yes
16490 else
16491   echo "$as_me: failed program was:" >&5
16492 cat conftest.$ac_ext >&5
16493 cf_cv_sizechange=no
16494 fi
16495 rm -f conftest.$ac_objext conftest.$ac_ext
16496
16497         CPPFLAGS="$cf_save_CPPFLAGS"
16498         if test "$cf_cv_sizechange" = yes ; then
16499                 echo "size-change succeeded ($cf_opts)" >&5
16500                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16501                 break
16502         fi
16503 done
16504
16505 fi
16506 echo "$as_me:16506: result: $cf_cv_sizechange" >&5
16507 echo "${ECHO_T}$cf_cv_sizechange" >&6
16508 if test "$cf_cv_sizechange" != no ; then
16509
16510 cat >>confdefs.h <<\EOF
16511 #define HAVE_SIZECHANGE 1
16512 EOF
16513
16514         case $cf_cv_sizechange in #(vi
16515         NEED*)
16516                 cat >>confdefs.h <<EOF
16517 #define $cf_cv_sizechange  1
16518 EOF
16519
16520                 ;;
16521         esac
16522 fi
16523
16524 echo "$as_me:16524: checking if poll really works" >&5
16525 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16526 if test "${cf_cv_working_poll+set}" = set; then
16527   echo $ECHO_N "(cached) $ECHO_C" >&6
16528 else
16529
16530 if test "$cross_compiling" = yes; then
16531   cf_cv_working_poll=unknown
16532 else
16533   cat >conftest.$ac_ext <<_ACEOF
16534 #line 16534 "configure"
16535 #include "confdefs.h"
16536
16537 #include <stdlib.h>
16538 #include <stdio.h>
16539 #include <unistd.h>
16540 #include <fcntl.h>
16541 #ifdef HAVE_POLL_H
16542 #include <poll.h>
16543 #else
16544 #include <sys/poll.h>
16545 #endif
16546 int main() {
16547         struct pollfd myfds;
16548         int ret;
16549
16550         /* check for Darwin bug with respect to "devices" */
16551         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16552         if (myfds.fd < 0)
16553                 myfds.fd = 0;
16554         myfds.events = POLLIN;
16555         myfds.revents = 0;
16556
16557         ret = poll(&myfds, 1, 100);
16558
16559         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16560                 ret = -1;
16561         } else {
16562                 int fd = 0;
16563                 if (!isatty(fd)) {
16564                         fd = open("/dev/tty", 2);       /* O_RDWR */
16565                 }
16566
16567                 if (fd >= 0) {
16568                         /* also check with standard input */
16569                         myfds.fd = fd;
16570                         myfds.events = POLLIN;
16571                         myfds.revents = 0;
16572                         ret = poll(&myfds, 1, 100);
16573                 } else {
16574                         ret = -1;
16575                 }
16576         }
16577         ${cf_cv_main_return:-return}(ret < 0);
16578 }
16579 _ACEOF
16580 rm -f conftest$ac_exeext
16581 if { (eval echo "$as_me:16581: \"$ac_link\"") >&5
16582   (eval $ac_link) 2>&5
16583   ac_status=$?
16584   echo "$as_me:16584: \$? = $ac_status" >&5
16585   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16586   { (eval echo "$as_me:16586: \"$ac_try\"") >&5
16587   (eval $ac_try) 2>&5
16588   ac_status=$?
16589   echo "$as_me:16589: \$? = $ac_status" >&5
16590   (exit $ac_status); }; }; then
16591   cf_cv_working_poll=yes
16592 else
16593   echo "$as_me: program exited with status $ac_status" >&5
16594 echo "$as_me: failed program was:" >&5
16595 cat conftest.$ac_ext >&5
16596 cf_cv_working_poll=no
16597 fi
16598 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16599 fi
16600 fi
16601 echo "$as_me:16601: result: $cf_cv_working_poll" >&5
16602 echo "${ECHO_T}$cf_cv_working_poll" >&6
16603 test "$cf_cv_working_poll" = "yes" &&
16604 cat >>confdefs.h <<\EOF
16605 #define HAVE_WORKING_POLL 1
16606 EOF
16607
16608 echo "$as_me:16608: checking for va_copy" >&5
16609 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16610 if test "${cf_cv_have_va_copy+set}" = set; then
16611   echo $ECHO_N "(cached) $ECHO_C" >&6
16612 else
16613
16614 cat >conftest.$ac_ext <<_ACEOF
16615 #line 16615 "configure"
16616 #include "confdefs.h"
16617
16618 #include <stdarg.h>
16619
16620 int
16621 main ()
16622 {
16623
16624         static va_list dst;
16625         static va_list src;
16626         va_copy(dst, src)
16627   ;
16628   return 0;
16629 }
16630 _ACEOF
16631 rm -f conftest.$ac_objext conftest$ac_exeext
16632 if { (eval echo "$as_me:16632: \"$ac_link\"") >&5
16633   (eval $ac_link) 2>&5
16634   ac_status=$?
16635   echo "$as_me:16635: \$? = $ac_status" >&5
16636   (exit $ac_status); } &&
16637          { ac_try='test -s conftest$ac_exeext'
16638   { (eval echo "$as_me:16638: \"$ac_try\"") >&5
16639   (eval $ac_try) 2>&5
16640   ac_status=$?
16641   echo "$as_me:16641: \$? = $ac_status" >&5
16642   (exit $ac_status); }; }; then
16643   cf_cv_have_va_copy=yes
16644 else
16645   echo "$as_me: failed program was:" >&5
16646 cat conftest.$ac_ext >&5
16647 cf_cv_have_va_copy=no
16648 fi
16649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16650 fi
16651 echo "$as_me:16651: result: $cf_cv_have_va_copy" >&5
16652 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16653
16654 test "$cf_cv_have_va_copy" = yes &&
16655 cat >>confdefs.h <<\EOF
16656 #define HAVE_VA_COPY 1
16657 EOF
16658
16659 echo "$as_me:16659: checking for __va_copy" >&5
16660 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16661 if test "${cf_cv_have___va_copy+set}" = set; then
16662   echo $ECHO_N "(cached) $ECHO_C" >&6
16663 else
16664
16665 cat >conftest.$ac_ext <<_ACEOF
16666 #line 16666 "configure"
16667 #include "confdefs.h"
16668
16669 #include <stdarg.h>
16670
16671 int
16672 main ()
16673 {
16674
16675         static va_list dst;
16676         static va_list src;
16677         __va_copy(dst, src)
16678   ;
16679   return 0;
16680 }
16681 _ACEOF
16682 rm -f conftest.$ac_objext conftest$ac_exeext
16683 if { (eval echo "$as_me:16683: \"$ac_link\"") >&5
16684   (eval $ac_link) 2>&5
16685   ac_status=$?
16686   echo "$as_me:16686: \$? = $ac_status" >&5
16687   (exit $ac_status); } &&
16688          { ac_try='test -s conftest$ac_exeext'
16689   { (eval echo "$as_me:16689: \"$ac_try\"") >&5
16690   (eval $ac_try) 2>&5
16691   ac_status=$?
16692   echo "$as_me:16692: \$? = $ac_status" >&5
16693   (exit $ac_status); }; }; then
16694   cf_cv_have___va_copy=yes
16695 else
16696   echo "$as_me: failed program was:" >&5
16697 cat conftest.$ac_ext >&5
16698 cf_cv_have___va_copy=no
16699 fi
16700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16701 fi
16702 echo "$as_me:16702: result: $cf_cv_have___va_copy" >&5
16703 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16704
16705 test "$cf_cv_have___va_copy" = yes &&
16706 cat >>confdefs.h <<\EOF
16707 #define HAVE___VA_COPY 1
16708 EOF
16709
16710 echo "$as_me:16710: checking for pid_t" >&5
16711 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16712 if test "${ac_cv_type_pid_t+set}" = set; then
16713   echo $ECHO_N "(cached) $ECHO_C" >&6
16714 else
16715   cat >conftest.$ac_ext <<_ACEOF
16716 #line 16716 "configure"
16717 #include "confdefs.h"
16718 $ac_includes_default
16719 int
16720 main ()
16721 {
16722 if ((pid_t *) 0)
16723   return 0;
16724 if (sizeof (pid_t))
16725   return 0;
16726   ;
16727   return 0;
16728 }
16729 _ACEOF
16730 rm -f conftest.$ac_objext
16731 if { (eval echo "$as_me:16731: \"$ac_compile\"") >&5
16732   (eval $ac_compile) 2>&5
16733   ac_status=$?
16734   echo "$as_me:16734: \$? = $ac_status" >&5
16735   (exit $ac_status); } &&
16736          { ac_try='test -s conftest.$ac_objext'
16737   { (eval echo "$as_me:16737: \"$ac_try\"") >&5
16738   (eval $ac_try) 2>&5
16739   ac_status=$?
16740   echo "$as_me:16740: \$? = $ac_status" >&5
16741   (exit $ac_status); }; }; then
16742   ac_cv_type_pid_t=yes
16743 else
16744   echo "$as_me: failed program was:" >&5
16745 cat conftest.$ac_ext >&5
16746 ac_cv_type_pid_t=no
16747 fi
16748 rm -f conftest.$ac_objext conftest.$ac_ext
16749 fi
16750 echo "$as_me:16750: result: $ac_cv_type_pid_t" >&5
16751 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16752 if test $ac_cv_type_pid_t = yes; then
16753   :
16754 else
16755
16756 cat >>confdefs.h <<EOF
16757 #define pid_t int
16758 EOF
16759
16760 fi
16761
16762 for ac_header in unistd.h vfork.h
16763 do
16764 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16765 echo "$as_me:16765: checking for $ac_header" >&5
16766 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16767 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16768   echo $ECHO_N "(cached) $ECHO_C" >&6
16769 else
16770   cat >conftest.$ac_ext <<_ACEOF
16771 #line 16771 "configure"
16772 #include "confdefs.h"
16773 #include <$ac_header>
16774 _ACEOF
16775 if { (eval echo "$as_me:16775: \"$ac_cpp conftest.$ac_ext\"") >&5
16776   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16777   ac_status=$?
16778   egrep -v '^ *\+' conftest.er1 >conftest.err
16779   rm -f conftest.er1
16780   cat conftest.err >&5
16781   echo "$as_me:16781: \$? = $ac_status" >&5
16782   (exit $ac_status); } >/dev/null; then
16783   if test -s conftest.err; then
16784     ac_cpp_err=$ac_c_preproc_warn_flag
16785   else
16786     ac_cpp_err=
16787   fi
16788 else
16789   ac_cpp_err=yes
16790 fi
16791 if test -z "$ac_cpp_err"; then
16792   eval "$as_ac_Header=yes"
16793 else
16794   echo "$as_me: failed program was:" >&5
16795   cat conftest.$ac_ext >&5
16796   eval "$as_ac_Header=no"
16797 fi
16798 rm -f conftest.err conftest.$ac_ext
16799 fi
16800 echo "$as_me:16800: result: `eval echo '${'$as_ac_Header'}'`" >&5
16801 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16802 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16803   cat >>confdefs.h <<EOF
16804 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16805 EOF
16806
16807 fi
16808 done
16809
16810 for ac_func in fork vfork
16811 do
16812 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16813 echo "$as_me:16813: checking for $ac_func" >&5
16814 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16815 if eval "test \"\${$as_ac_var+set}\" = set"; then
16816   echo $ECHO_N "(cached) $ECHO_C" >&6
16817 else
16818   cat >conftest.$ac_ext <<_ACEOF
16819 #line 16819 "configure"
16820 #include "confdefs.h"
16821 /* System header to define __stub macros and hopefully few prototypes,
16822     which can conflict with char $ac_func (); below.  */
16823 #include <assert.h>
16824 /* Override any gcc2 internal prototype to avoid an error.  */
16825 #ifdef __cplusplus
16826 extern "C"
16827 #endif
16828 /* We use char because int might match the return type of a gcc2
16829    builtin and then its argument prototype would still apply.  */
16830 char $ac_func ();
16831 char (*f) ();
16832
16833 int
16834 main ()
16835 {
16836 /* The GNU C library defines this for functions which it implements
16837     to always fail with ENOSYS.  Some functions are actually named
16838     something starting with __ and the normal name is an alias.  */
16839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16840 choke me
16841 #else
16842 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16843 #endif
16844
16845   ;
16846   return 0;
16847 }
16848 _ACEOF
16849 rm -f conftest.$ac_objext conftest$ac_exeext
16850 if { (eval echo "$as_me:16850: \"$ac_link\"") >&5
16851   (eval $ac_link) 2>&5
16852   ac_status=$?
16853   echo "$as_me:16853: \$? = $ac_status" >&5
16854   (exit $ac_status); } &&
16855          { ac_try='test -s conftest$ac_exeext'
16856   { (eval echo "$as_me:16856: \"$ac_try\"") >&5
16857   (eval $ac_try) 2>&5
16858   ac_status=$?
16859   echo "$as_me:16859: \$? = $ac_status" >&5
16860   (exit $ac_status); }; }; then
16861   eval "$as_ac_var=yes"
16862 else
16863   echo "$as_me: failed program was:" >&5
16864 cat conftest.$ac_ext >&5
16865 eval "$as_ac_var=no"
16866 fi
16867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16868 fi
16869 echo "$as_me:16869: result: `eval echo '${'$as_ac_var'}'`" >&5
16870 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16871 if test `eval echo '${'$as_ac_var'}'` = yes; then
16872   cat >>confdefs.h <<EOF
16873 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16874 EOF
16875
16876 fi
16877 done
16878
16879 ac_cv_func_fork_works=$ac_cv_func_fork
16880 if test "x$ac_cv_func_fork" = xyes; then
16881   echo "$as_me:16881: checking for working fork" >&5
16882 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16883 if test "${ac_cv_func_fork_works+set}" = set; then
16884   echo $ECHO_N "(cached) $ECHO_C" >&6
16885 else
16886   if test "$cross_compiling" = yes; then
16887   ac_cv_func_fork_works=cross
16888 else
16889   cat >conftest.$ac_ext <<_ACEOF
16890 /* By Rüdiger Kuhlmann. */
16891       #include <sys/types.h>
16892       #if HAVE_UNISTD_H
16893       # include <unistd.h>
16894       #endif
16895       /* Some systems only have a dummy stub for fork() */
16896       int main ()
16897       {
16898         if (fork() < 0)
16899           $ac_main_return (1);
16900         $ac_main_return (0);
16901       }
16902 _ACEOF
16903 rm -f conftest$ac_exeext
16904 if { (eval echo "$as_me:16904: \"$ac_link\"") >&5
16905   (eval $ac_link) 2>&5
16906   ac_status=$?
16907   echo "$as_me:16907: \$? = $ac_status" >&5
16908   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16909   { (eval echo "$as_me:16909: \"$ac_try\"") >&5
16910   (eval $ac_try) 2>&5
16911   ac_status=$?
16912   echo "$as_me:16912: \$? = $ac_status" >&5
16913   (exit $ac_status); }; }; then
16914   ac_cv_func_fork_works=yes
16915 else
16916   echo "$as_me: program exited with status $ac_status" >&5
16917 echo "$as_me: failed program was:" >&5
16918 cat conftest.$ac_ext >&5
16919 ac_cv_func_fork_works=no
16920 fi
16921 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16922 fi
16923 fi
16924 echo "$as_me:16924: result: $ac_cv_func_fork_works" >&5
16925 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16926
16927 fi
16928 if test "x$ac_cv_func_fork_works" = xcross; then
16929   case $host in
16930     *-*-amigaos* | *-*-msdosdjgpp*)
16931       # Override, as these systems have only a dummy fork() stub
16932       ac_cv_func_fork_works=no
16933       ;;
16934     *)
16935       ac_cv_func_fork_works=yes
16936       ;;
16937   esac
16938   { echo "$as_me:16938: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16939 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16940 fi
16941 ac_cv_func_vfork_works=$ac_cv_func_vfork
16942 if test "x$ac_cv_func_vfork" = xyes; then
16943   echo "$as_me:16943: checking for working vfork" >&5
16944 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16945 if test "${ac_cv_func_vfork_works+set}" = set; then
16946   echo $ECHO_N "(cached) $ECHO_C" >&6
16947 else
16948   if test "$cross_compiling" = yes; then
16949   ac_cv_func_vfork_works=cross
16950 else
16951   cat >conftest.$ac_ext <<_ACEOF
16952 #line 16952 "configure"
16953 #include "confdefs.h"
16954 /* Thanks to Paul Eggert for this test.  */
16955 #include <stdio.h>
16956 #include <sys/types.h>
16957 #include <sys/stat.h>
16958 #if HAVE_UNISTD_H
16959 # include <unistd.h>
16960 #endif
16961 #if HAVE_VFORK_H
16962 # include <vfork.h>
16963 #endif
16964 /* On some sparc systems, changes by the child to local and incoming
16965    argument registers are propagated back to the parent.  The compiler
16966    is told about this with #include <vfork.h>, but some compilers
16967    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16968    static variable whose address is put into a register that is
16969    clobbered by the vfork.  */
16970 static
16971 #ifdef __cplusplus
16972 sparc_address_test (int arg)
16973 # else
16974 sparc_address_test (arg) int arg;
16975 #endif
16976 {
16977   static pid_t child;
16978   if (!child) {
16979     child = vfork ();
16980     if (child < 0) {
16981       perror ("vfork");
16982       _exit(2);
16983     }
16984     if (!child) {
16985       arg = getpid();
16986       write(-1, "", 0);
16987       _exit (arg);
16988     }
16989   }
16990 }
16991
16992 int
16993 main ()
16994 {
16995   pid_t parent = getpid ();
16996   pid_t child;
16997
16998   sparc_address_test ();
16999
17000   child = vfork ();
17001
17002   if (child == 0) {
17003     /* Here is another test for sparc vfork register problems.  This
17004        test uses lots of local variables, at least as many local
17005        variables as main has allocated so far including compiler
17006        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17007        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17008        reuse the register of parent for one of the local variables,
17009        since it will think that parent can't possibly be used any more
17010        in this routine.  Assigning to the local variable will thus
17011        munge parent in the parent process.  */
17012     pid_t
17013       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17014       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17015     /* Convince the compiler that p..p7 are live; otherwise, it might
17016        use the same hardware register for all 8 local variables.  */
17017     if (p != p1 || p != p2 || p != p3 || p != p4
17018         || p != p5 || p != p6 || p != p7)
17019       _exit(1);
17020
17021     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17022        from child file descriptors.  If the child closes a descriptor
17023        before it execs or exits, this munges the parent's descriptor
17024        as well.  Test for this by closing stdout in the child.  */
17025     _exit(close(fileno(stdout)) != 0);
17026   } else {
17027     int status;
17028     struct stat st;
17029
17030     while (wait(&status) != child)
17031       ;
17032     $ac_main_return(
17033          /* Was there some problem with vforking?  */
17034          child < 0
17035
17036          /* Did the child fail?  (This shouldn't happen.)  */
17037          || status
17038
17039          /* Did the vfork/compiler bug occur?  */
17040          || parent != getpid()
17041
17042          /* Did the file descriptor bug occur?  */
17043          || fstat(fileno(stdout), &st) != 0
17044          );
17045   }
17046 }
17047 _ACEOF
17048 rm -f conftest$ac_exeext
17049 if { (eval echo "$as_me:17049: \"$ac_link\"") >&5
17050   (eval $ac_link) 2>&5
17051   ac_status=$?
17052   echo "$as_me:17052: \$? = $ac_status" >&5
17053   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17054   { (eval echo "$as_me:17054: \"$ac_try\"") >&5
17055   (eval $ac_try) 2>&5
17056   ac_status=$?
17057   echo "$as_me:17057: \$? = $ac_status" >&5
17058   (exit $ac_status); }; }; then
17059   ac_cv_func_vfork_works=yes
17060 else
17061   echo "$as_me: program exited with status $ac_status" >&5
17062 echo "$as_me: failed program was:" >&5
17063 cat conftest.$ac_ext >&5
17064 ac_cv_func_vfork_works=no
17065 fi
17066 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17067 fi
17068 fi
17069 echo "$as_me:17069: result: $ac_cv_func_vfork_works" >&5
17070 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17071
17072 fi;
17073 if test "x$ac_cv_func_fork_works" = xcross; then
17074   ac_cv_func_vfork_works=ac_cv_func_vfork
17075   { echo "$as_me:17075: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17076 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17077 fi
17078
17079 if test "x$ac_cv_func_vfork_works" = xyes; then
17080
17081 cat >>confdefs.h <<\EOF
17082 #define HAVE_WORKING_VFORK 1
17083 EOF
17084
17085 else
17086
17087 cat >>confdefs.h <<\EOF
17088 #define vfork fork
17089 EOF
17090
17091 fi
17092 if test "x$ac_cv_func_fork_works" = xyes; then
17093
17094 cat >>confdefs.h <<\EOF
17095 #define HAVE_WORKING_FORK 1
17096 EOF
17097
17098 fi
17099
17100 # special check for test/ditto.c
17101
17102 echo "$as_me:17102: checking for openpty in -lutil" >&5
17103 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17104 if test "${ac_cv_lib_util_openpty+set}" = set; then
17105   echo $ECHO_N "(cached) $ECHO_C" >&6
17106 else
17107   ac_check_lib_save_LIBS=$LIBS
17108 LIBS="-lutil  $LIBS"
17109 cat >conftest.$ac_ext <<_ACEOF
17110 #line 17110 "configure"
17111 #include "confdefs.h"
17112
17113 /* Override any gcc2 internal prototype to avoid an error.  */
17114 #ifdef __cplusplus
17115 extern "C"
17116 #endif
17117 /* We use char because int might match the return type of a gcc2
17118    builtin and then its argument prototype would still apply.  */
17119 char openpty ();
17120 int
17121 main ()
17122 {
17123 openpty ();
17124   ;
17125   return 0;
17126 }
17127 _ACEOF
17128 rm -f conftest.$ac_objext conftest$ac_exeext
17129 if { (eval echo "$as_me:17129: \"$ac_link\"") >&5
17130   (eval $ac_link) 2>&5
17131   ac_status=$?
17132   echo "$as_me:17132: \$? = $ac_status" >&5
17133   (exit $ac_status); } &&
17134          { ac_try='test -s conftest$ac_exeext'
17135   { (eval echo "$as_me:17135: \"$ac_try\"") >&5
17136   (eval $ac_try) 2>&5
17137   ac_status=$?
17138   echo "$as_me:17138: \$? = $ac_status" >&5
17139   (exit $ac_status); }; }; then
17140   ac_cv_lib_util_openpty=yes
17141 else
17142   echo "$as_me: failed program was:" >&5
17143 cat conftest.$ac_ext >&5
17144 ac_cv_lib_util_openpty=no
17145 fi
17146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17147 LIBS=$ac_check_lib_save_LIBS
17148 fi
17149 echo "$as_me:17149: result: $ac_cv_lib_util_openpty" >&5
17150 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17151 if test $ac_cv_lib_util_openpty = yes; then
17152   cf_cv_lib_util=yes
17153 else
17154   cf_cv_lib_util=no
17155 fi
17156
17157 echo "$as_me:17157: checking for openpty header" >&5
17158 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17159 if test "${cf_cv_func_openpty+set}" = set; then
17160   echo $ECHO_N "(cached) $ECHO_C" >&6
17161 else
17162
17163     cf_save_LIBS="$LIBS"
17164     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17165     for cf_header in pty.h libutil.h util.h
17166     do
17167     cat >conftest.$ac_ext <<_ACEOF
17168 #line 17168 "configure"
17169 #include "confdefs.h"
17170
17171 #include <$cf_header>
17172
17173 int
17174 main ()
17175 {
17176
17177     int x = openpty((int *)0, (int *)0, (char *)0,
17178                    (struct termios *)0, (struct winsize *)0);
17179
17180   ;
17181   return 0;
17182 }
17183 _ACEOF
17184 rm -f conftest.$ac_objext conftest$ac_exeext
17185 if { (eval echo "$as_me:17185: \"$ac_link\"") >&5
17186   (eval $ac_link) 2>&5
17187   ac_status=$?
17188   echo "$as_me:17188: \$? = $ac_status" >&5
17189   (exit $ac_status); } &&
17190          { ac_try='test -s conftest$ac_exeext'
17191   { (eval echo "$as_me:17191: \"$ac_try\"") >&5
17192   (eval $ac_try) 2>&5
17193   ac_status=$?
17194   echo "$as_me:17194: \$? = $ac_status" >&5
17195   (exit $ac_status); }; }; then
17196
17197         cf_cv_func_openpty=$cf_header
17198         break
17199
17200 else
17201   echo "$as_me: failed program was:" >&5
17202 cat conftest.$ac_ext >&5
17203
17204         cf_cv_func_openpty=no
17205
17206 fi
17207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17208     done
17209     LIBS="$cf_save_LIBS"
17210
17211 fi
17212 echo "$as_me:17212: result: $cf_cv_func_openpty" >&5
17213 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17214
17215 if test "$cf_cv_func_openpty" != no ; then
17216
17217 cat >>confdefs.h <<EOF
17218 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17219 EOF
17220
17221 cat >>confdefs.h <<\EOF
17222 #define USE_XTERM_PTY 1
17223 EOF
17224
17225     if test "x$cf_cv_lib_util" = xyes ; then
17226         TEST_LIBS="-lutil $TEST_LIBS"
17227     fi
17228 fi
17229
17230 if test "$with_hashed_db" != no ; then
17231
17232 cat >>confdefs.h <<\EOF
17233 #define USE_HASHED_DB 1
17234 EOF
17235
17236 case $with_hashed_db in #(vi
17237 yes|*able*) #(vi
17238     ;;
17239 *)
17240     if test -d "$with_hashed_db" ; then
17241
17242 if test -n "$with_hashed_db/include" ; then
17243   for cf_add_incdir in $with_hashed_db/include
17244   do
17245         while test $cf_add_incdir != /usr/include
17246         do
17247           if test -d $cf_add_incdir
17248           then
17249                 cf_have_incdir=no
17250                 if test -n "$CFLAGS$CPPFLAGS" ; then
17251                   # a loop is needed to ensure we can add subdirs of existing dirs
17252                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17253                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17254                           cf_have_incdir=yes; break
17255                         fi
17256                   done
17257                 fi
17258
17259                 if test "$cf_have_incdir" = no ; then
17260                   if test "$cf_add_incdir" = /usr/local/include ; then
17261                         if test "$GCC" = yes
17262                         then
17263                           cf_save_CPPFLAGS=$CPPFLAGS
17264                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17265                           cat >conftest.$ac_ext <<_ACEOF
17266 #line 17266 "configure"
17267 #include "confdefs.h"
17268 #include <stdio.h>
17269 int
17270 main ()
17271 {
17272 printf("Hello")
17273   ;
17274   return 0;
17275 }
17276 _ACEOF
17277 rm -f conftest.$ac_objext
17278 if { (eval echo "$as_me:17278: \"$ac_compile\"") >&5
17279   (eval $ac_compile) 2>&5
17280   ac_status=$?
17281   echo "$as_me:17281: \$? = $ac_status" >&5
17282   (exit $ac_status); } &&
17283          { ac_try='test -s conftest.$ac_objext'
17284   { (eval echo "$as_me:17284: \"$ac_try\"") >&5
17285   (eval $ac_try) 2>&5
17286   ac_status=$?
17287   echo "$as_me:17287: \$? = $ac_status" >&5
17288   (exit $ac_status); }; }; then
17289   :
17290 else
17291   echo "$as_me: failed program was:" >&5
17292 cat conftest.$ac_ext >&5
17293 cf_have_incdir=yes
17294 fi
17295 rm -f conftest.$ac_objext conftest.$ac_ext
17296                           CPPFLAGS=$cf_save_CPPFLAGS
17297                         fi
17298                   fi
17299                 fi
17300
17301                 if test "$cf_have_incdir" = no ; then
17302                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17303
17304 echo "${as_me:-configure}:17304: testing adding $cf_add_incdir to include-path ..." 1>&5
17305
17306                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17307
17308                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17309                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17310                   cf_add_incdir="$cf_top_incdir"
17311                 else
17312                   break
17313                 fi
17314           fi
17315         done
17316   done
17317 fi
17318
17319 if test -n "$with_hashed_db/lib" ; then
17320   for cf_add_libdir in $with_hashed_db/lib
17321   do
17322     if test $cf_add_libdir = /usr/lib ; then
17323       :
17324     elif test -d $cf_add_libdir
17325     then
17326       cf_have_libdir=no
17327       if test -n "$LDFLAGS$LIBS" ; then
17328         # a loop is needed to ensure we can add subdirs of existing dirs
17329         for cf_test_libdir in $LDFLAGS $LIBS ; do
17330           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17331             cf_have_libdir=yes; break
17332           fi
17333         done
17334       fi
17335       if test "$cf_have_libdir" = no ; then
17336         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17337
17338 echo "${as_me:-configure}:17338: testing adding $cf_add_libdir to library-path ..." 1>&5
17339
17340         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17341       fi
17342     fi
17343   done
17344 fi
17345
17346     fi
17347 esac
17348
17349 echo "$as_me:17349: checking for db.h" >&5
17350 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17351 if test "${ac_cv_header_db_h+set}" = set; then
17352   echo $ECHO_N "(cached) $ECHO_C" >&6
17353 else
17354   cat >conftest.$ac_ext <<_ACEOF
17355 #line 17355 "configure"
17356 #include "confdefs.h"
17357 #include <db.h>
17358 _ACEOF
17359 if { (eval echo "$as_me:17359: \"$ac_cpp conftest.$ac_ext\"") >&5
17360   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17361   ac_status=$?
17362   egrep -v '^ *\+' conftest.er1 >conftest.err
17363   rm -f conftest.er1
17364   cat conftest.err >&5
17365   echo "$as_me:17365: \$? = $ac_status" >&5
17366   (exit $ac_status); } >/dev/null; then
17367   if test -s conftest.err; then
17368     ac_cpp_err=$ac_c_preproc_warn_flag
17369   else
17370     ac_cpp_err=
17371   fi
17372 else
17373   ac_cpp_err=yes
17374 fi
17375 if test -z "$ac_cpp_err"; then
17376   ac_cv_header_db_h=yes
17377 else
17378   echo "$as_me: failed program was:" >&5
17379   cat conftest.$ac_ext >&5
17380   ac_cv_header_db_h=no
17381 fi
17382 rm -f conftest.err conftest.$ac_ext
17383 fi
17384 echo "$as_me:17384: result: $ac_cv_header_db_h" >&5
17385 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17386 if test $ac_cv_header_db_h = yes; then
17387
17388 echo "$as_me:17388: checking for version of db" >&5
17389 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17390 if test "${cf_cv_hashed_db_version+set}" = set; then
17391   echo $ECHO_N "(cached) $ECHO_C" >&6
17392 else
17393
17394 cf_cv_hashed_db_version=unknown
17395
17396 for cf_db_version in 1 2 3 4 5
17397 do
17398
17399 echo "${as_me:-configure}:17399: testing checking for db version $cf_db_version ..." 1>&5
17400
17401         cat >conftest.$ac_ext <<_ACEOF
17402 #line 17402 "configure"
17403 #include "confdefs.h"
17404
17405 $ac_includes_default
17406 #include <db.h>
17407
17408 #ifdef DB_VERSION_MAJOR
17409         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17410 #if $cf_db_version == DB_VERSION_MAJOR
17411         /* ok */
17412 #else
17413         make an error
17414 #endif
17415 #else
17416 #if $cf_db_version == 1
17417         /* ok: assuming this is DB 1.8.5 */
17418 #else
17419         make an error
17420 #endif
17421 #endif
17422
17423 int
17424 main ()
17425 {
17426 DBT *foo = 0
17427   ;
17428   return 0;
17429 }
17430 _ACEOF
17431 rm -f conftest.$ac_objext
17432 if { (eval echo "$as_me:17432: \"$ac_compile\"") >&5
17433   (eval $ac_compile) 2>&5
17434   ac_status=$?
17435   echo "$as_me:17435: \$? = $ac_status" >&5
17436   (exit $ac_status); } &&
17437          { ac_try='test -s conftest.$ac_objext'
17438   { (eval echo "$as_me:17438: \"$ac_try\"") >&5
17439   (eval $ac_try) 2>&5
17440   ac_status=$?
17441   echo "$as_me:17441: \$? = $ac_status" >&5
17442   (exit $ac_status); }; }; then
17443
17444         cf_cv_hashed_db_version=$cf_db_version
17445         break
17446
17447 else
17448   echo "$as_me: failed program was:" >&5
17449 cat conftest.$ac_ext >&5
17450 fi
17451 rm -f conftest.$ac_objext conftest.$ac_ext
17452 done
17453
17454 fi
17455 echo "$as_me:17455: result: $cf_cv_hashed_db_version" >&5
17456 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17457
17458 if test "$cf_cv_hashed_db_version" = unknown ; then
17459         { { echo "$as_me:17459: error: Cannot determine version of db" >&5
17460 echo "$as_me: error: Cannot determine version of db" >&2;}
17461    { (exit 1); exit 1; }; }
17462 else
17463
17464 echo "$as_me:17464: checking for db libraries" >&5
17465 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17466 if test "${cf_cv_hashed_db_libs+set}" = set; then
17467   echo $ECHO_N "(cached) $ECHO_C" >&6
17468 else
17469
17470 cf_cv_hashed_db_libs=unknown
17471 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17472 do
17473         cf_save_libs="$LIBS"
17474         if test -n "$cf_db_libs"; then
17475                 LIBS="-l$cf_db_libs $LIBS"
17476         fi
17477
17478 echo "${as_me:-configure}:17478: testing checking for library "$cf_db_libs" ..." 1>&5
17479
17480         cat >conftest.$ac_ext <<_ACEOF
17481 #line 17481 "configure"
17482 #include "confdefs.h"
17483
17484 $ac_includes_default
17485 #include <db.h>
17486
17487 int
17488 main ()
17489 {
17490
17491         char *path = "/tmp/foo";
17492 #ifdef DB_VERSION_MAJOR
17493 #if DB_VERSION_MAJOR >= 4
17494         DB *result = 0;
17495         db_create(&result, NULL, 0);
17496         result->open(result,
17497                 NULL,
17498                 path,
17499                 path,
17500                 DB_HASH,
17501                 DB_CREATE,
17502                 0644);
17503 #elif DB_VERSION_MAJOR >= 3
17504         DB *result = 0;
17505         db_create(&result, NULL, 0);
17506         result->open(result,
17507                 path,
17508                 path,
17509                 DB_HASH,
17510                 DB_CREATE,
17511                 0644);
17512 #elif DB_VERSION_MAJOR >= 2
17513         DB *result = 0;
17514         db_open(path,
17515                 DB_HASH,
17516                 DB_CREATE,
17517                 0644,
17518                 (DB_ENV *) 0,
17519                 (DB_INFO *) 0,
17520                 &result);
17521 #endif /* DB_VERSION_MAJOR */
17522 #else
17523         DB *result = dbopen(path,
17524                      2,
17525                      0644,
17526                      DB_HASH,
17527                      0);
17528 #endif
17529         ${cf_cv_main_return:-return}(result != 0)
17530
17531   ;
17532   return 0;
17533 }
17534 _ACEOF
17535 rm -f conftest.$ac_objext conftest$ac_exeext
17536 if { (eval echo "$as_me:17536: \"$ac_link\"") >&5
17537   (eval $ac_link) 2>&5
17538   ac_status=$?
17539   echo "$as_me:17539: \$? = $ac_status" >&5
17540   (exit $ac_status); } &&
17541          { ac_try='test -s conftest$ac_exeext'
17542   { (eval echo "$as_me:17542: \"$ac_try\"") >&5
17543   (eval $ac_try) 2>&5
17544   ac_status=$?
17545   echo "$as_me:17545: \$? = $ac_status" >&5
17546   (exit $ac_status); }; }; then
17547
17548         if test -n "$cf_db_libs" ; then
17549                 cf_cv_hashed_db_libs=$cf_db_libs
17550         else
17551                 cf_cv_hashed_db_libs=default
17552         fi
17553         LIBS="$cf_save_libs"
17554         break
17555
17556 else
17557   echo "$as_me: failed program was:" >&5
17558 cat conftest.$ac_ext >&5
17559 fi
17560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17561         LIBS="$cf_save_libs"
17562 done
17563
17564 fi
17565 echo "$as_me:17565: result: $cf_cv_hashed_db_libs" >&5
17566 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17567
17568         if test "$cf_cv_hashed_db_libs" = unknown ; then
17569                 { { echo "$as_me:17569: error: Cannot determine library for db" >&5
17570 echo "$as_me: error: Cannot determine library for db" >&2;}
17571    { (exit 1); exit 1; }; }
17572         elif test "$cf_cv_hashed_db_libs" != default ; then
17573                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17574         fi
17575 fi
17576
17577 else
17578
17579         { { echo "$as_me:17579: error: Cannot find db.h" >&5
17580 echo "$as_me: error: Cannot find db.h" >&2;}
17581    { (exit 1); exit 1; }; }
17582
17583 fi
17584
17585 fi
17586
17587 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17588         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17589         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17590 fi
17591
17592 # Just in case, check if the C compiler has a bool type.
17593
17594 echo "$as_me:17594: checking if we should include stdbool.h" >&5
17595 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17596
17597 if test "${cf_cv_header_stdbool_h+set}" = set; then
17598   echo $ECHO_N "(cached) $ECHO_C" >&6
17599 else
17600
17601         cat >conftest.$ac_ext <<_ACEOF
17602 #line 17602 "configure"
17603 #include "confdefs.h"
17604
17605 int
17606 main ()
17607 {
17608 bool foo = false
17609   ;
17610   return 0;
17611 }
17612 _ACEOF
17613 rm -f conftest.$ac_objext
17614 if { (eval echo "$as_me:17614: \"$ac_compile\"") >&5
17615   (eval $ac_compile) 2>&5
17616   ac_status=$?
17617   echo "$as_me:17617: \$? = $ac_status" >&5
17618   (exit $ac_status); } &&
17619          { ac_try='test -s conftest.$ac_objext'
17620   { (eval echo "$as_me:17620: \"$ac_try\"") >&5
17621   (eval $ac_try) 2>&5
17622   ac_status=$?
17623   echo "$as_me:17623: \$? = $ac_status" >&5
17624   (exit $ac_status); }; }; then
17625   cf_cv_header_stdbool_h=0
17626 else
17627   echo "$as_me: failed program was:" >&5
17628 cat conftest.$ac_ext >&5
17629 cat >conftest.$ac_ext <<_ACEOF
17630 #line 17630 "configure"
17631 #include "confdefs.h"
17632
17633 #ifndef __BEOS__
17634 #include <stdbool.h>
17635 #endif
17636
17637 int
17638 main ()
17639 {
17640 bool foo = false
17641   ;
17642   return 0;
17643 }
17644 _ACEOF
17645 rm -f conftest.$ac_objext
17646 if { (eval echo "$as_me:17646: \"$ac_compile\"") >&5
17647   (eval $ac_compile) 2>&5
17648   ac_status=$?
17649   echo "$as_me:17649: \$? = $ac_status" >&5
17650   (exit $ac_status); } &&
17651          { ac_try='test -s conftest.$ac_objext'
17652   { (eval echo "$as_me:17652: \"$ac_try\"") >&5
17653   (eval $ac_try) 2>&5
17654   ac_status=$?
17655   echo "$as_me:17655: \$? = $ac_status" >&5
17656   (exit $ac_status); }; }; then
17657   cf_cv_header_stdbool_h=1
17658 else
17659   echo "$as_me: failed program was:" >&5
17660 cat conftest.$ac_ext >&5
17661 cf_cv_header_stdbool_h=0
17662 fi
17663 rm -f conftest.$ac_objext conftest.$ac_ext
17664 fi
17665 rm -f conftest.$ac_objext conftest.$ac_ext
17666 fi
17667
17668 if test "$cf_cv_header_stdbool_h" = 1
17669 then    echo "$as_me:17669: result: yes" >&5
17670 echo "${ECHO_T}yes" >&6
17671 else    echo "$as_me:17671: result: no" >&5
17672 echo "${ECHO_T}no" >&6
17673 fi
17674
17675 echo "$as_me:17675: checking for builtin bool type" >&5
17676 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17677
17678 if test "${cf_cv_cc_bool_type+set}" = set; then
17679   echo $ECHO_N "(cached) $ECHO_C" >&6
17680 else
17681
17682         cat >conftest.$ac_ext <<_ACEOF
17683 #line 17683 "configure"
17684 #include "confdefs.h"
17685
17686 #include <stdio.h>
17687 #include <sys/types.h>
17688
17689 int
17690 main ()
17691 {
17692 bool x = false
17693   ;
17694   return 0;
17695 }
17696 _ACEOF
17697 rm -f conftest.$ac_objext
17698 if { (eval echo "$as_me:17698: \"$ac_compile\"") >&5
17699   (eval $ac_compile) 2>&5
17700   ac_status=$?
17701   echo "$as_me:17701: \$? = $ac_status" >&5
17702   (exit $ac_status); } &&
17703          { ac_try='test -s conftest.$ac_objext'
17704   { (eval echo "$as_me:17704: \"$ac_try\"") >&5
17705   (eval $ac_try) 2>&5
17706   ac_status=$?
17707   echo "$as_me:17707: \$? = $ac_status" >&5
17708   (exit $ac_status); }; }; then
17709   cf_cv_cc_bool_type=1
17710 else
17711   echo "$as_me: failed program was:" >&5
17712 cat conftest.$ac_ext >&5
17713 cf_cv_cc_bool_type=0
17714 fi
17715 rm -f conftest.$ac_objext conftest.$ac_ext
17716
17717 fi
17718
17719 if test "$cf_cv_cc_bool_type" = 1
17720 then    echo "$as_me:17720: result: yes" >&5
17721 echo "${ECHO_T}yes" >&6
17722 else    echo "$as_me:17722: result: no" >&5
17723 echo "${ECHO_T}no" >&6
17724 fi
17725
17726 # Check for C++ compiler characteristics (and ensure that it's there!)
17727 if test -n "$CXX" ; then
17728         ac_ext=cc
17729 ac_cpp='$CXXCPP $CPPFLAGS'
17730 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17731 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17732 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17733 ac_main_return=return
17734
17735 if test -n "$GXX" ; then
17736 case $cf_cv_system_name in #(vi
17737 os2*) #(vi
17738         cf_stdcpp_libname=stdcpp
17739         ;;
17740 *)
17741         cf_stdcpp_libname=stdc++
17742         ;;
17743 esac
17744 echo "$as_me:17744: checking for library $cf_stdcpp_libname" >&5
17745 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17746 if test "${cf_cv_libstdcpp+set}" = set; then
17747   echo $ECHO_N "(cached) $ECHO_C" >&6
17748 else
17749
17750         cf_save="$LIBS"
17751         LIBS="-l$cf_stdcpp_libname $LIBS"
17752 cat >conftest.$ac_ext <<_ACEOF
17753 #line 17753 "configure"
17754 #include "confdefs.h"
17755
17756 #include <strstream.h>
17757 int
17758 main ()
17759 {
17760
17761 char buf[80];
17762 strstreambuf foo(buf, sizeof(buf))
17763
17764   ;
17765   return 0;
17766 }
17767 _ACEOF
17768 rm -f conftest.$ac_objext conftest$ac_exeext
17769 if { (eval echo "$as_me:17769: \"$ac_link\"") >&5
17770   (eval $ac_link) 2>&5
17771   ac_status=$?
17772   echo "$as_me:17772: \$? = $ac_status" >&5
17773   (exit $ac_status); } &&
17774          { ac_try='test -s conftest$ac_exeext'
17775   { (eval echo "$as_me:17775: \"$ac_try\"") >&5
17776   (eval $ac_try) 2>&5
17777   ac_status=$?
17778   echo "$as_me:17778: \$? = $ac_status" >&5
17779   (exit $ac_status); }; }; then
17780   cf_cv_libstdcpp=yes
17781 else
17782   echo "$as_me: failed program was:" >&5
17783 cat conftest.$ac_ext >&5
17784 cf_cv_libstdcpp=no
17785 fi
17786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17787         LIBS="$cf_save"
17788
17789 fi
17790 echo "$as_me:17790: result: $cf_cv_libstdcpp" >&5
17791 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17792 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17793 fi
17794
17795         echo "$as_me:17795: checking whether $CXX understands -c and -o together" >&5
17796 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17797 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17798   echo $ECHO_N "(cached) $ECHO_C" >&6
17799 else
17800
17801 cat > conftest.$ac_ext <<CF_EOF
17802 #include <stdio.h>
17803 int main()
17804 {
17805         ${cf_cv_main_return:-return}(0);
17806 }
17807 CF_EOF
17808 # We do the test twice because some compilers refuse to overwrite an
17809 # existing .o file with -o, though they will create one.
17810 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17811 if { (eval echo "$as_me:17811: \"$ac_try\"") >&5
17812   (eval $ac_try) 2>&5
17813   ac_status=$?
17814   echo "$as_me:17814: \$? = $ac_status" >&5
17815   (exit $ac_status); } &&
17816   test -f conftest2.$ac_objext && { (eval echo "$as_me:17816: \"$ac_try\"") >&5
17817   (eval $ac_try) 2>&5
17818   ac_status=$?
17819   echo "$as_me:17819: \$? = $ac_status" >&5
17820   (exit $ac_status); };
17821 then
17822   eval cf_cv_prog_CXX_c_o=yes
17823 else
17824   eval cf_cv_prog_CXX_c_o=no
17825 fi
17826 rm -rf conftest*
17827
17828 fi
17829 if test $cf_cv_prog_CXX_c_o = yes; then
17830   echo "$as_me:17830: result: yes" >&5
17831 echo "${ECHO_T}yes" >&6
17832 else
17833   echo "$as_me:17833: result: no" >&5
17834 echo "${ECHO_T}no" >&6
17835 fi
17836
17837         case $GXX_VERSION in
17838         1*|2.0-6*)
17839                 cf_cxx_library=yes
17840                 ;;
17841         *-2.7*|2.7*)
17842
17843 cf_cxx_library=unknown
17844 case $cf_cv_system_name in #(vi
17845 os2*) #(vi
17846         cf_gpp_libname=gpp
17847         ;;
17848 *)
17849         cf_gpp_libname=g++
17850         ;;
17851 esac
17852 if test "$GXX" = yes; then
17853         echo "$as_me:17853: checking for lib$cf_gpp_libname" >&5
17854 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17855         cf_save="$LIBS"
17856         LIBS="-l$cf_gpp_libname $LIBS"
17857         cat >conftest.$ac_ext <<_ACEOF
17858 #line 17858 "configure"
17859 #include "confdefs.h"
17860
17861 #include <$cf_gpp_libname/builtin.h>
17862
17863 int
17864 main ()
17865 {
17866 two_arg_error_handler_t foo2 = lib_error_handler
17867   ;
17868   return 0;
17869 }
17870 _ACEOF
17871 rm -f conftest.$ac_objext conftest$ac_exeext
17872 if { (eval echo "$as_me:17872: \"$ac_link\"") >&5
17873   (eval $ac_link) 2>&5
17874   ac_status=$?
17875   echo "$as_me:17875: \$? = $ac_status" >&5
17876   (exit $ac_status); } &&
17877          { ac_try='test -s conftest$ac_exeext'
17878   { (eval echo "$as_me:17878: \"$ac_try\"") >&5
17879   (eval $ac_try) 2>&5
17880   ac_status=$?
17881   echo "$as_me:17881: \$? = $ac_status" >&5
17882   (exit $ac_status); }; }; then
17883   cf_cxx_library=yes
17884          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17885          if test "$cf_gpp_libname" = cpp ; then
17886
17887 cat >>confdefs.h <<\EOF
17888 #define HAVE_GPP_BUILTIN_H 1
17889 EOF
17890
17891          else
17892
17893 cat >>confdefs.h <<\EOF
17894 #define HAVE_GXX_BUILTIN_H 1
17895 EOF
17896
17897          fi
17898 else
17899   echo "$as_me: failed program was:" >&5
17900 cat conftest.$ac_ext >&5
17901 cat >conftest.$ac_ext <<_ACEOF
17902 #line 17902 "configure"
17903 #include "confdefs.h"
17904
17905 #include <builtin.h>
17906
17907 int
17908 main ()
17909 {
17910 two_arg_error_handler_t foo2 = lib_error_handler
17911   ;
17912   return 0;
17913 }
17914 _ACEOF
17915 rm -f conftest.$ac_objext conftest$ac_exeext
17916 if { (eval echo "$as_me:17916: \"$ac_link\"") >&5
17917   (eval $ac_link) 2>&5
17918   ac_status=$?
17919   echo "$as_me:17919: \$? = $ac_status" >&5
17920   (exit $ac_status); } &&
17921          { ac_try='test -s conftest$ac_exeext'
17922   { (eval echo "$as_me:17922: \"$ac_try\"") >&5
17923   (eval $ac_try) 2>&5
17924   ac_status=$?
17925   echo "$as_me:17925: \$? = $ac_status" >&5
17926   (exit $ac_status); }; }; then
17927   cf_cxx_library=yes
17928          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17929
17930 cat >>confdefs.h <<\EOF
17931 #define HAVE_BUILTIN_H 1
17932 EOF
17933
17934 else
17935   echo "$as_me: failed program was:" >&5
17936 cat conftest.$ac_ext >&5
17937 cf_cxx_library=no
17938 fi
17939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17940 fi
17941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17942         LIBS="$cf_save"
17943         echo "$as_me:17943: result: $cf_cxx_library" >&5
17944 echo "${ECHO_T}$cf_cxx_library" >&6
17945 fi
17946
17947                 ;;
17948         *)
17949                 cf_cxx_library=no
17950                 ;;
17951         esac
17952
17953         ac_ext=cc
17954 ac_cpp='$CXXCPP $CPPFLAGS'
17955 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17956 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17957 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17958 ac_main_return=return
17959 echo "$as_me:17959: checking how to run the C++ preprocessor" >&5
17960 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17961 if test -z "$CXXCPP"; then
17962   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17963   echo $ECHO_N "(cached) $ECHO_C" >&6
17964 else
17965       # Double quotes because CXXCPP needs to be expanded
17966     for CXXCPP in "$CXX -E" "/lib/cpp"
17967     do
17968       ac_preproc_ok=false
17969 for ac_cxx_preproc_warn_flag in '' yes
17970 do
17971   # Use a header file that comes with gcc, so configuring glibc
17972   # with a fresh cross-compiler works.
17973   # On the NeXT, cc -E runs the code through the compiler's parser,
17974   # not just through cpp. "Syntax error" is here to catch this case.
17975   cat >conftest.$ac_ext <<_ACEOF
17976 #line 17976 "configure"
17977 #include "confdefs.h"
17978 #include <assert.h>
17979                      Syntax error
17980 _ACEOF
17981 if { (eval echo "$as_me:17981: \"$ac_cpp conftest.$ac_ext\"") >&5
17982   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17983   ac_status=$?
17984   egrep -v '^ *\+' conftest.er1 >conftest.err
17985   rm -f conftest.er1
17986   cat conftest.err >&5
17987   echo "$as_me:17987: \$? = $ac_status" >&5
17988   (exit $ac_status); } >/dev/null; then
17989   if test -s conftest.err; then
17990     ac_cpp_err=$ac_cxx_preproc_warn_flag
17991   else
17992     ac_cpp_err=
17993   fi
17994 else
17995   ac_cpp_err=yes
17996 fi
17997 if test -z "$ac_cpp_err"; then
17998   :
17999 else
18000   echo "$as_me: failed program was:" >&5
18001   cat conftest.$ac_ext >&5
18002   # Broken: fails on valid input.
18003 continue
18004 fi
18005 rm -f conftest.err conftest.$ac_ext
18006
18007   # OK, works on sane cases.  Now check whether non-existent headers
18008   # can be detected and how.
18009   cat >conftest.$ac_ext <<_ACEOF
18010 #line 18010 "configure"
18011 #include "confdefs.h"
18012 #include <ac_nonexistent.h>
18013 _ACEOF
18014 if { (eval echo "$as_me:18014: \"$ac_cpp conftest.$ac_ext\"") >&5
18015   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18016   ac_status=$?
18017   egrep -v '^ *\+' conftest.er1 >conftest.err
18018   rm -f conftest.er1
18019   cat conftest.err >&5
18020   echo "$as_me:18020: \$? = $ac_status" >&5
18021   (exit $ac_status); } >/dev/null; then
18022   if test -s conftest.err; then
18023     ac_cpp_err=$ac_cxx_preproc_warn_flag
18024   else
18025     ac_cpp_err=
18026   fi
18027 else
18028   ac_cpp_err=yes
18029 fi
18030 if test -z "$ac_cpp_err"; then
18031   # Broken: success on invalid input.
18032 continue
18033 else
18034   echo "$as_me: failed program was:" >&5
18035   cat conftest.$ac_ext >&5
18036   # Passes both tests.
18037 ac_preproc_ok=:
18038 break
18039 fi
18040 rm -f conftest.err conftest.$ac_ext
18041
18042 done
18043 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18044 rm -f conftest.err conftest.$ac_ext
18045 if $ac_preproc_ok; then
18046   break
18047 fi
18048
18049     done
18050     ac_cv_prog_CXXCPP=$CXXCPP
18051
18052 fi
18053   CXXCPP=$ac_cv_prog_CXXCPP
18054 else
18055   ac_cv_prog_CXXCPP=$CXXCPP
18056 fi
18057 echo "$as_me:18057: result: $CXXCPP" >&5
18058 echo "${ECHO_T}$CXXCPP" >&6
18059 ac_preproc_ok=false
18060 for ac_cxx_preproc_warn_flag in '' yes
18061 do
18062   # Use a header file that comes with gcc, so configuring glibc
18063   # with a fresh cross-compiler works.
18064   # On the NeXT, cc -E runs the code through the compiler's parser,
18065   # not just through cpp. "Syntax error" is here to catch this case.
18066   cat >conftest.$ac_ext <<_ACEOF
18067 #line 18067 "configure"
18068 #include "confdefs.h"
18069 #include <assert.h>
18070                      Syntax error
18071 _ACEOF
18072 if { (eval echo "$as_me:18072: \"$ac_cpp conftest.$ac_ext\"") >&5
18073   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18074   ac_status=$?
18075   egrep -v '^ *\+' conftest.er1 >conftest.err
18076   rm -f conftest.er1
18077   cat conftest.err >&5
18078   echo "$as_me:18078: \$? = $ac_status" >&5
18079   (exit $ac_status); } >/dev/null; then
18080   if test -s conftest.err; then
18081     ac_cpp_err=$ac_cxx_preproc_warn_flag
18082   else
18083     ac_cpp_err=
18084   fi
18085 else
18086   ac_cpp_err=yes
18087 fi
18088 if test -z "$ac_cpp_err"; then
18089   :
18090 else
18091   echo "$as_me: failed program was:" >&5
18092   cat conftest.$ac_ext >&5
18093   # Broken: fails on valid input.
18094 continue
18095 fi
18096 rm -f conftest.err conftest.$ac_ext
18097
18098   # OK, works on sane cases.  Now check whether non-existent headers
18099   # can be detected and how.
18100   cat >conftest.$ac_ext <<_ACEOF
18101 #line 18101 "configure"
18102 #include "confdefs.h"
18103 #include <ac_nonexistent.h>
18104 _ACEOF
18105 if { (eval echo "$as_me:18105: \"$ac_cpp conftest.$ac_ext\"") >&5
18106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18107   ac_status=$?
18108   egrep -v '^ *\+' conftest.er1 >conftest.err
18109   rm -f conftest.er1
18110   cat conftest.err >&5
18111   echo "$as_me:18111: \$? = $ac_status" >&5
18112   (exit $ac_status); } >/dev/null; then
18113   if test -s conftest.err; then
18114     ac_cpp_err=$ac_cxx_preproc_warn_flag
18115   else
18116     ac_cpp_err=
18117   fi
18118 else
18119   ac_cpp_err=yes
18120 fi
18121 if test -z "$ac_cpp_err"; then
18122   # Broken: success on invalid input.
18123 continue
18124 else
18125   echo "$as_me: failed program was:" >&5
18126   cat conftest.$ac_ext >&5
18127   # Passes both tests.
18128 ac_preproc_ok=:
18129 break
18130 fi
18131 rm -f conftest.err conftest.$ac_ext
18132
18133 done
18134 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18135 rm -f conftest.err conftest.$ac_ext
18136 if $ac_preproc_ok; then
18137   :
18138 else
18139   { { echo "$as_me:18139: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18140 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18141    { (exit 1); exit 1; }; }
18142 fi
18143
18144 ac_ext=cc
18145 ac_cpp='$CXXCPP $CPPFLAGS'
18146 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18147 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18148 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18149 ac_main_return=return
18150
18151 for ac_header in typeinfo
18152 do
18153 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18154 echo "$as_me:18154: checking for $ac_header" >&5
18155 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18156 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18157   echo $ECHO_N "(cached) $ECHO_C" >&6
18158 else
18159   cat >conftest.$ac_ext <<_ACEOF
18160 #line 18160 "configure"
18161 #include "confdefs.h"
18162 #include <$ac_header>
18163 _ACEOF
18164 if { (eval echo "$as_me:18164: \"$ac_cpp conftest.$ac_ext\"") >&5
18165   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18166   ac_status=$?
18167   egrep -v '^ *\+' conftest.er1 >conftest.err
18168   rm -f conftest.er1
18169   cat conftest.err >&5
18170   echo "$as_me:18170: \$? = $ac_status" >&5
18171   (exit $ac_status); } >/dev/null; then
18172   if test -s conftest.err; then
18173     ac_cpp_err=$ac_cxx_preproc_warn_flag
18174   else
18175     ac_cpp_err=
18176   fi
18177 else
18178   ac_cpp_err=yes
18179 fi
18180 if test -z "$ac_cpp_err"; then
18181   eval "$as_ac_Header=yes"
18182 else
18183   echo "$as_me: failed program was:" >&5
18184   cat conftest.$ac_ext >&5
18185   eval "$as_ac_Header=no"
18186 fi
18187 rm -f conftest.err conftest.$ac_ext
18188 fi
18189 echo "$as_me:18189: result: `eval echo '${'$as_ac_Header'}'`" >&5
18190 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18191 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18192   cat >>confdefs.h <<EOF
18193 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18194 EOF
18195
18196 fi
18197 done
18198
18199 for ac_header in iostream
18200 do
18201 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18202 echo "$as_me:18202: checking for $ac_header" >&5
18203 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18204 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18205   echo $ECHO_N "(cached) $ECHO_C" >&6
18206 else
18207   cat >conftest.$ac_ext <<_ACEOF
18208 #line 18208 "configure"
18209 #include "confdefs.h"
18210 #include <$ac_header>
18211 _ACEOF
18212 if { (eval echo "$as_me:18212: \"$ac_cpp conftest.$ac_ext\"") >&5
18213   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18214   ac_status=$?
18215   egrep -v '^ *\+' conftest.er1 >conftest.err
18216   rm -f conftest.er1
18217   cat conftest.err >&5
18218   echo "$as_me:18218: \$? = $ac_status" >&5
18219   (exit $ac_status); } >/dev/null; then
18220   if test -s conftest.err; then
18221     ac_cpp_err=$ac_cxx_preproc_warn_flag
18222   else
18223     ac_cpp_err=
18224   fi
18225 else
18226   ac_cpp_err=yes
18227 fi
18228 if test -z "$ac_cpp_err"; then
18229   eval "$as_ac_Header=yes"
18230 else
18231   echo "$as_me: failed program was:" >&5
18232   cat conftest.$ac_ext >&5
18233   eval "$as_ac_Header=no"
18234 fi
18235 rm -f conftest.err conftest.$ac_ext
18236 fi
18237 echo "$as_me:18237: result: `eval echo '${'$as_ac_Header'}'`" >&5
18238 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18239 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18240   cat >>confdefs.h <<EOF
18241 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18242 EOF
18243
18244 fi
18245 done
18246
18247 if test x"$ac_cv_header_iostream" = xyes ; then
18248         echo "$as_me:18248: checking if iostream uses std-namespace" >&5
18249 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18250         cat >conftest.$ac_ext <<_ACEOF
18251 #line 18251 "configure"
18252 #include "confdefs.h"
18253
18254 #include <iostream>
18255 using std::endl;
18256 using std::cerr;
18257 int
18258 main ()
18259 {
18260
18261 cerr << "testing" << endl;
18262
18263   ;
18264   return 0;
18265 }
18266 _ACEOF
18267 rm -f conftest.$ac_objext
18268 if { (eval echo "$as_me:18268: \"$ac_compile\"") >&5
18269   (eval $ac_compile) 2>&5
18270   ac_status=$?
18271   echo "$as_me:18271: \$? = $ac_status" >&5
18272   (exit $ac_status); } &&
18273          { ac_try='test -s conftest.$ac_objext'
18274   { (eval echo "$as_me:18274: \"$ac_try\"") >&5
18275   (eval $ac_try) 2>&5
18276   ac_status=$?
18277   echo "$as_me:18277: \$? = $ac_status" >&5
18278   (exit $ac_status); }; }; then
18279   cf_iostream_namespace=yes
18280 else
18281   echo "$as_me: failed program was:" >&5
18282 cat conftest.$ac_ext >&5
18283 cf_iostream_namespace=no
18284 fi
18285 rm -f conftest.$ac_objext conftest.$ac_ext
18286         echo "$as_me:18286: result: $cf_iostream_namespace" >&5
18287 echo "${ECHO_T}$cf_iostream_namespace" >&6
18288         if test "$cf_iostream_namespace" = yes ; then
18289
18290 cat >>confdefs.h <<\EOF
18291 #define IOSTREAM_NAMESPACE 1
18292 EOF
18293
18294         fi
18295 fi
18296
18297 echo "$as_me:18297: checking if we should include stdbool.h" >&5
18298 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18299
18300 if test "${cf_cv_header_stdbool_h+set}" = set; then
18301   echo $ECHO_N "(cached) $ECHO_C" >&6
18302 else
18303
18304         cat >conftest.$ac_ext <<_ACEOF
18305 #line 18305 "configure"
18306 #include "confdefs.h"
18307
18308 int
18309 main ()
18310 {
18311 bool foo = false
18312   ;
18313   return 0;
18314 }
18315 _ACEOF
18316 rm -f conftest.$ac_objext
18317 if { (eval echo "$as_me:18317: \"$ac_compile\"") >&5
18318   (eval $ac_compile) 2>&5
18319   ac_status=$?
18320   echo "$as_me:18320: \$? = $ac_status" >&5
18321   (exit $ac_status); } &&
18322          { ac_try='test -s conftest.$ac_objext'
18323   { (eval echo "$as_me:18323: \"$ac_try\"") >&5
18324   (eval $ac_try) 2>&5
18325   ac_status=$?
18326   echo "$as_me:18326: \$? = $ac_status" >&5
18327   (exit $ac_status); }; }; then
18328   cf_cv_header_stdbool_h=0
18329 else
18330   echo "$as_me: failed program was:" >&5
18331 cat conftest.$ac_ext >&5
18332 cat >conftest.$ac_ext <<_ACEOF
18333 #line 18333 "configure"
18334 #include "confdefs.h"
18335
18336 #ifndef __BEOS__
18337 #include <stdbool.h>
18338 #endif
18339
18340 int
18341 main ()
18342 {
18343 bool foo = false
18344   ;
18345   return 0;
18346 }
18347 _ACEOF
18348 rm -f conftest.$ac_objext
18349 if { (eval echo "$as_me:18349: \"$ac_compile\"") >&5
18350   (eval $ac_compile) 2>&5
18351   ac_status=$?
18352   echo "$as_me:18352: \$? = $ac_status" >&5
18353   (exit $ac_status); } &&
18354          { ac_try='test -s conftest.$ac_objext'
18355   { (eval echo "$as_me:18355: \"$ac_try\"") >&5
18356   (eval $ac_try) 2>&5
18357   ac_status=$?
18358   echo "$as_me:18358: \$? = $ac_status" >&5
18359   (exit $ac_status); }; }; then
18360   cf_cv_header_stdbool_h=1
18361 else
18362   echo "$as_me: failed program was:" >&5
18363 cat conftest.$ac_ext >&5
18364 cf_cv_header_stdbool_h=0
18365 fi
18366 rm -f conftest.$ac_objext conftest.$ac_ext
18367 fi
18368 rm -f conftest.$ac_objext conftest.$ac_ext
18369 fi
18370
18371 if test "$cf_cv_header_stdbool_h" = 1
18372 then    echo "$as_me:18372: result: yes" >&5
18373 echo "${ECHO_T}yes" >&6
18374 else    echo "$as_me:18374: result: no" >&5
18375 echo "${ECHO_T}no" >&6
18376 fi
18377
18378 echo "$as_me:18378: checking for builtin bool type" >&5
18379 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18380
18381 if test "${cf_cv_builtin_bool+set}" = set; then
18382   echo $ECHO_N "(cached) $ECHO_C" >&6
18383 else
18384
18385         cat >conftest.$ac_ext <<_ACEOF
18386 #line 18386 "configure"
18387 #include "confdefs.h"
18388
18389 #include <stdio.h>
18390 #include <sys/types.h>
18391
18392 int
18393 main ()
18394 {
18395 bool x = false
18396   ;
18397   return 0;
18398 }
18399 _ACEOF
18400 rm -f conftest.$ac_objext
18401 if { (eval echo "$as_me:18401: \"$ac_compile\"") >&5
18402   (eval $ac_compile) 2>&5
18403   ac_status=$?
18404   echo "$as_me:18404: \$? = $ac_status" >&5
18405   (exit $ac_status); } &&
18406          { ac_try='test -s conftest.$ac_objext'
18407   { (eval echo "$as_me:18407: \"$ac_try\"") >&5
18408   (eval $ac_try) 2>&5
18409   ac_status=$?
18410   echo "$as_me:18410: \$? = $ac_status" >&5
18411   (exit $ac_status); }; }; then
18412   cf_cv_builtin_bool=1
18413 else
18414   echo "$as_me: failed program was:" >&5
18415 cat conftest.$ac_ext >&5
18416 cf_cv_builtin_bool=0
18417 fi
18418 rm -f conftest.$ac_objext conftest.$ac_ext
18419
18420 fi
18421
18422 if test "$cf_cv_builtin_bool" = 1
18423 then    echo "$as_me:18423: result: yes" >&5
18424 echo "${ECHO_T}yes" >&6
18425 else    echo "$as_me:18425: result: no" >&5
18426 echo "${ECHO_T}no" >&6
18427 fi
18428
18429 echo "$as_me:18429: checking for size of bool" >&5
18430 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18431 if test "${cf_cv_type_of_bool+set}" = set; then
18432   echo $ECHO_N "(cached) $ECHO_C" >&6
18433 else
18434
18435         rm -f cf_test.out
18436         if test "$cross_compiling" = yes; then
18437   cf_cv_type_of_bool=unknown
18438 else
18439   cat >conftest.$ac_ext <<_ACEOF
18440 #line 18440 "configure"
18441 #include "confdefs.h"
18442
18443 #include <stdlib.h>
18444 #include <stdio.h>
18445
18446 #if defined(__cplusplus)
18447
18448 #ifdef HAVE_GXX_BUILTIN_H
18449 #include <g++/builtin.h>
18450 #elif HAVE_GPP_BUILTIN_H
18451 #include <gpp/builtin.h>
18452 #elif HAVE_BUILTIN_H
18453 #include <builtin.h>
18454 #endif
18455
18456 #else
18457
18458 #if $cf_cv_header_stdbool_h
18459 #include <stdbool.h>
18460 #endif
18461
18462 #endif
18463
18464 main()
18465 {
18466         FILE *fp = fopen("cf_test.out", "w");
18467         if (fp != 0) {
18468                 bool x = true;
18469                 if ((bool)(-x) >= 0)
18470                         fputs("unsigned ", fp);
18471                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18472                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18473                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18474                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18475                 fclose(fp);
18476         }
18477         ${cf_cv_main_return:-return}(0);
18478 }
18479
18480 _ACEOF
18481 rm -f conftest$ac_exeext
18482 if { (eval echo "$as_me:18482: \"$ac_link\"") >&5
18483   (eval $ac_link) 2>&5
18484   ac_status=$?
18485   echo "$as_me:18485: \$? = $ac_status" >&5
18486   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18487   { (eval echo "$as_me:18487: \"$ac_try\"") >&5
18488   (eval $ac_try) 2>&5
18489   ac_status=$?
18490   echo "$as_me:18490: \$? = $ac_status" >&5
18491   (exit $ac_status); }; }; then
18492   cf_cv_type_of_bool=`cat cf_test.out`
18493                  if test -z "$cf_cv_type_of_bool"; then
18494                    cf_cv_type_of_bool=unknown
18495                  fi
18496 else
18497   echo "$as_me: program exited with status $ac_status" >&5
18498 echo "$as_me: failed program was:" >&5
18499 cat conftest.$ac_ext >&5
18500 cf_cv_type_of_bool=unknown
18501 fi
18502 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18503 fi
18504
18505 fi
18506
18507         rm -f cf_test.out
18508 echo "$as_me:18508: result: $cf_cv_type_of_bool" >&5
18509 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18510 if test "$cf_cv_type_of_bool" = unknown ; then
18511         case .$NCURSES_BOOL in #(vi
18512         .auto|.) NCURSES_BOOL=unsigned;;
18513         esac
18514         { echo "$as_me:18514: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18515 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18516         cf_cv_type_of_bool=$NCURSES_BOOL
18517 fi
18518
18519 echo "$as_me:18519: checking for special defines needed for etip.h" >&5
18520 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18521 cf_save_CXXFLAGS="$CXXFLAGS"
18522 cf_result="none"
18523
18524 # etip.h includes ncurses.h which includes ncurses_dll.h
18525 # But ncurses_dll.h is generated - fix here.
18526 test -d include || mkdir include
18527 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
18528
18529 for cf_math in "" MATH_H
18530 do
18531 for cf_excp in "" MATH_EXCEPTION
18532 do
18533         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18534         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18535         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18536 cat >conftest.$ac_ext <<_ACEOF
18537 #line 18537 "configure"
18538 #include "confdefs.h"
18539
18540 #include <etip.h.in>
18541
18542 int
18543 main ()
18544 {
18545
18546   ;
18547   return 0;
18548 }
18549 _ACEOF
18550 rm -f conftest.$ac_objext
18551 if { (eval echo "$as_me:18551: \"$ac_compile\"") >&5
18552   (eval $ac_compile) 2>&5
18553   ac_status=$?
18554   echo "$as_me:18554: \$? = $ac_status" >&5
18555   (exit $ac_status); } &&
18556          { ac_try='test -s conftest.$ac_objext'
18557   { (eval echo "$as_me:18557: \"$ac_try\"") >&5
18558   (eval $ac_try) 2>&5
18559   ac_status=$?
18560   echo "$as_me:18560: \$? = $ac_status" >&5
18561   (exit $ac_status); }; }; then
18562
18563         test -n "$cf_math" && cat >>confdefs.h <<EOF
18564 #define ETIP_NEEDS_${cf_math} 1
18565 EOF
18566
18567         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18568 #define ETIP_NEEDS_${cf_excp} 1
18569 EOF
18570
18571         cf_result="$cf_math $cf_excp"
18572         break 2
18573
18574 else
18575   echo "$as_me: failed program was:" >&5
18576 cat conftest.$ac_ext >&5
18577 fi
18578 rm -f conftest.$ac_objext conftest.$ac_ext
18579 done
18580 done
18581 echo "$as_me:18581: result: $cf_result" >&5
18582 echo "${ECHO_T}$cf_result" >&6
18583 CXXFLAGS="$cf_save_CXXFLAGS"
18584
18585 if test -n "$CXX"; then
18586 echo "$as_me:18586: checking if $CXX accepts parameter initialization" >&5
18587 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18588 if test "${cf_cv_cpp_param_init+set}" = set; then
18589   echo $ECHO_N "(cached) $ECHO_C" >&6
18590 else
18591
18592         ac_ext=cc
18593 ac_cpp='$CXXCPP $CPPFLAGS'
18594 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18595 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18596 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18597 ac_main_return=return
18598
18599         if test "$cross_compiling" = yes; then
18600   cf_cv_cpp_param_init=unknown
18601 else
18602   cat >conftest.$ac_ext <<_ACEOF
18603 #line 18603 "configure"
18604 #include "confdefs.h"
18605
18606 class TEST {
18607 private:
18608         int value;
18609 public:
18610         TEST(int x = 1);
18611         ~TEST();
18612 };
18613
18614 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18615 {
18616         value = x;
18617 }
18618 int main() { }
18619
18620 _ACEOF
18621 rm -f conftest$ac_exeext
18622 if { (eval echo "$as_me:18622: \"$ac_link\"") >&5
18623   (eval $ac_link) 2>&5
18624   ac_status=$?
18625   echo "$as_me:18625: \$? = $ac_status" >&5
18626   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18627   { (eval echo "$as_me:18627: \"$ac_try\"") >&5
18628   (eval $ac_try) 2>&5
18629   ac_status=$?
18630   echo "$as_me:18630: \$? = $ac_status" >&5
18631   (exit $ac_status); }; }; then
18632   cf_cv_cpp_param_init=yes
18633 else
18634   echo "$as_me: program exited with status $ac_status" >&5
18635 echo "$as_me: failed program was:" >&5
18636 cat conftest.$ac_ext >&5
18637 cf_cv_cpp_param_init=no
18638 fi
18639 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18640 fi
18641         ac_ext=cc
18642 ac_cpp='$CXXCPP $CPPFLAGS'
18643 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18644 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18645 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18646 ac_main_return=return
18647
18648 fi
18649 echo "$as_me:18649: result: $cf_cv_cpp_param_init" >&5
18650 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18651 fi
18652 test "$cf_cv_cpp_param_init" = yes &&
18653 cat >>confdefs.h <<\EOF
18654 #define CPP_HAS_PARAM_INIT 1
18655 EOF
18656
18657 if test -n "$CXX"; then
18658
18659 echo "$as_me:18659: checking if $CXX accepts static_cast" >&5
18660 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18661 if test "${cf_cv_cpp_static_cast+set}" = set; then
18662   echo $ECHO_N "(cached) $ECHO_C" >&6
18663 else
18664
18665         ac_ext=cc
18666 ac_cpp='$CXXCPP $CPPFLAGS'
18667 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18668 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18669 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18670 ac_main_return=return
18671
18672         cat >conftest.$ac_ext <<_ACEOF
18673 #line 18673 "configure"
18674 #include "confdefs.h"
18675
18676 class NCursesPanel
18677 {
18678 public:
18679   NCursesPanel(int nlines,
18680                int ncols,
18681                int begin_y = 0,
18682                int begin_x = 0)
18683   {
18684   }
18685
18686   ~NCursesPanel();
18687 };
18688
18689 template<class T> class NCursesUserPanel : public NCursesPanel
18690 {
18691 public:
18692   NCursesUserPanel (int nlines,
18693                     int ncols,
18694                     int begin_y = 0,
18695                     int begin_x = 0,
18696                     const T* p_UserData = static_cast<T*>(0))
18697     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18698   {
18699   };
18700   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18701   {
18702   };
18703
18704   virtual ~NCursesUserPanel() {};
18705 };
18706
18707 int
18708 main ()
18709 {
18710
18711         const char* p_UserData = static_cast<char*>(0)
18712   ;
18713   return 0;
18714 }
18715 _ACEOF
18716 rm -f conftest.$ac_objext
18717 if { (eval echo "$as_me:18717: \"$ac_compile\"") >&5
18718   (eval $ac_compile) 2>&5
18719   ac_status=$?
18720   echo "$as_me:18720: \$? = $ac_status" >&5
18721   (exit $ac_status); } &&
18722          { ac_try='test -s conftest.$ac_objext'
18723   { (eval echo "$as_me:18723: \"$ac_try\"") >&5
18724   (eval $ac_try) 2>&5
18725   ac_status=$?
18726   echo "$as_me:18726: \$? = $ac_status" >&5
18727   (exit $ac_status); }; }; then
18728   cf_cv_cpp_static_cast=yes
18729 else
18730   echo "$as_me: failed program was:" >&5
18731 cat conftest.$ac_ext >&5
18732 cf_cv_cpp_static_cast=no
18733 fi
18734 rm -f conftest.$ac_objext conftest.$ac_ext
18735
18736         ac_ext=cc
18737 ac_cpp='$CXXCPP $CPPFLAGS'
18738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18739 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18741 ac_main_return=return
18742
18743 fi
18744 echo "$as_me:18744: result: $cf_cv_cpp_static_cast" >&5
18745 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18746
18747 fi
18748
18749 test "$cf_cv_cpp_static_cast" = yes &&
18750 cat >>confdefs.h <<\EOF
18751 #define CPP_HAS_STATIC_CAST 1
18752 EOF
18753
18754         CXX_AR='$(AR)'
18755         CXX_ARFLAGS='$(ARFLAGS)'
18756         case $cf_cv_system_name in #(vi
18757         irix*) #(vi
18758             if test "$GXX" != yes ; then
18759                 CXX_AR='$(CXX)'
18760                 CXX_ARFLAGS='-ar -o'
18761             fi
18762             ;;
18763         sco3.2v5*) #(vi
18764             CXXLDFLAGS="-u main"
18765             ;;
18766         solaris2*)
18767             if test "$GXX" != yes ; then
18768                 CXX_AR='$(CXX)'
18769                 CXX_ARFLAGS='-xar -o'
18770             fi
18771             ;;
18772         esac
18773
18774 else
18775         cf_cxx_library=no
18776         cf_cv_builtin_bool=1
18777
18778         # Just because we are not configuring against C++ right now does not
18779         # mean that a user will not want to use C++.  Some distributors disable
18780         # the C++ portion of this configuration as a shortcut (or just to avoid
18781         # compiling the demo in the c++ directory).  So we need a reasonable
18782         # default for the 'bool' type.
18783         #
18784         # Caveat: since the storage of the bool type is not standardized, it
18785         # may change.
18786
18787         if test "$NCURSES_BOOL" != auto ; then
18788                 cf_cv_type_of_bool=$NCURSES_BOOL
18789                 cf_cv_header_stdbool_h=0
18790         else
18791                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18792
18793 echo "$as_me:18793: checking for size of bool" >&5
18794 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18795 if test "${cf_cv_type_of_bool+set}" = set; then
18796   echo $ECHO_N "(cached) $ECHO_C" >&6
18797 else
18798
18799         rm -f cf_test.out
18800         if test "$cross_compiling" = yes; then
18801   cf_cv_type_of_bool=unknown
18802 else
18803   cat >conftest.$ac_ext <<_ACEOF
18804 #line 18804 "configure"
18805 #include "confdefs.h"
18806
18807 #include <stdlib.h>
18808 #include <stdio.h>
18809
18810 #if defined(__cplusplus)
18811
18812 #ifdef HAVE_GXX_BUILTIN_H
18813 #include <g++/builtin.h>
18814 #elif HAVE_GPP_BUILTIN_H
18815 #include <gpp/builtin.h>
18816 #elif HAVE_BUILTIN_H
18817 #include <builtin.h>
18818 #endif
18819
18820 #else
18821
18822 #if $cf_cv_header_stdbool_h
18823 #include <stdbool.h>
18824 #endif
18825
18826 #endif
18827
18828 main()
18829 {
18830         FILE *fp = fopen("cf_test.out", "w");
18831         if (fp != 0) {
18832                 bool x = true;
18833                 if ((bool)(-x) >= 0)
18834                         fputs("unsigned ", fp);
18835                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18836                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18837                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18838                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18839                 fclose(fp);
18840         }
18841         ${cf_cv_main_return:-return}(0);
18842 }
18843
18844 _ACEOF
18845 rm -f conftest$ac_exeext
18846 if { (eval echo "$as_me:18846: \"$ac_link\"") >&5
18847   (eval $ac_link) 2>&5
18848   ac_status=$?
18849   echo "$as_me:18849: \$? = $ac_status" >&5
18850   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18851   { (eval echo "$as_me:18851: \"$ac_try\"") >&5
18852   (eval $ac_try) 2>&5
18853   ac_status=$?
18854   echo "$as_me:18854: \$? = $ac_status" >&5
18855   (exit $ac_status); }; }; then
18856   cf_cv_type_of_bool=`cat cf_test.out`
18857                  if test -z "$cf_cv_type_of_bool"; then
18858                    cf_cv_type_of_bool=unknown
18859                  fi
18860 else
18861   echo "$as_me: program exited with status $ac_status" >&5
18862 echo "$as_me: failed program was:" >&5
18863 cat conftest.$ac_ext >&5
18864 cf_cv_type_of_bool=unknown
18865 fi
18866 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18867 fi
18868
18869 fi
18870
18871         rm -f cf_test.out
18872 echo "$as_me:18872: result: $cf_cv_type_of_bool" >&5
18873 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18874 if test "$cf_cv_type_of_bool" = unknown ; then
18875         case .$NCURSES_BOOL in #(vi
18876         .auto|.) NCURSES_BOOL=unsigned;;
18877         esac
18878         { echo "$as_me:18878: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18879 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18880         cf_cv_type_of_bool=$NCURSES_BOOL
18881 fi
18882
18883                 else
18884                         echo "$as_me:18884: checking for fallback type of bool" >&5
18885 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
18886                         case "$host_cpu" in #(vi
18887                         i?86)   cf_cv_type_of_bool=char ;; #(vi
18888                         *)      cf_cv_type_of_bool=int  ;;
18889                         esac
18890                         echo "$as_me:18890: result: $cf_cv_type_of_bool" >&5
18891 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18892                 fi
18893         fi
18894 fi
18895
18896 # If the C compiler did not declare bool, and we did not determine that the C++
18897 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18898 # ncurses library use the same type as C++ bool.  Note that this allows one to
18899 # specify the type of bool in a configure-script option and postpone
18900 # integration with the C++ compiler provided that the types are compatible.
18901 USE_CXX_BOOL=1
18902 if test $cf_cv_cc_bool_type = 1
18903 then
18904         # oops: C has a bool.  Unlikely, but C++ could differ.
18905         USE_CXX_BOOL=0
18906 elif test $cf_cv_builtin_bool = 0
18907 then
18908         # C++ has no bool
18909         USE_CXX_BOOL=0
18910 else
18911         # this is the normal case
18912         USE_CXX_BOOL='defined(__cplusplus)'
18913 fi
18914
18915 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18916
18917         if test "$cf_with_ada" != "no" ; then
18918                 if test "$with_libtool" != "no"; then
18919                         { echo "$as_me:18919: WARNING: libtool does not support Ada - disabling feature" >&5
18920 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18921                         cf_with_ada=no
18922                 fi
18923         fi
18924
18925         if test "$cf_with_ada" != "no" ; then
18926
18927 cf_ada_make=gnatmake
18928 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18929 set dummy $cf_ada_make; ac_word=$2
18930 echo "$as_me:18930: checking for $ac_word" >&5
18931 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18932 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18933   echo $ECHO_N "(cached) $ECHO_C" >&6
18934 else
18935   if test -n "$gnat_exists"; then
18936   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18937 else
18938   ac_save_IFS=$IFS; IFS=$ac_path_separator
18939 ac_dummy="$PATH"
18940 for ac_dir in $ac_dummy; do
18941   IFS=$ac_save_IFS
18942   test -z "$ac_dir" && ac_dir=.
18943   $as_executable_p "$ac_dir/$ac_word" || continue
18944 ac_cv_prog_gnat_exists="yes"
18945 echo "$as_me:18945: found $ac_dir/$ac_word" >&5
18946 break
18947 done
18948
18949   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18950 fi
18951 fi
18952 gnat_exists=$ac_cv_prog_gnat_exists
18953 if test -n "$gnat_exists"; then
18954   echo "$as_me:18954: result: $gnat_exists" >&5
18955 echo "${ECHO_T}$gnat_exists" >&6
18956 else
18957   echo "$as_me:18957: result: no" >&5
18958 echo "${ECHO_T}no" >&6
18959 fi
18960
18961 if test "$ac_cv_prog_gnat_exists" = no; then
18962    cf_ada_make=
18963    cf_cv_prog_gnat_correct=no
18964 else
18965
18966 echo "$as_me:18966: checking for gnat version" >&5
18967 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18968 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18969         grep '[0-9].[0-9][0-9]*' |\
18970     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18971 echo "$as_me:18971: result: $cf_gnat_version" >&5
18972 echo "${ECHO_T}$cf_gnat_version" >&6
18973
18974 case $cf_gnat_version in #(vi
18975 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
18976         cf_cv_prog_gnat_correct=yes
18977         ;;
18978 *)
18979         { echo "$as_me:18979: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18980 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18981         cf_cv_prog_gnat_correct=no
18982         ;;
18983 esac
18984
18985    # Extract the first word of "m4", so it can be a program name with args.
18986 set dummy m4; ac_word=$2
18987 echo "$as_me:18987: checking for $ac_word" >&5
18988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18989 if test "${ac_cv_prog_M4_exists+set}" = set; then
18990   echo $ECHO_N "(cached) $ECHO_C" >&6
18991 else
18992   if test -n "$M4_exists"; then
18993   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18994 else
18995   ac_save_IFS=$IFS; IFS=$ac_path_separator
18996 ac_dummy="$PATH"
18997 for ac_dir in $ac_dummy; do
18998   IFS=$ac_save_IFS
18999   test -z "$ac_dir" && ac_dir=.
19000   $as_executable_p "$ac_dir/$ac_word" || continue
19001 ac_cv_prog_M4_exists="yes"
19002 echo "$as_me:19002: found $ac_dir/$ac_word" >&5
19003 break
19004 done
19005
19006   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19007 fi
19008 fi
19009 M4_exists=$ac_cv_prog_M4_exists
19010 if test -n "$M4_exists"; then
19011   echo "$as_me:19011: result: $M4_exists" >&5
19012 echo "${ECHO_T}$M4_exists" >&6
19013 else
19014   echo "$as_me:19014: result: no" >&5
19015 echo "${ECHO_T}no" >&6
19016 fi
19017
19018    if test "$ac_cv_prog_M4_exists" = no; then
19019       cf_cv_prog_gnat_correct=no
19020       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19021    fi
19022    if test "$cf_cv_prog_gnat_correct" = yes; then
19023       echo "$as_me:19023: checking if GNAT works" >&5
19024 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19025
19026 rm -rf conftest* *~conftest*
19027 cat >>conftest.ads <<CF_EOF
19028 procedure conftest;
19029 CF_EOF
19030 cat >>conftest.adb <<CF_EOF
19031 with Text_IO;
19032 with GNAT.OS_Lib;
19033 procedure conftest is
19034 begin
19035    Text_IO.Put ("Hello World");
19036    Text_IO.New_Line;
19037    GNAT.OS_Lib.OS_Exit (0);
19038 end conftest;
19039 CF_EOF
19040 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19041    if ( ./conftest 1>&5 2>&1 ) ; then
19042       cf_cv_prog_gnat_correct=yes
19043    else
19044       cf_cv_prog_gnat_correct=no
19045    fi
19046 else
19047    cf_cv_prog_gnat_correct=no
19048 fi
19049 rm -rf conftest* *~conftest*
19050
19051       echo "$as_me:19051: result: $cf_cv_prog_gnat_correct" >&5
19052 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19053    fi
19054 fi
19055
19056                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19057
19058         ADAFLAGS="$ADAFLAGS -gnatpn"
19059
19060         echo "$as_me:19060: checking optimization options for ADAFLAGS" >&5
19061 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19062         case "$CFLAGS" in
19063         *-g*)
19064
19065         ADAFLAGS="$ADAFLAGS -g"
19066
19067                 ;;
19068         esac
19069         case "$CFLAGS" in
19070         *-O*)
19071                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19072
19073         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19074
19075                 ;;
19076         esac
19077         echo "$as_me:19077: result: $ADAFLAGS" >&5
19078 echo "${ECHO_T}$ADAFLAGS" >&6
19079
19080 echo "$as_me:19080: checking if GNAT supports generics" >&5
19081 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19082 case $cf_gnat_version in #(vi
19083 3.[1-9]*|[4-9].*) #(vi
19084         cf_gnat_generics=yes
19085         ;;
19086 *)
19087         cf_gnat_generics=no
19088         ;;
19089 esac
19090 echo "$as_me:19090: result: $cf_gnat_generics" >&5
19091 echo "${ECHO_T}$cf_gnat_generics" >&6
19092
19093 if test "$cf_gnat_generics" = yes
19094 then
19095         cf_compile_generics=generics
19096         cf_generic_objects="\${GENOBJS}"
19097 else
19098         cf_compile_generics=
19099         cf_generic_objects=
19100 fi
19101
19102 echo "$as_me:19102: checking if GNAT supports SIGINT" >&5
19103 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19104 if test "${cf_cv_gnat_sigint+set}" = set; then
19105   echo $ECHO_N "(cached) $ECHO_C" >&6
19106 else
19107
19108 rm -rf conftest* *~conftest*
19109 cat >>conftest.ads <<CF_EOF
19110 with Ada.Interrupts.Names;
19111
19112 package ConfTest is
19113
19114    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19115    pragma Unreserve_All_Interrupts;
19116    pragma Warnings (On);
19117
19118    protected Process is
19119       procedure Stop;
19120       function Continue return Boolean;
19121       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19122    private
19123       Done : Boolean := False;
19124    end Process;
19125
19126 end ConfTest;
19127 CF_EOF
19128 cat >>conftest.adb <<CF_EOF
19129 package body ConfTest is
19130    protected body Process is
19131       procedure Stop is
19132       begin
19133          Done := True;
19134       end Stop;
19135       function Continue return Boolean is
19136       begin
19137          return not Done;
19138       end Continue;
19139    end Process;
19140 end ConfTest;
19141 CF_EOF
19142 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19143       cf_cv_gnat_sigint=yes
19144 else
19145    cf_cv_gnat_sigint=no
19146 fi
19147 rm -rf conftest* *~conftest*
19148
19149 fi
19150 echo "$as_me:19150: result: $cf_cv_gnat_sigint" >&5
19151 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19152
19153 if test $cf_cv_gnat_sigint = yes ; then
19154         USE_GNAT_SIGINT=""
19155 else
19156         USE_GNAT_SIGINT="#"
19157 fi
19158
19159 echo "$as_me:19159: checking if GNAT pragma Unreferenced works" >&5
19160 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19161 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19162   echo $ECHO_N "(cached) $ECHO_C" >&6
19163 else
19164
19165 rm -rf conftest* *~conftest*
19166 cat >>conftest.ads <<CF_EOF
19167 procedure conftest;
19168 CF_EOF
19169 cat >>conftest.adb <<CF_EOF
19170 with Text_IO;
19171 with GNAT.OS_Lib;
19172 procedure conftest is
19173    test : Integer;
19174    pragma Unreferenced (test);
19175 begin
19176    test := 1;
19177    Text_IO.Put ("Hello World");
19178    Text_IO.New_Line;
19179    GNAT.OS_Lib.OS_Exit (0);
19180 end conftest;
19181 CF_EOF
19182 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19183       cf_cv_pragma_unreferenced=yes
19184 else
19185    cf_cv_pragma_unreferenced=no
19186 fi
19187 rm -rf conftest* *~conftest*
19188
19189 fi
19190 echo "$as_me:19190: result: $cf_cv_pragma_unreferenced" >&5
19191 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19192
19193 # if the pragma is supported, use it (needed in the Trace code).
19194 if test $cf_cv_pragma_unreferenced = yes ; then
19195         PRAGMA_UNREF=TRUE
19196 else
19197         PRAGMA_UNREF=FALSE
19198 fi
19199
19200 cf_gnat_libraries=no
19201 cf_gnat_projects=no
19202
19203 echo "$as_me:19203: checking if GNAT supports project files" >&5
19204 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19205 case $cf_gnat_version in #(vi
19206 3.[0-9]*) #(vi
19207         ;;
19208 *)
19209         case $cf_cv_system_name in #(vi
19210         cygwin*) #(vi
19211                 ;;
19212         *)
19213                 mkdir conftest.src conftest.bin conftest.lib
19214                 cd conftest.src
19215                 rm -rf conftest* *~conftest*
19216                 cat >>library.gpr <<CF_EOF
19217 project Library is
19218   Kind := External ("LIB_KIND");
19219   for Library_Name use "ConfTest";
19220   for Object_Dir use ".";
19221   for Library_ALI_Dir use External("LIBRARY_DIR");
19222   for Library_Version use External ("SONAME");
19223   for Library_Kind use Kind;
19224   for Library_Dir use External("BUILD_DIR");
19225   Source_Dir := External ("SOURCE_DIR");
19226   for Source_Dirs use (Source_Dir);
19227   package Compiler is
19228      for Default_Switches ("Ada") use
19229        ("-g",
19230         "-O2",
19231         "-gnatafno",
19232         "-gnatVa",   -- All validity checks
19233         "-gnatwa");  -- Activate all optional errors
19234   end Compiler;
19235 end Library;
19236 CF_EOF
19237                 cat >>confpackage.ads <<CF_EOF
19238 package ConfPackage is
19239    procedure conftest;
19240 end ConfPackage;
19241 CF_EOF
19242                 cat >>confpackage.adb <<CF_EOF
19243 with Text_IO;
19244 package body ConfPackage is
19245    procedure conftest is
19246    begin
19247       Text_IO.Put ("Hello World");
19248       Text_IO.New_Line;
19249    end conftest;
19250 end ConfPackage;
19251 CF_EOF
19252                 if ( $cf_ada_make $ADAFLAGS \
19253                                 -Plibrary.gpr \
19254                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19255                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19256                                 -XSOURCE_DIR=`pwd` \
19257                                 -XSONAME=libConfTest.so.1 \
19258                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19259                         cf_gnat_projects=yes
19260                 fi
19261                 cd ..
19262                 if test -f conftest.lib/confpackage.ali
19263                 then
19264                         cf_gnat_libraries=yes
19265                 fi
19266                 rm -rf conftest* *~conftest*
19267                 ;;
19268         esac
19269         ;;
19270 esac
19271 echo "$as_me:19271: result: $cf_gnat_projects" >&5
19272 echo "${ECHO_T}$cf_gnat_projects" >&6
19273
19274 if test $cf_gnat_projects = yes
19275 then
19276         echo "$as_me:19276: checking if GNAT supports libraries" >&5
19277 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19278         echo "$as_me:19278: result: $cf_gnat_libraries" >&5
19279 echo "${ECHO_T}$cf_gnat_libraries" >&6
19280 fi
19281
19282 if test "$cf_gnat_projects" = yes
19283 then
19284         USE_OLD_MAKERULES="#"
19285         USE_GNAT_PROJECTS=""
19286 else
19287         USE_OLD_MAKERULES=""
19288         USE_GNAT_PROJECTS="#"
19289 fi
19290
19291 if test "$cf_gnat_libraries" = yes
19292 then
19293         USE_GNAT_LIBRARIES=""
19294 else
19295         USE_GNAT_LIBRARIES="#"
19296 fi
19297
19298 echo "$as_me:19298: checking for ada-compiler" >&5
19299 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19300
19301 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19302 if test "${with_ada_compiler+set}" = set; then
19303   withval="$with_ada_compiler"
19304   cf_ada_compiler=$withval
19305 else
19306   cf_ada_compiler=gnatmake
19307 fi;
19308
19309 echo "$as_me:19309: result: $cf_ada_compiler" >&5
19310 echo "${ECHO_T}$cf_ada_compiler" >&6
19311
19312                         cf_ada_package=terminal_interface
19313
19314 echo "$as_me:19314: checking for ada-include" >&5
19315 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19316
19317 # Check whether --with-ada-include or --without-ada-include was given.
19318 if test "${with_ada_include+set}" = set; then
19319   withval="$with_ada_include"
19320
19321 else
19322   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19323 fi; if test -n "$prefix/share/ada/adainclude" ; then
19324
19325 if test "x$prefix" != xNONE; then
19326   cf_path_syntax="$prefix"
19327 else
19328   cf_path_syntax="$ac_default_prefix"
19329 fi
19330
19331 case ".$withval" in #(vi
19332 .\$\(*\)*|.\'*\'*) #(vi
19333   ;;
19334 ..|./*|.\\*) #(vi
19335   ;;
19336 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19337   ;;
19338 .\${*prefix}*|.\${*dir}*) #(vi
19339   eval withval="$withval"
19340   case ".$withval" in #(vi
19341   .NONE/*)
19342     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19343     ;;
19344   esac
19345   ;; #(vi
19346 .no|.NONE/*)
19347   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19348   ;;
19349 *)
19350   { { echo "$as_me:19350: error: expected a pathname, not \"$withval\"" >&5
19351 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19352    { (exit 1); exit 1; }; }
19353   ;;
19354 esac
19355
19356 fi
19357 eval ADA_INCLUDE="$withval"
19358
19359 echo "$as_me:19359: result: $ADA_INCLUDE" >&5
19360 echo "${ECHO_T}$ADA_INCLUDE" >&6
19361
19362 echo "$as_me:19362: checking for ada-objects" >&5
19363 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19364
19365 # Check whether --with-ada-objects or --without-ada-objects was given.
19366 if test "${with_ada_objects+set}" = set; then
19367   withval="$with_ada_objects"
19368
19369 else
19370   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19371 fi; if test -n "$prefix/lib/ada/adalib" ; then
19372
19373 if test "x$prefix" != xNONE; then
19374   cf_path_syntax="$prefix"
19375 else
19376   cf_path_syntax="$ac_default_prefix"
19377 fi
19378
19379 case ".$withval" in #(vi
19380 .\$\(*\)*|.\'*\'*) #(vi
19381   ;;
19382 ..|./*|.\\*) #(vi
19383   ;;
19384 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19385   ;;
19386 .\${*prefix}*|.\${*dir}*) #(vi
19387   eval withval="$withval"
19388   case ".$withval" in #(vi
19389   .NONE/*)
19390     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19391     ;;
19392   esac
19393   ;; #(vi
19394 .no|.NONE/*)
19395   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19396   ;;
19397 *)
19398   { { echo "$as_me:19398: error: expected a pathname, not \"$withval\"" >&5
19399 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19400    { (exit 1); exit 1; }; }
19401   ;;
19402 esac
19403
19404 fi
19405 eval ADA_OBJECTS="$withval"
19406
19407 echo "$as_me:19407: result: $ADA_OBJECTS" >&5
19408 echo "${ECHO_T}$ADA_OBJECTS" >&6
19409
19410 echo "$as_me:19410: checking if an Ada95 shared-library should be built" >&5
19411 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19412
19413 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19414 if test "${with_ada_sharedlib+set}" = set; then
19415   withval="$with_ada_sharedlib"
19416   with_ada_sharedlib=$withval
19417 else
19418   with_ada_sharedlib=no
19419 fi;
19420 echo "$as_me:19420: result: $with_ada_sharedlib" >&5
19421 echo "${ECHO_T}$with_ada_sharedlib" >&6
19422
19423 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19424 MAKE_ADA_SHAREDLIB="#"
19425
19426 if test "x$with_ada_sharedlib" != xno
19427 then
19428         MAKE_ADA_SHAREDLIB=
19429         if test "x$with_ada_sharedlib" != xyes
19430         then
19431                 ADA_SHAREDLIB="$with_ada_sharedlib"
19432         fi
19433 fi
19434
19435                 fi
19436         fi
19437 else
19438         cf_with_ada=no
19439 fi
19440
19441 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19442 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19443 ###
19444 ### ticlib modules may be a separate library, otherwise contained in termlib.
19445 ### termlib modules may be a separate library, otherwise contained in ncurses.
19446 ###
19447 ### The of "+" or " " between the tokens controls the way the script
19448 ### chooses to split module lists into libraries.
19449 ###
19450 ### (see CF_LIB_RULES).
19451 echo "$as_me:19451: checking for library subsets" >&5
19452 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19453 LIB_SUBSETS=
19454
19455 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19456         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19457         if test "$with_ticlib" != no ; then
19458                 LIB_SUBSETS="${LIB_SUBSETS} "
19459         else
19460                 LIB_SUBSETS="${LIB_SUBSETS}+"
19461         fi
19462 fi
19463
19464 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19465 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19466
19467 if test "$with_termlib" != no ; then
19468         LIB_SUBSETS="${LIB_SUBSETS} "
19469 else
19470         LIB_SUBSETS="${LIB_SUBSETS}+"
19471 fi
19472
19473 LIB_SUBSETS="${LIB_SUBSETS}base"
19474
19475 # Most term-driver calls are to tinfo, but some like init_pair are to the
19476 # base library (so it resides in base).
19477 if test "$with_term_driver" != no ; then
19478         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19479         case $cf_cv_system_name in #(vi
19480         *mingw32*) #(vi
19481                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19482                 ;;
19483         *) #(vi
19484                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19485                 ;;
19486         esac
19487 fi
19488
19489 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19490 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19491
19492 echo "$as_me:19492: result: $LIB_SUBSETS" >&5
19493 echo "${ECHO_T}$LIB_SUBSETS" >&6
19494
19495 ### Construct the list of include-directories to be generated
19496
19497 if test "$GCC" != yes; then
19498         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19499 elif test "$includedir" != "/usr/include"; then
19500         if test "$includedir" = '${prefix}/include' ; then
19501                 if test $prefix != /usr ; then
19502                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19503                 fi
19504         else
19505                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
19506         fi
19507 fi
19508 if test "$srcdir" != "."; then
19509         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
19510 fi
19511 CPPFLAGS="-I. -I../include $CPPFLAGS"
19512
19513 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19514 if test "$srcdir" != "."; then
19515         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19516 fi
19517 if test "$GCC" != yes; then
19518         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19519 elif test "$includedir" != "/usr/include"; then
19520         if test "$includedir" = '${prefix}/include' ; then
19521                 if test $prefix != /usr ; then
19522                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19523                 fi
19524         else
19525                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19526         fi
19527 fi
19528
19529 ### Build up pieces for makefile rules
19530 echo "$as_me:19530: checking default library suffix" >&5
19531 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19532
19533         case $DFT_LWR_MODEL in
19534         libtool) DFT_ARG_SUFFIX=''   ;;
19535         normal)  DFT_ARG_SUFFIX=''   ;;
19536         debug)   DFT_ARG_SUFFIX='_g' ;;
19537         profile) DFT_ARG_SUFFIX='_p' ;;
19538         shared)  DFT_ARG_SUFFIX=''   ;;
19539         esac
19540         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19541 echo "$as_me:19541: result: $DFT_ARG_SUFFIX" >&5
19542 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19543
19544 echo "$as_me:19544: checking default library-dependency suffix" >&5
19545 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19546
19547         case $DFT_LWR_MODEL in #(vi
19548         libtool) #(vi
19549                 DFT_LIB_SUFFIX='.la'
19550                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19551                 ;;
19552         normal) #(vi
19553                 DFT_LIB_SUFFIX='.a'
19554                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19555                 ;;
19556         debug) #(vi
19557                 DFT_LIB_SUFFIX='_g.a'
19558                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19559                 ;;
19560         profile) #(vi
19561                 DFT_LIB_SUFFIX='_p.a'
19562                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19563                 ;;
19564         shared) #(vi
19565                 case $cf_cv_system_name in
19566                 aix[5-7]*) #(vi
19567                         DFT_LIB_SUFFIX='.a'
19568                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19569                         ;;
19570                 cygwin*|mingw*) #(vi
19571                         DFT_LIB_SUFFIX='.dll'
19572                         DFT_DEP_SUFFIX='.dll.a'
19573                         ;;
19574                 darwin*) #(vi
19575                         DFT_LIB_SUFFIX='.dylib'
19576                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19577                         ;;
19578                 hpux*) #(vi
19579                         case $target in
19580                         ia64*) #(vi
19581                                 DFT_LIB_SUFFIX='.so'
19582                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19583                                 ;;
19584                         *) #(vi
19585                                 DFT_LIB_SUFFIX='.sl'
19586                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19587                                 ;;
19588                         esac
19589                         ;;
19590                 *)      DFT_LIB_SUFFIX='.so'
19591                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19592                         ;;
19593                 esac
19594         esac
19595         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19596         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19597 echo "$as_me:19597: result: $DFT_DEP_SUFFIX" >&5
19598 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19599
19600 echo "$as_me:19600: checking default object directory" >&5
19601 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19602
19603         case $DFT_LWR_MODEL in
19604         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19605         normal)  DFT_OBJ_SUBDIR='objects' ;;
19606         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19607         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19608         shared)
19609                 case $cf_cv_system_name in #(vi
19610                 cygwin) #(vi
19611                         DFT_OBJ_SUBDIR='objects' ;;
19612                 *)
19613                         DFT_OBJ_SUBDIR='obj_s' ;;
19614                 esac
19615         esac
19616 echo "$as_me:19616: result: $DFT_OBJ_SUBDIR" >&5
19617 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19618
19619 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19620 if test "x$cf_with_cxx" = xyes ; then
19621 echo "$as_me:19621: checking c++ library-dependency suffix" >&5
19622 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19623 if test "$with_libtool" != "no"; then
19624         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19625 else
19626
19627         case normal in #(vi
19628         libtool) #(vi
19629                 CXX_LIB_SUFFIX='.la'
19630                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19631                 ;;
19632         normal) #(vi
19633                 CXX_LIB_SUFFIX='.a'
19634                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19635                 ;;
19636         debug) #(vi
19637                 CXX_LIB_SUFFIX='_g.a'
19638                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19639                 ;;
19640         profile) #(vi
19641                 CXX_LIB_SUFFIX='_p.a'
19642                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19643                 ;;
19644         shared) #(vi
19645                 case $cf_cv_system_name in
19646                 aix[5-7]*) #(vi
19647                         CXX_LIB_SUFFIX='.a'
19648                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19649                         ;;
19650                 cygwin*|mingw*) #(vi
19651                         CXX_LIB_SUFFIX='.dll'
19652                         CXX_DEP_SUFFIX='.dll.a'
19653                         ;;
19654                 darwin*) #(vi
19655                         CXX_LIB_SUFFIX='.dylib'
19656                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19657                         ;;
19658                 hpux*) #(vi
19659                         case $target in
19660                         ia64*) #(vi
19661                                 CXX_LIB_SUFFIX='.so'
19662                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19663                                 ;;
19664                         *) #(vi
19665                                 CXX_LIB_SUFFIX='.sl'
19666                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19667                                 ;;
19668                         esac
19669                         ;;
19670                 *)      CXX_LIB_SUFFIX='.so'
19671                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19672                         ;;
19673                 esac
19674         esac
19675         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19676         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19677 fi
19678 echo "$as_me:19678: result: $CXX_LIB_SUFFIX" >&5
19679 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19680
19681 fi
19682
19683 # do not want -ldl in build except as needed for -lncurses dependency
19684 if test "x$with_dlsym" = xyes ; then
19685 if test $DFT_LWR_MODEL = shared || \
19686    test $DFT_LWR_MODEL = libtool ; then
19687
19688 # remove dl library from $LIBS
19689 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19690
19691 fi
19692 fi
19693 ### Set up low-level terminfo dependencies for makefiles.
19694
19695 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19696 # do not need libdl
19697 TICS_LIST=
19698 if test "x$with_dlsym" = xyes ; then
19699
19700 # remove dl library from $SHLIB_LIST
19701 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19702
19703 fi
19704
19705 if test "$with_ticlib" != no ; then
19706
19707         if test "x$with_ticlib" != xyes ; then
19708                 TICS_NAME=$with_ticlib
19709                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19710                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19711                 TICS_LIB_SUFFIX="${with_ticlib}"
19712         else
19713                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19714                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19715                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19716         fi
19717         TICS_LDFLAGS="-L${LIB_DIR}"
19718         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19719 else
19720         TICS_LDFLAGS="-L${LIB_DIR}"
19721         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19722 fi
19723
19724 if test "$with_termlib" != no ; then
19725
19726         if test "x$with_termlib" != xyes ; then
19727                 TINFO_NAME=$with_termlib
19728                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19729                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19730                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19731                 TINFO_LIB_SUFFIX="${with_termlib}"
19732         else
19733                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19734                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19735                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19736                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19737         fi
19738
19739         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19740         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19741         if test "$DFT_LWR_MODEL" = "libtool"; then
19742                 TEST_ARGS="${TEST_DEPS}"
19743                 TEST_ARG2="${TEST_DEP2}"
19744                 TINFO_LDFLAGS="-L${LIB_DIR}"
19745                 TINFO_LIBS="$TEST_ARGS"
19746                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19747                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19748         else
19749                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19750                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19751                 if test "x$with_term_driver" != xno ; then
19752                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19753                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19754                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19755                 else
19756                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19757                         TINFO_LIBS="$TEST_ARGS"
19758                 fi
19759                 TINFO_LDFLAGS="-L${LIB_DIR}"
19760                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19761         fi
19762 else
19763         # the next lines are needed for linking libtic over libncurses
19764         TINFO_NAME=${LIB_NAME}
19765         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19766         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19767         if test "x$with_tic_depends" = xyes ; then
19768                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19769         else
19770                 TICS_LIST="$SHLIB_LIST"
19771         fi
19772
19773         TINFO_LDFLAGS="-L${LIB_DIR}"
19774         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19775 fi
19776
19777 if test "$DFT_LWR_MODEL" = shared ; then
19778         case $cf_cv_system_name in #(vi
19779         cygwin*)
19780                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19781                 TINFO_SUFFIX=.dll
19782                 ;;
19783         esac
19784 fi
19785
19786 if test "x$with_dlsym" = xyes ; then
19787
19788 # remove dl library from $TICS_LIST
19789 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19790
19791 fi
19792
19793 if test "$DFT_LWR_MODEL" = "libtool"; then
19794     OBJEXT=lo
19795 fi
19796
19797 # needed for Ada95
19798 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
19799
19800 case $DFT_LWR_MODEL in
19801 normal|debug|profile)
19802
19803 if test "$GCC" = yes ; then
19804         case $cf_cv_system_name in #(
19805         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19806                 LDFLAGS_STATIC=
19807                 LDFLAGS_SHARED=
19808                 ;;
19809     *)  #( normally, except when broken
19810         LDFLAGS_STATIC=-static
19811         LDFLAGS_SHARED=-dynamic
19812         ;;
19813     esac
19814 else
19815         case $cf_cv_system_name in #(
19816         aix[4-7]*)      #( from ld manpage
19817                 LDFLAGS_STATIC=-bstatic
19818                 LDFLAGS_SHARED=-bdynamic
19819                 ;;
19820         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19821                 # We could also use just "archive" and "shared".
19822                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19823                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19824                 ;;
19825         irix*)          #( from ld manpage IRIX64
19826                 LDFLAGS_STATIC=-Bstatic
19827                 LDFLAGS_SHARED=-Bdynamic
19828                 ;;
19829         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19830                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19831                 LDFLAGS_STATIC=-noso
19832                 LDFLAGS_SHARED=-so_archive
19833                 ;;
19834         solaris2*)
19835                 LDFLAGS_STATIC=-Bstatic
19836                 LDFLAGS_SHARED=-Bdynamic
19837                 ;;
19838         esac
19839 fi
19840
19841 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19842 then
19843         echo "$as_me:19843: checking if linker supports switching between static/dynamic" >&5
19844 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19845
19846         rm -f libconftest.a
19847         cat >conftest.$ac_ext <<EOF
19848 #line 19848 "configure"
19849 #include <stdio.h>
19850 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19851 EOF
19852         if { (eval echo "$as_me:19852: \"$ac_compile\"") >&5
19853   (eval $ac_compile) 2>&5
19854   ac_status=$?
19855   echo "$as_me:19855: \$? = $ac_status" >&5
19856   (exit $ac_status); } ; then
19857                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19858                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19859         fi
19860         rm -f conftest.*
19861
19862         cf_save_LIBS="$LIBS"
19863
19864         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19865         cat >conftest.$ac_ext <<_ACEOF
19866 #line 19866 "configure"
19867 #include "confdefs.h"
19868
19869 #line 19869 "configure"
19870 #include <stdio.h>
19871 int cf_ldflags_static(FILE *fp);
19872
19873 int
19874 main ()
19875 {
19876
19877         return cf_ldflags_static(stdin);
19878
19879   ;
19880   return 0;
19881 }
19882 _ACEOF
19883 rm -f conftest.$ac_objext conftest$ac_exeext
19884 if { (eval echo "$as_me:19884: \"$ac_link\"") >&5
19885   (eval $ac_link) 2>&5
19886   ac_status=$?
19887   echo "$as_me:19887: \$? = $ac_status" >&5
19888   (exit $ac_status); } &&
19889          { ac_try='test -s conftest$ac_exeext'
19890   { (eval echo "$as_me:19890: \"$ac_try\"") >&5
19891   (eval $ac_try) 2>&5
19892   ac_status=$?
19893   echo "$as_me:19893: \$? = $ac_status" >&5
19894   (exit $ac_status); }; }; then
19895
19896         # some linkers simply ignore the -dynamic
19897         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
19898         *static*) # (vi
19899                 cf_ldflags_static=no
19900                 ;;
19901         *)
19902                 cf_ldflags_static=yes
19903                 ;;
19904         esac
19905
19906 else
19907   echo "$as_me: failed program was:" >&5
19908 cat conftest.$ac_ext >&5
19909 cf_ldflags_static=no
19910 fi
19911 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19912
19913         rm -f libconftest.*
19914         LIBS="$cf_save_LIBS"
19915
19916         echo "$as_me:19916: result: $cf_ldflags_static" >&5
19917 echo "${ECHO_T}$cf_ldflags_static" >&6
19918
19919         if test $cf_ldflags_static != yes
19920         then
19921                 LDFLAGS_STATIC=
19922                 LDFLAGS_SHARED=
19923         fi
19924 else
19925         LDFLAGS_STATIC=
19926         LDFLAGS_SHARED=
19927 fi
19928
19929         ;;
19930 esac
19931
19932 echo "$as_me:19932: checking where we will install curses.h" >&5
19933 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19934 test "$with_overwrite" = no && \
19935 test "x$includedir" = 'x${prefix}/include' && \
19936         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19937 echo "$as_me:19937: result: $includedir" >&5
19938 echo "${ECHO_T}$includedir" >&6
19939
19940 ### Resolve a conflict between normal and wide-curses by forcing applications
19941 ### that will need libutf8 to add it to their configure script.
19942 if test "$with_overwrite" != no ; then
19943 if test "$NCURSES_LIBUTF8" = 1 ; then
19944         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19945         { echo "$as_me:19945: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19946 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19947 fi
19948 fi
19949 WITH_OVERWRITE=$with_overwrite
19950
19951 # used to separate tack out of the tree
19952 NCURSES_TREE=
19953
19954 ### predefined stuff for the test programs
19955
19956 cat >>confdefs.h <<\EOF
19957 #define HAVE_SLK_COLOR 1
19958 EOF
19959
19960 ### Construct the list of subdirectories for which we'll customize makefiles
19961 ### with the appropriate compile-rules.
19962
19963 echo "$as_me:19963: checking for src modules" >&5
19964 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19965
19966 # dependencies and linker-arguments for test-programs
19967 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19968 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19969 if test "$DFT_LWR_MODEL" = "libtool"; then
19970         TEST_ARGS="${TEST_DEPS}"
19971         TEST_ARG2="${TEST_DEP2}"
19972 else
19973         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19974         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19975 fi
19976
19977 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
19978 cf_cv_src_modules=
19979 for cf_dir in $modules_to_build
19980 do
19981         if test -f $srcdir/$cf_dir/modules; then
19982
19983                 # We may/may not have tack in the distribution, though the
19984                 # makefile is.
19985                 if test $cf_dir = tack ; then
19986                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19987                                 continue
19988                         fi
19989                 fi
19990
19991                 if test -z "$cf_cv_src_modules"; then
19992                         cf_cv_src_modules=$cf_dir
19993                 else
19994                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19995                 fi
19996
19997                 # Make the ncurses_cfg.h file record the library interface files as
19998                 # well.  These are header files that are the same name as their
19999                 # directory.  Ncurses is the only library that does not follow
20000                 # that pattern.
20001                 if test $cf_dir = tack ; then
20002                         continue
20003                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20004
20005 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20006
20007                         cat >>confdefs.h <<EOF
20008 #define HAVE_${cf_have_include}_H 1
20009 EOF
20010
20011                         cat >>confdefs.h <<EOF
20012 #define HAVE_LIB${cf_have_include} 1
20013 EOF
20014
20015                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20016                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20017                         if test "$DFT_LWR_MODEL" = "libtool"; then
20018                                 TEST_ARGS="${TEST_DEPS}"
20019                                 TEST_ARG2="${TEST_DEP2}"
20020                         else
20021                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20022                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20023                         fi
20024                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20025                 fi
20026         fi
20027 done
20028 echo "$as_me:20028: result: $cf_cv_src_modules" >&5
20029 echo "${ECHO_T}$cf_cv_src_modules" >&6
20030
20031 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20032 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20033
20034 SRC_SUBDIRS=
20035 if test "x$cf_with_manpages" != xno ; then
20036         SRC_SUBDIRS="$SRC_SUBDIRS man"
20037 fi
20038 SRC_SUBDIRS="$SRC_SUBDIRS include"
20039 for cf_dir in $cf_cv_src_modules
20040 do
20041         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20042 done
20043 if test "x$cf_with_tests" != "xno" ; then
20044         SRC_SUBDIRS="$SRC_SUBDIRS test"
20045 fi
20046 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20047 if test "$cf_with_cxx_binding" != no; then
20048         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20049         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20050 fi
20051
20052 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20053 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20054
20055 ADA_SUBDIRS=
20056 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20057         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20058         ADA_SUBDIRS="gen src"
20059         if test "x$cf_with_tests" != "xno" ; then
20060                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20061         fi
20062 fi
20063
20064 SUB_MAKEFILES=
20065 for cf_dir in $SRC_SUBDIRS
20066 do
20067         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20068 done
20069
20070 if test -n "$ADA_SUBDIRS"; then
20071         for cf_dir in $ADA_SUBDIRS
20072         do
20073                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20074         done
20075
20076 fi
20077
20078 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20079    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20080    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20081 fi
20082
20083 DIRS_TO_MAKE="lib"
20084 for cf_item in $cf_list_models
20085 do
20086
20087         case $cf_item in
20088         libtool) cf_subdir='obj_lo'  ;;
20089         normal)  cf_subdir='objects' ;;
20090         debug)   cf_subdir='obj_g' ;;
20091         profile) cf_subdir='obj_p' ;;
20092         shared)
20093                 case $cf_cv_system_name in #(vi
20094                 cygwin) #(vi
20095                         cf_subdir='objects' ;;
20096                 *)
20097                         cf_subdir='obj_s' ;;
20098                 esac
20099         esac
20100
20101         for cf_item2 in $DIRS_TO_MAKE
20102         do
20103                 test $cf_item2 = $cf_subdir && break
20104         done
20105         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20106 done
20107 for cf_dir in $DIRS_TO_MAKE
20108 do
20109         test ! -d $cf_dir && mkdir $cf_dir
20110 done
20111
20112 # symbols that differ when compiling Ada95 by itself.
20113 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20114
20115 # values to use as strings
20116
20117 cat >>confdefs.h <<EOF
20118 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20119 EOF
20120
20121 cat >>confdefs.h <<EOF
20122 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20123 EOF
20124
20125 ### Now that we're done running tests, add the compiler-warnings, if any
20126
20127 cf_fix_cppflags=no
20128 cf_new_cflags=
20129 cf_new_cppflags=
20130 cf_new_extra_cppflags=
20131
20132 for cf_add_cflags in $EXTRA_CFLAGS
20133 do
20134 case $cf_fix_cppflags in
20135 no)
20136         case $cf_add_cflags in #(vi
20137         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20138                 case $cf_add_cflags in
20139                 -D*)
20140                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20141
20142                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20143                                 && test -z "${cf_tst_cflags}" \
20144                                 && cf_fix_cppflags=yes
20145
20146                         if test $cf_fix_cppflags = yes ; then
20147                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20148                                 continue
20149                         elif test "${cf_tst_cflags}" = "\"'" ; then
20150                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20151                                 continue
20152                         fi
20153                         ;;
20154                 esac
20155                 case "$CPPFLAGS" in
20156                 *$cf_add_cflags) #(vi
20157                         ;;
20158                 *) #(vi
20159                         case $cf_add_cflags in #(vi
20160                         -D*)
20161                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20162
20163 CPPFLAGS=`echo "$CPPFLAGS" | \
20164         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20165                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20166
20167                                 ;;
20168                         esac
20169                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20170                         ;;
20171                 esac
20172                 ;;
20173         *)
20174                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20175                 ;;
20176         esac
20177         ;;
20178 yes)
20179         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20180
20181         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20182
20183         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20184                 && test -z "${cf_tst_cflags}" \
20185                 && cf_fix_cppflags=no
20186         ;;
20187 esac
20188 done
20189
20190 if test -n "$cf_new_cflags" ; then
20191
20192         CFLAGS="$CFLAGS $cf_new_cflags"
20193 fi
20194
20195 if test -n "$cf_new_cppflags" ; then
20196
20197         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20198 fi
20199
20200 if test -n "$cf_new_extra_cppflags" ; then
20201
20202         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20203 fi
20204
20205 ### Define substitutions for header files to avoid name-pollution
20206
20207 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20208         HAVE_TCGETATTR=1
20209 else
20210         HAVE_TCGETATTR=0
20211 fi
20212
20213 if test "x$ac_cv_header_termio_h" = xyes ; then
20214         HAVE_TERMIO_H=1
20215 else
20216         HAVE_TERMIO_H=0
20217 fi
20218
20219 if test "x$ac_cv_header_termios_h" = xyes ; then
20220         HAVE_TERMIOS_H=1
20221 else
20222         HAVE_TERMIOS_H=0
20223 fi
20224
20225 ################################################################################
20226 test "x$use_database" = xyes && \
20227 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20228
20229 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20230 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20231
20232 if test "x$enable_pc_files" = xyes ; then \
20233 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20234 MAKE_PC_FILES=
20235 else
20236 MAKE_PC_FILES="#"
20237 fi
20238
20239 # Extract the first word of "tic", so it can be a program name with args.
20240 set dummy tic; ac_word=$2
20241 echo "$as_me:20241: checking for $ac_word" >&5
20242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20243 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20244   echo $ECHO_N "(cached) $ECHO_C" >&6
20245 else
20246   case $TIC_PATH in
20247   [\\/]* | ?:[\\/]*)
20248   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20249   ;;
20250   *)
20251   ac_save_IFS=$IFS; IFS=$ac_path_separator
20252 ac_dummy="$PATH:/usr/local/ncurses/bin"
20253 for ac_dir in $ac_dummy; do
20254   IFS=$ac_save_IFS
20255   test -z "$ac_dir" && ac_dir=.
20256   if $as_executable_p "$ac_dir/$ac_word"; then
20257    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20258    echo "$as_me:20258: found $ac_dir/$ac_word" >&5
20259    break
20260 fi
20261 done
20262
20263   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20264   ;;
20265 esac
20266 fi
20267 TIC_PATH=$ac_cv_path_TIC_PATH
20268
20269 if test -n "$TIC_PATH"; then
20270   echo "$as_me:20270: result: $TIC_PATH" >&5
20271 echo "${ECHO_T}$TIC_PATH" >&6
20272 else
20273   echo "$as_me:20273: result: no" >&5
20274 echo "${ECHO_T}no" >&6
20275 fi
20276
20277 if test -n "$FALLBACK_LIST"
20278 then
20279         if test "$TIC_PATH" = unknown
20280         then
20281                 { echo "$as_me:20281: WARNING: no tic program found for fallbacks" >&5
20282 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20283         fi
20284 fi
20285
20286 if test "x$cf_with_tests" != xno ; then
20287         MAKE_TESTS=
20288 else
20289         MAKE_TESTS="#"
20290 fi
20291
20292 ADAHTML_DIR=../../doc/html/ada
20293
20294 SUB_SCRIPTS=
20295
20296 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"
20297 ac_config_commands="$ac_config_commands default"
20298 cat >confcache <<\_ACEOF
20299 # This file is a shell script that caches the results of configure
20300 # tests run on this system so they can be shared between configure
20301 # scripts and configure runs, see configure's option --config-cache.
20302 # It is not useful on other systems.  If it contains results you don't
20303 # want to keep, you may remove or edit it.
20304 #
20305 # config.status only pays attention to the cache file if you give it
20306 # the --recheck option to rerun configure.
20307 #
20308 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20309 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20310 # following values.
20311
20312 _ACEOF
20313
20314 # The following way of writing the cache mishandles newlines in values,
20315 # but we know of no workaround that is simple, portable, and efficient.
20316 # So, don't put newlines in cache variables' values.
20317 # Ultrix sh set writes to stderr and can't be redirected directly,
20318 # and sets the high bit in the cache file unless we assign to the vars.
20319 {
20320   (set) 2>&1 |
20321     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20322     *ac_space=\ *)
20323       # `set' does not quote correctly, so add quotes (double-quote
20324       # substitution turns \\\\ into \\, and sed turns \\ into \).
20325       sed -n \
20326         "s/'/'\\\\''/g;
20327           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20328       ;;
20329     *)
20330       # `set' quotes correctly as required by POSIX, so do not add quotes.
20331       sed -n \
20332         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20333       ;;
20334     esac;
20335 } |
20336   sed '
20337      t clear
20338      : clear
20339      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20340      t end
20341      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20342      : end' >>confcache
20343 if cmp -s $cache_file confcache; then :; else
20344   if test -w $cache_file; then
20345     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20346     cat confcache >$cache_file
20347   else
20348     echo "not updating unwritable cache $cache_file"
20349   fi
20350 fi
20351 rm -f confcache
20352
20353 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20354 # Let make expand exec_prefix.
20355 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20356
20357 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20358 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20359 # trailing colons and then remove the whole line if VPATH becomes empty
20360 # (actually we leave an empty line to preserve line numbers).
20361 if test "x$srcdir" = x.; then
20362   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20363 s/:*\$(srcdir):*/:/;
20364 s/:*\${srcdir}:*/:/;
20365 s/:*@srcdir@:*/:/;
20366 s/^\([^=]*=[    ]*\):*/\1/;
20367 s/:*$//;
20368 s/^[^=]*=[      ]*$//;
20369 }'
20370 fi
20371
20372 DEFS=-DHAVE_CONFIG_H
20373
20374 : ${CONFIG_STATUS=./config.status}
20375 ac_clean_files_save=$ac_clean_files
20376 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20377 { echo "$as_me:20377: creating $CONFIG_STATUS" >&5
20378 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20379 cat >$CONFIG_STATUS <<_ACEOF
20380 #! $SHELL
20381 # Generated automatically by configure.
20382 # Run this file to recreate the current configuration.
20383 # Compiler output produced by configure, useful for debugging
20384 # configure, is in config.log if it exists.
20385
20386 debug=false
20387 SHELL=\${CONFIG_SHELL-$SHELL}
20388 ac_cs_invocation="\$0 \$@"
20389
20390 _ACEOF
20391
20392 cat >>$CONFIG_STATUS <<\_ACEOF
20393 # Be Bourne compatible
20394 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20395   emulate sh
20396   NULLCMD=:
20397 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20398   set -o posix
20399 fi
20400
20401 # Name of the executable.
20402 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20403
20404 if expr a : '\(a\)' >/dev/null 2>&1; then
20405   as_expr=expr
20406 else
20407   as_expr=false
20408 fi
20409
20410 rm -f conf$$ conf$$.exe conf$$.file
20411 echo >conf$$.file
20412 if ln -s conf$$.file conf$$ 2>/dev/null; then
20413   # We could just check for DJGPP; but this test a) works b) is more generic
20414   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20415   if test -f conf$$.exe; then
20416     # Don't use ln at all; we don't have any links
20417     as_ln_s='cp -p'
20418   else
20419     as_ln_s='ln -s'
20420   fi
20421 elif ln conf$$.file conf$$ 2>/dev/null; then
20422   as_ln_s=ln
20423 else
20424   as_ln_s='cp -p'
20425 fi
20426 rm -f conf$$ conf$$.exe conf$$.file
20427
20428 as_executable_p="test -f"
20429
20430 # Support unset when possible.
20431 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20432   as_unset=unset
20433 else
20434   as_unset=false
20435 fi
20436
20437 # NLS nuisances.
20438 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20439 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20440 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20441 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20442 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20443 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20444 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20445 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20446
20447 # IFS
20448 # We need space, tab and new line, in precisely that order.
20449 as_nl='
20450 '
20451 IFS="   $as_nl"
20452
20453 # CDPATH.
20454 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20455
20456 exec 6>&1
20457
20458 _ACEOF
20459
20460 # Files that config.status was made for.
20461 if test -n "$ac_config_files"; then
20462   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20463 fi
20464
20465 if test -n "$ac_config_headers"; then
20466   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20467 fi
20468
20469 if test -n "$ac_config_links"; then
20470   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20471 fi
20472
20473 if test -n "$ac_config_commands"; then
20474   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20475 fi
20476
20477 cat >>$CONFIG_STATUS <<\EOF
20478
20479 ac_cs_usage="\
20480 \`$as_me' instantiates files from templates according to the
20481 current configuration.
20482
20483 Usage: $0 [OPTIONS] [FILE]...
20484
20485   -h, --help       print this help, then exit
20486   -V, --version    print version number, then exit
20487   -d, --debug      don't remove temporary files
20488       --recheck    update $as_me by reconfiguring in the same conditions
20489   --file=FILE[:TEMPLATE]
20490                    instantiate the configuration file FILE
20491   --header=FILE[:TEMPLATE]
20492                    instantiate the configuration header FILE
20493
20494 Configuration files:
20495 $config_files
20496
20497 Configuration headers:
20498 $config_headers
20499
20500 Configuration commands:
20501 $config_commands
20502
20503 Report bugs to <dickey@invisible-island.net>."
20504 EOF
20505
20506 cat >>$CONFIG_STATUS <<EOF
20507 ac_cs_version="\\
20508 config.status
20509 configured by $0, generated by GNU Autoconf 2.52.20121002,
20510   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20511
20512 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20513 Free Software Foundation, Inc.
20514 This config.status script is free software; the Free Software Foundation
20515 gives unlimited permission to copy, distribute and modify it."
20516 srcdir=$srcdir
20517 INSTALL="$INSTALL"
20518 EOF
20519
20520 cat >>$CONFIG_STATUS <<\EOF
20521 # If no file are specified by the user, then we need to provide default
20522 # value.  By we need to know if files were specified by the user.
20523 ac_need_defaults=:
20524 while test $# != 0
20525 do
20526   case $1 in
20527   --*=*)
20528     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20529     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20530     shift
20531     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20532     shift
20533     ;;
20534   -*);;
20535   *) # This is not an option, so the user has probably given explicit
20536      # arguments.
20537      ac_need_defaults=false;;
20538   esac
20539
20540   case $1 in
20541   # Handling of the options.
20542 EOF
20543 cat >>$CONFIG_STATUS <<EOF
20544   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20545     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20546     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20547 EOF
20548 cat >>$CONFIG_STATUS <<\EOF
20549   --version | --vers* | -V )
20550     echo "$ac_cs_version"; exit 0 ;;
20551   --he | --h)
20552     # Conflict between --help and --header
20553     { { echo "$as_me:20553: error: ambiguous option: $1
20554 Try \`$0 --help' for more information." >&5
20555 echo "$as_me: error: ambiguous option: $1
20556 Try \`$0 --help' for more information." >&2;}
20557    { (exit 1); exit 1; }; };;
20558   --help | --hel | -h )
20559     echo "$ac_cs_usage"; exit 0 ;;
20560   --debug | --d* | -d )
20561     debug=: ;;
20562   --file | --fil | --fi | --f )
20563     shift
20564     CONFIG_FILES="$CONFIG_FILES $1"
20565     ac_need_defaults=false;;
20566   --header | --heade | --head | --hea )
20567     shift
20568     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20569     ac_need_defaults=false;;
20570
20571   # This is an error.
20572   -*) { { echo "$as_me:20572: error: unrecognized option: $1
20573 Try \`$0 --help' for more information." >&5
20574 echo "$as_me: error: unrecognized option: $1
20575 Try \`$0 --help' for more information." >&2;}
20576    { (exit 1); exit 1; }; } ;;
20577
20578   *) ac_config_targets="$ac_config_targets $1" ;;
20579
20580   esac
20581   shift
20582 done
20583
20584 exec 5>>config.log
20585 cat >&5 << _ACEOF
20586
20587 ## ----------------------- ##
20588 ## Running config.status.  ##
20589 ## ----------------------- ##
20590
20591 This file was extended by $as_me 2.52.20121002, executed with
20592   CONFIG_FILES    = $CONFIG_FILES
20593   CONFIG_HEADERS  = $CONFIG_HEADERS
20594   CONFIG_LINKS    = $CONFIG_LINKS
20595   CONFIG_COMMANDS = $CONFIG_COMMANDS
20596   > $ac_cs_invocation
20597 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20598
20599 _ACEOF
20600 EOF
20601
20602 cat >>$CONFIG_STATUS <<EOF
20603 #
20604 # INIT-COMMANDS section.
20605 #
20606
20607 ### Special initialization commands, used to pass information from the
20608 ### configuration-run into config.status
20609
20610 AWK="$AWK"
20611 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20612 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20613 ECHO_LD="$ECHO_LD"
20614 LDCONFIG="$LDCONFIG"
20615 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20616 LIB_NAME="$LIB_NAME"
20617 LIB_PREFIX="$LIB_PREFIX"
20618 LIB_SUBSETS="$LIB_SUBSETS"
20619 LIB_SUFFIX="$LIB_SUFFIX"
20620 LIB_TRACING="$LIB_TRACING"
20621 LN_S="$LN_S"
20622 MAKE_TERMINFO="$MAKE_TERMINFO"
20623 NCURSES_MAJOR="$NCURSES_MAJOR"
20624 NCURSES_MINOR="$NCURSES_MINOR"
20625 NCURSES_OSPEED="$NCURSES_OSPEED"
20626 NCURSES_PATCH="$NCURSES_PATCH"
20627 SRC_SUBDIRS="$SRC_SUBDIRS"
20628 TERMINFO="$TERMINFO"
20629 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20630 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20631 TICS_NAME="$TICS_NAME"
20632 TIC_PATH="$TIC_PATH"
20633 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20634 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20635 TINFO_NAME="$TINFO_NAME"
20636 TINFO_SUFFIX="$TINFO_SUFFIX"
20637 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20638 WITH_CURSES_H="$with_curses_h"
20639 WITH_ECHO="${enable_echo:=yes}"
20640 WITH_OVERWRITE="$with_overwrite"
20641 cf_LIST_MODELS="$cf_list_models"
20642 cf_cv_abi_version="$cf_cv_abi_version"
20643 cf_cv_do_relink="$cf_cv_do_relink"
20644 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20645 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20646 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20647 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20648 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20649 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20650 cf_cv_rel_version="$cf_cv_rel_version"
20651 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20652 cf_cv_shared_soname='$cf_cv_shared_soname'
20653 cf_cv_shlib_version="$cf_cv_shlib_version"
20654 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20655 cf_cv_system_name="$cf_cv_system_name"
20656 cf_cv_term_driver="$with_term_driver"
20657 cf_with_ada="$cf_with_ada"
20658 cf_with_cxx_binding="$cf_with_cxx_binding"
20659 cf_with_manpages="$cf_with_manpages"
20660 cf_with_tests="$cf_with_tests"
20661 host="$host"
20662 target="$target"
20663
20664 EOF
20665
20666 cat >>$CONFIG_STATUS <<\EOF
20667 for ac_config_target in $ac_config_targets
20668 do
20669   case "$ac_config_target" in
20670   # Handling of arguments.
20671   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20672   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20673   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20674   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20675   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20676   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20677   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20678   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20679   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20680   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20681   *) { { echo "$as_me:20681: error: invalid argument: $ac_config_target" >&5
20682 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20683    { (exit 1); exit 1; }; };;
20684   esac
20685 done
20686
20687 # If the user did not use the arguments to specify the items to instantiate,
20688 # then the envvar interface is used.  Set only those that are not.
20689 # We use the long form for the default assignment because of an extremely
20690 # bizarre bug on SunOS 4.1.3.
20691 if $ac_need_defaults; then
20692   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20693   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20694   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20695 fi
20696
20697 # Create a temporary directory, and hook for its removal unless debugging.
20698 $debug ||
20699 {
20700   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20701   trap '{ (exit 1); exit 1; }' 1 2 13 15
20702 }
20703
20704 # Create a (secure) tmp directory for tmp files.
20705 : ${TMPDIR=/tmp}
20706 {
20707   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20708   test -n "$tmp" && test -d "$tmp"
20709 }  ||
20710 {
20711   tmp=$TMPDIR/cs$$-$RANDOM
20712   (umask 077 && mkdir $tmp)
20713 } ||
20714 {
20715    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20716    { (exit 1); exit 1; }
20717 }
20718
20719 EOF
20720
20721 cat >>$CONFIG_STATUS <<EOF
20722
20723 #
20724 # CONFIG_FILES section.
20725 #
20726
20727 # No need to generate the scripts if there are no CONFIG_FILES.
20728 # This happens for instance when ./config.status config.h
20729 if test -n "\$CONFIG_FILES"; then
20730   # Protect against being on the right side of a sed subst in config.status.
20731   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20732    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20733 s,@SHELL@,$SHELL,;t t
20734 s,@exec_prefix@,$exec_prefix,;t t
20735 s,@prefix@,$prefix,;t t
20736 s,@program_transform_name@,$program_transform_name,;t t
20737 s,@bindir@,$bindir,;t t
20738 s,@sbindir@,$sbindir,;t t
20739 s,@libexecdir@,$libexecdir,;t t
20740 s,@datarootdir@,$datarootdir,;t t
20741 s,@datadir@,$datadir,;t t
20742 s,@sysconfdir@,$sysconfdir,;t t
20743 s,@sharedstatedir@,$sharedstatedir,;t t
20744 s,@localstatedir@,$localstatedir,;t t
20745 s,@libdir@,$libdir,;t t
20746 s,@includedir@,$includedir,;t t
20747 s,@oldincludedir@,$oldincludedir,;t t
20748 s,@infodir@,$infodir,;t t
20749 s,@mandir@,$mandir,;t t
20750 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20751 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20752 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20753 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20754 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20755 s,@build_alias@,$build_alias,;t t
20756 s,@host_alias@,$host_alias,;t t
20757 s,@target_alias@,$target_alias,;t t
20758 s,@ECHO_C@,$ECHO_C,;t t
20759 s,@ECHO_N@,$ECHO_N,;t t
20760 s,@ECHO_T@,$ECHO_T,;t t
20761 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20762 s,@DEFS@,$DEFS,;t t
20763 s,@LIBS@,$LIBS,;t t
20764 s,@top_builddir@,$top_builddir,;t t
20765 s,@EGREP@,$EGREP,;t t
20766 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20767 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20768 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20769 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20770 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20771 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20772 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20773 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20774 s,@build@,$build,;t t
20775 s,@build_cpu@,$build_cpu,;t t
20776 s,@build_vendor@,$build_vendor,;t t
20777 s,@build_os@,$build_os,;t t
20778 s,@host@,$host,;t t
20779 s,@host_cpu@,$host_cpu,;t t
20780 s,@host_vendor@,$host_vendor,;t t
20781 s,@host_os@,$host_os,;t t
20782 s,@target@,$target,;t t
20783 s,@target_cpu@,$target_cpu,;t t
20784 s,@target_vendor@,$target_vendor,;t t
20785 s,@target_os@,$target_os,;t t
20786 s,@CC@,$CC,;t t
20787 s,@CFLAGS@,$CFLAGS,;t t
20788 s,@LDFLAGS@,$LDFLAGS,;t t
20789 s,@CPPFLAGS@,$CPPFLAGS,;t t
20790 s,@ac_ct_CC@,$ac_ct_CC,;t t
20791 s,@EXEEXT@,$EXEEXT,;t t
20792 s,@OBJEXT@,$OBJEXT,;t t
20793 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20794 s,@CPP@,$CPP,;t t
20795 s,@LDCONFIG@,$LDCONFIG,;t t
20796 s,@CXX@,$CXX,;t t
20797 s,@CXXFLAGS@,$CXXFLAGS,;t t
20798 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20799 s,@AWK@,$AWK,;t t
20800 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20801 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20802 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20803 s,@LINT@,$LINT,;t t
20804 s,@LINT_OPTS@,$LINT_OPTS,;t t
20805 s,@LN_S@,$LN_S,;t t
20806 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20807 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20808 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20809 s,@SET_MAKE@,$SET_MAKE,;t t
20810 s,@CTAGS@,$CTAGS,;t t
20811 s,@ETAGS@,$ETAGS,;t t
20812 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20813 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20814 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20815 s,@RANLIB@,$RANLIB,;t t
20816 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20817 s,@LD@,$LD,;t t
20818 s,@ac_ct_LD@,$ac_ct_LD,;t t
20819 s,@AR@,$AR,;t t
20820 s,@ac_ct_AR@,$ac_ct_AR,;t t
20821 s,@ARFLAGS@,$ARFLAGS,;t t
20822 s,@DESTDIR@,$DESTDIR,;t t
20823 s,@BUILD_CC@,$BUILD_CC,;t t
20824 s,@BUILD_CPP@,$BUILD_CPP,;t t
20825 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20826 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20827 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20828 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20829 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20830 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20831 s,@cf_list_models@,$cf_list_models,;t t
20832 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20833 s,@LIBTOOL@,$LIBTOOL,;t t
20834 s,@LT_UNDEF@,$LT_UNDEF,;t t
20835 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20836 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20837 s,@LIB_CREATE@,$LIB_CREATE,;t t
20838 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20839 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20840 s,@LIB_PREP@,$LIB_PREP,;t t
20841 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20842 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20843 s,@LIB_LINK@,$LIB_LINK,;t t
20844 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20845 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20846 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20847 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20848 s,@TICS_NAME@,$TICS_NAME,;t t
20849 s,@TINFO_NAME@,$TINFO_NAME,;t t
20850 s,@LIB_NAME@,$LIB_NAME,;t t
20851 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20852 s,@CC_G_OPT@,$CC_G_OPT,;t t
20853 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20854 s,@LD_MODEL@,$LD_MODEL,;t t
20855 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20856 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20857 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20858 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20859 s,@LINK_PROGS@,$LINK_PROGS,;t t
20860 s,@LINK_TESTS@,$LINK_TESTS,;t t
20861 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20862 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20863 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20864 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20865 s,@RPATH_LIST@,$RPATH_LIST,;t t
20866 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20867 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20868 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20869 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20870 s,@XTERM_KBS@,$XTERM_KBS,;t t
20871 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20872 s,@TERMINFO@,$TERMINFO,;t t
20873 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20874 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20875 s,@TERMPATH@,$TERMPATH,;t t
20876 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20877 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20878 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20879 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20880 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20881 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20882 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20883 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20884 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20885 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20886 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20887 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
20888 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
20889 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
20890 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
20891 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
20892 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
20893 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20894 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
20895 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
20896 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
20897 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20898 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
20899 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
20900 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
20901 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
20902 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
20903 s,@PTHREAD@,$PTHREAD,;t t
20904 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20905 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
20906 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
20907 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
20908 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20909 s,@ECHO_LT@,$ECHO_LT,;t t
20910 s,@ECHO_LD@,$ECHO_LD,;t t
20911 s,@RULE_CC@,$RULE_CC,;t t
20912 s,@SHOW_CC@,$SHOW_CC,;t t
20913 s,@ECHO_CC@,$ECHO_CC,;t t
20914 s,@ECHO_LINK@,$ECHO_LINK,;t t
20915 s,@ADAFLAGS@,$ADAFLAGS,;t t
20916 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20917 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
20918 s,@ADA_TRACE@,$ADA_TRACE,;t t
20919 s,@MATH_LIB@,$MATH_LIB,;t t
20920 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
20921 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
20922 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
20923 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
20924 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
20925 s,@TEST_LIBS@,$TEST_LIBS,;t t
20926 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20927 s,@CXXCPP@,$CXXCPP,;t t
20928 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
20929 s,@CXX_AR@,$CXX_AR,;t t
20930 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
20931 s,@CXXLIBS@,$CXXLIBS,;t t
20932 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
20933 s,@gnat_exists@,$gnat_exists,;t t
20934 s,@M4_exists@,$M4_exists,;t t
20935 s,@cf_ada_make@,$cf_ada_make,;t t
20936 s,@cf_compile_generics@,$cf_compile_generics,;t t
20937 s,@cf_generic_objects@,$cf_generic_objects,;t t
20938 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20939 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20940 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20941 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20942 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20943 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20944 s,@cf_ada_package@,$cf_ada_package,;t t
20945 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20946 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20947 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20948 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20949 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20950 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20951 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20952 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20953 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20954 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20955 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20956 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20957 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
20958 s,@TICS_LIBS@,$TICS_LIBS,;t t
20959 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20960 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20961 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20962 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
20963 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
20964 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
20965 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20966 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20967 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20968 s,@TICS_LIST@,$TICS_LIST,;t t
20969 s,@TINFO_LIST@,$TINFO_LIST,;t t
20970 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20971 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20972 s,@TEST_ARGS@,$TEST_ARGS,;t t
20973 s,@TEST_DEPS@,$TEST_DEPS,;t t
20974 s,@TEST_ARG2@,$TEST_ARG2,;t t
20975 s,@TEST_DEP2@,$TEST_DEP2,;t t
20976 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
20977 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20978 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20979 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20980 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20981 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20982 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20983 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20984 s,@cross_compiling@,$cross_compiling,;t t
20985 s,@TIC_PATH@,$TIC_PATH,;t t
20986 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20987 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20988 CEOF
20989
20990 EOF
20991
20992   cat >>$CONFIG_STATUS <<\EOF
20993   # Split the substitutions into bite-sized pieces for seds with
20994   # small command number limits, like on Digital OSF/1 and HP-UX.
20995   ac_max_sed_lines=48
20996   ac_sed_frag=1 # Number of current file.
20997   ac_beg=1 # First line for current file.
20998   ac_end=$ac_max_sed_lines # Line after last line for current file.
20999   ac_more_lines=:
21000   ac_sed_cmds=
21001   while $ac_more_lines; do
21002     if test $ac_beg -gt 1; then
21003       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21004     else
21005       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21006     fi
21007     if test ! -s $tmp/subs.frag; then
21008       ac_more_lines=false
21009     else
21010       # The purpose of the label and of the branching condition is to
21011       # speed up the sed processing (if there are no `@' at all, there
21012       # is no need to browse any of the substitutions).
21013       # These are the two extra sed commands mentioned above.
21014       (echo ':t
21015   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21016       if test -z "$ac_sed_cmds"; then
21017         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21018       else
21019         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21020       fi
21021       ac_sed_frag=`expr $ac_sed_frag + 1`
21022       ac_beg=$ac_end
21023       ac_end=`expr $ac_end + $ac_max_sed_lines`
21024     fi
21025   done
21026   if test -z "$ac_sed_cmds"; then
21027     ac_sed_cmds=cat
21028   fi
21029 fi # test -n "$CONFIG_FILES"
21030
21031 EOF
21032 cat >>$CONFIG_STATUS <<\EOF
21033 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21034   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21035   case $ac_file in
21036   - | *:- | *:-:* ) # input from stdin
21037         cat >$tmp/stdin
21038         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21039         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21040   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21041         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21042   * )   ac_file_in=$ac_file.in ;;
21043   esac
21044
21045   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21046   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21047          X"$ac_file" : 'X\(//\)[^/]' \| \
21048          X"$ac_file" : 'X\(//\)$' \| \
21049          X"$ac_file" : 'X\(/\)' \| \
21050          .     : '\(.\)' 2>/dev/null ||
21051 echo X"$ac_file" |
21052     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21053           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21054           /^X\(\/\/\)$/{ s//\1/; q; }
21055           /^X\(\/\).*/{ s//\1/; q; }
21056           s/.*/./; q'`
21057   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21058     { case "$ac_dir" in
21059   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21060   *)                      as_incr_dir=.;;
21061 esac
21062 as_dummy="$ac_dir"
21063 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21064   case $as_mkdir_dir in
21065     # Skip DOS drivespec
21066     ?:) as_incr_dir=$as_mkdir_dir ;;
21067     *)
21068       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21069       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21070     ;;
21071   esac
21072 done; }
21073
21074     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21075     # A "../" for each directory in $ac_dir_suffix.
21076     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21077   else
21078     ac_dir_suffix= ac_dots=
21079   fi
21080
21081   case $srcdir in
21082   .)  ac_srcdir=.
21083       if test -z "$ac_dots"; then
21084          ac_top_srcdir=.
21085       else
21086          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21087       fi ;;
21088   [\\/]* | ?:[\\/]* )
21089       ac_srcdir=$srcdir$ac_dir_suffix;
21090       ac_top_srcdir=$srcdir ;;
21091   *) # Relative path.
21092     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21093     ac_top_srcdir=$ac_dots$srcdir ;;
21094   esac
21095
21096   case $INSTALL in
21097   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21098   *) ac_INSTALL=$ac_dots$INSTALL ;;
21099   esac
21100
21101   if test x"$ac_file" != x-; then
21102     { echo "$as_me:21102: creating $ac_file" >&5
21103 echo "$as_me: creating $ac_file" >&6;}
21104     rm -f "$ac_file"
21105   fi
21106   # Let's still pretend it is `configure' which instantiates (i.e., don't
21107   # use $as_me), people would be surprised to read:
21108   #    /* config.h.  Generated automatically by config.status.  */
21109   configure_input="Generated automatically from `echo $ac_file_in |
21110                                                  sed 's,.*/,,'` by configure."
21111
21112   # First look for the input files in the build tree, otherwise in the
21113   # src tree.
21114   ac_file_inputs=`IFS=:
21115     for f in $ac_file_in; do
21116       case $f in
21117       -) echo $tmp/stdin ;;
21118       [\\/$]*)
21119          # Absolute (can't be DOS-style, as IFS=:)
21120          test -f "$f" || { { echo "$as_me:21120: error: cannot find input file: $f" >&5
21121 echo "$as_me: error: cannot find input file: $f" >&2;}
21122    { (exit 1); exit 1; }; }
21123          echo $f;;
21124       *) # Relative
21125          if test -f "$f"; then
21126            # Build tree
21127            echo $f
21128          elif test -f "$srcdir/$f"; then
21129            # Source tree
21130            echo $srcdir/$f
21131          else
21132            # /dev/null tree
21133            { { echo "$as_me:21133: error: cannot find input file: $f" >&5
21134 echo "$as_me: error: cannot find input file: $f" >&2;}
21135    { (exit 1); exit 1; }; }
21136          fi;;
21137       esac
21138     done` || { (exit 1); exit 1; }
21139 EOF
21140 cat >>$CONFIG_STATUS <<\EOF
21141   ac_warn_datarootdir=no
21142   if test x"$ac_file" != x-; then
21143     for ac_item in $ac_file_inputs
21144     do
21145       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21146       if test -n "$ac_seen"; then
21147         ac_used=`grep '@datarootdir@' $ac_item`
21148         if test -z "$ac_used"; then
21149           { echo "$as_me:21149: WARNING: datarootdir was used implicitly but not set:
21150 $ac_seen" >&5
21151 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21152 $ac_seen" >&2;}
21153           ac_warn_datarootdir=yes
21154         fi
21155       fi
21156       ac_seen=`grep '${datarootdir}' $ac_item`
21157       if test -n "$ac_seen"; then
21158         { echo "$as_me:21158: WARNING: datarootdir was used explicitly but not set:
21159 $ac_seen" >&5
21160 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21161 $ac_seen" >&2;}
21162         ac_warn_datarootdir=yes
21163       fi
21164     done
21165   fi
21166
21167 if test "x$ac_warn_datarootdir" = xyes; then
21168   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21169 fi
21170
21171 EOF
21172 cat >>$CONFIG_STATUS <<EOF
21173   sed "$ac_vpsub
21174 $extrasub
21175 EOF
21176 cat >>$CONFIG_STATUS <<\EOF
21177 :t
21178 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21179 s,@configure_input@,$configure_input,;t t
21180 s,@srcdir@,$ac_srcdir,;t t
21181 s,@top_srcdir@,$ac_top_srcdir,;t t
21182 s,@INSTALL@,$ac_INSTALL,;t t
21183 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21184   rm -f $tmp/stdin
21185   if test x"$ac_file" != x-; then
21186     cp $tmp/out $ac_file
21187
21188     for ac_name in prefix exec_prefix datarootdir
21189     do
21190         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21191         if test -n "$ac_seen"; then
21192             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21193             if test -z "$ac_init"; then
21194               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21195               { echo "$as_me:21195: WARNING: Variable $ac_name is used but was not set:
21196 $ac_seen" >&5
21197 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21198 $ac_seen" >&2;}
21199             fi
21200         fi
21201     done
21202     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21203     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21204     if test -s $tmp/out; then
21205       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21206       { echo "$as_me:21206: WARNING: Some variables may not be substituted:
21207 $ac_seen" >&5
21208 echo "$as_me: WARNING: Some variables may not be substituted:
21209 $ac_seen" >&2;}
21210     fi
21211   else
21212     cat $tmp/out
21213   fi
21214   rm -f $tmp/out
21215
21216 done
21217 EOF
21218 cat >>$CONFIG_STATUS <<\EOF
21219
21220 #
21221 # CONFIG_HEADER section.
21222 #
21223
21224 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21225 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21226 #
21227 # ac_d sets the value in "#define NAME VALUE" lines.
21228 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21229 ac_dB='[        ].*$,\1#\2'
21230 ac_dC=' '
21231 ac_dD=',;t'
21232 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21233 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21234 ac_iB='\([      ]\),\1#\2define\3'
21235 ac_iC=' '
21236 ac_iD='\4,;t'
21237 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21238 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21239 ac_uB='$,\1#\2define\3'
21240 ac_uC=' '
21241 ac_uD=',;t'
21242
21243 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21244   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21245   case $ac_file in
21246   - | *:- | *:-:* ) # input from stdin
21247         cat >$tmp/stdin
21248         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21249         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21250   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21251         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21252   * )   ac_file_in=$ac_file.in ;;
21253   esac
21254
21255   test x"$ac_file" != x- && { echo "$as_me:21255: creating $ac_file" >&5
21256 echo "$as_me: creating $ac_file" >&6;}
21257
21258   # First look for the input files in the build tree, otherwise in the
21259   # src tree.
21260   ac_file_inputs=`IFS=:
21261     for f in $ac_file_in; do
21262       case $f in
21263       -) echo $tmp/stdin ;;
21264       [\\/$]*)
21265          # Absolute (can't be DOS-style, as IFS=:)
21266          test -f "$f" || { { echo "$as_me:21266: error: cannot find input file: $f" >&5
21267 echo "$as_me: error: cannot find input file: $f" >&2;}
21268    { (exit 1); exit 1; }; }
21269          echo $f;;
21270       *) # Relative
21271          if test -f "$f"; then
21272            # Build tree
21273            echo $f
21274          elif test -f "$srcdir/$f"; then
21275            # Source tree
21276            echo $srcdir/$f
21277          else
21278            # /dev/null tree
21279            { { echo "$as_me:21279: error: cannot find input file: $f" >&5
21280 echo "$as_me: error: cannot find input file: $f" >&2;}
21281    { (exit 1); exit 1; }; }
21282          fi;;
21283       esac
21284     done` || { (exit 1); exit 1; }
21285   # Remove the trailing spaces.
21286   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21287
21288 EOF
21289
21290 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21291 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21292 # be either 'cat' or 'sort'.
21293 cat confdefs.h | uniq >conftest.vals
21294
21295 # Break up conftest.vals because some shells have a limit on
21296 # the size of here documents, and old seds have small limits too.
21297
21298 rm -f conftest.tail
21299 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21300 while grep . conftest.vals >/dev/null
21301 do
21302   # Write chunks of a limited-size here document to conftest.frag.
21303   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21304   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21305   echo 'CEOF' >> $CONFIG_STATUS
21306   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21307   rm -f conftest.vals
21308   mv conftest.tail conftest.vals
21309 done
21310 rm -f conftest.vals
21311
21312 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21313 # marker @DEFS@.
21314 echo '  cat >> conftest.edit <<CEOF
21315 /@DEFS@/r conftest.frag
21316 /@DEFS@/d
21317 CEOF
21318 sed -f conftest.edit $tmp/in > $tmp/out
21319 rm -f $tmp/in
21320 mv $tmp/out $tmp/in
21321 rm -f conftest.edit conftest.frag
21322 ' >> $CONFIG_STATUS
21323
21324 cat >>$CONFIG_STATUS <<\EOF
21325   # Let's still pretend it is `configure' which instantiates (i.e., don't
21326   # use $as_me), people would be surprised to read:
21327   #    /* config.h.  Generated automatically by config.status.  */
21328   if test x"$ac_file" = x-; then
21329     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21330   else
21331     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21332   fi
21333   cat $tmp/in >>$tmp/config.h
21334   rm -f $tmp/in
21335   if test x"$ac_file" != x-; then
21336     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21337       { echo "$as_me:21337: $ac_file is unchanged" >&5
21338 echo "$as_me: $ac_file is unchanged" >&6;}
21339     else
21340       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21341          X"$ac_file" : 'X\(//\)[^/]' \| \
21342          X"$ac_file" : 'X\(//\)$' \| \
21343          X"$ac_file" : 'X\(/\)' \| \
21344          .     : '\(.\)' 2>/dev/null ||
21345 echo X"$ac_file" |
21346     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21347           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21348           /^X\(\/\/\)$/{ s//\1/; q; }
21349           /^X\(\/\).*/{ s//\1/; q; }
21350           s/.*/./; q'`
21351       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21352         { case "$ac_dir" in
21353   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21354   *)                      as_incr_dir=.;;
21355 esac
21356 as_dummy="$ac_dir"
21357 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21358   case $as_mkdir_dir in
21359     # Skip DOS drivespec
21360     ?:) as_incr_dir=$as_mkdir_dir ;;
21361     *)
21362       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21363       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21364     ;;
21365   esac
21366 done; }
21367
21368       fi
21369       rm -f $ac_file
21370       mv $tmp/config.h $ac_file
21371     fi
21372   else
21373     cat $tmp/config.h
21374     rm -f $tmp/config.h
21375   fi
21376 done
21377 EOF
21378 cat >>$CONFIG_STATUS <<\EOF
21379 #
21380 # CONFIG_COMMANDS section.
21381 #
21382 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21383   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21384   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21385
21386   case $ac_dest in
21387     default )
21388 if test "x$cf_with_tests" != xno ; then
21389
21390 for cf_dir in test
21391 do
21392         if test ! -d $srcdir/$cf_dir; then
21393                 continue
21394         elif test -f $srcdir/$cf_dir/programs; then
21395                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21396         fi
21397 done
21398
21399 fi
21400
21401 cf_prefix=$LIB_PREFIX
21402
21403 case $cf_cv_shlib_version in #(vi
21404 cygdll|mingw)
21405         TINFO_NAME=$TINFO_ARG_SUFFIX
21406         TINFO_SUFFIX=.dll
21407         ;;
21408 esac
21409
21410 if test -n "$TINFO_SUFFIX" ; then
21411         case $TINFO_SUFFIX in
21412         tw*)
21413                 TINFO_NAME="${TINFO_NAME}tw"
21414                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21415                 ;;
21416         t*)
21417                 TINFO_NAME="${TINFO_NAME}t"
21418                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21419                 ;;
21420         w*)
21421                 TINFO_NAME="${TINFO_NAME}w"
21422                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21423                 ;;
21424         esac
21425 fi
21426
21427 for cf_dir in $SRC_SUBDIRS
21428 do
21429         if test ! -d $srcdir/$cf_dir ; then
21430                 continue
21431         elif test -f $srcdir/$cf_dir/modules; then
21432
21433                 SHARED_LIB=
21434                 Libs_To_Make=
21435                 for cf_item in $cf_LIST_MODELS
21436                 do
21437
21438         case $cf_item in #(vi
21439         libtool) #(vi
21440                 cf_suffix='.la'
21441                 cf_depsuf=$cf_suffix
21442                 ;;
21443         normal) #(vi
21444                 cf_suffix='.a'
21445                 cf_depsuf=$cf_suffix
21446                 ;;
21447         debug) #(vi
21448                 cf_suffix='_g.a'
21449                 cf_depsuf=$cf_suffix
21450                 ;;
21451         profile) #(vi
21452                 cf_suffix='_p.a'
21453                 cf_depsuf=$cf_suffix
21454                 ;;
21455         shared) #(vi
21456                 case $cf_cv_system_name in
21457                 aix[5-7]*) #(vi
21458                         cf_suffix='.a'
21459                         cf_depsuf=$cf_suffix
21460                         ;;
21461                 cygwin*|mingw*) #(vi
21462                         cf_suffix='.dll'
21463                         cf_depsuf='.dll.a'
21464                         ;;
21465                 darwin*) #(vi
21466                         cf_suffix='.dylib'
21467                         cf_depsuf=$cf_suffix
21468                         ;;
21469                 hpux*) #(vi
21470                         case $target in
21471                         ia64*) #(vi
21472                                 cf_suffix='.so'
21473                                 cf_depsuf=$cf_suffix
21474                                 ;;
21475                         *) #(vi
21476                                 cf_suffix='.sl'
21477                                 cf_depsuf=$cf_suffix
21478                                 ;;
21479                         esac
21480                         ;;
21481                 *)      cf_suffix='.so'
21482                         cf_depsuf=$cf_suffix
21483                         ;;
21484                 esac
21485         esac
21486         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21487         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21488
21489                         if test $cf_item = shared ; then
21490                         if test "$cf_cv_do_symlinks" = yes ; then
21491                                 case "$cf_cv_shlib_version" in #(vi
21492                                 rel) #(vi
21493                                         case "$cf_cv_system_name" in #(vi
21494                                         darwin*)
21495                                         case .${LIB_SUFFIX} in
21496                                         .tw*)
21497                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21498                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21499                                                 ;;
21500                                         .t*)
21501                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21502                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21503                                                 ;;
21504                                         .w*)
21505                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21506                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21507                                                 ;;
21508                                         *)
21509                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21510                                                 ;;
21511                                         esac
21512                                         ;; #(vi
21513                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21514                                         esac
21515                                         ;;
21516                                 abi)
21517                                         case "$cf_cv_system_name" in #(vi
21518                                         darwin*)
21519                                         case .${LIB_SUFFIX} in
21520                                         .tw*)
21521                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21522                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21523                                                 ;;
21524                                         .t*)
21525                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21526                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21527                                                 ;;
21528                                         .w*)
21529                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21530                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21531                                                 ;;
21532                                         *)
21533                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21534                                                 ;;
21535                                         esac
21536                                         ;; #(vi
21537                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21538                                         esac
21539                                         ;;
21540                                 esac
21541                         fi
21542                         # cygwin needs import library, and has unique naming convention
21543                         # use autodetected ${cf_prefix} for import lib and static lib, but
21544                         # use 'cyg' prefix for shared lib.
21545                         case $cf_cv_shlib_version in #(vi
21546                         cygdll) #(vi
21547                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21548                                 Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_dir}${cf_cygsuf}"
21549                                 continue
21550                                 ;;
21551                         mingw)
21552                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21553                                 Libs_To_Make="$Libs_To_Make ../lib/lib${cf_dir}${cf_cygsuf}"
21554                                 continue
21555                                 ;;
21556                         esac
21557                         fi
21558                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21559                 done
21560
21561                 if test $cf_dir = ncurses ; then
21562                         cf_subsets="$LIB_SUBSETS"
21563                         cf_r_parts="$cf_subsets"
21564                         cf_liblist="$Libs_To_Make"
21565
21566                         while test -n "$cf_r_parts"
21567                         do
21568                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21569                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21570                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21571                                         cf_item=
21572                                         case $cf_l_parts in #(vi
21573                                         *termlib*) #(vi
21574                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21575                                                 ;;
21576                                         *ticlib*)
21577                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21578                                                 ;;
21579                                         *)
21580                                                 break
21581                                                 ;;
21582                                         esac
21583                                         if test -n "$cf_item"; then
21584                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21585                                         fi
21586                                 else
21587                                         break
21588                                 fi
21589                         done
21590                 else
21591                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21592                 fi
21593
21594                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
21595                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21596                         $cf_dir/Makefile >$cf_dir/Makefile.out
21597                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21598
21599                 $AWK -f $srcdir/mk-0th.awk \
21600                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21601                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21602
21603                 for cf_subset in $cf_subsets
21604                 do
21605                         cf_subdirs=
21606                         for cf_item in $cf_LIST_MODELS
21607                         do
21608                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21609
21610 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21611
21612         case $cf_item in #(vi
21613         libtool) #(vi
21614                 cf_suffix='.la'
21615                 cf_depsuf=$cf_suffix
21616                 ;;
21617         normal) #(vi
21618                 cf_suffix='.a'
21619                 cf_depsuf=$cf_suffix
21620                 ;;
21621         debug) #(vi
21622                 cf_suffix='_g.a'
21623                 cf_depsuf=$cf_suffix
21624                 ;;
21625         profile) #(vi
21626                 cf_suffix='_p.a'
21627                 cf_depsuf=$cf_suffix
21628                 ;;
21629         shared) #(vi
21630                 case $cf_cv_system_name in
21631                 aix[5-7]*) #(vi
21632                         cf_suffix='.a'
21633                         cf_depsuf=$cf_suffix
21634                         ;;
21635                 cygwin*|mingw*) #(vi
21636                         cf_suffix='.dll'
21637                         cf_depsuf='.dll.a'
21638                         ;;
21639                 darwin*) #(vi
21640                         cf_suffix='.dylib'
21641                         cf_depsuf=$cf_suffix
21642                         ;;
21643                 hpux*) #(vi
21644                         case $target in
21645                         ia64*) #(vi
21646                                 cf_suffix='.so'
21647                                 cf_depsuf=$cf_suffix
21648                                 ;;
21649                         *) #(vi
21650                                 cf_suffix='.sl'
21651                                 cf_depsuf=$cf_suffix
21652                                 ;;
21653                         esac
21654                         ;;
21655                 *)      cf_suffix='.so'
21656                         cf_depsuf=$cf_suffix
21657                         ;;
21658                 esac
21659         esac
21660         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21661         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21662
21663         case $cf_item in
21664         libtool) cf_subdir='obj_lo'  ;;
21665         normal)  cf_subdir='objects' ;;
21666         debug)   cf_subdir='obj_g' ;;
21667         profile) cf_subdir='obj_p' ;;
21668         shared)
21669                 case $cf_cv_system_name in #(vi
21670                 cygwin) #(vi
21671                         cf_subdir='objects' ;;
21672                 *)
21673                         cf_subdir='obj_s' ;;
21674                 esac
21675         esac
21676
21677                         # Test for case where we build libtinfo with a different name.
21678                         cf_libname=$cf_dir
21679                         if test $cf_dir = ncurses ; then
21680                                 case $cf_subset in
21681                                 *base*)
21682                                         cf_libname=${cf_libname}$LIB_SUFFIX
21683                                         ;;
21684                                 *termlib*)
21685                                         cf_libname=$TINFO_LIB_SUFFIX
21686                                         ;;
21687                                 ticlib*)
21688                                         cf_libname=$TICS_LIB_SUFFIX
21689                                         ;;
21690                                 esac
21691                         else
21692                                 cf_libname=${cf_libname}$LIB_SUFFIX
21693                         fi
21694                         if test -n "${DFT_ARG_SUFFIX}" ; then
21695                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21696                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21697                         fi
21698
21699                         # These dependencies really are for development, not
21700                         # builds, but they are useful in porting, too.
21701                         cf_depend="../include/ncurses_cfg.h"
21702                         if test "$srcdir" = "."; then
21703                                 cf_reldir="."
21704                         else
21705                                 cf_reldir="\${srcdir}"
21706                         fi
21707
21708                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21709                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21710                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21711                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21712                         fi
21713
21714                         cf_dir_suffix=
21715                         old_cf_suffix="$cf_suffix"
21716                         if test "$cf_cv_shlib_version_infix" = yes ; then
21717                         if test -n "$LIB_SUFFIX" ; then
21718                                 case $LIB_SUFFIX in
21719                                 tw*)
21720                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21721                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21722                                         cf_dir_suffix=tw
21723                                         ;;
21724                                 t*)
21725                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21726                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21727                                         cf_dir_suffix=t
21728                                         ;;
21729                                 w*)
21730                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21731                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21732                                         cf_dir_suffix=w
21733                                         ;;
21734                                 esac
21735                         fi
21736                         fi
21737
21738                         $AWK -f $srcdir/mk-1st.awk \
21739                                 name=${cf_libname}${cf_dir_suffix} \
21740                                 traces=$LIB_TRACING \
21741                                 MODEL=$cf_ITEM \
21742                                 model=$cf_subdir \
21743                                 prefix=$cf_prefix \
21744                                 suffix=$cf_suffix \
21745                                 subset=$cf_subset \
21746                                 driver=$cf_cv_term_driver \
21747                                 SymLink="$LN_S" \
21748                                 TermlibRoot=$TINFO_NAME \
21749                                 TermlibSuffix=$TINFO_SUFFIX \
21750                                 ShlibVer=$cf_cv_shlib_version \
21751                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21752                                 ReLink=${cf_cv_do_relink:-no} \
21753                                 DoLinks=$cf_cv_do_symlinks \
21754                                 rmSoLocs=$cf_cv_rm_so_locs \
21755                                 ldconfig="$LDCONFIG" \
21756                                 overwrite=$WITH_OVERWRITE \
21757                                 depend="$cf_depend" \
21758                                 host="$host" \
21759                                 libtool_version="$LIBTOOL_VERSION" \
21760                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21761
21762                         cf_suffix="$old_cf_suffix"
21763
21764                         for cf_subdir2 in $cf_subdirs lib
21765                         do
21766                                 test $cf_subdir = $cf_subdir2 && break
21767                         done
21768                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21769                         $AWK -f $srcdir/mk-2nd.awk \
21770                                 name=$cf_dir \
21771                                 traces=$LIB_TRACING \
21772                                 MODEL=$cf_ITEM \
21773                                 model=$cf_subdir \
21774                                 subset=$cf_subset \
21775                                 srcdir=$srcdir \
21776                                 echo=$WITH_ECHO \
21777                                 crenames=$cf_cv_prog_CC_c_o \
21778                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21779                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21780                         cf_subdirs="$cf_subdirs $cf_subdir"
21781                         done
21782                 done
21783         fi
21784
21785         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
21786 done
21787
21788 for cf_dir in $SRC_SUBDIRS
21789 do
21790         if test ! -d $srcdir/$cf_dir ; then
21791                 continue
21792         fi
21793
21794         if test -f $cf_dir/Makefile ; then
21795                 case "$cf_dir" in
21796                 Ada95) #(vi
21797                         echo 'libs \' >> Makefile
21798                         echo 'install.libs \' >> Makefile
21799                         echo 'uninstall.libs ::' >> Makefile
21800                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
21801                         ;;
21802                 esac
21803         fi
21804
21805         if test -f $srcdir/$cf_dir/modules; then
21806                 echo >> Makefile
21807                 if test -f $srcdir/$cf_dir/headers; then
21808 cat >> Makefile <<CF_EOF
21809 install.includes \\
21810 uninstall.includes \\
21811 CF_EOF
21812                 fi
21813 if test "$cf_dir" != "c++" ; then
21814 echo 'lint \' >> Makefile
21815 fi
21816 cat >> Makefile <<CF_EOF
21817 libs \\
21818 lintlib \\
21819 install.libs \\
21820 uninstall.libs \\
21821 install.$cf_dir \\
21822 uninstall.$cf_dir ::
21823         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
21824 CF_EOF
21825         elif test -f $srcdir/$cf_dir/headers; then
21826 cat >> Makefile <<CF_EOF
21827
21828 libs \\
21829 install.libs \\
21830 uninstall.libs \\
21831 install.includes \\
21832 uninstall.includes ::
21833         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
21834 CF_EOF
21835 fi
21836 done
21837
21838 cat >> Makefile <<CF_EOF
21839
21840 install.libs uninstall.libs \\
21841 install.data uninstall.data ::
21842 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
21843 CF_EOF
21844
21845 if test "x$cf_with_manpages" = xyes; then
21846 cat >> Makefile <<CF_EOF
21847
21848 install.man \\
21849 uninstall.man ::
21850         cd man && \${MAKE} \${TOP_MFLAGS} \$@
21851 CF_EOF
21852 fi
21853
21854 cat >> Makefile <<CF_EOF
21855
21856 distclean ::
21857         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21858         rm -f headers.sh headers.sed mk_shared_lib.sh
21859         rm -f edit_man.* man_alias.*
21860         rm -rf \${DIRS_TO_MAKE}
21861 CF_EOF
21862
21863 # Special case: tack's manpage lives in its own directory.
21864 if test "x$cf_with_manpages" = xyes; then
21865 if test -d tack ; then
21866 if test -f $srcdir/$tack.h; then
21867 cat >> Makefile <<CF_EOF
21868
21869 install.man \\
21870 uninstall.man ::
21871         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
21872 CF_EOF
21873 fi
21874 fi
21875 fi
21876
21877 rm -f headers.sed headers.sh
21878
21879 echo creating headers.sh
21880 cat >headers.sh <<CF_EOF
21881 #! /bin/sh
21882 # This shell script is generated by the 'configure' script.  It is invoked in a
21883 # subdirectory of the build tree.  It generates a sed-script in the parent
21884 # directory that is used to adjust includes for header files that reside in a
21885 # subdirectory of /usr/include, etc.
21886 PRG=""
21887 while test \$# != 3
21888 do
21889 PRG="\$PRG \$1"; shift
21890 done
21891 DST=\$1
21892 REF=\$2
21893 SRC=\$3
21894 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21895 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21896 echo installing \$SRC in \$DST
21897 CF_EOF
21898
21899 if test $WITH_CURSES_H = yes; then
21900         cat >>headers.sh <<CF_EOF
21901 case \$DST in
21902 /*/include/*)
21903         END=\`basename \$DST\`
21904         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21905         do
21906                 NAME=\`basename \$i\`
21907                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21908         done
21909         ;;
21910 *)
21911         echo "" >> \$TMPSED
21912         ;;
21913 esac
21914 CF_EOF
21915
21916 else
21917         cat >>headers.sh <<CF_EOF
21918 case \$DST in
21919 /*/include/*)
21920         END=\`basename \$DST\`
21921         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21922         do
21923                 NAME=\`basename \$i\`
21924                 if test "\$NAME" = "curses.h"
21925                 then
21926                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21927                         NAME=ncurses.h
21928                 fi
21929                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21930         done
21931         ;;
21932 *)
21933         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21934         ;;
21935 esac
21936 CF_EOF
21937 fi
21938 cat >>headers.sh <<CF_EOF
21939 rm -f \$TMPSRC
21940 sed -f \$TMPSED \$SRC > \$TMPSRC
21941 NAME=\`basename \$SRC\`
21942 CF_EOF
21943 if test $WITH_CURSES_H != yes; then
21944         cat >>headers.sh <<CF_EOF
21945 test "\$NAME" = "curses.h" && NAME=ncurses.h
21946 CF_EOF
21947 fi
21948 cat >>headers.sh <<CF_EOF
21949 # Just in case someone gzip'd manpages, remove the conflicting copy.
21950 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21951
21952 eval \$PRG \$TMPSRC \$DST/\$NAME
21953 rm -f \$TMPSRC \$TMPSED
21954 CF_EOF
21955
21956 chmod 0755 headers.sh
21957
21958 for cf_dir in $SRC_SUBDIRS
21959 do
21960         if test ! -d $srcdir/$cf_dir ; then
21961                 continue
21962         fi
21963
21964         if test -f $srcdir/$cf_dir/headers; then
21965                 $AWK -f $srcdir/mk-hdr.awk \
21966                         subset="$LIB_SUBSETS" \
21967                         compat="$WITH_CURSES_H" \
21968                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
21969         fi
21970
21971         if test -f $srcdir/$cf_dir/modules; then
21972                 if test "$cf_dir" != "c++" ; then
21973                         cat >>$cf_dir/Makefile <<"CF_EOF"
21974 depend : ${AUTO_SRC}
21975         makedepend -- ${CPPFLAGS} -- ${C_SRC}
21976
21977 # DO NOT DELETE THIS LINE -- make depend depends on it.
21978 CF_EOF
21979                 fi
21980         fi
21981 done
21982
21983 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21984 if test -z "$USE_OLD_MAKERULES" ; then
21985         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
21986 fi
21987 fi
21988  ;;
21989   esac
21990 done
21991 EOF
21992
21993 cat >>$CONFIG_STATUS <<\EOF
21994
21995 { (exit 0); exit 0; }
21996 EOF
21997 chmod +x $CONFIG_STATUS
21998 ac_clean_files=$ac_clean_files_save
21999
22000 # configure is writing to config.log, and then calls config.status.
22001 # config.status does its own redirection, appending to config.log.
22002 # Unfortunately, on DOS this fails, as config.log is still kept open
22003 # by configure, so config.status won't be able to write to it; its
22004 # output is simply discarded.  So we exec the FD to /dev/null,
22005 # effectively closing config.log, so it can be properly (re)opened and
22006 # appended to by config.status.  When coming back to configure, we
22007 # need to make the FD available again.
22008 if test "$no_create" != yes; then
22009   ac_cs_success=:
22010   exec 5>/dev/null
22011   $SHELL $CONFIG_STATUS || ac_cs_success=false
22012   exec 5>>config.log
22013   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22014   # would make configure fail if this is the last instruction.
22015   $ac_cs_success || { (exit 1); exit 1; }
22016 fi
22017 ${MAKE:-make} preinstall