]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
b72b4bdd8bb07e6192f8accb052aa9f65e90b861
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.629 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20150926.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --with-extra-suffix=X   append extra suffix to header/library paths
751   --disable-overwrite     put headers in subdir, omit link to -lcurses
752   --disable-database      do not use terminfo, only fallbacks/termcap
753   --with-database=XXX     specify terminfo source to install
754   --with-hashed-db        specify hashed-database library
755   --with-fallbacks=XXX    specify list of fallback terminal descriptions
756   --without-xterm-new     specify if xterm terminfo should be old version
757   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
758   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760   --disable-big-core      assume machine has little memory
761   --disable-big-strings   assume compiler has only standard-size strings
762   --enable-termcap        compile in termcap fallback support
763   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764   --enable-getcap         fast termcap load, no xrefs to terminfo
765   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
766   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767   --disable-root-environ  restrict environment when running as root
768   --enable-symlinks       make tic use symbolic links not hard links
769   --enable-broken_linker  compile with broken-linker support code
770   --enable-bsdpad         recognize BSD-style prefix padding
771   --enable-widec          compile with wide-char/UTF-8 code
772   --disable-lp64          allow chtype to be long (ignore _LP64)
773   --disable-largefile     omit support for large files
774   --disable-tparm-varargs compile tparm() without varargs interface
775   --disable-tic-depends   link tic library without explicit dependency on ncurses library
776   --with-bool=TYPE        override fallback type of bool variable
777   --with-caps=alt         compile with alternate Caps file
778   --with-chtype=TYPE      override type of chtype
779   --with-ospeed=TYPE      override type of ospeed variable
780   --with-mmask-t=TYPE     override type of mmask_t
781   --with-ccharw-max=XXX   override size CCHARW_MAX
782   --with-tparm-arg=TYPE   override parameter type of tparm
783   --with-rcs-ids          compile-in RCS identifiers
784 Options to Specify How Manpages are Installed:
785   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
786                           optionally formatted/catonly, e.g., gzip,formatted
787   --with-manpage-renames  specify manpage-renaming
788   --with-manpage-aliases  specify manpage-aliases using .so
789   --with-manpage-symlinks specify manpage-aliases using symlinks
790   --with-manpage-tbl      specify manpage processing with tbl
791 Extensions:
792   --disable-ext-funcs     disable function-extensions
793   --enable-sp-funcs       enable SCREEN-extensions
794   --enable-term-driver    enable terminal-driver
795   --enable-const          compile with extra/non-standard const
796   --enable-ext-colors     compile for 256-color support
797   --enable-ext-mouse      compile for extended mouse-encoding
798   --enable-ext-putwin     compile with extended putwin/screendump
799   --enable-no-padding     compile with $NCURSES_NO_PADDING code
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --enable-sigwinch       compile with SIGWINCH handler
802   --enable-tcap-names     compile with user-definable terminal capabilities
803 Development Code:
804   --without-develop       disable development options
805   --enable-hard-tabs      compile with hard-tabs code
806   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
807 Experimental Code:
808   --disable-assumed-color do not assume anything about default-colors
809   --disable-hashmap       compile without hashmap scrolling-optimization
810   --enable-colorfgbg      compile-in experimental $COLORFGBG code
811   --enable-interop        compile-in interop bindings
812   --with-pthread          use POSIX thread library
813   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
814   --enable-weak-symbols   enable weak-symbols for pthreads
815   --enable-reentrant      compile with reentrant code
816   --with-wrap-prefix=XXX  override prefix used for public variables
817   --enable-safe-sprintf   compile with experimental safe-sprintf code
818   --disable-scroll-hints  compile without scroll-hints code
819   --enable-wgetch-events  compile with wgetch-events code
820 Testing/development Options:
821   --disable-echo          do not display "compiling" commands
822   --enable-warnings       build: turn on GCC compiler warnings
823   --enable-string-hacks   work around bogus compiler/loader warnings
824   --enable-assertions     test: turn on generation of assertion code
825   --with-dmalloc          test: use Gray Watson's dmalloc library
826   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
827   --with-valgrind         test: use valgrind
828   --disable-leaks         test: free permanent memory, analyze leaks
829   --enable-expanded       test: generate functions for certain macros
830   --disable-macros        test: use functions rather than macros
831   --with-trace            test: add trace() function to all models of ncurses
832   --disable-gnat-projects test: disable GNAT projects even if usable
833 Ada95 Binding Options:
834   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
835   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
836   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
837   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
838
839 Some influential environment variables:
840   CC          C compiler command
841   CFLAGS      C compiler flags
842   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
843               nonstandard directory <lib dir>
844   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
845               headers in a nonstandard directory <include dir>
846   CPP         C preprocessor
847   CXX         C++ compiler command
848   CXXFLAGS    C++ compiler flags
849   CXXCPP      C++ preprocessor
850
851 Use these variables to override the choices made by `configure' or to help
852 it to find libraries and programs with nonstandard names/locations.
853
854 EOF
855 fi
856
857 if test "$ac_init_help" = "recursive"; then
858   # If there are subdirs, report their specific --help.
859   ac_popdir=`pwd`
860   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861     cd $ac_subdir
862     # A "../" for each directory in /$ac_subdir.
863     ac_dots=`echo $ac_subdir |
864              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
865
866     case $srcdir in
867     .) # No --srcdir option.  We are building in place.
868       ac_sub_srcdir=$srcdir ;;
869     [\\/]* | ?:[\\/]* ) # Absolute path.
870       ac_sub_srcdir=$srcdir/$ac_subdir ;;
871     *) # Relative path.
872       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873     esac
874
875     # Check for guested configure; otherwise get Cygnus style configure.
876     if test -f $ac_sub_srcdir/configure.gnu; then
877       echo
878       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
879     elif test -f $ac_sub_srcdir/configure; then
880       echo
881       $SHELL $ac_sub_srcdir/configure  --help=recursive
882     elif test -f $ac_sub_srcdir/configure.ac ||
883            test -f $ac_sub_srcdir/configure.in; then
884       echo
885       $ac_configure --help
886     else
887       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
888     fi
889     cd $ac_popdir
890   done
891 fi
892
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895   cat <<\EOF
896
897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898 Free Software Foundation, Inc.
899 This configure script is free software; the Free Software Foundation
900 gives unlimited permission to copy, distribute and modify it.
901 EOF
902   exit 0
903 fi
904 exec 5>config.log
905 cat >&5 <<EOF
906 This file contains any messages produced by compilers while
907 running configure, to aid debugging if configure makes a mistake.
908
909 It was created by $as_me, which was
910 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
911
912   $ $0 $@
913
914 EOF
915 {
916 cat <<_ASUNAME
917 ## ---------- ##
918 ## Platform.  ##
919 ## ---------- ##
920
921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
926
927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
928 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
929
930 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
931 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
933 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
934 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
935 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
936 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
937
938 PATH = $PATH
939
940 _ASUNAME
941 } >&5
942
943 cat >&5 <<EOF
944 ## ------------ ##
945 ## Core tests.  ##
946 ## ------------ ##
947
948 EOF
949
950 # Keep a trace of the command line.
951 # Strip out --no-create and --no-recursion so they do not pile up.
952 # Also quote any args containing shell meta-characters.
953 ac_configure_args=
954 ac_sep=
955 for ac_arg
956 do
957   case $ac_arg in
958   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959   | --no-cr | --no-c) ;;
960   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
962   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
963     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
964     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
965     ac_sep=" " ;;
966   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
967      ac_sep=" " ;;
968   esac
969   # Get rid of the leading space.
970 done
971
972 # When interrupted or exit'd, cleanup temporary files, and complete
973 # config.log.  We remove comments because anyway the quotes in there
974 # would cause problems or look ugly.
975 trap 'exit_status=$?
976   # Save into config.log some information that might help in debugging.
977   echo >&5
978   echo "## ----------------- ##" >&5
979   echo "## Cache variables.  ##" >&5
980   echo "## ----------------- ##" >&5
981   echo >&5
982   # The following way of writing the cache mishandles newlines in values,
983 {
984   (set) 2>&1 |
985     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
986     *ac_space=\ *)
987       sed -n \
988         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
989           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
990       ;;
991     *)
992       sed -n \
993         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
994       ;;
995     esac;
996 } >&5
997   sed "/^$/d" confdefs.h >conftest.log
998   if test -s conftest.log; then
999     echo >&5
1000     echo "## ------------ ##" >&5
1001     echo "## confdefs.h.  ##" >&5
1002     echo "## ------------ ##" >&5
1003     echo >&5
1004     cat conftest.log >&5
1005   fi
1006   (echo; echo) >&5
1007   test "$ac_signal" != 0 &&
1008     echo "$as_me: caught signal $ac_signal" >&5
1009   echo "$as_me: exit $exit_status" >&5
1010   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1011     exit $exit_status
1012      ' 0
1013 for ac_signal in 1 2 13 15; do
1014   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015 done
1016 ac_signal=0
1017
1018 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1019 rm -rf conftest* confdefs.h
1020 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021 echo >confdefs.h
1022
1023 # Let the site file select an alternate cache file if it wants to.
1024 # Prefer explicitly selected file to automatically selected ones.
1025 if test -z "$CONFIG_SITE"; then
1026   if test "x$prefix" != xNONE; then
1027     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1028   else
1029     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1030   fi
1031 fi
1032 for ac_site_file in $CONFIG_SITE; do
1033   if test -r "$ac_site_file"; then
1034     { echo "$as_me:1034: loading site script $ac_site_file" >&5
1035 echo "$as_me: loading site script $ac_site_file" >&6;}
1036     cat "$ac_site_file" >&5
1037     . "$ac_site_file"
1038   fi
1039 done
1040
1041 if test -r "$cache_file"; then
1042   # Some versions of bash will fail to source /dev/null (special
1043   # files actually), so we avoid doing that.
1044   if test -f "$cache_file"; then
1045     { echo "$as_me:1045: loading cache $cache_file" >&5
1046 echo "$as_me: loading cache $cache_file" >&6;}
1047     case $cache_file in
1048       [\\/]* | ?:[\\/]* ) . $cache_file;;
1049       *)                      . ./$cache_file;;
1050     esac
1051   fi
1052 else
1053   { echo "$as_me:1053: creating cache $cache_file" >&5
1054 echo "$as_me: creating cache $cache_file" >&6;}
1055   >$cache_file
1056 fi
1057
1058 # Check that the precious variables saved in the cache have kept the same
1059 # value.
1060 ac_cache_corrupted=false
1061 for ac_var in `(set) 2>&1 |
1062                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1063   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1064   eval ac_new_set=\$ac_env_${ac_var}_set
1065   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1066   eval ac_new_val="\$ac_env_${ac_var}_value"
1067   case $ac_old_set,$ac_new_set in
1068     set,)
1069       { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1070 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071       ac_cache_corrupted=: ;;
1072     ,set)
1073       { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
1074 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075       ac_cache_corrupted=: ;;
1076     ,);;
1077     *)
1078       if test "x$ac_old_val" != "x$ac_new_val"; then
1079         { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
1080 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1081         { echo "$as_me:1081:   former value:  $ac_old_val" >&5
1082 echo "$as_me:   former value:  $ac_old_val" >&2;}
1083         { echo "$as_me:1083:   current value: $ac_new_val" >&5
1084 echo "$as_me:   current value: $ac_new_val" >&2;}
1085         ac_cache_corrupted=:
1086       fi;;
1087   esac
1088   # Pass precious variables to config.status.  It doesn't matter if
1089   # we pass some twice (in addition to the command line arguments).
1090   if test "$ac_new_set" = set; then
1091     case $ac_new_val in
1092     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1093       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1094       ac_configure_args="$ac_configure_args '$ac_arg'"
1095       ;;
1096     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1097        ;;
1098     esac
1099   fi
1100 done
1101 if $ac_cache_corrupted; then
1102   { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
1103 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1104   { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1105 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106    { (exit 1); exit 1; }; }
1107 fi
1108
1109 ac_ext=c
1110 ac_cpp='$CPP $CPPFLAGS'
1111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114 ac_main_return=return
1115
1116 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1117   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1118                    ECHO_T='     ' ;;
1119   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121 esac
1122 echo "#! $SHELL" >conftest.sh
1123 echo  "exit 0"   >>conftest.sh
1124 chmod +x conftest.sh
1125 if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
1126   (PATH=".;."; conftest.sh) 2>&5
1127   ac_status=$?
1128   echo "$as_me:1128: \$? = $ac_status" >&5
1129   (exit $ac_status); }; then
1130   ac_path_separator=';'
1131 else
1132   ac_path_separator=:
1133 fi
1134 PATH_SEPARATOR="$ac_path_separator"
1135 rm -f conftest.sh
1136
1137 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1138
1139 top_builddir=`pwd`
1140
1141 echo "$as_me:1141: checking for egrep" >&5
1142 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143 if test "${ac_cv_prog_egrep+set}" = set; then
1144   echo $ECHO_N "(cached) $ECHO_C" >&6
1145 else
1146   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1147                 then ac_cv_prog_egrep='grep -E'
1148                 else ac_cv_prog_egrep='egrep'
1149         fi
1150 fi
1151 echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
1152 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1153         EGREP=$ac_cv_prog_egrep
1154
1155         test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
1156 echo "$as_me: error: No egrep program found" >&2;}
1157    { (exit 1); exit 1; }; }
1158
1159 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 cf_cv_abi_version=${NCURSES_MAJOR}
1163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164 cf_cv_timestamp=`date`
1165 echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1166 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1167
1168 if test -f $srcdir/VERSION ; then
1169         echo "$as_me:1169: checking for package version" >&5
1170 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1171
1172         # if there are not enough fields, cut returns the last one...
1173         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1174         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1175         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1176
1177         # this is how CF_BUNDLED_INTL uses $VERSION:
1178         VERSION="$cf_field1"
1179
1180         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181         test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182 echo "$as_me: error: missing major-version" >&2;}
1183    { (exit 1); exit 1; }; }
1184
1185         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1186         test -z "$VERSION_MINOR" && { { echo "$as_me:1186: error: missing minor-version" >&5
1187 echo "$as_me: error: missing minor-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1192
1193         echo "$as_me:1193: checking for package patch date" >&5
1194 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196         case .$VERSION_PATCH in
1197         (.)
1198                 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200    { (exit 1); exit 1; }; }
1201                 ;;
1202         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1203                 ;;
1204         (*)
1205                 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207    { (exit 1); exit 1; }; }
1208                 ;;
1209         esac
1210         echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211 echo "${ECHO_T}$VERSION_PATCH" >&6
1212 else
1213         { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217
1218 # show the actual data that we have for versions:
1219 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1220
1221 echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1222
1223 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1224
1225 echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1226
1227 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1234
1235         cf_PACKAGE=NCURSES
1236         PACKAGE=ncurses
1237
1238 cat >>confdefs.h <<EOF
1239 #define PACKAGE "$PACKAGE"
1240 EOF
1241
1242 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1243
1244         cat >>confdefs.h <<EOF
1245 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1246 EOF
1247
1248         cat >>confdefs.h <<EOF
1249 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1250 EOF
1251
1252 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1253
1254 # Check whether --with-rel-version or --without-rel-version was given.
1255 if test "${with_rel_version+set}" = set; then
1256   withval="$with_rel_version"
1257   { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1258 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259  cf_cv_rel_version=$withval
1260 fi;
1261
1262  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1263  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1264
1265 if test -n "$NCURSES_MAJOR" ; then
1266   case $NCURSES_MAJOR in
1267   ([0-9]*)
1268         ;;
1269   (*)
1270         { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1271 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272    { (exit 1); exit 1; }; }
1273         ;;
1274   esac
1275 else
1276   { { echo "$as_me:1276: error: Release major-version value is empty" >&5
1277 echo "$as_me: error: Release major-version value is empty" >&2;}
1278    { (exit 1); exit 1; }; }
1279 fi
1280
1281 if test -n "$NCURSES_MINOR" ; then
1282   case $NCURSES_MINOR in
1283   ([0-9]*)
1284         ;;
1285   (*)
1286         { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1287 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288    { (exit 1); exit 1; }; }
1289         ;;
1290   esac
1291 else
1292   { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
1293 echo "$as_me: error: Release minor-version value is empty" >&2;}
1294    { (exit 1); exit 1; }; }
1295 fi
1296
1297 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1298
1299 # Check whether --with-abi-version or --without-abi-version was given.
1300 if test "${with_abi_version+set}" = set; then
1301   withval="$with_abi_version"
1302
1303         if test "x$cf_cv_abi_version" != "x$withval"
1304         then
1305                 { echo "$as_me:1305: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1306 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1307                 case $cf_cv_rel_version in
1308                 (5.*)
1309                         cf_cv_rel_version=$withval.0
1310                         ;;
1311                 (6.*)
1312                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1313                         ;;
1314                 esac
1315         fi
1316         cf_cv_abi_version=$withval
1317 fi;
1318
1319 if test -n "$cf_cv_abi_version" ; then
1320   case $cf_cv_abi_version in
1321   ([0-9]*)
1322         ;;
1323   (*)
1324         { { echo "$as_me:1324: error: ABI version is not a number: $cf_cv_abi_version" >&5
1325 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1326    { (exit 1); exit 1; }; }
1327         ;;
1328   esac
1329 else
1330   { { echo "$as_me:1330: error: ABI version value is empty" >&5
1331 echo "$as_me: error: ABI version value is empty" >&2;}
1332    { (exit 1); exit 1; }; }
1333 fi
1334
1335 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1336 then
1337         case $cf_cv_rel_version in
1338         (5.*)
1339                 cf_cv_rel_version=$with_abi_version.0
1340                 ;;
1341         esac
1342 fi
1343
1344 ac_aux_dir=
1345 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1346   if test -f $ac_dir/install-sh; then
1347     ac_aux_dir=$ac_dir
1348     ac_install_sh="$ac_aux_dir/install-sh -c"
1349     break
1350   elif test -f $ac_dir/install.sh; then
1351     ac_aux_dir=$ac_dir
1352     ac_install_sh="$ac_aux_dir/install.sh -c"
1353     break
1354   elif test -f $ac_dir/shtool; then
1355     ac_aux_dir=$ac_dir
1356     ac_install_sh="$ac_aux_dir/shtool install -c"
1357     break
1358   fi
1359 done
1360 if test -z "$ac_aux_dir"; then
1361   { { echo "$as_me:1361: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1362 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1366 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1367 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1368
1369 # Make sure we can run config.sub.
1370 $ac_config_sub sun4 >/dev/null 2>&1 ||
1371   { { echo "$as_me:1371: error: cannot run $ac_config_sub" >&5
1372 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1373    { (exit 1); exit 1; }; }
1374
1375 echo "$as_me:1375: checking build system type" >&5
1376 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1377 if test "${ac_cv_build+set}" = set; then
1378   echo $ECHO_N "(cached) $ECHO_C" >&6
1379 else
1380   ac_cv_build_alias=$build_alias
1381 test -z "$ac_cv_build_alias" &&
1382   ac_cv_build_alias=`$ac_config_guess`
1383 test -z "$ac_cv_build_alias" &&
1384   { { echo "$as_me:1384: error: cannot guess build type; you must specify one" >&5
1385 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1386    { (exit 1); exit 1; }; }
1387 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_build" >&5
1394 echo "${ECHO_T}$ac_cv_build" >&6
1395 build=$ac_cv_build
1396 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 echo "$as_me:1400: checking host system type" >&5
1401 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1402 if test "${ac_cv_host+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_host_alias=$host_alias
1406 test -z "$ac_cv_host_alias" &&
1407   ac_cv_host_alias=$ac_cv_build_alias
1408 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1409   { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1410 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1411    { (exit 1); exit 1; }; }
1412
1413 fi
1414 echo "$as_me:1414: result: $ac_cv_host" >&5
1415 echo "${ECHO_T}$ac_cv_host" >&6
1416 host=$ac_cv_host
1417 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1420
1421 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1422         echo "$as_me:1422: checking target system type" >&5
1423 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1424 if test "${ac_cv_target+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_target_alias=$target_alias
1428 test "x$ac_cv_target_alias" = "x" &&
1429   ac_cv_target_alias=$ac_cv_host_alias
1430 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_target" >&5
1437 echo "${ECHO_T}$ac_cv_target" >&6
1438 target=$ac_cv_target
1439 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 # The aliases save the names the user supplied, while $host etc.
1444 # will get canonicalized.
1445 test -n "$target_alias" &&
1446   test "$program_prefix$program_suffix$program_transform_name" = \
1447     NONENONEs,x,x, &&
1448   program_prefix=${target_alias}-
1449         system_name="$host_os"
1450 else
1451         system_name="`(uname -s -r) 2>/dev/null`"
1452         if test -z "$system_name" ; then
1453                 system_name="`(hostname) 2>/dev/null`"
1454         fi
1455 fi
1456 test -n "$system_name" &&
1457 cat >>confdefs.h <<EOF
1458 #define SYSTEM_NAME "$system_name"
1459 EOF
1460
1461 if test "${cf_cv_system_name+set}" = set; then
1462   echo $ECHO_N "(cached) $ECHO_C" >&6
1463 else
1464   cf_cv_system_name="$system_name"
1465 fi
1466
1467 test -z "$system_name" && system_name="$cf_cv_system_name"
1468 test -n "$cf_cv_system_name" && echo "$as_me:1468: result: Configuring for $cf_cv_system_name" >&5
1469 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1470
1471 if test ".$system_name" != ".$cf_cv_system_name" ; then
1472         echo "$as_me:1472: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1473 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1474         { { echo "$as_me:1474: error: \"Please remove config.cache and try again.\"" >&5
1475 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1476    { (exit 1); exit 1; }; }
1477 fi
1478
1479 # Check whether --with-system-type or --without-system-type was given.
1480 if test "${with_system_type+set}" = set; then
1481   withval="$with_system_type"
1482   { echo "$as_me:1482: WARNING: overriding system type to $withval" >&5
1483 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1484         cf_cv_system_name=$withval
1485         host_os=$withval
1486
1487 fi;
1488
1489 ###     Save the given $CFLAGS to allow user-override.
1490 cf_user_CFLAGS="$CFLAGS"
1491
1492 ###     Default install-location
1493
1494 echo "$as_me:1494: checking for prefix" >&5
1495 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1496 if test "x$prefix" = "xNONE" ; then
1497         case "$cf_cv_system_name" in
1498                 # non-vendor systems don't have a conflict
1499         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1500                 prefix=/usr
1501                 ;;
1502         (*)     prefix=$ac_default_prefix
1503                 ;;
1504         esac
1505 fi
1506 echo "$as_me:1506: result: $prefix" >&5
1507 echo "${ECHO_T}$prefix" >&6
1508
1509 if test "x$prefix" = "xNONE" ; then
1510 echo "$as_me:1510: checking for default include-directory" >&5
1511 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1512 test -n "$verbose" && echo 1>&6
1513 for cf_symbol in \
1514         $includedir \
1515         $includedir/ncurses \
1516         $prefix/include \
1517         $prefix/include/ncurses \
1518         /usr/local/include \
1519         /usr/local/include/ncurses \
1520         /usr/include \
1521         /usr/include/ncurses
1522 do
1523         cf_dir=`eval echo $cf_symbol`
1524         if test -f $cf_dir/curses.h ; then
1525         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1526                 includedir="$cf_symbol"
1527                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1528                 break
1529         fi
1530         fi
1531         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1532 done
1533 echo "$as_me:1533: result: $includedir" >&5
1534 echo "${ECHO_T}$includedir" >&6
1535 fi
1536
1537 ### Defaults for ncurses ABI
1538
1539 case x$cf_cv_abi_version in
1540 (x[6789])
1541         cf_dft_ext_colors=yes
1542         cf_dft_ext_const=yes
1543         cf_dft_ext_mouse=yes
1544         cf_dft_ext_putwin=yes
1545         cf_dft_ext_spfuncs=yes
1546         cf_dft_filter_syms=yes
1547         cf_dft_chtype=uint32_t
1548         cf_dft_mmask_t=uint32_t
1549         cf_dft_interop=yes
1550         cf_dft_tparm_arg=intptr_t
1551         cf_dft_with_lp64=yes
1552         ;;
1553 (*)
1554         cf_dft_ext_colors=no
1555         cf_dft_ext_const=no
1556         cf_dft_ext_mouse=no
1557         cf_dft_ext_putwin=no
1558         cf_dft_ext_spfuncs=no
1559         cf_dft_filter_syms=no
1560         cf_dft_chtype=auto
1561         cf_dft_mmask_t=auto
1562         cf_dft_interop=no
1563         cf_dft_tparm_arg=long
1564         cf_dft_with_lp64=no
1565         ;;
1566 esac
1567
1568 ###     Checks for programs.
1569
1570 # Check whether --with-ada or --without-ada was given.
1571 if test "${with_ada+set}" = set; then
1572   withval="$with_ada"
1573   cf_with_ada=$withval
1574 else
1575   cf_with_ada=yes
1576 fi;
1577 if test "x$cf_with_ada" = xyes
1578 then
1579         cf_PROG_CC="gnatgcc gcc cc"
1580 else
1581         cf_PROG_CC="gcc cc"
1582 fi
1583
1584 ac_ext=c
1585 ac_cpp='$CPP $CPPFLAGS'
1586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1589 ac_main_return=return
1590 if test -n "$ac_tool_prefix"; then
1591   for ac_prog in $cf_PROG_CC
1592   do
1593     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1594 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1595 echo "$as_me:1595: checking for $ac_word" >&5
1596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1597 if test "${ac_cv_prog_CC+set}" = set; then
1598   echo $ECHO_N "(cached) $ECHO_C" >&6
1599 else
1600   if test -n "$CC"; then
1601   ac_cv_prog_CC="$CC" # Let the user override the test.
1602 else
1603   ac_save_IFS=$IFS; IFS=$ac_path_separator
1604 ac_dummy="$PATH"
1605 for ac_dir in $ac_dummy; do
1606   IFS=$ac_save_IFS
1607   test -z "$ac_dir" && ac_dir=.
1608   $as_executable_p "$ac_dir/$ac_word" || continue
1609 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1610 echo "$as_me:1610: found $ac_dir/$ac_word" >&5
1611 break
1612 done
1613
1614 fi
1615 fi
1616 CC=$ac_cv_prog_CC
1617 if test -n "$CC"; then
1618   echo "$as_me:1618: result: $CC" >&5
1619 echo "${ECHO_T}$CC" >&6
1620 else
1621   echo "$as_me:1621: result: no" >&5
1622 echo "${ECHO_T}no" >&6
1623 fi
1624
1625     test -n "$CC" && break
1626   done
1627 fi
1628 if test -z "$CC"; then
1629   ac_ct_CC=$CC
1630   for ac_prog in $cf_PROG_CC
1631 do
1632   # Extract the first word of "$ac_prog", so it can be a program name with args.
1633 set dummy $ac_prog; ac_word=$2
1634 echo "$as_me:1634: checking for $ac_word" >&5
1635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1637   echo $ECHO_N "(cached) $ECHO_C" >&6
1638 else
1639   if test -n "$ac_ct_CC"; then
1640   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1641 else
1642   ac_save_IFS=$IFS; IFS=$ac_path_separator
1643 ac_dummy="$PATH"
1644 for ac_dir in $ac_dummy; do
1645   IFS=$ac_save_IFS
1646   test -z "$ac_dir" && ac_dir=.
1647   $as_executable_p "$ac_dir/$ac_word" || continue
1648 ac_cv_prog_ac_ct_CC="$ac_prog"
1649 echo "$as_me:1649: found $ac_dir/$ac_word" >&5
1650 break
1651 done
1652
1653 fi
1654 fi
1655 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1656 if test -n "$ac_ct_CC"; then
1657   echo "$as_me:1657: result: $ac_ct_CC" >&5
1658 echo "${ECHO_T}$ac_ct_CC" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$ac_ct_CC" && break
1665 done
1666
1667   CC=$ac_ct_CC
1668 fi
1669
1670 test -z "$CC" && { { echo "$as_me:1670: error: no acceptable cc found in \$PATH" >&5
1671 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1672    { (exit 1); exit 1; }; }
1673
1674 # Provide some information about the compiler.
1675 echo "$as_me:1675:" \
1676      "checking for C compiler version" >&5
1677 ac_compiler=`set X $ac_compile; echo $2`
1678 { (eval echo "$as_me:1678: \"$ac_compiler --version </dev/null >&5\"") >&5
1679   (eval $ac_compiler --version </dev/null >&5) 2>&5
1680   ac_status=$?
1681   echo "$as_me:1681: \$? = $ac_status" >&5
1682   (exit $ac_status); }
1683 { (eval echo "$as_me:1683: \"$ac_compiler -v </dev/null >&5\"") >&5
1684   (eval $ac_compiler -v </dev/null >&5) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); }
1688 { (eval echo "$as_me:1688: \"$ac_compiler -V </dev/null >&5\"") >&5
1689   (eval $ac_compiler -V </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693
1694 cat >conftest.$ac_ext <<_ACEOF
1695 #line 1695 "configure"
1696 #include "confdefs.h"
1697
1698 int
1699 main ()
1700 {
1701
1702   ;
1703   return 0;
1704 }
1705 _ACEOF
1706 ac_clean_files_save=$ac_clean_files
1707 ac_clean_files="$ac_clean_files a.out a.exe"
1708 # Try to create an executable without -o first, disregard a.out.
1709 # It will help us diagnose broken compilers, and finding out an intuition
1710 # of exeext.
1711 echo "$as_me:1711: checking for C compiler default output" >&5
1712 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1713 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1714 if { (eval echo "$as_me:1714: \"$ac_link_default\"") >&5
1715   (eval $ac_link_default) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }; then
1719   # Find the output, starting from the most likely.  This scheme is
1720 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1721 # resort.
1722 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1723                 ls a.out conftest 2>/dev/null;
1724                 ls a.* conftest.* 2>/dev/null`; do
1725   case $ac_file in
1726     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1727     a.out ) # We found the default executable, but exeext='' is most
1728             # certainly right.
1729             break;;
1730     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1731           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1732           export ac_cv_exeext
1733           break;;
1734     * ) break;;
1735   esac
1736 done
1737 else
1738   echo "$as_me: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
1740 { { echo "$as_me:1740: error: C compiler cannot create executables" >&5
1741 echo "$as_me: error: C compiler cannot create executables" >&2;}
1742    { (exit 77); exit 77; }; }
1743 fi
1744
1745 ac_exeext=$ac_cv_exeext
1746 echo "$as_me:1746: result: $ac_file" >&5
1747 echo "${ECHO_T}$ac_file" >&6
1748
1749 # Check the compiler produces executables we can run.  If not, either
1750 # the compiler is broken, or we cross compile.
1751 echo "$as_me:1751: checking whether the C compiler works" >&5
1752 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1753 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1754 # If not cross compiling, check that we can run a simple program.
1755 if test "$cross_compiling" != yes; then
1756   if { ac_try='./$ac_file'
1757   { (eval echo "$as_me:1757: \"$ac_try\"") >&5
1758   (eval $ac_try) 2>&5
1759   ac_status=$?
1760   echo "$as_me:1760: \$? = $ac_status" >&5
1761   (exit $ac_status); }; }; then
1762     cross_compiling=no
1763   else
1764     if test "$cross_compiling" = maybe; then
1765         cross_compiling=yes
1766     else
1767         { { echo "$as_me:1767: error: cannot run C compiled programs.
1768 If you meant to cross compile, use \`--host'." >&5
1769 echo "$as_me: error: cannot run C compiled programs.
1770 If you meant to cross compile, use \`--host'." >&2;}
1771    { (exit 1); exit 1; }; }
1772     fi
1773   fi
1774 fi
1775 echo "$as_me:1775: result: yes" >&5
1776 echo "${ECHO_T}yes" >&6
1777
1778 rm -f a.out a.exe conftest$ac_cv_exeext
1779 ac_clean_files=$ac_clean_files_save
1780 # Check the compiler produces executables we can run.  If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether we are cross compiling" >&5
1783 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1784 echo "$as_me:1784: result: $cross_compiling" >&5
1785 echo "${ECHO_T}$cross_compiling" >&6
1786
1787 echo "$as_me:1787: checking for executable suffix" >&5
1788 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1789 if { (eval echo "$as_me:1789: \"$ac_link\"") >&5
1790   (eval $ac_link) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; then
1794   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1795 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1796 # work properly (i.e., refer to `conftest.exe'), while it won't with
1797 # `rm'.
1798 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1799   case $ac_file in
1800     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1801     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802           export ac_cv_exeext
1803           break;;
1804     * ) break;;
1805   esac
1806 done
1807 else
1808   { { echo "$as_me:1808: error: cannot compute EXEEXT: cannot compile and link" >&5
1809 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1810    { (exit 1); exit 1; }; }
1811 fi
1812
1813 rm -f conftest$ac_cv_exeext
1814 echo "$as_me:1814: result: $ac_cv_exeext" >&5
1815 echo "${ECHO_T}$ac_cv_exeext" >&6
1816
1817 rm -f conftest.$ac_ext
1818 EXEEXT=$ac_cv_exeext
1819 ac_exeext=$EXEEXT
1820 echo "$as_me:1820: checking for object suffix" >&5
1821 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1822 if test "${ac_cv_objext+set}" = set; then
1823   echo $ECHO_N "(cached) $ECHO_C" >&6
1824 else
1825   cat >conftest.$ac_ext <<_ACEOF
1826 #line 1826 "configure"
1827 #include "confdefs.h"
1828
1829 int
1830 main ()
1831 {
1832
1833   ;
1834   return 0;
1835 }
1836 _ACEOF
1837 rm -f conftest.o conftest.obj
1838 if { (eval echo "$as_me:1838: \"$ac_compile\"") >&5
1839   (eval $ac_compile) 2>&5
1840   ac_status=$?
1841   echo "$as_me:1841: \$? = $ac_status" >&5
1842   (exit $ac_status); }; then
1843   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1844   case $ac_file in
1845     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1846     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1847        break;;
1848   esac
1849 done
1850 else
1851   echo "$as_me: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 { { echo "$as_me:1853: error: cannot compute OBJEXT: cannot compile" >&5
1854 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1855    { (exit 1); exit 1; }; }
1856 fi
1857
1858 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1859 fi
1860 echo "$as_me:1860: result: $ac_cv_objext" >&5
1861 echo "${ECHO_T}$ac_cv_objext" >&6
1862 OBJEXT=$ac_cv_objext
1863 ac_objext=$OBJEXT
1864 echo "$as_me:1864: checking whether we are using the GNU C compiler" >&5
1865 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1866 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1867   echo $ECHO_N "(cached) $ECHO_C" >&6
1868 else
1869   cat >conftest.$ac_ext <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1872
1873 int
1874 main ()
1875 {
1876 #ifndef __GNUC__
1877        choke me
1878 #endif
1879
1880   ;
1881   return 0;
1882 }
1883 _ACEOF
1884 rm -f conftest.$ac_objext
1885 if { (eval echo "$as_me:1885: \"$ac_compile\"") >&5
1886   (eval $ac_compile) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit $ac_status); } &&
1890          { ac_try='test -s conftest.$ac_objext'
1891   { (eval echo "$as_me:1891: \"$ac_try\"") >&5
1892   (eval $ac_try) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); }; }; then
1896   ac_compiler_gnu=yes
1897 else
1898   echo "$as_me: failed program was:" >&5
1899 cat conftest.$ac_ext >&5
1900 ac_compiler_gnu=no
1901 fi
1902 rm -f conftest.$ac_objext conftest.$ac_ext
1903 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1904
1905 fi
1906 echo "$as_me:1906: result: $ac_cv_c_compiler_gnu" >&5
1907 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1908 GCC=`test $ac_compiler_gnu = yes && echo yes`
1909 ac_test_CFLAGS=${CFLAGS+set}
1910 ac_save_CFLAGS=$CFLAGS
1911 CFLAGS="-g"
1912 echo "$as_me:1912: checking whether $CC accepts -g" >&5
1913 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1914 if test "${ac_cv_prog_cc_g+set}" = set; then
1915   echo $ECHO_N "(cached) $ECHO_C" >&6
1916 else
1917   cat >conftest.$ac_ext <<_ACEOF
1918 #line 1918 "configure"
1919 #include "confdefs.h"
1920
1921 int
1922 main ()
1923 {
1924
1925   ;
1926   return 0;
1927 }
1928 _ACEOF
1929 rm -f conftest.$ac_objext
1930 if { (eval echo "$as_me:1930: \"$ac_compile\"") >&5
1931   (eval $ac_compile) 2>&5
1932   ac_status=$?
1933   echo "$as_me:1933: \$? = $ac_status" >&5
1934   (exit $ac_status); } &&
1935          { ac_try='test -s conftest.$ac_objext'
1936   { (eval echo "$as_me:1936: \"$ac_try\"") >&5
1937   (eval $ac_try) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); }; }; then
1941   ac_cv_prog_cc_g=yes
1942 else
1943   echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 ac_cv_prog_cc_g=no
1946 fi
1947 rm -f conftest.$ac_objext conftest.$ac_ext
1948 fi
1949 echo "$as_me:1949: result: $ac_cv_prog_cc_g" >&5
1950 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951 if test "$ac_test_CFLAGS" = set; then
1952   CFLAGS=$ac_save_CFLAGS
1953 elif test $ac_cv_prog_cc_g = yes; then
1954   if test "$GCC" = yes; then
1955     CFLAGS="-g -O2"
1956   else
1957     CFLAGS="-g"
1958   fi
1959 else
1960   if test "$GCC" = yes; then
1961     CFLAGS="-O2"
1962   else
1963     CFLAGS=
1964   fi
1965 fi
1966 # Some people use a C++ compiler to compile C.  Since we use `exit',
1967 # in C++ we need to declare it.  In case someone uses the same compiler
1968 # for both compiling C and C++ we need to have the C++ compiler decide
1969 # the declaration of exit, since it's the most demanding environment.
1970 cat >conftest.$ac_ext <<_ACEOF
1971 #ifndef __cplusplus
1972   choke me
1973 #endif
1974 _ACEOF
1975 rm -f conftest.$ac_objext
1976 if { (eval echo "$as_me:1976: \"$ac_compile\"") >&5
1977   (eval $ac_compile) 2>&5
1978   ac_status=$?
1979   echo "$as_me:1979: \$? = $ac_status" >&5
1980   (exit $ac_status); } &&
1981          { ac_try='test -s conftest.$ac_objext'
1982   { (eval echo "$as_me:1982: \"$ac_try\"") >&5
1983   (eval $ac_try) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); }; }; then
1987   for ac_declaration in \
1988    ''\
1989    '#include <stdlib.h>' \
1990    'extern "C" void std::exit (int) throw (); using std::exit;' \
1991    'extern "C" void std::exit (int); using std::exit;' \
1992    'extern "C" void exit (int) throw ();' \
1993    'extern "C" void exit (int);' \
1994    'void exit (int);'
1995 do
1996   cat >conftest.$ac_ext <<_ACEOF
1997 #line 1997 "configure"
1998 #include "confdefs.h"
1999 #include <stdlib.h>
2000 $ac_declaration
2001 int
2002 main ()
2003 {
2004 exit (42);
2005   ;
2006   return 0;
2007 }
2008 _ACEOF
2009 rm -f conftest.$ac_objext
2010 if { (eval echo "$as_me:2010: \"$ac_compile\"") >&5
2011   (eval $ac_compile) 2>&5
2012   ac_status=$?
2013   echo "$as_me:2013: \$? = $ac_status" >&5
2014   (exit $ac_status); } &&
2015          { ac_try='test -s conftest.$ac_objext'
2016   { (eval echo "$as_me:2016: \"$ac_try\"") >&5
2017   (eval $ac_try) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); }; }; then
2021   :
2022 else
2023   echo "$as_me: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 continue
2026 fi
2027 rm -f conftest.$ac_objext conftest.$ac_ext
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 $ac_declaration
2032 int
2033 main ()
2034 {
2035 exit (42);
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); } &&
2046          { ac_try='test -s conftest.$ac_objext'
2047   { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); }; }; then
2052   break
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 fi
2057 rm -f conftest.$ac_objext conftest.$ac_ext
2058 done
2059 rm -rf conftest*
2060 if test -n "$ac_declaration"; then
2061   echo '#ifdef __cplusplus' >>confdefs.h
2062   echo $ac_declaration      >>confdefs.h
2063   echo '#endif'             >>confdefs.h
2064 fi
2065
2066 else
2067   echo "$as_me: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 fi
2070 rm -f conftest.$ac_objext conftest.$ac_ext
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 ac_main_return=return
2077
2078 GCC_VERSION=none
2079 if test "$GCC" = yes ; then
2080         echo "$as_me:2080: checking version of $CC" >&5
2081 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2082         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.].*//'`"
2083         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2084         echo "$as_me:2084: result: $GCC_VERSION" >&5
2085 echo "${ECHO_T}$GCC_VERSION" >&6
2086 fi
2087
2088 echo "$as_me:2088: checking for $CC option to accept ANSI C" >&5
2089 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2090 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2091   echo $ECHO_N "(cached) $ECHO_C" >&6
2092 else
2093   ac_cv_prog_cc_stdc=no
2094 ac_save_CC=$CC
2095 cat >conftest.$ac_ext <<_ACEOF
2096 #line 2096 "configure"
2097 #include "confdefs.h"
2098 #include <stdarg.h>
2099 #include <stdio.h>
2100 #include <sys/types.h>
2101 #include <sys/stat.h>
2102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2103 struct buf { int x; };
2104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2105 static char *e (p, i)
2106      char **p;
2107      int i;
2108 {
2109   return p[i];
2110 }
2111 static char *f (char * (*g) (char **, int), char **p, ...)
2112 {
2113   char *s;
2114   va_list v;
2115   va_start (v,p);
2116   s = g (p, va_arg (v,int));
2117   va_end (v);
2118   return s;
2119 }
2120 int test (int i, double x);
2121 struct s1 {int (*f) (int a);};
2122 struct s2 {int (*f) (double a);};
2123 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2124 int argc;
2125 char **argv;
2126 int
2127 main ()
2128 {
2129 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 # Don't try gcc -ansi; that turns off useful extensions and
2135 # breaks some systems' header files.
2136 # AIX                   -qlanglvl=ansi
2137 # Ultrix and OSF/1      -std1
2138 # HP-UX 10.20 and later -Ae
2139 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2140 # SVR4                  -Xc -D__EXTENSIONS__
2141 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2142 do
2143   CC="$ac_save_CC $ac_arg"
2144   rm -f conftest.$ac_objext
2145 if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
2146   (eval $ac_compile) 2>&5
2147   ac_status=$?
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } &&
2150          { ac_try='test -s conftest.$ac_objext'
2151   { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); }; }; then
2156   ac_cv_prog_cc_stdc=$ac_arg
2157 break
2158 else
2159   echo "$as_me: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 fi
2162 rm -f conftest.$ac_objext
2163 done
2164 rm -f conftest.$ac_ext conftest.$ac_objext
2165 CC=$ac_save_CC
2166
2167 fi
2168
2169 case "x$ac_cv_prog_cc_stdc" in
2170   x|xno)
2171     echo "$as_me:2171: result: none needed" >&5
2172 echo "${ECHO_T}none needed" >&6 ;;
2173   *)
2174     echo "$as_me:2174: result: $ac_cv_prog_cc_stdc" >&5
2175 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2176     CC="$CC $ac_cv_prog_cc_stdc" ;;
2177 esac
2178
2179 # This should have been defined by AC_PROG_CC
2180 : ${CC:=cc}
2181
2182 echo "$as_me:2182: checking \$CC variable" >&5
2183 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2184 case "$CC" in
2185 (*[\ \  ]-[IUD]*)
2186         echo "$as_me:2186: result: broken" >&5
2187 echo "${ECHO_T}broken" >&6
2188         { echo "$as_me:2188: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2189 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2190         # humor him...
2191         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2192         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2193
2194 cf_fix_cppflags=no
2195 cf_new_cflags=
2196 cf_new_cppflags=
2197 cf_new_extra_cppflags=
2198
2199 for cf_add_cflags in $cf_flags
2200 do
2201 case $cf_fix_cppflags in
2202 (no)
2203         case $cf_add_cflags in
2204         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2205                 case $cf_add_cflags in
2206                 (-D*)
2207                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2208
2209                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2210                                 && test -z "${cf_tst_cflags}" \
2211                                 && cf_fix_cppflags=yes
2212
2213                         if test $cf_fix_cppflags = yes ; then
2214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2215                                 continue
2216                         elif test "${cf_tst_cflags}" = "\"'" ; then
2217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2218                                 continue
2219                         fi
2220                         ;;
2221                 esac
2222                 case "$CPPFLAGS" in
2223                 (*$cf_add_cflags)
2224                         ;;
2225                 (*)
2226                         case $cf_add_cflags in
2227                         (-D*)
2228                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2229
2230 CPPFLAGS=`echo "$CPPFLAGS" | \
2231         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2232                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2233
2234                                 ;;
2235                         esac
2236                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2237                         ;;
2238                 esac
2239                 ;;
2240         (*)
2241                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2242                 ;;
2243         esac
2244         ;;
2245 (yes)
2246         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2247
2248         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2249
2250         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2251                 && test -z "${cf_tst_cflags}" \
2252                 && cf_fix_cppflags=no
2253         ;;
2254 esac
2255 done
2256
2257 if test -n "$cf_new_cflags" ; then
2258
2259         CFLAGS="$CFLAGS $cf_new_cflags"
2260 fi
2261
2262 if test -n "$cf_new_cppflags" ; then
2263
2264         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2265 fi
2266
2267 if test -n "$cf_new_extra_cppflags" ; then
2268
2269         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2270 fi
2271
2272         ;;
2273 (*)
2274         echo "$as_me:2274: result: ok" >&5
2275 echo "${ECHO_T}ok" >&6
2276         ;;
2277 esac
2278
2279 ac_ext=c
2280 ac_cpp='$CPP $CPPFLAGS'
2281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2284 ac_main_return=return
2285 echo "$as_me:2285: checking how to run the C preprocessor" >&5
2286 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2287 # On Suns, sometimes $CPP names a directory.
2288 if test -n "$CPP" && test -d "$CPP"; then
2289   CPP=
2290 fi
2291 if test -z "$CPP"; then
2292   if test "${ac_cv_prog_CPP+set}" = set; then
2293   echo $ECHO_N "(cached) $ECHO_C" >&6
2294 else
2295       # Double quotes because CPP needs to be expanded
2296     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2297     do
2298       ac_preproc_ok=false
2299 for ac_c_preproc_warn_flag in '' yes
2300 do
2301   # Use a header file that comes with gcc, so configuring glibc
2302   # with a fresh cross-compiler works.
2303   # On the NeXT, cc -E runs the code through the compiler's parser,
2304   # not just through cpp. "Syntax error" is here to catch this case.
2305   cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <assert.h>
2309                      Syntax error
2310 _ACEOF
2311 if { (eval echo "$as_me:2311: \"$ac_cpp conftest.$ac_ext\"") >&5
2312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2313   ac_status=$?
2314   egrep -v '^ *\+' conftest.er1 >conftest.err
2315   rm -f conftest.er1
2316   cat conftest.err >&5
2317   echo "$as_me:2317: \$? = $ac_status" >&5
2318   (exit $ac_status); } >/dev/null; then
2319   if test -s conftest.err; then
2320     ac_cpp_err=$ac_c_preproc_warn_flag
2321   else
2322     ac_cpp_err=
2323   fi
2324 else
2325   ac_cpp_err=yes
2326 fi
2327 if test -z "$ac_cpp_err"; then
2328   :
2329 else
2330   echo "$as_me: failed program was:" >&5
2331   cat conftest.$ac_ext >&5
2332   # Broken: fails on valid input.
2333 continue
2334 fi
2335 rm -f conftest.err conftest.$ac_ext
2336
2337   # OK, works on sane cases.  Now check whether non-existent headers
2338   # can be detected and how.
2339   cat >conftest.$ac_ext <<_ACEOF
2340 #line 2340 "configure"
2341 #include "confdefs.h"
2342 #include <ac_nonexistent.h>
2343 _ACEOF
2344 if { (eval echo "$as_me:2344: \"$ac_cpp conftest.$ac_ext\"") >&5
2345   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2346   ac_status=$?
2347   egrep -v '^ *\+' conftest.er1 >conftest.err
2348   rm -f conftest.er1
2349   cat conftest.err >&5
2350   echo "$as_me:2350: \$? = $ac_status" >&5
2351   (exit $ac_status); } >/dev/null; then
2352   if test -s conftest.err; then
2353     ac_cpp_err=$ac_c_preproc_warn_flag
2354   else
2355     ac_cpp_err=
2356   fi
2357 else
2358   ac_cpp_err=yes
2359 fi
2360 if test -z "$ac_cpp_err"; then
2361   # Broken: success on invalid input.
2362 continue
2363 else
2364   echo "$as_me: failed program was:" >&5
2365   cat conftest.$ac_ext >&5
2366   # Passes both tests.
2367 ac_preproc_ok=:
2368 break
2369 fi
2370 rm -f conftest.err conftest.$ac_ext
2371
2372 done
2373 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2374 rm -f conftest.err conftest.$ac_ext
2375 if $ac_preproc_ok; then
2376   break
2377 fi
2378
2379     done
2380     ac_cv_prog_CPP=$CPP
2381
2382 fi
2383   CPP=$ac_cv_prog_CPP
2384 else
2385   ac_cv_prog_CPP=$CPP
2386 fi
2387 echo "$as_me:2387: result: $CPP" >&5
2388 echo "${ECHO_T}$CPP" >&6
2389 ac_preproc_ok=false
2390 for ac_c_preproc_warn_flag in '' yes
2391 do
2392   # Use a header file that comes with gcc, so configuring glibc
2393   # with a fresh cross-compiler works.
2394   # On the NeXT, cc -E runs the code through the compiler's parser,
2395   # not just through cpp. "Syntax error" is here to catch this case.
2396   cat >conftest.$ac_ext <<_ACEOF
2397 #line 2397 "configure"
2398 #include "confdefs.h"
2399 #include <assert.h>
2400                      Syntax error
2401 _ACEOF
2402 if { (eval echo "$as_me:2402: \"$ac_cpp conftest.$ac_ext\"") >&5
2403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2404   ac_status=$?
2405   egrep -v '^ *\+' conftest.er1 >conftest.err
2406   rm -f conftest.er1
2407   cat conftest.err >&5
2408   echo "$as_me:2408: \$? = $ac_status" >&5
2409   (exit $ac_status); } >/dev/null; then
2410   if test -s conftest.err; then
2411     ac_cpp_err=$ac_c_preproc_warn_flag
2412   else
2413     ac_cpp_err=
2414   fi
2415 else
2416   ac_cpp_err=yes
2417 fi
2418 if test -z "$ac_cpp_err"; then
2419   :
2420 else
2421   echo "$as_me: failed program was:" >&5
2422   cat conftest.$ac_ext >&5
2423   # Broken: fails on valid input.
2424 continue
2425 fi
2426 rm -f conftest.err conftest.$ac_ext
2427
2428   # OK, works on sane cases.  Now check whether non-existent headers
2429   # can be detected and how.
2430   cat >conftest.$ac_ext <<_ACEOF
2431 #line 2431 "configure"
2432 #include "confdefs.h"
2433 #include <ac_nonexistent.h>
2434 _ACEOF
2435 if { (eval echo "$as_me:2435: \"$ac_cpp conftest.$ac_ext\"") >&5
2436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2437   ac_status=$?
2438   egrep -v '^ *\+' conftest.er1 >conftest.err
2439   rm -f conftest.er1
2440   cat conftest.err >&5
2441   echo "$as_me:2441: \$? = $ac_status" >&5
2442   (exit $ac_status); } >/dev/null; then
2443   if test -s conftest.err; then
2444     ac_cpp_err=$ac_c_preproc_warn_flag
2445   else
2446     ac_cpp_err=
2447   fi
2448 else
2449   ac_cpp_err=yes
2450 fi
2451 if test -z "$ac_cpp_err"; then
2452   # Broken: success on invalid input.
2453 continue
2454 else
2455   echo "$as_me: failed program was:" >&5
2456   cat conftest.$ac_ext >&5
2457   # Passes both tests.
2458 ac_preproc_ok=:
2459 break
2460 fi
2461 rm -f conftest.err conftest.$ac_ext
2462
2463 done
2464 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2465 rm -f conftest.err conftest.$ac_ext
2466 if $ac_preproc_ok; then
2467   :
2468 else
2469   { { echo "$as_me:2469: error: C preprocessor \"$CPP\" fails sanity check" >&5
2470 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2471    { (exit 1); exit 1; }; }
2472 fi
2473
2474 ac_ext=c
2475 ac_cpp='$CPP $CPPFLAGS'
2476 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2477 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2478 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2479 ac_main_return=return
2480
2481 if test $ac_cv_c_compiler_gnu = yes; then
2482     echo "$as_me:2482: checking whether $CC needs -traditional" >&5
2483 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2484 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2485   echo $ECHO_N "(cached) $ECHO_C" >&6
2486 else
2487     ac_pattern="Autoconf.*'x'"
2488   cat >conftest.$ac_ext <<_ACEOF
2489 #line 2489 "configure"
2490 #include "confdefs.h"
2491 #include <sgtty.h>
2492 int Autoconf = TIOCGETP;
2493 _ACEOF
2494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2495   egrep "$ac_pattern" >/dev/null 2>&1; then
2496   ac_cv_prog_gcc_traditional=yes
2497 else
2498   ac_cv_prog_gcc_traditional=no
2499 fi
2500 rm -rf conftest*
2501
2502   if test $ac_cv_prog_gcc_traditional = no; then
2503     cat >conftest.$ac_ext <<_ACEOF
2504 #line 2504 "configure"
2505 #include "confdefs.h"
2506 #include <termio.h>
2507 int Autoconf = TCGETA;
2508 _ACEOF
2509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2510   egrep "$ac_pattern" >/dev/null 2>&1; then
2511   ac_cv_prog_gcc_traditional=yes
2512 fi
2513 rm -rf conftest*
2514
2515   fi
2516 fi
2517 echo "$as_me:2517: result: $ac_cv_prog_gcc_traditional" >&5
2518 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2519   if test $ac_cv_prog_gcc_traditional = yes; then
2520     CC="$CC -traditional"
2521   fi
2522 fi
2523
2524 echo "$as_me:2524: checking whether $CC understands -c and -o together" >&5
2525 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2526 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2527   echo $ECHO_N "(cached) $ECHO_C" >&6
2528 else
2529
2530 cat > conftest.$ac_ext <<CF_EOF
2531 #include <stdio.h>
2532 int main()
2533 {
2534         ${cf_cv_main_return:-return}(0);
2535 }
2536 CF_EOF
2537 # We do the test twice because some compilers refuse to overwrite an
2538 # existing .o file with -o, though they will create one.
2539 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2540 if { (eval echo "$as_me:2540: \"$ac_try\"") >&5
2541   (eval $ac_try) 2>&5
2542   ac_status=$?
2543   echo "$as_me:2543: \$? = $ac_status" >&5
2544   (exit $ac_status); } &&
2545   test -f conftest2.$ac_objext && { (eval echo "$as_me:2545: \"$ac_try\"") >&5
2546   (eval $ac_try) 2>&5
2547   ac_status=$?
2548   echo "$as_me:2548: \$? = $ac_status" >&5
2549   (exit $ac_status); };
2550 then
2551   eval cf_cv_prog_CC_c_o=yes
2552 else
2553   eval cf_cv_prog_CC_c_o=no
2554 fi
2555 rm -rf conftest*
2556
2557 fi
2558 if test $cf_cv_prog_CC_c_o = yes; then
2559   echo "$as_me:2559: result: yes" >&5
2560 echo "${ECHO_T}yes" >&6
2561 else
2562   echo "$as_me:2562: result: no" >&5
2563 echo "${ECHO_T}no" >&6
2564 fi
2565
2566 if test "$cross_compiling" = yes ; then
2567         LDCONFIG=:
2568 else
2569         case "$cf_cv_system_name" in
2570         (dragonfly*|mirbsd*|freebsd*)
2571                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2572                 ;;
2573         (*) LDPATH=$PATH:/sbin:/usr/sbin
2574                 # Extract the first word of "ldconfig", so it can be a program name with args.
2575 set dummy ldconfig; ac_word=$2
2576 echo "$as_me:2576: checking for $ac_word" >&5
2577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2578 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2579   echo $ECHO_N "(cached) $ECHO_C" >&6
2580 else
2581   case $LDCONFIG in
2582   [\\/]* | ?:[\\/]*)
2583   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2584   ;;
2585   *)
2586   ac_save_IFS=$IFS; IFS=$ac_path_separator
2587 ac_dummy="$LDPATH"
2588 for ac_dir in $ac_dummy; do
2589   IFS=$ac_save_IFS
2590   test -z "$ac_dir" && ac_dir=.
2591   if $as_executable_p "$ac_dir/$ac_word"; then
2592    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2593    echo "$as_me:2593: found $ac_dir/$ac_word" >&5
2594    break
2595 fi
2596 done
2597
2598   ;;
2599 esac
2600 fi
2601 LDCONFIG=$ac_cv_path_LDCONFIG
2602
2603 if test -n "$LDCONFIG"; then
2604   echo "$as_me:2604: result: $LDCONFIG" >&5
2605 echo "${ECHO_T}$LDCONFIG" >&6
2606 else
2607   echo "$as_me:2607: result: no" >&5
2608 echo "${ECHO_T}no" >&6
2609 fi
2610
2611                 ;;
2612         esac
2613 fi
2614
2615 echo "$as_me:2615: checking if you want to ensure bool is consistent with C++" >&5
2616 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2617
2618 # Check whether --with-cxx or --without-cxx was given.
2619 if test "${with_cxx+set}" = set; then
2620   withval="$with_cxx"
2621   cf_with_cxx=$withval
2622 else
2623   cf_with_cxx=yes
2624 fi;
2625 echo "$as_me:2625: result: $cf_with_cxx" >&5
2626 echo "${ECHO_T}$cf_with_cxx" >&6
2627 if test "X$cf_with_cxx" = Xno ; then
2628         CXX=""
2629         GXX=""
2630 else
2631         # with autoconf 2.13, we can change the error to a warning:
2632                 ac_ext=cc
2633 ac_cpp='$CXXCPP $CPPFLAGS'
2634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2637 ac_main_return=return
2638 if test -n "$ac_tool_prefix"; then
2639   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2640   do
2641     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2642 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2643 echo "$as_me:2643: checking for $ac_word" >&5
2644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2645 if test "${ac_cv_prog_CXX+set}" = set; then
2646   echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648   if test -n "$CXX"; then
2649   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2650 else
2651   ac_save_IFS=$IFS; IFS=$ac_path_separator
2652 ac_dummy="$PATH"
2653 for ac_dir in $ac_dummy; do
2654   IFS=$ac_save_IFS
2655   test -z "$ac_dir" && ac_dir=.
2656   $as_executable_p "$ac_dir/$ac_word" || continue
2657 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2658 echo "$as_me:2658: found $ac_dir/$ac_word" >&5
2659 break
2660 done
2661
2662 fi
2663 fi
2664 CXX=$ac_cv_prog_CXX
2665 if test -n "$CXX"; then
2666   echo "$as_me:2666: result: $CXX" >&5
2667 echo "${ECHO_T}$CXX" >&6
2668 else
2669   echo "$as_me:2669: result: no" >&5
2670 echo "${ECHO_T}no" >&6
2671 fi
2672
2673     test -n "$CXX" && break
2674   done
2675 fi
2676 if test -z "$CXX"; then
2677   ac_ct_CXX=$CXX
2678   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2679 do
2680   # Extract the first word of "$ac_prog", so it can be a program name with args.
2681 set dummy $ac_prog; ac_word=$2
2682 echo "$as_me:2682: checking for $ac_word" >&5
2683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2684 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2685   echo $ECHO_N "(cached) $ECHO_C" >&6
2686 else
2687   if test -n "$ac_ct_CXX"; then
2688   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2689 else
2690   ac_save_IFS=$IFS; IFS=$ac_path_separator
2691 ac_dummy="$PATH"
2692 for ac_dir in $ac_dummy; do
2693   IFS=$ac_save_IFS
2694   test -z "$ac_dir" && ac_dir=.
2695   $as_executable_p "$ac_dir/$ac_word" || continue
2696 ac_cv_prog_ac_ct_CXX="$ac_prog"
2697 echo "$as_me:2697: found $ac_dir/$ac_word" >&5
2698 break
2699 done
2700
2701 fi
2702 fi
2703 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2704 if test -n "$ac_ct_CXX"; then
2705   echo "$as_me:2705: result: $ac_ct_CXX" >&5
2706 echo "${ECHO_T}$ac_ct_CXX" >&6
2707 else
2708   echo "$as_me:2708: result: no" >&5
2709 echo "${ECHO_T}no" >&6
2710 fi
2711
2712   test -n "$ac_ct_CXX" && break
2713 done
2714 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2715
2716   CXX=$ac_ct_CXX
2717 fi
2718
2719 # Provide some information about the compiler.
2720 echo "$as_me:2720:" \
2721      "checking for C++ compiler version" >&5
2722 ac_compiler=`set X $ac_compile; echo $2`
2723 { (eval echo "$as_me:2723: \"$ac_compiler --version </dev/null >&5\"") >&5
2724   (eval $ac_compiler --version </dev/null >&5) 2>&5
2725   ac_status=$?
2726   echo "$as_me:2726: \$? = $ac_status" >&5
2727   (exit $ac_status); }
2728 { (eval echo "$as_me:2728: \"$ac_compiler -v </dev/null >&5\"") >&5
2729   (eval $ac_compiler -v </dev/null >&5) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }
2733 { (eval echo "$as_me:2733: \"$ac_compiler -V </dev/null >&5\"") >&5
2734   (eval $ac_compiler -V </dev/null >&5) 2>&5
2735   ac_status=$?
2736   echo "$as_me:2736: \$? = $ac_status" >&5
2737   (exit $ac_status); }
2738
2739 echo "$as_me:2739: checking whether we are using the GNU C++ compiler" >&5
2740 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2741 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2742   echo $ECHO_N "(cached) $ECHO_C" >&6
2743 else
2744   cat >conftest.$ac_ext <<_ACEOF
2745 #line 2745 "configure"
2746 #include "confdefs.h"
2747
2748 int
2749 main ()
2750 {
2751 #ifndef __GNUC__
2752        choke me
2753 #endif
2754
2755   ;
2756   return 0;
2757 }
2758 _ACEOF
2759 rm -f conftest.$ac_objext
2760 if { (eval echo "$as_me:2760: \"$ac_compile\"") >&5
2761   (eval $ac_compile) 2>&5
2762   ac_status=$?
2763   echo "$as_me:2763: \$? = $ac_status" >&5
2764   (exit $ac_status); } &&
2765          { ac_try='test -s conftest.$ac_objext'
2766   { (eval echo "$as_me:2766: \"$ac_try\"") >&5
2767   (eval $ac_try) 2>&5
2768   ac_status=$?
2769   echo "$as_me:2769: \$? = $ac_status" >&5
2770   (exit $ac_status); }; }; then
2771   ac_compiler_gnu=yes
2772 else
2773   echo "$as_me: failed program was:" >&5
2774 cat conftest.$ac_ext >&5
2775 ac_compiler_gnu=no
2776 fi
2777 rm -f conftest.$ac_objext conftest.$ac_ext
2778 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2779
2780 fi
2781 echo "$as_me:2781: result: $ac_cv_cxx_compiler_gnu" >&5
2782 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2783 GXX=`test $ac_compiler_gnu = yes && echo yes`
2784 ac_test_CXXFLAGS=${CXXFLAGS+set}
2785 ac_save_CXXFLAGS=$CXXFLAGS
2786 CXXFLAGS="-g"
2787 echo "$as_me:2787: checking whether $CXX accepts -g" >&5
2788 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2789 if test "${ac_cv_prog_cxx_g+set}" = set; then
2790   echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792   cat >conftest.$ac_ext <<_ACEOF
2793 #line 2793 "configure"
2794 #include "confdefs.h"
2795
2796 int
2797 main ()
2798 {
2799
2800   ;
2801   return 0;
2802 }
2803 _ACEOF
2804 rm -f conftest.$ac_objext
2805 if { (eval echo "$as_me:2805: \"$ac_compile\"") >&5
2806   (eval $ac_compile) 2>&5
2807   ac_status=$?
2808   echo "$as_me:2808: \$? = $ac_status" >&5
2809   (exit $ac_status); } &&
2810          { ac_try='test -s conftest.$ac_objext'
2811   { (eval echo "$as_me:2811: \"$ac_try\"") >&5
2812   (eval $ac_try) 2>&5
2813   ac_status=$?
2814   echo "$as_me:2814: \$? = $ac_status" >&5
2815   (exit $ac_status); }; }; then
2816   ac_cv_prog_cxx_g=yes
2817 else
2818   echo "$as_me: failed program was:" >&5
2819 cat conftest.$ac_ext >&5
2820 ac_cv_prog_cxx_g=no
2821 fi
2822 rm -f conftest.$ac_objext conftest.$ac_ext
2823 fi
2824 echo "$as_me:2824: result: $ac_cv_prog_cxx_g" >&5
2825 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2826 if test "$ac_test_CXXFLAGS" = set; then
2827   CXXFLAGS=$ac_save_CXXFLAGS
2828 elif test $ac_cv_prog_cxx_g = yes; then
2829   if test "$GXX" = yes; then
2830     CXXFLAGS="-g -O2"
2831   else
2832     CXXFLAGS="-g"
2833   fi
2834 else
2835   if test "$GXX" = yes; then
2836     CXXFLAGS="-O2"
2837   else
2838     CXXFLAGS=
2839   fi
2840 fi
2841 for ac_declaration in \
2842    ''\
2843    '#include <stdlib.h>' \
2844    'extern "C" void std::exit (int) throw (); using std::exit;' \
2845    'extern "C" void std::exit (int); using std::exit;' \
2846    'extern "C" void exit (int) throw ();' \
2847    'extern "C" void exit (int);' \
2848    'void exit (int);'
2849 do
2850   cat >conftest.$ac_ext <<_ACEOF
2851 #line 2851 "configure"
2852 #include "confdefs.h"
2853 #include <stdlib.h>
2854 $ac_declaration
2855 int
2856 main ()
2857 {
2858 exit (42);
2859   ;
2860   return 0;
2861 }
2862 _ACEOF
2863 rm -f conftest.$ac_objext
2864 if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5
2865   (eval $ac_compile) 2>&5
2866   ac_status=$?
2867   echo "$as_me:2867: \$? = $ac_status" >&5
2868   (exit $ac_status); } &&
2869          { ac_try='test -s conftest.$ac_objext'
2870   { (eval echo "$as_me:2870: \"$ac_try\"") >&5
2871   (eval $ac_try) 2>&5
2872   ac_status=$?
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit $ac_status); }; }; then
2875   :
2876 else
2877   echo "$as_me: failed program was:" >&5
2878 cat conftest.$ac_ext >&5
2879 continue
2880 fi
2881 rm -f conftest.$ac_objext conftest.$ac_ext
2882   cat >conftest.$ac_ext <<_ACEOF
2883 #line 2883 "configure"
2884 #include "confdefs.h"
2885 $ac_declaration
2886 int
2887 main ()
2888 {
2889 exit (42);
2890   ;
2891   return 0;
2892 }
2893 _ACEOF
2894 rm -f conftest.$ac_objext
2895 if { (eval echo "$as_me:2895: \"$ac_compile\"") >&5
2896   (eval $ac_compile) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); } &&
2900          { ac_try='test -s conftest.$ac_objext'
2901   { (eval echo "$as_me:2901: \"$ac_try\"") >&5
2902   (eval $ac_try) 2>&5
2903   ac_status=$?
2904   echo "$as_me:2904: \$? = $ac_status" >&5
2905   (exit $ac_status); }; }; then
2906   break
2907 else
2908   echo "$as_me: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910 fi
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912 done
2913 rm -rf conftest*
2914 if test -n "$ac_declaration"; then
2915   echo '#ifdef __cplusplus' >>confdefs.h
2916   echo $ac_declaration      >>confdefs.h
2917   echo '#endif'             >>confdefs.h
2918 fi
2919
2920 ac_ext=c
2921 ac_cpp='$CPP $CPPFLAGS'
2922 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2923 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2925 ac_main_return=return
2926
2927         ac_ext=cc
2928 ac_cpp='$CXXCPP $CPPFLAGS'
2929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932 ac_main_return=return
2933
2934         if test "x$cf_with_cxx" != xno
2935         then
2936                 # Several of the C++ configurations do not work, particularly when
2937                 # cross-compiling (20140913 -TD)
2938                 echo "$as_me:2938: checking if $CXX works" >&5
2939 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2940
2941                 save_CPPFLAGS="$CPPFLAGS"
2942                 eval cf_includedir=${includedir}
2943                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2944
2945 cat >conftest.$ac_ext <<_ACEOF
2946 #line 2946 "configure"
2947 #include "confdefs.h"
2948
2949 #include <stdlib.h>
2950 #include <stdio.h>
2951
2952 int
2953 main ()
2954 {
2955
2956                 printf("Hello world!\n")
2957
2958   ;
2959   return 0;
2960 }
2961 _ACEOF
2962 rm -f conftest.$ac_objext
2963 if { (eval echo "$as_me:2963: \"$ac_compile\"") >&5
2964   (eval $ac_compile) 2>&5
2965   ac_status=$?
2966   echo "$as_me:2966: \$? = $ac_status" >&5
2967   (exit $ac_status); } &&
2968          { ac_try='test -s conftest.$ac_objext'
2969   { (eval echo "$as_me:2969: \"$ac_try\"") >&5
2970   (eval $ac_try) 2>&5
2971   ac_status=$?
2972   echo "$as_me:2972: \$? = $ac_status" >&5
2973   (exit $ac_status); }; }; then
2974   cf_cxx_works=yes
2975 else
2976   echo "$as_me: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2978 cf_cxx_works=no
2979 fi
2980 rm -f conftest.$ac_objext conftest.$ac_ext
2981                 CPPFLAGS="$save_CPPFLAGS"
2982
2983                 echo "$as_me:2983: result: $cf_cxx_works" >&5
2984 echo "${ECHO_T}$cf_cxx_works" >&6
2985                 if test "x$cf_cxx_works" = xno
2986                 then
2987                         { echo "$as_me:2987: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2988 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2989                         cf_with_cxx=no; CXX=""; GXX="";
2990                 fi
2991         fi
2992         ac_ext=c
2993 ac_cpp='$CPP $CPPFLAGS'
2994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2997 ac_main_return=return
2998
2999         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3000         if test "$CXX" = "g++" ; then
3001                 # Extract the first word of "g++", so it can be a program name with args.
3002 set dummy g++; ac_word=$2
3003 echo "$as_me:3003: checking for $ac_word" >&5
3004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3005 if test "${ac_cv_path_CXX+set}" = set; then
3006   echo $ECHO_N "(cached) $ECHO_C" >&6
3007 else
3008   case $CXX in
3009   [\\/]* | ?:[\\/]*)
3010   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3011   ;;
3012   *)
3013   ac_save_IFS=$IFS; IFS=$ac_path_separator
3014 ac_dummy="$PATH"
3015 for ac_dir in $ac_dummy; do
3016   IFS=$ac_save_IFS
3017   test -z "$ac_dir" && ac_dir=.
3018   if $as_executable_p "$ac_dir/$ac_word"; then
3019    ac_cv_path_CXX="$ac_dir/$ac_word"
3020    echo "$as_me:3020: found $ac_dir/$ac_word" >&5
3021    break
3022 fi
3023 done
3024
3025   ;;
3026 esac
3027 fi
3028 CXX=$ac_cv_path_CXX
3029
3030 if test -n "$CXX"; then
3031   echo "$as_me:3031: result: $CXX" >&5
3032 echo "${ECHO_T}$CXX" >&6
3033 else
3034   echo "$as_me:3034: result: no" >&5
3035 echo "${ECHO_T}no" >&6
3036 fi
3037
3038         fi
3039         case "x$CXX" in
3040         (x|xg++)
3041                 { echo "$as_me:3041: WARNING: You don't have any C++ compiler, too bad" >&5
3042 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3043                 cf_with_cxx=no; CXX=""; GXX="";
3044                 ;;
3045         esac
3046 fi
3047
3048 GXX_VERSION=none
3049 if test "$GXX" = yes; then
3050         echo "$as_me:3050: checking version of ${CXX:-g++}" >&5
3051 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3052         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3053         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3054         echo "$as_me:3054: result: $GXX_VERSION" >&5
3055 echo "${ECHO_T}$GXX_VERSION" >&6
3056 fi
3057
3058 case $GXX_VERSION in
3059 (1*|2.[0-6]*)
3060         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3061         # cf_cxx_library=no
3062         { echo "$as_me:3062: WARNING: templates do not work" >&5
3063 echo "$as_me: WARNING: templates do not work" >&2;}
3064         ;;
3065 esac
3066
3067 echo "$as_me:3067: checking if you want to build C++ binding and demo" >&5
3068 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3069
3070 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3071 if test "${with_cxx_binding+set}" = set; then
3072   withval="$with_cxx_binding"
3073   cf_with_cxx_binding=$withval
3074 else
3075   cf_with_cxx_binding=$cf_with_cxx
3076 fi;
3077 echo "$as_me:3077: result: $cf_with_cxx_binding" >&5
3078 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3079
3080 echo "$as_me:3080: checking if you want to build with Ada95" >&5
3081 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3082 echo "$as_me:3082: result: $cf_with_ada" >&5
3083 echo "${ECHO_T}$cf_with_ada" >&6
3084
3085 echo "$as_me:3085: checking if you want to install terminal database" >&5
3086 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3087
3088 # Check whether --enable-db-install or --disable-db-install was given.
3089 if test "${enable_db_install+set}" = set; then
3090   enableval="$enable_db_install"
3091   cf_with_db_install=$enableval
3092 else
3093   cf_with_db_install=yes
3094 fi;
3095 echo "$as_me:3095: result: $cf_with_db_install" >&5
3096 echo "${ECHO_T}$cf_with_db_install" >&6
3097
3098 echo "$as_me:3098: checking if you want to install manpages" >&5
3099 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3100
3101 # Check whether --with-manpages or --without-manpages was given.
3102 if test "${with_manpages+set}" = set; then
3103   withval="$with_manpages"
3104   cf_with_manpages=$withval
3105 else
3106   cf_with_manpages=yes
3107 fi;
3108 echo "$as_me:3108: result: $cf_with_manpages" >&5
3109 echo "${ECHO_T}$cf_with_manpages" >&6
3110
3111 echo "$as_me:3111: checking if you want to build programs such as tic" >&5
3112 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3113
3114 # Check whether --with-progs or --without-progs was given.
3115 if test "${with_progs+set}" = set; then
3116   withval="$with_progs"
3117   cf_with_progs=$withval
3118 else
3119   cf_with_progs=yes
3120 fi;
3121 echo "$as_me:3121: result: $cf_with_progs" >&5
3122 echo "${ECHO_T}$cf_with_progs" >&6
3123
3124 echo "$as_me:3124: checking if you want to build test-programs" >&5
3125 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3126
3127 # Check whether --with-tests or --without-tests was given.
3128 if test "${with_tests+set}" = set; then
3129   withval="$with_tests"
3130   cf_with_tests=$withval
3131 else
3132   cf_with_tests=yes
3133 fi;
3134 echo "$as_me:3134: result: $cf_with_tests" >&5
3135 echo "${ECHO_T}$cf_with_tests" >&6
3136
3137 echo "$as_me:3137: checking if you wish to install curses.h" >&5
3138 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3139
3140 # Check whether --with-curses-h or --without-curses-h was given.
3141 if test "${with_curses_h+set}" = set; then
3142   withval="$with_curses_h"
3143   with_curses_h=$withval
3144 else
3145   with_curses_h=yes
3146 fi;
3147 echo "$as_me:3147: result: $with_curses_h" >&5
3148 echo "${ECHO_T}$with_curses_h" >&6
3149
3150 modules_to_build="ncurses"
3151 if test "X$cf_with_progs" != Xno ; then
3152 modules_to_build="$modules_to_build progs tack"
3153 fi
3154 modules_to_build="$modules_to_build panel menu form"
3155
3156 test "$program_prefix" != NONE &&
3157   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3158 # Use a double $ so make ignores it.
3159 test "$program_suffix" != NONE &&
3160   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3161 # Double any \ or $.  echo might interpret backslashes.
3162 # By default was `s,x,x', remove it if useless.
3163 cat <<\_ACEOF >conftest.sed
3164 s/[\\$]/&&/g;s/;s,x,x,$//
3165 _ACEOF
3166 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3167 rm conftest.sed
3168
3169 for ac_prog in mawk gawk nawk awk
3170 do
3171   # Extract the first word of "$ac_prog", so it can be a program name with args.
3172 set dummy $ac_prog; ac_word=$2
3173 echo "$as_me:3173: checking for $ac_word" >&5
3174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3175 if test "${ac_cv_prog_AWK+set}" = set; then
3176   echo $ECHO_N "(cached) $ECHO_C" >&6
3177 else
3178   if test -n "$AWK"; then
3179   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3180 else
3181   ac_save_IFS=$IFS; IFS=$ac_path_separator
3182 ac_dummy="$PATH"
3183 for ac_dir in $ac_dummy; do
3184   IFS=$ac_save_IFS
3185   test -z "$ac_dir" && ac_dir=.
3186   $as_executable_p "$ac_dir/$ac_word" || continue
3187 ac_cv_prog_AWK="$ac_prog"
3188 echo "$as_me:3188: found $ac_dir/$ac_word" >&5
3189 break
3190 done
3191
3192 fi
3193 fi
3194 AWK=$ac_cv_prog_AWK
3195 if test -n "$AWK"; then
3196   echo "$as_me:3196: result: $AWK" >&5
3197 echo "${ECHO_T}$AWK" >&6
3198 else
3199   echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3201 fi
3202
3203   test -n "$AWK" && break
3204 done
3205
3206 test -z "$AWK" && { { echo "$as_me:3206: error: No awk program found" >&5
3207 echo "$as_me: error: No awk program found" >&2;}
3208    { (exit 1); exit 1; }; }
3209
3210 echo "$as_me:3210: checking for egrep" >&5
3211 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3212 if test "${ac_cv_prog_egrep+set}" = set; then
3213   echo $ECHO_N "(cached) $ECHO_C" >&6
3214 else
3215   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3216                 then ac_cv_prog_egrep='grep -E'
3217                 else ac_cv_prog_egrep='egrep'
3218         fi
3219 fi
3220 echo "$as_me:3220: result: $ac_cv_prog_egrep" >&5
3221 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3222         EGREP=$ac_cv_prog_egrep
3223
3224         test -z "$EGREP" && { { echo "$as_me:3224: error: No egrep program found" >&5
3225 echo "$as_me: error: No egrep program found" >&2;}
3226    { (exit 1); exit 1; }; }
3227
3228 # Find a good install program.  We prefer a C program (faster),
3229 # so one script is as good as another.  But avoid the broken or
3230 # incompatible versions:
3231 # SysV /etc/install, /usr/sbin/install
3232 # SunOS /usr/etc/install
3233 # IRIX /sbin/install
3234 # AIX /bin/install
3235 # AmigaOS /C/install, which installs bootblocks on floppy discs
3236 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3237 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3238 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3239 # ./install, which can be erroneously created by make from ./install.sh.
3240 echo "$as_me:3240: checking for a BSD compatible install" >&5
3241 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3242 if test -z "$INSTALL"; then
3243 if test "${ac_cv_path_install+set}" = set; then
3244   echo $ECHO_N "(cached) $ECHO_C" >&6
3245 else
3246     ac_save_IFS=$IFS; IFS=$ac_path_separator
3247   for ac_dir in $PATH; do
3248     IFS=$ac_save_IFS
3249     # Account for people who put trailing slashes in PATH elements.
3250     case $ac_dir/ in
3251     / | ./ | .// | /cC/* \
3252     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3253     | /usr/ucb/* ) ;;
3254     *)
3255       # OSF1 and SCO ODT 3.0 have their own names for install.
3256       # Don't use installbsd from OSF since it installs stuff as root
3257       # by default.
3258       for ac_prog in ginstall scoinst install; do
3259         if $as_executable_p "$ac_dir/$ac_prog"; then
3260           if test $ac_prog = install &&
3261             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3262             # AIX install.  It has an incompatible calling convention.
3263             :
3264           elif test $ac_prog = install &&
3265             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3266             # program-specific install script used by HP pwplus--don't use.
3267             :
3268           else
3269             ac_cv_path_install="$ac_dir/$ac_prog -c"
3270             break 2
3271           fi
3272         fi
3273       done
3274       ;;
3275     esac
3276   done
3277
3278 fi
3279   if test "${ac_cv_path_install+set}" = set; then
3280     INSTALL=$ac_cv_path_install
3281   else
3282     # As a last resort, use the slow shell script.  We don't cache a
3283     # path for INSTALL within a source directory, because that will
3284     # break other packages using the cache if that directory is
3285     # removed, or if the path is relative.
3286     INSTALL=$ac_install_sh
3287   fi
3288 fi
3289 echo "$as_me:3289: result: $INSTALL" >&5
3290 echo "${ECHO_T}$INSTALL" >&6
3291
3292 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3293 # It thinks the first close brace ends the variable substitution.
3294 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3295
3296 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3297
3298 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3299
3300 case $INSTALL in
3301 (/*)
3302         ;;
3303 (*)
3304         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3305         test -z "$cf_dir" && cf_dir=.
3306         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3307         ;;
3308 esac
3309
3310 for ac_prog in tdlint lint alint splint lclint
3311 do
3312   # Extract the first word of "$ac_prog", so it can be a program name with args.
3313 set dummy $ac_prog; ac_word=$2
3314 echo "$as_me:3314: checking for $ac_word" >&5
3315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3316 if test "${ac_cv_prog_LINT+set}" = set; then
3317   echo $ECHO_N "(cached) $ECHO_C" >&6
3318 else
3319   if test -n "$LINT"; then
3320   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3321 else
3322   ac_save_IFS=$IFS; IFS=$ac_path_separator
3323 ac_dummy="$PATH"
3324 for ac_dir in $ac_dummy; do
3325   IFS=$ac_save_IFS
3326   test -z "$ac_dir" && ac_dir=.
3327   $as_executable_p "$ac_dir/$ac_word" || continue
3328 ac_cv_prog_LINT="$ac_prog"
3329 echo "$as_me:3329: found $ac_dir/$ac_word" >&5
3330 break
3331 done
3332
3333 fi
3334 fi
3335 LINT=$ac_cv_prog_LINT
3336 if test -n "$LINT"; then
3337   echo "$as_me:3337: result: $LINT" >&5
3338 echo "${ECHO_T}$LINT" >&6
3339 else
3340   echo "$as_me:3340: result: no" >&5
3341 echo "${ECHO_T}no" >&6
3342 fi
3343
3344   test -n "$LINT" && break
3345 done
3346
3347 echo "$as_me:3347: checking whether ln -s works" >&5
3348 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3349 LN_S=$as_ln_s
3350 if test "$LN_S" = "ln -s"; then
3351   echo "$as_me:3351: result: yes" >&5
3352 echo "${ECHO_T}yes" >&6
3353 else
3354   echo "$as_me:3354: result: no, using $LN_S" >&5
3355 echo "${ECHO_T}no, using $LN_S" >&6
3356 fi
3357
3358 echo "$as_me:3358: checking if $LN_S -f options work" >&5
3359 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3360
3361 rm -f conf$$.src conf$$dst
3362 echo >conf$$.dst
3363 echo first >conf$$.src
3364 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3365         cf_prog_ln_sf=yes
3366 else
3367         cf_prog_ln_sf=no
3368 fi
3369 rm -f conf$$.dst conf$$src
3370 echo "$as_me:3370: result: $cf_prog_ln_sf" >&5
3371 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3372
3373 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3374
3375 echo "$as_me:3375: checking for long file names" >&5
3376 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3377 if test "${ac_cv_sys_long_file_names+set}" = set; then
3378   echo $ECHO_N "(cached) $ECHO_C" >&6
3379 else
3380   ac_cv_sys_long_file_names=yes
3381 # Test for long file names in all the places we know might matter:
3382 #      .                the current directory, where building will happen
3383 #      $prefix/lib      where we will be installing things
3384 #      $exec_prefix/lib likewise
3385 # eval it to expand exec_prefix.
3386 #      $TMPDIR          if set, where it might want to write temporary files
3387 # if $TMPDIR is not set:
3388 #      /tmp             where it might want to write temporary files
3389 #      /var/tmp         likewise
3390 #      /usr/tmp         likewise
3391 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3392   ac_tmpdirs=$TMPDIR
3393 else
3394   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3395 fi
3396 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3397   test -d $ac_dir || continue
3398   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3399   ac_xdir=$ac_dir/cf$$
3400   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3401   ac_tf1=$ac_xdir/conftest9012345
3402   ac_tf2=$ac_xdir/conftest9012346
3403   (echo 1 >$ac_tf1) 2>/dev/null
3404   (echo 2 >$ac_tf2) 2>/dev/null
3405   ac_val=`cat $ac_tf1 2>/dev/null`
3406   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3407     ac_cv_sys_long_file_names=no
3408     rm -rf $ac_xdir 2>/dev/null
3409     break
3410   fi
3411   rm -rf $ac_xdir 2>/dev/null
3412 done
3413 fi
3414 echo "$as_me:3414: result: $ac_cv_sys_long_file_names" >&5
3415 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3416 if test $ac_cv_sys_long_file_names = yes; then
3417
3418 cat >>confdefs.h <<\EOF
3419 #define HAVE_LONG_FILE_NAMES 1
3420 EOF
3421
3422 fi
3423
3424 # if we find pkg-config, check if we should install the ".pc" files.
3425
3426 echo "$as_me:3426: checking if you want to use pkg-config" >&5
3427 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3428
3429 # Check whether --with-pkg-config or --without-pkg-config was given.
3430 if test "${with_pkg_config+set}" = set; then
3431   withval="$with_pkg_config"
3432   cf_pkg_config=$withval
3433 else
3434   cf_pkg_config=yes
3435 fi;
3436 echo "$as_me:3436: result: $cf_pkg_config" >&5
3437 echo "${ECHO_T}$cf_pkg_config" >&6
3438
3439 case $cf_pkg_config in
3440 (no)
3441         PKG_CONFIG=none
3442         ;;
3443 (yes)
3444
3445 if test -n "$ac_tool_prefix"; then
3446   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3447 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3448 echo "$as_me:3448: checking for $ac_word" >&5
3449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3450 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3451   echo $ECHO_N "(cached) $ECHO_C" >&6
3452 else
3453   case $PKG_CONFIG in
3454   [\\/]* | ?:[\\/]*)
3455   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3456   ;;
3457   *)
3458   ac_save_IFS=$IFS; IFS=$ac_path_separator
3459 ac_dummy="$PATH"
3460 for ac_dir in $ac_dummy; do
3461   IFS=$ac_save_IFS
3462   test -z "$ac_dir" && ac_dir=.
3463   if $as_executable_p "$ac_dir/$ac_word"; then
3464    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3465    echo "$as_me:3465: found $ac_dir/$ac_word" >&5
3466    break
3467 fi
3468 done
3469
3470   ;;
3471 esac
3472 fi
3473 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3474
3475 if test -n "$PKG_CONFIG"; then
3476   echo "$as_me:3476: result: $PKG_CONFIG" >&5
3477 echo "${ECHO_T}$PKG_CONFIG" >&6
3478 else
3479   echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3481 fi
3482
3483 fi
3484 if test -z "$ac_cv_path_PKG_CONFIG"; then
3485   ac_pt_PKG_CONFIG=$PKG_CONFIG
3486   # Extract the first word of "pkg-config", so it can be a program name with args.
3487 set dummy pkg-config; ac_word=$2
3488 echo "$as_me:3488: checking for $ac_word" >&5
3489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3490 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3491   echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493   case $ac_pt_PKG_CONFIG in
3494   [\\/]* | ?:[\\/]*)
3495   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3496   ;;
3497   *)
3498   ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501   IFS=$ac_save_IFS
3502   test -z "$ac_dir" && ac_dir=.
3503   if $as_executable_p "$ac_dir/$ac_word"; then
3504    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3505    echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506    break
3507 fi
3508 done
3509
3510   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3511   ;;
3512 esac
3513 fi
3514 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3515
3516 if test -n "$ac_pt_PKG_CONFIG"; then
3517   echo "$as_me:3517: result: $ac_pt_PKG_CONFIG" >&5
3518 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3519 else
3520   echo "$as_me:3520: result: no" >&5
3521 echo "${ECHO_T}no" >&6
3522 fi
3523
3524   PKG_CONFIG=$ac_pt_PKG_CONFIG
3525 else
3526   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3527 fi
3528
3529         ;;
3530 (*)
3531         PKG_CONFIG=$withval
3532         ;;
3533 esac
3534
3535 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3536 if test "$PKG_CONFIG" != none ; then
3537
3538 if test "x$prefix" != xNONE; then
3539         cf_path_syntax="$prefix"
3540 else
3541         cf_path_syntax="$ac_default_prefix"
3542 fi
3543
3544 case ".$PKG_CONFIG" in
3545 (.\$\(*\)*|.\'*\'*)
3546         ;;
3547 (..|./*|.\\*)
3548         ;;
3549 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3550         ;;
3551 (.\${*prefix}*|.\${*dir}*)
3552         eval PKG_CONFIG="$PKG_CONFIG"
3553         case ".$PKG_CONFIG" in
3554         (.NONE/*)
3555                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3556                 ;;
3557         esac
3558         ;;
3559 (.no|.NONE/*)
3560         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3561         ;;
3562 (*)
3563         { { echo "$as_me:3563: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3564 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3565    { (exit 1); exit 1; }; }
3566         ;;
3567 esac
3568
3569 elif test "x$cf_pkg_config" != xno ; then
3570         { echo "$as_me:3570: WARNING: pkg-config is not installed" >&5
3571 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3572 fi
3573
3574 case $PKG_CONFIG in
3575 (no|none|yes)
3576         echo "$as_me:3576: checking for pkg-config library directory" >&5
3577 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3578         ;;
3579 (*)
3580         echo "$as_me:3580: checking for $PKG_CONFIG library directory" >&5
3581 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3582         ;;
3583 esac
3584
3585 PKG_CONFIG_LIBDIR=no
3586
3587 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3588 if test "${with_pkg_config_libdir+set}" = set; then
3589   withval="$with_pkg_config_libdir"
3590   PKG_CONFIG_LIBDIR=$withval
3591 else
3592   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3593 fi;
3594
3595 case x$PKG_CONFIG_LIBDIR in
3596 (x/*)
3597         ;;
3598 (xyes)
3599         # Look for the library directory using the same prefix as the executable
3600         if test "x$PKG_CONFIG" = xnone
3601         then
3602                 cf_path=$prefix
3603         else
3604                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3605         fi
3606
3607         # If you don't like using the default architecture, you have to specify the
3608         # intended library directory and corresponding compiler/linker options.
3609         #
3610         # This case allows for Debian's 2014-flavor of multiarch, along with the
3611         # most common variations before that point.  Some other variants spell the
3612         # directory differently, e.g., "pkg-config", and put it in unusual places.
3613         # pkg-config has always been poorly standardized, which is ironic...
3614         case x`(arch) 2>/dev/null` in
3615         (*64)
3616                 cf_search_path="\
3617                         $cf_path/lib/*64-linux-gnu \
3618                         $cf_path/share \
3619                         $cf_path/lib64 \
3620                         $cf_path/lib32 \
3621                         $cf_path/lib"
3622                 ;;
3623         (*)
3624                 cf_search_path="\
3625                         $cf_path/lib/*-linux-gnu \
3626                         $cf_path/share \
3627                         $cf_path/lib32 \
3628                         $cf_path/lib \
3629                         $cf_path/libdata"
3630                 ;;
3631         esac
3632
3633         test -n "$verbose" && echo "    list..." 1>&6
3634
3635 echo "${as_me:-configure}:3635: testing list... ..." 1>&5
3636
3637         for cf_config in $cf_search_path
3638         do
3639                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3640
3641 echo "${as_me:-configure}:3641: testing checking $cf_config/pkgconfig ..." 1>&5
3642
3643                 if test -d $cf_config/pkgconfig
3644                 then
3645                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3646                         echo "$as_me:3646: checking done" >&5
3647 echo $ECHO_N "checking done... $ECHO_C" >&6
3648                         break
3649                 fi
3650         done
3651         ;;
3652 (*)
3653         ;;
3654 esac
3655
3656 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3657         echo "$as_me:3657: result: $PKG_CONFIG_LIBDIR" >&5
3658 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3659 fi
3660
3661 if test "x$PKG_CONFIG" != xnone
3662 then
3663         echo "$as_me:3663: checking if we should install .pc files for $PKG_CONFIG" >&5
3664 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3665 else
3666         echo "$as_me:3666: checking if we should install .pc files" >&5
3667 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3668 fi
3669
3670 # Check whether --enable-pc-files or --disable-pc-files was given.
3671 if test "${enable_pc_files+set}" = set; then
3672   enableval="$enable_pc_files"
3673   enable_pc_files=$enableval
3674 else
3675   enable_pc_files=no
3676 fi;
3677 echo "$as_me:3677: result: $enable_pc_files" >&5
3678 echo "${ECHO_T}$enable_pc_files" >&6
3679
3680 if test "x$enable_pc_files" != xno
3681 then
3682         MAKE_PC_FILES=
3683         case "x$PKG_CONFIG_LIBDIR" in
3684         (xno|xyes)
3685                 { echo "$as_me:3685: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3686 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3687                 ;;
3688         (*)
3689
3690 if test "x$prefix" != xNONE; then
3691         cf_path_syntax="$prefix"
3692 else
3693         cf_path_syntax="$ac_default_prefix"
3694 fi
3695
3696 case ".$PKG_CONFIG_LIBDIR" in
3697 (.\$\(*\)*|.\'*\'*)
3698         ;;
3699 (..|./*|.\\*)
3700         ;;
3701 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3702         ;;
3703 (.\${*prefix}*|.\${*dir}*)
3704         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3705         case ".$PKG_CONFIG_LIBDIR" in
3706         (.NONE/*)
3707                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3708                 ;;
3709         esac
3710         ;;
3711 (.no|.NONE/*)
3712         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3713         ;;
3714 (*)
3715         { { echo "$as_me:3715: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3716 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3717    { (exit 1); exit 1; }; }
3718         ;;
3719 esac
3720
3721                 ;;
3722         esac
3723 else
3724         MAKE_PC_FILES="#"
3725 fi
3726
3727 if test -z "$MAKE_PC_FILES"
3728 then
3729         echo "$as_me:3729: checking for suffix to add to pc-files" >&5
3730 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3731
3732 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3733 if test "${with_pc_suffix+set}" = set; then
3734   withval="$with_pc_suffix"
3735   case "x$withval" in
3736         (xyes|xno)
3737                 PC_MODULE_SUFFIX=
3738                 ;;
3739         (*)     PC_MODULE_SUFFIX="$withval"
3740                 ;;
3741         esac
3742 fi;
3743         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3744         echo "$as_me:3744: result: $PC_MODULE_SUFFIX" >&5
3745 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3746         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3747
3748 fi
3749
3750 echo "$as_me:3750: checking if we should assume mixed-case filenames" >&5
3751 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3752
3753 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3754 if test "${enable_mixed_case+set}" = set; then
3755   enableval="$enable_mixed_case"
3756   enable_mixedcase=$enableval
3757 else
3758   enable_mixedcase=auto
3759 fi;
3760 echo "$as_me:3760: result: $enable_mixedcase" >&5
3761 echo "${ECHO_T}$enable_mixedcase" >&6
3762 if test "$enable_mixedcase" = "auto" ; then
3763
3764 echo "$as_me:3764: checking if filesystem supports mixed-case filenames" >&5
3765 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3766 if test "${cf_cv_mixedcase+set}" = set; then
3767   echo $ECHO_N "(cached) $ECHO_C" >&6
3768 else
3769
3770 if test "$cross_compiling" = yes ; then
3771         case $target_alias in
3772         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3773                 cf_cv_mixedcase=no
3774                 ;;
3775         (*)
3776                 cf_cv_mixedcase=yes
3777                 ;;
3778         esac
3779 else
3780         rm -f conftest CONFTEST
3781         echo test >conftest
3782         if test -f CONFTEST ; then
3783                 cf_cv_mixedcase=no
3784         else
3785                 cf_cv_mixedcase=yes
3786         fi
3787         rm -f conftest CONFTEST
3788 fi
3789
3790 fi
3791 echo "$as_me:3791: result: $cf_cv_mixedcase" >&5
3792 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3793 test "$cf_cv_mixedcase" = yes &&
3794 cat >>confdefs.h <<\EOF
3795 #define MIXEDCASE_FILENAMES 1
3796 EOF
3797
3798 else
3799         cf_cv_mixedcase=$enable_mixedcase
3800         if test "x$enable_mixedcase" = "xyes" ; then
3801
3802 cat >>confdefs.h <<\EOF
3803 #define MIXEDCASE_FILENAMES 1
3804 EOF
3805
3806         fi
3807 fi
3808
3809 # do this after mixed-case option (tags/TAGS is not as important as tic).
3810 echo "$as_me:3810: checking whether ${MAKE-make} sets \${MAKE}" >&5
3811 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3812 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3813 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3814   echo $ECHO_N "(cached) $ECHO_C" >&6
3815 else
3816   cat >conftest.make <<\EOF
3817 all:
3818         @echo 'ac_maketemp="${MAKE}"'
3819 EOF
3820 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3821 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3822 if test -n "$ac_maketemp"; then
3823   eval ac_cv_prog_make_${ac_make}_set=yes
3824 else
3825   eval ac_cv_prog_make_${ac_make}_set=no
3826 fi
3827 rm -f conftest.make
3828 fi
3829 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3830   echo "$as_me:3830: result: yes" >&5
3831 echo "${ECHO_T}yes" >&6
3832   SET_MAKE=
3833 else
3834   echo "$as_me:3834: result: no" >&5
3835 echo "${ECHO_T}no" >&6
3836   SET_MAKE="MAKE=${MAKE-make}"
3837 fi
3838
3839 for ac_prog in exctags ctags
3840 do
3841   # Extract the first word of "$ac_prog", so it can be a program name with args.
3842 set dummy $ac_prog; ac_word=$2
3843 echo "$as_me:3843: checking for $ac_word" >&5
3844 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3845 if test "${ac_cv_prog_CTAGS+set}" = set; then
3846   echo $ECHO_N "(cached) $ECHO_C" >&6
3847 else
3848   if test -n "$CTAGS"; then
3849   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3850 else
3851   ac_save_IFS=$IFS; IFS=$ac_path_separator
3852 ac_dummy="$PATH"
3853 for ac_dir in $ac_dummy; do
3854   IFS=$ac_save_IFS
3855   test -z "$ac_dir" && ac_dir=.
3856   $as_executable_p "$ac_dir/$ac_word" || continue
3857 ac_cv_prog_CTAGS="$ac_prog"
3858 echo "$as_me:3858: found $ac_dir/$ac_word" >&5
3859 break
3860 done
3861
3862 fi
3863 fi
3864 CTAGS=$ac_cv_prog_CTAGS
3865 if test -n "$CTAGS"; then
3866   echo "$as_me:3866: result: $CTAGS" >&5
3867 echo "${ECHO_T}$CTAGS" >&6
3868 else
3869   echo "$as_me:3869: result: no" >&5
3870 echo "${ECHO_T}no" >&6
3871 fi
3872
3873   test -n "$CTAGS" && break
3874 done
3875
3876 for ac_prog in exetags etags
3877 do
3878   # Extract the first word of "$ac_prog", so it can be a program name with args.
3879 set dummy $ac_prog; ac_word=$2
3880 echo "$as_me:3880: checking for $ac_word" >&5
3881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3882 if test "${ac_cv_prog_ETAGS+set}" = set; then
3883   echo $ECHO_N "(cached) $ECHO_C" >&6
3884 else
3885   if test -n "$ETAGS"; then
3886   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3887 else
3888   ac_save_IFS=$IFS; IFS=$ac_path_separator
3889 ac_dummy="$PATH"
3890 for ac_dir in $ac_dummy; do
3891   IFS=$ac_save_IFS
3892   test -z "$ac_dir" && ac_dir=.
3893   $as_executable_p "$ac_dir/$ac_word" || continue
3894 ac_cv_prog_ETAGS="$ac_prog"
3895 echo "$as_me:3895: found $ac_dir/$ac_word" >&5
3896 break
3897 done
3898
3899 fi
3900 fi
3901 ETAGS=$ac_cv_prog_ETAGS
3902 if test -n "$ETAGS"; then
3903   echo "$as_me:3903: result: $ETAGS" >&5
3904 echo "${ECHO_T}$ETAGS" >&6
3905 else
3906   echo "$as_me:3906: result: no" >&5
3907 echo "${ECHO_T}no" >&6
3908 fi
3909
3910   test -n "$ETAGS" && break
3911 done
3912
3913 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3914 set dummy ${CTAGS:-ctags}; ac_word=$2
3915 echo "$as_me:3915: checking for $ac_word" >&5
3916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3917 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3918   echo $ECHO_N "(cached) $ECHO_C" >&6
3919 else
3920   if test -n "$MAKE_LOWER_TAGS"; then
3921   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3922 else
3923   ac_save_IFS=$IFS; IFS=$ac_path_separator
3924 ac_dummy="$PATH"
3925 for ac_dir in $ac_dummy; do
3926   IFS=$ac_save_IFS
3927   test -z "$ac_dir" && ac_dir=.
3928   $as_executable_p "$ac_dir/$ac_word" || continue
3929 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3930 echo "$as_me:3930: found $ac_dir/$ac_word" >&5
3931 break
3932 done
3933
3934   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3935 fi
3936 fi
3937 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3938 if test -n "$MAKE_LOWER_TAGS"; then
3939   echo "$as_me:3939: result: $MAKE_LOWER_TAGS" >&5
3940 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3941 else
3942   echo "$as_me:3942: result: no" >&5
3943 echo "${ECHO_T}no" >&6
3944 fi
3945
3946 if test "$cf_cv_mixedcase" = yes ; then
3947         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3948 set dummy ${ETAGS:-etags}; ac_word=$2
3949 echo "$as_me:3949: checking for $ac_word" >&5
3950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3951 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3952   echo $ECHO_N "(cached) $ECHO_C" >&6
3953 else
3954   if test -n "$MAKE_UPPER_TAGS"; then
3955   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3956 else
3957   ac_save_IFS=$IFS; IFS=$ac_path_separator
3958 ac_dummy="$PATH"
3959 for ac_dir in $ac_dummy; do
3960   IFS=$ac_save_IFS
3961   test -z "$ac_dir" && ac_dir=.
3962   $as_executable_p "$ac_dir/$ac_word" || continue
3963 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3964 echo "$as_me:3964: found $ac_dir/$ac_word" >&5
3965 break
3966 done
3967
3968   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3969 fi
3970 fi
3971 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3972 if test -n "$MAKE_UPPER_TAGS"; then
3973   echo "$as_me:3973: result: $MAKE_UPPER_TAGS" >&5
3974 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3975 else
3976   echo "$as_me:3976: result: no" >&5
3977 echo "${ECHO_T}no" >&6
3978 fi
3979
3980 else
3981         MAKE_UPPER_TAGS=no
3982 fi
3983
3984 if test "$MAKE_UPPER_TAGS" = yes ; then
3985         MAKE_UPPER_TAGS=
3986 else
3987         MAKE_UPPER_TAGS="#"
3988 fi
3989
3990 if test "$MAKE_LOWER_TAGS" = yes ; then
3991         MAKE_LOWER_TAGS=
3992 else
3993         MAKE_LOWER_TAGS="#"
3994 fi
3995
3996 echo "$as_me:3996: checking for makeflags variable" >&5
3997 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3998 if test "${cf_cv_makeflags+set}" = set; then
3999   echo $ECHO_N "(cached) $ECHO_C" >&6
4000 else
4001
4002         cf_cv_makeflags=''
4003         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4004         do
4005                 cat >cf_makeflags.tmp <<CF_EOF
4006 SHELL = $SHELL
4007 all :
4008         @ echo '.$cf_option'
4009 CF_EOF
4010                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4011                 case "$cf_result" in
4012                 (.*k|.*kw)
4013                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4014                         case "$cf_result" in
4015                         (.*CC=*)        cf_cv_makeflags=
4016                                 ;;
4017                         (*)     cf_cv_makeflags=$cf_option
4018                                 ;;
4019                         esac
4020                         break
4021                         ;;
4022                 (.-)    ;;
4023                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4024                         ;;
4025                 esac
4026         done
4027         rm -f cf_makeflags.tmp
4028
4029 fi
4030 echo "$as_me:4030: result: $cf_cv_makeflags" >&5
4031 echo "${ECHO_T}$cf_cv_makeflags" >&6
4032
4033 if test -n "$ac_tool_prefix"; then
4034   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4035 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4036 echo "$as_me:4036: checking for $ac_word" >&5
4037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4038 if test "${ac_cv_prog_RANLIB+set}" = set; then
4039   echo $ECHO_N "(cached) $ECHO_C" >&6
4040 else
4041   if test -n "$RANLIB"; then
4042   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4043 else
4044   ac_save_IFS=$IFS; IFS=$ac_path_separator
4045 ac_dummy="$PATH"
4046 for ac_dir in $ac_dummy; do
4047   IFS=$ac_save_IFS
4048   test -z "$ac_dir" && ac_dir=.
4049   $as_executable_p "$ac_dir/$ac_word" || continue
4050 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4051 echo "$as_me:4051: found $ac_dir/$ac_word" >&5
4052 break
4053 done
4054
4055 fi
4056 fi
4057 RANLIB=$ac_cv_prog_RANLIB
4058 if test -n "$RANLIB"; then
4059   echo "$as_me:4059: result: $RANLIB" >&5
4060 echo "${ECHO_T}$RANLIB" >&6
4061 else
4062   echo "$as_me:4062: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064 fi
4065
4066 fi
4067 if test -z "$ac_cv_prog_RANLIB"; then
4068   ac_ct_RANLIB=$RANLIB
4069   # Extract the first word of "ranlib", so it can be a program name with args.
4070 set dummy ranlib; ac_word=$2
4071 echo "$as_me:4071: checking for $ac_word" >&5
4072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4073 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4074   echo $ECHO_N "(cached) $ECHO_C" >&6
4075 else
4076   if test -n "$ac_ct_RANLIB"; then
4077   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4078 else
4079   ac_save_IFS=$IFS; IFS=$ac_path_separator
4080 ac_dummy="$PATH"
4081 for ac_dir in $ac_dummy; do
4082   IFS=$ac_save_IFS
4083   test -z "$ac_dir" && ac_dir=.
4084   $as_executable_p "$ac_dir/$ac_word" || continue
4085 ac_cv_prog_ac_ct_RANLIB="ranlib"
4086 echo "$as_me:4086: found $ac_dir/$ac_word" >&5
4087 break
4088 done
4089
4090   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4091 fi
4092 fi
4093 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4094 if test -n "$ac_ct_RANLIB"; then
4095   echo "$as_me:4095: result: $ac_ct_RANLIB" >&5
4096 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4097 else
4098   echo "$as_me:4098: result: no" >&5
4099 echo "${ECHO_T}no" >&6
4100 fi
4101
4102   RANLIB=$ac_ct_RANLIB
4103 else
4104   RANLIB="$ac_cv_prog_RANLIB"
4105 fi
4106
4107 if test -n "$ac_tool_prefix"; then
4108   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4109 set dummy ${ac_tool_prefix}ld; ac_word=$2
4110 echo "$as_me:4110: checking for $ac_word" >&5
4111 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4112 if test "${ac_cv_prog_LD+set}" = set; then
4113   echo $ECHO_N "(cached) $ECHO_C" >&6
4114 else
4115   if test -n "$LD"; then
4116   ac_cv_prog_LD="$LD" # Let the user override the test.
4117 else
4118   ac_save_IFS=$IFS; IFS=$ac_path_separator
4119 ac_dummy="$PATH"
4120 for ac_dir in $ac_dummy; do
4121   IFS=$ac_save_IFS
4122   test -z "$ac_dir" && ac_dir=.
4123   $as_executable_p "$ac_dir/$ac_word" || continue
4124 ac_cv_prog_LD="${ac_tool_prefix}ld"
4125 echo "$as_me:4125: found $ac_dir/$ac_word" >&5
4126 break
4127 done
4128
4129 fi
4130 fi
4131 LD=$ac_cv_prog_LD
4132 if test -n "$LD"; then
4133   echo "$as_me:4133: result: $LD" >&5
4134 echo "${ECHO_T}$LD" >&6
4135 else
4136   echo "$as_me:4136: result: no" >&5
4137 echo "${ECHO_T}no" >&6
4138 fi
4139
4140 fi
4141 if test -z "$ac_cv_prog_LD"; then
4142   ac_ct_LD=$LD
4143   # Extract the first word of "ld", so it can be a program name with args.
4144 set dummy ld; ac_word=$2
4145 echo "$as_me:4145: checking for $ac_word" >&5
4146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4147 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4148   echo $ECHO_N "(cached) $ECHO_C" >&6
4149 else
4150   if test -n "$ac_ct_LD"; then
4151   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4152 else
4153   ac_save_IFS=$IFS; IFS=$ac_path_separator
4154 ac_dummy="$PATH"
4155 for ac_dir in $ac_dummy; do
4156   IFS=$ac_save_IFS
4157   test -z "$ac_dir" && ac_dir=.
4158   $as_executable_p "$ac_dir/$ac_word" || continue
4159 ac_cv_prog_ac_ct_LD="ld"
4160 echo "$as_me:4160: found $ac_dir/$ac_word" >&5
4161 break
4162 done
4163
4164   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4165 fi
4166 fi
4167 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4168 if test -n "$ac_ct_LD"; then
4169   echo "$as_me:4169: result: $ac_ct_LD" >&5
4170 echo "${ECHO_T}$ac_ct_LD" >&6
4171 else
4172   echo "$as_me:4172: result: no" >&5
4173 echo "${ECHO_T}no" >&6
4174 fi
4175
4176   LD=$ac_ct_LD
4177 else
4178   LD="$ac_cv_prog_LD"
4179 fi
4180
4181 if test -n "$ac_tool_prefix"; then
4182   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4183 set dummy ${ac_tool_prefix}ar; ac_word=$2
4184 echo "$as_me:4184: checking for $ac_word" >&5
4185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4186 if test "${ac_cv_prog_AR+set}" = set; then
4187   echo $ECHO_N "(cached) $ECHO_C" >&6
4188 else
4189   if test -n "$AR"; then
4190   ac_cv_prog_AR="$AR" # Let the user override the test.
4191 else
4192   ac_save_IFS=$IFS; IFS=$ac_path_separator
4193 ac_dummy="$PATH"
4194 for ac_dir in $ac_dummy; do
4195   IFS=$ac_save_IFS
4196   test -z "$ac_dir" && ac_dir=.
4197   $as_executable_p "$ac_dir/$ac_word" || continue
4198 ac_cv_prog_AR="${ac_tool_prefix}ar"
4199 echo "$as_me:4199: found $ac_dir/$ac_word" >&5
4200 break
4201 done
4202
4203 fi
4204 fi
4205 AR=$ac_cv_prog_AR
4206 if test -n "$AR"; then
4207   echo "$as_me:4207: result: $AR" >&5
4208 echo "${ECHO_T}$AR" >&6
4209 else
4210   echo "$as_me:4210: result: no" >&5
4211 echo "${ECHO_T}no" >&6
4212 fi
4213
4214 fi
4215 if test -z "$ac_cv_prog_AR"; then
4216   ac_ct_AR=$AR
4217   # Extract the first word of "ar", so it can be a program name with args.
4218 set dummy ar; ac_word=$2
4219 echo "$as_me:4219: checking for $ac_word" >&5
4220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4221 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4222   echo $ECHO_N "(cached) $ECHO_C" >&6
4223 else
4224   if test -n "$ac_ct_AR"; then
4225   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4226 else
4227   ac_save_IFS=$IFS; IFS=$ac_path_separator
4228 ac_dummy="$PATH"
4229 for ac_dir in $ac_dummy; do
4230   IFS=$ac_save_IFS
4231   test -z "$ac_dir" && ac_dir=.
4232   $as_executable_p "$ac_dir/$ac_word" || continue
4233 ac_cv_prog_ac_ct_AR="ar"
4234 echo "$as_me:4234: found $ac_dir/$ac_word" >&5
4235 break
4236 done
4237
4238   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4239 fi
4240 fi
4241 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4242 if test -n "$ac_ct_AR"; then
4243   echo "$as_me:4243: result: $ac_ct_AR" >&5
4244 echo "${ECHO_T}$ac_ct_AR" >&6
4245 else
4246   echo "$as_me:4246: result: no" >&5
4247 echo "${ECHO_T}no" >&6
4248 fi
4249
4250   AR=$ac_ct_AR
4251 else
4252   AR="$ac_cv_prog_AR"
4253 fi
4254
4255 if test -n "$ac_tool_prefix"; then
4256   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4257 set dummy ${ac_tool_prefix}nm; ac_word=$2
4258 echo "$as_me:4258: checking for $ac_word" >&5
4259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4260 if test "${ac_cv_prog_NM+set}" = set; then
4261   echo $ECHO_N "(cached) $ECHO_C" >&6
4262 else
4263   if test -n "$NM"; then
4264   ac_cv_prog_NM="$NM" # Let the user override the test.
4265 else
4266   ac_save_IFS=$IFS; IFS=$ac_path_separator
4267 ac_dummy="$PATH"
4268 for ac_dir in $ac_dummy; do
4269   IFS=$ac_save_IFS
4270   test -z "$ac_dir" && ac_dir=.
4271   $as_executable_p "$ac_dir/$ac_word" || continue
4272 ac_cv_prog_NM="${ac_tool_prefix}nm"
4273 echo "$as_me:4273: found $ac_dir/$ac_word" >&5
4274 break
4275 done
4276
4277 fi
4278 fi
4279 NM=$ac_cv_prog_NM
4280 if test -n "$NM"; then
4281   echo "$as_me:4281: result: $NM" >&5
4282 echo "${ECHO_T}$NM" >&6
4283 else
4284   echo "$as_me:4284: result: no" >&5
4285 echo "${ECHO_T}no" >&6
4286 fi
4287
4288 fi
4289 if test -z "$ac_cv_prog_NM"; then
4290   ac_ct_NM=$NM
4291   # Extract the first word of "nm", so it can be a program name with args.
4292 set dummy nm; ac_word=$2
4293 echo "$as_me:4293: checking for $ac_word" >&5
4294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4295 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4296   echo $ECHO_N "(cached) $ECHO_C" >&6
4297 else
4298   if test -n "$ac_ct_NM"; then
4299   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4300 else
4301   ac_save_IFS=$IFS; IFS=$ac_path_separator
4302 ac_dummy="$PATH"
4303 for ac_dir in $ac_dummy; do
4304   IFS=$ac_save_IFS
4305   test -z "$ac_dir" && ac_dir=.
4306   $as_executable_p "$ac_dir/$ac_word" || continue
4307 ac_cv_prog_ac_ct_NM="nm"
4308 echo "$as_me:4308: found $ac_dir/$ac_word" >&5
4309 break
4310 done
4311
4312   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4313 fi
4314 fi
4315 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4316 if test -n "$ac_ct_NM"; then
4317   echo "$as_me:4317: result: $ac_ct_NM" >&5
4318 echo "${ECHO_T}$ac_ct_NM" >&6
4319 else
4320   echo "$as_me:4320: result: no" >&5
4321 echo "${ECHO_T}no" >&6
4322 fi
4323
4324   NM=$ac_ct_NM
4325 else
4326   NM="$ac_cv_prog_NM"
4327 fi
4328
4329 if test -n "$ac_tool_prefix"; then
4330   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4331 set dummy ${ac_tool_prefix}ar; 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_prog_AR+set}" = set; then
4335   echo $ECHO_N "(cached) $ECHO_C" >&6
4336 else
4337   if test -n "$AR"; then
4338   ac_cv_prog_AR="$AR" # Let the user override the test.
4339 else
4340   ac_save_IFS=$IFS; IFS=$ac_path_separator
4341 ac_dummy="$PATH"
4342 for ac_dir in $ac_dummy; do
4343   IFS=$ac_save_IFS
4344   test -z "$ac_dir" && ac_dir=.
4345   $as_executable_p "$ac_dir/$ac_word" || continue
4346 ac_cv_prog_AR="${ac_tool_prefix}ar"
4347 echo "$as_me:4347: found $ac_dir/$ac_word" >&5
4348 break
4349 done
4350
4351 fi
4352 fi
4353 AR=$ac_cv_prog_AR
4354 if test -n "$AR"; then
4355   echo "$as_me:4355: result: $AR" >&5
4356 echo "${ECHO_T}$AR" >&6
4357 else
4358   echo "$as_me:4358: result: no" >&5
4359 echo "${ECHO_T}no" >&6
4360 fi
4361
4362 fi
4363 if test -z "$ac_cv_prog_AR"; then
4364   ac_ct_AR=$AR
4365   # Extract the first word of "ar", so it can be a program name with args.
4366 set dummy ar; ac_word=$2
4367 echo "$as_me:4367: checking for $ac_word" >&5
4368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4369 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   if test -n "$ac_ct_AR"; then
4373   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4374 else
4375   ac_save_IFS=$IFS; IFS=$ac_path_separator
4376 ac_dummy="$PATH"
4377 for ac_dir in $ac_dummy; do
4378   IFS=$ac_save_IFS
4379   test -z "$ac_dir" && ac_dir=.
4380   $as_executable_p "$ac_dir/$ac_word" || continue
4381 ac_cv_prog_ac_ct_AR="ar"
4382 echo "$as_me:4382: found $ac_dir/$ac_word" >&5
4383 break
4384 done
4385
4386   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4387 fi
4388 fi
4389 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4390 if test -n "$ac_ct_AR"; then
4391   echo "$as_me:4391: result: $ac_ct_AR" >&5
4392 echo "${ECHO_T}$ac_ct_AR" >&6
4393 else
4394   echo "$as_me:4394: result: no" >&5
4395 echo "${ECHO_T}no" >&6
4396 fi
4397
4398   AR=$ac_ct_AR
4399 else
4400   AR="$ac_cv_prog_AR"
4401 fi
4402
4403 echo "$as_me:4403: checking for options to update archives" >&5
4404 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4405 if test "${cf_cv_ar_flags+set}" = set; then
4406   echo $ECHO_N "(cached) $ECHO_C" >&6
4407 else
4408
4409         cf_cv_ar_flags=unknown
4410         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4411         do
4412
4413                 # check if $ARFLAGS already contains this choice
4414                 if test "x$ARFLAGS" != "x" ; then
4415                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4416                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4417                                 cf_cv_ar_flags=
4418                                 break
4419                         fi
4420                 fi
4421
4422                 rm -f conftest.$ac_cv_objext
4423                 rm -f conftest.a
4424
4425                 cat >conftest.$ac_ext <<EOF
4426 #line 4426 "configure"
4427 int     testdata[3] = { 123, 456, 789 };
4428 EOF
4429                 if { (eval echo "$as_me:4429: \"$ac_compile\"") >&5
4430   (eval $ac_compile) 2>&5
4431   ac_status=$?
4432   echo "$as_me:4432: \$? = $ac_status" >&5
4433   (exit $ac_status); } ; then
4434                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4435                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4436                         if test -f conftest.a ; then
4437                                 cf_cv_ar_flags=$cf_ar_flags
4438                                 break
4439                         fi
4440                 else
4441                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4442
4443 echo "${as_me:-configure}:4443: testing cannot compile test-program ..." 1>&5
4444
4445                         break
4446                 fi
4447         done
4448         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4449
4450 fi
4451 echo "$as_me:4451: result: $cf_cv_ar_flags" >&5
4452 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4453
4454 if test -n "$ARFLAGS" ; then
4455         if test -n "$cf_cv_ar_flags" ; then
4456                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4457         fi
4458 else
4459         ARFLAGS=$cf_cv_ar_flags
4460 fi
4461
4462 echo "$as_me:4462: checking if you have specified an install-prefix" >&5
4463 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4464
4465 # Check whether --with-install-prefix or --without-install-prefix was given.
4466 if test "${with_install_prefix+set}" = set; then
4467   withval="$with_install_prefix"
4468   case "x$withval" in
4469         (xyes|xno)
4470                 ;;
4471         (*)     DESTDIR="$withval"
4472                 ;;
4473         esac
4474 fi;
4475 echo "$as_me:4475: result: $DESTDIR" >&5
4476 echo "${ECHO_T}$DESTDIR" >&6
4477
4478 ###############################################################################
4479
4480 # If we're cross-compiling, allow the user to override the tools and their
4481 # options.  The configure script is oriented toward identifying the host
4482 # compiler, etc., but we need a build compiler to generate parts of the source.
4483
4484 if test "$cross_compiling" = yes ; then
4485
4486         # defaults that we might want to override
4487         : ${BUILD_CFLAGS:=''}
4488         : ${BUILD_CPPFLAGS:=''}
4489         : ${BUILD_LDFLAGS:=''}
4490         : ${BUILD_LIBS:=''}
4491         : ${BUILD_EXEEXT:='$x'}
4492         : ${BUILD_OBJEXT:='o'}
4493
4494 # Check whether --with-build-cc or --without-build-cc was given.
4495 if test "${with_build_cc+set}" = set; then
4496   withval="$with_build_cc"
4497   BUILD_CC="$withval"
4498 else
4499   for ac_prog in gcc cc cl
4500 do
4501   # Extract the first word of "$ac_prog", so it can be a program name with args.
4502 set dummy $ac_prog; ac_word=$2
4503 echo "$as_me:4503: checking for $ac_word" >&5
4504 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4505 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4506   echo $ECHO_N "(cached) $ECHO_C" >&6
4507 else
4508   if test -n "$BUILD_CC"; then
4509   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4510 else
4511   ac_save_IFS=$IFS; IFS=$ac_path_separator
4512 ac_dummy="$PATH"
4513 for ac_dir in $ac_dummy; do
4514   IFS=$ac_save_IFS
4515   test -z "$ac_dir" && ac_dir=.
4516   $as_executable_p "$ac_dir/$ac_word" || continue
4517 ac_cv_prog_BUILD_CC="$ac_prog"
4518 echo "$as_me:4518: found $ac_dir/$ac_word" >&5
4519 break
4520 done
4521
4522 fi
4523 fi
4524 BUILD_CC=$ac_cv_prog_BUILD_CC
4525 if test -n "$BUILD_CC"; then
4526   echo "$as_me:4526: result: $BUILD_CC" >&5
4527 echo "${ECHO_T}$BUILD_CC" >&6
4528 else
4529   echo "$as_me:4529: result: no" >&5
4530 echo "${ECHO_T}no" >&6
4531 fi
4532
4533   test -n "$BUILD_CC" && break
4534 done
4535
4536 fi;
4537         echo "$as_me:4537: checking for native build C compiler" >&5
4538 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4539         echo "$as_me:4539: result: $BUILD_CC" >&5
4540 echo "${ECHO_T}$BUILD_CC" >&6
4541
4542         echo "$as_me:4542: checking for native build C preprocessor" >&5
4543 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4544
4545 # Check whether --with-build-cpp or --without-build-cpp was given.
4546 if test "${with_build_cpp+set}" = set; then
4547   withval="$with_build_cpp"
4548   BUILD_CPP="$withval"
4549 else
4550   BUILD_CPP='${BUILD_CC} -E'
4551 fi;
4552         echo "$as_me:4552: result: $BUILD_CPP" >&5
4553 echo "${ECHO_T}$BUILD_CPP" >&6
4554
4555         echo "$as_me:4555: checking for native build C flags" >&5
4556 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4557
4558 # Check whether --with-build-cflags or --without-build-cflags was given.
4559 if test "${with_build_cflags+set}" = set; then
4560   withval="$with_build_cflags"
4561   BUILD_CFLAGS="$withval"
4562 fi;
4563         echo "$as_me:4563: result: $BUILD_CFLAGS" >&5
4564 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4565
4566         echo "$as_me:4566: checking for native build C preprocessor-flags" >&5
4567 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4568
4569 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4570 if test "${with_build_cppflags+set}" = set; then
4571   withval="$with_build_cppflags"
4572   BUILD_CPPFLAGS="$withval"
4573 fi;
4574         echo "$as_me:4574: result: $BUILD_CPPFLAGS" >&5
4575 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4576
4577         echo "$as_me:4577: checking for native build linker-flags" >&5
4578 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4579
4580 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4581 if test "${with_build_ldflags+set}" = set; then
4582   withval="$with_build_ldflags"
4583   BUILD_LDFLAGS="$withval"
4584 fi;
4585         echo "$as_me:4585: result: $BUILD_LDFLAGS" >&5
4586 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4587
4588         echo "$as_me:4588: checking for native build linker-libraries" >&5
4589 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4590
4591 # Check whether --with-build-libs or --without-build-libs was given.
4592 if test "${with_build_libs+set}" = set; then
4593   withval="$with_build_libs"
4594   BUILD_LIBS="$withval"
4595 fi;
4596         echo "$as_me:4596: result: $BUILD_LIBS" >&5
4597 echo "${ECHO_T}$BUILD_LIBS" >&6
4598
4599         # this assumes we're on Unix.
4600         BUILD_EXEEXT=
4601         BUILD_OBJEXT=o
4602
4603         : ${BUILD_CC:='${CC}'}
4604
4605         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4606                 { { echo "$as_me:4606: error: Cross-build requires two compilers.
4607 Use --with-build-cc to specify the native compiler." >&5
4608 echo "$as_me: error: Cross-build requires two compilers.
4609 Use --with-build-cc to specify the native compiler." >&2;}
4610    { (exit 1); exit 1; }; }
4611         fi
4612
4613 else
4614         : ${BUILD_CC:='${CC}'}
4615         : ${BUILD_CPP:='${CPP}'}
4616         : ${BUILD_CFLAGS:='${CFLAGS}'}
4617         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4618         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4619         : ${BUILD_LIBS:='${LIBS}'}
4620         : ${BUILD_EXEEXT:='$x'}
4621         : ${BUILD_OBJEXT:='o'}
4622 fi
4623
4624 ###############################################################################
4625
4626 ### Options to allow the user to specify the set of libraries which are used.
4627 ### Use "--without-normal --with-shared" to allow the default model to be
4628 ### shared, for example.
4629 cf_list_models=""
4630
4631 echo "$as_me:4631: checking if libtool -version-number should be used" >&5
4632 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4633
4634 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4635 if test "${enable_libtool_version+set}" = set; then
4636   enableval="$enable_libtool_version"
4637   test "$enableval" != no && enableval=yes
4638         if test "$enableval" != "yes" ; then
4639     cf_libtool_version=no
4640         else
4641                 cf_libtool_version=yes
4642         fi
4643 else
4644   enableval=yes
4645         cf_libtool_version=yes
4646
4647 fi;
4648 echo "$as_me:4648: result: $cf_libtool_version" >&5
4649 echo "${ECHO_T}$cf_libtool_version" >&6
4650
4651 if test "$cf_libtool_version" = yes ; then
4652         LIBTOOL_VERSION="-version-number"
4653 else
4654         LIBTOOL_VERSION="-version-info"
4655         case "x$VERSION" in
4656         (x)
4657                 { echo "$as_me:4657: WARNING: VERSION was not set" >&5
4658 echo "$as_me: WARNING: VERSION was not set" >&2;}
4659                 ;;
4660         (x*.*.*)
4661                 ABI_VERSION="$VERSION"
4662                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4663
4664 echo "${as_me:-configure}:4664: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4665
4666                 ;;
4667         (x*:*:*)
4668                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4669                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4670
4671 echo "${as_me:-configure}:4671: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4672
4673                 ;;
4674         (*)
4675                 { echo "$as_me:4675: WARNING: unexpected VERSION value: $VERSION" >&5
4676 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4677                 ;;
4678         esac
4679 fi
4680
4681 LIBTOOL=
4682
4683 # common library maintenance symbols that are convenient for libtool scripts:
4684 LIB_CREATE='${AR} -cr'
4685 LIB_OBJECT='${OBJECTS}'
4686 LIB_SUFFIX=.a
4687 LIB_PREP="$RANLIB"
4688
4689 # symbols used to prop libtool up to enable it to determine what it should be
4690 # doing:
4691 LIB_CLEAN=
4692 LIB_COMPILE=
4693 LIB_LINK='${CC}'
4694 LIB_INSTALL=
4695 LIB_UNINSTALL=
4696
4697 echo "$as_me:4697: checking if you want to build libraries with libtool" >&5
4698 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4699
4700 # Check whether --with-libtool or --without-libtool was given.
4701 if test "${with_libtool+set}" = set; then
4702   withval="$with_libtool"
4703   with_libtool=$withval
4704 else
4705   with_libtool=no
4706 fi;
4707 echo "$as_me:4707: result: $with_libtool" >&5
4708 echo "${ECHO_T}$with_libtool" >&6
4709 if test "$with_libtool" != "no"; then
4710
4711         if test "$with_libtool" != "yes" ; then
4712
4713 if test "x$prefix" != xNONE; then
4714         cf_path_syntax="$prefix"
4715 else
4716         cf_path_syntax="$ac_default_prefix"
4717 fi
4718
4719 case ".$with_libtool" in
4720 (.\$\(*\)*|.\'*\'*)
4721         ;;
4722 (..|./*|.\\*)
4723         ;;
4724 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4725         ;;
4726 (.\${*prefix}*|.\${*dir}*)
4727         eval with_libtool="$with_libtool"
4728         case ".$with_libtool" in
4729         (.NONE/*)
4730                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4731                 ;;
4732         esac
4733         ;;
4734 (.no|.NONE/*)
4735         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4736         ;;
4737 (*)
4738         { { echo "$as_me:4738: error: expected a pathname, not \"$with_libtool\"" >&5
4739 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4740    { (exit 1); exit 1; }; }
4741         ;;
4742 esac
4743
4744                 LIBTOOL=$with_libtool
4745         else
4746                 if test -n "$ac_tool_prefix"; then
4747   for ac_prog in libtool glibtool
4748   do
4749     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4750 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4751 echo "$as_me:4751: checking for $ac_word" >&5
4752 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4753 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4754   echo $ECHO_N "(cached) $ECHO_C" >&6
4755 else
4756   if test -n "$LIBTOOL"; then
4757   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4758 else
4759   ac_save_IFS=$IFS; IFS=$ac_path_separator
4760 ac_dummy="$PATH"
4761 for ac_dir in $ac_dummy; do
4762   IFS=$ac_save_IFS
4763   test -z "$ac_dir" && ac_dir=.
4764   $as_executable_p "$ac_dir/$ac_word" || continue
4765 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4766 echo "$as_me:4766: found $ac_dir/$ac_word" >&5
4767 break
4768 done
4769
4770 fi
4771 fi
4772 LIBTOOL=$ac_cv_prog_LIBTOOL
4773 if test -n "$LIBTOOL"; then
4774   echo "$as_me:4774: result: $LIBTOOL" >&5
4775 echo "${ECHO_T}$LIBTOOL" >&6
4776 else
4777   echo "$as_me:4777: result: no" >&5
4778 echo "${ECHO_T}no" >&6
4779 fi
4780
4781     test -n "$LIBTOOL" && break
4782   done
4783 fi
4784 if test -z "$LIBTOOL"; then
4785   ac_ct_LIBTOOL=$LIBTOOL
4786   for ac_prog in libtool glibtool
4787 do
4788   # Extract the first word of "$ac_prog", so it can be a program name with args.
4789 set dummy $ac_prog; ac_word=$2
4790 echo "$as_me:4790: checking for $ac_word" >&5
4791 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4792 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4793   echo $ECHO_N "(cached) $ECHO_C" >&6
4794 else
4795   if test -n "$ac_ct_LIBTOOL"; then
4796   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4797 else
4798   ac_save_IFS=$IFS; IFS=$ac_path_separator
4799 ac_dummy="$PATH"
4800 for ac_dir in $ac_dummy; do
4801   IFS=$ac_save_IFS
4802   test -z "$ac_dir" && ac_dir=.
4803   $as_executable_p "$ac_dir/$ac_word" || continue
4804 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4805 echo "$as_me:4805: found $ac_dir/$ac_word" >&5
4806 break
4807 done
4808
4809 fi
4810 fi
4811 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4812 if test -n "$ac_ct_LIBTOOL"; then
4813   echo "$as_me:4813: result: $ac_ct_LIBTOOL" >&5
4814 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4815 else
4816   echo "$as_me:4816: result: no" >&5
4817 echo "${ECHO_T}no" >&6
4818 fi
4819
4820   test -n "$ac_ct_LIBTOOL" && break
4821 done
4822 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4823
4824   LIBTOOL=$ac_ct_LIBTOOL
4825 fi
4826
4827 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4828 then
4829         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.].*//'`
4830 else
4831         cf_cv_libtool_version=
4832 fi
4833 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4834
4835                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4836                 then
4837
4838 unset ac_cv_prog_ac_ct_LIBTOOL
4839 unset ac_ct_LIBTOOL
4840 unset LIBTOOL
4841
4842                         if test -n "$ac_tool_prefix"; then
4843   for ac_prog in glibtool
4844   do
4845     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4846 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4847 echo "$as_me:4847: checking for $ac_word" >&5
4848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4849 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4850   echo $ECHO_N "(cached) $ECHO_C" >&6
4851 else
4852   if test -n "$LIBTOOL"; then
4853   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4854 else
4855   ac_save_IFS=$IFS; IFS=$ac_path_separator
4856 ac_dummy="$PATH"
4857 for ac_dir in $ac_dummy; do
4858   IFS=$ac_save_IFS
4859   test -z "$ac_dir" && ac_dir=.
4860   $as_executable_p "$ac_dir/$ac_word" || continue
4861 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4862 echo "$as_me:4862: found $ac_dir/$ac_word" >&5
4863 break
4864 done
4865
4866 fi
4867 fi
4868 LIBTOOL=$ac_cv_prog_LIBTOOL
4869 if test -n "$LIBTOOL"; then
4870   echo "$as_me:4870: result: $LIBTOOL" >&5
4871 echo "${ECHO_T}$LIBTOOL" >&6
4872 else
4873   echo "$as_me:4873: result: no" >&5
4874 echo "${ECHO_T}no" >&6
4875 fi
4876
4877     test -n "$LIBTOOL" && break
4878   done
4879 fi
4880 if test -z "$LIBTOOL"; then
4881   ac_ct_LIBTOOL=$LIBTOOL
4882   for ac_prog in glibtool
4883 do
4884   # Extract the first word of "$ac_prog", so it can be a program name with args.
4885 set dummy $ac_prog; ac_word=$2
4886 echo "$as_me:4886: checking for $ac_word" >&5
4887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4888 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4889   echo $ECHO_N "(cached) $ECHO_C" >&6
4890 else
4891   if test -n "$ac_ct_LIBTOOL"; then
4892   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4893 else
4894   ac_save_IFS=$IFS; IFS=$ac_path_separator
4895 ac_dummy="$PATH"
4896 for ac_dir in $ac_dummy; do
4897   IFS=$ac_save_IFS
4898   test -z "$ac_dir" && ac_dir=.
4899   $as_executable_p "$ac_dir/$ac_word" || continue
4900 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4901 echo "$as_me:4901: found $ac_dir/$ac_word" >&5
4902 break
4903 done
4904
4905 fi
4906 fi
4907 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4908 if test -n "$ac_ct_LIBTOOL"; then
4909   echo "$as_me:4909: result: $ac_ct_LIBTOOL" >&5
4910 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4911 else
4912   echo "$as_me:4912: result: no" >&5
4913 echo "${ECHO_T}no" >&6
4914 fi
4915
4916   test -n "$ac_ct_LIBTOOL" && break
4917 done
4918 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4919
4920   LIBTOOL=$ac_ct_LIBTOOL
4921 fi
4922
4923 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4924 then
4925         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4926 else
4927         cf_cv_libtool_version=
4928 fi
4929 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4930
4931                 fi
4932         fi
4933         if test -z "$LIBTOOL" ; then
4934                 { { echo "$as_me:4934: error: Cannot find libtool" >&5
4935 echo "$as_me: error: Cannot find libtool" >&2;}
4936    { (exit 1); exit 1; }; }
4937         fi
4938         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4939         LIB_OBJECT='${OBJECTS:.o=.lo}'
4940         LIB_SUFFIX=.la
4941         LIB_CLEAN='${LIBTOOL} --mode=clean'
4942         LIB_COMPILE='${LIBTOOL} --mode=compile'
4943         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4944         LIB_INSTALL='${LIBTOOL} --mode=install'
4945         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4946         LIB_PREP=:
4947
4948 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4949 then
4950         echo "$as_me:4950: checking version of $LIBTOOL" >&5
4951 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4952
4953 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4954 then
4955         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.].*//'`
4956 else
4957         cf_cv_libtool_version=
4958 fi
4959 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4960
4961         echo "$as_me:4961: result: $cf_cv_libtool_version" >&5
4962 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4963         if test -z "$cf_cv_libtool_version" ; then
4964                 { { echo "$as_me:4964: error: This is not GNU libtool" >&5
4965 echo "$as_me: error: This is not GNU libtool" >&2;}
4966    { (exit 1); exit 1; }; }
4967         fi
4968 else
4969         { { echo "$as_me:4969: error: GNU libtool has not been found" >&5
4970 echo "$as_me: error: GNU libtool has not been found" >&2;}
4971    { (exit 1); exit 1; }; }
4972 fi
4973
4974         # special hack to add -no-undefined (which libtool should do for itself)
4975         LT_UNDEF=
4976         case "$cf_cv_system_name" in
4977         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
4978                 LT_UNDEF=-no-undefined
4979                 ;;
4980         esac
4981
4982         # special hack to add --tag option for C++ compiler
4983         case $cf_cv_libtool_version in
4984         (1.[5-9]*|[2-9].[0-9.a-z]*)
4985                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4986                 LIBTOOL="$LIBTOOL --tag=CC"
4987                 ;;
4988         (*)
4989                 LIBTOOL_CXX="$LIBTOOL"
4990                 ;;
4991         esac
4992 else
4993         LIBTOOL=""
4994         LIBTOOL_CXX=""
4995 fi
4996
4997 test -z "$LIBTOOL" && ECHO_LT=
4998
4999 if test "$with_libtool" != "no" ; then
5000
5001 cf_list_models="$cf_list_models libtool"
5002
5003 else
5004
5005 echo "$as_me:5005: checking if you want to build shared libraries" >&5
5006 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5007
5008 # Check whether --with-shared or --without-shared was given.
5009 if test "${with_shared+set}" = set; then
5010   withval="$with_shared"
5011   with_shared=$withval
5012 else
5013   with_shared=no
5014 fi;
5015 echo "$as_me:5015: result: $with_shared" >&5
5016 echo "${ECHO_T}$with_shared" >&6
5017 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5018
5019 echo "$as_me:5019: checking if you want to build static libraries" >&5
5020 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5021
5022 # Check whether --with-normal or --without-normal was given.
5023 if test "${with_normal+set}" = set; then
5024   withval="$with_normal"
5025   with_normal=$withval
5026 else
5027   with_normal=yes
5028 fi;
5029 echo "$as_me:5029: result: $with_normal" >&5
5030 echo "${ECHO_T}$with_normal" >&6
5031 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5032
5033 echo "$as_me:5033: checking if you want to build debug libraries" >&5
5034 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5035
5036 # Check whether --with-debug or --without-debug was given.
5037 if test "${with_debug+set}" = set; then
5038   withval="$with_debug"
5039   with_debug=$withval
5040 else
5041   with_debug=yes
5042 fi;
5043 echo "$as_me:5043: result: $with_debug" >&5
5044 echo "${ECHO_T}$with_debug" >&6
5045 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5046
5047 echo "$as_me:5047: checking if you want to build profiling libraries" >&5
5048 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5049
5050 # Check whether --with-profile or --without-profile was given.
5051 if test "${with_profile+set}" = set; then
5052   withval="$with_profile"
5053   with_profile=$withval
5054 else
5055   with_profile=no
5056 fi;
5057 echo "$as_me:5057: result: $with_profile" >&5
5058 echo "${ECHO_T}$with_profile" >&6
5059 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5060
5061 fi
5062
5063 if test "X$cf_with_cxx_binding" != Xno; then
5064 if test "x$with_shared" = "xyes"; then
5065 echo "$as_me:5065: checking if you want to build C++ shared libraries" >&5
5066 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5067
5068 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5069 if test "${with_cxx_shared+set}" = set; then
5070   withval="$with_cxx_shared"
5071   with_shared_cxx=$withval
5072 else
5073   with_shared_cxx=no
5074 fi;
5075 echo "$as_me:5075: result: $with_shared_cxx" >&5
5076 echo "${ECHO_T}$with_shared_cxx" >&6
5077 fi
5078 fi
5079
5080 ###############################################################################
5081
5082 echo "$as_me:5082: checking for specified models" >&5
5083 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5084 test -z "$cf_list_models" && cf_list_models=normal
5085 test "$with_libtool" != "no" && cf_list_models=libtool
5086 echo "$as_me:5086: result: $cf_list_models" >&5
5087 echo "${ECHO_T}$cf_list_models" >&6
5088
5089 ### Use the first model as the default, and save its suffix for use in building
5090 ### up test-applications.
5091 echo "$as_me:5091: checking for default model" >&5
5092 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5093 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5094 echo "$as_me:5094: result: $DFT_LWR_MODEL" >&5
5095 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5096
5097 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5098
5099 TICS_NAME=tic
5100
5101 TINFO_NAME=tinfo
5102
5103 LIB_NAME=ncurses
5104
5105 LIB_DIR=../lib
5106 LIB_2ND=../../lib
5107
5108 echo "$as_me:5108: checking if you want to have a library-prefix" >&5
5109 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5110
5111 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5112 if test "${with_lib_prefix+set}" = set; then
5113   withval="$with_lib_prefix"
5114   with_lib_prefix=$withval
5115 else
5116   with_lib_prefix=auto
5117 fi;
5118 echo "$as_me:5118: result: $with_lib_prefix" >&5
5119 echo "${ECHO_T}$with_lib_prefix" >&6
5120
5121 if test $with_lib_prefix = auto
5122 then
5123
5124         case $cf_cv_system_name in
5125         (OS/2*|os2*)
5126                 if test "$DFT_LWR_MODEL" = libtool; then
5127                         LIB_PREFIX='lib'
5128                 else
5129                         LIB_PREFIX=''
5130                 fi
5131                 ;;
5132         (*)     LIB_PREFIX='lib'
5133                 ;;
5134         esac
5135 cf_prefix=$LIB_PREFIX
5136
5137 elif test $with_lib_prefix = no
5138 then
5139         LIB_PREFIX=
5140 else
5141         LIB_PREFIX=$with_lib_prefix
5142 fi
5143
5144 LIB_SUFFIX=
5145
5146         echo "$as_me:5146: checking for PATH separator" >&5
5147 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5148         case $cf_cv_system_name in
5149         (os2*)  PATH_SEPARATOR=';'  ;;
5150         (*)     ${PATH_SEPARATOR:=':'}  ;;
5151         esac
5152
5153         echo "$as_me:5153: result: $PATH_SEPARATOR" >&5
5154 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5155
5156 ###############################################################################
5157
5158 echo "$as_me:5158: checking if you want to build a separate terminfo library" >&5
5159 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5160
5161 # Check whether --with-termlib or --without-termlib was given.
5162 if test "${with_termlib+set}" = set; then
5163   withval="$with_termlib"
5164   with_termlib=$withval
5165 else
5166   with_termlib=no
5167 fi;
5168 echo "$as_me:5168: result: $with_termlib" >&5
5169 echo "${ECHO_T}$with_termlib" >&6
5170
5171 echo "$as_me:5171: checking if you want to build a separate tic library" >&5
5172 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5173
5174 # Check whether --with-ticlib or --without-ticlib was given.
5175 if test "${with_ticlib+set}" = set; then
5176   withval="$with_ticlib"
5177   with_ticlib=$withval
5178 else
5179   with_ticlib=no
5180 fi;
5181 echo "$as_me:5181: result: $with_ticlib" >&5
5182 echo "${ECHO_T}$with_ticlib" >&6
5183
5184 ### Checks for special libraries, must be done up-front.
5185 SHLIB_LIST=""
5186
5187 echo "$as_me:5187: checking if you want to link with the GPM mouse library" >&5
5188 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5189
5190 # Check whether --with-gpm or --without-gpm was given.
5191 if test "${with_gpm+set}" = set; then
5192   withval="$with_gpm"
5193   with_gpm=$withval
5194 else
5195   with_gpm=maybe
5196 fi;
5197 echo "$as_me:5197: result: $with_gpm" >&5
5198 echo "${ECHO_T}$with_gpm" >&6
5199
5200 if test "$with_gpm" != no ; then
5201         echo "$as_me:5201: checking for gpm.h" >&5
5202 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5203 if test "${ac_cv_header_gpm_h+set}" = set; then
5204   echo $ECHO_N "(cached) $ECHO_C" >&6
5205 else
5206   cat >conftest.$ac_ext <<_ACEOF
5207 #line 5207 "configure"
5208 #include "confdefs.h"
5209 #include <gpm.h>
5210 _ACEOF
5211 if { (eval echo "$as_me:5211: \"$ac_cpp conftest.$ac_ext\"") >&5
5212   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5213   ac_status=$?
5214   egrep -v '^ *\+' conftest.er1 >conftest.err
5215   rm -f conftest.er1
5216   cat conftest.err >&5
5217   echo "$as_me:5217: \$? = $ac_status" >&5
5218   (exit $ac_status); } >/dev/null; then
5219   if test -s conftest.err; then
5220     ac_cpp_err=$ac_c_preproc_warn_flag
5221   else
5222     ac_cpp_err=
5223   fi
5224 else
5225   ac_cpp_err=yes
5226 fi
5227 if test -z "$ac_cpp_err"; then
5228   ac_cv_header_gpm_h=yes
5229 else
5230   echo "$as_me: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232   ac_cv_header_gpm_h=no
5233 fi
5234 rm -f conftest.err conftest.$ac_ext
5235 fi
5236 echo "$as_me:5236: result: $ac_cv_header_gpm_h" >&5
5237 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5238 if test $ac_cv_header_gpm_h = yes; then
5239
5240 cat >>confdefs.h <<\EOF
5241 #define HAVE_GPM_H 1
5242 EOF
5243
5244                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5245                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5246
5247 echo "${as_me:-configure}:5247: testing assuming we really have GPM library ..." 1>&5
5248
5249 cat >>confdefs.h <<\EOF
5250 #define HAVE_LIBGPM 1
5251 EOF
5252
5253                 else
5254                         echo "$as_me:5254: checking for Gpm_Open in -lgpm" >&5
5255 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5256 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5257   echo $ECHO_N "(cached) $ECHO_C" >&6
5258 else
5259   ac_check_lib_save_LIBS=$LIBS
5260 LIBS="-lgpm  $LIBS"
5261 cat >conftest.$ac_ext <<_ACEOF
5262 #line 5262 "configure"
5263 #include "confdefs.h"
5264
5265 /* Override any gcc2 internal prototype to avoid an error.  */
5266 #ifdef __cplusplus
5267 extern "C"
5268 #endif
5269 /* We use char because int might match the return type of a gcc2
5270    builtin and then its argument prototype would still apply.  */
5271 char Gpm_Open ();
5272 int
5273 main ()
5274 {
5275 Gpm_Open ();
5276   ;
5277   return 0;
5278 }
5279 _ACEOF
5280 rm -f conftest.$ac_objext conftest$ac_exeext
5281 if { (eval echo "$as_me:5281: \"$ac_link\"") >&5
5282   (eval $ac_link) 2>&5
5283   ac_status=$?
5284   echo "$as_me:5284: \$? = $ac_status" >&5
5285   (exit $ac_status); } &&
5286          { ac_try='test -s conftest$ac_exeext'
5287   { (eval echo "$as_me:5287: \"$ac_try\"") >&5
5288   (eval $ac_try) 2>&5
5289   ac_status=$?
5290   echo "$as_me:5290: \$? = $ac_status" >&5
5291   (exit $ac_status); }; }; then
5292   ac_cv_lib_gpm_Gpm_Open=yes
5293 else
5294   echo "$as_me: failed program was:" >&5
5295 cat conftest.$ac_ext >&5
5296 ac_cv_lib_gpm_Gpm_Open=no
5297 fi
5298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5299 LIBS=$ac_check_lib_save_LIBS
5300 fi
5301 echo "$as_me:5301: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5302 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5303 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5304   :
5305 else
5306
5307                                 { { echo "$as_me:5307: error: Cannot link with GPM library" >&5
5308 echo "$as_me: error: Cannot link with GPM library" >&2;}
5309    { (exit 1); exit 1; }; }
5310                 fi
5311                 with_gpm=yes
5312
5313 fi
5314
5315 else
5316
5317                 test "$with_gpm" != maybe && { echo "$as_me:5317: WARNING: Cannot find GPM header" >&5
5318 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5319                 with_gpm=no
5320
5321 fi
5322
5323 fi
5324
5325 if test "$with_gpm" != no ; then
5326         echo "$as_me:5326: checking if you want to load GPM dynamically" >&5
5327 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5328
5329 # Check whether --with-dlsym or --without-dlsym was given.
5330 if test "${with_dlsym+set}" = set; then
5331   withval="$with_dlsym"
5332   with_dlsym=$withval
5333 else
5334   with_dlsym=yes
5335 fi;
5336         echo "$as_me:5336: result: $with_dlsym" >&5
5337 echo "${ECHO_T}$with_dlsym" >&6
5338         if test "x$with_dlsym" = xyes ; then
5339
5340 cf_have_dlsym=no
5341 echo "$as_me:5341: checking for dlsym" >&5
5342 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5343 if test "${ac_cv_func_dlsym+set}" = set; then
5344   echo $ECHO_N "(cached) $ECHO_C" >&6
5345 else
5346   cat >conftest.$ac_ext <<_ACEOF
5347 #line 5347 "configure"
5348 #include "confdefs.h"
5349 /* System header to define __stub macros and hopefully few prototypes,
5350     which can conflict with char dlsym (); below.  */
5351 #include <assert.h>
5352 /* Override any gcc2 internal prototype to avoid an error.  */
5353 #ifdef __cplusplus
5354 extern "C"
5355 #endif
5356 /* We use char because int might match the return type of a gcc2
5357    builtin and then its argument prototype would still apply.  */
5358 char dlsym ();
5359 char (*f) ();
5360
5361 int
5362 main ()
5363 {
5364 /* The GNU C library defines this for functions which it implements
5365     to always fail with ENOSYS.  Some functions are actually named
5366     something starting with __ and the normal name is an alias.  */
5367 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5368 choke me
5369 #else
5370 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5371 #endif
5372
5373   ;
5374   return 0;
5375 }
5376 _ACEOF
5377 rm -f conftest.$ac_objext conftest$ac_exeext
5378 if { (eval echo "$as_me:5378: \"$ac_link\"") >&5
5379   (eval $ac_link) 2>&5
5380   ac_status=$?
5381   echo "$as_me:5381: \$? = $ac_status" >&5
5382   (exit $ac_status); } &&
5383          { ac_try='test -s conftest$ac_exeext'
5384   { (eval echo "$as_me:5384: \"$ac_try\"") >&5
5385   (eval $ac_try) 2>&5
5386   ac_status=$?
5387   echo "$as_me:5387: \$? = $ac_status" >&5
5388   (exit $ac_status); }; }; then
5389   ac_cv_func_dlsym=yes
5390 else
5391   echo "$as_me: failed program was:" >&5
5392 cat conftest.$ac_ext >&5
5393 ac_cv_func_dlsym=no
5394 fi
5395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5396 fi
5397 echo "$as_me:5397: result: $ac_cv_func_dlsym" >&5
5398 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5399 if test $ac_cv_func_dlsym = yes; then
5400   cf_have_dlsym=yes
5401 else
5402
5403 cf_have_libdl=no
5404 echo "$as_me:5404: checking for dlsym in -ldl" >&5
5405 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5406 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5407   echo $ECHO_N "(cached) $ECHO_C" >&6
5408 else
5409   ac_check_lib_save_LIBS=$LIBS
5410 LIBS="-ldl  $LIBS"
5411 cat >conftest.$ac_ext <<_ACEOF
5412 #line 5412 "configure"
5413 #include "confdefs.h"
5414
5415 /* Override any gcc2 internal prototype to avoid an error.  */
5416 #ifdef __cplusplus
5417 extern "C"
5418 #endif
5419 /* We use char because int might match the return type of a gcc2
5420    builtin and then its argument prototype would still apply.  */
5421 char dlsym ();
5422 int
5423 main ()
5424 {
5425 dlsym ();
5426   ;
5427   return 0;
5428 }
5429 _ACEOF
5430 rm -f conftest.$ac_objext conftest$ac_exeext
5431 if { (eval echo "$as_me:5431: \"$ac_link\"") >&5
5432   (eval $ac_link) 2>&5
5433   ac_status=$?
5434   echo "$as_me:5434: \$? = $ac_status" >&5
5435   (exit $ac_status); } &&
5436          { ac_try='test -s conftest$ac_exeext'
5437   { (eval echo "$as_me:5437: \"$ac_try\"") >&5
5438   (eval $ac_try) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); }; }; then
5442   ac_cv_lib_dl_dlsym=yes
5443 else
5444   echo "$as_me: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5446 ac_cv_lib_dl_dlsym=no
5447 fi
5448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5449 LIBS=$ac_check_lib_save_LIBS
5450 fi
5451 echo "$as_me:5451: result: $ac_cv_lib_dl_dlsym" >&5
5452 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5453 if test $ac_cv_lib_dl_dlsym = yes; then
5454
5455         cf_have_dlsym=yes
5456         cf_have_libdl=yes
5457 fi
5458
5459 fi
5460
5461 if test "$cf_have_dlsym" = yes ; then
5462         test "$cf_have_libdl" = yes && {
5463 cf_add_libs="-ldl"
5464 # Filter out duplicates - this happens with badly-designed ".pc" files...
5465 for cf_add_1lib in $LIBS
5466 do
5467         for cf_add_2lib in $cf_add_libs
5468         do
5469                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5470                 then
5471                         cf_add_1lib=
5472                         break
5473                 fi
5474         done
5475         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5476 done
5477 LIBS="$cf_add_libs"
5478  }
5479
5480         echo "$as_me:5480: checking whether able to link to dl*() functions" >&5
5481 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5482         cat >conftest.$ac_ext <<_ACEOF
5483 #line 5483 "configure"
5484 #include "confdefs.h"
5485 #include <dlfcn.h>
5486 int
5487 main ()
5488 {
5489
5490                 void *obj;
5491                 if ((obj = dlopen("filename", 0)) != 0) {
5492                         if (dlsym(obj, "symbolname") == 0) {
5493                         dlclose(obj);
5494                         }
5495                 }
5496   ;
5497   return 0;
5498 }
5499 _ACEOF
5500 rm -f conftest.$ac_objext conftest$ac_exeext
5501 if { (eval echo "$as_me:5501: \"$ac_link\"") >&5
5502   (eval $ac_link) 2>&5
5503   ac_status=$?
5504   echo "$as_me:5504: \$? = $ac_status" >&5
5505   (exit $ac_status); } &&
5506          { ac_try='test -s conftest$ac_exeext'
5507   { (eval echo "$as_me:5507: \"$ac_try\"") >&5
5508   (eval $ac_try) 2>&5
5509   ac_status=$?
5510   echo "$as_me:5510: \$? = $ac_status" >&5
5511   (exit $ac_status); }; }; then
5512
5513 cat >>confdefs.h <<\EOF
5514 #define HAVE_LIBDL 1
5515 EOF
5516
5517 else
5518   echo "$as_me: failed program was:" >&5
5519 cat conftest.$ac_ext >&5
5520
5521                 { { echo "$as_me:5521: error: Cannot link test program for libdl" >&5
5522 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5523    { (exit 1); exit 1; }; }
5524 fi
5525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5526         echo "$as_me:5526: result: ok" >&5
5527 echo "${ECHO_T}ok" >&6
5528 else
5529         { { echo "$as_me:5529: error: Cannot find dlsym function" >&5
5530 echo "$as_me: error: Cannot find dlsym function" >&2;}
5531    { (exit 1); exit 1; }; }
5532 fi
5533
5534                 if test "x$with_gpm" != xyes ; then
5535                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5536
5537 echo "${as_me:-configure}:5537: testing assuming soname for gpm is $with_gpm ..." 1>&5
5538
5539                         cf_cv_gpm_soname="$with_gpm"
5540                 else
5541
5542 echo "$as_me:5542: checking for soname of gpm library" >&5
5543 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5544 if test "${cf_cv_gpm_soname+set}" = set; then
5545   echo $ECHO_N "(cached) $ECHO_C" >&6
5546 else
5547
5548 cf_cv_gpm_soname=unknown
5549 if test "$cross_compiling" != yes ; then
5550 cat >conftest.$ac_ext <<CF_EOF
5551 #include <gpm.h>
5552 int main()
5553 {
5554 if (Gpm_Open(0,0)) Gpm_Close();
5555         ${cf_cv_main_return:-return}(0);
5556 }
5557 CF_EOF
5558 cf_save_LIBS="$LIBS"
5559
5560 cf_add_libs="-lgpm"
5561 # Filter out duplicates - this happens with badly-designed ".pc" files...
5562 for cf_add_1lib in $LIBS
5563 do
5564         for cf_add_2lib in $cf_add_libs
5565         do
5566                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5567                 then
5568                         cf_add_1lib=
5569                         break
5570                 fi
5571         done
5572         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5573 done
5574 LIBS="$cf_add_libs"
5575
5576         if { (eval echo "$as_me:5576: \"$ac_compile\"") >&5
5577   (eval $ac_compile) 2>&5
5578   ac_status=$?
5579   echo "$as_me:5579: \$? = $ac_status" >&5
5580   (exit $ac_status); } ; then
5581                 if { (eval echo "$as_me:5581: \"$ac_link\"") >&5
5582   (eval $ac_link) 2>&5
5583   ac_status=$?
5584   echo "$as_me:5584: \$? = $ac_status" >&5
5585   (exit $ac_status); } ; then
5586                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5587                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5588                 fi
5589         fi
5590 rm -rf conftest*
5591 LIBS="$cf_save_LIBS"
5592 fi
5593
5594 fi
5595 echo "$as_me:5595: result: $cf_cv_gpm_soname" >&5
5596 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5597
5598                 fi
5599                 test "$cf_cv_gpm_soname" != "unknown" &&
5600 cat >>confdefs.h <<EOF
5601 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5602 EOF
5603
5604                 SHLIB_LIST="-ldl $SHLIB_LIST"
5605         else
5606                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5607
5608 cf_add_libs="-lgpm"
5609 # Filter out duplicates - this happens with badly-designed ".pc" files...
5610 for cf_add_1lib in $TEST_LIBS
5611 do
5612         for cf_add_2lib in $cf_add_libs
5613         do
5614                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5615                 then
5616                         cf_add_1lib=
5617                         break
5618                 fi
5619         done
5620         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5621 done
5622 TEST_LIBS="$cf_add_libs"
5623
5624         fi
5625
5626 cat >>confdefs.h <<\EOF
5627 #define HAVE_LIBGPM 1
5628 EOF
5629
5630 echo "$as_me:5630: checking for Gpm_Wgetch in -lgpm" >&5
5631 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5632 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5633   echo $ECHO_N "(cached) $ECHO_C" >&6
5634 else
5635   ac_check_lib_save_LIBS=$LIBS
5636 LIBS="-lgpm  $LIBS"
5637 cat >conftest.$ac_ext <<_ACEOF
5638 #line 5638 "configure"
5639 #include "confdefs.h"
5640
5641 /* Override any gcc2 internal prototype to avoid an error.  */
5642 #ifdef __cplusplus
5643 extern "C"
5644 #endif
5645 /* We use char because int might match the return type of a gcc2
5646    builtin and then its argument prototype would still apply.  */
5647 char Gpm_Wgetch ();
5648 int
5649 main ()
5650 {
5651 Gpm_Wgetch ();
5652   ;
5653   return 0;
5654 }
5655 _ACEOF
5656 rm -f conftest.$ac_objext conftest$ac_exeext
5657 if { (eval echo "$as_me:5657: \"$ac_link\"") >&5
5658   (eval $ac_link) 2>&5
5659   ac_status=$?
5660   echo "$as_me:5660: \$? = $ac_status" >&5
5661   (exit $ac_status); } &&
5662          { ac_try='test -s conftest$ac_exeext'
5663   { (eval echo "$as_me:5663: \"$ac_try\"") >&5
5664   (eval $ac_try) 2>&5
5665   ac_status=$?
5666   echo "$as_me:5666: \$? = $ac_status" >&5
5667   (exit $ac_status); }; }; then
5668   ac_cv_lib_gpm_Gpm_Wgetch=yes
5669 else
5670   echo "$as_me: failed program was:" >&5
5671 cat conftest.$ac_ext >&5
5672 ac_cv_lib_gpm_Gpm_Wgetch=no
5673 fi
5674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5675 LIBS=$ac_check_lib_save_LIBS
5676 fi
5677 echo "$as_me:5677: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5678 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5679 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5680
5681 echo "$as_me:5681: checking if GPM is weakly bound to curses library" >&5
5682 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5683 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5684   echo $ECHO_N "(cached) $ECHO_C" >&6
5685 else
5686
5687 cf_cv_check_gpm_wgetch=unknown
5688 if test "$cross_compiling" != yes ; then
5689
5690 cat >conftest.$ac_ext <<CF_EOF
5691 #include <gpm.h>
5692 int main()
5693 {
5694         Gpm_Wgetch();
5695         ${cf_cv_main_return:-return}(0);
5696 }
5697 CF_EOF
5698
5699         cf_save_LIBS="$LIBS"
5700         # This only works if we can look at the symbol table.  If a shared
5701         # library is stripped for install, we cannot use that.  So we're forced
5702         # to rely on the static library, noting that some packagers may not
5703         # include it.
5704         LIBS="-static -lgpm -dynamic $LIBS"
5705         if { (eval echo "$as_me:5705: \"$ac_compile\"") >&5
5706   (eval $ac_compile) 2>&5
5707   ac_status=$?
5708   echo "$as_me:5708: \$? = $ac_status" >&5
5709   (exit $ac_status); } ; then
5710                 if { (eval echo "$as_me:5710: \"$ac_link\"") >&5
5711   (eval $ac_link) 2>&5
5712   ac_status=$?
5713   echo "$as_me:5713: \$? = $ac_status" >&5
5714   (exit $ac_status); } ; then
5715                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5716                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5717                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5718                 fi
5719         fi
5720         rm -rf conftest*
5721         LIBS="$cf_save_LIBS"
5722 fi
5723
5724 fi
5725 echo "$as_me:5725: result: $cf_cv_check_gpm_wgetch" >&5
5726 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5727
5728 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5729         { echo "$as_me:5729: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5730 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5731 fi
5732
5733 fi
5734
5735 fi
5736
5737 # not everyone has "test -c"
5738 if test -c /dev/sysmouse 2>/dev/null ; then
5739 echo "$as_me:5739: checking if you want to use sysmouse" >&5
5740 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5741
5742 # Check whether --with-sysmouse or --without-sysmouse was given.
5743 if test "${with_sysmouse+set}" = set; then
5744   withval="$with_sysmouse"
5745   cf_with_sysmouse=$withval
5746 else
5747   cf_with_sysmouse=maybe
5748 fi;
5749         if test "$cf_with_sysmouse" != no ; then
5750         cat >conftest.$ac_ext <<_ACEOF
5751 #line 5751 "configure"
5752 #include "confdefs.h"
5753
5754 #include <osreldate.h>
5755 #if (__FreeBSD_version >= 400017)
5756 #include <sys/consio.h>
5757 #include <sys/fbio.h>
5758 #else
5759 #include <machine/console.h>
5760 #endif
5761
5762 int
5763 main ()
5764 {
5765
5766         struct mouse_info the_mouse;
5767         ioctl(0, CONS_MOUSECTL, &the_mouse);
5768
5769   ;
5770   return 0;
5771 }
5772 _ACEOF
5773 rm -f conftest.$ac_objext
5774 if { (eval echo "$as_me:5774: \"$ac_compile\"") >&5
5775   (eval $ac_compile) 2>&5
5776   ac_status=$?
5777   echo "$as_me:5777: \$? = $ac_status" >&5
5778   (exit $ac_status); } &&
5779          { ac_try='test -s conftest.$ac_objext'
5780   { (eval echo "$as_me:5780: \"$ac_try\"") >&5
5781   (eval $ac_try) 2>&5
5782   ac_status=$?
5783   echo "$as_me:5783: \$? = $ac_status" >&5
5784   (exit $ac_status); }; }; then
5785   cf_with_sysmouse=yes
5786 else
5787   echo "$as_me: failed program was:" >&5
5788 cat conftest.$ac_ext >&5
5789 cf_with_sysmouse=no
5790 fi
5791 rm -f conftest.$ac_objext conftest.$ac_ext
5792         fi
5793 echo "$as_me:5793: result: $cf_with_sysmouse" >&5
5794 echo "${ECHO_T}$cf_with_sysmouse" >&6
5795 test "$cf_with_sysmouse" = yes &&
5796 cat >>confdefs.h <<\EOF
5797 #define USE_SYSMOUSE 1
5798 EOF
5799
5800 fi
5801
5802 if test X"$CC_G_OPT" = X"" ; then
5803         CC_G_OPT='-g'
5804         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5805 fi
5806
5807 if test X"$CXX_G_OPT" = X"" ; then
5808         CXX_G_OPT='-g'
5809         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5810 fi
5811
5812 echo "$as_me:5812: checking for default loader flags" >&5
5813 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5814 case $DFT_LWR_MODEL in
5815 (libtool) LD_MODEL=''   ;;
5816 (normal)  LD_MODEL=''   ;;
5817 (debug)   LD_MODEL=$CC_G_OPT ;;
5818 (profile) LD_MODEL='-pg';;
5819 (shared)  LD_MODEL=''   ;;
5820 esac
5821 echo "$as_me:5821: result: $LD_MODEL" >&5
5822 echo "${ECHO_T}$LD_MODEL" >&6
5823
5824 case $DFT_LWR_MODEL in
5825 (shared)
5826
5827 echo "$as_me:5827: checking if rpath option should be used" >&5
5828 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5829
5830 # Check whether --enable-rpath or --disable-rpath was given.
5831 if test "${enable_rpath+set}" = set; then
5832   enableval="$enable_rpath"
5833   cf_cv_enable_rpath=$enableval
5834 else
5835   cf_cv_enable_rpath=no
5836 fi;
5837 echo "$as_me:5837: result: $cf_cv_enable_rpath" >&5
5838 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5839
5840 echo "$as_me:5840: checking if shared libraries should be relinked during install" >&5
5841 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5842
5843 # Check whether --enable-relink or --disable-relink was given.
5844 if test "${enable_relink+set}" = set; then
5845   enableval="$enable_relink"
5846   cf_cv_do_relink=$enableval
5847 else
5848   cf_cv_do_relink=yes
5849 fi;
5850 echo "$as_me:5850: result: $cf_cv_do_relink" >&5
5851 echo "${ECHO_T}$cf_cv_do_relink" >&6
5852         ;;
5853 esac
5854
5855 # we will build libraries one-level down.
5856 rel_builddir=..
5857
5858 LD_RPATH_OPT=
5859 echo "$as_me:5859: checking for an rpath option" >&5
5860 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5861 case $cf_cv_system_name in
5862 (irix*)
5863         if test "$GCC" = yes; then
5864                 LD_RPATH_OPT="-Wl,-rpath,"
5865         else
5866                 LD_RPATH_OPT="-rpath "
5867         fi
5868         ;;
5869 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5870         LD_RPATH_OPT="-Wl,-rpath,"
5871         ;;
5872 (openbsd[2-9].*|mirbsd*)
5873         LD_RPATH_OPT="-Wl,-rpath,"
5874         ;;
5875 (dragonfly*)
5876         LD_RPATH_OPT="-rpath "
5877         ;;
5878 (netbsd*)
5879         LD_RPATH_OPT="-Wl,-rpath,"
5880         ;;
5881 (osf*|mls+*)
5882         LD_RPATH_OPT="-rpath "
5883         ;;
5884 (solaris2*)
5885         LD_RPATH_OPT="-R"
5886         ;;
5887 (*)
5888         ;;
5889 esac
5890 echo "$as_me:5890: result: $LD_RPATH_OPT" >&5
5891 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5892
5893 case "x$LD_RPATH_OPT" in
5894 (x-R*)
5895         echo "$as_me:5895: checking if we need a space after rpath option" >&5
5896 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5897         cf_save_LIBS="$LIBS"
5898
5899 cf_add_libs="${LD_RPATH_OPT}$libdir"
5900 # Filter out duplicates - this happens with badly-designed ".pc" files...
5901 for cf_add_1lib in $LIBS
5902 do
5903         for cf_add_2lib in $cf_add_libs
5904         do
5905                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5906                 then
5907                         cf_add_1lib=
5908                         break
5909                 fi
5910         done
5911         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5912 done
5913 LIBS="$cf_add_libs"
5914
5915         cat >conftest.$ac_ext <<_ACEOF
5916 #line 5916 "configure"
5917 #include "confdefs.h"
5918
5919 int
5920 main ()
5921 {
5922
5923   ;
5924   return 0;
5925 }
5926 _ACEOF
5927 rm -f conftest.$ac_objext conftest$ac_exeext
5928 if { (eval echo "$as_me:5928: \"$ac_link\"") >&5
5929   (eval $ac_link) 2>&5
5930   ac_status=$?
5931   echo "$as_me:5931: \$? = $ac_status" >&5
5932   (exit $ac_status); } &&
5933          { ac_try='test -s conftest$ac_exeext'
5934   { (eval echo "$as_me:5934: \"$ac_try\"") >&5
5935   (eval $ac_try) 2>&5
5936   ac_status=$?
5937   echo "$as_me:5937: \$? = $ac_status" >&5
5938   (exit $ac_status); }; }; then
5939   cf_rpath_space=no
5940 else
5941   echo "$as_me: failed program was:" >&5
5942 cat conftest.$ac_ext >&5
5943 cf_rpath_space=yes
5944 fi
5945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5946         LIBS="$cf_save_LIBS"
5947         echo "$as_me:5947: result: $cf_rpath_space" >&5
5948 echo "${ECHO_T}$cf_rpath_space" >&6
5949         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5950         ;;
5951 esac
5952
5953         RM_SHARED_OPTS=
5954         LOCAL_LDFLAGS=
5955         LOCAL_LDFLAGS2=
5956         LD_SHARED_OPTS=
5957         INSTALL_LIB="-m 644"
5958         : ${rel_builddir:=.}
5959
5960         shlibdir=$libdir
5961
5962         MAKE_DLLS="#"
5963
5964         cf_cv_do_symlinks=no
5965         cf_ld_rpath_opt=
5966         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5967
5968         echo "$as_me:5968: checking if release/abi version should be used for shared libs" >&5
5969 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5970
5971 # Check whether --with-shlib-version or --without-shlib-version was given.
5972 if test "${with_shlib_version+set}" = set; then
5973   withval="$with_shlib_version"
5974   test -z "$withval" && withval=auto
5975         case $withval in
5976         (yes)
5977                 cf_cv_shlib_version=auto
5978                 ;;
5979         (rel|abi|auto)
5980                 cf_cv_shlib_version=$withval
5981                 ;;
5982         (*)
5983                 echo "$as_me:5983: result: $withval" >&5
5984 echo "${ECHO_T}$withval" >&6
5985                 { { echo "$as_me:5985: error: option value must be one of: rel, abi, or auto" >&5
5986 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5987    { (exit 1); exit 1; }; }
5988                 ;;
5989         esac
5990
5991 else
5992   cf_cv_shlib_version=auto
5993 fi;
5994         echo "$as_me:5994: result: $cf_cv_shlib_version" >&5
5995 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5996
5997         cf_cv_rm_so_locs=no
5998         cf_try_cflags=
5999
6000         # Some less-capable ports of gcc support only -fpic
6001         CC_SHARED_OPTS=
6002         if test "$GCC" = yes
6003         then
6004                 echo "$as_me:6004: checking which $CC option to use" >&5
6005 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6006                 cf_save_CFLAGS="$CFLAGS"
6007                 for CC_SHARED_OPTS in -fPIC -fpic ''
6008                 do
6009                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6010                         cat >conftest.$ac_ext <<_ACEOF
6011 #line 6011 "configure"
6012 #include "confdefs.h"
6013 #include <stdio.h>
6014 int
6015 main ()
6016 {
6017 int x = 1
6018   ;
6019   return 0;
6020 }
6021 _ACEOF
6022 rm -f conftest.$ac_objext
6023 if { (eval echo "$as_me:6023: \"$ac_compile\"") >&5
6024   (eval $ac_compile) 2>&5
6025   ac_status=$?
6026   echo "$as_me:6026: \$? = $ac_status" >&5
6027   (exit $ac_status); } &&
6028          { ac_try='test -s conftest.$ac_objext'
6029   { (eval echo "$as_me:6029: \"$ac_try\"") >&5
6030   (eval $ac_try) 2>&5
6031   ac_status=$?
6032   echo "$as_me:6032: \$? = $ac_status" >&5
6033   (exit $ac_status); }; }; then
6034   break
6035 else
6036   echo "$as_me: failed program was:" >&5
6037 cat conftest.$ac_ext >&5
6038 fi
6039 rm -f conftest.$ac_objext conftest.$ac_ext
6040                 done
6041                 echo "$as_me:6041: result: $CC_SHARED_OPTS" >&5
6042 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6043                 CFLAGS="$cf_save_CFLAGS"
6044         fi
6045
6046         cf_cv_shlib_version_infix=no
6047
6048         case $cf_cv_system_name in
6049         (aix4.3-9*|aix[5-7]*)
6050                 if test "$GCC" = yes; then
6051                         CC_SHARED_OPTS='-Wl,-brtl'
6052                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6053                 else
6054                         CC_SHARED_OPTS='-brtl'
6055                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6056                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6057                 fi
6058                 ;;
6059         (beos*)
6060                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6061                 ;;
6062         (cygwin*)
6063                 CC_SHARED_OPTS=
6064                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6065                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6066                 cf_cv_shlib_version=cygdll
6067                 cf_cv_shlib_version_infix=cygdll
6068                 shlibdir=$bindir
6069                 MAKE_DLLS=
6070                 cat >mk_shared_lib.sh <<-CF_EOF
6071                 #!$SHELL
6072                 SHARED_LIB=\$1
6073                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6074                 shift
6075                 cat <<-EOF
6076                 Linking shared library
6077                 ** SHARED_LIB \$SHARED_LIB
6078                 ** IMPORT_LIB \$IMPORT_LIB
6079 EOF
6080                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6081 CF_EOF
6082                 chmod +x mk_shared_lib.sh
6083                 ;;
6084         (msys*)
6085                 CC_SHARED_OPTS=
6086                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6087                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6088                 cf_cv_shlib_version=msysdll
6089                 cf_cv_shlib_version_infix=msysdll
6090                 shlibdir=$bindir
6091                 MAKE_DLLS=
6092                 cat >mk_shared_lib.sh <<-CF_EOF
6093                 #!$SHELL
6094                 SHARED_LIB=\$1
6095                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6096                 shift
6097                 cat <<-EOF
6098                 Linking shared library
6099                 ** SHARED_LIB \$SHARED_LIB
6100                 ** IMPORT_LIB \$IMPORT_LIB
6101 EOF
6102                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6103 CF_EOF
6104                 chmod +x mk_shared_lib.sh
6105                 ;;
6106         (darwin*)
6107                 cf_try_cflags="no-cpp-precomp"
6108                 CC_SHARED_OPTS="-dynamic"
6109                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6110                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6111                 cf_cv_shlib_version_infix=yes
6112                 echo "$as_me:6112: checking if ld -search_paths_first works" >&5
6113 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6114 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6115   echo $ECHO_N "(cached) $ECHO_C" >&6
6116 else
6117
6118                         cf_save_LDFLAGS=$LDFLAGS
6119                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6120                         cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123
6124 int
6125 main ()
6126 {
6127 int i;
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 rm -f conftest.$ac_objext conftest$ac_exeext
6133 if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134   (eval $ac_link) 2>&5
6135   ac_status=$?
6136   echo "$as_me:6136: \$? = $ac_status" >&5
6137   (exit $ac_status); } &&
6138          { ac_try='test -s conftest$ac_exeext'
6139   { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:6142: \$? = $ac_status" >&5
6143   (exit $ac_status); }; }; then
6144   cf_cv_ldflags_search_paths_first=yes
6145 else
6146   echo "$as_me: failed program was:" >&5
6147 cat conftest.$ac_ext >&5
6148 cf_cv_ldflags_search_paths_first=no
6149 fi
6150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6151                                 LDFLAGS=$cf_save_LDFLAGS
6152 fi
6153 echo "$as_me:6153: result: $cf_cv_ldflags_search_paths_first" >&5
6154 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6155                 if test $cf_cv_ldflags_search_paths_first = yes; then
6156                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6157                 fi
6158                 ;;
6159         (hpux[7-8]*)
6160                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6161                 if test "$GCC" != yes; then
6162                         CC_SHARED_OPTS='+Z'
6163                 fi
6164                 MK_SHARED_LIB='${LD} -b -o $@'
6165                 INSTALL_LIB="-m 555"
6166                 ;;
6167         (hpux*)
6168                 # (tested with gcc 2.7.2 -- I don't have c89)
6169                 if test "$GCC" = yes; then
6170                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6171                 else
6172                         CC_SHARED_OPTS='+Z'
6173                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6174                 fi
6175                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6176                 # HP-UX shared libraries must be executable, and should be
6177                 # readonly to exploit a quirk in the memory manager.
6178                 INSTALL_LIB="-m 555"
6179                 ;;
6180         (interix*)
6181                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6182                 if test "$cf_cv_shlib_version" = rel; then
6183                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6184                 else
6185                         cf_shared_soname='`basename `'
6186                 fi
6187                 CC_SHARED_OPTS=
6188                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6189                 ;;
6190         (irix*)
6191                 if test "$cf_cv_enable_rpath" = yes ; then
6192                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6193                 fi
6194                 # tested with IRIX 5.2 and 'cc'.
6195                 if test "$GCC" != yes; then
6196                         CC_SHARED_OPTS='-KPIC'
6197                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6198                 else
6199                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6200                 fi
6201                 cf_cv_rm_so_locs=yes
6202                 ;;
6203         (linux*|gnu*|k*bsd*-gnu)
6204                 if test "$DFT_LWR_MODEL" = "shared" ; then
6205                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6206                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6207                 fi
6208                 if test "$cf_cv_enable_rpath" = yes ; then
6209                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6210                 fi
6211
6212         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6213         if test "$cf_cv_shlib_version" = rel; then
6214                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6215         else
6216                 cf_cv_shared_soname='`basename $@`'
6217         fi
6218
6219                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6220                 ;;
6221         (mingw*)
6222                 cf_cv_shlib_version=mingw
6223                 cf_cv_shlib_version_infix=mingw
6224                 shlibdir=$bindir
6225                 MAKE_DLLS=
6226                 if test "$DFT_LWR_MODEL" = "shared" ; then
6227                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6228                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6229                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6230                 fi
6231                 CC_SHARED_OPTS=
6232                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6233                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6234                 cat >mk_shared_lib.sh <<-CF_EOF
6235                 #!$SHELL
6236                 SHARED_LIB=\$1
6237                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6238                 shift
6239                 cat <<-EOF
6240                 Linking shared library
6241                 ** SHARED_LIB \$SHARED_LIB
6242                 ** IMPORT_LIB \$IMPORT_LIB
6243 EOF
6244                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6245 CF_EOF
6246                 chmod +x mk_shared_lib.sh
6247                 ;;
6248         (openbsd[2-9].*|mirbsd*)
6249                 if test "$DFT_LWR_MODEL" = "shared" ; then
6250                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6251                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6252                 fi
6253                 if test "$cf_cv_enable_rpath" = yes ; then
6254                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6255                 fi
6256                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6257
6258         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6259         if test "$cf_cv_shlib_version" = rel; then
6260                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6261         else
6262                 cf_cv_shared_soname='`basename $@`'
6263         fi
6264
6265                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6266                 ;;
6267         (nto-qnx*|openbsd*|freebsd[12].*)
6268                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6269                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6270                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6271                 ;;
6272         (dragonfly*|freebsd*)
6273                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6274                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6275                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6276                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6277                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6278                 fi
6279
6280         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6281         if test "$cf_cv_shlib_version" = rel; then
6282                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6283         else
6284                 cf_cv_shared_soname='`basename $@`'
6285         fi
6286
6287                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6288                 ;;
6289         (netbsd*)
6290                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6291                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6292                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6293                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6294                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6295                         if test "$cf_cv_shlib_version" = auto; then
6296                         if test -f /usr/libexec/ld.elf_so; then
6297                                 cf_cv_shlib_version=abi
6298                         else
6299                                 cf_cv_shlib_version=rel
6300                         fi
6301                         fi
6302
6303         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6304         if test "$cf_cv_shlib_version" = rel; then
6305                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6306         else
6307                 cf_cv_shared_soname='`basename $@`'
6308         fi
6309
6310                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6311                 else
6312                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6313                 fi
6314                 ;;
6315         (osf*|mls+*)
6316                 # tested with OSF/1 V3.2 and 'cc'
6317                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6318                 # link with shared libs).
6319                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6320                 case $host_os in
6321                 (osf4*)
6322                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6323                         ;;
6324                 esac
6325                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6326                 if test "$DFT_LWR_MODEL" = "shared" ; then
6327                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6328                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6329                 fi
6330                 cf_cv_rm_so_locs=yes
6331                 ;;
6332         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6333                 # tested with osr5.0.5
6334                 if test "$GCC" != yes; then
6335                         CC_SHARED_OPTS='-belf -KPIC'
6336                 fi
6337                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6338                 if test "$cf_cv_enable_rpath" = yes ; then
6339                         # only way is to set LD_RUN_PATH but no switch for it
6340                         RUN_PATH=$libdir
6341                 fi
6342                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6343                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6344                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6345                 ;;
6346         (sunos4*)
6347                 # tested with SunOS 4.1.1 and gcc 2.7.0
6348                 if test "$GCC" != yes; then
6349                         CC_SHARED_OPTS='-KPIC'
6350                 fi
6351                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6352                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6353                 ;;
6354         (solaris2*)
6355                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6356                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6357                 if test "$DFT_LWR_MODEL" = "shared" ; then
6358                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6359                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6360                 fi
6361                 if test "$cf_cv_enable_rpath" = yes ; then
6362                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6363                 fi
6364
6365         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6366         if test "$cf_cv_shlib_version" = rel; then
6367                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6368         else
6369                 cf_cv_shared_soname='`basename $@`'
6370         fi
6371
6372                 if test "$GCC" != yes; then
6373                         cf_save_CFLAGS="$CFLAGS"
6374                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6375                         do
6376                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6377                                 cat >conftest.$ac_ext <<_ACEOF
6378 #line 6378 "configure"
6379 #include "confdefs.h"
6380 #include <stdio.h>
6381 int
6382 main ()
6383 {
6384 printf("Hello\n");
6385   ;
6386   return 0;
6387 }
6388 _ACEOF
6389 rm -f conftest.$ac_objext
6390 if { (eval echo "$as_me:6390: \"$ac_compile\"") >&5
6391   (eval $ac_compile) 2>&5
6392   ac_status=$?
6393   echo "$as_me:6393: \$? = $ac_status" >&5
6394   (exit $ac_status); } &&
6395          { ac_try='test -s conftest.$ac_objext'
6396   { (eval echo "$as_me:6396: \"$ac_try\"") >&5
6397   (eval $ac_try) 2>&5
6398   ac_status=$?
6399   echo "$as_me:6399: \$? = $ac_status" >&5
6400   (exit $ac_status); }; }; then
6401   break
6402 else
6403   echo "$as_me: failed program was:" >&5
6404 cat conftest.$ac_ext >&5
6405 fi
6406 rm -f conftest.$ac_objext conftest.$ac_ext
6407                         done
6408                         CFLAGS="$cf_save_CFLAGS"
6409                         CC_SHARED_OPTS=$cf_shared_opts
6410                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6411                 else
6412                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6413                 fi
6414                 ;;
6415         (sysv5uw7*|unix_sv*)
6416                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6417                 if test "$GCC" != yes; then
6418                         CC_SHARED_OPTS='-KPIC'
6419                 fi
6420                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6421                 ;;
6422         (*)
6423                 CC_SHARED_OPTS='unknown'
6424                 MK_SHARED_LIB='echo unknown'
6425                 ;;
6426         esac
6427
6428         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6429         case "$cf_cv_shlib_version" in
6430         (rel|abi)
6431                 case "$MK_SHARED_LIB" in
6432                 (*'-o $@')
6433                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6434                         ;;
6435                 (*)
6436                         { echo "$as_me:6436: WARNING: ignored --with-shlib-version" >&5
6437 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6438                         ;;
6439                 esac
6440                 ;;
6441         esac
6442
6443         if test -n "$cf_try_cflags"
6444         then
6445 cat > conftest.$ac_ext <<EOF
6446 #line 6446 "${as_me:-configure}"
6447 #include <stdio.h>
6448 int main(int argc, char *argv[])
6449 {
6450         printf("hello\n");
6451         return (argv[argc-1] == 0) ;
6452 }
6453 EOF
6454                 cf_save_CFLAGS="$CFLAGS"
6455                 for cf_opt in $cf_try_cflags
6456                 do
6457                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6458                         echo "$as_me:6458: checking if CFLAGS option -$cf_opt works" >&5
6459 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6460                         if { (eval echo "$as_me:6460: \"$ac_compile\"") >&5
6461   (eval $ac_compile) 2>&5
6462   ac_status=$?
6463   echo "$as_me:6463: \$? = $ac_status" >&5
6464   (exit $ac_status); }; then
6465                                 echo "$as_me:6465: result: yes" >&5
6466 echo "${ECHO_T}yes" >&6
6467                                 cf_save_CFLAGS="$CFLAGS"
6468                         else
6469                                 echo "$as_me:6469: result: no" >&5
6470 echo "${ECHO_T}no" >&6
6471                         fi
6472                 done
6473                 CFLAGS="$cf_save_CFLAGS"
6474         fi
6475
6476         # RPATH_LIST is a colon-separated list of directories
6477         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6478         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6479
6480         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6481
6482         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6483
6484 echo "${as_me:-configure}:6484: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6485
6486         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6487
6488 echo "${as_me:-configure}:6488: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6489
6490 for model in $cf_list_models; do
6491         case $model in
6492         (libtool)
6493
6494 echo "$as_me:6494: checking for additional libtool options" >&5
6495 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6496
6497 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6498 if test "${with_libtool_opts+set}" = set; then
6499   withval="$with_libtool_opts"
6500   with_libtool_opts=$withval
6501 else
6502   with_libtool_opts=no
6503 fi;
6504 echo "$as_me:6504: result: $with_libtool_opts" >&5
6505 echo "${ECHO_T}$with_libtool_opts" >&6
6506
6507 case .$with_libtool_opts in
6508 (.yes|.no|.)
6509         ;;
6510 (*)
6511         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6512         ;;
6513 esac
6514
6515 echo "$as_me:6515: checking if exported-symbols file should be used" >&5
6516 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6517
6518 # Check whether --with-export-syms or --without-export-syms was given.
6519 if test "${with_export_syms+set}" = set; then
6520   withval="$with_export_syms"
6521   with_export_syms=$withval
6522 else
6523   with_export_syms=no
6524 fi;
6525 if test "x$with_export_syms" = xyes
6526 then
6527         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6528
6529 fi
6530 echo "$as_me:6530: result: $with_export_syms" >&5
6531 echo "${ECHO_T}$with_export_syms" >&6
6532 if test "x$with_export_syms" != xno
6533 then
6534         EXPORT_SYMS="-export-symbols $with_export_syms"
6535
6536 fi
6537
6538                 ;;
6539         (shared)
6540                 if test "$CC_SHARED_OPTS" = "unknown"; then
6541                         { { echo "$as_me:6541: error: Shared libraries are not supported in this version" >&5
6542 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6543    { (exit 1); exit 1; }; }
6544                 fi
6545                 # workaround for inept transition to PIE vs PIC...
6546                 echo "$as_me:6546: checking if current CFLAGS link properly" >&5
6547 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6548                 cat >conftest.$ac_ext <<_ACEOF
6549 #line 6549 "configure"
6550 #include "confdefs.h"
6551 #include <stdio.h>
6552 int
6553 main ()
6554 {
6555 printf("Hello work\n");
6556   ;
6557   return 0;
6558 }
6559 _ACEOF
6560 rm -f conftest.$ac_objext conftest$ac_exeext
6561 if { (eval echo "$as_me:6561: \"$ac_link\"") >&5
6562   (eval $ac_link) 2>&5
6563   ac_status=$?
6564   echo "$as_me:6564: \$? = $ac_status" >&5
6565   (exit $ac_status); } &&
6566          { ac_try='test -s conftest$ac_exeext'
6567   { (eval echo "$as_me:6567: \"$ac_try\"") >&5
6568   (eval $ac_try) 2>&5
6569   ac_status=$?
6570   echo "$as_me:6570: \$? = $ac_status" >&5
6571   (exit $ac_status); }; }; then
6572   cf_cflags_work=yes
6573 else
6574   echo "$as_me: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576 cf_cflags_work=no
6577 fi
6578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6579                 echo "$as_me:6579: result: $cf_cflags_work" >&5
6580 echo "${ECHO_T}$cf_cflags_work" >&6
6581                 if test "$cf_cflags_work" = no
6582                 then
6583                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6584
6585 echo "${as_me:-configure}:6585: testing try to work around by appending shared-options ..." 1>&5
6586
6587                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6588                 fi
6589
6590 echo "$as_me:6590: checking if versioned-symbols file should be used" >&5
6591 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6592
6593 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6594 if test "${with_versioned_syms+set}" = set; then
6595   withval="$with_versioned_syms"
6596   with_versioned_syms=$withval
6597 else
6598   with_versioned_syms=no
6599 fi;
6600 if test "x$with_versioned_syms" = xyes
6601 then
6602         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6603
6604 fi
6605 echo "$as_me:6605: result: $with_versioned_syms" >&5
6606 echo "${ECHO_T}$with_versioned_syms" >&6
6607
6608 RESULTING_SYMS=
6609 VERSIONED_SYMS=
6610 WILDCARD_SYMS=
6611
6612 if test "x$with_versioned_syms" != xno
6613 then
6614         RESULTING_SYMS=$with_versioned_syms
6615         case "x$MK_SHARED_LIB" in
6616         (*-Wl,*)
6617                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6618                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6619                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6620
6621 echo "${as_me:-configure}:6621: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6622
6623                 ;;
6624         (*-dy\ *)
6625                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6626                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6627                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6628
6629 echo "${as_me:-configure}:6629: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6630
6631                 ;;
6632         (*)
6633                 { echo "$as_me:6633: WARNING: this system does not support versioned-symbols" >&5
6634 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6635                 ;;
6636         esac
6637
6638         # Linux ld can selectively override scope, e.g., of symbols beginning with
6639         # "_" by first declaring some as global, and then using a wildcard to
6640         # declare the others as local.  Some other loaders cannot do this.  Check
6641         # by constructing a (very) simple shared library and inspecting its
6642         # symbols.
6643         if test "x$VERSIONED_SYMS" != "x"
6644         then
6645                 echo "$as_me:6645: checking if wildcards can be used to selectively omit symbols" >&5
6646 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6647                 WILDCARD_SYMS=no
6648
6649                 # make sources
6650                 rm -f conftest.*
6651
6652                 cat >conftest.ver <<EOF
6653 module_1.0 {
6654 global:
6655         globalf1;
6656 local:
6657         localf1;
6658 };
6659 module_2.0 {
6660 global:
6661         globalf2;
6662 local:
6663         localf2;
6664         _*;
6665 } module_1.0;
6666 submodule_1.0 {
6667 global:
6668         subglobalf1;
6669         _ismissing;
6670 local:
6671         sublocalf1;
6672 };
6673 submodule_2.0 {
6674 global:
6675         subglobalf2;
6676 local:
6677         sublocalf2;
6678         _*;
6679 } submodule_1.0;
6680 EOF
6681                 cat >conftest.$ac_ext <<EOF
6682 #line 6682 "configure"
6683 int     _ismissing(void) { return 1; }
6684 int     _localf1(void) { return 1; }
6685 int     _localf2(void) { return 2; }
6686 int     globalf1(void) { return 1; }
6687 int     globalf2(void) { return 2; }
6688 int     _sublocalf1(void) { return 1; }
6689 int     _sublocalf2(void) { return 2; }
6690 int     subglobalf1(void) { return 1; }
6691 int     subglobalf2(void) { return 2; }
6692 EOF
6693                 cat >conftest.mk <<EOF
6694 CC=${CC}
6695 CFLAGS=${CFLAGS}
6696 CPPFLAGS=${CPPFLAGS}
6697 LDFLAGS=${LDFLAGS}
6698 LIBS=${LIBS}
6699 VERSIONED_SYMS=${VERSIONED_SYMS}
6700 RESULTING_SYMS=conftest.ver
6701 MK_SHARED_LIB=${MK_SHARED_LIB}
6702 conftest.so: conftest.$ac_cv_objext
6703                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6704 EOF
6705
6706                 # compile source, make library
6707                 if make -f conftest.mk 2>&5 >/dev/null
6708                 then
6709                         # test for missing symbol in either Data or Text section
6710                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6711                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6712                 fi
6713                 echo "$as_me:6713: result: $WILDCARD_SYMS" >&5
6714 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6715                 rm -f conftest.*
6716         fi
6717 fi
6718
6719                 ;;
6720         esac
6721 done
6722
6723 # pretend that ncurses==ncursesw==ncursest
6724 echo "$as_me:6724: checking if you want to disable library suffixes" >&5
6725 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6726
6727 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6728 if test "${enable_lib_suffixes+set}" = set; then
6729   enableval="$enable_lib_suffixes"
6730   test "$enableval" != no && enableval=yes
6731         if test "$enableval" != "yes" ; then
6732     disable_lib_suffixes=yes
6733         else
6734                 disable_lib_suffixes=no
6735         fi
6736 else
6737   enableval=yes
6738         disable_lib_suffixes=no
6739
6740 fi;
6741 echo "$as_me:6741: result: $disable_lib_suffixes" >&5
6742 echo "${ECHO_T}$disable_lib_suffixes" >&6
6743
6744 ### If we're building with rpath, try to link non-standard libs that way too.
6745 if test "$DFT_LWR_MODEL" = "shared"; then
6746
6747 echo "$as_me:6747: checking if rpath-hack should be disabled" >&5
6748 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6749
6750 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6751 if test "${enable_rpath_hack+set}" = set; then
6752   enableval="$enable_rpath_hack"
6753   test "$enableval" != no && enableval=yes
6754         if test "$enableval" != "yes" ; then
6755     cf_disable_rpath_hack=yes
6756         else
6757                 cf_disable_rpath_hack=no
6758         fi
6759 else
6760   enableval=yes
6761         cf_disable_rpath_hack=no
6762
6763 fi;
6764 echo "$as_me:6764: result: $cf_disable_rpath_hack" >&5
6765 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6766 if test "$cf_disable_rpath_hack" = no ; then
6767
6768 echo "$as_me:6768: checking for updated LDFLAGS" >&5
6769 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6770 if test -n "$LD_RPATH_OPT" ; then
6771         echo "$as_me:6771: result: maybe" >&5
6772 echo "${ECHO_T}maybe" >&6
6773
6774         for ac_prog in ldd
6775 do
6776   # Extract the first word of "$ac_prog", so it can be a program name with args.
6777 set dummy $ac_prog; ac_word=$2
6778 echo "$as_me:6778: checking for $ac_word" >&5
6779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6780 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6781   echo $ECHO_N "(cached) $ECHO_C" >&6
6782 else
6783   if test -n "$cf_ldd_prog"; then
6784   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6785 else
6786   ac_save_IFS=$IFS; IFS=$ac_path_separator
6787 ac_dummy="$PATH"
6788 for ac_dir in $ac_dummy; do
6789   IFS=$ac_save_IFS
6790   test -z "$ac_dir" && ac_dir=.
6791   $as_executable_p "$ac_dir/$ac_word" || continue
6792 ac_cv_prog_cf_ldd_prog="$ac_prog"
6793 echo "$as_me:6793: found $ac_dir/$ac_word" >&5
6794 break
6795 done
6796
6797 fi
6798 fi
6799 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6800 if test -n "$cf_ldd_prog"; then
6801   echo "$as_me:6801: result: $cf_ldd_prog" >&5
6802 echo "${ECHO_T}$cf_ldd_prog" >&6
6803 else
6804   echo "$as_me:6804: result: no" >&5
6805 echo "${ECHO_T}no" >&6
6806 fi
6807
6808   test -n "$cf_ldd_prog" && break
6809 done
6810 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6811
6812         cf_rpath_list="/usr/lib /lib"
6813         if test "$cf_ldd_prog" != no
6814         then
6815                 cf_rpath_oops=
6816
6817 cat >conftest.$ac_ext <<_ACEOF
6818 #line 6818 "configure"
6819 #include "confdefs.h"
6820 #include <stdio.h>
6821 int
6822 main ()
6823 {
6824 printf("Hello");
6825   ;
6826   return 0;
6827 }
6828 _ACEOF
6829 rm -f conftest.$ac_objext conftest$ac_exeext
6830 if { (eval echo "$as_me:6830: \"$ac_link\"") >&5
6831   (eval $ac_link) 2>&5
6832   ac_status=$?
6833   echo "$as_me:6833: \$? = $ac_status" >&5
6834   (exit $ac_status); } &&
6835          { ac_try='test -s conftest$ac_exeext'
6836   { (eval echo "$as_me:6836: \"$ac_try\"") >&5
6837   (eval $ac_try) 2>&5
6838   ac_status=$?
6839   echo "$as_me:6839: \$? = $ac_status" >&5
6840   (exit $ac_status); }; }; then
6841   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6842                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6843 else
6844   echo "$as_me: failed program was:" >&5
6845 cat conftest.$ac_ext >&5
6846 fi
6847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6848
6849                 # If we passed the link-test, but get a "not found" on a given library,
6850                 # this could be due to inept reconfiguration of gcc to make it only
6851                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6852                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6853                 # /usr/local libraries.
6854                 if test -n "$cf_rpath_oops"
6855                 then
6856                         for cf_rpath_src in $cf_rpath_oops
6857                         do
6858                                 for cf_rpath_dir in \
6859                                         /usr/local \
6860                                         /usr/pkg \
6861                                         /opt/sfw
6862                                 do
6863                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6864                                         then
6865                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6866
6867 echo "${as_me:-configure}:6867: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6868
6869                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6870                                                 break
6871                                         fi
6872                                 done
6873                         done
6874                 fi
6875         fi
6876
6877         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6878
6879 echo "${as_me:-configure}:6879: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6880
6881 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6882
6883 echo "${as_me:-configure}:6883: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6884
6885 cf_rpath_dst=
6886 for cf_rpath_src in $LDFLAGS
6887 do
6888         case $cf_rpath_src in
6889         (-L*)
6890
6891                 # check if this refers to a directory which we will ignore
6892                 cf_rpath_skip=no
6893                 if test -n "$cf_rpath_list"
6894                 then
6895                         for cf_rpath_item in $cf_rpath_list
6896                         do
6897                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6898                                 then
6899                                         cf_rpath_skip=yes
6900                                         break
6901                                 fi
6902                         done
6903                 fi
6904
6905                 if test "$cf_rpath_skip" = no
6906                 then
6907                         # transform the option
6908                         if test "$LD_RPATH_OPT" = "-R " ; then
6909                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6910                         else
6911                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6912                         fi
6913
6914                         # if we have not already added this, add it now
6915                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6916                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6917                         then
6918                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6919
6920 echo "${as_me:-configure}:6920: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6921
6922                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6923                         fi
6924                 fi
6925                 ;;
6926         esac
6927         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6928 done
6929 LDFLAGS=$cf_rpath_dst
6930
6931 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6932
6933 echo "${as_me:-configure}:6933: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6934
6935 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6936
6937 echo "${as_me:-configure}:6937: testing ...checking LIBS $LIBS ..." 1>&5
6938
6939 cf_rpath_dst=
6940 for cf_rpath_src in $LIBS
6941 do
6942         case $cf_rpath_src in
6943         (-L*)
6944
6945                 # check if this refers to a directory which we will ignore
6946                 cf_rpath_skip=no
6947                 if test -n "$cf_rpath_list"
6948                 then
6949                         for cf_rpath_item in $cf_rpath_list
6950                         do
6951                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6952                                 then
6953                                         cf_rpath_skip=yes
6954                                         break
6955                                 fi
6956                         done
6957                 fi
6958
6959                 if test "$cf_rpath_skip" = no
6960                 then
6961                         # transform the option
6962                         if test "$LD_RPATH_OPT" = "-R " ; then
6963                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6964                         else
6965                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6966                         fi
6967
6968                         # if we have not already added this, add it now
6969                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6970                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6971                         then
6972                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6973
6974 echo "${as_me:-configure}:6974: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6975
6976                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6977                         fi
6978                 fi
6979                 ;;
6980         esac
6981         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6982 done
6983 LIBS=$cf_rpath_dst
6984
6985 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6986
6987 echo "${as_me:-configure}:6987: testing ...checked LIBS $LIBS ..." 1>&5
6988
6989         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6990
6991 echo "${as_me:-configure}:6991: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6992
6993 else
6994         echo "$as_me:6994: result: no" >&5
6995 echo "${ECHO_T}no" >&6
6996 fi
6997
6998 fi
6999
7000 fi
7001
7002 ###############################################################################
7003
7004 ###     use option --with-extra-suffix to append suffix to headers and libraries
7005 echo "$as_me:7005: checking if you wish to append extra suffix to header/library paths" >&5
7006 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7007 EXTRA_SUFFIX=
7008
7009 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7010 if test "${with_extra_suffix+set}" = set; then
7011   withval="$with_extra_suffix"
7012   case x$withval in
7013         (no)
7014                 ;;
7015         (xyes|x)
7016                 EXTRA_SUFFIX=$cf_cv_abi_version
7017                 ;;
7018         (*)
7019                 EXTRA_SUFFIX=$withval
7020                 ;;
7021         esac
7022
7023 fi;
7024 echo "$as_me:7024: result: $EXTRA_SUFFIX" >&5
7025 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7026
7027 ###     use option --disable-overwrite to leave out the link to -lcurses
7028 echo "$as_me:7028: checking if you wish to install ncurses overwriting curses" >&5
7029 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7030
7031 # Check whether --enable-overwrite or --disable-overwrite was given.
7032 if test "${enable_overwrite+set}" = set; then
7033   enableval="$enable_overwrite"
7034   with_overwrite=$enableval
7035 else
7036   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7037 fi;
7038 echo "$as_me:7038: result: $with_overwrite" >&5
7039 echo "${ECHO_T}$with_overwrite" >&6
7040
7041 echo "$as_me:7041: checking if external terminfo-database is used" >&5
7042 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7043
7044 # Check whether --enable-database or --disable-database was given.
7045 if test "${enable_database+set}" = set; then
7046   enableval="$enable_database"
7047   use_database=$enableval
7048 else
7049   use_database=yes
7050 fi;
7051 echo "$as_me:7051: result: $use_database" >&5
7052 echo "${ECHO_T}$use_database" >&6
7053
7054 case $host_os in
7055 (os2*)
7056         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7057         ;;
7058 (*)
7059         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7060         ;;
7061 esac
7062
7063 NCURSES_USE_DATABASE=0
7064 if test "$use_database" != no ; then
7065         NCURSES_USE_DATABASE=1
7066
7067         echo "$as_me:7067: checking which terminfo source-file will be installed" >&5
7068 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7069
7070 # Check whether --with-database or --without-database was given.
7071 if test "${with_database+set}" = set; then
7072   withval="$with_database"
7073   TERMINFO_SRC=$withval
7074 fi;
7075         echo "$as_me:7075: result: $TERMINFO_SRC" >&5
7076 echo "${ECHO_T}$TERMINFO_SRC" >&6
7077
7078         echo "$as_me:7078: checking whether to use hashed database instead of directory/tree" >&5
7079 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7080
7081 # Check whether --with-hashed-db or --without-hashed-db was given.
7082 if test "${with_hashed_db+set}" = set; then
7083   withval="$with_hashed_db"
7084
7085 else
7086   with_hashed_db=no
7087 fi;
7088         echo "$as_me:7088: result: $with_hashed_db" >&5
7089 echo "${ECHO_T}$with_hashed_db" >&6
7090 else
7091         with_hashed_db=no
7092 fi
7093
7094 echo "$as_me:7094: checking for list of fallback descriptions" >&5
7095 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7096
7097 # Check whether --with-fallbacks or --without-fallbacks was given.
7098 if test "${with_fallbacks+set}" = set; then
7099   withval="$with_fallbacks"
7100   with_fallback=$withval
7101 else
7102   with_fallback=
7103 fi;
7104 echo "$as_me:7104: result: $with_fallback" >&5
7105 echo "${ECHO_T}$with_fallback" >&6
7106 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7107
7108 echo "$as_me:7108: checking if you want modern xterm or antique" >&5
7109 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7110
7111 # Check whether --with-xterm-new or --without-xterm-new was given.
7112 if test "${with_xterm_new+set}" = set; then
7113   withval="$with_xterm_new"
7114   with_xterm_new=$withval
7115 else
7116   with_xterm_new=yes
7117 fi;
7118 case $with_xterm_new in
7119 (no) with_xterm_new=xterm-old;;
7120 (*)      with_xterm_new=xterm-new;;
7121 esac
7122 echo "$as_me:7122: result: $with_xterm_new" >&5
7123 echo "${ECHO_T}$with_xterm_new" >&6
7124 WHICH_XTERM=$with_xterm_new
7125
7126 echo "$as_me:7126: checking if xterm backspace sends BS or DEL" >&5
7127 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7128
7129 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7130 if test "${with_xterm_kbs+set}" = set; then
7131   withval="$with_xterm_kbs"
7132   with_xterm_kbs=$withval
7133 else
7134   with_xterm_kbs=BS
7135 fi;
7136 case x$with_xterm_kbs in
7137 (xyes|xno|xBS|xbs|x8)
7138         with_xterm_kbs=BS
7139         ;;
7140 (xDEL|xdel|x127)
7141         with_xterm_kbs=DEL
7142         ;;
7143 (*)
7144         with_xterm_kbs=$withval
7145         ;;
7146 esac
7147 echo "$as_me:7147: result: $with_xterm_kbs" >&5
7148 echo "${ECHO_T}$with_xterm_kbs" >&6
7149 XTERM_KBS=$with_xterm_kbs
7150
7151 MAKE_TERMINFO=
7152 if test "$use_database" = no ; then
7153         TERMINFO="${datadir}/terminfo"
7154         MAKE_TERMINFO="#"
7155 else
7156
7157 echo "$as_me:7157: checking for list of terminfo directories" >&5
7158 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7159
7160 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7161 if test "${with_terminfo_dirs+set}" = set; then
7162   withval="$with_terminfo_dirs"
7163
7164 else
7165   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7166 fi;
7167 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7168 cf_dst_path=
7169 for cf_src_path in $withval
7170 do
7171
7172 if test "x$prefix" != xNONE; then
7173         cf_path_syntax="$prefix"
7174 else
7175         cf_path_syntax="$ac_default_prefix"
7176 fi
7177
7178 case ".$cf_src_path" in
7179 (.\$\(*\)*|.\'*\'*)
7180         ;;
7181 (..|./*|.\\*)
7182         ;;
7183 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7184         ;;
7185 (.\${*prefix}*|.\${*dir}*)
7186         eval cf_src_path="$cf_src_path"
7187         case ".$cf_src_path" in
7188         (.NONE/*)
7189                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7190                 ;;
7191         esac
7192         ;;
7193 (.no|.NONE/*)
7194         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7195         ;;
7196 (*)
7197         { { echo "$as_me:7197: error: expected a pathname, not \"$cf_src_path\"" >&5
7198 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7199    { (exit 1); exit 1; }; }
7200         ;;
7201 esac
7202
7203   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7204   cf_dst_path="${cf_dst_path}${cf_src_path}"
7205 done
7206 IFS="$ac_save_ifs"
7207
7208 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7209 # so we have to check/work around.  We do prefer the result of "eval"...
7210 eval cf_dst_eval="$cf_dst_path"
7211 case "x$cf_dst_eval" in
7212 (xNONE*)
7213         TERMINFO_DIRS=$cf_dst_path
7214         ;;
7215 (*)
7216         TERMINFO_DIRS="$cf_dst_eval"
7217         ;;
7218 esac
7219
7220 echo "$as_me:7220: result: $TERMINFO_DIRS" >&5
7221 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7222 test -n "$TERMINFO_DIRS" &&
7223 cat >>confdefs.h <<EOF
7224 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7225 EOF
7226
7227 echo "$as_me:7227: checking for default terminfo directory" >&5
7228 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7229
7230 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7231 if test "${with_default_terminfo_dir+set}" = set; then
7232   withval="$with_default_terminfo_dir"
7233
7234 else
7235   withval="${TERMINFO:-${datadir}/terminfo}"
7236 fi; if test -n "${datadir}/terminfo" ; then
7237
7238 if test "x$prefix" != xNONE; then
7239         cf_path_syntax="$prefix"
7240 else
7241         cf_path_syntax="$ac_default_prefix"
7242 fi
7243
7244 case ".$withval" in
7245 (.\$\(*\)*|.\'*\'*)
7246         ;;
7247 (..|./*|.\\*)
7248         ;;
7249 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7250         ;;
7251 (.\${*prefix}*|.\${*dir}*)
7252         eval withval="$withval"
7253         case ".$withval" in
7254         (.NONE/*)
7255                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7256                 ;;
7257         esac
7258         ;;
7259 (.no|.NONE/*)
7260         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7261         ;;
7262 (*)
7263         { { echo "$as_me:7263: error: expected a pathname, not \"$withval\"" >&5
7264 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7265    { (exit 1); exit 1; }; }
7266         ;;
7267 esac
7268
7269 fi
7270 eval TERMINFO="$withval"
7271
7272 echo "$as_me:7272: result: $TERMINFO" >&5
7273 echo "${ECHO_T}$TERMINFO" >&6
7274
7275 cat >>confdefs.h <<EOF
7276 #define TERMINFO "$TERMINFO"
7277 EOF
7278
7279 fi
7280
7281 ###     use option --disable-big-core to make tic run on small machines
7282 ###     We need 4Mb, check if we can allocate 50% more than that.
7283 echo "$as_me:7283: checking if big-core option selected" >&5
7284 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7285
7286 # Check whether --enable-big-core or --disable-big-core was given.
7287 if test "${enable_big_core+set}" = set; then
7288   enableval="$enable_big_core"
7289   with_big_core=$enableval
7290 else
7291   if test "$cross_compiling" = yes; then
7292   with_big_core=no
7293 else
7294   cat >conftest.$ac_ext <<_ACEOF
7295 #line 7295 "configure"
7296 #include "confdefs.h"
7297
7298 #include <stdlib.h>
7299 #include <string.h>
7300 int main() {
7301         unsigned long n = 6000000L;
7302         char *s = malloc(n);
7303         if (s != 0)
7304                 s[0] = s[n-1] = 0;
7305         ${cf_cv_main_return:-return}(s == 0);
7306 }
7307 _ACEOF
7308 rm -f conftest$ac_exeext
7309 if { (eval echo "$as_me:7309: \"$ac_link\"") >&5
7310   (eval $ac_link) 2>&5
7311   ac_status=$?
7312   echo "$as_me:7312: \$? = $ac_status" >&5
7313   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7314   { (eval echo "$as_me:7314: \"$ac_try\"") >&5
7315   (eval $ac_try) 2>&5
7316   ac_status=$?
7317   echo "$as_me:7317: \$? = $ac_status" >&5
7318   (exit $ac_status); }; }; then
7319   with_big_core=yes
7320 else
7321   echo "$as_me: program exited with status $ac_status" >&5
7322 echo "$as_me: failed program was:" >&5
7323 cat conftest.$ac_ext >&5
7324 with_big_core=no
7325 fi
7326 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7327 fi
7328 fi;
7329 echo "$as_me:7329: result: $with_big_core" >&5
7330 echo "${ECHO_T}$with_big_core" >&6
7331 test "x$with_big_core" = "xyes" &&
7332 cat >>confdefs.h <<\EOF
7333 #define HAVE_BIG_CORE 1
7334 EOF
7335
7336 ### ISO C only guarantees 512-char strings, we have tables which load faster
7337 ### when constructed using "big" strings.  More than the C compiler, the awk
7338 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7339 echo "$as_me:7339: checking if big-strings option selected" >&5
7340 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7341
7342 # Check whether --enable-big-strings or --disable-big-strings was given.
7343 if test "${enable_big_strings+set}" = set; then
7344   enableval="$enable_big_strings"
7345   with_big_strings=$enableval
7346 else
7347
7348         case x$AWK in
7349         (x)
7350                 eval with_big_strings=no
7351                 ;;
7352         (*)
7353                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7354                         | $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
7355                         eval with_big_strings=yes
7356                 else
7357                         eval with_big_strings=no
7358                 fi
7359                 ;;
7360         esac
7361
7362 fi;
7363 echo "$as_me:7363: result: $with_big_strings" >&5
7364 echo "${ECHO_T}$with_big_strings" >&6
7365
7366 USE_BIG_STRINGS=0
7367 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7368
7369 ###     use option --enable-termcap to compile in the termcap fallback support
7370 echo "$as_me:7370: checking if you want termcap-fallback support" >&5
7371 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7372
7373 # Check whether --enable-termcap or --disable-termcap was given.
7374 if test "${enable_termcap+set}" = set; then
7375   enableval="$enable_termcap"
7376   with_termcap=$enableval
7377 else
7378   with_termcap=no
7379 fi;
7380 echo "$as_me:7380: result: $with_termcap" >&5
7381 echo "${ECHO_T}$with_termcap" >&6
7382
7383 NCURSES_USE_TERMCAP=0
7384 if test "x$with_termcap" != "xyes" ; then
7385         if test "$use_database" = no ; then
7386                 if test -z "$with_fallback" ; then
7387                         { { echo "$as_me:7387: error: You have disabled the database w/o specifying fallbacks" >&5
7388 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7389    { (exit 1); exit 1; }; }
7390                 fi
7391         fi
7392
7393 cat >>confdefs.h <<\EOF
7394 #define PURE_TERMINFO 1
7395 EOF
7396
7397 else
7398
7399         if test "$with_ticlib" != no ; then
7400                 { { echo "$as_me:7400: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7401 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7402    { (exit 1); exit 1; }; }
7403         fi
7404
7405         NCURSES_USE_TERMCAP=1
7406         echo "$as_me:7406: checking for list of termcap files" >&5
7407 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7408
7409 # Check whether --with-termpath or --without-termpath was given.
7410 if test "${with_termpath+set}" = set; then
7411   withval="$with_termpath"
7412
7413 else
7414   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7415 fi;
7416 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7417 cf_dst_path=
7418 for cf_src_path in $withval
7419 do
7420
7421 if test "x$prefix" != xNONE; then
7422         cf_path_syntax="$prefix"
7423 else
7424         cf_path_syntax="$ac_default_prefix"
7425 fi
7426
7427 case ".$cf_src_path" in
7428 (.\$\(*\)*|.\'*\'*)
7429         ;;
7430 (..|./*|.\\*)
7431         ;;
7432 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7433         ;;
7434 (.\${*prefix}*|.\${*dir}*)
7435         eval cf_src_path="$cf_src_path"
7436         case ".$cf_src_path" in
7437         (.NONE/*)
7438                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7439                 ;;
7440         esac
7441         ;;
7442 (.no|.NONE/*)
7443         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7444         ;;
7445 (*)
7446         { { echo "$as_me:7446: error: expected a pathname, not \"$cf_src_path\"" >&5
7447 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7448    { (exit 1); exit 1; }; }
7449         ;;
7450 esac
7451
7452   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7453   cf_dst_path="${cf_dst_path}${cf_src_path}"
7454 done
7455 IFS="$ac_save_ifs"
7456
7457 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7458 # so we have to check/work around.  We do prefer the result of "eval"...
7459 eval cf_dst_eval="$cf_dst_path"
7460 case "x$cf_dst_eval" in
7461 (xNONE*)
7462         TERMPATH=$cf_dst_path
7463         ;;
7464 (*)
7465         TERMPATH="$cf_dst_eval"
7466         ;;
7467 esac
7468
7469         echo "$as_me:7469: result: $TERMPATH" >&5
7470 echo "${ECHO_T}$TERMPATH" >&6
7471         test -n "$TERMPATH" &&
7472 cat >>confdefs.h <<EOF
7473 #define TERMPATH "$TERMPATH"
7474 EOF
7475
7476         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7477         echo "$as_me:7477: checking if fast termcap-loader is needed" >&5
7478 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7479
7480 # Check whether --enable-getcap or --disable-getcap was given.
7481 if test "${enable_getcap+set}" = set; then
7482   enableval="$enable_getcap"
7483   with_getcap=$enableval
7484 else
7485   with_getcap=no
7486 fi;
7487         echo "$as_me:7487: result: $with_getcap" >&5
7488 echo "${ECHO_T}$with_getcap" >&6
7489         test "x$with_getcap" = "xyes" &&
7490 cat >>confdefs.h <<\EOF
7491 #define USE_GETCAP 1
7492 EOF
7493
7494         echo "$as_me:7494: checking if translated termcaps will be cached in ~/.terminfo" >&5
7495 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7496
7497 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7498 if test "${enable_getcap_cache+set}" = set; then
7499   enableval="$enable_getcap_cache"
7500   with_getcap_cache=$enableval
7501 else
7502   with_getcap_cache=no
7503 fi;
7504         echo "$as_me:7504: result: $with_getcap_cache" >&5
7505 echo "${ECHO_T}$with_getcap_cache" >&6
7506         test "x$with_getcap_cache" = "xyes" &&
7507 cat >>confdefs.h <<\EOF
7508 #define USE_GETCAP_CACHE 1
7509 EOF
7510
7511 fi
7512
7513 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7514 echo "$as_me:7514: checking if ~/.terminfo is wanted" >&5
7515 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7516
7517 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7518 if test "${enable_home_terminfo+set}" = set; then
7519   enableval="$enable_home_terminfo"
7520   with_home_terminfo=$enableval
7521 else
7522   with_home_terminfo=yes
7523 fi;
7524 echo "$as_me:7524: result: $with_home_terminfo" >&5
7525 echo "${ECHO_T}$with_home_terminfo" >&6
7526 test "x$with_home_terminfo" = "xyes" &&
7527 cat >>confdefs.h <<\EOF
7528 #define USE_HOME_TERMINFO 1
7529 EOF
7530
7531 echo "$as_me:7531: checking if you want to use restricted environment when running as root" >&5
7532 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7533
7534 # Check whether --enable-root-environ or --disable-root-environ was given.
7535 if test "${enable_root_environ+set}" = set; then
7536   enableval="$enable_root_environ"
7537   with_root_environ=$enableval
7538 else
7539   with_root_environ=yes
7540 fi;
7541 echo "$as_me:7541: result: $with_root_environ" >&5
7542 echo "${ECHO_T}$with_root_environ" >&6
7543 test "x$with_root_environ" = xyes &&
7544 cat >>confdefs.h <<\EOF
7545 #define USE_ROOT_ENVIRON 1
7546 EOF
7547
7548 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7549 ###   to reduce storage requirements for the terminfo database.
7550
7551 for ac_func in \
7552         remove \
7553         unlink
7554 do
7555 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7556 echo "$as_me:7556: checking for $ac_func" >&5
7557 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7558 if eval "test \"\${$as_ac_var+set}\" = set"; then
7559   echo $ECHO_N "(cached) $ECHO_C" >&6
7560 else
7561   cat >conftest.$ac_ext <<_ACEOF
7562 #line 7562 "configure"
7563 #include "confdefs.h"
7564 /* System header to define __stub macros and hopefully few prototypes,
7565     which can conflict with char $ac_func (); below.  */
7566 #include <assert.h>
7567 /* Override any gcc2 internal prototype to avoid an error.  */
7568 #ifdef __cplusplus
7569 extern "C"
7570 #endif
7571 /* We use char because int might match the return type of a gcc2
7572    builtin and then its argument prototype would still apply.  */
7573 char $ac_func ();
7574 char (*f) ();
7575
7576 int
7577 main ()
7578 {
7579 /* The GNU C library defines this for functions which it implements
7580     to always fail with ENOSYS.  Some functions are actually named
7581     something starting with __ and the normal name is an alias.  */
7582 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7583 choke me
7584 #else
7585 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7586 #endif
7587
7588   ;
7589   return 0;
7590 }
7591 _ACEOF
7592 rm -f conftest.$ac_objext conftest$ac_exeext
7593 if { (eval echo "$as_me:7593: \"$ac_link\"") >&5
7594   (eval $ac_link) 2>&5
7595   ac_status=$?
7596   echo "$as_me:7596: \$? = $ac_status" >&5
7597   (exit $ac_status); } &&
7598          { ac_try='test -s conftest$ac_exeext'
7599   { (eval echo "$as_me:7599: \"$ac_try\"") >&5
7600   (eval $ac_try) 2>&5
7601   ac_status=$?
7602   echo "$as_me:7602: \$? = $ac_status" >&5
7603   (exit $ac_status); }; }; then
7604   eval "$as_ac_var=yes"
7605 else
7606   echo "$as_me: failed program was:" >&5
7607 cat conftest.$ac_ext >&5
7608 eval "$as_ac_var=no"
7609 fi
7610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7611 fi
7612 echo "$as_me:7612: result: `eval echo '${'$as_ac_var'}'`" >&5
7613 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7614 if test `eval echo '${'$as_ac_var'}'` = yes; then
7615   cat >>confdefs.h <<EOF
7616 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7617 EOF
7618
7619 fi
7620 done
7621
7622 if test "$cross_compiling" = yes ; then
7623
7624 for ac_func in \
7625                 link \
7626                 symlink
7627 do
7628 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7629 echo "$as_me:7629: checking for $ac_func" >&5
7630 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7631 if eval "test \"\${$as_ac_var+set}\" = set"; then
7632   echo $ECHO_N "(cached) $ECHO_C" >&6
7633 else
7634   cat >conftest.$ac_ext <<_ACEOF
7635 #line 7635 "configure"
7636 #include "confdefs.h"
7637 /* System header to define __stub macros and hopefully few prototypes,
7638     which can conflict with char $ac_func (); below.  */
7639 #include <assert.h>
7640 /* Override any gcc2 internal prototype to avoid an error.  */
7641 #ifdef __cplusplus
7642 extern "C"
7643 #endif
7644 /* We use char because int might match the return type of a gcc2
7645    builtin and then its argument prototype would still apply.  */
7646 char $ac_func ();
7647 char (*f) ();
7648
7649 int
7650 main ()
7651 {
7652 /* The GNU C library defines this for functions which it implements
7653     to always fail with ENOSYS.  Some functions are actually named
7654     something starting with __ and the normal name is an alias.  */
7655 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7656 choke me
7657 #else
7658 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7659 #endif
7660
7661   ;
7662   return 0;
7663 }
7664 _ACEOF
7665 rm -f conftest.$ac_objext conftest$ac_exeext
7666 if { (eval echo "$as_me:7666: \"$ac_link\"") >&5
7667   (eval $ac_link) 2>&5
7668   ac_status=$?
7669   echo "$as_me:7669: \$? = $ac_status" >&5
7670   (exit $ac_status); } &&
7671          { ac_try='test -s conftest$ac_exeext'
7672   { (eval echo "$as_me:7672: \"$ac_try\"") >&5
7673   (eval $ac_try) 2>&5
7674   ac_status=$?
7675   echo "$as_me:7675: \$? = $ac_status" >&5
7676   (exit $ac_status); }; }; then
7677   eval "$as_ac_var=yes"
7678 else
7679   echo "$as_me: failed program was:" >&5
7680 cat conftest.$ac_ext >&5
7681 eval "$as_ac_var=no"
7682 fi
7683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7684 fi
7685 echo "$as_me:7685: result: `eval echo '${'$as_ac_var'}'`" >&5
7686 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7687 if test `eval echo '${'$as_ac_var'}'` = yes; then
7688   cat >>confdefs.h <<EOF
7689 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7690 EOF
7691
7692 fi
7693 done
7694
7695 else
7696         echo "$as_me:7696: checking if link/symlink functions work" >&5
7697 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7698 if test "${cf_cv_link_funcs+set}" = set; then
7699   echo $ECHO_N "(cached) $ECHO_C" >&6
7700 else
7701
7702                 cf_cv_link_funcs=
7703                 for cf_func in link symlink ; do
7704                         if test "$cross_compiling" = yes; then
7705
7706                         eval 'ac_cv_func_'$cf_func'=error'
7707 else
7708   cat >conftest.$ac_ext <<_ACEOF
7709 #line 7709 "configure"
7710 #include "confdefs.h"
7711
7712 #include <sys/types.h>
7713 #include <sys/stat.h>
7714 #ifdef HAVE_UNISTD_H
7715 #include <unistd.h>
7716 #endif
7717 int main()
7718 {
7719         int fail = 0;
7720         char *src = "config.log";
7721         char *dst = "conftest.chk";
7722         struct stat src_sb;
7723         struct stat dst_sb;
7724
7725         stat(src, &src_sb);
7726         fail = ($cf_func("config.log", "conftest.chk") < 0)
7727             || (stat(dst, &dst_sb) < 0)
7728             || (dst_sb.st_mtime != src_sb.st_mtime);
7729 #ifdef HAVE_UNLINK
7730         unlink(dst);
7731 #else
7732         remove(dst);
7733 #endif
7734         ${cf_cv_main_return:-return} (fail);
7735 }
7736
7737 _ACEOF
7738 rm -f conftest$ac_exeext
7739 if { (eval echo "$as_me:7739: \"$ac_link\"") >&5
7740   (eval $ac_link) 2>&5
7741   ac_status=$?
7742   echo "$as_me:7742: \$? = $ac_status" >&5
7743   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7744   { (eval echo "$as_me:7744: \"$ac_try\"") >&5
7745   (eval $ac_try) 2>&5
7746   ac_status=$?
7747   echo "$as_me:7747: \$? = $ac_status" >&5
7748   (exit $ac_status); }; }; then
7749
7750                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7751                         eval 'ac_cv_func_'$cf_func'=yes'
7752 else
7753   echo "$as_me: program exited with status $ac_status" >&5
7754 echo "$as_me: failed program was:" >&5
7755 cat conftest.$ac_ext >&5
7756
7757                         eval 'ac_cv_func_'$cf_func'=no'
7758 fi
7759 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7760 fi
7761                 done
7762                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7763
7764 fi
7765 echo "$as_me:7765: result: $cf_cv_link_funcs" >&5
7766 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7767         test "$ac_cv_func_link"    = yes &&
7768 cat >>confdefs.h <<\EOF
7769 #define HAVE_LINK 1
7770 EOF
7771
7772         test "$ac_cv_func_symlink" = yes &&
7773 cat >>confdefs.h <<\EOF
7774 #define HAVE_SYMLINK 1
7775 EOF
7776
7777 fi
7778
7779 with_links=no
7780 with_symlinks=no
7781
7782 # soft links (symbolic links) are useful for some systems where hard links do
7783 # not work, or to make it simpler to copy terminfo trees around.
7784 if test "x$ac_cv_func_symlink" = xyes ; then
7785         echo "$as_me:7785: checking if tic should use symbolic links" >&5
7786 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7787
7788 # Check whether --enable-symlinks or --disable-symlinks was given.
7789 if test "${enable_symlinks+set}" = set; then
7790   enableval="$enable_symlinks"
7791   with_symlinks=$enableval
7792 else
7793   with_symlinks=no
7794 fi;
7795         echo "$as_me:7795: result: $with_symlinks" >&5
7796 echo "${ECHO_T}$with_symlinks" >&6
7797 fi
7798
7799 # If we have hard links and did not choose to use soft links instead, there is
7800 # no reason to make this choice optional - use the hard links.
7801 if test "$with_symlinks" = no ; then
7802         echo "$as_me:7802: checking if tic should use hard links" >&5
7803 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7804         if test "x$ac_cv_func_link" = xyes ; then
7805                 with_links=yes
7806         else
7807                 with_links=no
7808         fi
7809         echo "$as_me:7809: result: $with_links" >&5
7810 echo "${ECHO_T}$with_links" >&6
7811 fi
7812
7813 test "x$with_links" = xyes &&
7814 cat >>confdefs.h <<\EOF
7815 #define USE_LINKS 1
7816 EOF
7817
7818 test "x$with_symlinks" = xyes &&
7819 cat >>confdefs.h <<\EOF
7820 #define USE_SYMLINKS 1
7821 EOF
7822
7823 ###   use option --enable-broken-linker to force on use of broken-linker support
7824 echo "$as_me:7824: checking if you want broken-linker support code" >&5
7825 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7826
7827 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7828 if test "${enable_broken_linker+set}" = set; then
7829   enableval="$enable_broken_linker"
7830   with_broken_linker=$enableval
7831 else
7832   with_broken_linker=${BROKEN_LINKER:-no}
7833 fi;
7834 echo "$as_me:7834: result: $with_broken_linker" >&5
7835 echo "${ECHO_T}$with_broken_linker" >&6
7836
7837 BROKEN_LINKER=0
7838 if test "x$with_broken_linker" = xyes ; then
7839
7840 cat >>confdefs.h <<\EOF
7841 #define BROKEN_LINKER 1
7842 EOF
7843
7844         BROKEN_LINKER=1
7845 elif test "$DFT_LWR_MODEL" = shared ; then
7846         case $cf_cv_system_name in
7847         (cygwin*)
7848
7849 cat >>confdefs.h <<\EOF
7850 #define BROKEN_LINKER 1
7851 EOF
7852
7853                 BROKEN_LINKER=1
7854                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7855
7856 echo "${as_me:-configure}:7856: testing cygwin linker is broken anyway ..." 1>&5
7857
7858                 ;;
7859         esac
7860 fi
7861
7862 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7863 echo "$as_me:7863: checking if tputs should process BSD-style prefix padding" >&5
7864 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7865
7866 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7867 if test "${enable_bsdpad+set}" = set; then
7868   enableval="$enable_bsdpad"
7869   with_bsdpad=$enableval
7870 else
7871   with_bsdpad=no
7872 fi;
7873 echo "$as_me:7873: result: $with_bsdpad" >&5
7874 echo "${ECHO_T}$with_bsdpad" >&6
7875 test "x$with_bsdpad" = xyes &&
7876 cat >>confdefs.h <<\EOF
7877 #define BSD_TPUTS 1
7878 EOF
7879
7880 ###   use option --enable-widec to turn on use of wide-character support
7881 NCURSES_CH_T=chtype
7882 NCURSES_LIBUTF8=0
7883
7884 NEED_WCHAR_H=0
7885 NCURSES_MBSTATE_T=0
7886 NCURSES_WCHAR_T=0
7887 NCURSES_WINT_T=0
7888
7889 # Check to define _XOPEN_SOURCE "automatically"
7890 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7891
7892 cf_XOPEN_SOURCE=500
7893 cf_POSIX_C_SOURCE=199506L
7894 cf_xopen_source=
7895
7896 case $host_os in
7897 (aix[4-7]*)
7898         cf_xopen_source="-D_ALL_SOURCE"
7899         ;;
7900 (cygwin|msys)
7901         cf_XOPEN_SOURCE=600
7902         ;;
7903 (darwin[0-8].*)
7904         cf_xopen_source="-D_APPLE_C_SOURCE"
7905         ;;
7906 (darwin*)
7907         cf_xopen_source="-D_DARWIN_C_SOURCE"
7908         cf_XOPEN_SOURCE=
7909         ;;
7910 (freebsd*|dragonfly*)
7911         # 5.x headers associate
7912         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7913         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7914         cf_POSIX_C_SOURCE=200112L
7915         cf_XOPEN_SOURCE=600
7916         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7917         ;;
7918 (hpux11*)
7919         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7920         ;;
7921 (hpux*)
7922         cf_xopen_source="-D_HPUX_SOURCE"
7923         ;;
7924 (irix[56].*)
7925         cf_xopen_source="-D_SGI_SOURCE"
7926         cf_XOPEN_SOURCE=
7927         ;;
7928 (linux*|gnu*|mint*|k*bsd*-gnu)
7929
7930 echo "$as_me:7930: checking if we must define _GNU_SOURCE" >&5
7931 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7932 if test "${cf_cv_gnu_source+set}" = set; then
7933   echo $ECHO_N "(cached) $ECHO_C" >&6
7934 else
7935
7936 cat >conftest.$ac_ext <<_ACEOF
7937 #line 7937 "configure"
7938 #include "confdefs.h"
7939 #include <sys/types.h>
7940 int
7941 main ()
7942 {
7943
7944 #ifndef _XOPEN_SOURCE
7945 make an error
7946 #endif
7947   ;
7948   return 0;
7949 }
7950 _ACEOF
7951 rm -f conftest.$ac_objext
7952 if { (eval echo "$as_me:7952: \"$ac_compile\"") >&5
7953   (eval $ac_compile) 2>&5
7954   ac_status=$?
7955   echo "$as_me:7955: \$? = $ac_status" >&5
7956   (exit $ac_status); } &&
7957          { ac_try='test -s conftest.$ac_objext'
7958   { (eval echo "$as_me:7958: \"$ac_try\"") >&5
7959   (eval $ac_try) 2>&5
7960   ac_status=$?
7961   echo "$as_me:7961: \$? = $ac_status" >&5
7962   (exit $ac_status); }; }; then
7963   cf_cv_gnu_source=no
7964 else
7965   echo "$as_me: failed program was:" >&5
7966 cat conftest.$ac_ext >&5
7967 cf_save="$CPPFLAGS"
7968          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7969          cat >conftest.$ac_ext <<_ACEOF
7970 #line 7970 "configure"
7971 #include "confdefs.h"
7972 #include <sys/types.h>
7973 int
7974 main ()
7975 {
7976
7977 #ifdef _XOPEN_SOURCE
7978 make an error
7979 #endif
7980   ;
7981   return 0;
7982 }
7983 _ACEOF
7984 rm -f conftest.$ac_objext
7985 if { (eval echo "$as_me:7985: \"$ac_compile\"") >&5
7986   (eval $ac_compile) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit $ac_status); } &&
7990          { ac_try='test -s conftest.$ac_objext'
7991   { (eval echo "$as_me:7991: \"$ac_try\"") >&5
7992   (eval $ac_try) 2>&5
7993   ac_status=$?
7994   echo "$as_me:7994: \$? = $ac_status" >&5
7995   (exit $ac_status); }; }; then
7996   cf_cv_gnu_source=no
7997 else
7998   echo "$as_me: failed program was:" >&5
7999 cat conftest.$ac_ext >&5
8000 cf_cv_gnu_source=yes
8001 fi
8002 rm -f conftest.$ac_objext conftest.$ac_ext
8003         CPPFLAGS="$cf_save"
8004
8005 fi
8006 rm -f conftest.$ac_objext conftest.$ac_ext
8007
8008 fi
8009 echo "$as_me:8009: result: $cf_cv_gnu_source" >&5
8010 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8011 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8012
8013         ;;
8014 (minix*)
8015         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8016         ;;
8017 (mirbsd*)
8018         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8019         cf_XOPEN_SOURCE=
8020
8021 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8022
8023 cf_save_CFLAGS="$CFLAGS"
8024 cf_save_CPPFLAGS="$CPPFLAGS"
8025
8026 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8027         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8028                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8029
8030 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8031         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8032                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8033
8034 echo "$as_me:8034: checking if we should define _POSIX_C_SOURCE" >&5
8035 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8036 if test "${cf_cv_posix_c_source+set}" = set; then
8037   echo $ECHO_N "(cached) $ECHO_C" >&6
8038 else
8039
8040 echo "${as_me:-configure}:8040: testing if the symbol is already defined go no further ..." 1>&5
8041
8042         cat >conftest.$ac_ext <<_ACEOF
8043 #line 8043 "configure"
8044 #include "confdefs.h"
8045 #include <sys/types.h>
8046 int
8047 main ()
8048 {
8049
8050 #ifndef _POSIX_C_SOURCE
8051 make an error
8052 #endif
8053   ;
8054   return 0;
8055 }
8056 _ACEOF
8057 rm -f conftest.$ac_objext
8058 if { (eval echo "$as_me:8058: \"$ac_compile\"") >&5
8059   (eval $ac_compile) 2>&5
8060   ac_status=$?
8061   echo "$as_me:8061: \$? = $ac_status" >&5
8062   (exit $ac_status); } &&
8063          { ac_try='test -s conftest.$ac_objext'
8064   { (eval echo "$as_me:8064: \"$ac_try\"") >&5
8065   (eval $ac_try) 2>&5
8066   ac_status=$?
8067   echo "$as_me:8067: \$? = $ac_status" >&5
8068   (exit $ac_status); }; }; then
8069   cf_cv_posix_c_source=no
8070 else
8071   echo "$as_me: failed program was:" >&5
8072 cat conftest.$ac_ext >&5
8073 cf_want_posix_source=no
8074          case .$cf_POSIX_C_SOURCE in
8075          (.[12]??*)
8076                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8077                 ;;
8078          (.2)
8079                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8080                 cf_want_posix_source=yes
8081                 ;;
8082          (.*)
8083                 cf_want_posix_source=yes
8084                 ;;
8085          esac
8086          if test "$cf_want_posix_source" = yes ; then
8087                 cat >conftest.$ac_ext <<_ACEOF
8088 #line 8088 "configure"
8089 #include "confdefs.h"
8090 #include <sys/types.h>
8091 int
8092 main ()
8093 {
8094
8095 #ifdef _POSIX_SOURCE
8096 make an error
8097 #endif
8098   ;
8099   return 0;
8100 }
8101 _ACEOF
8102 rm -f conftest.$ac_objext
8103 if { (eval echo "$as_me:8103: \"$ac_compile\"") >&5
8104   (eval $ac_compile) 2>&5
8105   ac_status=$?
8106   echo "$as_me:8106: \$? = $ac_status" >&5
8107   (exit $ac_status); } &&
8108          { ac_try='test -s conftest.$ac_objext'
8109   { (eval echo "$as_me:8109: \"$ac_try\"") >&5
8110   (eval $ac_try) 2>&5
8111   ac_status=$?
8112   echo "$as_me:8112: \$? = $ac_status" >&5
8113   (exit $ac_status); }; }; then
8114   :
8115 else
8116   echo "$as_me: failed program was:" >&5
8117 cat conftest.$ac_ext >&5
8118 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8119 fi
8120 rm -f conftest.$ac_objext conftest.$ac_ext
8121          fi
8122
8123 echo "${as_me:-configure}:8123: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8124
8125          CFLAGS="$cf_trim_CFLAGS"
8126          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8127
8128 echo "${as_me:-configure}:8128: testing if the second compile does not leave our definition intact error ..." 1>&5
8129
8130          cat >conftest.$ac_ext <<_ACEOF
8131 #line 8131 "configure"
8132 #include "confdefs.h"
8133 #include <sys/types.h>
8134 int
8135 main ()
8136 {
8137
8138 #ifndef _POSIX_C_SOURCE
8139 make an error
8140 #endif
8141   ;
8142   return 0;
8143 }
8144 _ACEOF
8145 rm -f conftest.$ac_objext
8146 if { (eval echo "$as_me:8146: \"$ac_compile\"") >&5
8147   (eval $ac_compile) 2>&5
8148   ac_status=$?
8149   echo "$as_me:8149: \$? = $ac_status" >&5
8150   (exit $ac_status); } &&
8151          { ac_try='test -s conftest.$ac_objext'
8152   { (eval echo "$as_me:8152: \"$ac_try\"") >&5
8153   (eval $ac_try) 2>&5
8154   ac_status=$?
8155   echo "$as_me:8155: \$? = $ac_status" >&5
8156   (exit $ac_status); }; }; then
8157   :
8158 else
8159   echo "$as_me: failed program was:" >&5
8160 cat conftest.$ac_ext >&5
8161 cf_cv_posix_c_source=no
8162 fi
8163 rm -f conftest.$ac_objext conftest.$ac_ext
8164          CFLAGS="$cf_save_CFLAGS"
8165          CPPFLAGS="$cf_save_CPPFLAGS"
8166
8167 fi
8168 rm -f conftest.$ac_objext conftest.$ac_ext
8169
8170 fi
8171 echo "$as_me:8171: result: $cf_cv_posix_c_source" >&5
8172 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8173
8174 if test "$cf_cv_posix_c_source" != no ; then
8175         CFLAGS="$cf_trim_CFLAGS"
8176         CPPFLAGS="$cf_trim_CPPFLAGS"
8177
8178 cf_fix_cppflags=no
8179 cf_new_cflags=
8180 cf_new_cppflags=
8181 cf_new_extra_cppflags=
8182
8183 for cf_add_cflags in $cf_cv_posix_c_source
8184 do
8185 case $cf_fix_cppflags in
8186 (no)
8187         case $cf_add_cflags in
8188         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8189                 case $cf_add_cflags in
8190                 (-D*)
8191                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8192
8193                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8194                                 && test -z "${cf_tst_cflags}" \
8195                                 && cf_fix_cppflags=yes
8196
8197                         if test $cf_fix_cppflags = yes ; then
8198                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8199                                 continue
8200                         elif test "${cf_tst_cflags}" = "\"'" ; then
8201                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8202                                 continue
8203                         fi
8204                         ;;
8205                 esac
8206                 case "$CPPFLAGS" in
8207                 (*$cf_add_cflags)
8208                         ;;
8209                 (*)
8210                         case $cf_add_cflags in
8211                         (-D*)
8212                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8213
8214 CPPFLAGS=`echo "$CPPFLAGS" | \
8215         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8216                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8217
8218                                 ;;
8219                         esac
8220                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8221                         ;;
8222                 esac
8223                 ;;
8224         (*)
8225                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8226                 ;;
8227         esac
8228         ;;
8229 (yes)
8230         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8231
8232         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8233
8234         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8235                 && test -z "${cf_tst_cflags}" \
8236                 && cf_fix_cppflags=no
8237         ;;
8238 esac
8239 done
8240
8241 if test -n "$cf_new_cflags" ; then
8242
8243         CFLAGS="$CFLAGS $cf_new_cflags"
8244 fi
8245
8246 if test -n "$cf_new_cppflags" ; then
8247
8248         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8249 fi
8250
8251 if test -n "$cf_new_extra_cppflags" ; then
8252
8253         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8254 fi
8255
8256 fi
8257
8258         ;;
8259 (netbsd*)
8260         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8261         ;;
8262 (openbsd[4-9]*)
8263         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8264         cf_xopen_source="-D_BSD_SOURCE"
8265         cf_XOPEN_SOURCE=600
8266         ;;
8267 (openbsd*)
8268         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8269         ;;
8270 (os2*)
8271         cf_XOPEN_SOURCE=
8272         ;;
8273 (osf[45]*)
8274         cf_xopen_source="-D_OSF_SOURCE"
8275         ;;
8276 (nto-qnx*)
8277         cf_xopen_source="-D_QNX_SOURCE"
8278         ;;
8279 (sco*)
8280         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8281         ;;
8282 (solaris2.*)
8283         cf_xopen_source="-D__EXTENSIONS__"
8284         cf_cv_xopen_source=broken
8285         ;;
8286 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8287         cf_XOPEN_SOURCE=
8288         cf_POSIX_C_SOURCE=
8289         ;;
8290 (*)
8291
8292 echo "$as_me:8292: checking if we should define _XOPEN_SOURCE" >&5
8293 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8294 if test "${cf_cv_xopen_source+set}" = set; then
8295   echo $ECHO_N "(cached) $ECHO_C" >&6
8296 else
8297
8298         cat >conftest.$ac_ext <<_ACEOF
8299 #line 8299 "configure"
8300 #include "confdefs.h"
8301
8302 #include <stdlib.h>
8303 #include <string.h>
8304 #include <sys/types.h>
8305
8306 int
8307 main ()
8308 {
8309
8310 #ifndef _XOPEN_SOURCE
8311 make an error
8312 #endif
8313   ;
8314   return 0;
8315 }
8316 _ACEOF
8317 rm -f conftest.$ac_objext
8318 if { (eval echo "$as_me:8318: \"$ac_compile\"") >&5
8319   (eval $ac_compile) 2>&5
8320   ac_status=$?
8321   echo "$as_me:8321: \$? = $ac_status" >&5
8322   (exit $ac_status); } &&
8323          { ac_try='test -s conftest.$ac_objext'
8324   { (eval echo "$as_me:8324: \"$ac_try\"") >&5
8325   (eval $ac_try) 2>&5
8326   ac_status=$?
8327   echo "$as_me:8327: \$? = $ac_status" >&5
8328   (exit $ac_status); }; }; then
8329   cf_cv_xopen_source=no
8330 else
8331   echo "$as_me: failed program was:" >&5
8332 cat conftest.$ac_ext >&5
8333 cf_save="$CPPFLAGS"
8334          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8335          cat >conftest.$ac_ext <<_ACEOF
8336 #line 8336 "configure"
8337 #include "confdefs.h"
8338
8339 #include <stdlib.h>
8340 #include <string.h>
8341 #include <sys/types.h>
8342
8343 int
8344 main ()
8345 {
8346
8347 #ifdef _XOPEN_SOURCE
8348 make an error
8349 #endif
8350   ;
8351   return 0;
8352 }
8353 _ACEOF
8354 rm -f conftest.$ac_objext
8355 if { (eval echo "$as_me:8355: \"$ac_compile\"") >&5
8356   (eval $ac_compile) 2>&5
8357   ac_status=$?
8358   echo "$as_me:8358: \$? = $ac_status" >&5
8359   (exit $ac_status); } &&
8360          { ac_try='test -s conftest.$ac_objext'
8361   { (eval echo "$as_me:8361: \"$ac_try\"") >&5
8362   (eval $ac_try) 2>&5
8363   ac_status=$?
8364   echo "$as_me:8364: \$? = $ac_status" >&5
8365   (exit $ac_status); }; }; then
8366   cf_cv_xopen_source=no
8367 else
8368   echo "$as_me: failed program was:" >&5
8369 cat conftest.$ac_ext >&5
8370 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8371 fi
8372 rm -f conftest.$ac_objext conftest.$ac_ext
8373         CPPFLAGS="$cf_save"
8374
8375 fi
8376 rm -f conftest.$ac_objext conftest.$ac_ext
8377
8378 fi
8379 echo "$as_me:8379: result: $cf_cv_xopen_source" >&5
8380 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8381
8382 if test "$cf_cv_xopen_source" != no ; then
8383
8384 CFLAGS=`echo "$CFLAGS" | \
8385         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8386                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8387
8388 CPPFLAGS=`echo "$CPPFLAGS" | \
8389         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8390                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8391
8392         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8393
8394 cf_fix_cppflags=no
8395 cf_new_cflags=
8396 cf_new_cppflags=
8397 cf_new_extra_cppflags=
8398
8399 for cf_add_cflags in $cf_temp_xopen_source
8400 do
8401 case $cf_fix_cppflags in
8402 (no)
8403         case $cf_add_cflags in
8404         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8405                 case $cf_add_cflags in
8406                 (-D*)
8407                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8408
8409                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8410                                 && test -z "${cf_tst_cflags}" \
8411                                 && cf_fix_cppflags=yes
8412
8413                         if test $cf_fix_cppflags = yes ; then
8414                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8415                                 continue
8416                         elif test "${cf_tst_cflags}" = "\"'" ; then
8417                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8418                                 continue
8419                         fi
8420                         ;;
8421                 esac
8422                 case "$CPPFLAGS" in
8423                 (*$cf_add_cflags)
8424                         ;;
8425                 (*)
8426                         case $cf_add_cflags in
8427                         (-D*)
8428                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8429
8430 CPPFLAGS=`echo "$CPPFLAGS" | \
8431         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8432                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8433
8434                                 ;;
8435                         esac
8436                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8437                         ;;
8438                 esac
8439                 ;;
8440         (*)
8441                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8442                 ;;
8443         esac
8444         ;;
8445 (yes)
8446         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8447
8448         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8449
8450         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8451                 && test -z "${cf_tst_cflags}" \
8452                 && cf_fix_cppflags=no
8453         ;;
8454 esac
8455 done
8456
8457 if test -n "$cf_new_cflags" ; then
8458
8459         CFLAGS="$CFLAGS $cf_new_cflags"
8460 fi
8461
8462 if test -n "$cf_new_cppflags" ; then
8463
8464         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8465 fi
8466
8467 if test -n "$cf_new_extra_cppflags" ; then
8468
8469         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8470 fi
8471
8472 fi
8473
8474 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8475
8476 cf_save_CFLAGS="$CFLAGS"
8477 cf_save_CPPFLAGS="$CPPFLAGS"
8478
8479 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8480         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8481                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8482
8483 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8484         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8485                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8486
8487 echo "$as_me:8487: checking if we should define _POSIX_C_SOURCE" >&5
8488 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8489 if test "${cf_cv_posix_c_source+set}" = set; then
8490   echo $ECHO_N "(cached) $ECHO_C" >&6
8491 else
8492
8493 echo "${as_me:-configure}:8493: testing if the symbol is already defined go no further ..." 1>&5
8494
8495         cat >conftest.$ac_ext <<_ACEOF
8496 #line 8496 "configure"
8497 #include "confdefs.h"
8498 #include <sys/types.h>
8499 int
8500 main ()
8501 {
8502
8503 #ifndef _POSIX_C_SOURCE
8504 make an error
8505 #endif
8506   ;
8507   return 0;
8508 }
8509 _ACEOF
8510 rm -f conftest.$ac_objext
8511 if { (eval echo "$as_me:8511: \"$ac_compile\"") >&5
8512   (eval $ac_compile) 2>&5
8513   ac_status=$?
8514   echo "$as_me:8514: \$? = $ac_status" >&5
8515   (exit $ac_status); } &&
8516          { ac_try='test -s conftest.$ac_objext'
8517   { (eval echo "$as_me:8517: \"$ac_try\"") >&5
8518   (eval $ac_try) 2>&5
8519   ac_status=$?
8520   echo "$as_me:8520: \$? = $ac_status" >&5
8521   (exit $ac_status); }; }; then
8522   cf_cv_posix_c_source=no
8523 else
8524   echo "$as_me: failed program was:" >&5
8525 cat conftest.$ac_ext >&5
8526 cf_want_posix_source=no
8527          case .$cf_POSIX_C_SOURCE in
8528          (.[12]??*)
8529                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8530                 ;;
8531          (.2)
8532                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8533                 cf_want_posix_source=yes
8534                 ;;
8535          (.*)
8536                 cf_want_posix_source=yes
8537                 ;;
8538          esac
8539          if test "$cf_want_posix_source" = yes ; then
8540                 cat >conftest.$ac_ext <<_ACEOF
8541 #line 8541 "configure"
8542 #include "confdefs.h"
8543 #include <sys/types.h>
8544 int
8545 main ()
8546 {
8547
8548 #ifdef _POSIX_SOURCE
8549 make an error
8550 #endif
8551   ;
8552   return 0;
8553 }
8554 _ACEOF
8555 rm -f conftest.$ac_objext
8556 if { (eval echo "$as_me:8556: \"$ac_compile\"") >&5
8557   (eval $ac_compile) 2>&5
8558   ac_status=$?
8559   echo "$as_me:8559: \$? = $ac_status" >&5
8560   (exit $ac_status); } &&
8561          { ac_try='test -s conftest.$ac_objext'
8562   { (eval echo "$as_me:8562: \"$ac_try\"") >&5
8563   (eval $ac_try) 2>&5
8564   ac_status=$?
8565   echo "$as_me:8565: \$? = $ac_status" >&5
8566   (exit $ac_status); }; }; then
8567   :
8568 else
8569   echo "$as_me: failed program was:" >&5
8570 cat conftest.$ac_ext >&5
8571 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8572 fi
8573 rm -f conftest.$ac_objext conftest.$ac_ext
8574          fi
8575
8576 echo "${as_me:-configure}:8576: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8577
8578          CFLAGS="$cf_trim_CFLAGS"
8579          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8580
8581 echo "${as_me:-configure}:8581: testing if the second compile does not leave our definition intact error ..." 1>&5
8582
8583          cat >conftest.$ac_ext <<_ACEOF
8584 #line 8584 "configure"
8585 #include "confdefs.h"
8586 #include <sys/types.h>
8587 int
8588 main ()
8589 {
8590
8591 #ifndef _POSIX_C_SOURCE
8592 make an error
8593 #endif
8594   ;
8595   return 0;
8596 }
8597 _ACEOF
8598 rm -f conftest.$ac_objext
8599 if { (eval echo "$as_me:8599: \"$ac_compile\"") >&5
8600   (eval $ac_compile) 2>&5
8601   ac_status=$?
8602   echo "$as_me:8602: \$? = $ac_status" >&5
8603   (exit $ac_status); } &&
8604          { ac_try='test -s conftest.$ac_objext'
8605   { (eval echo "$as_me:8605: \"$ac_try\"") >&5
8606   (eval $ac_try) 2>&5
8607   ac_status=$?
8608   echo "$as_me:8608: \$? = $ac_status" >&5
8609   (exit $ac_status); }; }; then
8610   :
8611 else
8612   echo "$as_me: failed program was:" >&5
8613 cat conftest.$ac_ext >&5
8614 cf_cv_posix_c_source=no
8615 fi
8616 rm -f conftest.$ac_objext conftest.$ac_ext
8617          CFLAGS="$cf_save_CFLAGS"
8618          CPPFLAGS="$cf_save_CPPFLAGS"
8619
8620 fi
8621 rm -f conftest.$ac_objext conftest.$ac_ext
8622
8623 fi
8624 echo "$as_me:8624: result: $cf_cv_posix_c_source" >&5
8625 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8626
8627 if test "$cf_cv_posix_c_source" != no ; then
8628         CFLAGS="$cf_trim_CFLAGS"
8629         CPPFLAGS="$cf_trim_CPPFLAGS"
8630
8631 cf_fix_cppflags=no
8632 cf_new_cflags=
8633 cf_new_cppflags=
8634 cf_new_extra_cppflags=
8635
8636 for cf_add_cflags in $cf_cv_posix_c_source
8637 do
8638 case $cf_fix_cppflags in
8639 (no)
8640         case $cf_add_cflags in
8641         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8642                 case $cf_add_cflags in
8643                 (-D*)
8644                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8645
8646                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8647                                 && test -z "${cf_tst_cflags}" \
8648                                 && cf_fix_cppflags=yes
8649
8650                         if test $cf_fix_cppflags = yes ; then
8651                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8652                                 continue
8653                         elif test "${cf_tst_cflags}" = "\"'" ; then
8654                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8655                                 continue
8656                         fi
8657                         ;;
8658                 esac
8659                 case "$CPPFLAGS" in
8660                 (*$cf_add_cflags)
8661                         ;;
8662                 (*)
8663                         case $cf_add_cflags in
8664                         (-D*)
8665                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8666
8667 CPPFLAGS=`echo "$CPPFLAGS" | \
8668         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8669                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8670
8671                                 ;;
8672                         esac
8673                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8674                         ;;
8675                 esac
8676                 ;;
8677         (*)
8678                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8679                 ;;
8680         esac
8681         ;;
8682 (yes)
8683         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8684
8685         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8686
8687         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8688                 && test -z "${cf_tst_cflags}" \
8689                 && cf_fix_cppflags=no
8690         ;;
8691 esac
8692 done
8693
8694 if test -n "$cf_new_cflags" ; then
8695
8696         CFLAGS="$CFLAGS $cf_new_cflags"
8697 fi
8698
8699 if test -n "$cf_new_cppflags" ; then
8700
8701         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8702 fi
8703
8704 if test -n "$cf_new_extra_cppflags" ; then
8705
8706         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8707 fi
8708
8709 fi
8710
8711         ;;
8712 esac
8713
8714 if test -n "$cf_xopen_source" ; then
8715
8716 cf_fix_cppflags=no
8717 cf_new_cflags=
8718 cf_new_cppflags=
8719 cf_new_extra_cppflags=
8720
8721 for cf_add_cflags in $cf_xopen_source
8722 do
8723 case $cf_fix_cppflags in
8724 (no)
8725         case $cf_add_cflags in
8726         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8727                 case $cf_add_cflags in
8728                 (-D*)
8729                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8730
8731                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8732                                 && test -z "${cf_tst_cflags}" \
8733                                 && cf_fix_cppflags=yes
8734
8735                         if test $cf_fix_cppflags = yes ; then
8736                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8737                                 continue
8738                         elif test "${cf_tst_cflags}" = "\"'" ; then
8739                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8740                                 continue
8741                         fi
8742                         ;;
8743                 esac
8744                 case "$CPPFLAGS" in
8745                 (*$cf_add_cflags)
8746                         ;;
8747                 (*)
8748                         case $cf_add_cflags in
8749                         (-D*)
8750                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8751
8752 CPPFLAGS=`echo "$CPPFLAGS" | \
8753         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8754                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8755
8756                                 ;;
8757                         esac
8758                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8759                         ;;
8760                 esac
8761                 ;;
8762         (*)
8763                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8764                 ;;
8765         esac
8766         ;;
8767 (yes)
8768         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8769
8770         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8771
8772         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8773                 && test -z "${cf_tst_cflags}" \
8774                 && cf_fix_cppflags=no
8775         ;;
8776 esac
8777 done
8778
8779 if test -n "$cf_new_cflags" ; then
8780         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8781
8782 echo "${as_me:-configure}:8782: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8783
8784         CFLAGS="$CFLAGS $cf_new_cflags"
8785 fi
8786
8787 if test -n "$cf_new_cppflags" ; then
8788         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8789
8790 echo "${as_me:-configure}:8790: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8791
8792         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8793 fi
8794
8795 if test -n "$cf_new_extra_cppflags" ; then
8796         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8797
8798 echo "${as_me:-configure}:8798: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8799
8800         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8801 fi
8802
8803 fi
8804
8805 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8806         echo "$as_me:8806: checking if _XOPEN_SOURCE really is set" >&5
8807 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8808         cat >conftest.$ac_ext <<_ACEOF
8809 #line 8809 "configure"
8810 #include "confdefs.h"
8811 #include <stdlib.h>
8812 int
8813 main ()
8814 {
8815
8816 #ifndef _XOPEN_SOURCE
8817 make an error
8818 #endif
8819   ;
8820   return 0;
8821 }
8822 _ACEOF
8823 rm -f conftest.$ac_objext
8824 if { (eval echo "$as_me:8824: \"$ac_compile\"") >&5
8825   (eval $ac_compile) 2>&5
8826   ac_status=$?
8827   echo "$as_me:8827: \$? = $ac_status" >&5
8828   (exit $ac_status); } &&
8829          { ac_try='test -s conftest.$ac_objext'
8830   { (eval echo "$as_me:8830: \"$ac_try\"") >&5
8831   (eval $ac_try) 2>&5
8832   ac_status=$?
8833   echo "$as_me:8833: \$? = $ac_status" >&5
8834   (exit $ac_status); }; }; then
8835   cf_XOPEN_SOURCE_set=yes
8836 else
8837   echo "$as_me: failed program was:" >&5
8838 cat conftest.$ac_ext >&5
8839 cf_XOPEN_SOURCE_set=no
8840 fi
8841 rm -f conftest.$ac_objext conftest.$ac_ext
8842         echo "$as_me:8842: result: $cf_XOPEN_SOURCE_set" >&5
8843 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8844         if test $cf_XOPEN_SOURCE_set = yes
8845         then
8846                 cat >conftest.$ac_ext <<_ACEOF
8847 #line 8847 "configure"
8848 #include "confdefs.h"
8849 #include <stdlib.h>
8850 int
8851 main ()
8852 {
8853
8854 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8855 make an error
8856 #endif
8857   ;
8858   return 0;
8859 }
8860 _ACEOF
8861 rm -f conftest.$ac_objext
8862 if { (eval echo "$as_me:8862: \"$ac_compile\"") >&5
8863   (eval $ac_compile) 2>&5
8864   ac_status=$?
8865   echo "$as_me:8865: \$? = $ac_status" >&5
8866   (exit $ac_status); } &&
8867          { ac_try='test -s conftest.$ac_objext'
8868   { (eval echo "$as_me:8868: \"$ac_try\"") >&5
8869   (eval $ac_try) 2>&5
8870   ac_status=$?
8871   echo "$as_me:8871: \$? = $ac_status" >&5
8872   (exit $ac_status); }; }; then
8873   cf_XOPEN_SOURCE_set_ok=yes
8874 else
8875   echo "$as_me: failed program was:" >&5
8876 cat conftest.$ac_ext >&5
8877 cf_XOPEN_SOURCE_set_ok=no
8878 fi
8879 rm -f conftest.$ac_objext conftest.$ac_ext
8880                 if test $cf_XOPEN_SOURCE_set_ok = no
8881                 then
8882                         { echo "$as_me:8882: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8883 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8884                 fi
8885         else
8886
8887 echo "$as_me:8887: checking if we should define _XOPEN_SOURCE" >&5
8888 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8889 if test "${cf_cv_xopen_source+set}" = set; then
8890   echo $ECHO_N "(cached) $ECHO_C" >&6
8891 else
8892
8893         cat >conftest.$ac_ext <<_ACEOF
8894 #line 8894 "configure"
8895 #include "confdefs.h"
8896
8897 #include <stdlib.h>
8898 #include <string.h>
8899 #include <sys/types.h>
8900
8901 int
8902 main ()
8903 {
8904
8905 #ifndef _XOPEN_SOURCE
8906 make an error
8907 #endif
8908   ;
8909   return 0;
8910 }
8911 _ACEOF
8912 rm -f conftest.$ac_objext
8913 if { (eval echo "$as_me:8913: \"$ac_compile\"") >&5
8914   (eval $ac_compile) 2>&5
8915   ac_status=$?
8916   echo "$as_me:8916: \$? = $ac_status" >&5
8917   (exit $ac_status); } &&
8918          { ac_try='test -s conftest.$ac_objext'
8919   { (eval echo "$as_me:8919: \"$ac_try\"") >&5
8920   (eval $ac_try) 2>&5
8921   ac_status=$?
8922   echo "$as_me:8922: \$? = $ac_status" >&5
8923   (exit $ac_status); }; }; then
8924   cf_cv_xopen_source=no
8925 else
8926   echo "$as_me: failed program was:" >&5
8927 cat conftest.$ac_ext >&5
8928 cf_save="$CPPFLAGS"
8929          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8930          cat >conftest.$ac_ext <<_ACEOF
8931 #line 8931 "configure"
8932 #include "confdefs.h"
8933
8934 #include <stdlib.h>
8935 #include <string.h>
8936 #include <sys/types.h>
8937
8938 int
8939 main ()
8940 {
8941
8942 #ifdef _XOPEN_SOURCE
8943 make an error
8944 #endif
8945   ;
8946   return 0;
8947 }
8948 _ACEOF
8949 rm -f conftest.$ac_objext
8950 if { (eval echo "$as_me:8950: \"$ac_compile\"") >&5
8951   (eval $ac_compile) 2>&5
8952   ac_status=$?
8953   echo "$as_me:8953: \$? = $ac_status" >&5
8954   (exit $ac_status); } &&
8955          { ac_try='test -s conftest.$ac_objext'
8956   { (eval echo "$as_me:8956: \"$ac_try\"") >&5
8957   (eval $ac_try) 2>&5
8958   ac_status=$?
8959   echo "$as_me:8959: \$? = $ac_status" >&5
8960   (exit $ac_status); }; }; then
8961   cf_cv_xopen_source=no
8962 else
8963   echo "$as_me: failed program was:" >&5
8964 cat conftest.$ac_ext >&5
8965 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8966 fi
8967 rm -f conftest.$ac_objext conftest.$ac_ext
8968         CPPFLAGS="$cf_save"
8969
8970 fi
8971 rm -f conftest.$ac_objext conftest.$ac_ext
8972
8973 fi
8974 echo "$as_me:8974: result: $cf_cv_xopen_source" >&5
8975 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8976
8977 if test "$cf_cv_xopen_source" != no ; then
8978
8979 CFLAGS=`echo "$CFLAGS" | \
8980         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8981                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8982
8983 CPPFLAGS=`echo "$CPPFLAGS" | \
8984         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8985                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8986
8987         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8988
8989 cf_fix_cppflags=no
8990 cf_new_cflags=
8991 cf_new_cppflags=
8992 cf_new_extra_cppflags=
8993
8994 for cf_add_cflags in $cf_temp_xopen_source
8995 do
8996 case $cf_fix_cppflags in
8997 (no)
8998         case $cf_add_cflags in
8999         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9000                 case $cf_add_cflags in
9001                 (-D*)
9002                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9003
9004                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9005                                 && test -z "${cf_tst_cflags}" \
9006                                 && cf_fix_cppflags=yes
9007
9008                         if test $cf_fix_cppflags = yes ; then
9009                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9010                                 continue
9011                         elif test "${cf_tst_cflags}" = "\"'" ; then
9012                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9013                                 continue
9014                         fi
9015                         ;;
9016                 esac
9017                 case "$CPPFLAGS" in
9018                 (*$cf_add_cflags)
9019                         ;;
9020                 (*)
9021                         case $cf_add_cflags in
9022                         (-D*)
9023                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9024
9025 CPPFLAGS=`echo "$CPPFLAGS" | \
9026         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9027                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9028
9029                                 ;;
9030                         esac
9031                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9032                         ;;
9033                 esac
9034                 ;;
9035         (*)
9036                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9037                 ;;
9038         esac
9039         ;;
9040 (yes)
9041         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9042
9043         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9044
9045         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9046                 && test -z "${cf_tst_cflags}" \
9047                 && cf_fix_cppflags=no
9048         ;;
9049 esac
9050 done
9051
9052 if test -n "$cf_new_cflags" ; then
9053
9054         CFLAGS="$CFLAGS $cf_new_cflags"
9055 fi
9056
9057 if test -n "$cf_new_cppflags" ; then
9058
9059         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9060 fi
9061
9062 if test -n "$cf_new_extra_cppflags" ; then
9063
9064         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9065 fi
9066
9067 fi
9068
9069         fi
9070 fi
9071
9072 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9073
9074 # Work around breakage on OS X
9075
9076 echo "$as_me:9076: checking if SIGWINCH is defined" >&5
9077 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9078 if test "${cf_cv_define_sigwinch+set}" = set; then
9079   echo $ECHO_N "(cached) $ECHO_C" >&6
9080 else
9081
9082         cat >conftest.$ac_ext <<_ACEOF
9083 #line 9083 "configure"
9084 #include "confdefs.h"
9085
9086 #include <sys/types.h>
9087 #include <sys/signal.h>
9088
9089 int
9090 main ()
9091 {
9092 int x = SIGWINCH
9093   ;
9094   return 0;
9095 }
9096 _ACEOF
9097 rm -f conftest.$ac_objext
9098 if { (eval echo "$as_me:9098: \"$ac_compile\"") >&5
9099   (eval $ac_compile) 2>&5
9100   ac_status=$?
9101   echo "$as_me:9101: \$? = $ac_status" >&5
9102   (exit $ac_status); } &&
9103          { ac_try='test -s conftest.$ac_objext'
9104   { (eval echo "$as_me:9104: \"$ac_try\"") >&5
9105   (eval $ac_try) 2>&5
9106   ac_status=$?
9107   echo "$as_me:9107: \$? = $ac_status" >&5
9108   (exit $ac_status); }; }; then
9109   cf_cv_define_sigwinch=yes
9110 else
9111   echo "$as_me: failed program was:" >&5
9112 cat conftest.$ac_ext >&5
9113 cat >conftest.$ac_ext <<_ACEOF
9114 #line 9114 "configure"
9115 #include "confdefs.h"
9116
9117 #undef _XOPEN_SOURCE
9118 #undef _POSIX_SOURCE
9119 #undef _POSIX_C_SOURCE
9120 #include <sys/types.h>
9121 #include <sys/signal.h>
9122
9123 int
9124 main ()
9125 {
9126 int x = SIGWINCH
9127   ;
9128   return 0;
9129 }
9130 _ACEOF
9131 rm -f conftest.$ac_objext
9132 if { (eval echo "$as_me:9132: \"$ac_compile\"") >&5
9133   (eval $ac_compile) 2>&5
9134   ac_status=$?
9135   echo "$as_me:9135: \$? = $ac_status" >&5
9136   (exit $ac_status); } &&
9137          { ac_try='test -s conftest.$ac_objext'
9138   { (eval echo "$as_me:9138: \"$ac_try\"") >&5
9139   (eval $ac_try) 2>&5
9140   ac_status=$?
9141   echo "$as_me:9141: \$? = $ac_status" >&5
9142   (exit $ac_status); }; }; then
9143   cf_cv_define_sigwinch=maybe
9144 else
9145   echo "$as_me: failed program was:" >&5
9146 cat conftest.$ac_ext >&5
9147 cf_cv_define_sigwinch=no
9148 fi
9149 rm -f conftest.$ac_objext conftest.$ac_ext
9150
9151 fi
9152 rm -f conftest.$ac_objext conftest.$ac_ext
9153
9154 fi
9155 echo "$as_me:9155: result: $cf_cv_define_sigwinch" >&5
9156 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9157
9158 if test "$cf_cv_define_sigwinch" = maybe ; then
9159 echo "$as_me:9159: checking for actual SIGWINCH definition" >&5
9160 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9161 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9162   echo $ECHO_N "(cached) $ECHO_C" >&6
9163 else
9164
9165 cf_cv_fixup_sigwinch=unknown
9166 cf_sigwinch=32
9167 while test $cf_sigwinch != 1
9168 do
9169         cat >conftest.$ac_ext <<_ACEOF
9170 #line 9170 "configure"
9171 #include "confdefs.h"
9172
9173 #undef _XOPEN_SOURCE
9174 #undef _POSIX_SOURCE
9175 #undef _POSIX_C_SOURCE
9176 #include <sys/types.h>
9177 #include <sys/signal.h>
9178
9179 int
9180 main ()
9181 {
9182
9183 #if SIGWINCH != $cf_sigwinch
9184 make an error
9185 #endif
9186 int x = SIGWINCH
9187   ;
9188   return 0;
9189 }
9190 _ACEOF
9191 rm -f conftest.$ac_objext
9192 if { (eval echo "$as_me:9192: \"$ac_compile\"") >&5
9193   (eval $ac_compile) 2>&5
9194   ac_status=$?
9195   echo "$as_me:9195: \$? = $ac_status" >&5
9196   (exit $ac_status); } &&
9197          { ac_try='test -s conftest.$ac_objext'
9198   { (eval echo "$as_me:9198: \"$ac_try\"") >&5
9199   (eval $ac_try) 2>&5
9200   ac_status=$?
9201   echo "$as_me:9201: \$? = $ac_status" >&5
9202   (exit $ac_status); }; }; then
9203   cf_cv_fixup_sigwinch=$cf_sigwinch
9204          break
9205 else
9206   echo "$as_me: failed program was:" >&5
9207 cat conftest.$ac_ext >&5
9208 fi
9209 rm -f conftest.$ac_objext conftest.$ac_ext
9210
9211 cf_sigwinch=`expr $cf_sigwinch - 1`
9212 done
9213
9214 fi
9215 echo "$as_me:9215: result: $cf_cv_fixup_sigwinch" >&5
9216 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9217
9218         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9219                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9220         fi
9221 fi
9222
9223 # Checks for CODESET support.
9224
9225 echo "$as_me:9225: checking for nl_langinfo and CODESET" >&5
9226 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9227 if test "${am_cv_langinfo_codeset+set}" = set; then
9228   echo $ECHO_N "(cached) $ECHO_C" >&6
9229 else
9230   cat >conftest.$ac_ext <<_ACEOF
9231 #line 9231 "configure"
9232 #include "confdefs.h"
9233 #include <langinfo.h>
9234 int
9235 main ()
9236 {
9237 char* cs = nl_langinfo(CODESET);
9238   ;
9239   return 0;
9240 }
9241 _ACEOF
9242 rm -f conftest.$ac_objext conftest$ac_exeext
9243 if { (eval echo "$as_me:9243: \"$ac_link\"") >&5
9244   (eval $ac_link) 2>&5
9245   ac_status=$?
9246   echo "$as_me:9246: \$? = $ac_status" >&5
9247   (exit $ac_status); } &&
9248          { ac_try='test -s conftest$ac_exeext'
9249   { (eval echo "$as_me:9249: \"$ac_try\"") >&5
9250   (eval $ac_try) 2>&5
9251   ac_status=$?
9252   echo "$as_me:9252: \$? = $ac_status" >&5
9253   (exit $ac_status); }; }; then
9254   am_cv_langinfo_codeset=yes
9255 else
9256   echo "$as_me: failed program was:" >&5
9257 cat conftest.$ac_ext >&5
9258 am_cv_langinfo_codeset=no
9259 fi
9260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9261
9262 fi
9263 echo "$as_me:9263: result: $am_cv_langinfo_codeset" >&5
9264 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9265         if test $am_cv_langinfo_codeset = yes; then
9266
9267 cat >>confdefs.h <<\EOF
9268 #define HAVE_LANGINFO_CODESET 1
9269 EOF
9270
9271         fi
9272
9273 # use these variables to work around a defect in gcc's fixincludes.
9274 NCURSES_OK_WCHAR_T=
9275 NCURSES_OK_WINT_T=
9276
9277 echo "$as_me:9277: checking if you want wide-character code" >&5
9278 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9279
9280 # Check whether --enable-widec or --disable-widec was given.
9281 if test "${enable_widec+set}" = set; then
9282   enableval="$enable_widec"
9283   with_widec=$enableval
9284 else
9285   with_widec=no
9286 fi;
9287 echo "$as_me:9287: result: $with_widec" >&5
9288 echo "${ECHO_T}$with_widec" >&6
9289
9290 NCURSES_WCWIDTH_GRAPHICS=1
9291
9292 if test "x$with_widec" = xyes ; then
9293         if test "x$disable_lib_suffixes" = xno ; then
9294                 LIB_SUFFIX="w${LIB_SUFFIX}"
9295         fi
9296
9297 cat >>confdefs.h <<\EOF
9298 #define USE_WIDEC_SUPPORT 1
9299 EOF
9300
9301 cat >>confdefs.h <<\EOF
9302 #define NCURSES_WIDECHAR 1
9303 EOF
9304
9305 echo "$as_me:9305: checking if wchar.h can be used as is" >&5
9306 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9307 if test "${cf_cv_wchar_h_okay+set}" = set; then
9308   echo $ECHO_N "(cached) $ECHO_C" >&6
9309 else
9310
9311 cat >conftest.$ac_ext <<_ACEOF
9312 #line 9312 "configure"
9313 #include "confdefs.h"
9314
9315 #include <stdlib.h>
9316 #include <wchar.h>
9317
9318 int
9319 main ()
9320 {
9321
9322         wint_t foo = 0;
9323         int bar = iswpunct(foo)
9324   ;
9325   return 0;
9326 }
9327 _ACEOF
9328 rm -f conftest.$ac_objext
9329 if { (eval echo "$as_me:9329: \"$ac_compile\"") >&5
9330   (eval $ac_compile) 2>&5
9331   ac_status=$?
9332   echo "$as_me:9332: \$? = $ac_status" >&5
9333   (exit $ac_status); } &&
9334          { ac_try='test -s conftest.$ac_objext'
9335   { (eval echo "$as_me:9335: \"$ac_try\"") >&5
9336   (eval $ac_try) 2>&5
9337   ac_status=$?
9338   echo "$as_me:9338: \$? = $ac_status" >&5
9339   (exit $ac_status); }; }; then
9340   cf_cv_wchar_h_okay=yes
9341 else
9342   echo "$as_me: failed program was:" >&5
9343 cat conftest.$ac_ext >&5
9344 cf_cv_wchar_h_okay=no
9345 fi
9346 rm -f conftest.$ac_objext conftest.$ac_ext
9347 fi
9348 echo "$as_me:9348: result: $cf_cv_wchar_h_okay" >&5
9349 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9350
9351 if test $cf_cv_wchar_h_okay = no
9352 then
9353
9354 echo "$as_me:9354: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9355 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9356 cat >conftest.$ac_ext <<_ACEOF
9357 #line 9357 "configure"
9358 #include "confdefs.h"
9359 #include <sys/types.h>
9360
9361 int
9362 main ()
9363 {
9364
9365 #ifndef _XOPEN_SOURCE_EXTENDED
9366 make an error
9367 #endif
9368   ;
9369   return 0;
9370 }
9371 _ACEOF
9372 rm -f conftest.$ac_objext
9373 if { (eval echo "$as_me:9373: \"$ac_compile\"") >&5
9374   (eval $ac_compile) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); } &&
9378          { ac_try='test -s conftest.$ac_objext'
9379   { (eval echo "$as_me:9379: \"$ac_try\"") >&5
9380   (eval $ac_try) 2>&5
9381   ac_status=$?
9382   echo "$as_me:9382: \$? = $ac_status" >&5
9383   (exit $ac_status); }; }; then
9384   cf_result=no
9385 else
9386   echo "$as_me: failed program was:" >&5
9387 cat conftest.$ac_ext >&5
9388 cf_result=yes
9389 fi
9390 rm -f conftest.$ac_objext conftest.$ac_ext
9391 echo "$as_me:9391: result: $cf_result" >&5
9392 echo "${ECHO_T}$cf_result" >&6
9393
9394 if test "$cf_result" = yes ; then
9395         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9396 elif test "x" != "x" ; then
9397         echo "$as_me:9397: checking checking for compatible value versus " >&5
9398 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9399         cat >conftest.$ac_ext <<_ACEOF
9400 #line 9400 "configure"
9401 #include "confdefs.h"
9402 #include <sys/types.h>
9403
9404 int
9405 main ()
9406 {
9407
9408 #if _XOPEN_SOURCE_EXTENDED- < 0
9409 make an error
9410 #endif
9411   ;
9412   return 0;
9413 }
9414 _ACEOF
9415 rm -f conftest.$ac_objext
9416 if { (eval echo "$as_me:9416: \"$ac_compile\"") >&5
9417   (eval $ac_compile) 2>&5
9418   ac_status=$?
9419   echo "$as_me:9419: \$? = $ac_status" >&5
9420   (exit $ac_status); } &&
9421          { ac_try='test -s conftest.$ac_objext'
9422   { (eval echo "$as_me:9422: \"$ac_try\"") >&5
9423   (eval $ac_try) 2>&5
9424   ac_status=$?
9425   echo "$as_me:9425: \$? = $ac_status" >&5
9426   (exit $ac_status); }; }; then
9427   cf_result=yes
9428 else
9429   echo "$as_me: failed program was:" >&5
9430 cat conftest.$ac_ext >&5
9431 cf_result=no
9432 fi
9433 rm -f conftest.$ac_objext conftest.$ac_ext
9434         echo "$as_me:9434: result: $cf_result" >&5
9435 echo "${ECHO_T}$cf_result" >&6
9436         if test "$cf_result" = no ; then
9437                 # perhaps we can override it - try...
9438                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9439         fi
9440 fi
9441
9442 fi
9443
9444 echo "$as_me:9444: checking if wcwidth agrees graphics are single-width" >&5
9445 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9446 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9447   echo $ECHO_N "(cached) $ECHO_C" >&6
9448 else
9449
9450 cat >conftest.in <<CF_EOF
9451 -       VT100 symbols
9452 0x250c  upper left corner
9453 0x2514  lower left corner
9454 0x2510  upper right corner
9455 0x2518  lower right corner
9456 0x251c  tee pointing left
9457 0x2524  tee pointing right
9458 0x2534  tee pointing up
9459 0x252c  tee pointing down
9460 0x2500  horizontal line
9461 0x2502  vertical line
9462 0x253c  large plus or crossover
9463 0x23ba  scan line 1
9464 0x23bd  scan line 9
9465 0x25c6  diamond
9466 0x2592  checker board (stipple)
9467 0x00b0  degree symbol
9468 0x00b1  plus/minus
9469 0x00b7  bullet
9470 -       Teletype 5410v1 symbols
9471 0x2190  arrow pointing left
9472 0x2192  arrow pointing right
9473 0x2193  arrow pointing down
9474 0x2191  arrow pointing up
9475 0x2592  board of squares
9476 0x2603  lantern symbol
9477 0x25ae  solid square block
9478 -       these defaults were invented for ncurses
9479 0x23bb  scan line 3
9480 0x23bc  scan line 7
9481 0x2264  less-than-or-equal-to
9482 0x2265  greater-than-or-equal-to
9483 0x03c0  greek pi
9484 0x2260  not-equal
9485 0x00a3  pound-sterling symbol
9486 -       thick-line-drawing
9487 0x250f  upper left corner
9488 0x2517  lower left corner
9489 0x2513  upper right corner
9490 0x251b  lower right corner
9491 0x2523  tee pointing left
9492 0x252b  tee pointing right
9493 0x253b  tee pointing up
9494 0x2533  tee pointing down
9495 0x2501  horizontal line
9496 0x2503  vertical line
9497 0x254b  large plus or crossover
9498 -       double-line-drawing
9499 0x2554  upper left corner
9500 0x255a  lower left corner
9501 0x2557  upper right corner
9502 0x255d  lower right corner
9503 0x2563  tee pointing left
9504 0x2560  tee pointing right
9505 0x2569  tee pointing up
9506 0x2566  tee pointing down
9507 0x2550  horizontal line
9508 0x2551  vertical line
9509 0x256c  large plus or crossover
9510 CF_EOF
9511 if test "$cross_compiling" = yes; then
9512   cf_cv_wcwidth_graphics=unknown
9513 else
9514   cat >conftest.$ac_ext <<_ACEOF
9515 #line 9515 "configure"
9516 #include "confdefs.h"
9517
9518 #include <locale.h>
9519 #include <stdio.h>
9520 #include <wchar.h>
9521
9522 #define MY_LEN 80
9523
9524 int
9525 main(void)
9526 {
9527         FILE *fp;
9528         int value;
9529         char buffer[MY_LEN + 1];
9530         char notes[MY_LEN + 1];
9531         int totals = 0;
9532         int passed = 0;
9533
9534         if (setlocale(LC_ALL, "en_US.UTF8") ||
9535                 setlocale(LC_ALL, "en_US.UTF-8") ||
9536                 setlocale(LC_ALL, "en_US.utf8") ||
9537                 setlocale(LC_ALL, "en_US.utf-8")) {
9538                 if ((fp = fopen("conftest.in", "r")) != 0) {
9539                         while (fgets(buffer, MY_LEN, fp) != 0) {
9540                                 if (*buffer == '-') {
9541                                         fprintf(stderr, "\t%s", buffer);
9542                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9543                                         ++totals;
9544                                         if (wcwidth(value) == 1)
9545                                                 ++passed;
9546                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9547                                 } else {
9548                                         fprintf(stderr, "?\t%s", buffer);
9549                                 }
9550                         }
9551                 }
9552         }
9553         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9554         return (totals == passed) ? 0 : 1;
9555 }
9556
9557 _ACEOF
9558 rm -f conftest$ac_exeext
9559 if { (eval echo "$as_me:9559: \"$ac_link\"") >&5
9560   (eval $ac_link) 2>&5
9561   ac_status=$?
9562   echo "$as_me:9562: \$? = $ac_status" >&5
9563   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9564   { (eval echo "$as_me:9564: \"$ac_try\"") >&5
9565   (eval $ac_try) 2>&5
9566   ac_status=$?
9567   echo "$as_me:9567: \$? = $ac_status" >&5
9568   (exit $ac_status); }; }; then
9569   cf_cv_wcwidth_graphics=yes
9570 else
9571   echo "$as_me: program exited with status $ac_status" >&5
9572 echo "$as_me: failed program was:" >&5
9573 cat conftest.$ac_ext >&5
9574 cf_cv_wcwidth_graphics=no
9575 fi
9576 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9577 fi
9578
9579 fi
9580 echo "$as_me:9580: result: $cf_cv_wcwidth_graphics" >&5
9581 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9582
9583         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9584
9585         # with_overwrite=no
9586         NCURSES_CH_T=cchar_t
9587
9588 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9589 do
9590 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9591 echo "$as_me:9591: checking for $ac_func" >&5
9592 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9593 if eval "test \"\${$as_ac_var+set}\" = set"; then
9594   echo $ECHO_N "(cached) $ECHO_C" >&6
9595 else
9596   cat >conftest.$ac_ext <<_ACEOF
9597 #line 9597 "configure"
9598 #include "confdefs.h"
9599 /* System header to define __stub macros and hopefully few prototypes,
9600     which can conflict with char $ac_func (); below.  */
9601 #include <assert.h>
9602 /* Override any gcc2 internal prototype to avoid an error.  */
9603 #ifdef __cplusplus
9604 extern "C"
9605 #endif
9606 /* We use char because int might match the return type of a gcc2
9607    builtin and then its argument prototype would still apply.  */
9608 char $ac_func ();
9609 char (*f) ();
9610
9611 int
9612 main ()
9613 {
9614 /* The GNU C library defines this for functions which it implements
9615     to always fail with ENOSYS.  Some functions are actually named
9616     something starting with __ and the normal name is an alias.  */
9617 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9618 choke me
9619 #else
9620 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9621 #endif
9622
9623   ;
9624   return 0;
9625 }
9626 _ACEOF
9627 rm -f conftest.$ac_objext conftest$ac_exeext
9628 if { (eval echo "$as_me:9628: \"$ac_link\"") >&5
9629   (eval $ac_link) 2>&5
9630   ac_status=$?
9631   echo "$as_me:9631: \$? = $ac_status" >&5
9632   (exit $ac_status); } &&
9633          { ac_try='test -s conftest$ac_exeext'
9634   { (eval echo "$as_me:9634: \"$ac_try\"") >&5
9635   (eval $ac_try) 2>&5
9636   ac_status=$?
9637   echo "$as_me:9637: \$? = $ac_status" >&5
9638   (exit $ac_status); }; }; then
9639   eval "$as_ac_var=yes"
9640 else
9641   echo "$as_me: failed program was:" >&5
9642 cat conftest.$ac_ext >&5
9643 eval "$as_ac_var=no"
9644 fi
9645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9646 fi
9647 echo "$as_me:9647: result: `eval echo '${'$as_ac_var'}'`" >&5
9648 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9649 if test `eval echo '${'$as_ac_var'}'` = yes; then
9650   cat >>confdefs.h <<EOF
9651 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9652 EOF
9653
9654 fi
9655 done
9656
9657         if test "x$ac_cv_func_putwc" != xyes ; then
9658
9659 echo "$as_me:9659: checking for multibyte character support" >&5
9660 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9661 if test "${cf_cv_utf8_lib+set}" = set; then
9662   echo $ECHO_N "(cached) $ECHO_C" >&6
9663 else
9664
9665         cf_save_LIBS="$LIBS"
9666         cat >conftest.$ac_ext <<_ACEOF
9667 #line 9667 "configure"
9668 #include "confdefs.h"
9669
9670 #include <stdlib.h>
9671 int
9672 main ()
9673 {
9674 putwc(0,0);
9675   ;
9676   return 0;
9677 }
9678 _ACEOF
9679 rm -f conftest.$ac_objext conftest$ac_exeext
9680 if { (eval echo "$as_me:9680: \"$ac_link\"") >&5
9681   (eval $ac_link) 2>&5
9682   ac_status=$?
9683   echo "$as_me:9683: \$? = $ac_status" >&5
9684   (exit $ac_status); } &&
9685          { ac_try='test -s conftest$ac_exeext'
9686   { (eval echo "$as_me:9686: \"$ac_try\"") >&5
9687   (eval $ac_try) 2>&5
9688   ac_status=$?
9689   echo "$as_me:9689: \$? = $ac_status" >&5
9690   (exit $ac_status); }; }; then
9691   cf_cv_utf8_lib=yes
9692 else
9693   echo "$as_me: failed program was:" >&5
9694 cat conftest.$ac_ext >&5
9695
9696 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9697 # will be set on completion of the AC_TRY_LINK below.
9698 cf_cv_header_path_utf8=
9699 cf_cv_library_path_utf8=
9700
9701 echo "${as_me:-configure}:9701: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9702
9703 cf_save_LIBS="$LIBS"
9704
9705 cat >conftest.$ac_ext <<_ACEOF
9706 #line 9706 "configure"
9707 #include "confdefs.h"
9708
9709 #include <libutf8.h>
9710 int
9711 main ()
9712 {
9713 putwc(0,0);
9714   ;
9715   return 0;
9716 }
9717 _ACEOF
9718 rm -f conftest.$ac_objext conftest$ac_exeext
9719 if { (eval echo "$as_me:9719: \"$ac_link\"") >&5
9720   (eval $ac_link) 2>&5
9721   ac_status=$?
9722   echo "$as_me:9722: \$? = $ac_status" >&5
9723   (exit $ac_status); } &&
9724          { ac_try='test -s conftest$ac_exeext'
9725   { (eval echo "$as_me:9725: \"$ac_try\"") >&5
9726   (eval $ac_try) 2>&5
9727   ac_status=$?
9728   echo "$as_me:9728: \$? = $ac_status" >&5
9729   (exit $ac_status); }; }; then
9730
9731         cf_cv_find_linkage_utf8=yes
9732         cf_cv_header_path_utf8=/usr/include
9733         cf_cv_library_path_utf8=/usr/lib
9734
9735 else
9736   echo "$as_me: failed program was:" >&5
9737 cat conftest.$ac_ext >&5
9738
9739 LIBS="-lutf8  $cf_save_LIBS"
9740
9741 cat >conftest.$ac_ext <<_ACEOF
9742 #line 9742 "configure"
9743 #include "confdefs.h"
9744
9745 #include <libutf8.h>
9746 int
9747 main ()
9748 {
9749 putwc(0,0);
9750   ;
9751   return 0;
9752 }
9753 _ACEOF
9754 rm -f conftest.$ac_objext conftest$ac_exeext
9755 if { (eval echo "$as_me:9755: \"$ac_link\"") >&5
9756   (eval $ac_link) 2>&5
9757   ac_status=$?
9758   echo "$as_me:9758: \$? = $ac_status" >&5
9759   (exit $ac_status); } &&
9760          { ac_try='test -s conftest$ac_exeext'
9761   { (eval echo "$as_me:9761: \"$ac_try\"") >&5
9762   (eval $ac_try) 2>&5
9763   ac_status=$?
9764   echo "$as_me:9764: \$? = $ac_status" >&5
9765   (exit $ac_status); }; }; then
9766
9767         cf_cv_find_linkage_utf8=yes
9768         cf_cv_header_path_utf8=/usr/include
9769         cf_cv_library_path_utf8=/usr/lib
9770         cf_cv_library_file_utf8="-lutf8"
9771
9772 else
9773   echo "$as_me: failed program was:" >&5
9774 cat conftest.$ac_ext >&5
9775
9776         cf_cv_find_linkage_utf8=no
9777         LIBS="$cf_save_LIBS"
9778
9779         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9780
9781 echo "${as_me:-configure}:9781: testing find linkage for utf8 library ..." 1>&5
9782
9783 echo "${as_me:-configure}:9783: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9784
9785         cf_save_CPPFLAGS="$CPPFLAGS"
9786         cf_test_CPPFLAGS="$CPPFLAGS"
9787
9788 cf_search=
9789
9790 # collect the current set of include-directories from compiler flags
9791 cf_header_path_list=""
9792 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9793         for cf_header_path in $CPPFLAGS $CFLAGS
9794         do
9795                 case $cf_header_path in
9796                 (-I*)
9797                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9798
9799 test "x$cf_header_path" != "xNONE" && \
9800 test -d "$cf_header_path" && \
9801  {
9802         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9803         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9804         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9805         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9806         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9807         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9808 }
9809
9810                         cf_header_path_list="$cf_header_path_list $cf_search"
9811                         ;;
9812                 esac
9813         done
9814 fi
9815
9816 # add the variations for the package we are looking for
9817
9818 cf_search=
9819
9820 test "x$prefix" != "xNONE" && \
9821 test -d "$prefix" && \
9822  {
9823         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9824         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9825         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9826         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9827         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9828         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9829 }
9830
9831 for cf_subdir_prefix in \
9832         /usr \
9833         /usr/local \
9834         /usr/pkg \
9835         /opt \
9836         /opt/local \
9837         $HOME
9838 do
9839
9840 test "x$cf_subdir_prefix" != "x$prefix" && \
9841 test -d "$cf_subdir_prefix" && \
9842 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9843         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9844         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9845         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9846         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9847         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9848         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9849 }
9850
9851 done
9852
9853 test "$includedir" != NONE && \
9854 test "$includedir" != "/usr/include" && \
9855 test -d "$includedir" && {
9856         test -d $includedir &&    cf_search="$cf_search $includedir"
9857         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9858 }
9859
9860 test "$oldincludedir" != NONE && \
9861 test "$oldincludedir" != "/usr/include" && \
9862 test -d "$oldincludedir" && {
9863         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9864         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9865 }
9866
9867 cf_search="$cf_search $cf_header_path_list"
9868
9869         for cf_cv_header_path_utf8 in $cf_search
9870         do
9871                 if test -d $cf_cv_header_path_utf8 ; then
9872                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9873
9874 echo "${as_me:-configure}:9874: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9875
9876                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9877                         cat >conftest.$ac_ext <<_ACEOF
9878 #line 9878 "configure"
9879 #include "confdefs.h"
9880
9881 #include <libutf8.h>
9882 int
9883 main ()
9884 {
9885 putwc(0,0);
9886   ;
9887   return 0;
9888 }
9889 _ACEOF
9890 rm -f conftest.$ac_objext
9891 if { (eval echo "$as_me:9891: \"$ac_compile\"") >&5
9892   (eval $ac_compile) 2>&5
9893   ac_status=$?
9894   echo "$as_me:9894: \$? = $ac_status" >&5
9895   (exit $ac_status); } &&
9896          { ac_try='test -s conftest.$ac_objext'
9897   { (eval echo "$as_me:9897: \"$ac_try\"") >&5
9898   (eval $ac_try) 2>&5
9899   ac_status=$?
9900   echo "$as_me:9900: \$? = $ac_status" >&5
9901   (exit $ac_status); }; }; then
9902
9903                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9904
9905 echo "${as_me:-configure}:9905: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9906
9907                                 cf_cv_find_linkage_utf8=maybe
9908                                 cf_test_CPPFLAGS="$CPPFLAGS"
9909                                 break
9910 else
9911   echo "$as_me: failed program was:" >&5
9912 cat conftest.$ac_ext >&5
9913
9914                                 CPPFLAGS="$cf_save_CPPFLAGS"
9915
9916 fi
9917 rm -f conftest.$ac_objext conftest.$ac_ext
9918                 fi
9919         done
9920
9921         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9922
9923 echo "${as_me:-configure}:9923: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9924
9925                 cf_save_LIBS="$LIBS"
9926                 cf_save_LDFLAGS="$LDFLAGS"
9927
9928                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9929
9930 cf_search=
9931 cf_library_path_list=""
9932 if test -n "${LDFLAGS}${LIBS}" ; then
9933         for cf_library_path in $LDFLAGS $LIBS
9934         do
9935                 case $cf_library_path in
9936                 (-L*)
9937                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9938
9939 test "x$cf_library_path" != "xNONE" && \
9940 test -d "$cf_library_path" && \
9941  {
9942         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9943         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9944         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9945         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9946         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9947         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9948 }
9949
9950                         cf_library_path_list="$cf_library_path_list $cf_search"
9951                         ;;
9952                 esac
9953         done
9954 fi
9955
9956 cf_search=
9957
9958 test "x$prefix" != "xNONE" && \
9959 test -d "$prefix" && \
9960  {
9961         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9962         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9963         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9964         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9965         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9966         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9967 }
9968
9969 for cf_subdir_prefix in \
9970         /usr \
9971         /usr/local \
9972         /usr/pkg \
9973         /opt \
9974         /opt/local \
9975         $HOME
9976 do
9977
9978 test "x$cf_subdir_prefix" != "x$prefix" && \
9979 test -d "$cf_subdir_prefix" && \
9980 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9981         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9982         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9983         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9984         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9985         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9986         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9987 }
9988
9989 done
9990
9991 cf_search="$cf_library_path_list $cf_search"
9992
9993                         for cf_cv_library_path_utf8 in $cf_search
9994                         do
9995                                 if test -d $cf_cv_library_path_utf8 ; then
9996                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9997
9998 echo "${as_me:-configure}:9998: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9999
10000                                         CPPFLAGS="$cf_test_CPPFLAGS"
10001                                         LIBS="-lutf8  $cf_save_LIBS"
10002                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10003                                         cat >conftest.$ac_ext <<_ACEOF
10004 #line 10004 "configure"
10005 #include "confdefs.h"
10006
10007 #include <libutf8.h>
10008 int
10009 main ()
10010 {
10011 putwc(0,0);
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f conftest.$ac_objext conftest$ac_exeext
10017 if { (eval echo "$as_me:10017: \"$ac_link\"") >&5
10018   (eval $ac_link) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); } &&
10022          { ac_try='test -s conftest$ac_exeext'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); }; }; then
10028
10029                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10030
10031 echo "${as_me:-configure}:10031: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10032
10033                                         cf_cv_find_linkage_utf8=yes
10034                                         cf_cv_library_file_utf8="-lutf8"
10035                                         break
10036 else
10037   echo "$as_me: failed program was:" >&5
10038 cat conftest.$ac_ext >&5
10039
10040                                         CPPFLAGS="$cf_save_CPPFLAGS"
10041                                         LIBS="$cf_save_LIBS"
10042                                         LDFLAGS="$cf_save_LDFLAGS"
10043
10044 fi
10045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10046                                 fi
10047                         done
10048                         CPPFLAGS="$cf_save_CPPFLAGS"
10049                         LDFLAGS="$cf_save_LDFLAGS"
10050                 fi
10051
10052         else
10053                 cf_cv_find_linkage_utf8=no
10054         fi
10055
10056 fi
10057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10058
10059 fi
10060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10061
10062 LIBS="$cf_save_LIBS"
10063
10064 if test "$cf_cv_find_linkage_utf8" = yes ; then
10065 cf_cv_utf8_lib=add-on
10066 else
10067 cf_cv_utf8_lib=no
10068 fi
10069
10070 fi
10071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10072 fi
10073 echo "$as_me:10073: result: $cf_cv_utf8_lib" >&5
10074 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10075
10076 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10077 # ncurses/ncursesw:
10078 if test "$cf_cv_utf8_lib" = "add-on" ; then
10079
10080 cat >>confdefs.h <<\EOF
10081 #define HAVE_LIBUTF8_H 1
10082 EOF
10083
10084 if test -n "$cf_cv_header_path_utf8" ; then
10085   for cf_add_incdir in $cf_cv_header_path_utf8
10086   do
10087         while test $cf_add_incdir != /usr/include
10088         do
10089           if test -d $cf_add_incdir
10090           then
10091                 cf_have_incdir=no
10092                 if test -n "$CFLAGS$CPPFLAGS" ; then
10093                   # a loop is needed to ensure we can add subdirs of existing dirs
10094                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10095                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10096                           cf_have_incdir=yes; break
10097                         fi
10098                   done
10099                 fi
10100
10101                 if test "$cf_have_incdir" = no ; then
10102                   if test "$cf_add_incdir" = /usr/local/include ; then
10103                         if test "$GCC" = yes
10104                         then
10105                           cf_save_CPPFLAGS=$CPPFLAGS
10106                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10107                           cat >conftest.$ac_ext <<_ACEOF
10108 #line 10108 "configure"
10109 #include "confdefs.h"
10110 #include <stdio.h>
10111 int
10112 main ()
10113 {
10114 printf("Hello")
10115   ;
10116   return 0;
10117 }
10118 _ACEOF
10119 rm -f conftest.$ac_objext
10120 if { (eval echo "$as_me:10120: \"$ac_compile\"") >&5
10121   (eval $ac_compile) 2>&5
10122   ac_status=$?
10123   echo "$as_me:10123: \$? = $ac_status" >&5
10124   (exit $ac_status); } &&
10125          { ac_try='test -s conftest.$ac_objext'
10126   { (eval echo "$as_me:10126: \"$ac_try\"") >&5
10127   (eval $ac_try) 2>&5
10128   ac_status=$?
10129   echo "$as_me:10129: \$? = $ac_status" >&5
10130   (exit $ac_status); }; }; then
10131   :
10132 else
10133   echo "$as_me: failed program was:" >&5
10134 cat conftest.$ac_ext >&5
10135 cf_have_incdir=yes
10136 fi
10137 rm -f conftest.$ac_objext conftest.$ac_ext
10138                           CPPFLAGS=$cf_save_CPPFLAGS
10139                         fi
10140                   fi
10141                 fi
10142
10143                 if test "$cf_have_incdir" = no ; then
10144                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10145
10146 echo "${as_me:-configure}:10146: testing adding $cf_add_incdir to include-path ..." 1>&5
10147
10148                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10149
10150                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10151                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10152                   cf_add_incdir="$cf_top_incdir"
10153                 else
10154                   break
10155                 fi
10156           else
10157                 break
10158           fi
10159         done
10160   done
10161 fi
10162
10163 if test -n "$cf_cv_library_path_utf8" ; then
10164         for cf_add_libdir in $cf_cv_library_path_utf8
10165         do
10166                 if test $cf_add_libdir = /usr/lib ; then
10167                         :
10168                 elif test -d $cf_add_libdir
10169                 then
10170                         cf_have_libdir=no
10171                         if test -n "$LDFLAGS$LIBS" ; then
10172                                 # a loop is needed to ensure we can add subdirs of existing dirs
10173                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10174                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10175                                                 cf_have_libdir=yes; break
10176                                         fi
10177                                 done
10178                         fi
10179                         if test "$cf_have_libdir" = no ; then
10180                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10181
10182 echo "${as_me:-configure}:10182: testing adding $cf_add_libdir to library-path ..." 1>&5
10183
10184                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10185                         fi
10186                 fi
10187         done
10188 fi
10189
10190 cf_add_libs="$cf_cv_library_file_utf8"
10191 # Filter out duplicates - this happens with badly-designed ".pc" files...
10192 for cf_add_1lib in $LIBS
10193 do
10194         for cf_add_2lib in $cf_add_libs
10195         do
10196                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10197                 then
10198                         cf_add_1lib=
10199                         break
10200                 fi
10201         done
10202         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10203 done
10204 LIBS="$cf_add_libs"
10205
10206 fi
10207
10208                 if test "$cf_cv_utf8_lib" != no ; then
10209                         NCURSES_LIBUTF8=1
10210                 fi
10211         fi
10212
10213 # This is needed on Tru64 5.0 to declare mbstate_t
10214 echo "$as_me:10214: checking if we must include wchar.h to declare mbstate_t" >&5
10215 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10216 if test "${cf_cv_mbstate_t+set}" = set; then
10217   echo $ECHO_N "(cached) $ECHO_C" >&6
10218 else
10219
10220 cat >conftest.$ac_ext <<_ACEOF
10221 #line 10221 "configure"
10222 #include "confdefs.h"
10223
10224 #include <stdlib.h>
10225 #include <stdarg.h>
10226 #include <stdio.h>
10227 #ifdef HAVE_LIBUTF8_H
10228 #include <libutf8.h>
10229 #endif
10230 int
10231 main ()
10232 {
10233 mbstate_t state
10234   ;
10235   return 0;
10236 }
10237 _ACEOF
10238 rm -f conftest.$ac_objext
10239 if { (eval echo "$as_me:10239: \"$ac_compile\"") >&5
10240   (eval $ac_compile) 2>&5
10241   ac_status=$?
10242   echo "$as_me:10242: \$? = $ac_status" >&5
10243   (exit $ac_status); } &&
10244          { ac_try='test -s conftest.$ac_objext'
10245   { (eval echo "$as_me:10245: \"$ac_try\"") >&5
10246   (eval $ac_try) 2>&5
10247   ac_status=$?
10248   echo "$as_me:10248: \$? = $ac_status" >&5
10249   (exit $ac_status); }; }; then
10250   cf_cv_mbstate_t=no
10251 else
10252   echo "$as_me: failed program was:" >&5
10253 cat conftest.$ac_ext >&5
10254 cat >conftest.$ac_ext <<_ACEOF
10255 #line 10255 "configure"
10256 #include "confdefs.h"
10257
10258 #include <stdlib.h>
10259 #include <stdarg.h>
10260 #include <stdio.h>
10261 #include <wchar.h>
10262 #ifdef HAVE_LIBUTF8_H
10263 #include <libutf8.h>
10264 #endif
10265 int
10266 main ()
10267 {
10268 mbstate_t value
10269   ;
10270   return 0;
10271 }
10272 _ACEOF
10273 rm -f conftest.$ac_objext
10274 if { (eval echo "$as_me:10274: \"$ac_compile\"") >&5
10275   (eval $ac_compile) 2>&5
10276   ac_status=$?
10277   echo "$as_me:10277: \$? = $ac_status" >&5
10278   (exit $ac_status); } &&
10279          { ac_try='test -s conftest.$ac_objext'
10280   { (eval echo "$as_me:10280: \"$ac_try\"") >&5
10281   (eval $ac_try) 2>&5
10282   ac_status=$?
10283   echo "$as_me:10283: \$? = $ac_status" >&5
10284   (exit $ac_status); }; }; then
10285   cf_cv_mbstate_t=yes
10286 else
10287   echo "$as_me: failed program was:" >&5
10288 cat conftest.$ac_ext >&5
10289 cf_cv_mbstate_t=unknown
10290 fi
10291 rm -f conftest.$ac_objext conftest.$ac_ext
10292 fi
10293 rm -f conftest.$ac_objext conftest.$ac_ext
10294 fi
10295 echo "$as_me:10295: result: $cf_cv_mbstate_t" >&5
10296 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10297
10298 if test "$cf_cv_mbstate_t" = yes ; then
10299
10300 cat >>confdefs.h <<\EOF
10301 #define NEED_WCHAR_H 1
10302 EOF
10303
10304         NEED_WCHAR_H=1
10305 fi
10306
10307 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10308 if test "$cf_cv_mbstate_t" = unknown ; then
10309         NCURSES_MBSTATE_T=1
10310 fi
10311
10312 # This is needed on Tru64 5.0 to declare wchar_t
10313 echo "$as_me:10313: checking if we must include wchar.h to declare wchar_t" >&5
10314 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10315 if test "${cf_cv_wchar_t+set}" = set; then
10316   echo $ECHO_N "(cached) $ECHO_C" >&6
10317 else
10318
10319 cat >conftest.$ac_ext <<_ACEOF
10320 #line 10320 "configure"
10321 #include "confdefs.h"
10322
10323 #include <stdlib.h>
10324 #include <stdarg.h>
10325 #include <stdio.h>
10326 #ifdef HAVE_LIBUTF8_H
10327 #include <libutf8.h>
10328 #endif
10329 int
10330 main ()
10331 {
10332 wchar_t state
10333   ;
10334   return 0;
10335 }
10336 _ACEOF
10337 rm -f conftest.$ac_objext
10338 if { (eval echo "$as_me:10338: \"$ac_compile\"") >&5
10339   (eval $ac_compile) 2>&5
10340   ac_status=$?
10341   echo "$as_me:10341: \$? = $ac_status" >&5
10342   (exit $ac_status); } &&
10343          { ac_try='test -s conftest.$ac_objext'
10344   { (eval echo "$as_me:10344: \"$ac_try\"") >&5
10345   (eval $ac_try) 2>&5
10346   ac_status=$?
10347   echo "$as_me:10347: \$? = $ac_status" >&5
10348   (exit $ac_status); }; }; then
10349   cf_cv_wchar_t=no
10350 else
10351   echo "$as_me: failed program was:" >&5
10352 cat conftest.$ac_ext >&5
10353 cat >conftest.$ac_ext <<_ACEOF
10354 #line 10354 "configure"
10355 #include "confdefs.h"
10356
10357 #include <stdlib.h>
10358 #include <stdarg.h>
10359 #include <stdio.h>
10360 #include <wchar.h>
10361 #ifdef HAVE_LIBUTF8_H
10362 #include <libutf8.h>
10363 #endif
10364 int
10365 main ()
10366 {
10367 wchar_t value
10368   ;
10369   return 0;
10370 }
10371 _ACEOF
10372 rm -f conftest.$ac_objext
10373 if { (eval echo "$as_me:10373: \"$ac_compile\"") >&5
10374   (eval $ac_compile) 2>&5
10375   ac_status=$?
10376   echo "$as_me:10376: \$? = $ac_status" >&5
10377   (exit $ac_status); } &&
10378          { ac_try='test -s conftest.$ac_objext'
10379   { (eval echo "$as_me:10379: \"$ac_try\"") >&5
10380   (eval $ac_try) 2>&5
10381   ac_status=$?
10382   echo "$as_me:10382: \$? = $ac_status" >&5
10383   (exit $ac_status); }; }; then
10384   cf_cv_wchar_t=yes
10385 else
10386   echo "$as_me: failed program was:" >&5
10387 cat conftest.$ac_ext >&5
10388 cf_cv_wchar_t=unknown
10389 fi
10390 rm -f conftest.$ac_objext conftest.$ac_ext
10391 fi
10392 rm -f conftest.$ac_objext conftest.$ac_ext
10393 fi
10394 echo "$as_me:10394: result: $cf_cv_wchar_t" >&5
10395 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10396
10397 if test "$cf_cv_wchar_t" = yes ; then
10398
10399 cat >>confdefs.h <<\EOF
10400 #define NEED_WCHAR_H 1
10401 EOF
10402
10403         NEED_WCHAR_H=1
10404 fi
10405
10406 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10407 if test "$cf_cv_wchar_t" = unknown ; then
10408         NCURSES_WCHAR_T=1
10409 fi
10410
10411 # if we find wchar_t in either place, use substitution to provide a fallback.
10412 if test "$cf_cv_wchar_t" != unknown ; then
10413         NCURSES_OK_WCHAR_T=1
10414 fi
10415
10416 # This is needed on Tru64 5.0 to declare wint_t
10417 echo "$as_me:10417: checking if we must include wchar.h to declare wint_t" >&5
10418 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10419 if test "${cf_cv_wint_t+set}" = set; then
10420   echo $ECHO_N "(cached) $ECHO_C" >&6
10421 else
10422
10423 cat >conftest.$ac_ext <<_ACEOF
10424 #line 10424 "configure"
10425 #include "confdefs.h"
10426
10427 #include <stdlib.h>
10428 #include <stdarg.h>
10429 #include <stdio.h>
10430 #ifdef HAVE_LIBUTF8_H
10431 #include <libutf8.h>
10432 #endif
10433 int
10434 main ()
10435 {
10436 wint_t state
10437   ;
10438   return 0;
10439 }
10440 _ACEOF
10441 rm -f conftest.$ac_objext
10442 if { (eval echo "$as_me:10442: \"$ac_compile\"") >&5
10443   (eval $ac_compile) 2>&5
10444   ac_status=$?
10445   echo "$as_me:10445: \$? = $ac_status" >&5
10446   (exit $ac_status); } &&
10447          { ac_try='test -s conftest.$ac_objext'
10448   { (eval echo "$as_me:10448: \"$ac_try\"") >&5
10449   (eval $ac_try) 2>&5
10450   ac_status=$?
10451   echo "$as_me:10451: \$? = $ac_status" >&5
10452   (exit $ac_status); }; }; then
10453   cf_cv_wint_t=no
10454 else
10455   echo "$as_me: failed program was:" >&5
10456 cat conftest.$ac_ext >&5
10457 cat >conftest.$ac_ext <<_ACEOF
10458 #line 10458 "configure"
10459 #include "confdefs.h"
10460
10461 #include <stdlib.h>
10462 #include <stdarg.h>
10463 #include <stdio.h>
10464 #include <wchar.h>
10465 #ifdef HAVE_LIBUTF8_H
10466 #include <libutf8.h>
10467 #endif
10468 int
10469 main ()
10470 {
10471 wint_t value
10472   ;
10473   return 0;
10474 }
10475 _ACEOF
10476 rm -f conftest.$ac_objext
10477 if { (eval echo "$as_me:10477: \"$ac_compile\"") >&5
10478   (eval $ac_compile) 2>&5
10479   ac_status=$?
10480   echo "$as_me:10480: \$? = $ac_status" >&5
10481   (exit $ac_status); } &&
10482          { ac_try='test -s conftest.$ac_objext'
10483   { (eval echo "$as_me:10483: \"$ac_try\"") >&5
10484   (eval $ac_try) 2>&5
10485   ac_status=$?
10486   echo "$as_me:10486: \$? = $ac_status" >&5
10487   (exit $ac_status); }; }; then
10488   cf_cv_wint_t=yes
10489 else
10490   echo "$as_me: failed program was:" >&5
10491 cat conftest.$ac_ext >&5
10492 cf_cv_wint_t=unknown
10493 fi
10494 rm -f conftest.$ac_objext conftest.$ac_ext
10495 fi
10496 rm -f conftest.$ac_objext conftest.$ac_ext
10497 fi
10498 echo "$as_me:10498: result: $cf_cv_wint_t" >&5
10499 echo "${ECHO_T}$cf_cv_wint_t" >&6
10500
10501 if test "$cf_cv_wint_t" = yes ; then
10502
10503 cat >>confdefs.h <<\EOF
10504 #define NEED_WCHAR_H 1
10505 EOF
10506
10507         NEED_WCHAR_H=1
10508 fi
10509
10510 # if we do not find wint_t in either place, use substitution to provide a fallback.
10511 if test "$cf_cv_wint_t" = unknown ; then
10512         NCURSES_WINT_T=1
10513 fi
10514
10515 # if we find wint_t in either place, use substitution to provide a fallback.
10516 if test "$cf_cv_wint_t" != unknown ; then
10517         NCURSES_OK_WINT_T=1
10518 fi
10519
10520         if test "$NCURSES_MBSTATE_T" != 0; then
10521
10522 cat >>confdefs.h <<\EOF
10523 #define NEED_MBSTATE_T_DEF 1
10524 EOF
10525
10526         fi
10527 fi
10528
10529 ###   use option --disable-lp64 to allow long chtype
10530 echo "$as_me:10530: checking whether to enable _LP64 definition in curses.h" >&5
10531 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10532
10533 # Check whether --enable-lp64 or --disable-lp64 was given.
10534 if test "${enable_lp64+set}" = set; then
10535   enableval="$enable_lp64"
10536   with_lp64=$enableval
10537 else
10538   with_lp64=$cf_dft_with_lp64
10539 fi;
10540 echo "$as_me:10540: result: $with_lp64" >&5
10541 echo "${ECHO_T}$with_lp64" >&6
10542
10543 if test "x$with_lp64" = xyes ; then
10544         cf_cv_enable_lp64=1
10545 else
10546         cf_cv_enable_lp64=0
10547 fi
10548
10549 # Check whether --enable-largefile or --disable-largefile was given.
10550 if test "${enable_largefile+set}" = set; then
10551   enableval="$enable_largefile"
10552
10553 fi;
10554 if test "$enable_largefile" != no; then
10555
10556   echo "$as_me:10556: checking for special C compiler options needed for large files" >&5
10557 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10558 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10559   echo $ECHO_N "(cached) $ECHO_C" >&6
10560 else
10561   ac_cv_sys_largefile_CC=no
10562      if test "$GCC" != yes; then
10563        ac_save_CC=$CC
10564        while :; do
10565          # IRIX 6.2 and later do not support large files by default,
10566          # so use the C compiler's -n32 option if that helps.
10567          cat >conftest.$ac_ext <<_ACEOF
10568 #line 10568 "configure"
10569 #include "confdefs.h"
10570 #include <sys/types.h>
10571  /* Check that off_t can represent 2**63 - 1 correctly.
10572     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10573     since some C++ compilers masquerading as C compilers
10574     incorrectly reject 9223372036854775807.  */
10575 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10576   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10577                        && LARGE_OFF_T % 2147483647 == 1)
10578                       ? 1 : -1];
10579 int
10580 main ()
10581 {
10582
10583   ;
10584   return 0;
10585 }
10586 _ACEOF
10587          rm -f conftest.$ac_objext
10588 if { (eval echo "$as_me:10588: \"$ac_compile\"") >&5
10589   (eval $ac_compile) 2>&5
10590   ac_status=$?
10591   echo "$as_me:10591: \$? = $ac_status" >&5
10592   (exit $ac_status); } &&
10593          { ac_try='test -s conftest.$ac_objext'
10594   { (eval echo "$as_me:10594: \"$ac_try\"") >&5
10595   (eval $ac_try) 2>&5
10596   ac_status=$?
10597   echo "$as_me:10597: \$? = $ac_status" >&5
10598   (exit $ac_status); }; }; then
10599   break
10600 else
10601   echo "$as_me: failed program was:" >&5
10602 cat conftest.$ac_ext >&5
10603 fi
10604 rm -f conftest.$ac_objext
10605          CC="$CC -n32"
10606          rm -f conftest.$ac_objext
10607 if { (eval echo "$as_me:10607: \"$ac_compile\"") >&5
10608   (eval $ac_compile) 2>&5
10609   ac_status=$?
10610   echo "$as_me:10610: \$? = $ac_status" >&5
10611   (exit $ac_status); } &&
10612          { ac_try='test -s conftest.$ac_objext'
10613   { (eval echo "$as_me:10613: \"$ac_try\"") >&5
10614   (eval $ac_try) 2>&5
10615   ac_status=$?
10616   echo "$as_me:10616: \$? = $ac_status" >&5
10617   (exit $ac_status); }; }; then
10618   ac_cv_sys_largefile_CC=' -n32'; break
10619 else
10620   echo "$as_me: failed program was:" >&5
10621 cat conftest.$ac_ext >&5
10622 fi
10623 rm -f conftest.$ac_objext
10624          break
10625        done
10626        CC=$ac_save_CC
10627        rm -f conftest.$ac_ext
10628     fi
10629 fi
10630 echo "$as_me:10630: result: $ac_cv_sys_largefile_CC" >&5
10631 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10632   if test "$ac_cv_sys_largefile_CC" != no; then
10633     CC=$CC$ac_cv_sys_largefile_CC
10634   fi
10635
10636   echo "$as_me:10636: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10637 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10638 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10639   echo $ECHO_N "(cached) $ECHO_C" >&6
10640 else
10641   while :; do
10642   ac_cv_sys_file_offset_bits=no
10643   cat >conftest.$ac_ext <<_ACEOF
10644 #line 10644 "configure"
10645 #include "confdefs.h"
10646 #include <sys/types.h>
10647  /* Check that off_t can represent 2**63 - 1 correctly.
10648     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10649     since some C++ compilers masquerading as C compilers
10650     incorrectly reject 9223372036854775807.  */
10651 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10652   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10653                        && LARGE_OFF_T % 2147483647 == 1)
10654                       ? 1 : -1];
10655 int
10656 main ()
10657 {
10658
10659   ;
10660   return 0;
10661 }
10662 _ACEOF
10663 rm -f conftest.$ac_objext
10664 if { (eval echo "$as_me:10664: \"$ac_compile\"") >&5
10665   (eval $ac_compile) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit $ac_status); } &&
10669          { ac_try='test -s conftest.$ac_objext'
10670   { (eval echo "$as_me:10670: \"$ac_try\"") >&5
10671   (eval $ac_try) 2>&5
10672   ac_status=$?
10673   echo "$as_me:10673: \$? = $ac_status" >&5
10674   (exit $ac_status); }; }; then
10675   break
10676 else
10677   echo "$as_me: failed program was:" >&5
10678 cat conftest.$ac_ext >&5
10679 fi
10680 rm -f conftest.$ac_objext conftest.$ac_ext
10681   cat >conftest.$ac_ext <<_ACEOF
10682 #line 10682 "configure"
10683 #include "confdefs.h"
10684 #define _FILE_OFFSET_BITS 64
10685 #include <sys/types.h>
10686  /* Check that off_t can represent 2**63 - 1 correctly.
10687     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10688     since some C++ compilers masquerading as C compilers
10689     incorrectly reject 9223372036854775807.  */
10690 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10691   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10692                        && LARGE_OFF_T % 2147483647 == 1)
10693                       ? 1 : -1];
10694 int
10695 main ()
10696 {
10697
10698   ;
10699   return 0;
10700 }
10701 _ACEOF
10702 rm -f conftest.$ac_objext
10703 if { (eval echo "$as_me:10703: \"$ac_compile\"") >&5
10704   (eval $ac_compile) 2>&5
10705   ac_status=$?
10706   echo "$as_me:10706: \$? = $ac_status" >&5
10707   (exit $ac_status); } &&
10708          { ac_try='test -s conftest.$ac_objext'
10709   { (eval echo "$as_me:10709: \"$ac_try\"") >&5
10710   (eval $ac_try) 2>&5
10711   ac_status=$?
10712   echo "$as_me:10712: \$? = $ac_status" >&5
10713   (exit $ac_status); }; }; then
10714   ac_cv_sys_file_offset_bits=64; break
10715 else
10716   echo "$as_me: failed program was:" >&5
10717 cat conftest.$ac_ext >&5
10718 fi
10719 rm -f conftest.$ac_objext conftest.$ac_ext
10720   break
10721 done
10722 fi
10723 echo "$as_me:10723: result: $ac_cv_sys_file_offset_bits" >&5
10724 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10725 if test "$ac_cv_sys_file_offset_bits" != no; then
10726
10727 cat >>confdefs.h <<EOF
10728 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10729 EOF
10730
10731 fi
10732 rm -rf conftest*
10733   echo "$as_me:10733: checking for _LARGE_FILES value needed for large files" >&5
10734 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10735 if test "${ac_cv_sys_large_files+set}" = set; then
10736   echo $ECHO_N "(cached) $ECHO_C" >&6
10737 else
10738   while :; do
10739   ac_cv_sys_large_files=no
10740   cat >conftest.$ac_ext <<_ACEOF
10741 #line 10741 "configure"
10742 #include "confdefs.h"
10743 #include <sys/types.h>
10744  /* Check that off_t can represent 2**63 - 1 correctly.
10745     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10746     since some C++ compilers masquerading as C compilers
10747     incorrectly reject 9223372036854775807.  */
10748 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10749   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10750                        && LARGE_OFF_T % 2147483647 == 1)
10751                       ? 1 : -1];
10752 int
10753 main ()
10754 {
10755
10756   ;
10757   return 0;
10758 }
10759 _ACEOF
10760 rm -f conftest.$ac_objext
10761 if { (eval echo "$as_me:10761: \"$ac_compile\"") >&5
10762   (eval $ac_compile) 2>&5
10763   ac_status=$?
10764   echo "$as_me:10764: \$? = $ac_status" >&5
10765   (exit $ac_status); } &&
10766          { ac_try='test -s conftest.$ac_objext'
10767   { (eval echo "$as_me:10767: \"$ac_try\"") >&5
10768   (eval $ac_try) 2>&5
10769   ac_status=$?
10770   echo "$as_me:10770: \$? = $ac_status" >&5
10771   (exit $ac_status); }; }; then
10772   break
10773 else
10774   echo "$as_me: failed program was:" >&5
10775 cat conftest.$ac_ext >&5
10776 fi
10777 rm -f conftest.$ac_objext conftest.$ac_ext
10778   cat >conftest.$ac_ext <<_ACEOF
10779 #line 10779 "configure"
10780 #include "confdefs.h"
10781 #define _LARGE_FILES 1
10782 #include <sys/types.h>
10783  /* Check that off_t can represent 2**63 - 1 correctly.
10784     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10785     since some C++ compilers masquerading as C compilers
10786     incorrectly reject 9223372036854775807.  */
10787 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10788   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10789                        && LARGE_OFF_T % 2147483647 == 1)
10790                       ? 1 : -1];
10791 int
10792 main ()
10793 {
10794
10795   ;
10796   return 0;
10797 }
10798 _ACEOF
10799 rm -f conftest.$ac_objext
10800 if { (eval echo "$as_me:10800: \"$ac_compile\"") >&5
10801   (eval $ac_compile) 2>&5
10802   ac_status=$?
10803   echo "$as_me:10803: \$? = $ac_status" >&5
10804   (exit $ac_status); } &&
10805          { ac_try='test -s conftest.$ac_objext'
10806   { (eval echo "$as_me:10806: \"$ac_try\"") >&5
10807   (eval $ac_try) 2>&5
10808   ac_status=$?
10809   echo "$as_me:10809: \$? = $ac_status" >&5
10810   (exit $ac_status); }; }; then
10811   ac_cv_sys_large_files=1; break
10812 else
10813   echo "$as_me: failed program was:" >&5
10814 cat conftest.$ac_ext >&5
10815 fi
10816 rm -f conftest.$ac_objext conftest.$ac_ext
10817   break
10818 done
10819 fi
10820 echo "$as_me:10820: result: $ac_cv_sys_large_files" >&5
10821 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10822 if test "$ac_cv_sys_large_files" != no; then
10823
10824 cat >>confdefs.h <<EOF
10825 #define _LARGE_FILES $ac_cv_sys_large_files
10826 EOF
10827
10828 fi
10829 rm -rf conftest*
10830 fi
10831
10832         if test "$enable_largefile" != no ; then
10833         echo "$as_me:10833: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10834 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10835 if test "${ac_cv_sys_largefile_source+set}" = set; then
10836   echo $ECHO_N "(cached) $ECHO_C" >&6
10837 else
10838   while :; do
10839   ac_cv_sys_largefile_source=no
10840   cat >conftest.$ac_ext <<_ACEOF
10841 #line 10841 "configure"
10842 #include "confdefs.h"
10843 #include <stdio.h>
10844 int
10845 main ()
10846 {
10847 return !fseeko;
10848   ;
10849   return 0;
10850 }
10851 _ACEOF
10852 rm -f conftest.$ac_objext
10853 if { (eval echo "$as_me:10853: \"$ac_compile\"") >&5
10854   (eval $ac_compile) 2>&5
10855   ac_status=$?
10856   echo "$as_me:10856: \$? = $ac_status" >&5
10857   (exit $ac_status); } &&
10858          { ac_try='test -s conftest.$ac_objext'
10859   { (eval echo "$as_me:10859: \"$ac_try\"") >&5
10860   (eval $ac_try) 2>&5
10861   ac_status=$?
10862   echo "$as_me:10862: \$? = $ac_status" >&5
10863   (exit $ac_status); }; }; then
10864   break
10865 else
10866   echo "$as_me: failed program was:" >&5
10867 cat conftest.$ac_ext >&5
10868 fi
10869 rm -f conftest.$ac_objext conftest.$ac_ext
10870   cat >conftest.$ac_ext <<_ACEOF
10871 #line 10871 "configure"
10872 #include "confdefs.h"
10873 #define _LARGEFILE_SOURCE 1
10874 #include <stdio.h>
10875 int
10876 main ()
10877 {
10878 return !fseeko;
10879   ;
10880   return 0;
10881 }
10882 _ACEOF
10883 rm -f conftest.$ac_objext
10884 if { (eval echo "$as_me:10884: \"$ac_compile\"") >&5
10885   (eval $ac_compile) 2>&5
10886   ac_status=$?
10887   echo "$as_me:10887: \$? = $ac_status" >&5
10888   (exit $ac_status); } &&
10889          { ac_try='test -s conftest.$ac_objext'
10890   { (eval echo "$as_me:10890: \"$ac_try\"") >&5
10891   (eval $ac_try) 2>&5
10892   ac_status=$?
10893   echo "$as_me:10893: \$? = $ac_status" >&5
10894   (exit $ac_status); }; }; then
10895   ac_cv_sys_largefile_source=1; break
10896 else
10897   echo "$as_me: failed program was:" >&5
10898 cat conftest.$ac_ext >&5
10899 fi
10900 rm -f conftest.$ac_objext conftest.$ac_ext
10901   break
10902 done
10903 fi
10904 echo "$as_me:10904: result: $ac_cv_sys_largefile_source" >&5
10905 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10906 if test "$ac_cv_sys_largefile_source" != no; then
10907
10908 cat >>confdefs.h <<EOF
10909 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10910 EOF
10911
10912 fi
10913 rm -rf conftest*
10914
10915 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10916 # in glibc 2.1.3, but that breaks too many other things.
10917 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10918 echo "$as_me:10918: checking for fseeko" >&5
10919 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10920 if test "${ac_cv_func_fseeko+set}" = set; then
10921   echo $ECHO_N "(cached) $ECHO_C" >&6
10922 else
10923   cat >conftest.$ac_ext <<_ACEOF
10924 #line 10924 "configure"
10925 #include "confdefs.h"
10926 #include <stdio.h>
10927 int
10928 main ()
10929 {
10930 return fseeko && fseeko (stdin, 0, 0);
10931   ;
10932   return 0;
10933 }
10934 _ACEOF
10935 rm -f conftest.$ac_objext conftest$ac_exeext
10936 if { (eval echo "$as_me:10936: \"$ac_link\"") >&5
10937   (eval $ac_link) 2>&5
10938   ac_status=$?
10939   echo "$as_me:10939: \$? = $ac_status" >&5
10940   (exit $ac_status); } &&
10941          { ac_try='test -s conftest$ac_exeext'
10942   { (eval echo "$as_me:10942: \"$ac_try\"") >&5
10943   (eval $ac_try) 2>&5
10944   ac_status=$?
10945   echo "$as_me:10945: \$? = $ac_status" >&5
10946   (exit $ac_status); }; }; then
10947   ac_cv_func_fseeko=yes
10948 else
10949   echo "$as_me: failed program was:" >&5
10950 cat conftest.$ac_ext >&5
10951 ac_cv_func_fseeko=no
10952 fi
10953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10954 fi
10955 echo "$as_me:10955: result: $ac_cv_func_fseeko" >&5
10956 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10957 if test $ac_cv_func_fseeko = yes; then
10958
10959 cat >>confdefs.h <<\EOF
10960 #define HAVE_FSEEKO 1
10961 EOF
10962
10963 fi
10964
10965         # Normally we would collect these definitions in the config.h,
10966         # but (like _XOPEN_SOURCE), some environments rely on having these
10967         # defined before any of the system headers are included.  Another
10968         # case comes up with C++, e.g., on AIX the compiler compiles the
10969         # header files by themselves before looking at the body files it is
10970         # told to compile.  For ncurses, those header files do not include
10971         # the config.h
10972         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10973         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10974         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10975
10976         echo "$as_me:10976: checking whether to use struct dirent64" >&5
10977 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10978 if test "${cf_cv_struct_dirent64+set}" = set; then
10979   echo $ECHO_N "(cached) $ECHO_C" >&6
10980 else
10981
10982                 cat >conftest.$ac_ext <<_ACEOF
10983 #line 10983 "configure"
10984 #include "confdefs.h"
10985
10986 #include <sys/types.h>
10987 #include <dirent.h>
10988
10989 int
10990 main ()
10991 {
10992
10993                 /* if transitional largefile support is setup, this is true */
10994                 extern struct dirent64 * readdir(DIR *);
10995                 struct dirent64 *x = readdir((DIR *)0);
10996                 struct dirent *y = readdir((DIR *)0);
10997                 int z = x - y;
10998
10999   ;
11000   return 0;
11001 }
11002 _ACEOF
11003 rm -f conftest.$ac_objext
11004 if { (eval echo "$as_me:11004: \"$ac_compile\"") >&5
11005   (eval $ac_compile) 2>&5
11006   ac_status=$?
11007   echo "$as_me:11007: \$? = $ac_status" >&5
11008   (exit $ac_status); } &&
11009          { ac_try='test -s conftest.$ac_objext'
11010   { (eval echo "$as_me:11010: \"$ac_try\"") >&5
11011   (eval $ac_try) 2>&5
11012   ac_status=$?
11013   echo "$as_me:11013: \$? = $ac_status" >&5
11014   (exit $ac_status); }; }; then
11015   cf_cv_struct_dirent64=yes
11016 else
11017   echo "$as_me: failed program was:" >&5
11018 cat conftest.$ac_ext >&5
11019 cf_cv_struct_dirent64=no
11020 fi
11021 rm -f conftest.$ac_objext conftest.$ac_ext
11022
11023 fi
11024 echo "$as_me:11024: result: $cf_cv_struct_dirent64" >&5
11025 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11026         test "$cf_cv_struct_dirent64" = yes &&
11027 cat >>confdefs.h <<\EOF
11028 #define HAVE_STRUCT_DIRENT64 1
11029 EOF
11030
11031         fi
11032
11033 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11034 echo "$as_me:11034: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11035 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11036
11037 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11038 if test "${enable_tparm_varargs+set}" = set; then
11039   enableval="$enable_tparm_varargs"
11040   with_tparm_varargs=$enableval
11041 else
11042   with_tparm_varargs=yes
11043 fi;
11044 echo "$as_me:11044: result: $with_tparm_varargs" >&5
11045 echo "${ECHO_T}$with_tparm_varargs" >&6
11046 NCURSES_TPARM_VARARGS=0
11047 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11048
11049 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11050 if test "$with_ticlib" != no ; then
11051 echo "$as_me:11051: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11052 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11053
11054 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11055 if test "${enable_tic_depends+set}" = set; then
11056   enableval="$enable_tic_depends"
11057   with_tic_depends=$enableval
11058 else
11059   with_tic_depends=yes
11060 fi;
11061 echo "$as_me:11061: result: $with_tic_depends" >&5
11062 echo "${ECHO_T}$with_tic_depends" >&6
11063 else
11064         with_tic_depends=no
11065 fi
11066
11067 ###   use option --with-bool to override bool's type
11068 echo "$as_me:11068: checking for type of bool" >&5
11069 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11070
11071 # Check whether --with-bool or --without-bool was given.
11072 if test "${with_bool+set}" = set; then
11073   withval="$with_bool"
11074   NCURSES_BOOL="$withval"
11075 else
11076   NCURSES_BOOL=auto
11077 fi;
11078 echo "$as_me:11078: result: $NCURSES_BOOL" >&5
11079 echo "${ECHO_T}$NCURSES_BOOL" >&6
11080
11081 echo "$as_me:11081: checking for alternate terminal capabilities file" >&5
11082 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11083
11084 # Check whether --with-caps or --without-caps was given.
11085 if test "${with_caps+set}" = set; then
11086   withval="$with_caps"
11087   TERMINFO_CAPS=Caps.$withval
11088 else
11089   TERMINFO_CAPS=Caps
11090 fi;
11091 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11092 echo "$as_me:11092: result: $TERMINFO_CAPS" >&5
11093 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11094
11095 ###   use option --with-chtype to override chtype's type
11096 echo "$as_me:11096: checking for type of chtype" >&5
11097 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11098
11099 # Check whether --with-chtype or --without-chtype was given.
11100 if test "${with_chtype+set}" = set; then
11101   withval="$with_chtype"
11102   NCURSES_CHTYPE="$withval"
11103 else
11104   NCURSES_CHTYPE=$cf_dft_chtype
11105 fi;
11106 echo "$as_me:11106: result: $NCURSES_CHTYPE" >&5
11107 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11108
11109 ###   use option --with-ospeed to override ospeed's type
11110 echo "$as_me:11110: checking for type of ospeed" >&5
11111 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11112
11113 # Check whether --with-ospeed or --without-ospeed was given.
11114 if test "${with_ospeed+set}" = set; then
11115   withval="$with_ospeed"
11116   NCURSES_OSPEED="$withval"
11117 else
11118   NCURSES_OSPEED=short
11119 fi;
11120 echo "$as_me:11120: result: $NCURSES_OSPEED" >&5
11121 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11122
11123 ###   use option --with-mmask-t to override mmask_t's type
11124 echo "$as_me:11124: checking for type of mmask_t" >&5
11125 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11126
11127 # Check whether --with-mmask-t or --without-mmask-t was given.
11128 if test "${with_mmask_t+set}" = set; then
11129   withval="$with_mmask_t"
11130   NCURSES_MMASK_T="$withval"
11131 else
11132   NCURSES_MMASK_T=$cf_dft_mmask_t
11133 fi;
11134 echo "$as_me:11134: result: $NCURSES_MMASK_T" >&5
11135 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11136
11137 ###   use option --with-ccharw-max to override CCHARW_MAX size
11138 echo "$as_me:11138: checking for size CCHARW_MAX" >&5
11139 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11140
11141 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11142 if test "${with_ccharw_max+set}" = set; then
11143   withval="$with_ccharw_max"
11144   NCURSES_CCHARW_MAX="$withval"
11145 else
11146   NCURSES_CCHARW_MAX=5
11147 fi;
11148 echo "$as_me:11148: result: $NCURSES_CCHARW_MAX" >&5
11149 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11150
11151 ###   use option --with-tparm-arg to override tparm's argument type
11152 echo "$as_me:11152: checking for type of tparm args" >&5
11153 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11154
11155 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11156 if test "${with_tparm_arg+set}" = set; then
11157   withval="$with_tparm_arg"
11158   NCURSES_TPARM_ARG="$withval"
11159 else
11160   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11161 fi;
11162 echo "$as_me:11162: result: $NCURSES_TPARM_ARG" >&5
11163 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11164
11165 ### Enable compiling-in rcs id's
11166 echo "$as_me:11166: checking if RCS identifiers should be compiled-in" >&5
11167 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11168
11169 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11170 if test "${with_rcs_ids+set}" = set; then
11171   withval="$with_rcs_ids"
11172   with_rcs_ids=$withval
11173 else
11174   with_rcs_ids=no
11175 fi;
11176 echo "$as_me:11176: result: $with_rcs_ids" >&5
11177 echo "${ECHO_T}$with_rcs_ids" >&6
11178 test "x$with_rcs_ids" = xyes &&
11179 cat >>confdefs.h <<\EOF
11180 #define USE_RCS_IDS 1
11181 EOF
11182
11183 ###############################################################################
11184
11185 echo "$as_me:11185: checking format of man-pages" >&5
11186 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11187
11188 # Check whether --with-manpage-format or --without-manpage-format was given.
11189 if test "${with_manpage_format+set}" = set; then
11190   withval="$with_manpage_format"
11191   MANPAGE_FORMAT=$withval
11192 else
11193   MANPAGE_FORMAT=unknown
11194 fi;
11195
11196 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11197 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11198
11199 cf_unknown=
11200
11201 case $MANPAGE_FORMAT in
11202 (unknown)
11203         if test -z "$MANPATH" ; then
11204                 MANPATH="/usr/man:/usr/share/man"
11205         fi
11206
11207         # look for the 'date' man-page (it's most likely to be installed!)
11208         MANPAGE_FORMAT=
11209         cf_preform=no
11210         cf_catonly=yes
11211         cf_example=date
11212
11213         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11214         for cf_dir in $MANPATH; do
11215                 test -z "$cf_dir" && cf_dir=/usr/man
11216                 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
11217                 do
11218                         cf_test=`echo $cf_name | sed -e 's/*//'`
11219                         if test "x$cf_test" = "x$cf_name" ; then
11220
11221                                 case "$cf_name" in
11222                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11223                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11224                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11225                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11226                                 esac
11227
11228                                 case "$cf_name" in
11229                                 ($cf_dir/man*)
11230                                         cf_catonly=no
11231                                         ;;
11232                                 ($cf_dir/cat*)
11233                                         cf_preform=yes
11234                                         ;;
11235                                 esac
11236                                 break
11237                         fi
11238
11239                         # if we found a match in either man* or cat*, stop looking
11240                         if test -n "$MANPAGE_FORMAT" ; then
11241                                 cf_found=no
11242                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11243                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11244                                 case "$cf_name" in
11245                                 ($cf_dir/cat*)
11246                                         cf_found=yes
11247                                         ;;
11248                                 esac
11249                                 test $cf_found=yes && break
11250                         fi
11251                 done
11252                 # only check the first directory in $MANPATH where we find manpages
11253                 if test -n "$MANPAGE_FORMAT" ; then
11254                         break
11255                 fi
11256         done
11257         # if we did not find the example, just assume it is normal
11258         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11259         IFS="$ac_save_ifs"
11260         ;;
11261 (*)
11262         for cf_option in $MANPAGE_FORMAT; do
11263         case $cf_option in
11264         (gzip|compress|BSDI|normal|formatted|catonly)
11265                 ;;
11266         (*)
11267                 cf_unknown="$cf_unknown $cf_option"
11268                 ;;
11269         esac
11270         done
11271         ;;
11272 esac
11273
11274 echo "$as_me:11274: result: $MANPAGE_FORMAT" >&5
11275 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11276 if test -n "$cf_unknown" ; then
11277         { echo "$as_me:11277: WARNING: Unexpected manpage-format $cf_unknown" >&5
11278 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11279 fi
11280
11281 echo "$as_me:11281: checking for manpage renaming" >&5
11282 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11283
11284 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11285 if test "${with_manpage_renames+set}" = set; then
11286   withval="$with_manpage_renames"
11287   MANPAGE_RENAMES=$withval
11288 else
11289   MANPAGE_RENAMES=yes
11290 fi;
11291
11292 case ".$MANPAGE_RENAMES" in
11293 (.no)
11294         ;;
11295 (.|.yes)
11296         # Debian 'man' program?
11297         if test -f /etc/debian_version ; then
11298                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11299         else
11300                 MANPAGE_RENAMES=no
11301         fi
11302         ;;
11303 esac
11304
11305 if test "$MANPAGE_RENAMES" != no ; then
11306         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11307                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11308         elif test ! -f $MANPAGE_RENAMES ; then
11309                 { { echo "$as_me:11309: error: not a filename: $MANPAGE_RENAMES" >&5
11310 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11311    { (exit 1); exit 1; }; }
11312         fi
11313
11314         test ! -d man && mkdir man
11315
11316         # Construct a sed-script to perform renaming within man-pages
11317         if test -n "$MANPAGE_RENAMES" ; then
11318                 test ! -d man && mkdir man
11319                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11320         fi
11321 fi
11322
11323 echo "$as_me:11323: result: $MANPAGE_RENAMES" >&5
11324 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11325
11326 echo "$as_me:11326: checking if manpage aliases will be installed" >&5
11327 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11328
11329 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11330 if test "${with_manpage_aliases+set}" = set; then
11331   withval="$with_manpage_aliases"
11332   MANPAGE_ALIASES=$withval
11333 else
11334   MANPAGE_ALIASES=yes
11335 fi;
11336
11337 echo "$as_me:11337: result: $MANPAGE_ALIASES" >&5
11338 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11339
11340 case "x$LN_S" in
11341 (xln*)
11342         cf_use_symlinks=yes
11343         ;;
11344 (*)
11345         cf_use_symlinks=no
11346         ;;
11347 esac
11348
11349 MANPAGE_SYMLINKS=no
11350 if test "$MANPAGE_ALIASES" = yes ; then
11351 echo "$as_me:11351: checking if manpage symlinks should be used" >&5
11352 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11353
11354 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11355 if test "${with_manpage_symlinks+set}" = set; then
11356   withval="$with_manpage_symlinks"
11357   MANPAGE_SYMLINKS=$withval
11358 else
11359   MANPAGE_SYMLINKS=$cf_use_symlinks
11360 fi;
11361
11362 if test "$$cf_use_symlinks" = no; then
11363 if test "$MANPAGE_SYMLINKS" = yes ; then
11364         { echo "$as_me:11364: WARNING: cannot make symlinks" >&5
11365 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11366         MANPAGE_SYMLINKS=no
11367 fi
11368 fi
11369
11370 echo "$as_me:11370: result: $MANPAGE_SYMLINKS" >&5
11371 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11372 fi
11373
11374 echo "$as_me:11374: checking for manpage tbl" >&5
11375 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11376
11377 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11378 if test "${with_manpage_tbl+set}" = set; then
11379   withval="$with_manpage_tbl"
11380   MANPAGE_TBL=$withval
11381 else
11382   MANPAGE_TBL=no
11383 fi;
11384
11385 echo "$as_me:11385: result: $MANPAGE_TBL" >&5
11386 echo "${ECHO_T}$MANPAGE_TBL" >&6
11387
11388 if test "$prefix" = "NONE" ; then
11389         cf_prefix="$ac_default_prefix"
11390 else
11391         cf_prefix="$prefix"
11392 fi
11393
11394 case "$MANPAGE_FORMAT" in
11395 (*catonly*)
11396         cf_format=yes
11397         cf_inboth=no
11398         ;;
11399 (*formatted*)
11400         cf_format=yes
11401         cf_inboth=yes
11402         ;;
11403 (*)
11404         cf_format=no
11405         cf_inboth=no
11406         ;;
11407 esac
11408
11409 test ! -d man && mkdir man
11410
11411 cf_so_strip=
11412 cf_compress=
11413 case "$MANPAGE_FORMAT" in
11414 (*compress*)
11415         cf_so_strip="Z"
11416         cf_compress=compress
11417         ;;
11418 (*gzip*)
11419         cf_so_strip="gz"
11420         cf_compress=gzip
11421         ;;
11422 esac
11423
11424 cf_edit_man=./edit_man.sh
11425 cf_man_alias=`pwd`/man_alias.sed
11426
11427 cat >$cf_edit_man <<CF_EOF
11428 #! $SHELL
11429 # this script is generated by the configure-script CF_MAN_PAGES macro.
11430
11431 prefix="$cf_prefix"
11432 datarootdir="$datarootdir"
11433 datadir="$datadir"
11434
11435 NCURSES_MAJOR="$NCURSES_MAJOR"
11436 NCURSES_MINOR="$NCURSES_MINOR"
11437 NCURSES_PATCH="$NCURSES_PATCH"
11438
11439 NCURSES_OSPEED="$NCURSES_OSPEED"
11440 TERMINFO="$TERMINFO"
11441
11442 INSTALL="$INSTALL"
11443 INSTALL_DATA="$INSTALL_DATA"
11444
11445 transform="$program_transform_name"
11446
11447 TMP=\${TMPDIR:=/tmp}/man\$\$
11448 trap "rm -f \$TMP" 0 1 2 5 15
11449
11450 form=\$1
11451 shift || exit 1
11452
11453 verb=\$1
11454 shift || exit 1
11455
11456 mandir=\$1
11457 shift || exit 1
11458
11459 srcdir=\$1
11460 top_srcdir=\$srcdir/..
11461 shift || exit 1
11462
11463 if test "\$form" = normal ; then
11464         if test "$cf_format" = yes ; then
11465         if test "$cf_inboth" = no ; then
11466                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11467                 exit $?
11468         fi
11469         fi
11470         cf_subdir=\$mandir/man
11471         cf_tables=$MANPAGE_TBL
11472 else
11473         cf_subdir=\$mandir/cat
11474         cf_tables=yes
11475 fi
11476
11477 # process the list of source-files
11478 for i in \$* ; do
11479 case \$i in
11480 (*.orig|*.rej) ;;
11481 (*.[0-9]*)
11482         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11483         if test \$verb = installing ; then
11484         if test ! -d \$cf_subdir\${section} ; then
11485                 mkdir -p \$cf_subdir\$section
11486         fi
11487         fi
11488
11489         # replace variables in man page
11490         if test ! -f $cf_man_alias ; then
11491 cat >>$cf_man_alias <<-CF_EOF2
11492                 s,@DATADIR@,\$datadir,g
11493                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11494                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11495                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11496                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11497                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11498                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11499 CF_EOF
11500
11501         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11502         do
11503                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11504                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11505 cat >>$cf_edit_man <<-CF_EOF
11506                 s,@$cf_NAME@,$cf_name,g
11507 CF_EOF
11508         done
11509
11510 cat >>$cf_edit_man <<CF_EOF
11511 CF_EOF2
11512                 echo "...made $cf_man_alias"
11513         fi
11514
11515         aliases=
11516         cf_source=\`basename \$i\`
11517         inalias=\$cf_source
11518         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11519         if test ! -f \$inalias ; then
11520                 echo .. skipped \$cf_source
11521                 continue
11522         fi
11523 CF_EOF
11524
11525 if test "$MANPAGE_ALIASES" != no ; then
11526 cat >>$cf_edit_man <<CF_EOF
11527         nCurses=ignore.3x
11528         test $with_curses_h = yes && nCurses=ncurses.3x
11529         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11530 CF_EOF
11531 fi
11532
11533 if test "$MANPAGE_RENAMES" = no ; then
11534 cat >>$cf_edit_man <<CF_EOF
11535         # perform program transformations for section 1 man pages
11536         if test \$section = 1 ; then
11537                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11538         else
11539                 cf_target=\$cf_subdir\${section}/\$cf_source
11540         fi
11541 CF_EOF
11542 else
11543 cat >>$cf_edit_man <<CF_EOF
11544         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11545         if test -z "\$cf_target" ; then
11546                 echo '? missing rename for '\$cf_source
11547                 cf_target="\$cf_source"
11548         fi
11549         cf_target="\$cf_subdir\${section}/\${cf_target}"
11550
11551 CF_EOF
11552 fi
11553
11554 cat >>$cf_edit_man <<CF_EOF
11555         sed     -f $cf_man_alias \\
11556 CF_EOF
11557
11558 if test -f $MANPAGE_RENAMES ; then
11559 cat >>$cf_edit_man <<CF_EOF
11560                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11561 CF_EOF
11562 else
11563 cat >>$cf_edit_man <<CF_EOF
11564                 < \$i >\$TMP
11565 CF_EOF
11566 fi
11567
11568 cat >>$cf_edit_man <<CF_EOF
11569 if test \$cf_tables = yes ; then
11570         tbl \$TMP >\$TMP.out
11571         mv \$TMP.out \$TMP
11572 fi
11573 CF_EOF
11574
11575 if test $with_overwrite != yes ; then
11576 cat >>$cf_edit_man <<CF_EOF
11577         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11578         mv \$TMP.out \$TMP
11579 CF_EOF
11580 fi
11581
11582 if test $with_curses_h != yes ; then
11583 cat >>$cf_edit_man <<CF_EOF
11584         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11585         mv \$TMP.out \$TMP
11586 CF_EOF
11587 fi
11588
11589 cat >>$cf_edit_man <<CF_EOF
11590         if test \$form = format ; then
11591                 nroff -man \$TMP >\$TMP.out
11592                 mv \$TMP.out \$TMP
11593         fi
11594 CF_EOF
11595
11596 if test -n "$cf_compress" ; then
11597 cat >>$cf_edit_man <<CF_EOF
11598         if test \$verb = installing ; then
11599         if ( $cf_compress -f \$TMP )
11600         then
11601                 mv \$TMP.$cf_so_strip \$TMP
11602         fi
11603         fi
11604         cf_target="\$cf_target.$cf_so_strip"
11605 CF_EOF
11606 fi
11607
11608 case "$MANPAGE_FORMAT" in
11609 (*BSDI*)
11610 cat >>$cf_edit_man <<CF_EOF
11611         if test \$form = format ; then
11612                 # BSDI installs only .0 suffixes in the cat directories
11613                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11614         fi
11615 CF_EOF
11616   ;;
11617 esac
11618
11619 cat >>$cf_edit_man <<CF_EOF
11620         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11621         if test \$verb = installing ; then
11622                 echo \$verb \$cf_target
11623                 \$INSTALL_DATA \$TMP \$cf_target
11624                 test -d \$cf_subdir\${section} &&
11625                 test -n "\$aliases" && (
11626                         cd \$cf_subdir\${section} && (
11627                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11628                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11629                                 cf_target=\`basename \$cf_target\`
11630                                 for cf_alias in \$aliases
11631                                 do
11632                                         if test \$section = 1 ; then
11633                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11634                                         fi
11635
11636                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11637                                                 if test -f \$cf_alias\${suffix} ; then
11638                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11639                                                         then
11640                                                                 continue
11641                                                         fi
11642                                                 fi
11643                                                 echo .. \$verb alias \$cf_alias\${suffix}
11644 CF_EOF
11645 case "x$LN_S" in
11646 (*-f)
11647 cat >>$cf_edit_man <<CF_EOF
11648                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11649 CF_EOF
11650         ;;
11651 (*)
11652 cat >>$cf_edit_man <<CF_EOF
11653                                                 rm -f \$cf_alias\${suffix}
11654                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11655 CF_EOF
11656         ;;
11657 esac
11658 cat >>$cf_edit_man <<CF_EOF
11659                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11660                                                 echo ".so \$cf_source" >\$TMP
11661 CF_EOF
11662 if test -n "$cf_compress" ; then
11663 cat >>$cf_edit_man <<CF_EOF
11664                                                 if test -n "$cf_so_strip" ; then
11665                                                         $cf_compress -f \$TMP
11666                                                         mv \$TMP.$cf_so_strip \$TMP
11667                                                 fi
11668 CF_EOF
11669 fi
11670 cat >>$cf_edit_man <<CF_EOF
11671                                                 echo .. \$verb alias \$cf_alias\${suffix}
11672                                                 rm -f \$cf_alias\${suffix}
11673                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11674                                         fi
11675                                 done
11676                         )
11677                 )
11678         elif test \$verb = removing ; then
11679                 test -f \$cf_target && (
11680                         echo \$verb \$cf_target
11681                         rm -f \$cf_target
11682                 )
11683                 test -d \$cf_subdir\${section} &&
11684                 test -n "\$aliases" && (
11685                         cd \$cf_subdir\${section} && (
11686                                 for cf_alias in \$aliases
11687                                 do
11688                                         if test \$section = 1 ; then
11689                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11690                                         fi
11691
11692                                         echo .. \$verb alias \$cf_alias\${suffix}
11693                                         rm -f \$cf_alias\${suffix}
11694                                 done
11695                         )
11696                 )
11697         else
11698 #               echo ".hy 0"
11699                 cat \$TMP
11700         fi
11701         ;;
11702 esac
11703 done
11704
11705 if test $cf_inboth = yes ; then
11706 if test \$form != format ; then
11707         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11708 fi
11709 fi
11710
11711 exit 0
11712 CF_EOF
11713 chmod 755 $cf_edit_man
11714
11715 ###############################################################################
11716
11717 ### Note that some functions (such as const) are normally disabled anyway.
11718 echo "$as_me:11718: checking if you want to build with function extensions" >&5
11719 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11720
11721 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11722 if test "${enable_ext_funcs+set}" = set; then
11723   enableval="$enable_ext_funcs"
11724   with_ext_funcs=$enableval
11725 else
11726   with_ext_funcs=yes
11727 fi;
11728 echo "$as_me:11728: result: $with_ext_funcs" >&5
11729 echo "${ECHO_T}$with_ext_funcs" >&6
11730 if test "x$with_ext_funcs" = xyes ; then
11731         NCURSES_EXT_FUNCS=1
11732
11733 cat >>confdefs.h <<\EOF
11734 #define HAVE_ASSUME_DEFAULT_COLORS 1
11735 EOF
11736
11737 cat >>confdefs.h <<\EOF
11738 #define HAVE_CURSES_VERSION 1
11739 EOF
11740
11741 cat >>confdefs.h <<\EOF
11742 #define HAVE_HAS_KEY 1
11743 EOF
11744
11745 cat >>confdefs.h <<\EOF
11746 #define HAVE_RESIZETERM 1
11747 EOF
11748
11749 cat >>confdefs.h <<\EOF
11750 #define HAVE_RESIZE_TERM 1
11751 EOF
11752
11753 cat >>confdefs.h <<\EOF
11754 #define HAVE_TERM_ENTRY_H 1
11755 EOF
11756
11757 cat >>confdefs.h <<\EOF
11758 #define HAVE_USE_DEFAULT_COLORS 1
11759 EOF
11760
11761 cat >>confdefs.h <<\EOF
11762 #define HAVE_USE_SCREEN 1
11763 EOF
11764
11765 cat >>confdefs.h <<\EOF
11766 #define HAVE_USE_WINDOW 1
11767 EOF
11768
11769 cat >>confdefs.h <<\EOF
11770 #define HAVE_WRESIZE 1
11771 EOF
11772
11773 cat >>confdefs.h <<\EOF
11774 #define NCURSES_EXT_FUNCS 1
11775 EOF
11776
11777         GENERATED_EXT_FUNCS=generated
11778 else
11779         NCURSES_EXT_FUNCS=0
11780         GENERATED_EXT_FUNCS=
11781 fi
11782
11783 echo "$as_me:11783: checking if you want to build with SCREEN extensions" >&5
11784 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11785
11786 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11787 if test "${enable_sp_funcs+set}" = set; then
11788   enableval="$enable_sp_funcs"
11789   with_sp_funcs=$enableval
11790 else
11791   with_sp_funcs=$cf_dft_ext_spfuncs
11792 fi;
11793 echo "$as_me:11793: result: $with_sp_funcs" >&5
11794 echo "${ECHO_T}$with_sp_funcs" >&6
11795 if test "x$with_sp_funcs" = xyes ; then
11796         NCURSES_SP_FUNCS=1
11797
11798 cat >>confdefs.h <<\EOF
11799 #define NCURSES_SP_FUNCS 1
11800 EOF
11801
11802         GENERATED_SP_FUNCS=generated
11803 else
11804         NCURSES_SP_FUNCS=0
11805         GENERATED_SP_FUNCS=
11806 fi
11807
11808 echo "$as_me:11808: checking if you want to build with terminal-driver" >&5
11809 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11810
11811 # Check whether --enable-term-driver or --disable-term-driver was given.
11812 if test "${enable_term_driver+set}" = set; then
11813   enableval="$enable_term_driver"
11814   with_term_driver=$enableval
11815 else
11816   with_term_driver=no
11817 fi;
11818 echo "$as_me:11818: result: $with_term_driver" >&5
11819 echo "${ECHO_T}$with_term_driver" >&6
11820 if test "x$with_term_driver" = xyes ; then
11821
11822 cat >>confdefs.h <<\EOF
11823 #define USE_TERM_DRIVER 1
11824 EOF
11825
11826         if test "x$with_termlib" != xno ; then
11827                 { { echo "$as_me:11827: error: The term-driver option conflicts with the termlib option" >&5
11828 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11829    { (exit 1); exit 1; }; }
11830         fi
11831         if test "x$with_sp_funcs" != xyes ; then
11832                 { { echo "$as_me:11832: error: The term-driver option relies upon sp-funcs" >&5
11833 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11834    { (exit 1); exit 1; }; }
11835         fi
11836 fi
11837
11838 ###   use option --enable-const to turn on use of const beyond that in XSI.
11839 echo "$as_me:11839: checking for extended use of const keyword" >&5
11840 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11841
11842 # Check whether --enable-const or --disable-const was given.
11843 if test "${enable_const+set}" = set; then
11844   enableval="$enable_const"
11845   with_ext_const=$enableval
11846 else
11847   with_ext_const=$cf_dft_ext_const
11848 fi;
11849 echo "$as_me:11849: result: $with_ext_const" >&5
11850 echo "${ECHO_T}$with_ext_const" >&6
11851 NCURSES_CONST='/*nothing*/'
11852 if test "x$with_ext_const" = xyes ; then
11853         NCURSES_CONST=const
11854 fi
11855
11856 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11857 echo "$as_me:11857: checking if you want to use extended colors" >&5
11858 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11859
11860 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11861 if test "${enable_ext_colors+set}" = set; then
11862   enableval="$enable_ext_colors"
11863   with_ext_colors=$enableval
11864 else
11865   with_ext_colors=$cf_dft_ext_colors
11866 fi;
11867 echo "$as_me:11867: result: $with_ext_colors" >&5
11868 echo "${ECHO_T}$with_ext_colors" >&6
11869 NCURSES_EXT_COLORS=0
11870 if test "x$with_ext_colors" = xyes ; then
11871         if test "x$with_widec" != xyes ; then
11872                 { echo "$as_me:11872: WARNING: This option applies only to wide-character library" >&5
11873 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11874         else
11875                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11876
11877 if test "${with_abi_version+set}" != set; then
11878         case $cf_cv_rel_version in
11879         (5.*)
11880                 cf_cv_rel_version=6.0
11881                 cf_cv_abi_version=6
11882                 { echo "$as_me:11882: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11883 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11884                 ;;
11885         esac
11886 fi
11887
11888                 NCURSES_EXT_COLORS=1
11889
11890 cat >>confdefs.h <<\EOF
11891 #define NCURSES_EXT_COLORS 1
11892 EOF
11893
11894         fi
11895 fi
11896
11897 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11898 echo "$as_me:11898: checking if you want to use extended mouse encoding" >&5
11899 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11900
11901 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11902 if test "${enable_ext_mouse+set}" = set; then
11903   enableval="$enable_ext_mouse"
11904   with_ext_mouse=$enableval
11905 else
11906   with_ext_mouse=$cf_dft_ext_mouse
11907 fi;
11908 echo "$as_me:11908: result: $with_ext_mouse" >&5
11909 echo "${ECHO_T}$with_ext_mouse" >&6
11910 NCURSES_MOUSE_VERSION=1
11911 if test "x$with_ext_mouse" = xyes ; then
11912         NCURSES_MOUSE_VERSION=2
11913
11914 if test "${with_abi_version+set}" != set; then
11915         case $cf_cv_rel_version in
11916         (5.*)
11917                 cf_cv_rel_version=6.0
11918                 cf_cv_abi_version=6
11919                 { echo "$as_me:11919: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11920 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11921                 ;;
11922         esac
11923 fi
11924
11925 fi
11926
11927 ###   use option --enable-ext-putwin to turn on extended screendumps
11928 echo "$as_me:11928: checking if you want to use extended putwin/screendump" >&5
11929 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11930
11931 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11932 if test "${enable_ext_putwin+set}" = set; then
11933   enableval="$enable_ext_putwin"
11934   with_ext_putwin=$enableval
11935 else
11936   with_ext_putwin=$cf_dft_ext_putwin
11937 fi;
11938 echo "$as_me:11938: result: $with_ext_putwin" >&5
11939 echo "${ECHO_T}$with_ext_putwin" >&6
11940 if test "x$with_ext_putwin" = xyes ; then
11941
11942 cat >>confdefs.h <<\EOF
11943 #define NCURSES_EXT_PUTWIN 1
11944 EOF
11945
11946 fi
11947
11948 echo "$as_me:11948: checking if you want \$NCURSES_NO_PADDING code" >&5
11949 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11950
11951 # Check whether --enable-no-padding or --disable-no-padding was given.
11952 if test "${enable_no_padding+set}" = set; then
11953   enableval="$enable_no_padding"
11954   with_no_padding=$enableval
11955 else
11956   with_no_padding=$with_ext_funcs
11957 fi;
11958 echo "$as_me:11958: result: $with_no_padding" >&5
11959 echo "${ECHO_T}$with_no_padding" >&6
11960 test "x$with_no_padding" = xyes &&
11961 cat >>confdefs.h <<\EOF
11962 #define NCURSES_NO_PADDING 1
11963 EOF
11964
11965 echo "$as_me:11965: checking for ANSI C header files" >&5
11966 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11967 if test "${ac_cv_header_stdc+set}" = set; then
11968   echo $ECHO_N "(cached) $ECHO_C" >&6
11969 else
11970   cat >conftest.$ac_ext <<_ACEOF
11971 #line 11971 "configure"
11972 #include "confdefs.h"
11973 #include <stdlib.h>
11974 #include <stdarg.h>
11975 #include <string.h>
11976 #include <float.h>
11977
11978 _ACEOF
11979 if { (eval echo "$as_me:11979: \"$ac_cpp conftest.$ac_ext\"") >&5
11980   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11981   ac_status=$?
11982   egrep -v '^ *\+' conftest.er1 >conftest.err
11983   rm -f conftest.er1
11984   cat conftest.err >&5
11985   echo "$as_me:11985: \$? = $ac_status" >&5
11986   (exit $ac_status); } >/dev/null; then
11987   if test -s conftest.err; then
11988     ac_cpp_err=$ac_c_preproc_warn_flag
11989   else
11990     ac_cpp_err=
11991   fi
11992 else
11993   ac_cpp_err=yes
11994 fi
11995 if test -z "$ac_cpp_err"; then
11996   ac_cv_header_stdc=yes
11997 else
11998   echo "$as_me: failed program was:" >&5
11999   cat conftest.$ac_ext >&5
12000   ac_cv_header_stdc=no
12001 fi
12002 rm -f conftest.err conftest.$ac_ext
12003
12004 if test $ac_cv_header_stdc = yes; then
12005   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12006   cat >conftest.$ac_ext <<_ACEOF
12007 #line 12007 "configure"
12008 #include "confdefs.h"
12009 #include <string.h>
12010
12011 _ACEOF
12012 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12013   egrep "memchr" >/dev/null 2>&1; then
12014   :
12015 else
12016   ac_cv_header_stdc=no
12017 fi
12018 rm -rf conftest*
12019
12020 fi
12021
12022 if test $ac_cv_header_stdc = yes; then
12023   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12024   cat >conftest.$ac_ext <<_ACEOF
12025 #line 12025 "configure"
12026 #include "confdefs.h"
12027 #include <stdlib.h>
12028
12029 _ACEOF
12030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12031   egrep "free" >/dev/null 2>&1; then
12032   :
12033 else
12034   ac_cv_header_stdc=no
12035 fi
12036 rm -rf conftest*
12037
12038 fi
12039
12040 if test $ac_cv_header_stdc = yes; then
12041   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12042   if test "$cross_compiling" = yes; then
12043   :
12044 else
12045   cat >conftest.$ac_ext <<_ACEOF
12046 #line 12046 "configure"
12047 #include "confdefs.h"
12048 #include <ctype.h>
12049 #if ((' ' & 0x0FF) == 0x020)
12050 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12051 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12052 #else
12053 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12054                      || ('j' <= (c) && (c) <= 'r') \
12055                      || ('s' <= (c) && (c) <= 'z'))
12056 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12057 #endif
12058
12059 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12060 int
12061 main ()
12062 {
12063   int i;
12064   for (i = 0; i < 256; i++)
12065     if (XOR (islower (i), ISLOWER (i))
12066         || toupper (i) != TOUPPER (i))
12067       $ac_main_return(2);
12068   $ac_main_return (0);
12069 }
12070 _ACEOF
12071 rm -f conftest$ac_exeext
12072 if { (eval echo "$as_me:12072: \"$ac_link\"") >&5
12073   (eval $ac_link) 2>&5
12074   ac_status=$?
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12077   { (eval echo "$as_me:12077: \"$ac_try\"") >&5
12078   (eval $ac_try) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit $ac_status); }; }; then
12082   :
12083 else
12084   echo "$as_me: program exited with status $ac_status" >&5
12085 echo "$as_me: failed program was:" >&5
12086 cat conftest.$ac_ext >&5
12087 ac_cv_header_stdc=no
12088 fi
12089 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12090 fi
12091 fi
12092 fi
12093 echo "$as_me:12093: result: $ac_cv_header_stdc" >&5
12094 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12095 if test $ac_cv_header_stdc = yes; then
12096
12097 cat >>confdefs.h <<\EOF
12098 #define STDC_HEADERS 1
12099 EOF
12100
12101 fi
12102
12103 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12104
12105 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12106                   inttypes.h stdint.h unistd.h
12107 do
12108 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12109 echo "$as_me:12109: checking for $ac_header" >&5
12110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12111 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12112   echo $ECHO_N "(cached) $ECHO_C" >&6
12113 else
12114   cat >conftest.$ac_ext <<_ACEOF
12115 #line 12115 "configure"
12116 #include "confdefs.h"
12117 $ac_includes_default
12118 #include <$ac_header>
12119 _ACEOF
12120 rm -f conftest.$ac_objext
12121 if { (eval echo "$as_me:12121: \"$ac_compile\"") >&5
12122   (eval $ac_compile) 2>&5
12123   ac_status=$?
12124   echo "$as_me:12124: \$? = $ac_status" >&5
12125   (exit $ac_status); } &&
12126          { ac_try='test -s conftest.$ac_objext'
12127   { (eval echo "$as_me:12127: \"$ac_try\"") >&5
12128   (eval $ac_try) 2>&5
12129   ac_status=$?
12130   echo "$as_me:12130: \$? = $ac_status" >&5
12131   (exit $ac_status); }; }; then
12132   eval "$as_ac_Header=yes"
12133 else
12134   echo "$as_me: failed program was:" >&5
12135 cat conftest.$ac_ext >&5
12136 eval "$as_ac_Header=no"
12137 fi
12138 rm -f conftest.$ac_objext conftest.$ac_ext
12139 fi
12140 echo "$as_me:12140: result: `eval echo '${'$as_ac_Header'}'`" >&5
12141 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12142 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12143   cat >>confdefs.h <<EOF
12144 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12145 EOF
12146
12147 fi
12148 done
12149
12150 echo "$as_me:12150: checking for signed char" >&5
12151 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12152 if test "${ac_cv_type_signed_char+set}" = set; then
12153   echo $ECHO_N "(cached) $ECHO_C" >&6
12154 else
12155   cat >conftest.$ac_ext <<_ACEOF
12156 #line 12156 "configure"
12157 #include "confdefs.h"
12158 $ac_includes_default
12159 int
12160 main ()
12161 {
12162 if ((signed char *) 0)
12163   return 0;
12164 if (sizeof (signed char))
12165   return 0;
12166   ;
12167   return 0;
12168 }
12169 _ACEOF
12170 rm -f conftest.$ac_objext
12171 if { (eval echo "$as_me:12171: \"$ac_compile\"") >&5
12172   (eval $ac_compile) 2>&5
12173   ac_status=$?
12174   echo "$as_me:12174: \$? = $ac_status" >&5
12175   (exit $ac_status); } &&
12176          { ac_try='test -s conftest.$ac_objext'
12177   { (eval echo "$as_me:12177: \"$ac_try\"") >&5
12178   (eval $ac_try) 2>&5
12179   ac_status=$?
12180   echo "$as_me:12180: \$? = $ac_status" >&5
12181   (exit $ac_status); }; }; then
12182   ac_cv_type_signed_char=yes
12183 else
12184   echo "$as_me: failed program was:" >&5
12185 cat conftest.$ac_ext >&5
12186 ac_cv_type_signed_char=no
12187 fi
12188 rm -f conftest.$ac_objext conftest.$ac_ext
12189 fi
12190 echo "$as_me:12190: result: $ac_cv_type_signed_char" >&5
12191 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12192
12193 echo "$as_me:12193: checking size of signed char" >&5
12194 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12195 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12196   echo $ECHO_N "(cached) $ECHO_C" >&6
12197 else
12198   if test "$ac_cv_type_signed_char" = yes; then
12199   if test "$cross_compiling" = yes; then
12200   # Depending upon the size, compute the lo and hi bounds.
12201 cat >conftest.$ac_ext <<_ACEOF
12202 #line 12202 "configure"
12203 #include "confdefs.h"
12204 $ac_includes_default
12205 int
12206 main ()
12207 {
12208 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12209   ;
12210   return 0;
12211 }
12212 _ACEOF
12213 rm -f conftest.$ac_objext
12214 if { (eval echo "$as_me:12214: \"$ac_compile\"") >&5
12215   (eval $ac_compile) 2>&5
12216   ac_status=$?
12217   echo "$as_me:12217: \$? = $ac_status" >&5
12218   (exit $ac_status); } &&
12219          { ac_try='test -s conftest.$ac_objext'
12220   { (eval echo "$as_me:12220: \"$ac_try\"") >&5
12221   (eval $ac_try) 2>&5
12222   ac_status=$?
12223   echo "$as_me:12223: \$? = $ac_status" >&5
12224   (exit $ac_status); }; }; then
12225   ac_lo=0 ac_mid=0
12226   while :; do
12227     cat >conftest.$ac_ext <<_ACEOF
12228 #line 12228 "configure"
12229 #include "confdefs.h"
12230 $ac_includes_default
12231 int
12232 main ()
12233 {
12234 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12235   ;
12236   return 0;
12237 }
12238 _ACEOF
12239 rm -f conftest.$ac_objext
12240 if { (eval echo "$as_me:12240: \"$ac_compile\"") >&5
12241   (eval $ac_compile) 2>&5
12242   ac_status=$?
12243   echo "$as_me:12243: \$? = $ac_status" >&5
12244   (exit $ac_status); } &&
12245          { ac_try='test -s conftest.$ac_objext'
12246   { (eval echo "$as_me:12246: \"$ac_try\"") >&5
12247   (eval $ac_try) 2>&5
12248   ac_status=$?
12249   echo "$as_me:12249: \$? = $ac_status" >&5
12250   (exit $ac_status); }; }; then
12251   ac_hi=$ac_mid; break
12252 else
12253   echo "$as_me: failed program was:" >&5
12254 cat conftest.$ac_ext >&5
12255 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12256 fi
12257 rm -f conftest.$ac_objext conftest.$ac_ext
12258   done
12259 else
12260   echo "$as_me: failed program was:" >&5
12261 cat conftest.$ac_ext >&5
12262 ac_hi=-1 ac_mid=-1
12263   while :; do
12264     cat >conftest.$ac_ext <<_ACEOF
12265 #line 12265 "configure"
12266 #include "confdefs.h"
12267 $ac_includes_default
12268 int
12269 main ()
12270 {
12271 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12272   ;
12273   return 0;
12274 }
12275 _ACEOF
12276 rm -f conftest.$ac_objext
12277 if { (eval echo "$as_me:12277: \"$ac_compile\"") >&5
12278   (eval $ac_compile) 2>&5
12279   ac_status=$?
12280   echo "$as_me:12280: \$? = $ac_status" >&5
12281   (exit $ac_status); } &&
12282          { ac_try='test -s conftest.$ac_objext'
12283   { (eval echo "$as_me:12283: \"$ac_try\"") >&5
12284   (eval $ac_try) 2>&5
12285   ac_status=$?
12286   echo "$as_me:12286: \$? = $ac_status" >&5
12287   (exit $ac_status); }; }; then
12288   ac_lo=$ac_mid; break
12289 else
12290   echo "$as_me: failed program was:" >&5
12291 cat conftest.$ac_ext >&5
12292 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12293 fi
12294 rm -f conftest.$ac_objext conftest.$ac_ext
12295   done
12296 fi
12297 rm -f conftest.$ac_objext conftest.$ac_ext
12298 # Binary search between lo and hi bounds.
12299 while test "x$ac_lo" != "x$ac_hi"; do
12300   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12301   cat >conftest.$ac_ext <<_ACEOF
12302 #line 12302 "configure"
12303 #include "confdefs.h"
12304 $ac_includes_default
12305 int
12306 main ()
12307 {
12308 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12309   ;
12310   return 0;
12311 }
12312 _ACEOF
12313 rm -f conftest.$ac_objext
12314 if { (eval echo "$as_me:12314: \"$ac_compile\"") >&5
12315   (eval $ac_compile) 2>&5
12316   ac_status=$?
12317   echo "$as_me:12317: \$? = $ac_status" >&5
12318   (exit $ac_status); } &&
12319          { ac_try='test -s conftest.$ac_objext'
12320   { (eval echo "$as_me:12320: \"$ac_try\"") >&5
12321   (eval $ac_try) 2>&5
12322   ac_status=$?
12323   echo "$as_me:12323: \$? = $ac_status" >&5
12324   (exit $ac_status); }; }; then
12325   ac_hi=$ac_mid
12326 else
12327   echo "$as_me: failed program was:" >&5
12328 cat conftest.$ac_ext >&5
12329 ac_lo=`expr $ac_mid + 1`
12330 fi
12331 rm -f conftest.$ac_objext conftest.$ac_ext
12332 done
12333 ac_cv_sizeof_signed_char=$ac_lo
12334 else
12335   if test "$cross_compiling" = yes; then
12336   { { echo "$as_me:12336: error: cannot run test program while cross compiling" >&5
12337 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12338    { (exit 1); exit 1; }; }
12339 else
12340   cat >conftest.$ac_ext <<_ACEOF
12341 #line 12341 "configure"
12342 #include "confdefs.h"
12343 $ac_includes_default
12344 int
12345 main ()
12346 {
12347 FILE *f = fopen ("conftest.val", "w");
12348 if (!f)
12349   $ac_main_return (1);
12350 fprintf (f, "%d", (sizeof (signed char)));
12351 fclose (f);
12352   ;
12353   return 0;
12354 }
12355 _ACEOF
12356 rm -f conftest$ac_exeext
12357 if { (eval echo "$as_me:12357: \"$ac_link\"") >&5
12358   (eval $ac_link) 2>&5
12359   ac_status=$?
12360   echo "$as_me:12360: \$? = $ac_status" >&5
12361   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12362   { (eval echo "$as_me:12362: \"$ac_try\"") >&5
12363   (eval $ac_try) 2>&5
12364   ac_status=$?
12365   echo "$as_me:12365: \$? = $ac_status" >&5
12366   (exit $ac_status); }; }; then
12367   ac_cv_sizeof_signed_char=`cat conftest.val`
12368 else
12369   echo "$as_me: program exited with status $ac_status" >&5
12370 echo "$as_me: failed program was:" >&5
12371 cat conftest.$ac_ext >&5
12372 fi
12373 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12374 fi
12375 fi
12376 rm -f conftest.val
12377 else
12378   ac_cv_sizeof_signed_char=0
12379 fi
12380 fi
12381 echo "$as_me:12381: result: $ac_cv_sizeof_signed_char" >&5
12382 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12383 cat >>confdefs.h <<EOF
12384 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12385 EOF
12386
12387 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12388         NCURSES_SBOOL="signed char"
12389 else
12390         NCURSES_SBOOL="char"
12391 fi
12392 echo "$as_me:12392: checking if you want to use signed Boolean array in term.h" >&5
12393 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12394
12395 # Check whether --enable-signed-char or --disable-signed-char was given.
12396 if test "${enable_signed_char+set}" = set; then
12397   enableval="$enable_signed_char"
12398   with_signed_char=$enableval
12399 else
12400   with_signed_char=no
12401 fi;
12402 echo "$as_me:12402: result: $with_signed_char" >&5
12403 echo "${ECHO_T}$with_signed_char" >&6
12404 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12405
12406 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12407 echo "$as_me:12407: checking if you want SIGWINCH handler" >&5
12408 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12409
12410 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12411 if test "${enable_sigwinch+set}" = set; then
12412   enableval="$enable_sigwinch"
12413   with_sigwinch=$enableval
12414 else
12415   with_sigwinch=$with_ext_funcs
12416 fi;
12417 echo "$as_me:12417: result: $with_sigwinch" >&5
12418 echo "${ECHO_T}$with_sigwinch" >&6
12419 test "x$with_sigwinch" = xyes &&
12420 cat >>confdefs.h <<\EOF
12421 #define USE_SIGWINCH 1
12422 EOF
12423
12424 ###   use option --enable-tcap-names to allow user to define new capabilities
12425 echo "$as_me:12425: checking if you want user-definable terminal capabilities like termcap" >&5
12426 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12427
12428 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12429 if test "${enable_tcap_names+set}" = set; then
12430   enableval="$enable_tcap_names"
12431   with_tcap_names=$enableval
12432 else
12433   with_tcap_names=$with_ext_funcs
12434 fi;
12435 echo "$as_me:12435: result: $with_tcap_names" >&5
12436 echo "${ECHO_T}$with_tcap_names" >&6
12437 NCURSES_XNAMES=0
12438 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12439
12440 ###############################################################################
12441 # These options are relatively safe to experiment with.
12442
12443 echo "$as_me:12443: checking if you want all development code" >&5
12444 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12445
12446 # Check whether --with-develop or --without-develop was given.
12447 if test "${with_develop+set}" = set; then
12448   withval="$with_develop"
12449   with_develop=$withval
12450 else
12451   with_develop=no
12452 fi;
12453 echo "$as_me:12453: result: $with_develop" >&5
12454 echo "${ECHO_T}$with_develop" >&6
12455
12456 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12457 echo "$as_me:12457: checking if you want hard-tabs code" >&5
12458 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12459
12460 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12461 if test "${enable_hard_tabs+set}" = set; then
12462   enableval="$enable_hard_tabs"
12463
12464 else
12465   enable_hard_tabs=$with_develop
12466 fi;
12467 echo "$as_me:12467: result: $enable_hard_tabs" >&5
12468 echo "${ECHO_T}$enable_hard_tabs" >&6
12469 test "x$enable_hard_tabs" = xyes &&
12470 cat >>confdefs.h <<\EOF
12471 #define USE_HARD_TABS 1
12472 EOF
12473
12474 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12475 echo "$as_me:12475: checking if you want limited support for xmc" >&5
12476 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12477
12478 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12479 if test "${enable_xmc_glitch+set}" = set; then
12480   enableval="$enable_xmc_glitch"
12481
12482 else
12483   enable_xmc_glitch=$with_develop
12484 fi;
12485 echo "$as_me:12485: result: $enable_xmc_glitch" >&5
12486 echo "${ECHO_T}$enable_xmc_glitch" >&6
12487 test "x$enable_xmc_glitch" = xyes &&
12488 cat >>confdefs.h <<\EOF
12489 #define USE_XMC_SUPPORT 1
12490 EOF
12491
12492 ###############################################################################
12493 # These are just experimental, probably should not be in a package:
12494
12495 echo "$as_me:12495: checking if you do not want to assume colors are white-on-black" >&5
12496 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12497
12498 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12499 if test "${enable_assumed_color+set}" = set; then
12500   enableval="$enable_assumed_color"
12501   with_assumed_color=$enableval
12502 else
12503   with_assumed_color=yes
12504 fi;
12505 echo "$as_me:12505: result: $with_assumed_color" >&5
12506 echo "${ECHO_T}$with_assumed_color" >&6
12507 test "x$with_assumed_color" = xyes &&
12508 cat >>confdefs.h <<\EOF
12509 #define USE_ASSUMED_COLOR 1
12510 EOF
12511
12512 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12513 echo "$as_me:12513: checking if you want hashmap scrolling-optimization code" >&5
12514 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12515
12516 # Check whether --enable-hashmap or --disable-hashmap was given.
12517 if test "${enable_hashmap+set}" = set; then
12518   enableval="$enable_hashmap"
12519   with_hashmap=$enableval
12520 else
12521   with_hashmap=yes
12522 fi;
12523 echo "$as_me:12523: result: $with_hashmap" >&5
12524 echo "${ECHO_T}$with_hashmap" >&6
12525 test "x$with_hashmap" = xyes &&
12526 cat >>confdefs.h <<\EOF
12527 #define USE_HASHMAP 1
12528 EOF
12529
12530 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12531 echo "$as_me:12531: checking if you want colorfgbg code" >&5
12532 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12533
12534 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12535 if test "${enable_colorfgbg+set}" = set; then
12536   enableval="$enable_colorfgbg"
12537   with_colorfgbg=$enableval
12538 else
12539   with_colorfgbg=no
12540 fi;
12541 echo "$as_me:12541: result: $with_colorfgbg" >&5
12542 echo "${ECHO_T}$with_colorfgbg" >&6
12543 test "x$with_colorfgbg" = xyes &&
12544 cat >>confdefs.h <<\EOF
12545 #define USE_COLORFGBG 1
12546 EOF
12547
12548 ###   use option --enable-interop to turn on use of bindings used for interop
12549 echo "$as_me:12549: checking if you want interop bindings" >&5
12550 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12551
12552 # Check whether --enable-interop or --disable-interop was given.
12553 if test "${enable_interop+set}" = set; then
12554   enableval="$enable_interop"
12555   with_exp_interop=$enableval
12556 else
12557   with_exp_interop=$cf_dft_interop
12558 fi;
12559 echo "$as_me:12559: result: $with_exp_interop" >&5
12560 echo "${ECHO_T}$with_exp_interop" >&6
12561
12562 NCURSES_INTEROP_FUNCS=0
12563 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12564
12565 # This is still experimental (20080329), but should ultimately be moved to
12566 # the script-block --with-normal, etc.
12567
12568 echo "$as_me:12568: checking if you want to link with the pthread library" >&5
12569 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12570
12571 # Check whether --with-pthread or --without-pthread was given.
12572 if test "${with_pthread+set}" = set; then
12573   withval="$with_pthread"
12574   with_pthread=$withval
12575 else
12576   with_pthread=no
12577 fi;
12578 echo "$as_me:12578: result: $with_pthread" >&5
12579 echo "${ECHO_T}$with_pthread" >&6
12580
12581 if test "$with_pthread" != no ; then
12582         echo "$as_me:12582: checking for pthread.h" >&5
12583 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12584 if test "${ac_cv_header_pthread_h+set}" = set; then
12585   echo $ECHO_N "(cached) $ECHO_C" >&6
12586 else
12587   cat >conftest.$ac_ext <<_ACEOF
12588 #line 12588 "configure"
12589 #include "confdefs.h"
12590 #include <pthread.h>
12591 _ACEOF
12592 if { (eval echo "$as_me:12592: \"$ac_cpp conftest.$ac_ext\"") >&5
12593   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12594   ac_status=$?
12595   egrep -v '^ *\+' conftest.er1 >conftest.err
12596   rm -f conftest.er1
12597   cat conftest.err >&5
12598   echo "$as_me:12598: \$? = $ac_status" >&5
12599   (exit $ac_status); } >/dev/null; then
12600   if test -s conftest.err; then
12601     ac_cpp_err=$ac_c_preproc_warn_flag
12602   else
12603     ac_cpp_err=
12604   fi
12605 else
12606   ac_cpp_err=yes
12607 fi
12608 if test -z "$ac_cpp_err"; then
12609   ac_cv_header_pthread_h=yes
12610 else
12611   echo "$as_me: failed program was:" >&5
12612   cat conftest.$ac_ext >&5
12613   ac_cv_header_pthread_h=no
12614 fi
12615 rm -f conftest.err conftest.$ac_ext
12616 fi
12617 echo "$as_me:12617: result: $ac_cv_header_pthread_h" >&5
12618 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12619 if test $ac_cv_header_pthread_h = yes; then
12620
12621 cat >>confdefs.h <<\EOF
12622 #define HAVE_PTHREADS_H 1
12623 EOF
12624
12625         for cf_lib_pthread in pthread c_r
12626         do
12627             echo "$as_me:12627: checking if we can link with the $cf_lib_pthread library" >&5
12628 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12629             cf_save_LIBS="$LIBS"
12630
12631 cf_add_libs="-l$cf_lib_pthread"
12632 # Filter out duplicates - this happens with badly-designed ".pc" files...
12633 for cf_add_1lib in $LIBS
12634 do
12635         for cf_add_2lib in $cf_add_libs
12636         do
12637                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12638                 then
12639                         cf_add_1lib=
12640                         break
12641                 fi
12642         done
12643         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12644 done
12645 LIBS="$cf_add_libs"
12646
12647             cat >conftest.$ac_ext <<_ACEOF
12648 #line 12648 "configure"
12649 #include "confdefs.h"
12650
12651 #include <pthread.h>
12652
12653 int
12654 main ()
12655 {
12656
12657                 int rc = pthread_create(0,0,0,0);
12658                 int r2 = pthread_mutexattr_settype(0, 0);
12659
12660   ;
12661   return 0;
12662 }
12663 _ACEOF
12664 rm -f conftest.$ac_objext conftest$ac_exeext
12665 if { (eval echo "$as_me:12665: \"$ac_link\"") >&5
12666   (eval $ac_link) 2>&5
12667   ac_status=$?
12668   echo "$as_me:12668: \$? = $ac_status" >&5
12669   (exit $ac_status); } &&
12670          { ac_try='test -s conftest$ac_exeext'
12671   { (eval echo "$as_me:12671: \"$ac_try\"") >&5
12672   (eval $ac_try) 2>&5
12673   ac_status=$?
12674   echo "$as_me:12674: \$? = $ac_status" >&5
12675   (exit $ac_status); }; }; then
12676   with_pthread=yes
12677 else
12678   echo "$as_me: failed program was:" >&5
12679 cat conftest.$ac_ext >&5
12680 with_pthread=no
12681 fi
12682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12683             LIBS="$cf_save_LIBS"
12684             echo "$as_me:12684: result: $with_pthread" >&5
12685 echo "${ECHO_T}$with_pthread" >&6
12686             test "$with_pthread" = yes && break
12687         done
12688
12689         if test "$with_pthread" = yes ; then
12690
12691 cf_add_libs="-l$cf_lib_pthread"
12692 # Filter out duplicates - this happens with badly-designed ".pc" files...
12693 for cf_add_1lib in $LIBS
12694 do
12695         for cf_add_2lib in $cf_add_libs
12696         do
12697                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12698                 then
12699                         cf_add_1lib=
12700                         break
12701                 fi
12702         done
12703         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12704 done
12705 LIBS="$cf_add_libs"
12706
12707 cat >>confdefs.h <<\EOF
12708 #define HAVE_LIBPTHREADS 1
12709 EOF
12710
12711         else
12712             { { echo "$as_me:12712: error: Cannot link with pthread library" >&5
12713 echo "$as_me: error: Cannot link with pthread library" >&2;}
12714    { (exit 1); exit 1; }; }
12715         fi
12716
12717 fi
12718
12719 fi
12720
12721 if test "x$with_pthread" != xno; then
12722         echo "$as_me:12722: checking for pthread_kill" >&5
12723 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12724 if test "${ac_cv_func_pthread_kill+set}" = set; then
12725   echo $ECHO_N "(cached) $ECHO_C" >&6
12726 else
12727   cat >conftest.$ac_ext <<_ACEOF
12728 #line 12728 "configure"
12729 #include "confdefs.h"
12730 /* System header to define __stub macros and hopefully few prototypes,
12731     which can conflict with char pthread_kill (); below.  */
12732 #include <assert.h>
12733 /* Override any gcc2 internal prototype to avoid an error.  */
12734 #ifdef __cplusplus
12735 extern "C"
12736 #endif
12737 /* We use char because int might match the return type of a gcc2
12738    builtin and then its argument prototype would still apply.  */
12739 char pthread_kill ();
12740 char (*f) ();
12741
12742 int
12743 main ()
12744 {
12745 /* The GNU C library defines this for functions which it implements
12746     to always fail with ENOSYS.  Some functions are actually named
12747     something starting with __ and the normal name is an alias.  */
12748 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12749 choke me
12750 #else
12751 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12752 #endif
12753
12754   ;
12755   return 0;
12756 }
12757 _ACEOF
12758 rm -f conftest.$ac_objext conftest$ac_exeext
12759 if { (eval echo "$as_me:12759: \"$ac_link\"") >&5
12760   (eval $ac_link) 2>&5
12761   ac_status=$?
12762   echo "$as_me:12762: \$? = $ac_status" >&5
12763   (exit $ac_status); } &&
12764          { ac_try='test -s conftest$ac_exeext'
12765   { (eval echo "$as_me:12765: \"$ac_try\"") >&5
12766   (eval $ac_try) 2>&5
12767   ac_status=$?
12768   echo "$as_me:12768: \$? = $ac_status" >&5
12769   (exit $ac_status); }; }; then
12770   ac_cv_func_pthread_kill=yes
12771 else
12772   echo "$as_me: failed program was:" >&5
12773 cat conftest.$ac_ext >&5
12774 ac_cv_func_pthread_kill=no
12775 fi
12776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12777 fi
12778 echo "$as_me:12778: result: $ac_cv_func_pthread_kill" >&5
12779 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12780 if test $ac_cv_func_pthread_kill = yes; then
12781
12782                 echo "$as_me:12782: checking if you want to allow EINTR in wgetch with pthreads" >&5
12783 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12784
12785 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12786 if test "${enable_pthreads_eintr+set}" = set; then
12787   enableval="$enable_pthreads_eintr"
12788   use_pthreads_eintr=$enableval
12789 else
12790   use_pthreads_eintr=no
12791 fi;
12792                 echo "$as_me:12792: result: $use_pthreads_eintr" >&5
12793 echo "${ECHO_T}$use_pthreads_eintr" >&6
12794                 if test "x$use_pthreads_eintr" = xyes ; then
12795
12796 cat >>confdefs.h <<\EOF
12797 #define USE_PTHREADS_EINTR 1
12798 EOF
12799
12800                 fi
12801 fi
12802
12803         echo "$as_me:12803: checking if you want to use weak-symbols for pthreads" >&5
12804 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12805
12806 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12807 if test "${enable_weak_symbols+set}" = set; then
12808   enableval="$enable_weak_symbols"
12809   use_weak_symbols=$enableval
12810 else
12811   use_weak_symbols=no
12812 fi;
12813         echo "$as_me:12813: result: $use_weak_symbols" >&5
12814 echo "${ECHO_T}$use_weak_symbols" >&6
12815         if test "x$use_weak_symbols" = xyes ; then
12816
12817 echo "$as_me:12817: checking if $CC supports weak symbols" >&5
12818 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12819 if test "${cf_cv_weak_symbols+set}" = set; then
12820   echo $ECHO_N "(cached) $ECHO_C" >&6
12821 else
12822
12823 cat >conftest.$ac_ext <<_ACEOF
12824 #line 12824 "configure"
12825 #include "confdefs.h"
12826
12827 #include <stdio.h>
12828 int
12829 main ()
12830 {
12831
12832 #if defined(__GNUC__)
12833 #  if defined __USE_ISOC99
12834 #    define _cat_pragma(exp)    _Pragma(#exp)
12835 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12836 #  else
12837 #    define _weak_pragma(exp)
12838 #  endif
12839 #  define _declare(name)        __extension__ extern __typeof__(name) name
12840 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12841 #endif
12842
12843 weak_symbol(fopen);
12844
12845   ;
12846   return 0;
12847 }
12848 _ACEOF
12849 rm -f conftest.$ac_objext
12850 if { (eval echo "$as_me:12850: \"$ac_compile\"") >&5
12851   (eval $ac_compile) 2>&5
12852   ac_status=$?
12853   echo "$as_me:12853: \$? = $ac_status" >&5
12854   (exit $ac_status); } &&
12855          { ac_try='test -s conftest.$ac_objext'
12856   { (eval echo "$as_me:12856: \"$ac_try\"") >&5
12857   (eval $ac_try) 2>&5
12858   ac_status=$?
12859   echo "$as_me:12859: \$? = $ac_status" >&5
12860   (exit $ac_status); }; }; then
12861   cf_cv_weak_symbols=yes
12862 else
12863   echo "$as_me: failed program was:" >&5
12864 cat conftest.$ac_ext >&5
12865 cf_cv_weak_symbols=no
12866 fi
12867 rm -f conftest.$ac_objext conftest.$ac_ext
12868
12869 fi
12870 echo "$as_me:12870: result: $cf_cv_weak_symbols" >&5
12871 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12872
12873         else
12874                 cf_cv_weak_symbols=no
12875         fi
12876
12877         if test "x$cf_cv_weak_symbols" = xyes ; then
12878
12879 cat >>confdefs.h <<\EOF
12880 #define USE_WEAK_SYMBOLS 1
12881 EOF
12882
12883         fi
12884 fi
12885
12886 PTHREAD=
12887 if test "x$with_pthread" = "xyes" ; then
12888
12889 cat >>confdefs.h <<\EOF
12890 #define USE_PTHREADS 1
12891 EOF
12892
12893         enable_reentrant=yes
12894         if test "x$cf_cv_weak_symbols" = xyes ; then
12895                 PTHREAD=-lpthread
12896         fi
12897 fi
12898
12899 # Reentrant code has to be opaque; there's little advantage to making ncurses
12900 # opaque outside of that, so there is no --enable-opaque option.  We can use
12901 # this option without --with-pthreads, but this will be always set for
12902 # pthreads.
12903 echo "$as_me:12903: checking if you want reentrant code" >&5
12904 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12905
12906 # Check whether --enable-reentrant or --disable-reentrant was given.
12907 if test "${enable_reentrant+set}" = set; then
12908   enableval="$enable_reentrant"
12909   with_reentrant=$enableval
12910 else
12911   with_reentrant=no
12912 fi;
12913 echo "$as_me:12913: result: $with_reentrant" >&5
12914 echo "${ECHO_T}$with_reentrant" >&6
12915 if test "x$with_reentrant" = xyes ; then
12916         cf_cv_enable_reentrant=1
12917         cf_cv_enable_opaque="NCURSES_INTERNALS"
12918         NCURSES_OPAQUE=1
12919         NCURSES_SIZE_T=int
12920         if test "x$cf_cv_weak_symbols" = xyes ; then
12921
12922 # remove pthread library from $LIBS
12923 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12924
12925 cf_add_libs="-lpthread"
12926 # Filter out duplicates - this happens with badly-designed ".pc" files...
12927 for cf_add_1lib in $TEST_LIBS
12928 do
12929         for cf_add_2lib in $cf_add_libs
12930         do
12931                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12932                 then
12933                         cf_add_1lib=
12934                         break
12935                 fi
12936         done
12937         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12938 done
12939 TEST_LIBS="$cf_add_libs"
12940
12941 cf_add_libs="-lpthread"
12942 # Filter out duplicates - this happens with badly-designed ".pc" files...
12943 for cf_add_1lib in $TEST_LIBS2
12944 do
12945         for cf_add_2lib in $cf_add_libs
12946         do
12947                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12948                 then
12949                         cf_add_1lib=
12950                         break
12951                 fi
12952         done
12953         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12954 done
12955 TEST_LIBS2="$cf_add_libs"
12956
12957         else
12958                 # when not using weak symbols but with_reentrant,
12959                 # add 't' to the library suffix on all platforms
12960                 # except cygwin, where we only do that if ALSO
12961                 # compiling with full thread support.
12962                 case "$host" in
12963                 (*cygwin* | *msys*)
12964                         if test "$with_pthread" = "yes" ; then
12965                                 if test "x$disable_lib_suffixes" = "xno" ; then
12966                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12967                                 fi
12968                         fi ;;
12969                 (*)
12970                         if test "x$disable_lib_suffixes" = "xno" ; then
12971                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12972                         fi
12973                         ;;
12974                 esac
12975         fi
12976
12977 cat >>confdefs.h <<\EOF
12978 #define USE_REENTRANT 1
12979 EOF
12980
12981 if test "${with_abi_version+set}" != set; then
12982         case $cf_cv_rel_version in
12983         (5.*)
12984                 cf_cv_rel_version=6.0
12985                 cf_cv_abi_version=6
12986                 { echo "$as_me:12986: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12987 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12988                 ;;
12989         esac
12990 fi
12991
12992 else
12993         cf_cv_enable_reentrant=0
12994         cf_cv_enable_opaque="NCURSES_OPAQUE"
12995         NCURSES_OPAQUE=0
12996         NCURSES_SIZE_T=short
12997 fi
12998
12999 ### Allow using a different wrap-prefix
13000 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13001         echo "$as_me:13001: checking for prefix used to wrap public variables" >&5
13002 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13003
13004 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13005 if test "${with_wrap_prefix+set}" = set; then
13006   withval="$with_wrap_prefix"
13007   NCURSES_WRAP_PREFIX=$withval
13008 else
13009   NCURSES_WRAP_PREFIX=_nc_
13010 fi;
13011         echo "$as_me:13011: result: $NCURSES_WRAP_PREFIX" >&5
13012 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13013 else
13014         NCURSES_WRAP_PREFIX=_nc_
13015 fi
13016
13017 cat >>confdefs.h <<EOF
13018 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13019 EOF
13020
13021 echo "$as_me:13021: checking if you want experimental safe-sprintf code" >&5
13022 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13023
13024 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13025 if test "${enable_safe_sprintf+set}" = set; then
13026   enableval="$enable_safe_sprintf"
13027   with_safe_sprintf=$enableval
13028 else
13029   with_safe_sprintf=no
13030 fi;
13031 echo "$as_me:13031: result: $with_safe_sprintf" >&5
13032 echo "${ECHO_T}$with_safe_sprintf" >&6
13033 test "x$with_safe_sprintf" = xyes &&
13034 cat >>confdefs.h <<\EOF
13035 #define USE_SAFE_SPRINTF 1
13036 EOF
13037
13038 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13039 # when hashmap is used scroll hints are useless
13040 if test "$with_hashmap" = no ; then
13041 echo "$as_me:13041: checking if you want to experiment without scrolling-hints code" >&5
13042 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13043
13044 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13045 if test "${enable_scroll_hints+set}" = set; then
13046   enableval="$enable_scroll_hints"
13047   with_scroll_hints=$enableval
13048 else
13049   with_scroll_hints=yes
13050 fi;
13051 echo "$as_me:13051: result: $with_scroll_hints" >&5
13052 echo "${ECHO_T}$with_scroll_hints" >&6
13053 test "x$with_scroll_hints" = xyes &&
13054 cat >>confdefs.h <<\EOF
13055 #define USE_SCROLL_HINTS 1
13056 EOF
13057
13058 fi
13059
13060 echo "$as_me:13060: checking if you want wgetch-events code" >&5
13061 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13062
13063 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13064 if test "${enable_wgetch_events+set}" = set; then
13065   enableval="$enable_wgetch_events"
13066   with_wgetch_events=$enableval
13067 else
13068   with_wgetch_events=no
13069 fi;
13070 echo "$as_me:13070: result: $with_wgetch_events" >&5
13071 echo "${ECHO_T}$with_wgetch_events" >&6
13072 test "x$with_wgetch_events" = xyes &&
13073 cat >>confdefs.h <<\EOF
13074 #define NCURSES_WGETCH_EVENTS 1
13075 EOF
13076
13077 ###############################################################################
13078
13079 ###     use option --disable-echo to suppress full display compiling commands
13080
13081 echo "$as_me:13081: checking if you want to see long compiling messages" >&5
13082 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13083
13084 # Check whether --enable-echo or --disable-echo was given.
13085 if test "${enable_echo+set}" = set; then
13086   enableval="$enable_echo"
13087   test "$enableval" != no && enableval=yes
13088         if test "$enableval" != "yes" ; then
13089
13090         ECHO_LT='--silent'
13091         ECHO_LD='@echo linking $@;'
13092         RULE_CC='@echo compiling $<'
13093         SHOW_CC='@echo compiling $@'
13094         ECHO_CC='@'
13095
13096         else
13097
13098         ECHO_LT=''
13099         ECHO_LD=''
13100         RULE_CC=''
13101         SHOW_CC=''
13102         ECHO_CC=''
13103
13104         fi
13105 else
13106   enableval=yes
13107
13108         ECHO_LT=''
13109         ECHO_LD=''
13110         RULE_CC=''
13111         SHOW_CC=''
13112         ECHO_CC=''
13113
13114 fi;
13115 echo "$as_me:13115: result: $enableval" >&5
13116 echo "${ECHO_T}$enableval" >&6
13117
13118 if test "x$enable_echo" = xyes; then
13119         ECHO_LINK=
13120 else
13121         ECHO_LINK='@ echo linking $@ ... ;'
13122         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13123         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13124 fi
13125
13126 ###     use option --enable-warnings to turn on all gcc warnings
13127 echo "$as_me:13127: checking if you want to see compiler warnings" >&5
13128 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13129
13130 # Check whether --enable-warnings or --disable-warnings was given.
13131 if test "${enable_warnings+set}" = set; then
13132   enableval="$enable_warnings"
13133   with_warnings=$enableval
13134 fi;
13135 echo "$as_me:13135: result: $with_warnings" >&5
13136 echo "${ECHO_T}$with_warnings" >&6
13137
13138 if test "x$with_warnings" = "xyes"; then
13139
13140         ADAFLAGS="$ADAFLAGS -gnatg"
13141
13142 INTEL_COMPILER=no
13143
13144 if test "$GCC" = yes ; then
13145         case $host_os in
13146         (linux*|gnu*)
13147                 echo "$as_me:13147: checking if this is really Intel C compiler" >&5
13148 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13149                 cf_save_CFLAGS="$CFLAGS"
13150                 CFLAGS="$CFLAGS -no-gcc"
13151                 cat >conftest.$ac_ext <<_ACEOF
13152 #line 13152 "configure"
13153 #include "confdefs.h"
13154
13155 int
13156 main ()
13157 {
13158
13159 #ifdef __INTEL_COMPILER
13160 #else
13161 make an error
13162 #endif
13163
13164   ;
13165   return 0;
13166 }
13167 _ACEOF
13168 rm -f conftest.$ac_objext
13169 if { (eval echo "$as_me:13169: \"$ac_compile\"") >&5
13170   (eval $ac_compile) 2>&5
13171   ac_status=$?
13172   echo "$as_me:13172: \$? = $ac_status" >&5
13173   (exit $ac_status); } &&
13174          { ac_try='test -s conftest.$ac_objext'
13175   { (eval echo "$as_me:13175: \"$ac_try\"") >&5
13176   (eval $ac_try) 2>&5
13177   ac_status=$?
13178   echo "$as_me:13178: \$? = $ac_status" >&5
13179   (exit $ac_status); }; }; then
13180   INTEL_COMPILER=yes
13181 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13182
13183 else
13184   echo "$as_me: failed program was:" >&5
13185 cat conftest.$ac_ext >&5
13186 fi
13187 rm -f conftest.$ac_objext conftest.$ac_ext
13188                 CFLAGS="$cf_save_CFLAGS"
13189                 echo "$as_me:13189: result: $INTEL_COMPILER" >&5
13190 echo "${ECHO_T}$INTEL_COMPILER" >&6
13191                 ;;
13192         esac
13193 fi
13194
13195 CLANG_COMPILER=no
13196
13197 if test "$GCC" = yes ; then
13198         echo "$as_me:13198: checking if this is really Clang C compiler" >&5
13199 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13200         cf_save_CFLAGS="$CFLAGS"
13201         CFLAGS="$CFLAGS -Qunused-arguments"
13202         cat >conftest.$ac_ext <<_ACEOF
13203 #line 13203 "configure"
13204 #include "confdefs.h"
13205
13206 int
13207 main ()
13208 {
13209
13210 #ifdef __clang__
13211 #else
13212 make an error
13213 #endif
13214
13215   ;
13216   return 0;
13217 }
13218 _ACEOF
13219 rm -f conftest.$ac_objext
13220 if { (eval echo "$as_me:13220: \"$ac_compile\"") >&5
13221   (eval $ac_compile) 2>&5
13222   ac_status=$?
13223   echo "$as_me:13223: \$? = $ac_status" >&5
13224   (exit $ac_status); } &&
13225          { ac_try='test -s conftest.$ac_objext'
13226   { (eval echo "$as_me:13226: \"$ac_try\"") >&5
13227   (eval $ac_try) 2>&5
13228   ac_status=$?
13229   echo "$as_me:13229: \$? = $ac_status" >&5
13230   (exit $ac_status); }; }; then
13231   CLANG_COMPILER=yes
13232 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13233
13234 else
13235   echo "$as_me: failed program was:" >&5
13236 cat conftest.$ac_ext >&5
13237 fi
13238 rm -f conftest.$ac_objext conftest.$ac_ext
13239         CFLAGS="$cf_save_CFLAGS"
13240         echo "$as_me:13240: result: $CLANG_COMPILER" >&5
13241 echo "${ECHO_T}$CLANG_COMPILER" >&6
13242 fi
13243
13244 cat > conftest.$ac_ext <<EOF
13245 #line 13245 "${as_me:-configure}"
13246 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13247 EOF
13248
13249 if test "$INTEL_COMPILER" = yes
13250 then
13251 # The "-wdXXX" options suppress warnings:
13252 # remark #1419: external declaration in primary source file
13253 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13254 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13255 # remark #193: zero used for undefined preprocessing identifier
13256 # remark #593: variable "curs_sb_left_arrow" was set but never used
13257 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13258 # remark #869: parameter "tw" was never referenced
13259 # remark #981: operands are evaluated in unspecified order
13260 # warning #279: controlling expression is constant
13261
13262         { echo "$as_me:13262: checking for $CC warning options..." >&5
13263 echo "$as_me: checking for $CC warning options..." >&6;}
13264         cf_save_CFLAGS="$CFLAGS"
13265         EXTRA_CFLAGS="-Wall"
13266         for cf_opt in \
13267                 wd1419 \
13268                 wd1683 \
13269                 wd1684 \
13270                 wd193 \
13271                 wd593 \
13272                 wd279 \
13273                 wd810 \
13274                 wd869 \
13275                 wd981
13276         do
13277                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13278                 if { (eval echo "$as_me:13278: \"$ac_compile\"") >&5
13279   (eval $ac_compile) 2>&5
13280   ac_status=$?
13281   echo "$as_me:13281: \$? = $ac_status" >&5
13282   (exit $ac_status); }; then
13283                         test -n "$verbose" && echo "$as_me:13283: result: ... -$cf_opt" >&5
13284 echo "${ECHO_T}... -$cf_opt" >&6
13285                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13286                 fi
13287         done
13288         CFLAGS="$cf_save_CFLAGS"
13289
13290 elif test "$GCC" = yes
13291 then
13292         { echo "$as_me:13292: checking for $CC warning options..." >&5
13293 echo "$as_me: checking for $CC warning options..." >&6;}
13294         cf_save_CFLAGS="$CFLAGS"
13295         EXTRA_CFLAGS=
13296         cf_warn_CONST=""
13297         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13298         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13299         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13300         for cf_opt in W Wall \
13301                 Wbad-function-cast \
13302                 Wcast-align \
13303                 Wcast-qual \
13304                 Wdeclaration-after-statement \
13305                 Wextra \
13306                 Winline \
13307                 Wmissing-declarations \
13308                 Wmissing-prototypes \
13309                 Wnested-externs \
13310                 Wpointer-arith \
13311                 Wshadow \
13312                 Wstrict-prototypes \
13313                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13314         do
13315                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13316                 if { (eval echo "$as_me:13316: \"$ac_compile\"") >&5
13317   (eval $ac_compile) 2>&5
13318   ac_status=$?
13319   echo "$as_me:13319: \$? = $ac_status" >&5
13320   (exit $ac_status); }; then
13321                         test -n "$verbose" && echo "$as_me:13321: result: ... -$cf_opt" >&5
13322 echo "${ECHO_T}... -$cf_opt" >&6
13323                         case $cf_opt in
13324                         (Wcast-qual)
13325                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13326                                 ;;
13327                         (Winline)
13328                                 case $GCC_VERSION in
13329                                 ([34].*)
13330                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13331
13332 echo "${as_me:-configure}:13332: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13333
13334                                         continue;;
13335                                 esac
13336                                 ;;
13337                         (Wpointer-arith)
13338                                 case $GCC_VERSION in
13339                                 ([12].*)
13340                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13341
13342 echo "${as_me:-configure}:13342: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13343
13344                                         continue;;
13345                                 esac
13346                                 ;;
13347                         esac
13348                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13349                 fi
13350         done
13351         CFLAGS="$cf_save_CFLAGS"
13352 fi
13353 rm -rf conftest*
13354
13355         if test "x$cf_with_cxx" = xyes ; then
13356
13357 INTEL_CPLUSPLUS=no
13358
13359 if test "$GCC" = yes ; then
13360         case $host_os in
13361         (linux*|gnu*)
13362                 echo "$as_me:13362: checking if this is really Intel C++ compiler" >&5
13363 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13364                 cf_save_CFLAGS="$CXXFLAGS"
13365                 CXXFLAGS="$CXXFLAGS -no-gcc"
13366                 cat >conftest.$ac_ext <<_ACEOF
13367 #line 13367 "configure"
13368 #include "confdefs.h"
13369
13370 int
13371 main ()
13372 {
13373
13374 #ifdef __INTEL_COMPILER
13375 #else
13376 make an error
13377 #endif
13378
13379   ;
13380   return 0;
13381 }
13382 _ACEOF
13383 rm -f conftest.$ac_objext
13384 if { (eval echo "$as_me:13384: \"$ac_compile\"") >&5
13385   (eval $ac_compile) 2>&5
13386   ac_status=$?
13387   echo "$as_me:13387: \$? = $ac_status" >&5
13388   (exit $ac_status); } &&
13389          { ac_try='test -s conftest.$ac_objext'
13390   { (eval echo "$as_me:13390: \"$ac_try\"") >&5
13391   (eval $ac_try) 2>&5
13392   ac_status=$?
13393   echo "$as_me:13393: \$? = $ac_status" >&5
13394   (exit $ac_status); }; }; then
13395   INTEL_CPLUSPLUS=yes
13396 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13397
13398 else
13399   echo "$as_me: failed program was:" >&5
13400 cat conftest.$ac_ext >&5
13401 fi
13402 rm -f conftest.$ac_objext conftest.$ac_ext
13403                 CXXFLAGS="$cf_save_CFLAGS"
13404                 echo "$as_me:13404: result: $INTEL_CPLUSPLUS" >&5
13405 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13406                 ;;
13407         esac
13408 fi
13409
13410 CLANG_CPLUSPLUS=no
13411
13412 if test "$GCC" = yes ; then
13413         echo "$as_me:13413: checking if this is really Clang C++ compiler" >&5
13414 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13415         cf_save_CFLAGS="$CXXFLAGS"
13416         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13417         cat >conftest.$ac_ext <<_ACEOF
13418 #line 13418 "configure"
13419 #include "confdefs.h"
13420
13421 int
13422 main ()
13423 {
13424
13425 #ifdef __clang__
13426 #else
13427 make an error
13428 #endif
13429
13430   ;
13431   return 0;
13432 }
13433 _ACEOF
13434 rm -f conftest.$ac_objext
13435 if { (eval echo "$as_me:13435: \"$ac_compile\"") >&5
13436   (eval $ac_compile) 2>&5
13437   ac_status=$?
13438   echo "$as_me:13438: \$? = $ac_status" >&5
13439   (exit $ac_status); } &&
13440          { ac_try='test -s conftest.$ac_objext'
13441   { (eval echo "$as_me:13441: \"$ac_try\"") >&5
13442   (eval $ac_try) 2>&5
13443   ac_status=$?
13444   echo "$as_me:13444: \$? = $ac_status" >&5
13445   (exit $ac_status); }; }; then
13446   CLANG_CPLUSPLUS=yes
13447 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13448
13449 else
13450   echo "$as_me: failed program was:" >&5
13451 cat conftest.$ac_ext >&5
13452 fi
13453 rm -f conftest.$ac_objext conftest.$ac_ext
13454         CXXFLAGS="$cf_save_CFLAGS"
13455         echo "$as_me:13455: result: $CLANG_CPLUSPLUS" >&5
13456 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13457 fi
13458
13459 ac_ext=cc
13460 ac_cpp='$CXXCPP $CPPFLAGS'
13461 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13462 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13463 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13464 ac_main_return=return
13465
13466 cat > conftest.$ac_ext <<EOF
13467 #line 13467 "configure"
13468 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13469 EOF
13470
13471 if test "$INTEL_CPLUSPLUS" = yes
13472 then
13473 # The "-wdXXX" options suppress warnings:
13474 # remark #1419: external declaration in primary source file
13475 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13476 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13477 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13478 # remark #193: zero used for undefined preprocessing identifier
13479 # remark #593: variable "curs_sb_left_arrow" was set but never used
13480 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13481 # remark #869: parameter "tw" was never referenced
13482 # remark #981: operands are evaluated in unspecified order
13483 # warning #269: invalid format string conversion
13484
13485         { echo "$as_me:13485: checking for $CC warning options..." >&5
13486 echo "$as_me: checking for $CC warning options..." >&6;}
13487         cf_save_CXXFLAGS="$CXXFLAGS"
13488         EXTRA_CXXFLAGS="-Wall"
13489         for cf_opt in \
13490                 wd1419 \
13491                 wd1682 \
13492                 wd1683 \
13493                 wd1684 \
13494                 wd193 \
13495                 wd279 \
13496                 wd593 \
13497                 wd810 \
13498                 wd869 \
13499                 wd981
13500         do
13501                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13502                 if { (eval echo "$as_me:13502: \"$ac_compile\"") >&5
13503   (eval $ac_compile) 2>&5
13504   ac_status=$?
13505   echo "$as_me:13505: \$? = $ac_status" >&5
13506   (exit $ac_status); }; then
13507                         test -n "$verbose" && echo "$as_me:13507: result: ... -$cf_opt" >&5
13508 echo "${ECHO_T}... -$cf_opt" >&6
13509                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13510                 fi
13511         done
13512         CXXFLAGS="$cf_save_CXXFLAGS"
13513
13514 elif test "$GXX" = yes
13515 then
13516         { echo "$as_me:13516: checking for $CXX warning options..." >&5
13517 echo "$as_me: checking for $CXX warning options..." >&6;}
13518         cf_save_CXXFLAGS="$CXXFLAGS"
13519         EXTRA_CXXFLAGS="-W -Wall"
13520         cf_gxx_extra_warnings=""
13521         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13522         case "$GCC_VERSION" in
13523         ([1-2].*)
13524                 ;;
13525         (*)
13526                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13527                 ;;
13528         esac
13529         for cf_opt in \
13530                 Wabi \
13531                 fabi-version=0 \
13532                 Wextra \
13533                 Wignored-qualifiers \
13534                 Wlogical-op \
13535                 Woverloaded-virtual \
13536                 Wsign-promo \
13537                 Wsynth \
13538                 Wold-style-cast \
13539                 Wcast-align \
13540                 Wcast-qual \
13541                 Wpointer-arith \
13542                 Wshadow \
13543                 Wundef $cf_gxx_extra_warnings Wno-unused
13544         do
13545                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13546                 if { (eval echo "$as_me:13546: \"$ac_compile\"") >&5
13547   (eval $ac_compile) 2>&5
13548   ac_status=$?
13549   echo "$as_me:13549: \$? = $ac_status" >&5
13550   (exit $ac_status); }; then
13551                         test -n "$verbose" && echo "$as_me:13551: result: ... -$cf_opt" >&5
13552 echo "${ECHO_T}... -$cf_opt" >&6
13553                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13554                 else
13555                         test -n "$verbose" && echo "$as_me:13555: result: ... no -$cf_opt" >&5
13556 echo "${ECHO_T}... no -$cf_opt" >&6
13557                 fi
13558         done
13559         CXXFLAGS="$cf_save_CXXFLAGS"
13560 fi
13561
13562 rm -rf conftest*
13563 ac_ext=c
13564 ac_cpp='$CPP $CPPFLAGS'
13565 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13566 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13567 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13568 ac_main_return=return
13569
13570         fi
13571 fi
13572
13573 if test "$GCC" = yes
13574 then
13575 cat > conftest.i <<EOF
13576 #ifndef GCC_PRINTF
13577 #define GCC_PRINTF 0
13578 #endif
13579 #ifndef GCC_SCANF
13580 #define GCC_SCANF 0
13581 #endif
13582 #ifndef GCC_NORETURN
13583 #define GCC_NORETURN /* nothing */
13584 #endif
13585 #ifndef GCC_UNUSED
13586 #define GCC_UNUSED /* nothing */
13587 #endif
13588 EOF
13589 if test "$GCC" = yes
13590 then
13591         { echo "$as_me:13591: checking for $CC __attribute__ directives..." >&5
13592 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13593 cat > conftest.$ac_ext <<EOF
13594 #line 13594 "${as_me:-configure}"
13595 #include "confdefs.h"
13596 #include "conftest.h"
13597 #include "conftest.i"
13598 #if     GCC_PRINTF
13599 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13600 #else
13601 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13602 #endif
13603 #if     GCC_SCANF
13604 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13605 #else
13606 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13607 #endif
13608 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13609 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13610 extern void foo(void) GCC_NORETURN;
13611 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13612 EOF
13613         cf_printf_attribute=no
13614         cf_scanf_attribute=no
13615         for cf_attribute in scanf printf unused noreturn
13616         do
13617
13618 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13619
13620                 cf_directive="__attribute__(($cf_attribute))"
13621                 echo "checking for $CC $cf_directive" 1>&5
13622
13623                 case $cf_attribute in
13624                 (printf)
13625                         cf_printf_attribute=yes
13626                         cat >conftest.h <<EOF
13627 #define GCC_$cf_ATTRIBUTE 1
13628 EOF
13629                         ;;
13630                 (scanf)
13631                         cf_scanf_attribute=yes
13632                         cat >conftest.h <<EOF
13633 #define GCC_$cf_ATTRIBUTE 1
13634 EOF
13635                         ;;
13636                 (*)
13637                         cat >conftest.h <<EOF
13638 #define GCC_$cf_ATTRIBUTE $cf_directive
13639 EOF
13640                         ;;
13641                 esac
13642
13643                 if { (eval echo "$as_me:13643: \"$ac_compile\"") >&5
13644   (eval $ac_compile) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit $ac_status); }; then
13648                         test -n "$verbose" && echo "$as_me:13648: result: ... $cf_attribute" >&5
13649 echo "${ECHO_T}... $cf_attribute" >&6
13650                         cat conftest.h >>confdefs.h
13651                         case $cf_attribute in
13652                         (noreturn)
13653
13654 cat >>confdefs.h <<EOF
13655 #define GCC_NORETURN $cf_directive
13656 EOF
13657
13658                                 ;;
13659                         (printf)
13660                                 cf_value='/* nothing */'
13661                                 if test "$cf_printf_attribute" != no ; then
13662                                         cf_value='__attribute__((format(printf,fmt,var)))'
13663
13664 cat >>confdefs.h <<\EOF
13665 #define GCC_PRINTF 1
13666 EOF
13667
13668                                 fi
13669
13670 cat >>confdefs.h <<EOF
13671 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13672 EOF
13673
13674                                 ;;
13675                         (scanf)
13676                                 cf_value='/* nothing */'
13677                                 if test "$cf_scanf_attribute" != no ; then
13678                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13679
13680 cat >>confdefs.h <<\EOF
13681 #define GCC_SCANF 1
13682 EOF
13683
13684                                 fi
13685
13686 cat >>confdefs.h <<EOF
13687 #define GCC_SCANFLIKE(fmt,var) $cf_value
13688 EOF
13689
13690                                 ;;
13691                         (unused)
13692
13693 cat >>confdefs.h <<EOF
13694 #define GCC_UNUSED $cf_directive
13695 EOF
13696
13697                                 ;;
13698                         esac
13699                 fi
13700         done
13701 else
13702         fgrep define conftest.i >>confdefs.h
13703 fi
13704 rm -rf conftest*
13705 fi
13706
13707 echo "$as_me:13707: checking if you want to work around bogus compiler/loader warnings" >&5
13708 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13709
13710 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13711 if test "${enable_string_hacks+set}" = set; then
13712   enableval="$enable_string_hacks"
13713   with_string_hacks=$enableval
13714 else
13715   with_string_hacks=no
13716 fi;
13717 echo "$as_me:13717: result: $with_string_hacks" >&5
13718 echo "${ECHO_T}$with_string_hacks" >&6
13719
13720 if test "x$with_string_hacks" = "xyes"; then
13721
13722 cat >>confdefs.h <<\EOF
13723 #define USE_STRING_HACKS 1
13724 EOF
13725
13726         { echo "$as_me:13726: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13727 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13728
13729 for ac_func in strlcat strlcpy snprintf
13730 do
13731 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13732 echo "$as_me:13732: checking for $ac_func" >&5
13733 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13734 if eval "test \"\${$as_ac_var+set}\" = set"; then
13735   echo $ECHO_N "(cached) $ECHO_C" >&6
13736 else
13737   cat >conftest.$ac_ext <<_ACEOF
13738 #line 13738 "configure"
13739 #include "confdefs.h"
13740 /* System header to define __stub macros and hopefully few prototypes,
13741     which can conflict with char $ac_func (); below.  */
13742 #include <assert.h>
13743 /* Override any gcc2 internal prototype to avoid an error.  */
13744 #ifdef __cplusplus
13745 extern "C"
13746 #endif
13747 /* We use char because int might match the return type of a gcc2
13748    builtin and then its argument prototype would still apply.  */
13749 char $ac_func ();
13750 char (*f) ();
13751
13752 int
13753 main ()
13754 {
13755 /* The GNU C library defines this for functions which it implements
13756     to always fail with ENOSYS.  Some functions are actually named
13757     something starting with __ and the normal name is an alias.  */
13758 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13759 choke me
13760 #else
13761 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13762 #endif
13763
13764   ;
13765   return 0;
13766 }
13767 _ACEOF
13768 rm -f conftest.$ac_objext conftest$ac_exeext
13769 if { (eval echo "$as_me:13769: \"$ac_link\"") >&5
13770   (eval $ac_link) 2>&5
13771   ac_status=$?
13772   echo "$as_me:13772: \$? = $ac_status" >&5
13773   (exit $ac_status); } &&
13774          { ac_try='test -s conftest$ac_exeext'
13775   { (eval echo "$as_me:13775: \"$ac_try\"") >&5
13776   (eval $ac_try) 2>&5
13777   ac_status=$?
13778   echo "$as_me:13778: \$? = $ac_status" >&5
13779   (exit $ac_status); }; }; then
13780   eval "$as_ac_var=yes"
13781 else
13782   echo "$as_me: failed program was:" >&5
13783 cat conftest.$ac_ext >&5
13784 eval "$as_ac_var=no"
13785 fi
13786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13787 fi
13788 echo "$as_me:13788: result: `eval echo '${'$as_ac_var'}'`" >&5
13789 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13790 if test `eval echo '${'$as_ac_var'}'` = yes; then
13791   cat >>confdefs.h <<EOF
13792 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13793 EOF
13794
13795 fi
13796 done
13797
13798 fi
13799
13800 ###     use option --enable-assertions to turn on generation of assertion code
13801 echo "$as_me:13801: checking if you want to enable runtime assertions" >&5
13802 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13803
13804 # Check whether --enable-assertions or --disable-assertions was given.
13805 if test "${enable_assertions+set}" = set; then
13806   enableval="$enable_assertions"
13807   with_assertions=$enableval
13808 else
13809   with_assertions=no
13810 fi;
13811 echo "$as_me:13811: result: $with_assertions" >&5
13812 echo "${ECHO_T}$with_assertions" >&6
13813 if test -n "$GCC"
13814 then
13815         if test "$with_assertions" = no
13816         then
13817                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13818         else
13819
13820         ADAFLAGS="$ADAFLAGS -gnata"
13821
13822         fi
13823 fi
13824
13825 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13826
13827 echo "$as_me:13827: checking if you want to use dmalloc for testing" >&5
13828 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13829
13830 # Check whether --with-dmalloc or --without-dmalloc was given.
13831 if test "${with_dmalloc+set}" = set; then
13832   withval="$with_dmalloc"
13833
13834 cat >>confdefs.h <<EOF
13835 #define USE_DMALLOC 1
13836 EOF
13837
13838         : ${with_cflags:=-g}
13839         : ${with_no_leaks:=yes}
13840          with_dmalloc=yes
13841 else
13842   with_dmalloc=
13843 fi;
13844 echo "$as_me:13844: result: ${with_dmalloc:-no}" >&5
13845 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13846
13847 case .$with_cflags in
13848 (.*-g*)
13849         case .$CFLAGS in
13850         (.*-g*)
13851                 ;;
13852         (*)
13853
13854 cf_fix_cppflags=no
13855 cf_new_cflags=
13856 cf_new_cppflags=
13857 cf_new_extra_cppflags=
13858
13859 for cf_add_cflags in -g
13860 do
13861 case $cf_fix_cppflags in
13862 (no)
13863         case $cf_add_cflags in
13864         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13865                 case $cf_add_cflags in
13866                 (-D*)
13867                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13868
13869                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13870                                 && test -z "${cf_tst_cflags}" \
13871                                 && cf_fix_cppflags=yes
13872
13873                         if test $cf_fix_cppflags = yes ; then
13874                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13875                                 continue
13876                         elif test "${cf_tst_cflags}" = "\"'" ; then
13877                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13878                                 continue
13879                         fi
13880                         ;;
13881                 esac
13882                 case "$CPPFLAGS" in
13883                 (*$cf_add_cflags)
13884                         ;;
13885                 (*)
13886                         case $cf_add_cflags in
13887                         (-D*)
13888                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13889
13890 CPPFLAGS=`echo "$CPPFLAGS" | \
13891         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13892                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13893
13894                                 ;;
13895                         esac
13896                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13897                         ;;
13898                 esac
13899                 ;;
13900         (*)
13901                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13902                 ;;
13903         esac
13904         ;;
13905 (yes)
13906         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13907
13908         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13909
13910         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13911                 && test -z "${cf_tst_cflags}" \
13912                 && cf_fix_cppflags=no
13913         ;;
13914 esac
13915 done
13916
13917 if test -n "$cf_new_cflags" ; then
13918
13919         CFLAGS="$CFLAGS $cf_new_cflags"
13920 fi
13921
13922 if test -n "$cf_new_cppflags" ; then
13923
13924         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13925 fi
13926
13927 if test -n "$cf_new_extra_cppflags" ; then
13928
13929         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13930 fi
13931
13932                 ;;
13933         esac
13934         ;;
13935 esac
13936
13937 if test "$with_dmalloc" = yes ; then
13938         echo "$as_me:13938: checking for dmalloc.h" >&5
13939 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13940 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13941   echo $ECHO_N "(cached) $ECHO_C" >&6
13942 else
13943   cat >conftest.$ac_ext <<_ACEOF
13944 #line 13944 "configure"
13945 #include "confdefs.h"
13946 #include <dmalloc.h>
13947 _ACEOF
13948 if { (eval echo "$as_me:13948: \"$ac_cpp conftest.$ac_ext\"") >&5
13949   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13950   ac_status=$?
13951   egrep -v '^ *\+' conftest.er1 >conftest.err
13952   rm -f conftest.er1
13953   cat conftest.err >&5
13954   echo "$as_me:13954: \$? = $ac_status" >&5
13955   (exit $ac_status); } >/dev/null; then
13956   if test -s conftest.err; then
13957     ac_cpp_err=$ac_c_preproc_warn_flag
13958   else
13959     ac_cpp_err=
13960   fi
13961 else
13962   ac_cpp_err=yes
13963 fi
13964 if test -z "$ac_cpp_err"; then
13965   ac_cv_header_dmalloc_h=yes
13966 else
13967   echo "$as_me: failed program was:" >&5
13968   cat conftest.$ac_ext >&5
13969   ac_cv_header_dmalloc_h=no
13970 fi
13971 rm -f conftest.err conftest.$ac_ext
13972 fi
13973 echo "$as_me:13973: result: $ac_cv_header_dmalloc_h" >&5
13974 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13975 if test $ac_cv_header_dmalloc_h = yes; then
13976
13977 echo "$as_me:13977: checking for dmalloc_debug in -ldmalloc" >&5
13978 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13979 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13980   echo $ECHO_N "(cached) $ECHO_C" >&6
13981 else
13982   ac_check_lib_save_LIBS=$LIBS
13983 LIBS="-ldmalloc  $LIBS"
13984 cat >conftest.$ac_ext <<_ACEOF
13985 #line 13985 "configure"
13986 #include "confdefs.h"
13987
13988 /* Override any gcc2 internal prototype to avoid an error.  */
13989 #ifdef __cplusplus
13990 extern "C"
13991 #endif
13992 /* We use char because int might match the return type of a gcc2
13993    builtin and then its argument prototype would still apply.  */
13994 char dmalloc_debug ();
13995 int
13996 main ()
13997 {
13998 dmalloc_debug ();
13999   ;
14000   return 0;
14001 }
14002 _ACEOF
14003 rm -f conftest.$ac_objext conftest$ac_exeext
14004 if { (eval echo "$as_me:14004: \"$ac_link\"") >&5
14005   (eval $ac_link) 2>&5
14006   ac_status=$?
14007   echo "$as_me:14007: \$? = $ac_status" >&5
14008   (exit $ac_status); } &&
14009          { ac_try='test -s conftest$ac_exeext'
14010   { (eval echo "$as_me:14010: \"$ac_try\"") >&5
14011   (eval $ac_try) 2>&5
14012   ac_status=$?
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit $ac_status); }; }; then
14015   ac_cv_lib_dmalloc_dmalloc_debug=yes
14016 else
14017   echo "$as_me: failed program was:" >&5
14018 cat conftest.$ac_ext >&5
14019 ac_cv_lib_dmalloc_dmalloc_debug=no
14020 fi
14021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14022 LIBS=$ac_check_lib_save_LIBS
14023 fi
14024 echo "$as_me:14024: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14025 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14026 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14027   cat >>confdefs.h <<EOF
14028 #define HAVE_LIBDMALLOC 1
14029 EOF
14030
14031   LIBS="-ldmalloc $LIBS"
14032
14033 fi
14034
14035 fi
14036
14037 fi
14038
14039 echo "$as_me:14039: checking if you want to use dbmalloc for testing" >&5
14040 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14041
14042 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14043 if test "${with_dbmalloc+set}" = set; then
14044   withval="$with_dbmalloc"
14045
14046 cat >>confdefs.h <<EOF
14047 #define USE_DBMALLOC 1
14048 EOF
14049
14050         : ${with_cflags:=-g}
14051         : ${with_no_leaks:=yes}
14052          with_dbmalloc=yes
14053 else
14054   with_dbmalloc=
14055 fi;
14056 echo "$as_me:14056: result: ${with_dbmalloc:-no}" >&5
14057 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14058
14059 case .$with_cflags in
14060 (.*-g*)
14061         case .$CFLAGS in
14062         (.*-g*)
14063                 ;;
14064         (*)
14065
14066 cf_fix_cppflags=no
14067 cf_new_cflags=
14068 cf_new_cppflags=
14069 cf_new_extra_cppflags=
14070
14071 for cf_add_cflags in -g
14072 do
14073 case $cf_fix_cppflags in
14074 (no)
14075         case $cf_add_cflags in
14076         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14077                 case $cf_add_cflags in
14078                 (-D*)
14079                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14080
14081                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14082                                 && test -z "${cf_tst_cflags}" \
14083                                 && cf_fix_cppflags=yes
14084
14085                         if test $cf_fix_cppflags = yes ; then
14086                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14087                                 continue
14088                         elif test "${cf_tst_cflags}" = "\"'" ; then
14089                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14090                                 continue
14091                         fi
14092                         ;;
14093                 esac
14094                 case "$CPPFLAGS" in
14095                 (*$cf_add_cflags)
14096                         ;;
14097                 (*)
14098                         case $cf_add_cflags in
14099                         (-D*)
14100                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14101
14102 CPPFLAGS=`echo "$CPPFLAGS" | \
14103         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14104                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14105
14106                                 ;;
14107                         esac
14108                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14109                         ;;
14110                 esac
14111                 ;;
14112         (*)
14113                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14114                 ;;
14115         esac
14116         ;;
14117 (yes)
14118         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14119
14120         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14121
14122         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14123                 && test -z "${cf_tst_cflags}" \
14124                 && cf_fix_cppflags=no
14125         ;;
14126 esac
14127 done
14128
14129 if test -n "$cf_new_cflags" ; then
14130
14131         CFLAGS="$CFLAGS $cf_new_cflags"
14132 fi
14133
14134 if test -n "$cf_new_cppflags" ; then
14135
14136         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14137 fi
14138
14139 if test -n "$cf_new_extra_cppflags" ; then
14140
14141         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14142 fi
14143
14144                 ;;
14145         esac
14146         ;;
14147 esac
14148
14149 if test "$with_dbmalloc" = yes ; then
14150         echo "$as_me:14150: checking for dbmalloc.h" >&5
14151 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14152 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14153   echo $ECHO_N "(cached) $ECHO_C" >&6
14154 else
14155   cat >conftest.$ac_ext <<_ACEOF
14156 #line 14156 "configure"
14157 #include "confdefs.h"
14158 #include <dbmalloc.h>
14159 _ACEOF
14160 if { (eval echo "$as_me:14160: \"$ac_cpp conftest.$ac_ext\"") >&5
14161   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14162   ac_status=$?
14163   egrep -v '^ *\+' conftest.er1 >conftest.err
14164   rm -f conftest.er1
14165   cat conftest.err >&5
14166   echo "$as_me:14166: \$? = $ac_status" >&5
14167   (exit $ac_status); } >/dev/null; then
14168   if test -s conftest.err; then
14169     ac_cpp_err=$ac_c_preproc_warn_flag
14170   else
14171     ac_cpp_err=
14172   fi
14173 else
14174   ac_cpp_err=yes
14175 fi
14176 if test -z "$ac_cpp_err"; then
14177   ac_cv_header_dbmalloc_h=yes
14178 else
14179   echo "$as_me: failed program was:" >&5
14180   cat conftest.$ac_ext >&5
14181   ac_cv_header_dbmalloc_h=no
14182 fi
14183 rm -f conftest.err conftest.$ac_ext
14184 fi
14185 echo "$as_me:14185: result: $ac_cv_header_dbmalloc_h" >&5
14186 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14187 if test $ac_cv_header_dbmalloc_h = yes; then
14188
14189 echo "$as_me:14189: checking for debug_malloc in -ldbmalloc" >&5
14190 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14191 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14192   echo $ECHO_N "(cached) $ECHO_C" >&6
14193 else
14194   ac_check_lib_save_LIBS=$LIBS
14195 LIBS="-ldbmalloc  $LIBS"
14196 cat >conftest.$ac_ext <<_ACEOF
14197 #line 14197 "configure"
14198 #include "confdefs.h"
14199
14200 /* Override any gcc2 internal prototype to avoid an error.  */
14201 #ifdef __cplusplus
14202 extern "C"
14203 #endif
14204 /* We use char because int might match the return type of a gcc2
14205    builtin and then its argument prototype would still apply.  */
14206 char debug_malloc ();
14207 int
14208 main ()
14209 {
14210 debug_malloc ();
14211   ;
14212   return 0;
14213 }
14214 _ACEOF
14215 rm -f conftest.$ac_objext conftest$ac_exeext
14216 if { (eval echo "$as_me:14216: \"$ac_link\"") >&5
14217   (eval $ac_link) 2>&5
14218   ac_status=$?
14219   echo "$as_me:14219: \$? = $ac_status" >&5
14220   (exit $ac_status); } &&
14221          { ac_try='test -s conftest$ac_exeext'
14222   { (eval echo "$as_me:14222: \"$ac_try\"") >&5
14223   (eval $ac_try) 2>&5
14224   ac_status=$?
14225   echo "$as_me:14225: \$? = $ac_status" >&5
14226   (exit $ac_status); }; }; then
14227   ac_cv_lib_dbmalloc_debug_malloc=yes
14228 else
14229   echo "$as_me: failed program was:" >&5
14230 cat conftest.$ac_ext >&5
14231 ac_cv_lib_dbmalloc_debug_malloc=no
14232 fi
14233 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14234 LIBS=$ac_check_lib_save_LIBS
14235 fi
14236 echo "$as_me:14236: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14237 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14238 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14239   cat >>confdefs.h <<EOF
14240 #define HAVE_LIBDBMALLOC 1
14241 EOF
14242
14243   LIBS="-ldbmalloc $LIBS"
14244
14245 fi
14246
14247 fi
14248
14249 fi
14250
14251 echo "$as_me:14251: checking if you want to use valgrind for testing" >&5
14252 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14253
14254 # Check whether --with-valgrind or --without-valgrind was given.
14255 if test "${with_valgrind+set}" = set; then
14256   withval="$with_valgrind"
14257
14258 cat >>confdefs.h <<EOF
14259 #define USE_VALGRIND 1
14260 EOF
14261
14262         : ${with_cflags:=-g}
14263         : ${with_no_leaks:=yes}
14264          with_valgrind=yes
14265 else
14266   with_valgrind=
14267 fi;
14268 echo "$as_me:14268: result: ${with_valgrind:-no}" >&5
14269 echo "${ECHO_T}${with_valgrind:-no}" >&6
14270
14271 case .$with_cflags in
14272 (.*-g*)
14273         case .$CFLAGS in
14274         (.*-g*)
14275                 ;;
14276         (*)
14277
14278 cf_fix_cppflags=no
14279 cf_new_cflags=
14280 cf_new_cppflags=
14281 cf_new_extra_cppflags=
14282
14283 for cf_add_cflags in -g
14284 do
14285 case $cf_fix_cppflags in
14286 (no)
14287         case $cf_add_cflags in
14288         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14289                 case $cf_add_cflags in
14290                 (-D*)
14291                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14292
14293                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14294                                 && test -z "${cf_tst_cflags}" \
14295                                 && cf_fix_cppflags=yes
14296
14297                         if test $cf_fix_cppflags = yes ; then
14298                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14299                                 continue
14300                         elif test "${cf_tst_cflags}" = "\"'" ; then
14301                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14302                                 continue
14303                         fi
14304                         ;;
14305                 esac
14306                 case "$CPPFLAGS" in
14307                 (*$cf_add_cflags)
14308                         ;;
14309                 (*)
14310                         case $cf_add_cflags in
14311                         (-D*)
14312                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14313
14314 CPPFLAGS=`echo "$CPPFLAGS" | \
14315         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14316                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14317
14318                                 ;;
14319                         esac
14320                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14321                         ;;
14322                 esac
14323                 ;;
14324         (*)
14325                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14326                 ;;
14327         esac
14328         ;;
14329 (yes)
14330         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14331
14332         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14333
14334         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14335                 && test -z "${cf_tst_cflags}" \
14336                 && cf_fix_cppflags=no
14337         ;;
14338 esac
14339 done
14340
14341 if test -n "$cf_new_cflags" ; then
14342
14343         CFLAGS="$CFLAGS $cf_new_cflags"
14344 fi
14345
14346 if test -n "$cf_new_cppflags" ; then
14347
14348         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14349 fi
14350
14351 if test -n "$cf_new_extra_cppflags" ; then
14352
14353         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14354 fi
14355
14356                 ;;
14357         esac
14358         ;;
14359 esac
14360
14361 echo "$as_me:14361: checking if you want to perform memory-leak testing" >&5
14362 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14363
14364 # Check whether --enable-leaks or --disable-leaks was given.
14365 if test "${enable_leaks+set}" = set; then
14366   enableval="$enable_leaks"
14367   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14368 else
14369   : ${with_no_leaks:=no}
14370 fi;
14371 echo "$as_me:14371: result: $with_no_leaks" >&5
14372 echo "${ECHO_T}$with_no_leaks" >&6
14373
14374 if test "$with_no_leaks" = yes ; then
14375
14376 cat >>confdefs.h <<\EOF
14377 #define NO_LEAKS 1
14378 EOF
14379
14380 cat >>confdefs.h <<\EOF
14381 #define YY_NO_LEAKS 1
14382 EOF
14383
14384 fi
14385
14386 cat >>confdefs.h <<\EOF
14387 #define HAVE_NC_ALLOC_H 1
14388 EOF
14389
14390 ###     use option --enable-expanded to generate certain macros as functions
14391
14392 # Check whether --enable-expanded or --disable-expanded was given.
14393 if test "${enable_expanded+set}" = set; then
14394   enableval="$enable_expanded"
14395   test "x$enableval" = xyes &&
14396 cat >>confdefs.h <<\EOF
14397 #define NCURSES_EXPANDED 1
14398 EOF
14399
14400 fi;
14401
14402 ###     use option --disable-macros to suppress macros in favor of functions
14403
14404 # Check whether --enable-macros or --disable-macros was given.
14405 if test "${enable_macros+set}" = set; then
14406   enableval="$enable_macros"
14407   test "$enableval" = no &&
14408 cat >>confdefs.h <<\EOF
14409 #define NCURSES_NOMACROS 1
14410 EOF
14411
14412 fi;
14413
14414 # Normally we only add trace() to the debug-library.  Allow this to be
14415 # extended to all models of the ncurses library:
14416 cf_all_traces=no
14417 case "$CFLAGS $CPPFLAGS" in
14418 (*-DTRACE*)
14419         cf_all_traces=yes
14420         ;;
14421 esac
14422
14423 echo "$as_me:14423: checking whether to add trace feature to all models" >&5
14424 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14425
14426 # Check whether --with-trace or --without-trace was given.
14427 if test "${with_trace+set}" = set; then
14428   withval="$with_trace"
14429   cf_with_trace=$withval
14430 else
14431   cf_with_trace=$cf_all_traces
14432 fi;
14433 echo "$as_me:14433: result: $cf_with_trace" >&5
14434 echo "${ECHO_T}$cf_with_trace" >&6
14435
14436 if test "x$cf_with_trace" = xyes ; then
14437         LIB_TRACING=all
14438         ADA_TRACE=TRUE
14439
14440 cf_fix_cppflags=no
14441 cf_new_cflags=
14442 cf_new_cppflags=
14443 cf_new_extra_cppflags=
14444
14445 for cf_add_cflags in -DTRACE
14446 do
14447 case $cf_fix_cppflags in
14448 (no)
14449         case $cf_add_cflags in
14450         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14451                 case $cf_add_cflags in
14452                 (-D*)
14453                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14454
14455                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14456                                 && test -z "${cf_tst_cflags}" \
14457                                 && cf_fix_cppflags=yes
14458
14459                         if test $cf_fix_cppflags = yes ; then
14460                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14461                                 continue
14462                         elif test "${cf_tst_cflags}" = "\"'" ; then
14463                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14464                                 continue
14465                         fi
14466                         ;;
14467                 esac
14468                 case "$CPPFLAGS" in
14469                 (*$cf_add_cflags)
14470                         ;;
14471                 (*)
14472                         case $cf_add_cflags in
14473                         (-D*)
14474                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14475
14476 CPPFLAGS=`echo "$CPPFLAGS" | \
14477         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14478                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14479
14480                                 ;;
14481                         esac
14482                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14483                         ;;
14484                 esac
14485                 ;;
14486         (*)
14487                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14488                 ;;
14489         esac
14490         ;;
14491 (yes)
14492         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14493
14494         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14495
14496         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14497                 && test -z "${cf_tst_cflags}" \
14498                 && cf_fix_cppflags=no
14499         ;;
14500 esac
14501 done
14502
14503 if test -n "$cf_new_cflags" ; then
14504
14505         CFLAGS="$CFLAGS $cf_new_cflags"
14506 fi
14507
14508 if test -n "$cf_new_cppflags" ; then
14509
14510         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14511 fi
14512
14513 if test -n "$cf_new_extra_cppflags" ; then
14514
14515         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14516 fi
14517
14518 else
14519         LIB_TRACING=DEBUG
14520         ADA_TRACE=FALSE
14521 fi
14522
14523 echo "$as_me:14523: checking if we want to use GNAT projects" >&5
14524 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14525
14526 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14527 if test "${enable_gnat_projects+set}" = set; then
14528   enableval="$enable_gnat_projects"
14529   test "$enableval" != no && enableval=yes
14530         if test "$enableval" != "yes" ; then
14531     enable_gnat_projects=no
14532         else
14533                 enable_gnat_projects=yes
14534         fi
14535 else
14536   enableval=yes
14537         enable_gnat_projects=yes
14538
14539 fi;
14540 echo "$as_me:14540: result: $enable_gnat_projects" >&5
14541 echo "${ECHO_T}$enable_gnat_projects" >&6
14542
14543 ###     Checks for libraries.
14544 case $cf_cv_system_name in
14545 (*mingw32*|*mingw64*)
14546         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
14547         LIBS=" -lpsapi $LIBS"
14548         ;;
14549 (*)
14550 echo "$as_me:14550: checking for gettimeofday" >&5
14551 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14552 if test "${ac_cv_func_gettimeofday+set}" = set; then
14553   echo $ECHO_N "(cached) $ECHO_C" >&6
14554 else
14555   cat >conftest.$ac_ext <<_ACEOF
14556 #line 14556 "configure"
14557 #include "confdefs.h"
14558 /* System header to define __stub macros and hopefully few prototypes,
14559     which can conflict with char gettimeofday (); below.  */
14560 #include <assert.h>
14561 /* Override any gcc2 internal prototype to avoid an error.  */
14562 #ifdef __cplusplus
14563 extern "C"
14564 #endif
14565 /* We use char because int might match the return type of a gcc2
14566    builtin and then its argument prototype would still apply.  */
14567 char gettimeofday ();
14568 char (*f) ();
14569
14570 int
14571 main ()
14572 {
14573 /* The GNU C library defines this for functions which it implements
14574     to always fail with ENOSYS.  Some functions are actually named
14575     something starting with __ and the normal name is an alias.  */
14576 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14577 choke me
14578 #else
14579 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14580 #endif
14581
14582   ;
14583   return 0;
14584 }
14585 _ACEOF
14586 rm -f conftest.$ac_objext conftest$ac_exeext
14587 if { (eval echo "$as_me:14587: \"$ac_link\"") >&5
14588   (eval $ac_link) 2>&5
14589   ac_status=$?
14590   echo "$as_me:14590: \$? = $ac_status" >&5
14591   (exit $ac_status); } &&
14592          { ac_try='test -s conftest$ac_exeext'
14593   { (eval echo "$as_me:14593: \"$ac_try\"") >&5
14594   (eval $ac_try) 2>&5
14595   ac_status=$?
14596   echo "$as_me:14596: \$? = $ac_status" >&5
14597   (exit $ac_status); }; }; then
14598   ac_cv_func_gettimeofday=yes
14599 else
14600   echo "$as_me: failed program was:" >&5
14601 cat conftest.$ac_ext >&5
14602 ac_cv_func_gettimeofday=no
14603 fi
14604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14605 fi
14606 echo "$as_me:14606: result: $ac_cv_func_gettimeofday" >&5
14607 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14608 if test $ac_cv_func_gettimeofday = yes; then
14609
14610 cat >>confdefs.h <<\EOF
14611 #define HAVE_GETTIMEOFDAY 1
14612 EOF
14613
14614 else
14615
14616 echo "$as_me:14616: checking for gettimeofday in -lbsd" >&5
14617 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14618 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14619   echo $ECHO_N "(cached) $ECHO_C" >&6
14620 else
14621   ac_check_lib_save_LIBS=$LIBS
14622 LIBS="-lbsd  $LIBS"
14623 cat >conftest.$ac_ext <<_ACEOF
14624 #line 14624 "configure"
14625 #include "confdefs.h"
14626
14627 /* Override any gcc2 internal prototype to avoid an error.  */
14628 #ifdef __cplusplus
14629 extern "C"
14630 #endif
14631 /* We use char because int might match the return type of a gcc2
14632    builtin and then its argument prototype would still apply.  */
14633 char gettimeofday ();
14634 int
14635 main ()
14636 {
14637 gettimeofday ();
14638   ;
14639   return 0;
14640 }
14641 _ACEOF
14642 rm -f conftest.$ac_objext conftest$ac_exeext
14643 if { (eval echo "$as_me:14643: \"$ac_link\"") >&5
14644   (eval $ac_link) 2>&5
14645   ac_status=$?
14646   echo "$as_me:14646: \$? = $ac_status" >&5
14647   (exit $ac_status); } &&
14648          { ac_try='test -s conftest$ac_exeext'
14649   { (eval echo "$as_me:14649: \"$ac_try\"") >&5
14650   (eval $ac_try) 2>&5
14651   ac_status=$?
14652   echo "$as_me:14652: \$? = $ac_status" >&5
14653   (exit $ac_status); }; }; then
14654   ac_cv_lib_bsd_gettimeofday=yes
14655 else
14656   echo "$as_me: failed program was:" >&5
14657 cat conftest.$ac_ext >&5
14658 ac_cv_lib_bsd_gettimeofday=no
14659 fi
14660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14661 LIBS=$ac_check_lib_save_LIBS
14662 fi
14663 echo "$as_me:14663: result: $ac_cv_lib_bsd_gettimeofday" >&5
14664 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14665 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14666
14667 cat >>confdefs.h <<\EOF
14668 #define HAVE_GETTIMEOFDAY 1
14669 EOF
14670
14671 cf_add_libs="-lbsd"
14672 # Filter out duplicates - this happens with badly-designed ".pc" files...
14673 for cf_add_1lib in $LIBS
14674 do
14675         for cf_add_2lib in $cf_add_libs
14676         do
14677                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14678                 then
14679                         cf_add_1lib=
14680                         break
14681                 fi
14682         done
14683         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14684 done
14685 LIBS="$cf_add_libs"
14686
14687 fi
14688
14689 fi
14690         ;;
14691 esac
14692
14693 echo "$as_me:14693: checking if -lm needed for math functions" >&5
14694 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14695 if test "${cf_cv_need_libm+set}" = set; then
14696   echo $ECHO_N "(cached) $ECHO_C" >&6
14697 else
14698
14699         cat >conftest.$ac_ext <<_ACEOF
14700 #line 14700 "configure"
14701 #include "confdefs.h"
14702
14703         #include <stdio.h>
14704         #include <math.h>
14705
14706 int
14707 main ()
14708 {
14709 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14710   ;
14711   return 0;
14712 }
14713 _ACEOF
14714 rm -f conftest.$ac_objext conftest$ac_exeext
14715 if { (eval echo "$as_me:14715: \"$ac_link\"") >&5
14716   (eval $ac_link) 2>&5
14717   ac_status=$?
14718   echo "$as_me:14718: \$? = $ac_status" >&5
14719   (exit $ac_status); } &&
14720          { ac_try='test -s conftest$ac_exeext'
14721   { (eval echo "$as_me:14721: \"$ac_try\"") >&5
14722   (eval $ac_try) 2>&5
14723   ac_status=$?
14724   echo "$as_me:14724: \$? = $ac_status" >&5
14725   (exit $ac_status); }; }; then
14726   cf_cv_need_libm=no
14727 else
14728   echo "$as_me: failed program was:" >&5
14729 cat conftest.$ac_ext >&5
14730 cf_cv_need_libm=yes
14731 fi
14732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14733 fi
14734 echo "$as_me:14734: result: $cf_cv_need_libm" >&5
14735 echo "${ECHO_T}$cf_cv_need_libm" >&6
14736 if test "$cf_cv_need_libm" = yes
14737 then
14738 MATH_LIB=-lm
14739 fi
14740
14741 ###     Checks for header files.
14742 echo "$as_me:14742: checking for ANSI C header files" >&5
14743 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14744 if test "${ac_cv_header_stdc+set}" = set; then
14745   echo $ECHO_N "(cached) $ECHO_C" >&6
14746 else
14747   cat >conftest.$ac_ext <<_ACEOF
14748 #line 14748 "configure"
14749 #include "confdefs.h"
14750 #include <stdlib.h>
14751 #include <stdarg.h>
14752 #include <string.h>
14753 #include <float.h>
14754
14755 _ACEOF
14756 if { (eval echo "$as_me:14756: \"$ac_cpp conftest.$ac_ext\"") >&5
14757   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14758   ac_status=$?
14759   egrep -v '^ *\+' conftest.er1 >conftest.err
14760   rm -f conftest.er1
14761   cat conftest.err >&5
14762   echo "$as_me:14762: \$? = $ac_status" >&5
14763   (exit $ac_status); } >/dev/null; then
14764   if test -s conftest.err; then
14765     ac_cpp_err=$ac_c_preproc_warn_flag
14766   else
14767     ac_cpp_err=
14768   fi
14769 else
14770   ac_cpp_err=yes
14771 fi
14772 if test -z "$ac_cpp_err"; then
14773   ac_cv_header_stdc=yes
14774 else
14775   echo "$as_me: failed program was:" >&5
14776   cat conftest.$ac_ext >&5
14777   ac_cv_header_stdc=no
14778 fi
14779 rm -f conftest.err conftest.$ac_ext
14780
14781 if test $ac_cv_header_stdc = yes; then
14782   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14783   cat >conftest.$ac_ext <<_ACEOF
14784 #line 14784 "configure"
14785 #include "confdefs.h"
14786 #include <string.h>
14787
14788 _ACEOF
14789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14790   egrep "memchr" >/dev/null 2>&1; then
14791   :
14792 else
14793   ac_cv_header_stdc=no
14794 fi
14795 rm -rf conftest*
14796
14797 fi
14798
14799 if test $ac_cv_header_stdc = yes; then
14800   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14801   cat >conftest.$ac_ext <<_ACEOF
14802 #line 14802 "configure"
14803 #include "confdefs.h"
14804 #include <stdlib.h>
14805
14806 _ACEOF
14807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14808   egrep "free" >/dev/null 2>&1; then
14809   :
14810 else
14811   ac_cv_header_stdc=no
14812 fi
14813 rm -rf conftest*
14814
14815 fi
14816
14817 if test $ac_cv_header_stdc = yes; then
14818   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14819   if test "$cross_compiling" = yes; then
14820   :
14821 else
14822   cat >conftest.$ac_ext <<_ACEOF
14823 #line 14823 "configure"
14824 #include "confdefs.h"
14825 #include <ctype.h>
14826 #if ((' ' & 0x0FF) == 0x020)
14827 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14828 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14829 #else
14830 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14831                      || ('j' <= (c) && (c) <= 'r') \
14832                      || ('s' <= (c) && (c) <= 'z'))
14833 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14834 #endif
14835
14836 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14837 int
14838 main ()
14839 {
14840   int i;
14841   for (i = 0; i < 256; i++)
14842     if (XOR (islower (i), ISLOWER (i))
14843         || toupper (i) != TOUPPER (i))
14844       $ac_main_return(2);
14845   $ac_main_return (0);
14846 }
14847 _ACEOF
14848 rm -f conftest$ac_exeext
14849 if { (eval echo "$as_me:14849: \"$ac_link\"") >&5
14850   (eval $ac_link) 2>&5
14851   ac_status=$?
14852   echo "$as_me:14852: \$? = $ac_status" >&5
14853   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14854   { (eval echo "$as_me:14854: \"$ac_try\"") >&5
14855   (eval $ac_try) 2>&5
14856   ac_status=$?
14857   echo "$as_me:14857: \$? = $ac_status" >&5
14858   (exit $ac_status); }; }; then
14859   :
14860 else
14861   echo "$as_me: program exited with status $ac_status" >&5
14862 echo "$as_me: failed program was:" >&5
14863 cat conftest.$ac_ext >&5
14864 ac_cv_header_stdc=no
14865 fi
14866 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14867 fi
14868 fi
14869 fi
14870 echo "$as_me:14870: result: $ac_cv_header_stdc" >&5
14871 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14872 if test $ac_cv_header_stdc = yes; then
14873
14874 cat >>confdefs.h <<\EOF
14875 #define STDC_HEADERS 1
14876 EOF
14877
14878 fi
14879
14880 ac_header_dirent=no
14881 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14882   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14883 echo "$as_me:14883: checking for $ac_hdr that defines DIR" >&5
14884 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14885 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14886   echo $ECHO_N "(cached) $ECHO_C" >&6
14887 else
14888   cat >conftest.$ac_ext <<_ACEOF
14889 #line 14889 "configure"
14890 #include "confdefs.h"
14891 #include <sys/types.h>
14892 #include <$ac_hdr>
14893
14894 int
14895 main ()
14896 {
14897 if ((DIR *) 0)
14898 return 0;
14899   ;
14900   return 0;
14901 }
14902 _ACEOF
14903 rm -f conftest.$ac_objext
14904 if { (eval echo "$as_me:14904: \"$ac_compile\"") >&5
14905   (eval $ac_compile) 2>&5
14906   ac_status=$?
14907   echo "$as_me:14907: \$? = $ac_status" >&5
14908   (exit $ac_status); } &&
14909          { ac_try='test -s conftest.$ac_objext'
14910   { (eval echo "$as_me:14910: \"$ac_try\"") >&5
14911   (eval $ac_try) 2>&5
14912   ac_status=$?
14913   echo "$as_me:14913: \$? = $ac_status" >&5
14914   (exit $ac_status); }; }; then
14915   eval "$as_ac_Header=yes"
14916 else
14917   echo "$as_me: failed program was:" >&5
14918 cat conftest.$ac_ext >&5
14919 eval "$as_ac_Header=no"
14920 fi
14921 rm -f conftest.$ac_objext conftest.$ac_ext
14922 fi
14923 echo "$as_me:14923: result: `eval echo '${'$as_ac_Header'}'`" >&5
14924 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14925 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14926   cat >>confdefs.h <<EOF
14927 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14928 EOF
14929
14930 ac_header_dirent=$ac_hdr; break
14931 fi
14932
14933 done
14934 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14935 if test $ac_header_dirent = dirent.h; then
14936   echo "$as_me:14936: checking for opendir in -ldir" >&5
14937 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14938 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14939   echo $ECHO_N "(cached) $ECHO_C" >&6
14940 else
14941   ac_check_lib_save_LIBS=$LIBS
14942 LIBS="-ldir  $LIBS"
14943 cat >conftest.$ac_ext <<_ACEOF
14944 #line 14944 "configure"
14945 #include "confdefs.h"
14946
14947 /* Override any gcc2 internal prototype to avoid an error.  */
14948 #ifdef __cplusplus
14949 extern "C"
14950 #endif
14951 /* We use char because int might match the return type of a gcc2
14952    builtin and then its argument prototype would still apply.  */
14953 char opendir ();
14954 int
14955 main ()
14956 {
14957 opendir ();
14958   ;
14959   return 0;
14960 }
14961 _ACEOF
14962 rm -f conftest.$ac_objext conftest$ac_exeext
14963 if { (eval echo "$as_me:14963: \"$ac_link\"") >&5
14964   (eval $ac_link) 2>&5
14965   ac_status=$?
14966   echo "$as_me:14966: \$? = $ac_status" >&5
14967   (exit $ac_status); } &&
14968          { ac_try='test -s conftest$ac_exeext'
14969   { (eval echo "$as_me:14969: \"$ac_try\"") >&5
14970   (eval $ac_try) 2>&5
14971   ac_status=$?
14972   echo "$as_me:14972: \$? = $ac_status" >&5
14973   (exit $ac_status); }; }; then
14974   ac_cv_lib_dir_opendir=yes
14975 else
14976   echo "$as_me: failed program was:" >&5
14977 cat conftest.$ac_ext >&5
14978 ac_cv_lib_dir_opendir=no
14979 fi
14980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14981 LIBS=$ac_check_lib_save_LIBS
14982 fi
14983 echo "$as_me:14983: result: $ac_cv_lib_dir_opendir" >&5
14984 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14985 if test $ac_cv_lib_dir_opendir = yes; then
14986   LIBS="$LIBS -ldir"
14987 fi
14988
14989 else
14990   echo "$as_me:14990: checking for opendir in -lx" >&5
14991 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14992 if test "${ac_cv_lib_x_opendir+set}" = set; then
14993   echo $ECHO_N "(cached) $ECHO_C" >&6
14994 else
14995   ac_check_lib_save_LIBS=$LIBS
14996 LIBS="-lx  $LIBS"
14997 cat >conftest.$ac_ext <<_ACEOF
14998 #line 14998 "configure"
14999 #include "confdefs.h"
15000
15001 /* Override any gcc2 internal prototype to avoid an error.  */
15002 #ifdef __cplusplus
15003 extern "C"
15004 #endif
15005 /* We use char because int might match the return type of a gcc2
15006    builtin and then its argument prototype would still apply.  */
15007 char opendir ();
15008 int
15009 main ()
15010 {
15011 opendir ();
15012   ;
15013   return 0;
15014 }
15015 _ACEOF
15016 rm -f conftest.$ac_objext conftest$ac_exeext
15017 if { (eval echo "$as_me:15017: \"$ac_link\"") >&5
15018   (eval $ac_link) 2>&5
15019   ac_status=$?
15020   echo "$as_me:15020: \$? = $ac_status" >&5
15021   (exit $ac_status); } &&
15022          { ac_try='test -s conftest$ac_exeext'
15023   { (eval echo "$as_me:15023: \"$ac_try\"") >&5
15024   (eval $ac_try) 2>&5
15025   ac_status=$?
15026   echo "$as_me:15026: \$? = $ac_status" >&5
15027   (exit $ac_status); }; }; then
15028   ac_cv_lib_x_opendir=yes
15029 else
15030   echo "$as_me: failed program was:" >&5
15031 cat conftest.$ac_ext >&5
15032 ac_cv_lib_x_opendir=no
15033 fi
15034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15035 LIBS=$ac_check_lib_save_LIBS
15036 fi
15037 echo "$as_me:15037: result: $ac_cv_lib_x_opendir" >&5
15038 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15039 if test $ac_cv_lib_x_opendir = yes; then
15040   LIBS="$LIBS -lx"
15041 fi
15042
15043 fi
15044
15045 echo "$as_me:15045: checking whether time.h and sys/time.h may both be included" >&5
15046 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15047 if test "${ac_cv_header_time+set}" = set; then
15048   echo $ECHO_N "(cached) $ECHO_C" >&6
15049 else
15050   cat >conftest.$ac_ext <<_ACEOF
15051 #line 15051 "configure"
15052 #include "confdefs.h"
15053 #include <sys/types.h>
15054 #include <sys/time.h>
15055 #include <time.h>
15056
15057 int
15058 main ()
15059 {
15060 if ((struct tm *) 0)
15061 return 0;
15062   ;
15063   return 0;
15064 }
15065 _ACEOF
15066 rm -f conftest.$ac_objext
15067 if { (eval echo "$as_me:15067: \"$ac_compile\"") >&5
15068   (eval $ac_compile) 2>&5
15069   ac_status=$?
15070   echo "$as_me:15070: \$? = $ac_status" >&5
15071   (exit $ac_status); } &&
15072          { ac_try='test -s conftest.$ac_objext'
15073   { (eval echo "$as_me:15073: \"$ac_try\"") >&5
15074   (eval $ac_try) 2>&5
15075   ac_status=$?
15076   echo "$as_me:15076: \$? = $ac_status" >&5
15077   (exit $ac_status); }; }; then
15078   ac_cv_header_time=yes
15079 else
15080   echo "$as_me: failed program was:" >&5
15081 cat conftest.$ac_ext >&5
15082 ac_cv_header_time=no
15083 fi
15084 rm -f conftest.$ac_objext conftest.$ac_ext
15085 fi
15086 echo "$as_me:15086: result: $ac_cv_header_time" >&5
15087 echo "${ECHO_T}$ac_cv_header_time" >&6
15088 if test $ac_cv_header_time = yes; then
15089
15090 cat >>confdefs.h <<\EOF
15091 #define TIME_WITH_SYS_TIME 1
15092 EOF
15093
15094 fi
15095
15096 cf_regex_func=no
15097
15098 cf_regex_libs="regex re"
15099 case $host_os in
15100 (mingw*)
15101         cf_regex_libs="gnurx $cf_regex_libs"
15102         ;;
15103 esac
15104
15105 echo "$as_me:15105: checking for regcomp" >&5
15106 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15107 if test "${ac_cv_func_regcomp+set}" = set; then
15108   echo $ECHO_N "(cached) $ECHO_C" >&6
15109 else
15110   cat >conftest.$ac_ext <<_ACEOF
15111 #line 15111 "configure"
15112 #include "confdefs.h"
15113 /* System header to define __stub macros and hopefully few prototypes,
15114     which can conflict with char regcomp (); below.  */
15115 #include <assert.h>
15116 /* Override any gcc2 internal prototype to avoid an error.  */
15117 #ifdef __cplusplus
15118 extern "C"
15119 #endif
15120 /* We use char because int might match the return type of a gcc2
15121    builtin and then its argument prototype would still apply.  */
15122 char regcomp ();
15123 char (*f) ();
15124
15125 int
15126 main ()
15127 {
15128 /* The GNU C library defines this for functions which it implements
15129     to always fail with ENOSYS.  Some functions are actually named
15130     something starting with __ and the normal name is an alias.  */
15131 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15132 choke me
15133 #else
15134 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15135 #endif
15136
15137   ;
15138   return 0;
15139 }
15140 _ACEOF
15141 rm -f conftest.$ac_objext conftest$ac_exeext
15142 if { (eval echo "$as_me:15142: \"$ac_link\"") >&5
15143   (eval $ac_link) 2>&5
15144   ac_status=$?
15145   echo "$as_me:15145: \$? = $ac_status" >&5
15146   (exit $ac_status); } &&
15147          { ac_try='test -s conftest$ac_exeext'
15148   { (eval echo "$as_me:15148: \"$ac_try\"") >&5
15149   (eval $ac_try) 2>&5
15150   ac_status=$?
15151   echo "$as_me:15151: \$? = $ac_status" >&5
15152   (exit $ac_status); }; }; then
15153   ac_cv_func_regcomp=yes
15154 else
15155   echo "$as_me: failed program was:" >&5
15156 cat conftest.$ac_ext >&5
15157 ac_cv_func_regcomp=no
15158 fi
15159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15160 fi
15161 echo "$as_me:15161: result: $ac_cv_func_regcomp" >&5
15162 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15163 if test $ac_cv_func_regcomp = yes; then
15164   cf_regex_func=regcomp
15165 else
15166
15167         for cf_regex_lib in $cf_regex_libs
15168         do
15169                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15170 echo "$as_me:15170: checking for regcomp in -l$cf_regex_lib" >&5
15171 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15172 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15173   echo $ECHO_N "(cached) $ECHO_C" >&6
15174 else
15175   ac_check_lib_save_LIBS=$LIBS
15176 LIBS="-l$cf_regex_lib  $LIBS"
15177 cat >conftest.$ac_ext <<_ACEOF
15178 #line 15178 "configure"
15179 #include "confdefs.h"
15180
15181 /* Override any gcc2 internal prototype to avoid an error.  */
15182 #ifdef __cplusplus
15183 extern "C"
15184 #endif
15185 /* We use char because int might match the return type of a gcc2
15186    builtin and then its argument prototype would still apply.  */
15187 char regcomp ();
15188 int
15189 main ()
15190 {
15191 regcomp ();
15192   ;
15193   return 0;
15194 }
15195 _ACEOF
15196 rm -f conftest.$ac_objext conftest$ac_exeext
15197 if { (eval echo "$as_me:15197: \"$ac_link\"") >&5
15198   (eval $ac_link) 2>&5
15199   ac_status=$?
15200   echo "$as_me:15200: \$? = $ac_status" >&5
15201   (exit $ac_status); } &&
15202          { ac_try='test -s conftest$ac_exeext'
15203   { (eval echo "$as_me:15203: \"$ac_try\"") >&5
15204   (eval $ac_try) 2>&5
15205   ac_status=$?
15206   echo "$as_me:15206: \$? = $ac_status" >&5
15207   (exit $ac_status); }; }; then
15208   eval "$as_ac_Lib=yes"
15209 else
15210   echo "$as_me: failed program was:" >&5
15211 cat conftest.$ac_ext >&5
15212 eval "$as_ac_Lib=no"
15213 fi
15214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15215 LIBS=$ac_check_lib_save_LIBS
15216 fi
15217 echo "$as_me:15217: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15218 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15219 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15220
15221 cf_add_libs="-l$cf_regex_lib"
15222 # Filter out duplicates - this happens with badly-designed ".pc" files...
15223 for cf_add_1lib in $LIBS
15224 do
15225         for cf_add_2lib in $cf_add_libs
15226         do
15227                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15228                 then
15229                         cf_add_1lib=
15230                         break
15231                 fi
15232         done
15233         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15234 done
15235 LIBS="$cf_add_libs"
15236
15237                                 cf_regex_func=regcomp
15238                                 break
15239 fi
15240
15241         done
15242
15243 fi
15244
15245 if test "$cf_regex_func" = no ; then
15246         echo "$as_me:15246: checking for compile" >&5
15247 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15248 if test "${ac_cv_func_compile+set}" = set; then
15249   echo $ECHO_N "(cached) $ECHO_C" >&6
15250 else
15251   cat >conftest.$ac_ext <<_ACEOF
15252 #line 15252 "configure"
15253 #include "confdefs.h"
15254 /* System header to define __stub macros and hopefully few prototypes,
15255     which can conflict with char compile (); below.  */
15256 #include <assert.h>
15257 /* Override any gcc2 internal prototype to avoid an error.  */
15258 #ifdef __cplusplus
15259 extern "C"
15260 #endif
15261 /* We use char because int might match the return type of a gcc2
15262    builtin and then its argument prototype would still apply.  */
15263 char compile ();
15264 char (*f) ();
15265
15266 int
15267 main ()
15268 {
15269 /* The GNU C library defines this for functions which it implements
15270     to always fail with ENOSYS.  Some functions are actually named
15271     something starting with __ and the normal name is an alias.  */
15272 #if defined (__stub_compile) || defined (__stub___compile)
15273 choke me
15274 #else
15275 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15276 #endif
15277
15278   ;
15279   return 0;
15280 }
15281 _ACEOF
15282 rm -f conftest.$ac_objext conftest$ac_exeext
15283 if { (eval echo "$as_me:15283: \"$ac_link\"") >&5
15284   (eval $ac_link) 2>&5
15285   ac_status=$?
15286   echo "$as_me:15286: \$? = $ac_status" >&5
15287   (exit $ac_status); } &&
15288          { ac_try='test -s conftest$ac_exeext'
15289   { (eval echo "$as_me:15289: \"$ac_try\"") >&5
15290   (eval $ac_try) 2>&5
15291   ac_status=$?
15292   echo "$as_me:15292: \$? = $ac_status" >&5
15293   (exit $ac_status); }; }; then
15294   ac_cv_func_compile=yes
15295 else
15296   echo "$as_me: failed program was:" >&5
15297 cat conftest.$ac_ext >&5
15298 ac_cv_func_compile=no
15299 fi
15300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15301 fi
15302 echo "$as_me:15302: result: $ac_cv_func_compile" >&5
15303 echo "${ECHO_T}$ac_cv_func_compile" >&6
15304 if test $ac_cv_func_compile = yes; then
15305   cf_regex_func=compile
15306 else
15307
15308                 echo "$as_me:15308: checking for compile in -lgen" >&5
15309 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15310 if test "${ac_cv_lib_gen_compile+set}" = set; then
15311   echo $ECHO_N "(cached) $ECHO_C" >&6
15312 else
15313   ac_check_lib_save_LIBS=$LIBS
15314 LIBS="-lgen  $LIBS"
15315 cat >conftest.$ac_ext <<_ACEOF
15316 #line 15316 "configure"
15317 #include "confdefs.h"
15318
15319 /* Override any gcc2 internal prototype to avoid an error.  */
15320 #ifdef __cplusplus
15321 extern "C"
15322 #endif
15323 /* We use char because int might match the return type of a gcc2
15324    builtin and then its argument prototype would still apply.  */
15325 char compile ();
15326 int
15327 main ()
15328 {
15329 compile ();
15330   ;
15331   return 0;
15332 }
15333 _ACEOF
15334 rm -f conftest.$ac_objext conftest$ac_exeext
15335 if { (eval echo "$as_me:15335: \"$ac_link\"") >&5
15336   (eval $ac_link) 2>&5
15337   ac_status=$?
15338   echo "$as_me:15338: \$? = $ac_status" >&5
15339   (exit $ac_status); } &&
15340          { ac_try='test -s conftest$ac_exeext'
15341   { (eval echo "$as_me:15341: \"$ac_try\"") >&5
15342   (eval $ac_try) 2>&5
15343   ac_status=$?
15344   echo "$as_me:15344: \$? = $ac_status" >&5
15345   (exit $ac_status); }; }; then
15346   ac_cv_lib_gen_compile=yes
15347 else
15348   echo "$as_me: failed program was:" >&5
15349 cat conftest.$ac_ext >&5
15350 ac_cv_lib_gen_compile=no
15351 fi
15352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15353 LIBS=$ac_check_lib_save_LIBS
15354 fi
15355 echo "$as_me:15355: result: $ac_cv_lib_gen_compile" >&5
15356 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15357 if test $ac_cv_lib_gen_compile = yes; then
15358
15359 cf_add_libs="-lgen"
15360 # Filter out duplicates - this happens with badly-designed ".pc" files...
15361 for cf_add_1lib in $LIBS
15362 do
15363         for cf_add_2lib in $cf_add_libs
15364         do
15365                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15366                 then
15367                         cf_add_1lib=
15368                         break
15369                 fi
15370         done
15371         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15372 done
15373 LIBS="$cf_add_libs"
15374
15375                                 cf_regex_func=compile
15376 fi
15377
15378 fi
15379
15380 fi
15381
15382 if test "$cf_regex_func" = no ; then
15383         { echo "$as_me:15383: WARNING: cannot find regular expression library" >&5
15384 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15385 fi
15386
15387 echo "$as_me:15387: checking for regular-expression headers" >&5
15388 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15389 if test "${cf_cv_regex_hdrs+set}" = set; then
15390   echo $ECHO_N "(cached) $ECHO_C" >&6
15391 else
15392
15393 cf_cv_regex_hdrs=no
15394 case $cf_regex_func in
15395 (compile)
15396         for cf_regex_hdr in regexp.h regexpr.h
15397         do
15398                 cat >conftest.$ac_ext <<_ACEOF
15399 #line 15399 "configure"
15400 #include "confdefs.h"
15401 #include <$cf_regex_hdr>
15402 int
15403 main ()
15404 {
15405
15406                         char *p = compile("", "", "", 0);
15407                         int x = step("", "");
15408
15409   ;
15410   return 0;
15411 }
15412 _ACEOF
15413 rm -f conftest.$ac_objext conftest$ac_exeext
15414 if { (eval echo "$as_me:15414: \"$ac_link\"") >&5
15415   (eval $ac_link) 2>&5
15416   ac_status=$?
15417   echo "$as_me:15417: \$? = $ac_status" >&5
15418   (exit $ac_status); } &&
15419          { ac_try='test -s conftest$ac_exeext'
15420   { (eval echo "$as_me:15420: \"$ac_try\"") >&5
15421   (eval $ac_try) 2>&5
15422   ac_status=$?
15423   echo "$as_me:15423: \$? = $ac_status" >&5
15424   (exit $ac_status); }; }; then
15425
15426                         cf_cv_regex_hdrs=$cf_regex_hdr
15427                         break
15428
15429 else
15430   echo "$as_me: failed program was:" >&5
15431 cat conftest.$ac_ext >&5
15432 fi
15433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15434         done
15435         ;;
15436 (*)
15437         for cf_regex_hdr in regex.h
15438         do
15439                 cat >conftest.$ac_ext <<_ACEOF
15440 #line 15440 "configure"
15441 #include "confdefs.h"
15442 #include <sys/types.h>
15443 #include <$cf_regex_hdr>
15444 int
15445 main ()
15446 {
15447
15448                         regex_t *p;
15449                         int x = regcomp(p, "", 0);
15450                         int y = regexec(p, "", 0, 0, 0);
15451                         regfree(p);
15452
15453   ;
15454   return 0;
15455 }
15456 _ACEOF
15457 rm -f conftest.$ac_objext conftest$ac_exeext
15458 if { (eval echo "$as_me:15458: \"$ac_link\"") >&5
15459   (eval $ac_link) 2>&5
15460   ac_status=$?
15461   echo "$as_me:15461: \$? = $ac_status" >&5
15462   (exit $ac_status); } &&
15463          { ac_try='test -s conftest$ac_exeext'
15464   { (eval echo "$as_me:15464: \"$ac_try\"") >&5
15465   (eval $ac_try) 2>&5
15466   ac_status=$?
15467   echo "$as_me:15467: \$? = $ac_status" >&5
15468   (exit $ac_status); }; }; then
15469
15470                         cf_cv_regex_hdrs=$cf_regex_hdr
15471                         break
15472
15473 else
15474   echo "$as_me: failed program was:" >&5
15475 cat conftest.$ac_ext >&5
15476 fi
15477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15478         done
15479         ;;
15480 esac
15481
15482 fi
15483 echo "$as_me:15483: result: $cf_cv_regex_hdrs" >&5
15484 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15485
15486 case $cf_cv_regex_hdrs in
15487         (no)            { echo "$as_me:15487: WARNING: no regular expression header found" >&5
15488 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15489         (regex.h)
15490 cat >>confdefs.h <<\EOF
15491 #define HAVE_REGEX_H_FUNCS 1
15492 EOF
15493  ;;
15494         (regexp.h)
15495 cat >>confdefs.h <<\EOF
15496 #define HAVE_REGEXP_H_FUNCS 1
15497 EOF
15498  ;;
15499         (regexpr.h)
15500 cat >>confdefs.h <<\EOF
15501 #define HAVE_REGEXPR_H_FUNCS 1
15502 EOF
15503  ;;
15504 esac
15505
15506 for ac_header in \
15507 fcntl.h \
15508 getopt.h \
15509 limits.h \
15510 locale.h \
15511 math.h \
15512 poll.h \
15513 sys/bsdtypes.h \
15514 sys/ioctl.h \
15515 sys/param.h \
15516 sys/poll.h \
15517 sys/select.h \
15518 sys/time.h \
15519 sys/times.h \
15520 ttyent.h \
15521 unistd.h \
15522 wctype.h \
15523
15524 do
15525 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15526 echo "$as_me:15526: checking for $ac_header" >&5
15527 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15528 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15529   echo $ECHO_N "(cached) $ECHO_C" >&6
15530 else
15531   cat >conftest.$ac_ext <<_ACEOF
15532 #line 15532 "configure"
15533 #include "confdefs.h"
15534 #include <$ac_header>
15535 _ACEOF
15536 if { (eval echo "$as_me:15536: \"$ac_cpp conftest.$ac_ext\"") >&5
15537   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15538   ac_status=$?
15539   egrep -v '^ *\+' conftest.er1 >conftest.err
15540   rm -f conftest.er1
15541   cat conftest.err >&5
15542   echo "$as_me:15542: \$? = $ac_status" >&5
15543   (exit $ac_status); } >/dev/null; then
15544   if test -s conftest.err; then
15545     ac_cpp_err=$ac_c_preproc_warn_flag
15546   else
15547     ac_cpp_err=
15548   fi
15549 else
15550   ac_cpp_err=yes
15551 fi
15552 if test -z "$ac_cpp_err"; then
15553   eval "$as_ac_Header=yes"
15554 else
15555   echo "$as_me: failed program was:" >&5
15556   cat conftest.$ac_ext >&5
15557   eval "$as_ac_Header=no"
15558 fi
15559 rm -f conftest.err conftest.$ac_ext
15560 fi
15561 echo "$as_me:15561: result: `eval echo '${'$as_ac_Header'}'`" >&5
15562 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15563 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15564   cat >>confdefs.h <<EOF
15565 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15566 EOF
15567
15568 fi
15569 done
15570
15571 for ac_header in unistd.h getopt.h
15572 do
15573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15574 echo "$as_me:15574: checking for $ac_header" >&5
15575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15577   echo $ECHO_N "(cached) $ECHO_C" >&6
15578 else
15579   cat >conftest.$ac_ext <<_ACEOF
15580 #line 15580 "configure"
15581 #include "confdefs.h"
15582 #include <$ac_header>
15583 _ACEOF
15584 if { (eval echo "$as_me:15584: \"$ac_cpp conftest.$ac_ext\"") >&5
15585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15586   ac_status=$?
15587   egrep -v '^ *\+' conftest.er1 >conftest.err
15588   rm -f conftest.er1
15589   cat conftest.err >&5
15590   echo "$as_me:15590: \$? = $ac_status" >&5
15591   (exit $ac_status); } >/dev/null; then
15592   if test -s conftest.err; then
15593     ac_cpp_err=$ac_c_preproc_warn_flag
15594   else
15595     ac_cpp_err=
15596   fi
15597 else
15598   ac_cpp_err=yes
15599 fi
15600 if test -z "$ac_cpp_err"; then
15601   eval "$as_ac_Header=yes"
15602 else
15603   echo "$as_me: failed program was:" >&5
15604   cat conftest.$ac_ext >&5
15605   eval "$as_ac_Header=no"
15606 fi
15607 rm -f conftest.err conftest.$ac_ext
15608 fi
15609 echo "$as_me:15609: result: `eval echo '${'$as_ac_Header'}'`" >&5
15610 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15612   cat >>confdefs.h <<EOF
15613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15614 EOF
15615
15616 fi
15617 done
15618
15619 echo "$as_me:15619: checking for header declaring getopt variables" >&5
15620 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15621 if test "${cf_cv_getopt_header+set}" = set; then
15622   echo $ECHO_N "(cached) $ECHO_C" >&6
15623 else
15624
15625 cf_cv_getopt_header=none
15626 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15627 do
15628 cat >conftest.$ac_ext <<_ACEOF
15629 #line 15629 "configure"
15630 #include "confdefs.h"
15631
15632 #include <$cf_header>
15633 int
15634 main ()
15635 {
15636 int x = optind; char *y = optarg
15637   ;
15638   return 0;
15639 }
15640 _ACEOF
15641 rm -f conftest.$ac_objext
15642 if { (eval echo "$as_me:15642: \"$ac_compile\"") >&5
15643   (eval $ac_compile) 2>&5
15644   ac_status=$?
15645   echo "$as_me:15645: \$? = $ac_status" >&5
15646   (exit $ac_status); } &&
15647          { ac_try='test -s conftest.$ac_objext'
15648   { (eval echo "$as_me:15648: \"$ac_try\"") >&5
15649   (eval $ac_try) 2>&5
15650   ac_status=$?
15651   echo "$as_me:15651: \$? = $ac_status" >&5
15652   (exit $ac_status); }; }; then
15653   cf_cv_getopt_header=$cf_header
15654  break
15655 else
15656   echo "$as_me: failed program was:" >&5
15657 cat conftest.$ac_ext >&5
15658 fi
15659 rm -f conftest.$ac_objext conftest.$ac_ext
15660 done
15661
15662 fi
15663 echo "$as_me:15663: result: $cf_cv_getopt_header" >&5
15664 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15665 if test $cf_cv_getopt_header != none ; then
15666
15667 cat >>confdefs.h <<\EOF
15668 #define HAVE_GETOPT_HEADER 1
15669 EOF
15670
15671 fi
15672 if test $cf_cv_getopt_header = getopt.h ; then
15673
15674 cat >>confdefs.h <<\EOF
15675 #define NEED_GETOPT_H 1
15676 EOF
15677
15678 fi
15679
15680 # check for ISC (this may also define _POSIX_SOURCE)
15681 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15682 if test "x$ISC" = xyes ; then
15683
15684 echo "$as_me:15684: checking for main in -lcposix" >&5
15685 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15686 if test "${ac_cv_lib_cposix_main+set}" = set; then
15687   echo $ECHO_N "(cached) $ECHO_C" >&6
15688 else
15689   ac_check_lib_save_LIBS=$LIBS
15690 LIBS="-lcposix  $LIBS"
15691 cat >conftest.$ac_ext <<_ACEOF
15692 #line 15692 "configure"
15693 #include "confdefs.h"
15694
15695 int
15696 main ()
15697 {
15698 main ();
15699   ;
15700   return 0;
15701 }
15702 _ACEOF
15703 rm -f conftest.$ac_objext conftest$ac_exeext
15704 if { (eval echo "$as_me:15704: \"$ac_link\"") >&5
15705   (eval $ac_link) 2>&5
15706   ac_status=$?
15707   echo "$as_me:15707: \$? = $ac_status" >&5
15708   (exit $ac_status); } &&
15709          { ac_try='test -s conftest$ac_exeext'
15710   { (eval echo "$as_me:15710: \"$ac_try\"") >&5
15711   (eval $ac_try) 2>&5
15712   ac_status=$?
15713   echo "$as_me:15713: \$? = $ac_status" >&5
15714   (exit $ac_status); }; }; then
15715   ac_cv_lib_cposix_main=yes
15716 else
15717   echo "$as_me: failed program was:" >&5
15718 cat conftest.$ac_ext >&5
15719 ac_cv_lib_cposix_main=no
15720 fi
15721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15722 LIBS=$ac_check_lib_save_LIBS
15723 fi
15724 echo "$as_me:15724: result: $ac_cv_lib_cposix_main" >&5
15725 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15726 if test $ac_cv_lib_cposix_main = yes; then
15727   cat >>confdefs.h <<EOF
15728 #define HAVE_LIBCPOSIX 1
15729 EOF
15730
15731   LIBS="-lcposix $LIBS"
15732
15733 fi
15734
15735         echo "$as_me:15735: checking for bzero in -linet" >&5
15736 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15737 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15738   echo $ECHO_N "(cached) $ECHO_C" >&6
15739 else
15740   ac_check_lib_save_LIBS=$LIBS
15741 LIBS="-linet  $LIBS"
15742 cat >conftest.$ac_ext <<_ACEOF
15743 #line 15743 "configure"
15744 #include "confdefs.h"
15745
15746 /* Override any gcc2 internal prototype to avoid an error.  */
15747 #ifdef __cplusplus
15748 extern "C"
15749 #endif
15750 /* We use char because int might match the return type of a gcc2
15751    builtin and then its argument prototype would still apply.  */
15752 char bzero ();
15753 int
15754 main ()
15755 {
15756 bzero ();
15757   ;
15758   return 0;
15759 }
15760 _ACEOF
15761 rm -f conftest.$ac_objext conftest$ac_exeext
15762 if { (eval echo "$as_me:15762: \"$ac_link\"") >&5
15763   (eval $ac_link) 2>&5
15764   ac_status=$?
15765   echo "$as_me:15765: \$? = $ac_status" >&5
15766   (exit $ac_status); } &&
15767          { ac_try='test -s conftest$ac_exeext'
15768   { (eval echo "$as_me:15768: \"$ac_try\"") >&5
15769   (eval $ac_try) 2>&5
15770   ac_status=$?
15771   echo "$as_me:15771: \$? = $ac_status" >&5
15772   (exit $ac_status); }; }; then
15773   ac_cv_lib_inet_bzero=yes
15774 else
15775   echo "$as_me: failed program was:" >&5
15776 cat conftest.$ac_ext >&5
15777 ac_cv_lib_inet_bzero=no
15778 fi
15779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15780 LIBS=$ac_check_lib_save_LIBS
15781 fi
15782 echo "$as_me:15782: result: $ac_cv_lib_inet_bzero" >&5
15783 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15784 if test $ac_cv_lib_inet_bzero = yes; then
15785
15786 cf_add_libs="-linet"
15787 # Filter out duplicates - this happens with badly-designed ".pc" files...
15788 for cf_add_1lib in $LIBS
15789 do
15790         for cf_add_2lib in $cf_add_libs
15791         do
15792                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15793                 then
15794                         cf_add_1lib=
15795                         break
15796                 fi
15797         done
15798         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15799 done
15800 LIBS="$cf_add_libs"
15801
15802 fi
15803 fi
15804
15805 echo "$as_me:15805: checking if sys/time.h works with sys/select.h" >&5
15806 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15807 if test "${cf_cv_sys_time_select+set}" = set; then
15808   echo $ECHO_N "(cached) $ECHO_C" >&6
15809 else
15810
15811 cat >conftest.$ac_ext <<_ACEOF
15812 #line 15812 "configure"
15813 #include "confdefs.h"
15814
15815 #include <sys/types.h>
15816 #ifdef HAVE_SYS_TIME_H
15817 #include <sys/time.h>
15818 #endif
15819 #ifdef HAVE_SYS_SELECT_H
15820 #include <sys/select.h>
15821 #endif
15822
15823 int
15824 main ()
15825 {
15826
15827   ;
15828   return 0;
15829 }
15830 _ACEOF
15831 rm -f conftest.$ac_objext
15832 if { (eval echo "$as_me:15832: \"$ac_compile\"") >&5
15833   (eval $ac_compile) 2>&5
15834   ac_status=$?
15835   echo "$as_me:15835: \$? = $ac_status" >&5
15836   (exit $ac_status); } &&
15837          { ac_try='test -s conftest.$ac_objext'
15838   { (eval echo "$as_me:15838: \"$ac_try\"") >&5
15839   (eval $ac_try) 2>&5
15840   ac_status=$?
15841   echo "$as_me:15841: \$? = $ac_status" >&5
15842   (exit $ac_status); }; }; then
15843   cf_cv_sys_time_select=yes
15844 else
15845   echo "$as_me: failed program was:" >&5
15846 cat conftest.$ac_ext >&5
15847 cf_cv_sys_time_select=no
15848 fi
15849 rm -f conftest.$ac_objext conftest.$ac_ext
15850
15851 fi
15852
15853 echo "$as_me:15853: result: $cf_cv_sys_time_select" >&5
15854 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15855 test "$cf_cv_sys_time_select" = yes &&
15856 cat >>confdefs.h <<\EOF
15857 #define HAVE_SYS_TIME_SELECT 1
15858 EOF
15859
15860 ###     checks for compiler characteristics
15861 ac_ext=c
15862 ac_cpp='$CPP $CPPFLAGS'
15863 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15864 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15865 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15866 ac_main_return=return
15867
15868 echo "$as_me:15868: checking for an ANSI C-conforming const" >&5
15869 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15870 if test "${ac_cv_c_const+set}" = set; then
15871   echo $ECHO_N "(cached) $ECHO_C" >&6
15872 else
15873   cat >conftest.$ac_ext <<_ACEOF
15874 #line 15874 "configure"
15875 #include "confdefs.h"
15876
15877 int
15878 main ()
15879 {
15880 /* FIXME: Include the comments suggested by Paul. */
15881 #ifndef __cplusplus
15882   /* Ultrix mips cc rejects this.  */
15883   typedef int charset[2];
15884   const charset x;
15885   /* SunOS 4.1.1 cc rejects this.  */
15886   char const *const *ccp;
15887   char **p;
15888   /* NEC SVR4.0.2 mips cc rejects this.  */
15889   struct point {int x, y;};
15890   static struct point const zero = {0,0};
15891   /* AIX XL C 1.02.0.0 rejects this.
15892      It does not let you subtract one const X* pointer from another in
15893      an arm of an if-expression whose if-part is not a constant
15894      expression */
15895   const char *g = "string";
15896   ccp = &g + (g ? g-g : 0);
15897   /* HPUX 7.0 cc rejects these. */
15898   ++ccp;
15899   p = (char**) ccp;
15900   ccp = (char const *const *) p;
15901   { /* SCO 3.2v4 cc rejects this.  */
15902     char *t;
15903     char const *s = 0 ? (char *) 0 : (char const *) 0;
15904
15905     *t++ = 0;
15906   }
15907   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15908     int x[] = {25, 17};
15909     const int *foo = &x[0];
15910     ++foo;
15911   }
15912   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15913     typedef const int *iptr;
15914     iptr p = 0;
15915     ++p;
15916   }
15917   { /* AIX XL C 1.02.0.0 rejects this saying
15918        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15919     struct s { int j; const int *ap[3]; };
15920     struct s *b; b->j = 5;
15921   }
15922   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15923     const int foo = 10;
15924   }
15925 #endif
15926
15927   ;
15928   return 0;
15929 }
15930 _ACEOF
15931 rm -f conftest.$ac_objext
15932 if { (eval echo "$as_me:15932: \"$ac_compile\"") >&5
15933   (eval $ac_compile) 2>&5
15934   ac_status=$?
15935   echo "$as_me:15935: \$? = $ac_status" >&5
15936   (exit $ac_status); } &&
15937          { ac_try='test -s conftest.$ac_objext'
15938   { (eval echo "$as_me:15938: \"$ac_try\"") >&5
15939   (eval $ac_try) 2>&5
15940   ac_status=$?
15941   echo "$as_me:15941: \$? = $ac_status" >&5
15942   (exit $ac_status); }; }; then
15943   ac_cv_c_const=yes
15944 else
15945   echo "$as_me: failed program was:" >&5
15946 cat conftest.$ac_ext >&5
15947 ac_cv_c_const=no
15948 fi
15949 rm -f conftest.$ac_objext conftest.$ac_ext
15950 fi
15951 echo "$as_me:15951: result: $ac_cv_c_const" >&5
15952 echo "${ECHO_T}$ac_cv_c_const" >&6
15953 if test $ac_cv_c_const = no; then
15954
15955 cat >>confdefs.h <<\EOF
15956 #define const
15957 EOF
15958
15959 fi
15960
15961 echo "$as_me:15961: checking for inline" >&5
15962 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15963 if test "${ac_cv_c_inline+set}" = set; then
15964   echo $ECHO_N "(cached) $ECHO_C" >&6
15965 else
15966   ac_cv_c_inline=no
15967 for ac_kw in inline __inline__ __inline; do
15968   cat >conftest.$ac_ext <<_ACEOF
15969 #line 15969 "configure"
15970 #include "confdefs.h"
15971 #ifndef __cplusplus
15972 static $ac_kw int static_foo () {return 0; }
15973 $ac_kw int foo () {return 0; }
15974 #endif
15975
15976 _ACEOF
15977 rm -f conftest.$ac_objext
15978 if { (eval echo "$as_me:15978: \"$ac_compile\"") >&5
15979   (eval $ac_compile) 2>&5
15980   ac_status=$?
15981   echo "$as_me:15981: \$? = $ac_status" >&5
15982   (exit $ac_status); } &&
15983          { ac_try='test -s conftest.$ac_objext'
15984   { (eval echo "$as_me:15984: \"$ac_try\"") >&5
15985   (eval $ac_try) 2>&5
15986   ac_status=$?
15987   echo "$as_me:15987: \$? = $ac_status" >&5
15988   (exit $ac_status); }; }; then
15989   ac_cv_c_inline=$ac_kw; break
15990 else
15991   echo "$as_me: failed program was:" >&5
15992 cat conftest.$ac_ext >&5
15993 fi
15994 rm -f conftest.$ac_objext conftest.$ac_ext
15995 done
15996
15997 fi
15998 echo "$as_me:15998: result: $ac_cv_c_inline" >&5
15999 echo "${ECHO_T}$ac_cv_c_inline" >&6
16000 case $ac_cv_c_inline in
16001   inline | yes) ;;
16002   no)
16003 cat >>confdefs.h <<\EOF
16004 #define inline
16005 EOF
16006  ;;
16007   *)  cat >>confdefs.h <<EOF
16008 #define inline $ac_cv_c_inline
16009 EOF
16010  ;;
16011 esac
16012
16013 NCURSES_INLINE=
16014 if test "$ac_cv_c_inline" != no ; then
16015         NCURSES_INLINE=inline
16016         if test "$INTEL_COMPILER" = yes
16017         then
16018                 :
16019         elif test "$CLANG_COMPILER" = yes
16020         then
16021                 :
16022         elif test "$GCC" = yes
16023         then
16024                 echo "$as_me:16024: checking if $CC supports options to tune inlining" >&5
16025 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16026 if test "${cf_cv_gcc_inline+set}" = set; then
16027   echo $ECHO_N "(cached) $ECHO_C" >&6
16028 else
16029
16030                 cf_save_CFLAGS=$CFLAGS
16031                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16032                 cat >conftest.$ac_ext <<_ACEOF
16033 #line 16033 "configure"
16034 #include "confdefs.h"
16035 inline int foo(void) { return 1; }
16036 int
16037 main ()
16038 {
16039 ${cf_cv_main_return:-return} foo()
16040   ;
16041   return 0;
16042 }
16043 _ACEOF
16044 rm -f conftest.$ac_objext
16045 if { (eval echo "$as_me:16045: \"$ac_compile\"") >&5
16046   (eval $ac_compile) 2>&5
16047   ac_status=$?
16048   echo "$as_me:16048: \$? = $ac_status" >&5
16049   (exit $ac_status); } &&
16050          { ac_try='test -s conftest.$ac_objext'
16051   { (eval echo "$as_me:16051: \"$ac_try\"") >&5
16052   (eval $ac_try) 2>&5
16053   ac_status=$?
16054   echo "$as_me:16054: \$? = $ac_status" >&5
16055   (exit $ac_status); }; }; then
16056   cf_cv_gcc_inline=yes
16057 else
16058   echo "$as_me: failed program was:" >&5
16059 cat conftest.$ac_ext >&5
16060 cf_cv_gcc_inline=no
16061 fi
16062 rm -f conftest.$ac_objext conftest.$ac_ext
16063                 CFLAGS=$cf_save_CFLAGS
16064
16065 fi
16066 echo "$as_me:16066: result: $cf_cv_gcc_inline" >&5
16067 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16068                 if test "$cf_cv_gcc_inline" = yes ; then
16069
16070 cf_fix_cppflags=no
16071 cf_new_cflags=
16072 cf_new_cppflags=
16073 cf_new_extra_cppflags=
16074
16075 for cf_add_cflags in --param max-inline-insns-single=1200
16076 do
16077 case $cf_fix_cppflags in
16078 (no)
16079         case $cf_add_cflags in
16080         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16081                 case $cf_add_cflags in
16082                 (-D*)
16083                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16084
16085                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16086                                 && test -z "${cf_tst_cflags}" \
16087                                 && cf_fix_cppflags=yes
16088
16089                         if test $cf_fix_cppflags = yes ; then
16090                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16091                                 continue
16092                         elif test "${cf_tst_cflags}" = "\"'" ; then
16093                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16094                                 continue
16095                         fi
16096                         ;;
16097                 esac
16098                 case "$CPPFLAGS" in
16099                 (*$cf_add_cflags)
16100                         ;;
16101                 (*)
16102                         case $cf_add_cflags in
16103                         (-D*)
16104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16105
16106 CPPFLAGS=`echo "$CPPFLAGS" | \
16107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16109
16110                                 ;;
16111                         esac
16112                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16113                         ;;
16114                 esac
16115                 ;;
16116         (*)
16117                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16118                 ;;
16119         esac
16120         ;;
16121 (yes)
16122         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16123
16124         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16125
16126         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16127                 && test -z "${cf_tst_cflags}" \
16128                 && cf_fix_cppflags=no
16129         ;;
16130 esac
16131 done
16132
16133 if test -n "$cf_new_cflags" ; then
16134
16135         CFLAGS="$CFLAGS $cf_new_cflags"
16136 fi
16137
16138 if test -n "$cf_new_cppflags" ; then
16139
16140         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16141 fi
16142
16143 if test -n "$cf_new_extra_cppflags" ; then
16144
16145         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16146 fi
16147
16148                 fi
16149         fi
16150 fi
16151
16152 echo "$as_me:16152: checking for signal global datatype" >&5
16153 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16154 if test "${cf_cv_sig_atomic_t+set}" = set; then
16155   echo $ECHO_N "(cached) $ECHO_C" >&6
16156 else
16157
16158         for cf_type in \
16159                 "volatile sig_atomic_t" \
16160                 "sig_atomic_t" \
16161                 "int"
16162         do
16163         cat >conftest.$ac_ext <<_ACEOF
16164 #line 16164 "configure"
16165 #include "confdefs.h"
16166
16167 #include <sys/types.h>
16168 #include <signal.h>
16169 #include <stdio.h>
16170
16171 extern $cf_type x;
16172 $cf_type x;
16173 static void handler(int sig)
16174 {
16175         x = 5;
16176 }
16177 int
16178 main ()
16179 {
16180 signal(SIGINT, handler);
16181                  x = 1
16182   ;
16183   return 0;
16184 }
16185 _ACEOF
16186 rm -f conftest.$ac_objext
16187 if { (eval echo "$as_me:16187: \"$ac_compile\"") >&5
16188   (eval $ac_compile) 2>&5
16189   ac_status=$?
16190   echo "$as_me:16190: \$? = $ac_status" >&5
16191   (exit $ac_status); } &&
16192          { ac_try='test -s conftest.$ac_objext'
16193   { (eval echo "$as_me:16193: \"$ac_try\"") >&5
16194   (eval $ac_try) 2>&5
16195   ac_status=$?
16196   echo "$as_me:16196: \$? = $ac_status" >&5
16197   (exit $ac_status); }; }; then
16198   cf_cv_sig_atomic_t=$cf_type
16199 else
16200   echo "$as_me: failed program was:" >&5
16201 cat conftest.$ac_ext >&5
16202 cf_cv_sig_atomic_t=no
16203 fi
16204 rm -f conftest.$ac_objext conftest.$ac_ext
16205                 test "$cf_cv_sig_atomic_t" != no && break
16206         done
16207
16208 fi
16209
16210 echo "$as_me:16210: result: $cf_cv_sig_atomic_t" >&5
16211 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16212 test "$cf_cv_sig_atomic_t" != no &&
16213 cat >>confdefs.h <<EOF
16214 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16215 EOF
16216
16217 if test $NCURSES_CHTYPE = auto ; then
16218
16219 echo "$as_me:16219: checking for type of chtype" >&5
16220 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16221 if test "${cf_cv_typeof_chtype+set}" = set; then
16222   echo $ECHO_N "(cached) $ECHO_C" >&6
16223 else
16224
16225                 if test "$cross_compiling" = yes; then
16226   cf_cv_typeof_chtype=long
16227 else
16228   cat >conftest.$ac_ext <<_ACEOF
16229 #line 16229 "configure"
16230 #include "confdefs.h"
16231
16232 #define WANT_BITS 31
16233 #include <stdio.h>
16234 int main()
16235 {
16236         FILE *fp = fopen("cf_test.out", "w");
16237         if (fp != 0) {
16238                 char *result = "long";
16239                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16240                         int n;
16241                         unsigned int x, y;
16242                         for (n = 0; n < WANT_BITS; n++) {
16243                                 x = (1 << n);
16244                                 y = (x >> n);
16245                                 if (y != 1 || x == 0) {
16246                                         x = 0;
16247                                         break;
16248                                 }
16249                         }
16250                         /*
16251                          * If x is nonzero, an int is big enough for the bits
16252                          * that we want.
16253                          */
16254                         result = (x != 0) ? "int" : "long";
16255                 }
16256                 fputs(result, fp);
16257                 fclose(fp);
16258         }
16259         ${cf_cv_main_return:-return}(0);
16260 }
16261
16262 _ACEOF
16263 rm -f conftest$ac_exeext
16264 if { (eval echo "$as_me:16264: \"$ac_link\"") >&5
16265   (eval $ac_link) 2>&5
16266   ac_status=$?
16267   echo "$as_me:16267: \$? = $ac_status" >&5
16268   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16269   { (eval echo "$as_me:16269: \"$ac_try\"") >&5
16270   (eval $ac_try) 2>&5
16271   ac_status=$?
16272   echo "$as_me:16272: \$? = $ac_status" >&5
16273   (exit $ac_status); }; }; then
16274   cf_cv_typeof_chtype=`cat cf_test.out`
16275 else
16276   echo "$as_me: program exited with status $ac_status" >&5
16277 echo "$as_me: failed program was:" >&5
16278 cat conftest.$ac_ext >&5
16279 cf_cv_typeof_chtype=long
16280 fi
16281 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16282 fi
16283                 rm -f cf_test.out
16284
16285 fi
16286
16287 echo "$as_me:16287: result: $cf_cv_typeof_chtype" >&5
16288 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16289
16290 cat >>confdefs.h <<EOF
16291 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16292 EOF
16293
16294 else
16295         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16296 fi
16297 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16298
16299 echo "$as_me:16299: checking if unsigned literals are legal" >&5
16300 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16301 if test "${cf_cv_unsigned_literals+set}" = set; then
16302   echo $ECHO_N "(cached) $ECHO_C" >&6
16303 else
16304
16305         cat >conftest.$ac_ext <<_ACEOF
16306 #line 16306 "configure"
16307 #include "confdefs.h"
16308
16309 int
16310 main ()
16311 {
16312 long x = 1L + 1UL + 1U + 1
16313   ;
16314   return 0;
16315 }
16316 _ACEOF
16317 rm -f conftest.$ac_objext
16318 if { (eval echo "$as_me:16318: \"$ac_compile\"") >&5
16319   (eval $ac_compile) 2>&5
16320   ac_status=$?
16321   echo "$as_me:16321: \$? = $ac_status" >&5
16322   (exit $ac_status); } &&
16323          { ac_try='test -s conftest.$ac_objext'
16324   { (eval echo "$as_me:16324: \"$ac_try\"") >&5
16325   (eval $ac_try) 2>&5
16326   ac_status=$?
16327   echo "$as_me:16327: \$? = $ac_status" >&5
16328   (exit $ac_status); }; }; then
16329   cf_cv_unsigned_literals=yes
16330 else
16331   echo "$as_me: failed program was:" >&5
16332 cat conftest.$ac_ext >&5
16333 cf_cv_unsigned_literals=no
16334 fi
16335 rm -f conftest.$ac_objext conftest.$ac_ext
16336
16337 fi
16338
16339 echo "$as_me:16339: result: $cf_cv_unsigned_literals" >&5
16340 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16341
16342 cf_cv_1UL="1"
16343 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16344 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16345
16346 if test $NCURSES_MMASK_T = auto ; then
16347         cf_cv_typeof_mmask_t=long
16348 else
16349         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16350 fi
16351 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16352
16353 ###     Checks for external-data
16354
16355 echo "$as_me:16355: checking if external errno is declared" >&5
16356 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16357 if test "${cf_cv_dcl_errno+set}" = set; then
16358   echo $ECHO_N "(cached) $ECHO_C" >&6
16359 else
16360
16361         cat >conftest.$ac_ext <<_ACEOF
16362 #line 16362 "configure"
16363 #include "confdefs.h"
16364
16365 #ifdef HAVE_STDLIB_H
16366 #include <stdlib.h>
16367 #endif
16368 #include <stdio.h>
16369 #include <sys/types.h>
16370 #include <errno.h>
16371 int
16372 main ()
16373 {
16374 int x = (int) errno
16375   ;
16376   return 0;
16377 }
16378 _ACEOF
16379 rm -f conftest.$ac_objext
16380 if { (eval echo "$as_me:16380: \"$ac_compile\"") >&5
16381   (eval $ac_compile) 2>&5
16382   ac_status=$?
16383   echo "$as_me:16383: \$? = $ac_status" >&5
16384   (exit $ac_status); } &&
16385          { ac_try='test -s conftest.$ac_objext'
16386   { (eval echo "$as_me:16386: \"$ac_try\"") >&5
16387   (eval $ac_try) 2>&5
16388   ac_status=$?
16389   echo "$as_me:16389: \$? = $ac_status" >&5
16390   (exit $ac_status); }; }; then
16391   cf_cv_dcl_errno=yes
16392 else
16393   echo "$as_me: failed program was:" >&5
16394 cat conftest.$ac_ext >&5
16395 cf_cv_dcl_errno=no
16396 fi
16397 rm -f conftest.$ac_objext conftest.$ac_ext
16398
16399 fi
16400 echo "$as_me:16400: result: $cf_cv_dcl_errno" >&5
16401 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16402
16403 if test "$cf_cv_dcl_errno" = no ; then
16404
16405 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16406
16407         cat >>confdefs.h <<EOF
16408 #define $cf_result 1
16409 EOF
16410
16411 fi
16412
16413 # It's possible (for near-UNIX clones) that the data doesn't exist
16414
16415 echo "$as_me:16415: checking if external errno exists" >&5
16416 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16417 if test "${cf_cv_have_errno+set}" = set; then
16418   echo $ECHO_N "(cached) $ECHO_C" >&6
16419 else
16420
16421         cat >conftest.$ac_ext <<_ACEOF
16422 #line 16422 "configure"
16423 #include "confdefs.h"
16424
16425 #undef errno
16426 extern int errno;
16427
16428 int
16429 main ()
16430 {
16431 errno = 2
16432   ;
16433   return 0;
16434 }
16435 _ACEOF
16436 rm -f conftest.$ac_objext conftest$ac_exeext
16437 if { (eval echo "$as_me:16437: \"$ac_link\"") >&5
16438   (eval $ac_link) 2>&5
16439   ac_status=$?
16440   echo "$as_me:16440: \$? = $ac_status" >&5
16441   (exit $ac_status); } &&
16442          { ac_try='test -s conftest$ac_exeext'
16443   { (eval echo "$as_me:16443: \"$ac_try\"") >&5
16444   (eval $ac_try) 2>&5
16445   ac_status=$?
16446   echo "$as_me:16446: \$? = $ac_status" >&5
16447   (exit $ac_status); }; }; then
16448   cf_cv_have_errno=yes
16449 else
16450   echo "$as_me: failed program was:" >&5
16451 cat conftest.$ac_ext >&5
16452 cf_cv_have_errno=no
16453 fi
16454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16455
16456 fi
16457 echo "$as_me:16457: result: $cf_cv_have_errno" >&5
16458 echo "${ECHO_T}$cf_cv_have_errno" >&6
16459
16460 if test "$cf_cv_have_errno" = yes ; then
16461
16462 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16463
16464         cat >>confdefs.h <<EOF
16465 #define $cf_result 1
16466 EOF
16467
16468 fi
16469
16470 echo "$as_me:16470: checking if data-only library module links" >&5
16471 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16472 if test "${cf_cv_link_dataonly+set}" = set; then
16473   echo $ECHO_N "(cached) $ECHO_C" >&6
16474 else
16475
16476         rm -f conftest.a
16477         cat >conftest.$ac_ext <<EOF
16478 #line 16478 "configure"
16479 int     testdata[3] = { 123, 456, 789 };
16480 EOF
16481         if { (eval echo "$as_me:16481: \"$ac_compile\"") >&5
16482   (eval $ac_compile) 2>&5
16483   ac_status=$?
16484   echo "$as_me:16484: \$? = $ac_status" >&5
16485   (exit $ac_status); } ; then
16486                 mv conftest.o data.o && \
16487                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16488         fi
16489         rm -f conftest.$ac_ext data.o
16490         cat >conftest.$ac_ext <<EOF
16491 #line 16491 "configure"
16492 int     testfunc()
16493 {
16494 #if defined(NeXT)
16495         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16496 #else
16497         extern int testdata[3];
16498         return testdata[0] == 123
16499            &&  testdata[1] == 456
16500            &&  testdata[2] == 789;
16501 #endif
16502 }
16503 EOF
16504         if { (eval echo "$as_me:16504: \"$ac_compile\"") >&5
16505   (eval $ac_compile) 2>&5
16506   ac_status=$?
16507   echo "$as_me:16507: \$? = $ac_status" >&5
16508   (exit $ac_status); }; then
16509                 mv conftest.o func.o && \
16510                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16511         fi
16512         rm -f conftest.$ac_ext func.o
16513         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16514         cf_saveLIBS="$LIBS"
16515         LIBS="conftest.a $LIBS"
16516         if test "$cross_compiling" = yes; then
16517   cf_cv_link_dataonly=unknown
16518 else
16519   cat >conftest.$ac_ext <<_ACEOF
16520 #line 16520 "configure"
16521 #include "confdefs.h"
16522
16523         int main()
16524         {
16525                 extern int testfunc();
16526                 ${cf_cv_main_return:-return} (!testfunc());
16527         }
16528
16529 _ACEOF
16530 rm -f conftest$ac_exeext
16531 if { (eval echo "$as_me:16531: \"$ac_link\"") >&5
16532   (eval $ac_link) 2>&5
16533   ac_status=$?
16534   echo "$as_me:16534: \$? = $ac_status" >&5
16535   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16536   { (eval echo "$as_me:16536: \"$ac_try\"") >&5
16537   (eval $ac_try) 2>&5
16538   ac_status=$?
16539   echo "$as_me:16539: \$? = $ac_status" >&5
16540   (exit $ac_status); }; }; then
16541   cf_cv_link_dataonly=yes
16542 else
16543   echo "$as_me: program exited with status $ac_status" >&5
16544 echo "$as_me: failed program was:" >&5
16545 cat conftest.$ac_ext >&5
16546 cf_cv_link_dataonly=no
16547 fi
16548 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16549 fi
16550         LIBS="$cf_saveLIBS"
16551
16552 fi
16553
16554 echo "$as_me:16554: result: $cf_cv_link_dataonly" >&5
16555 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16556
16557 if test "$cf_cv_link_dataonly" = no ; then
16558
16559 cat >>confdefs.h <<\EOF
16560 #define BROKEN_LINKER 1
16561 EOF
16562
16563         BROKEN_LINKER=1
16564 fi
16565
16566 ###     Checks for library functions.
16567
16568 for ac_func in \
16569 getcwd \
16570 getegid \
16571 geteuid \
16572 getopt \
16573 getttynam \
16574 issetugid \
16575 poll \
16576 putenv \
16577 remove \
16578 select \
16579 setbuf \
16580 setbuffer \
16581 setenv \
16582 setvbuf \
16583 sigaction \
16584 sigvec \
16585 strdup \
16586 strstr \
16587 tcgetpgrp \
16588 times \
16589 vsnprintf \
16590
16591 do
16592 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16593 echo "$as_me:16593: checking for $ac_func" >&5
16594 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16595 if eval "test \"\${$as_ac_var+set}\" = set"; then
16596   echo $ECHO_N "(cached) $ECHO_C" >&6
16597 else
16598   cat >conftest.$ac_ext <<_ACEOF
16599 #line 16599 "configure"
16600 #include "confdefs.h"
16601 /* System header to define __stub macros and hopefully few prototypes,
16602     which can conflict with char $ac_func (); below.  */
16603 #include <assert.h>
16604 /* Override any gcc2 internal prototype to avoid an error.  */
16605 #ifdef __cplusplus
16606 extern "C"
16607 #endif
16608 /* We use char because int might match the return type of a gcc2
16609    builtin and then its argument prototype would still apply.  */
16610 char $ac_func ();
16611 char (*f) ();
16612
16613 int
16614 main ()
16615 {
16616 /* The GNU C library defines this for functions which it implements
16617     to always fail with ENOSYS.  Some functions are actually named
16618     something starting with __ and the normal name is an alias.  */
16619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16620 choke me
16621 #else
16622 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16623 #endif
16624
16625   ;
16626   return 0;
16627 }
16628 _ACEOF
16629 rm -f conftest.$ac_objext conftest$ac_exeext
16630 if { (eval echo "$as_me:16630: \"$ac_link\"") >&5
16631   (eval $ac_link) 2>&5
16632   ac_status=$?
16633   echo "$as_me:16633: \$? = $ac_status" >&5
16634   (exit $ac_status); } &&
16635          { ac_try='test -s conftest$ac_exeext'
16636   { (eval echo "$as_me:16636: \"$ac_try\"") >&5
16637   (eval $ac_try) 2>&5
16638   ac_status=$?
16639   echo "$as_me:16639: \$? = $ac_status" >&5
16640   (exit $ac_status); }; }; then
16641   eval "$as_ac_var=yes"
16642 else
16643   echo "$as_me: failed program was:" >&5
16644 cat conftest.$ac_ext >&5
16645 eval "$as_ac_var=no"
16646 fi
16647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16648 fi
16649 echo "$as_me:16649: result: `eval echo '${'$as_ac_var'}'`" >&5
16650 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16651 if test `eval echo '${'$as_ac_var'}'` = yes; then
16652   cat >>confdefs.h <<EOF
16653 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16654 EOF
16655
16656 fi
16657 done
16658
16659 if test "x$ac_cv_func_getopt" = xno &&
16660    test "x$cf_with_progs$cf_with_tests" != xnono; then
16661         { { echo "$as_me:16661: error: getopt is required for building programs" >&5
16662 echo "$as_me: error: getopt is required for building programs" >&2;}
16663    { (exit 1); exit 1; }; }
16664 fi
16665
16666 if test "x$with_getcap" = "xyes" ; then
16667
16668 echo "$as_me:16668: checking for terminal-capability database functions" >&5
16669 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16670 if test "${cf_cv_cgetent+set}" = set; then
16671   echo $ECHO_N "(cached) $ECHO_C" >&6
16672 else
16673
16674 cat >conftest.$ac_ext <<_ACEOF
16675 #line 16675 "configure"
16676 #include "confdefs.h"
16677
16678 #include <stdlib.h>
16679 int
16680 main ()
16681 {
16682
16683         char temp[128];
16684         char *buf = temp;
16685         char *db_array = temp;
16686         cgetent(&buf, &db_array, "vt100");
16687         cgetcap(buf, "tc", '=');
16688         cgetmatch(buf, "tc");
16689
16690   ;
16691   return 0;
16692 }
16693 _ACEOF
16694 rm -f conftest.$ac_objext conftest$ac_exeext
16695 if { (eval echo "$as_me:16695: \"$ac_link\"") >&5
16696   (eval $ac_link) 2>&5
16697   ac_status=$?
16698   echo "$as_me:16698: \$? = $ac_status" >&5
16699   (exit $ac_status); } &&
16700          { ac_try='test -s conftest$ac_exeext'
16701   { (eval echo "$as_me:16701: \"$ac_try\"") >&5
16702   (eval $ac_try) 2>&5
16703   ac_status=$?
16704   echo "$as_me:16704: \$? = $ac_status" >&5
16705   (exit $ac_status); }; }; then
16706   cf_cv_cgetent=yes
16707 else
16708   echo "$as_me: failed program was:" >&5
16709 cat conftest.$ac_ext >&5
16710 cf_cv_cgetent=no
16711 fi
16712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16713
16714 fi
16715 echo "$as_me:16715: result: $cf_cv_cgetent" >&5
16716 echo "${ECHO_T}$cf_cv_cgetent" >&6
16717
16718 if test "$cf_cv_cgetent" = yes
16719 then
16720
16721 cat >>confdefs.h <<\EOF
16722 #define HAVE_BSD_CGETENT 1
16723 EOF
16724
16725 echo "$as_me:16725: checking if cgetent uses const parameter" >&5
16726 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16727 if test "${cf_cv_cgetent_const+set}" = set; then
16728   echo $ECHO_N "(cached) $ECHO_C" >&6
16729 else
16730
16731 cat >conftest.$ac_ext <<_ACEOF
16732 #line 16732 "configure"
16733 #include "confdefs.h"
16734
16735 #include <stdlib.h>
16736 int
16737 main ()
16738 {
16739
16740         char temp[128];
16741         char *buf = temp;
16742 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16743         const char *db_array = temp;
16744         cgetent(&buf, &db_array, "vt100");
16745 #endif
16746         cgetcap(buf, "tc", '=');
16747         cgetmatch(buf, "tc");
16748
16749   ;
16750   return 0;
16751 }
16752 _ACEOF
16753 rm -f conftest.$ac_objext conftest$ac_exeext
16754 if { (eval echo "$as_me:16754: \"$ac_link\"") >&5
16755   (eval $ac_link) 2>&5
16756   ac_status=$?
16757   echo "$as_me:16757: \$? = $ac_status" >&5
16758   (exit $ac_status); } &&
16759          { ac_try='test -s conftest$ac_exeext'
16760   { (eval echo "$as_me:16760: \"$ac_try\"") >&5
16761   (eval $ac_try) 2>&5
16762   ac_status=$?
16763   echo "$as_me:16763: \$? = $ac_status" >&5
16764   (exit $ac_status); }; }; then
16765   cf_cv_cgetent_const=yes
16766 else
16767   echo "$as_me: failed program was:" >&5
16768 cat conftest.$ac_ext >&5
16769 cf_cv_cgetent_const=no
16770 fi
16771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16772
16773 fi
16774 echo "$as_me:16774: result: $cf_cv_cgetent_const" >&5
16775 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16776         if test "$cf_cv_cgetent_const" = yes
16777         then
16778
16779 cat >>confdefs.h <<EOF
16780 #define CGETENT_CONST const
16781 EOF
16782
16783         fi
16784 fi
16785
16786 fi
16787
16788 echo "$as_me:16788: checking for isascii" >&5
16789 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16790 if test "${cf_cv_have_isascii+set}" = set; then
16791   echo $ECHO_N "(cached) $ECHO_C" >&6
16792 else
16793
16794         cat >conftest.$ac_ext <<_ACEOF
16795 #line 16795 "configure"
16796 #include "confdefs.h"
16797 #include <ctype.h>
16798 int
16799 main ()
16800 {
16801 int x = isascii(' ')
16802   ;
16803   return 0;
16804 }
16805 _ACEOF
16806 rm -f conftest.$ac_objext conftest$ac_exeext
16807 if { (eval echo "$as_me:16807: \"$ac_link\"") >&5
16808   (eval $ac_link) 2>&5
16809   ac_status=$?
16810   echo "$as_me:16810: \$? = $ac_status" >&5
16811   (exit $ac_status); } &&
16812          { ac_try='test -s conftest$ac_exeext'
16813   { (eval echo "$as_me:16813: \"$ac_try\"") >&5
16814   (eval $ac_try) 2>&5
16815   ac_status=$?
16816   echo "$as_me:16816: \$? = $ac_status" >&5
16817   (exit $ac_status); }; }; then
16818   cf_cv_have_isascii=yes
16819 else
16820   echo "$as_me: failed program was:" >&5
16821 cat conftest.$ac_ext >&5
16822 cf_cv_have_isascii=no
16823 fi
16824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16825
16826 fi
16827 echo "$as_me:16827: result: $cf_cv_have_isascii" >&5
16828 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16829 test "$cf_cv_have_isascii" = yes &&
16830 cat >>confdefs.h <<\EOF
16831 #define HAVE_ISASCII 1
16832 EOF
16833
16834 if test "$ac_cv_func_sigaction" = yes; then
16835 echo "$as_me:16835: checking whether sigaction needs _POSIX_SOURCE" >&5
16836 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16837 cat >conftest.$ac_ext <<_ACEOF
16838 #line 16838 "configure"
16839 #include "confdefs.h"
16840
16841 #include <sys/types.h>
16842 #include <signal.h>
16843 int
16844 main ()
16845 {
16846 struct sigaction act
16847   ;
16848   return 0;
16849 }
16850 _ACEOF
16851 rm -f conftest.$ac_objext
16852 if { (eval echo "$as_me:16852: \"$ac_compile\"") >&5
16853   (eval $ac_compile) 2>&5
16854   ac_status=$?
16855   echo "$as_me:16855: \$? = $ac_status" >&5
16856   (exit $ac_status); } &&
16857          { ac_try='test -s conftest.$ac_objext'
16858   { (eval echo "$as_me:16858: \"$ac_try\"") >&5
16859   (eval $ac_try) 2>&5
16860   ac_status=$?
16861   echo "$as_me:16861: \$? = $ac_status" >&5
16862   (exit $ac_status); }; }; then
16863   sigact_bad=no
16864 else
16865   echo "$as_me: failed program was:" >&5
16866 cat conftest.$ac_ext >&5
16867
16868 cat >conftest.$ac_ext <<_ACEOF
16869 #line 16869 "configure"
16870 #include "confdefs.h"
16871
16872 #define _POSIX_SOURCE
16873 #include <sys/types.h>
16874 #include <signal.h>
16875 int
16876 main ()
16877 {
16878 struct sigaction act
16879   ;
16880   return 0;
16881 }
16882 _ACEOF
16883 rm -f conftest.$ac_objext
16884 if { (eval echo "$as_me:16884: \"$ac_compile\"") >&5
16885   (eval $ac_compile) 2>&5
16886   ac_status=$?
16887   echo "$as_me:16887: \$? = $ac_status" >&5
16888   (exit $ac_status); } &&
16889          { ac_try='test -s conftest.$ac_objext'
16890   { (eval echo "$as_me:16890: \"$ac_try\"") >&5
16891   (eval $ac_try) 2>&5
16892   ac_status=$?
16893   echo "$as_me:16893: \$? = $ac_status" >&5
16894   (exit $ac_status); }; }; then
16895   sigact_bad=yes
16896
16897 cat >>confdefs.h <<\EOF
16898 #define _POSIX_SOURCE 1
16899 EOF
16900
16901 else
16902   echo "$as_me: failed program was:" >&5
16903 cat conftest.$ac_ext >&5
16904 sigact_bad=unknown
16905 fi
16906 rm -f conftest.$ac_objext conftest.$ac_ext
16907 fi
16908 rm -f conftest.$ac_objext conftest.$ac_ext
16909 echo "$as_me:16909: result: $sigact_bad" >&5
16910 echo "${ECHO_T}$sigact_bad" >&6
16911 fi
16912
16913 echo "$as_me:16913: checking if nanosleep really works" >&5
16914 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16915 if test "${cf_cv_func_nanosleep+set}" = set; then
16916   echo $ECHO_N "(cached) $ECHO_C" >&6
16917 else
16918
16919 if test "$cross_compiling" = yes; then
16920   cf_cv_func_nanosleep=unknown
16921 else
16922   cat >conftest.$ac_ext <<_ACEOF
16923 #line 16923 "configure"
16924 #include "confdefs.h"
16925
16926 #include <stdio.h>
16927 #include <errno.h>
16928 #include <time.h>
16929
16930 #ifdef HAVE_SYS_TIME_H
16931 #include <sys/time.h>
16932 #endif
16933
16934 int main() {
16935         struct timespec ts1, ts2;
16936         int code;
16937         ts1.tv_sec  = 0;
16938         ts1.tv_nsec = 750000000;
16939         ts2.tv_sec  = 0;
16940         ts2.tv_nsec = 0;
16941         errno = 0;
16942         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16943         ${cf_cv_main_return:-return}(code != 0);
16944 }
16945
16946 _ACEOF
16947 rm -f conftest$ac_exeext
16948 if { (eval echo "$as_me:16948: \"$ac_link\"") >&5
16949   (eval $ac_link) 2>&5
16950   ac_status=$?
16951   echo "$as_me:16951: \$? = $ac_status" >&5
16952   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16953   { (eval echo "$as_me:16953: \"$ac_try\"") >&5
16954   (eval $ac_try) 2>&5
16955   ac_status=$?
16956   echo "$as_me:16956: \$? = $ac_status" >&5
16957   (exit $ac_status); }; }; then
16958   cf_cv_func_nanosleep=yes
16959 else
16960   echo "$as_me: program exited with status $ac_status" >&5
16961 echo "$as_me: failed program was:" >&5
16962 cat conftest.$ac_ext >&5
16963 cf_cv_func_nanosleep=no
16964 fi
16965 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16966 fi
16967 fi
16968 echo "$as_me:16968: result: $cf_cv_func_nanosleep" >&5
16969 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16970
16971 test "$cf_cv_func_nanosleep" = "yes" &&
16972 cat >>confdefs.h <<\EOF
16973 #define HAVE_NANOSLEEP 1
16974 EOF
16975
16976 for ac_header in \
16977 termio.h \
16978 termios.h \
16979 unistd.h \
16980
16981 do
16982 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16983 echo "$as_me:16983: checking for $ac_header" >&5
16984 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16985 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16986   echo $ECHO_N "(cached) $ECHO_C" >&6
16987 else
16988   cat >conftest.$ac_ext <<_ACEOF
16989 #line 16989 "configure"
16990 #include "confdefs.h"
16991 #include <$ac_header>
16992 _ACEOF
16993 if { (eval echo "$as_me:16993: \"$ac_cpp conftest.$ac_ext\"") >&5
16994   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16995   ac_status=$?
16996   egrep -v '^ *\+' conftest.er1 >conftest.err
16997   rm -f conftest.er1
16998   cat conftest.err >&5
16999   echo "$as_me:16999: \$? = $ac_status" >&5
17000   (exit $ac_status); } >/dev/null; then
17001   if test -s conftest.err; then
17002     ac_cpp_err=$ac_c_preproc_warn_flag
17003   else
17004     ac_cpp_err=
17005   fi
17006 else
17007   ac_cpp_err=yes
17008 fi
17009 if test -z "$ac_cpp_err"; then
17010   eval "$as_ac_Header=yes"
17011 else
17012   echo "$as_me: failed program was:" >&5
17013   cat conftest.$ac_ext >&5
17014   eval "$as_ac_Header=no"
17015 fi
17016 rm -f conftest.err conftest.$ac_ext
17017 fi
17018 echo "$as_me:17018: result: `eval echo '${'$as_ac_Header'}'`" >&5
17019 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17020 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17021   cat >>confdefs.h <<EOF
17022 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17023 EOF
17024
17025 fi
17026 done
17027
17028 if test "$ISC" = yes ; then
17029
17030 for ac_header in sys/termio.h
17031 do
17032 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17033 echo "$as_me:17033: checking for $ac_header" >&5
17034 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17035 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17036   echo $ECHO_N "(cached) $ECHO_C" >&6
17037 else
17038   cat >conftest.$ac_ext <<_ACEOF
17039 #line 17039 "configure"
17040 #include "confdefs.h"
17041 #include <$ac_header>
17042 _ACEOF
17043 if { (eval echo "$as_me:17043: \"$ac_cpp conftest.$ac_ext\"") >&5
17044   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17045   ac_status=$?
17046   egrep -v '^ *\+' conftest.er1 >conftest.err
17047   rm -f conftest.er1
17048   cat conftest.err >&5
17049   echo "$as_me:17049: \$? = $ac_status" >&5
17050   (exit $ac_status); } >/dev/null; then
17051   if test -s conftest.err; then
17052     ac_cpp_err=$ac_c_preproc_warn_flag
17053   else
17054     ac_cpp_err=
17055   fi
17056 else
17057   ac_cpp_err=yes
17058 fi
17059 if test -z "$ac_cpp_err"; then
17060   eval "$as_ac_Header=yes"
17061 else
17062   echo "$as_me: failed program was:" >&5
17063   cat conftest.$ac_ext >&5
17064   eval "$as_ac_Header=no"
17065 fi
17066 rm -f conftest.err conftest.$ac_ext
17067 fi
17068 echo "$as_me:17068: result: `eval echo '${'$as_ac_Header'}'`" >&5
17069 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17070 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17071   cat >>confdefs.h <<EOF
17072 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17073 EOF
17074
17075 fi
17076 done
17077
17078 fi
17079 if test "$ac_cv_header_termios_h" = yes ; then
17080         case "$CFLAGS $CPPFLAGS" in
17081         (*-D_POSIX_SOURCE*)
17082                 termios_bad=dunno ;;
17083         (*)     termios_bad=maybe ;;
17084         esac
17085         if test "$termios_bad" = maybe ; then
17086         echo "$as_me:17086: checking whether termios.h needs _POSIX_SOURCE" >&5
17087 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17088         cat >conftest.$ac_ext <<_ACEOF
17089 #line 17089 "configure"
17090 #include "confdefs.h"
17091 #include <termios.h>
17092 int
17093 main ()
17094 {
17095 struct termios foo; int x = foo.c_iflag
17096   ;
17097   return 0;
17098 }
17099 _ACEOF
17100 rm -f conftest.$ac_objext
17101 if { (eval echo "$as_me:17101: \"$ac_compile\"") >&5
17102   (eval $ac_compile) 2>&5
17103   ac_status=$?
17104   echo "$as_me:17104: \$? = $ac_status" >&5
17105   (exit $ac_status); } &&
17106          { ac_try='test -s conftest.$ac_objext'
17107   { (eval echo "$as_me:17107: \"$ac_try\"") >&5
17108   (eval $ac_try) 2>&5
17109   ac_status=$?
17110   echo "$as_me:17110: \$? = $ac_status" >&5
17111   (exit $ac_status); }; }; then
17112   termios_bad=no
17113 else
17114   echo "$as_me: failed program was:" >&5
17115 cat conftest.$ac_ext >&5
17116
17117                 cat >conftest.$ac_ext <<_ACEOF
17118 #line 17118 "configure"
17119 #include "confdefs.h"
17120
17121 #define _POSIX_SOURCE
17122 #include <termios.h>
17123 int
17124 main ()
17125 {
17126 struct termios foo; int x = foo.c_iflag
17127   ;
17128   return 0;
17129 }
17130 _ACEOF
17131 rm -f conftest.$ac_objext
17132 if { (eval echo "$as_me:17132: \"$ac_compile\"") >&5
17133   (eval $ac_compile) 2>&5
17134   ac_status=$?
17135   echo "$as_me:17135: \$? = $ac_status" >&5
17136   (exit $ac_status); } &&
17137          { ac_try='test -s conftest.$ac_objext'
17138   { (eval echo "$as_me:17138: \"$ac_try\"") >&5
17139   (eval $ac_try) 2>&5
17140   ac_status=$?
17141   echo "$as_me:17141: \$? = $ac_status" >&5
17142   (exit $ac_status); }; }; then
17143   termios_bad=unknown
17144 else
17145   echo "$as_me: failed program was:" >&5
17146 cat conftest.$ac_ext >&5
17147 termios_bad=yes
17148 cat >>confdefs.h <<\EOF
17149 #define _POSIX_SOURCE 1
17150 EOF
17151
17152 fi
17153 rm -f conftest.$ac_objext conftest.$ac_ext
17154
17155 fi
17156 rm -f conftest.$ac_objext conftest.$ac_ext
17157         echo "$as_me:17157: result: $termios_bad" >&5
17158 echo "${ECHO_T}$termios_bad" >&6
17159         fi
17160 fi
17161
17162 echo "$as_me:17162: checking for tcgetattr" >&5
17163 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17164 if test "${cf_cv_have_tcgetattr+set}" = set; then
17165   echo $ECHO_N "(cached) $ECHO_C" >&6
17166 else
17167
17168 cat >conftest.$ac_ext <<_ACEOF
17169 #line 17169 "configure"
17170 #include "confdefs.h"
17171
17172 #include <sys/types.h>
17173 #ifdef HAVE_UNISTD_H
17174 #include <unistd.h>
17175 #endif
17176 #ifdef HAVE_TERMIOS_H
17177 #include <termios.h>
17178 #define TTY struct termios
17179 #else
17180 #ifdef HAVE_TERMIO_H
17181 #include <termio.h>
17182 #define TTY struct termio
17183 #endif
17184 #endif
17185
17186 int
17187 main ()
17188 {
17189
17190 TTY foo;
17191 tcgetattr(1, &foo);
17192   ;
17193   return 0;
17194 }
17195 _ACEOF
17196 rm -f conftest.$ac_objext conftest$ac_exeext
17197 if { (eval echo "$as_me:17197: \"$ac_link\"") >&5
17198   (eval $ac_link) 2>&5
17199   ac_status=$?
17200   echo "$as_me:17200: \$? = $ac_status" >&5
17201   (exit $ac_status); } &&
17202          { ac_try='test -s conftest$ac_exeext'
17203   { (eval echo "$as_me:17203: \"$ac_try\"") >&5
17204   (eval $ac_try) 2>&5
17205   ac_status=$?
17206   echo "$as_me:17206: \$? = $ac_status" >&5
17207   (exit $ac_status); }; }; then
17208   cf_cv_have_tcgetattr=yes
17209 else
17210   echo "$as_me: failed program was:" >&5
17211 cat conftest.$ac_ext >&5
17212 cf_cv_have_tcgetattr=no
17213 fi
17214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17215 fi
17216 echo "$as_me:17216: result: $cf_cv_have_tcgetattr" >&5
17217 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17218 test "$cf_cv_have_tcgetattr" = yes &&
17219 cat >>confdefs.h <<\EOF
17220 #define HAVE_TCGETATTR 1
17221 EOF
17222
17223 echo "$as_me:17223: checking for vsscanf function or workaround" >&5
17224 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17225 if test "${cf_cv_func_vsscanf+set}" = set; then
17226   echo $ECHO_N "(cached) $ECHO_C" >&6
17227 else
17228
17229 cat >conftest.$ac_ext <<_ACEOF
17230 #line 17230 "configure"
17231 #include "confdefs.h"
17232
17233 #include <stdarg.h>
17234 #include <stdio.h>
17235 int
17236 main ()
17237 {
17238
17239         va_list ap;
17240         vsscanf("from", "%d", ap)
17241   ;
17242   return 0;
17243 }
17244 _ACEOF
17245 rm -f conftest.$ac_objext conftest$ac_exeext
17246 if { (eval echo "$as_me:17246: \"$ac_link\"") >&5
17247   (eval $ac_link) 2>&5
17248   ac_status=$?
17249   echo "$as_me:17249: \$? = $ac_status" >&5
17250   (exit $ac_status); } &&
17251          { ac_try='test -s conftest$ac_exeext'
17252   { (eval echo "$as_me:17252: \"$ac_try\"") >&5
17253   (eval $ac_try) 2>&5
17254   ac_status=$?
17255   echo "$as_me:17255: \$? = $ac_status" >&5
17256   (exit $ac_status); }; }; then
17257   cf_cv_func_vsscanf=vsscanf
17258 else
17259   echo "$as_me: failed program was:" >&5
17260 cat conftest.$ac_ext >&5
17261
17262 cat >conftest.$ac_ext <<_ACEOF
17263 #line 17263 "configure"
17264 #include "confdefs.h"
17265
17266 #include <stdarg.h>
17267 #include <stdio.h>
17268 int
17269 main ()
17270 {
17271
17272         FILE strbuf;
17273         char *str = "from";
17274
17275         strbuf._flag = _IOREAD;
17276         strbuf._ptr = strbuf._base = (unsigned char *) str;
17277         strbuf._cnt = strlen(str);
17278         strbuf._file = _NFILE;
17279         return (vfscanf(&strbuf, "%d", ap))
17280   ;
17281   return 0;
17282 }
17283 _ACEOF
17284 rm -f conftest.$ac_objext conftest$ac_exeext
17285 if { (eval echo "$as_me:17285: \"$ac_link\"") >&5
17286   (eval $ac_link) 2>&5
17287   ac_status=$?
17288   echo "$as_me:17288: \$? = $ac_status" >&5
17289   (exit $ac_status); } &&
17290          { ac_try='test -s conftest$ac_exeext'
17291   { (eval echo "$as_me:17291: \"$ac_try\"") >&5
17292   (eval $ac_try) 2>&5
17293   ac_status=$?
17294   echo "$as_me:17294: \$? = $ac_status" >&5
17295   (exit $ac_status); }; }; then
17296   cf_cv_func_vsscanf=vfscanf
17297 else
17298   echo "$as_me: failed program was:" >&5
17299 cat conftest.$ac_ext >&5
17300
17301 cat >conftest.$ac_ext <<_ACEOF
17302 #line 17302 "configure"
17303 #include "confdefs.h"
17304
17305 #include <stdarg.h>
17306 #include <stdio.h>
17307 int
17308 main ()
17309 {
17310
17311         FILE strbuf;
17312         char *str = "from";
17313
17314         strbuf._flag = _IOREAD;
17315         strbuf._ptr = strbuf._base = (unsigned char *) str;
17316         strbuf._cnt = strlen(str);
17317         strbuf._file = _NFILE;
17318         return (_doscan(&strbuf, "%d", ap))
17319   ;
17320   return 0;
17321 }
17322 _ACEOF
17323 rm -f conftest.$ac_objext conftest$ac_exeext
17324 if { (eval echo "$as_me:17324: \"$ac_link\"") >&5
17325   (eval $ac_link) 2>&5
17326   ac_status=$?
17327   echo "$as_me:17327: \$? = $ac_status" >&5
17328   (exit $ac_status); } &&
17329          { ac_try='test -s conftest$ac_exeext'
17330   { (eval echo "$as_me:17330: \"$ac_try\"") >&5
17331   (eval $ac_try) 2>&5
17332   ac_status=$?
17333   echo "$as_me:17333: \$? = $ac_status" >&5
17334   (exit $ac_status); }; }; then
17335   cf_cv_func_vsscanf=_doscan
17336 else
17337   echo "$as_me: failed program was:" >&5
17338 cat conftest.$ac_ext >&5
17339
17340 cf_cv_func_vsscanf=no
17341 fi
17342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17343 fi
17344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17345 fi
17346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17347 fi
17348 echo "$as_me:17348: result: $cf_cv_func_vsscanf" >&5
17349 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17350
17351 case $cf_cv_func_vsscanf in
17352 (vsscanf)
17353 cat >>confdefs.h <<\EOF
17354 #define HAVE_VSSCANF 1
17355 EOF
17356 ;;
17357 (vfscanf)
17358 cat >>confdefs.h <<\EOF
17359 #define HAVE_VFSCANF 1
17360 EOF
17361 ;;
17362 (_doscan)
17363 cat >>confdefs.h <<\EOF
17364 #define HAVE__DOSCAN 1
17365 EOF
17366 ;;
17367 esac
17368
17369 echo "$as_me:17369: checking for working mkstemp" >&5
17370 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17371 if test "${cf_cv_func_mkstemp+set}" = set; then
17372   echo $ECHO_N "(cached) $ECHO_C" >&6
17373 else
17374
17375 rm -rf conftest*
17376 if test "$cross_compiling" = yes; then
17377   cf_cv_func_mkstemp=maybe
17378 else
17379   cat >conftest.$ac_ext <<_ACEOF
17380 #line 17380 "configure"
17381 #include "confdefs.h"
17382
17383 #include <sys/types.h>
17384 #include <stdlib.h>
17385 #include <stdio.h>
17386 #include <string.h>
17387 #include <sys/stat.h>
17388 int main()
17389 {
17390         char *tmpl = "conftestXXXXXX";
17391         char name[2][80];
17392         int n;
17393         int result = 0;
17394         int fd;
17395         struct stat sb;
17396
17397         umask(077);
17398         for (n = 0; n < 2; ++n) {
17399                 strcpy(name[n], tmpl);
17400                 if ((fd = mkstemp(name[n])) >= 0) {
17401                         if (!strcmp(name[n], tmpl)
17402                          || stat(name[n], &sb) != 0
17403                          || (sb.st_mode & S_IFMT) != S_IFREG
17404                          || (sb.st_mode & 077) != 0) {
17405                                 result = 1;
17406                         }
17407                         close(fd);
17408                 }
17409         }
17410         if (result == 0
17411          && !strcmp(name[0], name[1]))
17412                 result = 1;
17413         ${cf_cv_main_return:-return}(result);
17414 }
17415
17416 _ACEOF
17417 rm -f conftest$ac_exeext
17418 if { (eval echo "$as_me:17418: \"$ac_link\"") >&5
17419   (eval $ac_link) 2>&5
17420   ac_status=$?
17421   echo "$as_me:17421: \$? = $ac_status" >&5
17422   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17423   { (eval echo "$as_me:17423: \"$ac_try\"") >&5
17424   (eval $ac_try) 2>&5
17425   ac_status=$?
17426   echo "$as_me:17426: \$? = $ac_status" >&5
17427   (exit $ac_status); }; }; then
17428   cf_cv_func_mkstemp=yes
17429
17430 else
17431   echo "$as_me: program exited with status $ac_status" >&5
17432 echo "$as_me: failed program was:" >&5
17433 cat conftest.$ac_ext >&5
17434 cf_cv_func_mkstemp=no
17435
17436 fi
17437 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17438 fi
17439
17440 fi
17441 echo "$as_me:17441: result: $cf_cv_func_mkstemp" >&5
17442 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17443 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17444         echo "$as_me:17444: checking for mkstemp" >&5
17445 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17446 if test "${ac_cv_func_mkstemp+set}" = set; then
17447   echo $ECHO_N "(cached) $ECHO_C" >&6
17448 else
17449   cat >conftest.$ac_ext <<_ACEOF
17450 #line 17450 "configure"
17451 #include "confdefs.h"
17452 /* System header to define __stub macros and hopefully few prototypes,
17453     which can conflict with char mkstemp (); below.  */
17454 #include <assert.h>
17455 /* Override any gcc2 internal prototype to avoid an error.  */
17456 #ifdef __cplusplus
17457 extern "C"
17458 #endif
17459 /* We use char because int might match the return type of a gcc2
17460    builtin and then its argument prototype would still apply.  */
17461 char mkstemp ();
17462 char (*f) ();
17463
17464 int
17465 main ()
17466 {
17467 /* The GNU C library defines this for functions which it implements
17468     to always fail with ENOSYS.  Some functions are actually named
17469     something starting with __ and the normal name is an alias.  */
17470 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17471 choke me
17472 #else
17473 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17474 #endif
17475
17476   ;
17477   return 0;
17478 }
17479 _ACEOF
17480 rm -f conftest.$ac_objext conftest$ac_exeext
17481 if { (eval echo "$as_me:17481: \"$ac_link\"") >&5
17482   (eval $ac_link) 2>&5
17483   ac_status=$?
17484   echo "$as_me:17484: \$? = $ac_status" >&5
17485   (exit $ac_status); } &&
17486          { ac_try='test -s conftest$ac_exeext'
17487   { (eval echo "$as_me:17487: \"$ac_try\"") >&5
17488   (eval $ac_try) 2>&5
17489   ac_status=$?
17490   echo "$as_me:17490: \$? = $ac_status" >&5
17491   (exit $ac_status); }; }; then
17492   ac_cv_func_mkstemp=yes
17493 else
17494   echo "$as_me: failed program was:" >&5
17495 cat conftest.$ac_ext >&5
17496 ac_cv_func_mkstemp=no
17497 fi
17498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17499 fi
17500 echo "$as_me:17500: result: $ac_cv_func_mkstemp" >&5
17501 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17502
17503 fi
17504 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17505
17506 cat >>confdefs.h <<\EOF
17507 #define HAVE_MKSTEMP 1
17508 EOF
17509
17510 fi
17511
17512 # setup for prototype of fallback for vsscanf()
17513
17514 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17515         HAVE_VSSCANF=1
17516 else
17517         HAVE_VSSCANF=0
17518 fi
17519
17520 if test "x$cross_compiling" = xyes ; then
17521         { echo "$as_me:17521: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17522 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17523 else
17524         echo "$as_me:17524: checking whether setvbuf arguments are reversed" >&5
17525 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17526 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17527   echo $ECHO_N "(cached) $ECHO_C" >&6
17528 else
17529   if test "$cross_compiling" = yes; then
17530   { { echo "$as_me:17530: error: cannot run test program while cross compiling" >&5
17531 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17532    { (exit 1); exit 1; }; }
17533 else
17534   cat >conftest.$ac_ext <<_ACEOF
17535 #line 17535 "configure"
17536 #include "confdefs.h"
17537 #include <stdio.h>
17538 /* If setvbuf has the reversed format, exit 0. */
17539 int
17540 main ()
17541 {
17542   /* This call has the arguments reversed.
17543      A reversed system may check and see that the address of main
17544      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17545   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17546     $ac_main_return(1);
17547   putc('\r', stdout);
17548   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17549 }
17550 _ACEOF
17551 rm -f conftest$ac_exeext
17552 if { (eval echo "$as_me:17552: \"$ac_link\"") >&5
17553   (eval $ac_link) 2>&5
17554   ac_status=$?
17555   echo "$as_me:17555: \$? = $ac_status" >&5
17556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17557   { (eval echo "$as_me:17557: \"$ac_try\"") >&5
17558   (eval $ac_try) 2>&5
17559   ac_status=$?
17560   echo "$as_me:17560: \$? = $ac_status" >&5
17561   (exit $ac_status); }; }; then
17562   ac_cv_func_setvbuf_reversed=yes
17563 else
17564   echo "$as_me: program exited with status $ac_status" >&5
17565 echo "$as_me: failed program was:" >&5
17566 cat conftest.$ac_ext >&5
17567 ac_cv_func_setvbuf_reversed=no
17568 fi
17569 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17570 fi
17571 rm -f core core.* *.core
17572 fi
17573 echo "$as_me:17573: result: $ac_cv_func_setvbuf_reversed" >&5
17574 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17575 if test $ac_cv_func_setvbuf_reversed = yes; then
17576
17577 cat >>confdefs.h <<\EOF
17578 #define SETVBUF_REVERSED 1
17579 EOF
17580
17581 fi
17582
17583 fi
17584 echo "$as_me:17584: checking for intptr_t" >&5
17585 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17586 if test "${ac_cv_type_intptr_t+set}" = set; then
17587   echo $ECHO_N "(cached) $ECHO_C" >&6
17588 else
17589   cat >conftest.$ac_ext <<_ACEOF
17590 #line 17590 "configure"
17591 #include "confdefs.h"
17592 $ac_includes_default
17593 int
17594 main ()
17595 {
17596 if ((intptr_t *) 0)
17597   return 0;
17598 if (sizeof (intptr_t))
17599   return 0;
17600   ;
17601   return 0;
17602 }
17603 _ACEOF
17604 rm -f conftest.$ac_objext
17605 if { (eval echo "$as_me:17605: \"$ac_compile\"") >&5
17606   (eval $ac_compile) 2>&5
17607   ac_status=$?
17608   echo "$as_me:17608: \$? = $ac_status" >&5
17609   (exit $ac_status); } &&
17610          { ac_try='test -s conftest.$ac_objext'
17611   { (eval echo "$as_me:17611: \"$ac_try\"") >&5
17612   (eval $ac_try) 2>&5
17613   ac_status=$?
17614   echo "$as_me:17614: \$? = $ac_status" >&5
17615   (exit $ac_status); }; }; then
17616   ac_cv_type_intptr_t=yes
17617 else
17618   echo "$as_me: failed program was:" >&5
17619 cat conftest.$ac_ext >&5
17620 ac_cv_type_intptr_t=no
17621 fi
17622 rm -f conftest.$ac_objext conftest.$ac_ext
17623 fi
17624 echo "$as_me:17624: result: $ac_cv_type_intptr_t" >&5
17625 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17626 if test $ac_cv_type_intptr_t = yes; then
17627   :
17628 else
17629
17630 cat >>confdefs.h <<EOF
17631 #define intptr_t long
17632 EOF
17633
17634 fi
17635
17636 echo "$as_me:17636: checking for ssize_t" >&5
17637 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17638 if test "${ac_cv_type_ssize_t+set}" = set; then
17639   echo $ECHO_N "(cached) $ECHO_C" >&6
17640 else
17641   cat >conftest.$ac_ext <<_ACEOF
17642 #line 17642 "configure"
17643 #include "confdefs.h"
17644 $ac_includes_default
17645 int
17646 main ()
17647 {
17648 if ((ssize_t *) 0)
17649   return 0;
17650 if (sizeof (ssize_t))
17651   return 0;
17652   ;
17653   return 0;
17654 }
17655 _ACEOF
17656 rm -f conftest.$ac_objext
17657 if { (eval echo "$as_me:17657: \"$ac_compile\"") >&5
17658   (eval $ac_compile) 2>&5
17659   ac_status=$?
17660   echo "$as_me:17660: \$? = $ac_status" >&5
17661   (exit $ac_status); } &&
17662          { ac_try='test -s conftest.$ac_objext'
17663   { (eval echo "$as_me:17663: \"$ac_try\"") >&5
17664   (eval $ac_try) 2>&5
17665   ac_status=$?
17666   echo "$as_me:17666: \$? = $ac_status" >&5
17667   (exit $ac_status); }; }; then
17668   ac_cv_type_ssize_t=yes
17669 else
17670   echo "$as_me: failed program was:" >&5
17671 cat conftest.$ac_ext >&5
17672 ac_cv_type_ssize_t=no
17673 fi
17674 rm -f conftest.$ac_objext conftest.$ac_ext
17675 fi
17676 echo "$as_me:17676: result: $ac_cv_type_ssize_t" >&5
17677 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17678 if test $ac_cv_type_ssize_t = yes; then
17679   :
17680 else
17681
17682 cat >>confdefs.h <<EOF
17683 #define ssize_t int
17684 EOF
17685
17686 fi
17687
17688 echo "$as_me:17688: checking for type sigaction_t" >&5
17689 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17690 if test "${cf_cv_type_sigaction+set}" = set; then
17691   echo $ECHO_N "(cached) $ECHO_C" >&6
17692 else
17693
17694         cat >conftest.$ac_ext <<_ACEOF
17695 #line 17695 "configure"
17696 #include "confdefs.h"
17697
17698 #include <signal.h>
17699 int
17700 main ()
17701 {
17702 sigaction_t x
17703   ;
17704   return 0;
17705 }
17706 _ACEOF
17707 rm -f conftest.$ac_objext
17708 if { (eval echo "$as_me:17708: \"$ac_compile\"") >&5
17709   (eval $ac_compile) 2>&5
17710   ac_status=$?
17711   echo "$as_me:17711: \$? = $ac_status" >&5
17712   (exit $ac_status); } &&
17713          { ac_try='test -s conftest.$ac_objext'
17714   { (eval echo "$as_me:17714: \"$ac_try\"") >&5
17715   (eval $ac_try) 2>&5
17716   ac_status=$?
17717   echo "$as_me:17717: \$? = $ac_status" >&5
17718   (exit $ac_status); }; }; then
17719   cf_cv_type_sigaction=yes
17720 else
17721   echo "$as_me: failed program was:" >&5
17722 cat conftest.$ac_ext >&5
17723 cf_cv_type_sigaction=no
17724 fi
17725 rm -f conftest.$ac_objext conftest.$ac_ext
17726 fi
17727
17728 echo "$as_me:17728: result: $cf_cv_type_sigaction" >&5
17729 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17730 test "$cf_cv_type_sigaction" = yes &&
17731 cat >>confdefs.h <<\EOF
17732 #define HAVE_TYPE_SIGACTION 1
17733 EOF
17734
17735 echo "$as_me:17735: checking declaration of size-change" >&5
17736 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17737 if test "${cf_cv_sizechange+set}" = set; then
17738   echo $ECHO_N "(cached) $ECHO_C" >&6
17739 else
17740
17741         cf_cv_sizechange=unknown
17742         cf_save_CPPFLAGS="$CPPFLAGS"
17743
17744 for cf_opts in "" "NEED_PTEM_H"
17745 do
17746
17747         CPPFLAGS="$cf_save_CPPFLAGS"
17748         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17749         cat >conftest.$ac_ext <<_ACEOF
17750 #line 17750 "configure"
17751 #include "confdefs.h"
17752 #include <sys/types.h>
17753 #ifdef HAVE_TERMIOS_H
17754 #include <termios.h>
17755 #else
17756 #ifdef HAVE_TERMIO_H
17757 #include <termio.h>
17758 #endif
17759 #endif
17760 #ifdef NEED_PTEM_H
17761 /* This is a workaround for SCO:  they neglected to define struct winsize in
17762  * termios.h -- it's only in termio.h and ptem.h
17763  */
17764 #include        <sys/stream.h>
17765 #include        <sys/ptem.h>
17766 #endif
17767 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17768 #include <sys/ioctl.h>
17769 #endif
17770
17771 int
17772 main ()
17773 {
17774
17775 #ifdef TIOCGSIZE
17776         struct ttysize win;     /* FIXME: what system is this? */
17777         int y = win.ts_lines;
17778         int x = win.ts_cols;
17779 #else
17780 #ifdef TIOCGWINSZ
17781         struct winsize win;
17782         int y = win.ws_row;
17783         int x = win.ws_col;
17784 #else
17785         no TIOCGSIZE or TIOCGWINSZ
17786 #endif /* TIOCGWINSZ */
17787 #endif /* TIOCGSIZE */
17788
17789   ;
17790   return 0;
17791 }
17792 _ACEOF
17793 rm -f conftest.$ac_objext
17794 if { (eval echo "$as_me:17794: \"$ac_compile\"") >&5
17795   (eval $ac_compile) 2>&5
17796   ac_status=$?
17797   echo "$as_me:17797: \$? = $ac_status" >&5
17798   (exit $ac_status); } &&
17799          { ac_try='test -s conftest.$ac_objext'
17800   { (eval echo "$as_me:17800: \"$ac_try\"") >&5
17801   (eval $ac_try) 2>&5
17802   ac_status=$?
17803   echo "$as_me:17803: \$? = $ac_status" >&5
17804   (exit $ac_status); }; }; then
17805   cf_cv_sizechange=yes
17806 else
17807   echo "$as_me: failed program was:" >&5
17808 cat conftest.$ac_ext >&5
17809 cf_cv_sizechange=no
17810 fi
17811 rm -f conftest.$ac_objext conftest.$ac_ext
17812
17813         CPPFLAGS="$cf_save_CPPFLAGS"
17814         if test "$cf_cv_sizechange" = yes ; then
17815                 echo "size-change succeeded ($cf_opts)" >&5
17816                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17817                 break
17818         fi
17819 done
17820
17821 fi
17822 echo "$as_me:17822: result: $cf_cv_sizechange" >&5
17823 echo "${ECHO_T}$cf_cv_sizechange" >&6
17824 if test "$cf_cv_sizechange" != no ; then
17825
17826 cat >>confdefs.h <<\EOF
17827 #define HAVE_SIZECHANGE 1
17828 EOF
17829
17830         case $cf_cv_sizechange in
17831         (NEED*)
17832                 cat >>confdefs.h <<EOF
17833 #define $cf_cv_sizechange  1
17834 EOF
17835
17836                 ;;
17837         esac
17838 fi
17839
17840 echo "$as_me:17840: checking for memmove" >&5
17841 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17842 if test "${ac_cv_func_memmove+set}" = set; then
17843   echo $ECHO_N "(cached) $ECHO_C" >&6
17844 else
17845   cat >conftest.$ac_ext <<_ACEOF
17846 #line 17846 "configure"
17847 #include "confdefs.h"
17848 /* System header to define __stub macros and hopefully few prototypes,
17849     which can conflict with char memmove (); below.  */
17850 #include <assert.h>
17851 /* Override any gcc2 internal prototype to avoid an error.  */
17852 #ifdef __cplusplus
17853 extern "C"
17854 #endif
17855 /* We use char because int might match the return type of a gcc2
17856    builtin and then its argument prototype would still apply.  */
17857 char memmove ();
17858 char (*f) ();
17859
17860 int
17861 main ()
17862 {
17863 /* The GNU C library defines this for functions which it implements
17864     to always fail with ENOSYS.  Some functions are actually named
17865     something starting with __ and the normal name is an alias.  */
17866 #if defined (__stub_memmove) || defined (__stub___memmove)
17867 choke me
17868 #else
17869 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17870 #endif
17871
17872   ;
17873   return 0;
17874 }
17875 _ACEOF
17876 rm -f conftest.$ac_objext conftest$ac_exeext
17877 if { (eval echo "$as_me:17877: \"$ac_link\"") >&5
17878   (eval $ac_link) 2>&5
17879   ac_status=$?
17880   echo "$as_me:17880: \$? = $ac_status" >&5
17881   (exit $ac_status); } &&
17882          { ac_try='test -s conftest$ac_exeext'
17883   { (eval echo "$as_me:17883: \"$ac_try\"") >&5
17884   (eval $ac_try) 2>&5
17885   ac_status=$?
17886   echo "$as_me:17886: \$? = $ac_status" >&5
17887   (exit $ac_status); }; }; then
17888   ac_cv_func_memmove=yes
17889 else
17890   echo "$as_me: failed program was:" >&5
17891 cat conftest.$ac_ext >&5
17892 ac_cv_func_memmove=no
17893 fi
17894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17895 fi
17896 echo "$as_me:17896: result: $ac_cv_func_memmove" >&5
17897 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17898 if test $ac_cv_func_memmove = yes; then
17899   :
17900 else
17901
17902 echo "$as_me:17902: checking for bcopy" >&5
17903 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17904 if test "${ac_cv_func_bcopy+set}" = set; then
17905   echo $ECHO_N "(cached) $ECHO_C" >&6
17906 else
17907   cat >conftest.$ac_ext <<_ACEOF
17908 #line 17908 "configure"
17909 #include "confdefs.h"
17910 /* System header to define __stub macros and hopefully few prototypes,
17911     which can conflict with char bcopy (); below.  */
17912 #include <assert.h>
17913 /* Override any gcc2 internal prototype to avoid an error.  */
17914 #ifdef __cplusplus
17915 extern "C"
17916 #endif
17917 /* We use char because int might match the return type of a gcc2
17918    builtin and then its argument prototype would still apply.  */
17919 char bcopy ();
17920 char (*f) ();
17921
17922 int
17923 main ()
17924 {
17925 /* The GNU C library defines this for functions which it implements
17926     to always fail with ENOSYS.  Some functions are actually named
17927     something starting with __ and the normal name is an alias.  */
17928 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17929 choke me
17930 #else
17931 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17932 #endif
17933
17934   ;
17935   return 0;
17936 }
17937 _ACEOF
17938 rm -f conftest.$ac_objext conftest$ac_exeext
17939 if { (eval echo "$as_me:17939: \"$ac_link\"") >&5
17940   (eval $ac_link) 2>&5
17941   ac_status=$?
17942   echo "$as_me:17942: \$? = $ac_status" >&5
17943   (exit $ac_status); } &&
17944          { ac_try='test -s conftest$ac_exeext'
17945   { (eval echo "$as_me:17945: \"$ac_try\"") >&5
17946   (eval $ac_try) 2>&5
17947   ac_status=$?
17948   echo "$as_me:17948: \$? = $ac_status" >&5
17949   (exit $ac_status); }; }; then
17950   ac_cv_func_bcopy=yes
17951 else
17952   echo "$as_me: failed program was:" >&5
17953 cat conftest.$ac_ext >&5
17954 ac_cv_func_bcopy=no
17955 fi
17956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17957 fi
17958 echo "$as_me:17958: result: $ac_cv_func_bcopy" >&5
17959 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17960 if test $ac_cv_func_bcopy = yes; then
17961
17962         echo "$as_me:17962: checking if bcopy does overlapping moves" >&5
17963 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17964 if test "${cf_cv_good_bcopy+set}" = set; then
17965   echo $ECHO_N "(cached) $ECHO_C" >&6
17966 else
17967
17968                 if test "$cross_compiling" = yes; then
17969   cf_cv_good_bcopy=unknown
17970 else
17971   cat >conftest.$ac_ext <<_ACEOF
17972 #line 17972 "configure"
17973 #include "confdefs.h"
17974
17975 int main() {
17976         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17977         char temp[40];
17978         bcopy(data, temp, sizeof(data));
17979         bcopy(temp+10, temp, 15);
17980         bcopy(temp+5, temp+15, 10);
17981         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17982 }
17983
17984 _ACEOF
17985 rm -f conftest$ac_exeext
17986 if { (eval echo "$as_me:17986: \"$ac_link\"") >&5
17987   (eval $ac_link) 2>&5
17988   ac_status=$?
17989   echo "$as_me:17989: \$? = $ac_status" >&5
17990   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17991   { (eval echo "$as_me:17991: \"$ac_try\"") >&5
17992   (eval $ac_try) 2>&5
17993   ac_status=$?
17994   echo "$as_me:17994: \$? = $ac_status" >&5
17995   (exit $ac_status); }; }; then
17996   cf_cv_good_bcopy=yes
17997 else
17998   echo "$as_me: program exited with status $ac_status" >&5
17999 echo "$as_me: failed program was:" >&5
18000 cat conftest.$ac_ext >&5
18001 cf_cv_good_bcopy=no
18002 fi
18003 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18004 fi
18005
18006 fi
18007 echo "$as_me:18007: result: $cf_cv_good_bcopy" >&5
18008 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18009
18010 else
18011   cf_cv_good_bcopy=no
18012 fi
18013
18014         if test "$cf_cv_good_bcopy" = yes ; then
18015
18016 cat >>confdefs.h <<\EOF
18017 #define USE_OK_BCOPY 1
18018 EOF
18019
18020         else
18021
18022 cat >>confdefs.h <<\EOF
18023 #define USE_MY_MEMMOVE 1
18024 EOF
18025
18026         fi
18027
18028 fi
18029
18030 tty 2>&1 >/dev/null || {
18031 for ac_func in posix_openpt
18032 do
18033 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18034 echo "$as_me:18034: checking for $ac_func" >&5
18035 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18036 if eval "test \"\${$as_ac_var+set}\" = set"; then
18037   echo $ECHO_N "(cached) $ECHO_C" >&6
18038 else
18039   cat >conftest.$ac_ext <<_ACEOF
18040 #line 18040 "configure"
18041 #include "confdefs.h"
18042 /* System header to define __stub macros and hopefully few prototypes,
18043     which can conflict with char $ac_func (); below.  */
18044 #include <assert.h>
18045 /* Override any gcc2 internal prototype to avoid an error.  */
18046 #ifdef __cplusplus
18047 extern "C"
18048 #endif
18049 /* We use char because int might match the return type of a gcc2
18050    builtin and then its argument prototype would still apply.  */
18051 char $ac_func ();
18052 char (*f) ();
18053
18054 int
18055 main ()
18056 {
18057 /* The GNU C library defines this for functions which it implements
18058     to always fail with ENOSYS.  Some functions are actually named
18059     something starting with __ and the normal name is an alias.  */
18060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18061 choke me
18062 #else
18063 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18064 #endif
18065
18066   ;
18067   return 0;
18068 }
18069 _ACEOF
18070 rm -f conftest.$ac_objext conftest$ac_exeext
18071 if { (eval echo "$as_me:18071: \"$ac_link\"") >&5
18072   (eval $ac_link) 2>&5
18073   ac_status=$?
18074   echo "$as_me:18074: \$? = $ac_status" >&5
18075   (exit $ac_status); } &&
18076          { ac_try='test -s conftest$ac_exeext'
18077   { (eval echo "$as_me:18077: \"$ac_try\"") >&5
18078   (eval $ac_try) 2>&5
18079   ac_status=$?
18080   echo "$as_me:18080: \$? = $ac_status" >&5
18081   (exit $ac_status); }; }; then
18082   eval "$as_ac_var=yes"
18083 else
18084   echo "$as_me: failed program was:" >&5
18085 cat conftest.$ac_ext >&5
18086 eval "$as_ac_var=no"
18087 fi
18088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18089 fi
18090 echo "$as_me:18090: result: `eval echo '${'$as_ac_var'}'`" >&5
18091 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18092 if test `eval echo '${'$as_ac_var'}'` = yes; then
18093   cat >>confdefs.h <<EOF
18094 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18095 EOF
18096
18097 fi
18098 done
18099  }
18100 echo "$as_me:18100: checking if poll really works" >&5
18101 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18102 if test "${cf_cv_working_poll+set}" = set; then
18103   echo $ECHO_N "(cached) $ECHO_C" >&6
18104 else
18105
18106 if test "$cross_compiling" = yes; then
18107   cf_cv_working_poll=unknown
18108 else
18109   cat >conftest.$ac_ext <<_ACEOF
18110 #line 18110 "configure"
18111 #include "confdefs.h"
18112
18113 #include <stdlib.h>
18114 #include <stdio.h>
18115 #include <unistd.h>
18116 #include <fcntl.h>
18117 #ifdef HAVE_POLL_H
18118 #include <poll.h>
18119 #else
18120 #include <sys/poll.h>
18121 #endif
18122 int main(void) {
18123         struct pollfd myfds;
18124         int ret;
18125
18126         /* check for Darwin bug with respect to "devices" */
18127         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18128         if (myfds.fd < 0)
18129                 myfds.fd = 0;
18130         myfds.events = POLLIN;
18131         myfds.revents = 0;
18132
18133         ret = poll(&myfds, 1, 100);
18134
18135         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18136                 ret = -1;
18137         } else {
18138                 int fd = 0;
18139                 if (!isatty(fd)) {
18140                         fd = open("/dev/tty", 2);       /* O_RDWR */
18141                 }
18142 #ifdef HAVE_POSIX_OPENPT
18143                 if (fd < 0) {
18144                         fd = posix_openpt(O_RDWR);
18145                 }
18146 #endif
18147
18148                 if (fd >= 0) {
18149                         /* also check with standard input */
18150                         myfds.fd = fd;
18151                         myfds.events = POLLIN;
18152                         myfds.revents = 0;
18153                         ret = poll(&myfds, 1, 100);
18154                 } else {
18155                         ret = -1;
18156                 }
18157         }
18158         ${cf_cv_main_return:-return}(ret < 0);
18159 }
18160 _ACEOF
18161 rm -f conftest$ac_exeext
18162 if { (eval echo "$as_me:18162: \"$ac_link\"") >&5
18163   (eval $ac_link) 2>&5
18164   ac_status=$?
18165   echo "$as_me:18165: \$? = $ac_status" >&5
18166   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18167   { (eval echo "$as_me:18167: \"$ac_try\"") >&5
18168   (eval $ac_try) 2>&5
18169   ac_status=$?
18170   echo "$as_me:18170: \$? = $ac_status" >&5
18171   (exit $ac_status); }; }; then
18172   cf_cv_working_poll=yes
18173 else
18174   echo "$as_me: program exited with status $ac_status" >&5
18175 echo "$as_me: failed program was:" >&5
18176 cat conftest.$ac_ext >&5
18177 cf_cv_working_poll=no
18178 fi
18179 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18180 fi
18181 fi
18182 echo "$as_me:18182: result: $cf_cv_working_poll" >&5
18183 echo "${ECHO_T}$cf_cv_working_poll" >&6
18184 test "$cf_cv_working_poll" = "yes" &&
18185 cat >>confdefs.h <<\EOF
18186 #define HAVE_WORKING_POLL 1
18187 EOF
18188
18189 echo "$as_me:18189: checking for va_copy" >&5
18190 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18191 if test "${cf_cv_have_va_copy+set}" = set; then
18192   echo $ECHO_N "(cached) $ECHO_C" >&6
18193 else
18194
18195 cat >conftest.$ac_ext <<_ACEOF
18196 #line 18196 "configure"
18197 #include "confdefs.h"
18198
18199 #include <stdarg.h>
18200
18201 int
18202 main ()
18203 {
18204
18205         static va_list dst;
18206         static va_list src;
18207         va_copy(dst, src)
18208   ;
18209   return 0;
18210 }
18211 _ACEOF
18212 rm -f conftest.$ac_objext conftest$ac_exeext
18213 if { (eval echo "$as_me:18213: \"$ac_link\"") >&5
18214   (eval $ac_link) 2>&5
18215   ac_status=$?
18216   echo "$as_me:18216: \$? = $ac_status" >&5
18217   (exit $ac_status); } &&
18218          { ac_try='test -s conftest$ac_exeext'
18219   { (eval echo "$as_me:18219: \"$ac_try\"") >&5
18220   (eval $ac_try) 2>&5
18221   ac_status=$?
18222   echo "$as_me:18222: \$? = $ac_status" >&5
18223   (exit $ac_status); }; }; then
18224   cf_cv_have_va_copy=yes
18225 else
18226   echo "$as_me: failed program was:" >&5
18227 cat conftest.$ac_ext >&5
18228 cf_cv_have_va_copy=no
18229 fi
18230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18231 fi
18232 echo "$as_me:18232: result: $cf_cv_have_va_copy" >&5
18233 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18234
18235 test "$cf_cv_have_va_copy" = yes &&
18236 cat >>confdefs.h <<\EOF
18237 #define HAVE_VA_COPY 1
18238 EOF
18239
18240 echo "$as_me:18240: checking for __va_copy" >&5
18241 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18242 if test "${cf_cv_have___va_copy+set}" = set; then
18243   echo $ECHO_N "(cached) $ECHO_C" >&6
18244 else
18245
18246 cat >conftest.$ac_ext <<_ACEOF
18247 #line 18247 "configure"
18248 #include "confdefs.h"
18249
18250 #include <stdarg.h>
18251
18252 int
18253 main ()
18254 {
18255
18256         static va_list dst;
18257         static va_list src;
18258         __va_copy(dst, src)
18259   ;
18260   return 0;
18261 }
18262 _ACEOF
18263 rm -f conftest.$ac_objext conftest$ac_exeext
18264 if { (eval echo "$as_me:18264: \"$ac_link\"") >&5
18265   (eval $ac_link) 2>&5
18266   ac_status=$?
18267   echo "$as_me:18267: \$? = $ac_status" >&5
18268   (exit $ac_status); } &&
18269          { ac_try='test -s conftest$ac_exeext'
18270   { (eval echo "$as_me:18270: \"$ac_try\"") >&5
18271   (eval $ac_try) 2>&5
18272   ac_status=$?
18273   echo "$as_me:18273: \$? = $ac_status" >&5
18274   (exit $ac_status); }; }; then
18275   cf_cv_have___va_copy=yes
18276 else
18277   echo "$as_me: failed program was:" >&5
18278 cat conftest.$ac_ext >&5
18279 cf_cv_have___va_copy=no
18280 fi
18281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18282 fi
18283 echo "$as_me:18283: result: $cf_cv_have___va_copy" >&5
18284 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18285
18286 test "$cf_cv_have___va_copy" = yes &&
18287 cat >>confdefs.h <<\EOF
18288 #define HAVE___VA_COPY 1
18289 EOF
18290
18291 echo "$as_me:18291: checking for pid_t" >&5
18292 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18293 if test "${ac_cv_type_pid_t+set}" = set; then
18294   echo $ECHO_N "(cached) $ECHO_C" >&6
18295 else
18296   cat >conftest.$ac_ext <<_ACEOF
18297 #line 18297 "configure"
18298 #include "confdefs.h"
18299 $ac_includes_default
18300 int
18301 main ()
18302 {
18303 if ((pid_t *) 0)
18304   return 0;
18305 if (sizeof (pid_t))
18306   return 0;
18307   ;
18308   return 0;
18309 }
18310 _ACEOF
18311 rm -f conftest.$ac_objext
18312 if { (eval echo "$as_me:18312: \"$ac_compile\"") >&5
18313   (eval $ac_compile) 2>&5
18314   ac_status=$?
18315   echo "$as_me:18315: \$? = $ac_status" >&5
18316   (exit $ac_status); } &&
18317          { ac_try='test -s conftest.$ac_objext'
18318   { (eval echo "$as_me:18318: \"$ac_try\"") >&5
18319   (eval $ac_try) 2>&5
18320   ac_status=$?
18321   echo "$as_me:18321: \$? = $ac_status" >&5
18322   (exit $ac_status); }; }; then
18323   ac_cv_type_pid_t=yes
18324 else
18325   echo "$as_me: failed program was:" >&5
18326 cat conftest.$ac_ext >&5
18327 ac_cv_type_pid_t=no
18328 fi
18329 rm -f conftest.$ac_objext conftest.$ac_ext
18330 fi
18331 echo "$as_me:18331: result: $ac_cv_type_pid_t" >&5
18332 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18333 if test $ac_cv_type_pid_t = yes; then
18334   :
18335 else
18336
18337 cat >>confdefs.h <<EOF
18338 #define pid_t int
18339 EOF
18340
18341 fi
18342
18343 for ac_header in unistd.h vfork.h
18344 do
18345 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18346 echo "$as_me:18346: checking for $ac_header" >&5
18347 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18348 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18349   echo $ECHO_N "(cached) $ECHO_C" >&6
18350 else
18351   cat >conftest.$ac_ext <<_ACEOF
18352 #line 18352 "configure"
18353 #include "confdefs.h"
18354 #include <$ac_header>
18355 _ACEOF
18356 if { (eval echo "$as_me:18356: \"$ac_cpp conftest.$ac_ext\"") >&5
18357   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18358   ac_status=$?
18359   egrep -v '^ *\+' conftest.er1 >conftest.err
18360   rm -f conftest.er1
18361   cat conftest.err >&5
18362   echo "$as_me:18362: \$? = $ac_status" >&5
18363   (exit $ac_status); } >/dev/null; then
18364   if test -s conftest.err; then
18365     ac_cpp_err=$ac_c_preproc_warn_flag
18366   else
18367     ac_cpp_err=
18368   fi
18369 else
18370   ac_cpp_err=yes
18371 fi
18372 if test -z "$ac_cpp_err"; then
18373   eval "$as_ac_Header=yes"
18374 else
18375   echo "$as_me: failed program was:" >&5
18376   cat conftest.$ac_ext >&5
18377   eval "$as_ac_Header=no"
18378 fi
18379 rm -f conftest.err conftest.$ac_ext
18380 fi
18381 echo "$as_me:18381: result: `eval echo '${'$as_ac_Header'}'`" >&5
18382 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18383 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18384   cat >>confdefs.h <<EOF
18385 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18386 EOF
18387
18388 fi
18389 done
18390
18391 for ac_func in fork vfork
18392 do
18393 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18394 echo "$as_me:18394: checking for $ac_func" >&5
18395 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18396 if eval "test \"\${$as_ac_var+set}\" = set"; then
18397   echo $ECHO_N "(cached) $ECHO_C" >&6
18398 else
18399   cat >conftest.$ac_ext <<_ACEOF
18400 #line 18400 "configure"
18401 #include "confdefs.h"
18402 /* System header to define __stub macros and hopefully few prototypes,
18403     which can conflict with char $ac_func (); below.  */
18404 #include <assert.h>
18405 /* Override any gcc2 internal prototype to avoid an error.  */
18406 #ifdef __cplusplus
18407 extern "C"
18408 #endif
18409 /* We use char because int might match the return type of a gcc2
18410    builtin and then its argument prototype would still apply.  */
18411 char $ac_func ();
18412 char (*f) ();
18413
18414 int
18415 main ()
18416 {
18417 /* The GNU C library defines this for functions which it implements
18418     to always fail with ENOSYS.  Some functions are actually named
18419     something starting with __ and the normal name is an alias.  */
18420 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18421 choke me
18422 #else
18423 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18424 #endif
18425
18426   ;
18427   return 0;
18428 }
18429 _ACEOF
18430 rm -f conftest.$ac_objext conftest$ac_exeext
18431 if { (eval echo "$as_me:18431: \"$ac_link\"") >&5
18432   (eval $ac_link) 2>&5
18433   ac_status=$?
18434   echo "$as_me:18434: \$? = $ac_status" >&5
18435   (exit $ac_status); } &&
18436          { ac_try='test -s conftest$ac_exeext'
18437   { (eval echo "$as_me:18437: \"$ac_try\"") >&5
18438   (eval $ac_try) 2>&5
18439   ac_status=$?
18440   echo "$as_me:18440: \$? = $ac_status" >&5
18441   (exit $ac_status); }; }; then
18442   eval "$as_ac_var=yes"
18443 else
18444   echo "$as_me: failed program was:" >&5
18445 cat conftest.$ac_ext >&5
18446 eval "$as_ac_var=no"
18447 fi
18448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18449 fi
18450 echo "$as_me:18450: result: `eval echo '${'$as_ac_var'}'`" >&5
18451 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18452 if test `eval echo '${'$as_ac_var'}'` = yes; then
18453   cat >>confdefs.h <<EOF
18454 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18455 EOF
18456
18457 fi
18458 done
18459
18460 ac_cv_func_fork_works=$ac_cv_func_fork
18461 if test "x$ac_cv_func_fork" = xyes; then
18462   echo "$as_me:18462: checking for working fork" >&5
18463 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18464 if test "${ac_cv_func_fork_works+set}" = set; then
18465   echo $ECHO_N "(cached) $ECHO_C" >&6
18466 else
18467   if test "$cross_compiling" = yes; then
18468   ac_cv_func_fork_works=cross
18469 else
18470   cat >conftest.$ac_ext <<_ACEOF
18471 /* By Rüdiger Kuhlmann. */
18472       #include <sys/types.h>
18473       #if HAVE_UNISTD_H
18474       # include <unistd.h>
18475       #endif
18476       /* Some systems only have a dummy stub for fork() */
18477       int main ()
18478       {
18479         if (fork() < 0)
18480           $ac_main_return (1);
18481         $ac_main_return (0);
18482       }
18483 _ACEOF
18484 rm -f conftest$ac_exeext
18485 if { (eval echo "$as_me:18485: \"$ac_link\"") >&5
18486   (eval $ac_link) 2>&5
18487   ac_status=$?
18488   echo "$as_me:18488: \$? = $ac_status" >&5
18489   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18490   { (eval echo "$as_me:18490: \"$ac_try\"") >&5
18491   (eval $ac_try) 2>&5
18492   ac_status=$?
18493   echo "$as_me:18493: \$? = $ac_status" >&5
18494   (exit $ac_status); }; }; then
18495   ac_cv_func_fork_works=yes
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 ac_cv_func_fork_works=no
18501 fi
18502 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18503 fi
18504 fi
18505 echo "$as_me:18505: result: $ac_cv_func_fork_works" >&5
18506 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18507
18508 fi
18509 if test "x$ac_cv_func_fork_works" = xcross; then
18510   case $host in
18511     *-*-amigaos* | *-*-msdosdjgpp*)
18512       # Override, as these systems have only a dummy fork() stub
18513       ac_cv_func_fork_works=no
18514       ;;
18515     *)
18516       ac_cv_func_fork_works=yes
18517       ;;
18518   esac
18519   { echo "$as_me:18519: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18520 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18521 fi
18522 ac_cv_func_vfork_works=$ac_cv_func_vfork
18523 if test "x$ac_cv_func_vfork" = xyes; then
18524   echo "$as_me:18524: checking for working vfork" >&5
18525 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18526 if test "${ac_cv_func_vfork_works+set}" = set; then
18527   echo $ECHO_N "(cached) $ECHO_C" >&6
18528 else
18529   if test "$cross_compiling" = yes; then
18530   ac_cv_func_vfork_works=cross
18531 else
18532   cat >conftest.$ac_ext <<_ACEOF
18533 #line 18533 "configure"
18534 #include "confdefs.h"
18535 /* Thanks to Paul Eggert for this test.  */
18536 #include <stdio.h>
18537 #include <sys/types.h>
18538 #include <sys/stat.h>
18539 #if HAVE_UNISTD_H
18540 # include <unistd.h>
18541 #endif
18542 #if HAVE_VFORK_H
18543 # include <vfork.h>
18544 #endif
18545 /* On some sparc systems, changes by the child to local and incoming
18546    argument registers are propagated back to the parent.  The compiler
18547    is told about this with #include <vfork.h>, but some compilers
18548    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18549    static variable whose address is put into a register that is
18550    clobbered by the vfork.  */
18551 static
18552 #ifdef __cplusplus
18553 sparc_address_test (int arg)
18554 # else
18555 sparc_address_test (arg) int arg;
18556 #endif
18557 {
18558   static pid_t child;
18559   if (!child) {
18560     child = vfork ();
18561     if (child < 0) {
18562       perror ("vfork");
18563       _exit(2);
18564     }
18565     if (!child) {
18566       arg = getpid();
18567       write(-1, "", 0);
18568       _exit (arg);
18569     }
18570   }
18571 }
18572
18573 int
18574 main ()
18575 {
18576   pid_t parent = getpid ();
18577   pid_t child;
18578
18579   sparc_address_test ();
18580
18581   child = vfork ();
18582
18583   if (child == 0) {
18584     /* Here is another test for sparc vfork register problems.  This
18585        test uses lots of local variables, at least as many local
18586        variables as main has allocated so far including compiler
18587        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18588        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18589        reuse the register of parent for one of the local variables,
18590        since it will think that parent can't possibly be used any more
18591        in this routine.  Assigning to the local variable will thus
18592        munge parent in the parent process.  */
18593     pid_t
18594       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18595       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18596     /* Convince the compiler that p..p7 are live; otherwise, it might
18597        use the same hardware register for all 8 local variables.  */
18598     if (p != p1 || p != p2 || p != p3 || p != p4
18599         || p != p5 || p != p6 || p != p7)
18600       _exit(1);
18601
18602     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18603        from child file descriptors.  If the child closes a descriptor
18604        before it execs or exits, this munges the parent's descriptor
18605        as well.  Test for this by closing stdout in the child.  */
18606     _exit(close(fileno(stdout)) != 0);
18607   } else {
18608     int status;
18609     struct stat st;
18610
18611     while (wait(&status) != child)
18612       ;
18613     $ac_main_return(
18614          /* Was there some problem with vforking?  */
18615          child < 0
18616
18617          /* Did the child fail?  (This shouldn't happen.)  */
18618          || status
18619
18620          /* Did the vfork/compiler bug occur?  */
18621          || parent != getpid()
18622
18623          /* Did the file descriptor bug occur?  */
18624          || fstat(fileno(stdout), &st) != 0
18625          );
18626   }
18627 }
18628 _ACEOF
18629 rm -f conftest$ac_exeext
18630 if { (eval echo "$as_me:18630: \"$ac_link\"") >&5
18631   (eval $ac_link) 2>&5
18632   ac_status=$?
18633   echo "$as_me:18633: \$? = $ac_status" >&5
18634   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18635   { (eval echo "$as_me:18635: \"$ac_try\"") >&5
18636   (eval $ac_try) 2>&5
18637   ac_status=$?
18638   echo "$as_me:18638: \$? = $ac_status" >&5
18639   (exit $ac_status); }; }; then
18640   ac_cv_func_vfork_works=yes
18641 else
18642   echo "$as_me: program exited with status $ac_status" >&5
18643 echo "$as_me: failed program was:" >&5
18644 cat conftest.$ac_ext >&5
18645 ac_cv_func_vfork_works=no
18646 fi
18647 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18648 fi
18649 fi
18650 echo "$as_me:18650: result: $ac_cv_func_vfork_works" >&5
18651 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18652
18653 fi;
18654 if test "x$ac_cv_func_fork_works" = xcross; then
18655   ac_cv_func_vfork_works=ac_cv_func_vfork
18656   { echo "$as_me:18656: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18657 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18658 fi
18659
18660 if test "x$ac_cv_func_vfork_works" = xyes; then
18661
18662 cat >>confdefs.h <<\EOF
18663 #define HAVE_WORKING_VFORK 1
18664 EOF
18665
18666 else
18667
18668 cat >>confdefs.h <<\EOF
18669 #define vfork fork
18670 EOF
18671
18672 fi
18673 if test "x$ac_cv_func_fork_works" = xyes; then
18674
18675 cat >>confdefs.h <<\EOF
18676 #define HAVE_WORKING_FORK 1
18677 EOF
18678
18679 fi
18680
18681 # special check for test/ditto.c
18682
18683 echo "$as_me:18683: checking for openpty in -lutil" >&5
18684 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18685 if test "${ac_cv_lib_util_openpty+set}" = set; then
18686   echo $ECHO_N "(cached) $ECHO_C" >&6
18687 else
18688   ac_check_lib_save_LIBS=$LIBS
18689 LIBS="-lutil  $LIBS"
18690 cat >conftest.$ac_ext <<_ACEOF
18691 #line 18691 "configure"
18692 #include "confdefs.h"
18693
18694 /* Override any gcc2 internal prototype to avoid an error.  */
18695 #ifdef __cplusplus
18696 extern "C"
18697 #endif
18698 /* We use char because int might match the return type of a gcc2
18699    builtin and then its argument prototype would still apply.  */
18700 char openpty ();
18701 int
18702 main ()
18703 {
18704 openpty ();
18705   ;
18706   return 0;
18707 }
18708 _ACEOF
18709 rm -f conftest.$ac_objext conftest$ac_exeext
18710 if { (eval echo "$as_me:18710: \"$ac_link\"") >&5
18711   (eval $ac_link) 2>&5
18712   ac_status=$?
18713   echo "$as_me:18713: \$? = $ac_status" >&5
18714   (exit $ac_status); } &&
18715          { ac_try='test -s conftest$ac_exeext'
18716   { (eval echo "$as_me:18716: \"$ac_try\"") >&5
18717   (eval $ac_try) 2>&5
18718   ac_status=$?
18719   echo "$as_me:18719: \$? = $ac_status" >&5
18720   (exit $ac_status); }; }; then
18721   ac_cv_lib_util_openpty=yes
18722 else
18723   echo "$as_me: failed program was:" >&5
18724 cat conftest.$ac_ext >&5
18725 ac_cv_lib_util_openpty=no
18726 fi
18727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18728 LIBS=$ac_check_lib_save_LIBS
18729 fi
18730 echo "$as_me:18730: result: $ac_cv_lib_util_openpty" >&5
18731 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18732 if test $ac_cv_lib_util_openpty = yes; then
18733   cf_cv_lib_util=yes
18734 else
18735   cf_cv_lib_util=no
18736 fi
18737
18738 echo "$as_me:18738: checking for openpty header" >&5
18739 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18740 if test "${cf_cv_func_openpty+set}" = set; then
18741   echo $ECHO_N "(cached) $ECHO_C" >&6
18742 else
18743
18744         cf_save_LIBS="$LIBS"
18745         test $cf_cv_lib_util = yes && {
18746 cf_add_libs="-lutil"
18747 # Filter out duplicates - this happens with badly-designed ".pc" files...
18748 for cf_add_1lib in $LIBS
18749 do
18750         for cf_add_2lib in $cf_add_libs
18751         do
18752                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18753                 then
18754                         cf_add_1lib=
18755                         break
18756                 fi
18757         done
18758         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18759 done
18760 LIBS="$cf_add_libs"
18761  }
18762         for cf_header in pty.h libutil.h util.h
18763         do
18764         cat >conftest.$ac_ext <<_ACEOF
18765 #line 18765 "configure"
18766 #include "confdefs.h"
18767
18768 #include <$cf_header>
18769
18770 int
18771 main ()
18772 {
18773
18774         int x = openpty((int *)0, (int *)0, (char *)0,
18775                                    (struct termios *)0, (struct winsize *)0);
18776
18777   ;
18778   return 0;
18779 }
18780 _ACEOF
18781 rm -f conftest.$ac_objext conftest$ac_exeext
18782 if { (eval echo "$as_me:18782: \"$ac_link\"") >&5
18783   (eval $ac_link) 2>&5
18784   ac_status=$?
18785   echo "$as_me:18785: \$? = $ac_status" >&5
18786   (exit $ac_status); } &&
18787          { ac_try='test -s conftest$ac_exeext'
18788   { (eval echo "$as_me:18788: \"$ac_try\"") >&5
18789   (eval $ac_try) 2>&5
18790   ac_status=$?
18791   echo "$as_me:18791: \$? = $ac_status" >&5
18792   (exit $ac_status); }; }; then
18793
18794                 cf_cv_func_openpty=$cf_header
18795                 break
18796
18797 else
18798   echo "$as_me: failed program was:" >&5
18799 cat conftest.$ac_ext >&5
18800
18801                 cf_cv_func_openpty=no
18802
18803 fi
18804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18805         done
18806         LIBS="$cf_save_LIBS"
18807
18808 fi
18809 echo "$as_me:18809: result: $cf_cv_func_openpty" >&5
18810 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18811
18812 if test "$cf_cv_func_openpty" != no ; then
18813
18814 cat >>confdefs.h <<EOF
18815 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18816 EOF
18817
18818 cat >>confdefs.h <<\EOF
18819 #define USE_XTERM_PTY 1
18820 EOF
18821
18822         if test "x$cf_cv_lib_util" = xyes ; then
18823
18824 cf_add_libs="-lutil"
18825 # Filter out duplicates - this happens with badly-designed ".pc" files...
18826 for cf_add_1lib in $TEST_LIBS
18827 do
18828         for cf_add_2lib in $cf_add_libs
18829         do
18830                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18831                 then
18832                         cf_add_1lib=
18833                         break
18834                 fi
18835         done
18836         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18837 done
18838 TEST_LIBS="$cf_add_libs"
18839
18840         fi
18841 fi
18842
18843 if test "$with_hashed_db" != no ; then
18844
18845 cat >>confdefs.h <<\EOF
18846 #define USE_HASHED_DB 1
18847 EOF
18848
18849 case $with_hashed_db in
18850 (yes|*able*)
18851         ;;
18852 (*)
18853         if test -d "$with_hashed_db" ; then
18854
18855 if test -n "$with_hashed_db/include" ; then
18856   for cf_add_incdir in $with_hashed_db/include
18857   do
18858         while test $cf_add_incdir != /usr/include
18859         do
18860           if test -d $cf_add_incdir
18861           then
18862                 cf_have_incdir=no
18863                 if test -n "$CFLAGS$CPPFLAGS" ; then
18864                   # a loop is needed to ensure we can add subdirs of existing dirs
18865                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18866                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18867                           cf_have_incdir=yes; break
18868                         fi
18869                   done
18870                 fi
18871
18872                 if test "$cf_have_incdir" = no ; then
18873                   if test "$cf_add_incdir" = /usr/local/include ; then
18874                         if test "$GCC" = yes
18875                         then
18876                           cf_save_CPPFLAGS=$CPPFLAGS
18877                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18878                           cat >conftest.$ac_ext <<_ACEOF
18879 #line 18879 "configure"
18880 #include "confdefs.h"
18881 #include <stdio.h>
18882 int
18883 main ()
18884 {
18885 printf("Hello")
18886   ;
18887   return 0;
18888 }
18889 _ACEOF
18890 rm -f conftest.$ac_objext
18891 if { (eval echo "$as_me:18891: \"$ac_compile\"") >&5
18892   (eval $ac_compile) 2>&5
18893   ac_status=$?
18894   echo "$as_me:18894: \$? = $ac_status" >&5
18895   (exit $ac_status); } &&
18896          { ac_try='test -s conftest.$ac_objext'
18897   { (eval echo "$as_me:18897: \"$ac_try\"") >&5
18898   (eval $ac_try) 2>&5
18899   ac_status=$?
18900   echo "$as_me:18900: \$? = $ac_status" >&5
18901   (exit $ac_status); }; }; then
18902   :
18903 else
18904   echo "$as_me: failed program was:" >&5
18905 cat conftest.$ac_ext >&5
18906 cf_have_incdir=yes
18907 fi
18908 rm -f conftest.$ac_objext conftest.$ac_ext
18909                           CPPFLAGS=$cf_save_CPPFLAGS
18910                         fi
18911                   fi
18912                 fi
18913
18914                 if test "$cf_have_incdir" = no ; then
18915                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18916
18917 echo "${as_me:-configure}:18917: testing adding $cf_add_incdir to include-path ..." 1>&5
18918
18919                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18920
18921                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18922                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18923                   cf_add_incdir="$cf_top_incdir"
18924                 else
18925                   break
18926                 fi
18927           else
18928                 break
18929           fi
18930         done
18931   done
18932 fi
18933
18934 if test -n "$with_hashed_db/lib" ; then
18935         for cf_add_libdir in $with_hashed_db/lib
18936         do
18937                 if test $cf_add_libdir = /usr/lib ; then
18938                         :
18939                 elif test -d $cf_add_libdir
18940                 then
18941                         cf_have_libdir=no
18942                         if test -n "$LDFLAGS$LIBS" ; then
18943                                 # a loop is needed to ensure we can add subdirs of existing dirs
18944                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18945                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18946                                                 cf_have_libdir=yes; break
18947                                         fi
18948                                 done
18949                         fi
18950                         if test "$cf_have_libdir" = no ; then
18951                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18952
18953 echo "${as_me:-configure}:18953: testing adding $cf_add_libdir to library-path ..." 1>&5
18954
18955                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18956                         fi
18957                 fi
18958         done
18959 fi
18960
18961         else
18962                 case "$with_hashed_db" in
18963                 (./*|../*|/*)
18964                         { echo "$as_me:18964: WARNING: no such directory $with_hashed_db" >&5
18965 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18966                         ;;
18967                 (*)
18968
18969 cf_search=
18970
18971 test "x$prefix" != "xNONE" && \
18972 test -d "$prefix" && \
18973  {
18974         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18975         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18976         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18977         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18978         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18979         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18980 }
18981
18982 for cf_subdir_prefix in \
18983         /usr \
18984         /usr/local \
18985         /usr/pkg \
18986         /opt \
18987         /opt/local \
18988         $HOME
18989 do
18990
18991 test "x$cf_subdir_prefix" != "x$prefix" && \
18992 test -d "$cf_subdir_prefix" && \
18993 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18994         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18995         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18996         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18997         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18998         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18999         test -d $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
19000 }
19001
19002 done
19003
19004         for cf_item in $cf_search
19005         do
19006                 case $cf_item in
19007                 (*/$with_hashed_db)
19008
19009 if test -n "$cf_item" ; then
19010   for cf_add_incdir in $cf_item
19011   do
19012         while test $cf_add_incdir != /usr/include
19013         do
19014           if test -d $cf_add_incdir
19015           then
19016                 cf_have_incdir=no
19017                 if test -n "$CFLAGS$CPPFLAGS" ; then
19018                   # a loop is needed to ensure we can add subdirs of existing dirs
19019                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19020                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19021                           cf_have_incdir=yes; break
19022                         fi
19023                   done
19024                 fi
19025
19026                 if test "$cf_have_incdir" = no ; then
19027                   if test "$cf_add_incdir" = /usr/local/include ; then
19028                         if test "$GCC" = yes
19029                         then
19030                           cf_save_CPPFLAGS=$CPPFLAGS
19031                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19032                           cat >conftest.$ac_ext <<_ACEOF
19033 #line 19033 "configure"
19034 #include "confdefs.h"
19035 #include <stdio.h>
19036 int
19037 main ()
19038 {
19039 printf("Hello")
19040   ;
19041   return 0;
19042 }
19043 _ACEOF
19044 rm -f conftest.$ac_objext
19045 if { (eval echo "$as_me:19045: \"$ac_compile\"") >&5
19046   (eval $ac_compile) 2>&5
19047   ac_status=$?
19048   echo "$as_me:19048: \$? = $ac_status" >&5
19049   (exit $ac_status); } &&
19050          { ac_try='test -s conftest.$ac_objext'
19051   { (eval echo "$as_me:19051: \"$ac_try\"") >&5
19052   (eval $ac_try) 2>&5
19053   ac_status=$?
19054   echo "$as_me:19054: \$? = $ac_status" >&5
19055   (exit $ac_status); }; }; then
19056   :
19057 else
19058   echo "$as_me: failed program was:" >&5
19059 cat conftest.$ac_ext >&5
19060 cf_have_incdir=yes
19061 fi
19062 rm -f conftest.$ac_objext conftest.$ac_ext
19063                           CPPFLAGS=$cf_save_CPPFLAGS
19064                         fi
19065                   fi
19066                 fi
19067
19068                 if test "$cf_have_incdir" = no ; then
19069                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19070
19071 echo "${as_me:-configure}:19071: testing adding $cf_add_incdir to include-path ..." 1>&5
19072
19073                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19074
19075                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19076                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19077                   cf_add_incdir="$cf_top_incdir"
19078                 else
19079                   break
19080                 fi
19081           else
19082                 break
19083           fi
19084         done
19085   done
19086 fi
19087
19088                         ;;
19089                 esac
19090         done
19091
19092 cf_search=
19093
19094 test "x$prefix" != "xNONE" && \
19095 test -d "$prefix" && \
19096  {
19097         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19098         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19099         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19100         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19101         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19102         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19103 }
19104
19105 for cf_subdir_prefix in \
19106         /usr \
19107         /usr/local \
19108         /usr/pkg \
19109         /opt \
19110         /opt/local \
19111         $HOME
19112 do
19113
19114 test "x$cf_subdir_prefix" != "x$prefix" && \
19115 test -d "$cf_subdir_prefix" && \
19116 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19117         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19118         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19119         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19120         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19121         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19122         test -d $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
19123 }
19124
19125 done
19126
19127         for cf_item in $cf_search
19128         do
19129                 case $cf_item in
19130                 (*/$with_hashed_db)
19131
19132 if test -n "$cf_item" ; then
19133         for cf_add_libdir in $cf_item
19134         do
19135                 if test $cf_add_libdir = /usr/lib ; then
19136                         :
19137                 elif test -d $cf_add_libdir
19138                 then
19139                         cf_have_libdir=no
19140                         if test -n "$LDFLAGS$LIBS" ; then
19141                                 # a loop is needed to ensure we can add subdirs of existing dirs
19142                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19143                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19144                                                 cf_have_libdir=yes; break
19145                                         fi
19146                                 done
19147                         fi
19148                         if test "$cf_have_libdir" = no ; then
19149                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19150
19151 echo "${as_me:-configure}:19151: testing adding $cf_add_libdir to library-path ..." 1>&5
19152
19153                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19154                         fi
19155                 fi
19156         done
19157 fi
19158
19159                         ;;
19160                 esac
19161         done
19162
19163                         ;;
19164                 esac
19165         fi
19166 esac
19167
19168 echo "$as_me:19168: checking for db.h" >&5
19169 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19170 if test "${ac_cv_header_db_h+set}" = set; then
19171   echo $ECHO_N "(cached) $ECHO_C" >&6
19172 else
19173   cat >conftest.$ac_ext <<_ACEOF
19174 #line 19174 "configure"
19175 #include "confdefs.h"
19176 #include <db.h>
19177 _ACEOF
19178 if { (eval echo "$as_me:19178: \"$ac_cpp conftest.$ac_ext\"") >&5
19179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19180   ac_status=$?
19181   egrep -v '^ *\+' conftest.er1 >conftest.err
19182   rm -f conftest.er1
19183   cat conftest.err >&5
19184   echo "$as_me:19184: \$? = $ac_status" >&5
19185   (exit $ac_status); } >/dev/null; then
19186   if test -s conftest.err; then
19187     ac_cpp_err=$ac_c_preproc_warn_flag
19188   else
19189     ac_cpp_err=
19190   fi
19191 else
19192   ac_cpp_err=yes
19193 fi
19194 if test -z "$ac_cpp_err"; then
19195   ac_cv_header_db_h=yes
19196 else
19197   echo "$as_me: failed program was:" >&5
19198   cat conftest.$ac_ext >&5
19199   ac_cv_header_db_h=no
19200 fi
19201 rm -f conftest.err conftest.$ac_ext
19202 fi
19203 echo "$as_me:19203: result: $ac_cv_header_db_h" >&5
19204 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19205 if test $ac_cv_header_db_h = yes; then
19206
19207 echo "$as_me:19207: checking for version of db" >&5
19208 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19209 if test "${cf_cv_hashed_db_version+set}" = set; then
19210   echo $ECHO_N "(cached) $ECHO_C" >&6
19211 else
19212
19213 cf_cv_hashed_db_version=unknown
19214
19215 for cf_db_version in 1 2 3 4 5 6
19216 do
19217
19218 echo "${as_me:-configure}:19218: testing checking for db version $cf_db_version ..." 1>&5
19219
19220         cat >conftest.$ac_ext <<_ACEOF
19221 #line 19221 "configure"
19222 #include "confdefs.h"
19223
19224 $ac_includes_default
19225 #include <db.h>
19226
19227 #ifdef DB_VERSION_MAJOR
19228         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19229 #if $cf_db_version == DB_VERSION_MAJOR
19230         /* ok */
19231 #else
19232         make an error
19233 #endif
19234 #else
19235 #if $cf_db_version == 1
19236         /* ok: assuming this is DB 1.8.5 */
19237 #else
19238         make an error
19239 #endif
19240 #endif
19241
19242 int
19243 main ()
19244 {
19245 DBT *foo = 0
19246   ;
19247   return 0;
19248 }
19249 _ACEOF
19250 rm -f conftest.$ac_objext
19251 if { (eval echo "$as_me:19251: \"$ac_compile\"") >&5
19252   (eval $ac_compile) 2>&5
19253   ac_status=$?
19254   echo "$as_me:19254: \$? = $ac_status" >&5
19255   (exit $ac_status); } &&
19256          { ac_try='test -s conftest.$ac_objext'
19257   { (eval echo "$as_me:19257: \"$ac_try\"") >&5
19258   (eval $ac_try) 2>&5
19259   ac_status=$?
19260   echo "$as_me:19260: \$? = $ac_status" >&5
19261   (exit $ac_status); }; }; then
19262
19263         cf_cv_hashed_db_version=$cf_db_version
19264         break
19265
19266 else
19267   echo "$as_me: failed program was:" >&5
19268 cat conftest.$ac_ext >&5
19269 fi
19270 rm -f conftest.$ac_objext conftest.$ac_ext
19271 done
19272
19273 fi
19274 echo "$as_me:19274: result: $cf_cv_hashed_db_version" >&5
19275 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19276
19277 if test "$cf_cv_hashed_db_version" = unknown ; then
19278         { { echo "$as_me:19278: error: Cannot determine version of db" >&5
19279 echo "$as_me: error: Cannot determine version of db" >&2;}
19280    { (exit 1); exit 1; }; }
19281 else
19282
19283 echo "$as_me:19283: checking for db libraries" >&5
19284 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19285 if test "${cf_cv_hashed_db_libs+set}" = set; then
19286   echo $ECHO_N "(cached) $ECHO_C" >&6
19287 else
19288
19289 cf_cv_hashed_db_libs=unknown
19290 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19291 do
19292         cf_save_libs="$LIBS"
19293         if test -n "$cf_db_libs"; then
19294
19295 cf_add_libs="-l$cf_db_libs"
19296 # Filter out duplicates - this happens with badly-designed ".pc" files...
19297 for cf_add_1lib in $LIBS
19298 do
19299         for cf_add_2lib in $cf_add_libs
19300         do
19301                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19302                 then
19303                         cf_add_1lib=
19304                         break
19305                 fi
19306         done
19307         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19308 done
19309 LIBS="$cf_add_libs"
19310
19311         fi
19312
19313 echo "${as_me:-configure}:19313: testing checking for library "$cf_db_libs" ..." 1>&5
19314
19315         cat >conftest.$ac_ext <<_ACEOF
19316 #line 19316 "configure"
19317 #include "confdefs.h"
19318
19319 $ac_includes_default
19320 #include <db.h>
19321
19322 int
19323 main ()
19324 {
19325
19326         char *path = "/tmp/foo";
19327 #ifdef DB_VERSION_MAJOR
19328 #if DB_VERSION_MAJOR >= 4
19329         DB *result = 0;
19330         db_create(&result, NULL, 0);
19331         result->open(result,
19332                 NULL,
19333                 path,
19334                 path,
19335                 DB_HASH,
19336                 DB_CREATE,
19337                 0644);
19338 #elif DB_VERSION_MAJOR >= 3
19339         DB *result = 0;
19340         db_create(&result, NULL, 0);
19341         result->open(result,
19342                 path,
19343                 path,
19344                 DB_HASH,
19345                 DB_CREATE,
19346                 0644);
19347 #elif DB_VERSION_MAJOR >= 2
19348         DB *result = 0;
19349         db_open(path,
19350                 DB_HASH,
19351                 DB_CREATE,
19352                 0644,
19353                 (DB_ENV *) 0,
19354                 (DB_INFO *) 0,
19355                 &result);
19356 #endif /* DB_VERSION_MAJOR */
19357 #else
19358         DB *result = dbopen(path,
19359                      2,
19360                      0644,
19361                      DB_HASH,
19362                      0);
19363 #endif
19364         ${cf_cv_main_return:-return}(result != 0)
19365
19366   ;
19367   return 0;
19368 }
19369 _ACEOF
19370 rm -f conftest.$ac_objext conftest$ac_exeext
19371 if { (eval echo "$as_me:19371: \"$ac_link\"") >&5
19372   (eval $ac_link) 2>&5
19373   ac_status=$?
19374   echo "$as_me:19374: \$? = $ac_status" >&5
19375   (exit $ac_status); } &&
19376          { ac_try='test -s conftest$ac_exeext'
19377   { (eval echo "$as_me:19377: \"$ac_try\"") >&5
19378   (eval $ac_try) 2>&5
19379   ac_status=$?
19380   echo "$as_me:19380: \$? = $ac_status" >&5
19381   (exit $ac_status); }; }; then
19382
19383         if test -n "$cf_db_libs" ; then
19384                 cf_cv_hashed_db_libs=$cf_db_libs
19385         else
19386                 cf_cv_hashed_db_libs=default
19387         fi
19388         LIBS="$cf_save_libs"
19389         break
19390
19391 else
19392   echo "$as_me: failed program was:" >&5
19393 cat conftest.$ac_ext >&5
19394 fi
19395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19396         LIBS="$cf_save_libs"
19397 done
19398
19399 fi
19400 echo "$as_me:19400: result: $cf_cv_hashed_db_libs" >&5
19401 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19402
19403         if test "$cf_cv_hashed_db_libs" = unknown ; then
19404                 { { echo "$as_me:19404: error: Cannot determine library for db" >&5
19405 echo "$as_me: error: Cannot determine library for db" >&2;}
19406    { (exit 1); exit 1; }; }
19407         elif test "$cf_cv_hashed_db_libs" != default ; then
19408
19409 cf_add_libs="-l$cf_cv_hashed_db_libs"
19410 # Filter out duplicates - this happens with badly-designed ".pc" files...
19411 for cf_add_1lib in $LIBS
19412 do
19413         for cf_add_2lib in $cf_add_libs
19414         do
19415                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19416                 then
19417                         cf_add_1lib=
19418                         break
19419                 fi
19420         done
19421         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19422 done
19423 LIBS="$cf_add_libs"
19424
19425         fi
19426 fi
19427
19428 else
19429
19430         { { echo "$as_me:19430: error: Cannot find db.h" >&5
19431 echo "$as_me: error: Cannot find db.h" >&2;}
19432    { (exit 1); exit 1; }; }
19433
19434 fi
19435
19436 fi
19437
19438 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19439         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19440         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19441 fi
19442
19443 # Just in case, check if the C compiler has a bool type.
19444
19445 echo "$as_me:19445: checking if we should include stdbool.h" >&5
19446 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19447
19448 if test "${cf_cv_header_stdbool_h+set}" = set; then
19449   echo $ECHO_N "(cached) $ECHO_C" >&6
19450 else
19451
19452         cat >conftest.$ac_ext <<_ACEOF
19453 #line 19453 "configure"
19454 #include "confdefs.h"
19455
19456 int
19457 main ()
19458 {
19459 bool foo = false
19460   ;
19461   return 0;
19462 }
19463 _ACEOF
19464 rm -f conftest.$ac_objext
19465 if { (eval echo "$as_me:19465: \"$ac_compile\"") >&5
19466   (eval $ac_compile) 2>&5
19467   ac_status=$?
19468   echo "$as_me:19468: \$? = $ac_status" >&5
19469   (exit $ac_status); } &&
19470          { ac_try='test -s conftest.$ac_objext'
19471   { (eval echo "$as_me:19471: \"$ac_try\"") >&5
19472   (eval $ac_try) 2>&5
19473   ac_status=$?
19474   echo "$as_me:19474: \$? = $ac_status" >&5
19475   (exit $ac_status); }; }; then
19476   cf_cv_header_stdbool_h=0
19477 else
19478   echo "$as_me: failed program was:" >&5
19479 cat conftest.$ac_ext >&5
19480 cat >conftest.$ac_ext <<_ACEOF
19481 #line 19481 "configure"
19482 #include "confdefs.h"
19483
19484 #ifndef __BEOS__
19485 #include <stdbool.h>
19486 #endif
19487
19488 int
19489 main ()
19490 {
19491 bool foo = false
19492   ;
19493   return 0;
19494 }
19495 _ACEOF
19496 rm -f conftest.$ac_objext
19497 if { (eval echo "$as_me:19497: \"$ac_compile\"") >&5
19498   (eval $ac_compile) 2>&5
19499   ac_status=$?
19500   echo "$as_me:19500: \$? = $ac_status" >&5
19501   (exit $ac_status); } &&
19502          { ac_try='test -s conftest.$ac_objext'
19503   { (eval echo "$as_me:19503: \"$ac_try\"") >&5
19504   (eval $ac_try) 2>&5
19505   ac_status=$?
19506   echo "$as_me:19506: \$? = $ac_status" >&5
19507   (exit $ac_status); }; }; then
19508   cf_cv_header_stdbool_h=1
19509 else
19510   echo "$as_me: failed program was:" >&5
19511 cat conftest.$ac_ext >&5
19512 cf_cv_header_stdbool_h=0
19513 fi
19514 rm -f conftest.$ac_objext conftest.$ac_ext
19515 fi
19516 rm -f conftest.$ac_objext conftest.$ac_ext
19517 fi
19518
19519 if test "$cf_cv_header_stdbool_h" = 1
19520 then    echo "$as_me:19520: result: yes" >&5
19521 echo "${ECHO_T}yes" >&6
19522 else    echo "$as_me:19522: result: no" >&5
19523 echo "${ECHO_T}no" >&6
19524 fi
19525
19526 echo "$as_me:19526: checking for builtin bool type" >&5
19527 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19528
19529 if test "${cf_cv_cc_bool_type+set}" = set; then
19530   echo $ECHO_N "(cached) $ECHO_C" >&6
19531 else
19532
19533         cat >conftest.$ac_ext <<_ACEOF
19534 #line 19534 "configure"
19535 #include "confdefs.h"
19536
19537 #include <stdio.h>
19538 #include <sys/types.h>
19539
19540 int
19541 main ()
19542 {
19543 bool x = false
19544   ;
19545   return 0;
19546 }
19547 _ACEOF
19548 rm -f conftest.$ac_objext
19549 if { (eval echo "$as_me:19549: \"$ac_compile\"") >&5
19550   (eval $ac_compile) 2>&5
19551   ac_status=$?
19552   echo "$as_me:19552: \$? = $ac_status" >&5
19553   (exit $ac_status); } &&
19554          { ac_try='test -s conftest.$ac_objext'
19555   { (eval echo "$as_me:19555: \"$ac_try\"") >&5
19556   (eval $ac_try) 2>&5
19557   ac_status=$?
19558   echo "$as_me:19558: \$? = $ac_status" >&5
19559   (exit $ac_status); }; }; then
19560   cf_cv_cc_bool_type=1
19561 else
19562   echo "$as_me: failed program was:" >&5
19563 cat conftest.$ac_ext >&5
19564 cf_cv_cc_bool_type=0
19565 fi
19566 rm -f conftest.$ac_objext conftest.$ac_ext
19567
19568 fi
19569
19570 if test "$cf_cv_cc_bool_type" = 1
19571 then    echo "$as_me:19571: result: yes" >&5
19572 echo "${ECHO_T}yes" >&6
19573 else    echo "$as_me:19573: result: no" >&5
19574 echo "${ECHO_T}no" >&6
19575 fi
19576
19577 # Check for C++ compiler characteristics (and ensure that it's there!)
19578 if test -n "$CXX" ; then
19579         ac_ext=cc
19580 ac_cpp='$CXXCPP $CPPFLAGS'
19581 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19582 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19583 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19584 ac_main_return=return
19585
19586 if test -n "$GXX" ; then
19587
19588         cf_save="$LIBS"
19589         LIBS="$LIBS $CXXLIBS"
19590         echo "$as_me:19590: checking if we already have C++ library" >&5
19591 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19592         cat >conftest.$ac_ext <<_ACEOF
19593 #line 19593 "configure"
19594 #include "confdefs.h"
19595
19596                         #include <iostream>
19597 int
19598 main ()
19599 {
19600
19601                         std::cout << "Hello World!" << std::endl;
19602   ;
19603   return 0;
19604 }
19605 _ACEOF
19606 rm -f conftest.$ac_objext conftest$ac_exeext
19607 if { (eval echo "$as_me:19607: \"$ac_link\"") >&5
19608   (eval $ac_link) 2>&5
19609   ac_status=$?
19610   echo "$as_me:19610: \$? = $ac_status" >&5
19611   (exit $ac_status); } &&
19612          { ac_try='test -s conftest$ac_exeext'
19613   { (eval echo "$as_me:19613: \"$ac_try\"") >&5
19614   (eval $ac_try) 2>&5
19615   ac_status=$?
19616   echo "$as_me:19616: \$? = $ac_status" >&5
19617   (exit $ac_status); }; }; then
19618   cf_have_libstdcpp=yes
19619 else
19620   echo "$as_me: failed program was:" >&5
19621 cat conftest.$ac_ext >&5
19622 cf_have_libstdcpp=no
19623 fi
19624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19625         echo "$as_me:19625: result: $cf_have_libstdcpp" >&5
19626 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19627         LIBS="$cf_save"
19628
19629         if test $cf_have_libstdcpp != yes
19630         then
19631                 case $cf_cv_system_name in
19632                 (os2*)
19633                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19634                                 cf_stdcpp_libname=stdcpp
19635                         else
19636                                 cf_stdcpp_libname=stdc++
19637                         fi
19638                         ;;
19639                 (*)
19640                         cf_stdcpp_libname=stdc++
19641                         ;;
19642                 esac
19643
19644                 echo "$as_me:19644: checking for library $cf_stdcpp_libname" >&5
19645 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19646 if test "${cf_cv_libstdcpp+set}" = set; then
19647   echo $ECHO_N "(cached) $ECHO_C" >&6
19648 else
19649
19650                         cf_save="$LIBS"
19651                         LIBS="$LIBS $CXXLIBS"
19652
19653 cf_add_libs="-l$cf_stdcpp_libname"
19654 # Filter out duplicates - this happens with badly-designed ".pc" files...
19655 for cf_add_1lib in $LIBS
19656 do
19657         for cf_add_2lib in $cf_add_libs
19658         do
19659                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19660                 then
19661                         cf_add_1lib=
19662                         break
19663                 fi
19664         done
19665         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19666 done
19667 LIBS="$cf_add_libs"
19668
19669                 cat >conftest.$ac_ext <<_ACEOF
19670 #line 19670 "configure"
19671 #include "confdefs.h"
19672
19673                                 #include <iostream>
19674 int
19675 main ()
19676 {
19677
19678                                 std::cout << "Hello World!" << std::endl;
19679   ;
19680   return 0;
19681 }
19682 _ACEOF
19683 rm -f conftest.$ac_objext conftest$ac_exeext
19684 if { (eval echo "$as_me:19684: \"$ac_link\"") >&5
19685   (eval $ac_link) 2>&5
19686   ac_status=$?
19687   echo "$as_me:19687: \$? = $ac_status" >&5
19688   (exit $ac_status); } &&
19689          { ac_try='test -s conftest$ac_exeext'
19690   { (eval echo "$as_me:19690: \"$ac_try\"") >&5
19691   (eval $ac_try) 2>&5
19692   ac_status=$?
19693   echo "$as_me:19693: \$? = $ac_status" >&5
19694   (exit $ac_status); }; }; then
19695   cf_cv_libstdcpp=yes
19696 else
19697   echo "$as_me: failed program was:" >&5
19698 cat conftest.$ac_ext >&5
19699 cf_cv_libstdcpp=no
19700 fi
19701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19702                         LIBS="$cf_save"
19703
19704 fi
19705 echo "$as_me:19705: result: $cf_cv_libstdcpp" >&5
19706 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19707                 test "$cf_cv_libstdcpp" = yes && {
19708 cf_add_libs="-l$cf_stdcpp_libname"
19709 # Filter out duplicates - this happens with badly-designed ".pc" files...
19710 for cf_add_1lib in $CXXLIBS
19711 do
19712         for cf_add_2lib in $cf_add_libs
19713         do
19714                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19715                 then
19716                         cf_add_1lib=
19717                         break
19718                 fi
19719         done
19720         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19721 done
19722 CXXLIBS="$cf_add_libs"
19723  }
19724         fi
19725 fi
19726
19727         echo "$as_me:19727: checking whether $CXX understands -c and -o together" >&5
19728 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19729 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19730   echo $ECHO_N "(cached) $ECHO_C" >&6
19731 else
19732
19733 cat > conftest.$ac_ext <<CF_EOF
19734 #include <stdio.h>
19735 int main()
19736 {
19737         ${cf_cv_main_return:-return}(0);
19738 }
19739 CF_EOF
19740 # We do the test twice because some compilers refuse to overwrite an
19741 # existing .o file with -o, though they will create one.
19742 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19743 if { (eval echo "$as_me:19743: \"$ac_try\"") >&5
19744   (eval $ac_try) 2>&5
19745   ac_status=$?
19746   echo "$as_me:19746: \$? = $ac_status" >&5
19747   (exit $ac_status); } &&
19748   test -f conftest2.$ac_objext && { (eval echo "$as_me:19748: \"$ac_try\"") >&5
19749   (eval $ac_try) 2>&5
19750   ac_status=$?
19751   echo "$as_me:19751: \$? = $ac_status" >&5
19752   (exit $ac_status); };
19753 then
19754   eval cf_cv_prog_CXX_c_o=yes
19755 else
19756   eval cf_cv_prog_CXX_c_o=no
19757 fi
19758 rm -rf conftest*
19759
19760 fi
19761 if test $cf_cv_prog_CXX_c_o = yes; then
19762   echo "$as_me:19762: result: yes" >&5
19763 echo "${ECHO_T}yes" >&6
19764 else
19765   echo "$as_me:19765: result: no" >&5
19766 echo "${ECHO_T}no" >&6
19767 fi
19768
19769         case $GXX_VERSION in
19770         (1*|2.0-6*)
19771                 cf_cxx_library=yes
19772                 ;;
19773         (*-2.7*|2.7*)
19774
19775 cf_cxx_library=unknown
19776 case $cf_cv_system_name in
19777 (os2*)
19778         cf_gpp_libname=gpp
19779         ;;
19780 (*)
19781         cf_gpp_libname=g++
19782         ;;
19783 esac
19784 if test "$GXX" = yes; then
19785         echo "$as_me:19785: checking for lib$cf_gpp_libname" >&5
19786 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19787         cf_save="$LIBS"
19788
19789 cf_add_libs="-l$cf_gpp_libname"
19790 # Filter out duplicates - this happens with badly-designed ".pc" files...
19791 for cf_add_1lib in $LIBS
19792 do
19793         for cf_add_2lib in $cf_add_libs
19794         do
19795                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19796                 then
19797                         cf_add_1lib=
19798                         break
19799                 fi
19800         done
19801         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19802 done
19803 LIBS="$cf_add_libs"
19804
19805         cat >conftest.$ac_ext <<_ACEOF
19806 #line 19806 "configure"
19807 #include "confdefs.h"
19808
19809 #include <$cf_gpp_libname/builtin.h>
19810
19811 int
19812 main ()
19813 {
19814 two_arg_error_handler_t foo2 = lib_error_handler
19815   ;
19816   return 0;
19817 }
19818 _ACEOF
19819 rm -f conftest.$ac_objext conftest$ac_exeext
19820 if { (eval echo "$as_me:19820: \"$ac_link\"") >&5
19821   (eval $ac_link) 2>&5
19822   ac_status=$?
19823   echo "$as_me:19823: \$? = $ac_status" >&5
19824   (exit $ac_status); } &&
19825          { ac_try='test -s conftest$ac_exeext'
19826   { (eval echo "$as_me:19826: \"$ac_try\"") >&5
19827   (eval $ac_try) 2>&5
19828   ac_status=$?
19829   echo "$as_me:19829: \$? = $ac_status" >&5
19830   (exit $ac_status); }; }; then
19831   cf_cxx_library=yes
19832
19833 cf_add_libs="-l$cf_gpp_libname"
19834 # Filter out duplicates - this happens with badly-designed ".pc" files...
19835 for cf_add_1lib in $CXXLIBS
19836 do
19837         for cf_add_2lib in $cf_add_libs
19838         do
19839                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19840                 then
19841                         cf_add_1lib=
19842                         break
19843                 fi
19844         done
19845         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19846 done
19847 CXXLIBS="$cf_add_libs"
19848
19849          if test "$cf_gpp_libname" = cpp ; then
19850
19851 cat >>confdefs.h <<\EOF
19852 #define HAVE_GPP_BUILTIN_H 1
19853 EOF
19854
19855          else
19856
19857 cat >>confdefs.h <<\EOF
19858 #define HAVE_GXX_BUILTIN_H 1
19859 EOF
19860
19861          fi
19862 else
19863   echo "$as_me: failed program was:" >&5
19864 cat conftest.$ac_ext >&5
19865 cat >conftest.$ac_ext <<_ACEOF
19866 #line 19866 "configure"
19867 #include "confdefs.h"
19868
19869 #include <builtin.h>
19870
19871 int
19872 main ()
19873 {
19874 two_arg_error_handler_t foo2 = lib_error_handler
19875   ;
19876   return 0;
19877 }
19878 _ACEOF
19879 rm -f conftest.$ac_objext conftest$ac_exeext
19880 if { (eval echo "$as_me:19880: \"$ac_link\"") >&5
19881   (eval $ac_link) 2>&5
19882   ac_status=$?
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit $ac_status); } &&
19885          { ac_try='test -s conftest$ac_exeext'
19886   { (eval echo "$as_me:19886: \"$ac_try\"") >&5
19887   (eval $ac_try) 2>&5
19888   ac_status=$?
19889   echo "$as_me:19889: \$? = $ac_status" >&5
19890   (exit $ac_status); }; }; then
19891   cf_cxx_library=yes
19892
19893 cf_add_libs="-l$cf_gpp_libname"
19894 # Filter out duplicates - this happens with badly-designed ".pc" files...
19895 for cf_add_1lib in $CXXLIBS
19896 do
19897         for cf_add_2lib in $cf_add_libs
19898         do
19899                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19900                 then
19901                         cf_add_1lib=
19902                         break
19903                 fi
19904         done
19905         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19906 done
19907 CXXLIBS="$cf_add_libs"
19908
19909 cat >>confdefs.h <<\EOF
19910 #define HAVE_BUILTIN_H 1
19911 EOF
19912
19913 else
19914   echo "$as_me: failed program was:" >&5
19915 cat conftest.$ac_ext >&5
19916 cf_cxx_library=no
19917 fi
19918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19919 fi
19920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19921         LIBS="$cf_save"
19922         echo "$as_me:19922: result: $cf_cxx_library" >&5
19923 echo "${ECHO_T}$cf_cxx_library" >&6
19924 fi
19925
19926                 ;;
19927         (*)
19928                 cf_cxx_library=no
19929                 ;;
19930         esac
19931
19932         ac_ext=cc
19933 ac_cpp='$CXXCPP $CPPFLAGS'
19934 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19935 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19936 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19937 ac_main_return=return
19938 echo "$as_me:19938: checking how to run the C++ preprocessor" >&5
19939 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19940 if test -z "$CXXCPP"; then
19941   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19942   echo $ECHO_N "(cached) $ECHO_C" >&6
19943 else
19944       # Double quotes because CXXCPP needs to be expanded
19945     for CXXCPP in "$CXX -E" "/lib/cpp"
19946     do
19947       ac_preproc_ok=false
19948 for ac_cxx_preproc_warn_flag in '' yes
19949 do
19950   # Use a header file that comes with gcc, so configuring glibc
19951   # with a fresh cross-compiler works.
19952   # On the NeXT, cc -E runs the code through the compiler's parser,
19953   # not just through cpp. "Syntax error" is here to catch this case.
19954   cat >conftest.$ac_ext <<_ACEOF
19955 #line 19955 "configure"
19956 #include "confdefs.h"
19957 #include <assert.h>
19958                      Syntax error
19959 _ACEOF
19960 if { (eval echo "$as_me:19960: \"$ac_cpp conftest.$ac_ext\"") >&5
19961   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19962   ac_status=$?
19963   egrep -v '^ *\+' conftest.er1 >conftest.err
19964   rm -f conftest.er1
19965   cat conftest.err >&5
19966   echo "$as_me:19966: \$? = $ac_status" >&5
19967   (exit $ac_status); } >/dev/null; then
19968   if test -s conftest.err; then
19969     ac_cpp_err=$ac_cxx_preproc_warn_flag
19970   else
19971     ac_cpp_err=
19972   fi
19973 else
19974   ac_cpp_err=yes
19975 fi
19976 if test -z "$ac_cpp_err"; then
19977   :
19978 else
19979   echo "$as_me: failed program was:" >&5
19980   cat conftest.$ac_ext >&5
19981   # Broken: fails on valid input.
19982 continue
19983 fi
19984 rm -f conftest.err conftest.$ac_ext
19985
19986   # OK, works on sane cases.  Now check whether non-existent headers
19987   # can be detected and how.
19988   cat >conftest.$ac_ext <<_ACEOF
19989 #line 19989 "configure"
19990 #include "confdefs.h"
19991 #include <ac_nonexistent.h>
19992 _ACEOF
19993 if { (eval echo "$as_me:19993: \"$ac_cpp conftest.$ac_ext\"") >&5
19994   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19995   ac_status=$?
19996   egrep -v '^ *\+' conftest.er1 >conftest.err
19997   rm -f conftest.er1
19998   cat conftest.err >&5
19999   echo "$as_me:19999: \$? = $ac_status" >&5
20000   (exit $ac_status); } >/dev/null; then
20001   if test -s conftest.err; then
20002     ac_cpp_err=$ac_cxx_preproc_warn_flag
20003   else
20004     ac_cpp_err=
20005   fi
20006 else
20007   ac_cpp_err=yes
20008 fi
20009 if test -z "$ac_cpp_err"; then
20010   # Broken: success on invalid input.
20011 continue
20012 else
20013   echo "$as_me: failed program was:" >&5
20014   cat conftest.$ac_ext >&5
20015   # Passes both tests.
20016 ac_preproc_ok=:
20017 break
20018 fi
20019 rm -f conftest.err conftest.$ac_ext
20020
20021 done
20022 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20023 rm -f conftest.err conftest.$ac_ext
20024 if $ac_preproc_ok; then
20025   break
20026 fi
20027
20028     done
20029     ac_cv_prog_CXXCPP=$CXXCPP
20030
20031 fi
20032   CXXCPP=$ac_cv_prog_CXXCPP
20033 else
20034   ac_cv_prog_CXXCPP=$CXXCPP
20035 fi
20036 echo "$as_me:20036: result: $CXXCPP" >&5
20037 echo "${ECHO_T}$CXXCPP" >&6
20038 ac_preproc_ok=false
20039 for ac_cxx_preproc_warn_flag in '' yes
20040 do
20041   # Use a header file that comes with gcc, so configuring glibc
20042   # with a fresh cross-compiler works.
20043   # On the NeXT, cc -E runs the code through the compiler's parser,
20044   # not just through cpp. "Syntax error" is here to catch this case.
20045   cat >conftest.$ac_ext <<_ACEOF
20046 #line 20046 "configure"
20047 #include "confdefs.h"
20048 #include <assert.h>
20049                      Syntax error
20050 _ACEOF
20051 if { (eval echo "$as_me:20051: \"$ac_cpp conftest.$ac_ext\"") >&5
20052   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20053   ac_status=$?
20054   egrep -v '^ *\+' conftest.er1 >conftest.err
20055   rm -f conftest.er1
20056   cat conftest.err >&5
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit $ac_status); } >/dev/null; then
20059   if test -s conftest.err; then
20060     ac_cpp_err=$ac_cxx_preproc_warn_flag
20061   else
20062     ac_cpp_err=
20063   fi
20064 else
20065   ac_cpp_err=yes
20066 fi
20067 if test -z "$ac_cpp_err"; then
20068   :
20069 else
20070   echo "$as_me: failed program was:" >&5
20071   cat conftest.$ac_ext >&5
20072   # Broken: fails on valid input.
20073 continue
20074 fi
20075 rm -f conftest.err conftest.$ac_ext
20076
20077   # OK, works on sane cases.  Now check whether non-existent headers
20078   # can be detected and how.
20079   cat >conftest.$ac_ext <<_ACEOF
20080 #line 20080 "configure"
20081 #include "confdefs.h"
20082 #include <ac_nonexistent.h>
20083 _ACEOF
20084 if { (eval echo "$as_me:20084: \"$ac_cpp conftest.$ac_ext\"") >&5
20085   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20086   ac_status=$?
20087   egrep -v '^ *\+' conftest.er1 >conftest.err
20088   rm -f conftest.er1
20089   cat conftest.err >&5
20090   echo "$as_me:20090: \$? = $ac_status" >&5
20091   (exit $ac_status); } >/dev/null; then
20092   if test -s conftest.err; then
20093     ac_cpp_err=$ac_cxx_preproc_warn_flag
20094   else
20095     ac_cpp_err=
20096   fi
20097 else
20098   ac_cpp_err=yes
20099 fi
20100 if test -z "$ac_cpp_err"; then
20101   # Broken: success on invalid input.
20102 continue
20103 else
20104   echo "$as_me: failed program was:" >&5
20105   cat conftest.$ac_ext >&5
20106   # Passes both tests.
20107 ac_preproc_ok=:
20108 break
20109 fi
20110 rm -f conftest.err conftest.$ac_ext
20111
20112 done
20113 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20114 rm -f conftest.err conftest.$ac_ext
20115 if $ac_preproc_ok; then
20116   :
20117 else
20118   { { echo "$as_me:20118: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20119 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20120    { (exit 1); exit 1; }; }
20121 fi
20122
20123 ac_ext=cc
20124 ac_cpp='$CXXCPP $CPPFLAGS'
20125 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20126 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20127 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20128 ac_main_return=return
20129
20130 for ac_header in typeinfo
20131 do
20132 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20133 echo "$as_me:20133: checking for $ac_header" >&5
20134 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20135 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20136   echo $ECHO_N "(cached) $ECHO_C" >&6
20137 else
20138   cat >conftest.$ac_ext <<_ACEOF
20139 #line 20139 "configure"
20140 #include "confdefs.h"
20141 #include <$ac_header>
20142 _ACEOF
20143 if { (eval echo "$as_me:20143: \"$ac_cpp conftest.$ac_ext\"") >&5
20144   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20145   ac_status=$?
20146   egrep -v '^ *\+' conftest.er1 >conftest.err
20147   rm -f conftest.er1
20148   cat conftest.err >&5
20149   echo "$as_me:20149: \$? = $ac_status" >&5
20150   (exit $ac_status); } >/dev/null; then
20151   if test -s conftest.err; then
20152     ac_cpp_err=$ac_cxx_preproc_warn_flag
20153   else
20154     ac_cpp_err=
20155   fi
20156 else
20157   ac_cpp_err=yes
20158 fi
20159 if test -z "$ac_cpp_err"; then
20160   eval "$as_ac_Header=yes"
20161 else
20162   echo "$as_me: failed program was:" >&5
20163   cat conftest.$ac_ext >&5
20164   eval "$as_ac_Header=no"
20165 fi
20166 rm -f conftest.err conftest.$ac_ext
20167 fi
20168 echo "$as_me:20168: result: `eval echo '${'$as_ac_Header'}'`" >&5
20169 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20170 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20171   cat >>confdefs.h <<EOF
20172 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20173 EOF
20174
20175 fi
20176 done
20177
20178 for ac_header in iostream
20179 do
20180 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20181 echo "$as_me:20181: checking for $ac_header" >&5
20182 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20183 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20184   echo $ECHO_N "(cached) $ECHO_C" >&6
20185 else
20186   cat >conftest.$ac_ext <<_ACEOF
20187 #line 20187 "configure"
20188 #include "confdefs.h"
20189 #include <$ac_header>
20190 _ACEOF
20191 if { (eval echo "$as_me:20191: \"$ac_cpp conftest.$ac_ext\"") >&5
20192   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20193   ac_status=$?
20194   egrep -v '^ *\+' conftest.er1 >conftest.err
20195   rm -f conftest.er1
20196   cat conftest.err >&5
20197   echo "$as_me:20197: \$? = $ac_status" >&5
20198   (exit $ac_status); } >/dev/null; then
20199   if test -s conftest.err; then
20200     ac_cpp_err=$ac_cxx_preproc_warn_flag
20201   else
20202     ac_cpp_err=
20203   fi
20204 else
20205   ac_cpp_err=yes
20206 fi
20207 if test -z "$ac_cpp_err"; then
20208   eval "$as_ac_Header=yes"
20209 else
20210   echo "$as_me: failed program was:" >&5
20211   cat conftest.$ac_ext >&5
20212   eval "$as_ac_Header=no"
20213 fi
20214 rm -f conftest.err conftest.$ac_ext
20215 fi
20216 echo "$as_me:20216: result: `eval echo '${'$as_ac_Header'}'`" >&5
20217 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20218 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20219   cat >>confdefs.h <<EOF
20220 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20221 EOF
20222
20223 fi
20224 done
20225
20226 if test x"$ac_cv_header_iostream" = xyes ; then
20227         echo "$as_me:20227: checking if iostream uses std-namespace" >&5
20228 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20229         cat >conftest.$ac_ext <<_ACEOF
20230 #line 20230 "configure"
20231 #include "confdefs.h"
20232
20233 #include <iostream>
20234 using std::endl;
20235 using std::cerr;
20236 int
20237 main ()
20238 {
20239
20240 cerr << "testing" << endl;
20241
20242   ;
20243   return 0;
20244 }
20245 _ACEOF
20246 rm -f conftest.$ac_objext
20247 if { (eval echo "$as_me:20247: \"$ac_compile\"") >&5
20248   (eval $ac_compile) 2>&5
20249   ac_status=$?
20250   echo "$as_me:20250: \$? = $ac_status" >&5
20251   (exit $ac_status); } &&
20252          { ac_try='test -s conftest.$ac_objext'
20253   { (eval echo "$as_me:20253: \"$ac_try\"") >&5
20254   (eval $ac_try) 2>&5
20255   ac_status=$?
20256   echo "$as_me:20256: \$? = $ac_status" >&5
20257   (exit $ac_status); }; }; then
20258   cf_iostream_namespace=yes
20259 else
20260   echo "$as_me: failed program was:" >&5
20261 cat conftest.$ac_ext >&5
20262 cf_iostream_namespace=no
20263 fi
20264 rm -f conftest.$ac_objext conftest.$ac_ext
20265         echo "$as_me:20265: result: $cf_iostream_namespace" >&5
20266 echo "${ECHO_T}$cf_iostream_namespace" >&6
20267         if test "$cf_iostream_namespace" = yes ; then
20268
20269 cat >>confdefs.h <<\EOF
20270 #define IOSTREAM_NAMESPACE 1
20271 EOF
20272
20273         fi
20274 fi
20275
20276 echo "$as_me:20276: checking if we should include stdbool.h" >&5
20277 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20278
20279 if test "${cf_cv_header_stdbool_h+set}" = set; then
20280   echo $ECHO_N "(cached) $ECHO_C" >&6
20281 else
20282
20283         cat >conftest.$ac_ext <<_ACEOF
20284 #line 20284 "configure"
20285 #include "confdefs.h"
20286
20287 int
20288 main ()
20289 {
20290 bool foo = false
20291   ;
20292   return 0;
20293 }
20294 _ACEOF
20295 rm -f conftest.$ac_objext
20296 if { (eval echo "$as_me:20296: \"$ac_compile\"") >&5
20297   (eval $ac_compile) 2>&5
20298   ac_status=$?
20299   echo "$as_me:20299: \$? = $ac_status" >&5
20300   (exit $ac_status); } &&
20301          { ac_try='test -s conftest.$ac_objext'
20302   { (eval echo "$as_me:20302: \"$ac_try\"") >&5
20303   (eval $ac_try) 2>&5
20304   ac_status=$?
20305   echo "$as_me:20305: \$? = $ac_status" >&5
20306   (exit $ac_status); }; }; then
20307   cf_cv_header_stdbool_h=0
20308 else
20309   echo "$as_me: failed program was:" >&5
20310 cat conftest.$ac_ext >&5
20311 cat >conftest.$ac_ext <<_ACEOF
20312 #line 20312 "configure"
20313 #include "confdefs.h"
20314
20315 #ifndef __BEOS__
20316 #include <stdbool.h>
20317 #endif
20318
20319 int
20320 main ()
20321 {
20322 bool foo = false
20323   ;
20324   return 0;
20325 }
20326 _ACEOF
20327 rm -f conftest.$ac_objext
20328 if { (eval echo "$as_me:20328: \"$ac_compile\"") >&5
20329   (eval $ac_compile) 2>&5
20330   ac_status=$?
20331   echo "$as_me:20331: \$? = $ac_status" >&5
20332   (exit $ac_status); } &&
20333          { ac_try='test -s conftest.$ac_objext'
20334   { (eval echo "$as_me:20334: \"$ac_try\"") >&5
20335   (eval $ac_try) 2>&5
20336   ac_status=$?
20337   echo "$as_me:20337: \$? = $ac_status" >&5
20338   (exit $ac_status); }; }; then
20339   cf_cv_header_stdbool_h=1
20340 else
20341   echo "$as_me: failed program was:" >&5
20342 cat conftest.$ac_ext >&5
20343 cf_cv_header_stdbool_h=0
20344 fi
20345 rm -f conftest.$ac_objext conftest.$ac_ext
20346 fi
20347 rm -f conftest.$ac_objext conftest.$ac_ext
20348 fi
20349
20350 if test "$cf_cv_header_stdbool_h" = 1
20351 then    echo "$as_me:20351: result: yes" >&5
20352 echo "${ECHO_T}yes" >&6
20353 else    echo "$as_me:20353: result: no" >&5
20354 echo "${ECHO_T}no" >&6
20355 fi
20356
20357 echo "$as_me:20357: checking for builtin bool type" >&5
20358 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20359
20360 if test "${cf_cv_builtin_bool+set}" = set; then
20361   echo $ECHO_N "(cached) $ECHO_C" >&6
20362 else
20363
20364         cat >conftest.$ac_ext <<_ACEOF
20365 #line 20365 "configure"
20366 #include "confdefs.h"
20367
20368 #include <stdio.h>
20369 #include <sys/types.h>
20370
20371 int
20372 main ()
20373 {
20374 bool x = false
20375   ;
20376   return 0;
20377 }
20378 _ACEOF
20379 rm -f conftest.$ac_objext
20380 if { (eval echo "$as_me:20380: \"$ac_compile\"") >&5
20381   (eval $ac_compile) 2>&5
20382   ac_status=$?
20383   echo "$as_me:20383: \$? = $ac_status" >&5
20384   (exit $ac_status); } &&
20385          { ac_try='test -s conftest.$ac_objext'
20386   { (eval echo "$as_me:20386: \"$ac_try\"") >&5
20387   (eval $ac_try) 2>&5
20388   ac_status=$?
20389   echo "$as_me:20389: \$? = $ac_status" >&5
20390   (exit $ac_status); }; }; then
20391   cf_cv_builtin_bool=1
20392 else
20393   echo "$as_me: failed program was:" >&5
20394 cat conftest.$ac_ext >&5
20395 cf_cv_builtin_bool=0
20396 fi
20397 rm -f conftest.$ac_objext conftest.$ac_ext
20398
20399 fi
20400
20401 if test "$cf_cv_builtin_bool" = 1
20402 then    echo "$as_me:20402: result: yes" >&5
20403 echo "${ECHO_T}yes" >&6
20404 else    echo "$as_me:20404: result: no" >&5
20405 echo "${ECHO_T}no" >&6
20406 fi
20407
20408 echo "$as_me:20408: checking for size of bool" >&5
20409 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20410 if test "${cf_cv_type_of_bool+set}" = set; then
20411   echo $ECHO_N "(cached) $ECHO_C" >&6
20412 else
20413
20414         rm -f cf_test.out
20415         if test "$cross_compiling" = yes; then
20416   cf_cv_type_of_bool=unknown
20417 else
20418   cat >conftest.$ac_ext <<_ACEOF
20419 #line 20419 "configure"
20420 #include "confdefs.h"
20421
20422 #include <stdlib.h>
20423 #include <stdio.h>
20424
20425 #if defined(__cplusplus)
20426
20427 #ifdef HAVE_GXX_BUILTIN_H
20428 #include <g++/builtin.h>
20429 #elif HAVE_GPP_BUILTIN_H
20430 #include <gpp/builtin.h>
20431 #elif HAVE_BUILTIN_H
20432 #include <builtin.h>
20433 #endif
20434
20435 #else
20436
20437 #if $cf_cv_header_stdbool_h
20438 #include <stdbool.h>
20439 #endif
20440
20441 #endif
20442
20443 int main()
20444 {
20445         FILE *fp = fopen("cf_test.out", "w");
20446         if (fp != 0) {
20447                 bool x = true;
20448                 if ((bool)(-x) >= 0)
20449                         fputs("unsigned ", fp);
20450                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20451                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20452                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20453                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20454                 fclose(fp);
20455         }
20456         ${cf_cv_main_return:-return}(0);
20457 }
20458
20459 _ACEOF
20460 rm -f conftest$ac_exeext
20461 if { (eval echo "$as_me:20461: \"$ac_link\"") >&5
20462   (eval $ac_link) 2>&5
20463   ac_status=$?
20464   echo "$as_me:20464: \$? = $ac_status" >&5
20465   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20466   { (eval echo "$as_me:20466: \"$ac_try\"") >&5
20467   (eval $ac_try) 2>&5
20468   ac_status=$?
20469   echo "$as_me:20469: \$? = $ac_status" >&5
20470   (exit $ac_status); }; }; then
20471   cf_cv_type_of_bool=`cat cf_test.out`
20472                  if test -z "$cf_cv_type_of_bool"; then
20473                    cf_cv_type_of_bool=unknown
20474                  fi
20475 else
20476   echo "$as_me: program exited with status $ac_status" >&5
20477 echo "$as_me: failed program was:" >&5
20478 cat conftest.$ac_ext >&5
20479 cf_cv_type_of_bool=unknown
20480 fi
20481 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20482 fi
20483
20484 fi
20485
20486         rm -f cf_test.out
20487 echo "$as_me:20487: result: $cf_cv_type_of_bool" >&5
20488 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20489 if test "$cf_cv_type_of_bool" = unknown ; then
20490         case .$NCURSES_BOOL in
20491         (.auto|.) NCURSES_BOOL=unsigned;;
20492         esac
20493         { echo "$as_me:20493: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20494 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20495         cf_cv_type_of_bool=$NCURSES_BOOL
20496 fi
20497
20498 echo "$as_me:20498: checking for special defines needed for etip.h" >&5
20499 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20500 cf_save_CXXFLAGS="$CXXFLAGS"
20501 cf_result="none"
20502
20503 # etip.h includes ncurses.h which includes ncurses_dll.h
20504 # But ncurses_dll.h is generated - fix here.
20505 test -d include || mkdir include
20506 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
20507
20508 for cf_math in "" MATH_H
20509 do
20510 for cf_excp in "" MATH_EXCEPTION
20511 do
20512         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20513         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20514         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20515 cat >conftest.$ac_ext <<_ACEOF
20516 #line 20516 "configure"
20517 #include "confdefs.h"
20518
20519 #include <etip.h.in>
20520
20521 int
20522 main ()
20523 {
20524
20525   ;
20526   return 0;
20527 }
20528 _ACEOF
20529 rm -f conftest.$ac_objext
20530 if { (eval echo "$as_me:20530: \"$ac_compile\"") >&5
20531   (eval $ac_compile) 2>&5
20532   ac_status=$?
20533   echo "$as_me:20533: \$? = $ac_status" >&5
20534   (exit $ac_status); } &&
20535          { ac_try='test -s conftest.$ac_objext'
20536   { (eval echo "$as_me:20536: \"$ac_try\"") >&5
20537   (eval $ac_try) 2>&5
20538   ac_status=$?
20539   echo "$as_me:20539: \$? = $ac_status" >&5
20540   (exit $ac_status); }; }; then
20541
20542         test -n "$cf_math" && cat >>confdefs.h <<EOF
20543 #define ETIP_NEEDS_${cf_math} 1
20544 EOF
20545
20546         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20547 #define ETIP_NEEDS_${cf_excp} 1
20548 EOF
20549
20550         cf_result="$cf_math $cf_excp"
20551         break 2
20552
20553 else
20554   echo "$as_me: failed program was:" >&5
20555 cat conftest.$ac_ext >&5
20556 fi
20557 rm -f conftest.$ac_objext conftest.$ac_ext
20558 done
20559 done
20560 echo "$as_me:20560: result: $cf_result" >&5
20561 echo "${ECHO_T}$cf_result" >&6
20562 CXXFLAGS="$cf_save_CXXFLAGS"
20563
20564 if test -n "$CXX"; then
20565 echo "$as_me:20565: checking if $CXX accepts parameter initialization" >&5
20566 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20567 if test "${cf_cv_cpp_param_init+set}" = set; then
20568   echo $ECHO_N "(cached) $ECHO_C" >&6
20569 else
20570
20571         ac_ext=cc
20572 ac_cpp='$CXXCPP $CPPFLAGS'
20573 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20574 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20575 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20576 ac_main_return=return
20577
20578         if test "$cross_compiling" = yes; then
20579   cf_cv_cpp_param_init=unknown
20580 else
20581   cat >conftest.$ac_ext <<_ACEOF
20582 #line 20582 "configure"
20583 #include "confdefs.h"
20584
20585 class TEST {
20586 private:
20587         int value;
20588 public:
20589         TEST(int x = 1);
20590         ~TEST();
20591 };
20592
20593 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20594 {
20595         value = x;
20596 }
20597 int main() { }
20598
20599 _ACEOF
20600 rm -f conftest$ac_exeext
20601 if { (eval echo "$as_me:20601: \"$ac_link\"") >&5
20602   (eval $ac_link) 2>&5
20603   ac_status=$?
20604   echo "$as_me:20604: \$? = $ac_status" >&5
20605   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20606   { (eval echo "$as_me:20606: \"$ac_try\"") >&5
20607   (eval $ac_try) 2>&5
20608   ac_status=$?
20609   echo "$as_me:20609: \$? = $ac_status" >&5
20610   (exit $ac_status); }; }; then
20611   cf_cv_cpp_param_init=yes
20612 else
20613   echo "$as_me: program exited with status $ac_status" >&5
20614 echo "$as_me: failed program was:" >&5
20615 cat conftest.$ac_ext >&5
20616 cf_cv_cpp_param_init=no
20617 fi
20618 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20619 fi
20620         ac_ext=cc
20621 ac_cpp='$CXXCPP $CPPFLAGS'
20622 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20623 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20624 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20625 ac_main_return=return
20626
20627 fi
20628 echo "$as_me:20628: result: $cf_cv_cpp_param_init" >&5
20629 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20630 fi
20631 test "$cf_cv_cpp_param_init" = yes &&
20632 cat >>confdefs.h <<\EOF
20633 #define CPP_HAS_PARAM_INIT 1
20634 EOF
20635
20636 if test -n "$CXX"; then
20637
20638 echo "$as_me:20638: checking if $CXX accepts static_cast" >&5
20639 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20640 if test "${cf_cv_cpp_static_cast+set}" = set; then
20641   echo $ECHO_N "(cached) $ECHO_C" >&6
20642 else
20643
20644         ac_ext=cc
20645 ac_cpp='$CXXCPP $CPPFLAGS'
20646 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20647 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20648 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20649 ac_main_return=return
20650
20651         cat >conftest.$ac_ext <<_ACEOF
20652 #line 20652 "configure"
20653 #include "confdefs.h"
20654
20655 class NCursesPanel
20656 {
20657 public:
20658   NCursesPanel(int nlines,
20659                int ncols,
20660                int begin_y = 0,
20661                int begin_x = 0)
20662   {
20663   }
20664   NCursesPanel();
20665   ~NCursesPanel();
20666 };
20667
20668 template<class T> class NCursesUserPanel : public NCursesPanel
20669 {
20670 public:
20671   NCursesUserPanel (int nlines,
20672                     int ncols,
20673                     int begin_y = 0,
20674                     int begin_x = 0,
20675                     const T* p_UserData = static_cast<T*>(0))
20676     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20677   {
20678   };
20679   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20680   {
20681   };
20682
20683   virtual ~NCursesUserPanel() {};
20684 };
20685
20686 int
20687 main ()
20688 {
20689
20690         const char* p_UserData = static_cast<char*>(0)
20691   ;
20692   return 0;
20693 }
20694 _ACEOF
20695 rm -f conftest.$ac_objext
20696 if { (eval echo "$as_me:20696: \"$ac_compile\"") >&5
20697   (eval $ac_compile) 2>&5
20698   ac_status=$?
20699   echo "$as_me:20699: \$? = $ac_status" >&5
20700   (exit $ac_status); } &&
20701          { ac_try='test -s conftest.$ac_objext'
20702   { (eval echo "$as_me:20702: \"$ac_try\"") >&5
20703   (eval $ac_try) 2>&5
20704   ac_status=$?
20705   echo "$as_me:20705: \$? = $ac_status" >&5
20706   (exit $ac_status); }; }; then
20707   cf_cv_cpp_static_cast=yes
20708 else
20709   echo "$as_me: failed program was:" >&5
20710 cat conftest.$ac_ext >&5
20711 cf_cv_cpp_static_cast=no
20712 fi
20713 rm -f conftest.$ac_objext conftest.$ac_ext
20714
20715         ac_ext=cc
20716 ac_cpp='$CXXCPP $CPPFLAGS'
20717 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20718 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20719 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20720 ac_main_return=return
20721
20722 fi
20723 echo "$as_me:20723: result: $cf_cv_cpp_static_cast" >&5
20724 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20725
20726 fi
20727
20728 test "$cf_cv_cpp_static_cast" = yes &&
20729 cat >>confdefs.h <<\EOF
20730 #define CPP_HAS_STATIC_CAST 1
20731 EOF
20732
20733         CXX_AR='$(AR)'
20734         CXX_ARFLAGS='$(ARFLAGS)'
20735         case $cf_cv_system_name in
20736         (irix*)
20737             if test "$GXX" != yes ; then
20738                 CXX_AR='$(CXX)'
20739                 CXX_ARFLAGS='-ar -o'
20740             fi
20741             ;;
20742         (sco3.2v5*)
20743             CXXLDFLAGS="-u main"
20744             ;;
20745         (solaris2*)
20746             if test "$GXX" != yes ; then
20747                 CXX_AR='$(CXX)'
20748                 CXX_ARFLAGS='-xar -o'
20749             fi
20750             ;;
20751         esac
20752
20753 else
20754         cf_cxx_library=no
20755         cf_cv_builtin_bool=1
20756
20757         # Just because we are not configuring against C++ right now does not
20758         # mean that a user will not want to use C++.  Some distributors disable
20759         # the C++ portion of this configuration as a shortcut (or just to avoid
20760         # compiling the demo in the c++ directory).  So we need a reasonable
20761         # default for the 'bool' type.
20762         #
20763         # Caveat: since the storage of the bool type is not standardized, it
20764         # may change.
20765
20766         if test "$NCURSES_BOOL" != auto ; then
20767                 cf_cv_type_of_bool=$NCURSES_BOOL
20768                 cf_cv_header_stdbool_h=0
20769         else
20770                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20771
20772 echo "$as_me:20772: checking for size of bool" >&5
20773 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20774 if test "${cf_cv_type_of_bool+set}" = set; then
20775   echo $ECHO_N "(cached) $ECHO_C" >&6
20776 else
20777
20778         rm -f cf_test.out
20779         if test "$cross_compiling" = yes; then
20780   cf_cv_type_of_bool=unknown
20781 else
20782   cat >conftest.$ac_ext <<_ACEOF
20783 #line 20783 "configure"
20784 #include "confdefs.h"
20785
20786 #include <stdlib.h>
20787 #include <stdio.h>
20788
20789 #if defined(__cplusplus)
20790
20791 #ifdef HAVE_GXX_BUILTIN_H
20792 #include <g++/builtin.h>
20793 #elif HAVE_GPP_BUILTIN_H
20794 #include <gpp/builtin.h>
20795 #elif HAVE_BUILTIN_H
20796 #include <builtin.h>
20797 #endif
20798
20799 #else
20800
20801 #if $cf_cv_header_stdbool_h
20802 #include <stdbool.h>
20803 #endif
20804
20805 #endif
20806
20807 int main()
20808 {
20809         FILE *fp = fopen("cf_test.out", "w");
20810         if (fp != 0) {
20811                 bool x = true;
20812                 if ((bool)(-x) >= 0)
20813                         fputs("unsigned ", fp);
20814                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20815                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20816                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20817                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20818                 fclose(fp);
20819         }
20820         ${cf_cv_main_return:-return}(0);
20821 }
20822
20823 _ACEOF
20824 rm -f conftest$ac_exeext
20825 if { (eval echo "$as_me:20825: \"$ac_link\"") >&5
20826   (eval $ac_link) 2>&5
20827   ac_status=$?
20828   echo "$as_me:20828: \$? = $ac_status" >&5
20829   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20830   { (eval echo "$as_me:20830: \"$ac_try\"") >&5
20831   (eval $ac_try) 2>&5
20832   ac_status=$?
20833   echo "$as_me:20833: \$? = $ac_status" >&5
20834   (exit $ac_status); }; }; then
20835   cf_cv_type_of_bool=`cat cf_test.out`
20836                  if test -z "$cf_cv_type_of_bool"; then
20837                    cf_cv_type_of_bool=unknown
20838                  fi
20839 else
20840   echo "$as_me: program exited with status $ac_status" >&5
20841 echo "$as_me: failed program was:" >&5
20842 cat conftest.$ac_ext >&5
20843 cf_cv_type_of_bool=unknown
20844 fi
20845 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20846 fi
20847
20848 fi
20849
20850         rm -f cf_test.out
20851 echo "$as_me:20851: result: $cf_cv_type_of_bool" >&5
20852 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20853 if test "$cf_cv_type_of_bool" = unknown ; then
20854         case .$NCURSES_BOOL in
20855         (.auto|.) NCURSES_BOOL=unsigned;;
20856         esac
20857         { echo "$as_me:20857: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20858 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20859         cf_cv_type_of_bool=$NCURSES_BOOL
20860 fi
20861
20862                 else
20863                         echo "$as_me:20863: checking for fallback type of bool" >&5
20864 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20865                         case "$host_cpu" in
20866                         (i?86)  cf_cv_type_of_bool=char ;;
20867                         (*)     cf_cv_type_of_bool=int  ;;
20868                         esac
20869                         echo "$as_me:20869: result: $cf_cv_type_of_bool" >&5
20870 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20871                 fi
20872         fi
20873 fi
20874
20875 # If the C compiler did not declare bool, and we did not determine that the C++
20876 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20877 # ncurses library use the same type as C++ bool.  Note that this allows one to
20878 # specify the type of bool in a configure-script option and postpone
20879 # integration with the C++ compiler provided that the types are compatible.
20880 USE_CXX_BOOL=1
20881 if test $cf_cv_cc_bool_type = 1
20882 then
20883         # oops: C has a bool.  Unlikely, but C++ could differ.
20884         USE_CXX_BOOL=0
20885 elif test $cf_cv_builtin_bool = 0
20886 then
20887         # C++ has no bool
20888         USE_CXX_BOOL=0
20889 else
20890         # this is the normal case
20891         USE_CXX_BOOL='defined(__cplusplus)'
20892 fi
20893
20894 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20895
20896         if test "$cf_with_ada" != "no" ; then
20897                 if test "$with_libtool" != "no"; then
20898                         { echo "$as_me:20898: WARNING: libtool does not support Ada - disabling feature" >&5
20899 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20900                         cf_with_ada=no
20901                 fi
20902         fi
20903
20904         if test "$cf_with_ada" != "no" ; then
20905
20906 cf_ada_make=gnatmake
20907 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20908 set dummy $cf_ada_make; ac_word=$2
20909 echo "$as_me:20909: checking for $ac_word" >&5
20910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20911 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20912   echo $ECHO_N "(cached) $ECHO_C" >&6
20913 else
20914   if test -n "$gnat_exists"; then
20915   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20916 else
20917   ac_save_IFS=$IFS; IFS=$ac_path_separator
20918 ac_dummy="$PATH"
20919 for ac_dir in $ac_dummy; do
20920   IFS=$ac_save_IFS
20921   test -z "$ac_dir" && ac_dir=.
20922   $as_executable_p "$ac_dir/$ac_word" || continue
20923 ac_cv_prog_gnat_exists="yes"
20924 echo "$as_me:20924: found $ac_dir/$ac_word" >&5
20925 break
20926 done
20927
20928   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20929 fi
20930 fi
20931 gnat_exists=$ac_cv_prog_gnat_exists
20932 if test -n "$gnat_exists"; then
20933   echo "$as_me:20933: result: $gnat_exists" >&5
20934 echo "${ECHO_T}$gnat_exists" >&6
20935 else
20936   echo "$as_me:20936: result: no" >&5
20937 echo "${ECHO_T}no" >&6
20938 fi
20939
20940 if test "$ac_cv_prog_gnat_exists" = no; then
20941         cf_ada_make=
20942         cf_cv_prog_gnat_correct=no
20943 else
20944
20945 echo "$as_me:20945: checking for gnat version" >&5
20946 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20947 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20948         grep '[0-9].[0-9][0-9]*' |\
20949         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20950 echo "$as_me:20950: result: $cf_gnat_version" >&5
20951 echo "${ECHO_T}$cf_gnat_version" >&6
20952
20953 case $cf_gnat_version in
20954 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20955         cf_cv_prog_gnat_correct=yes
20956         ;;
20957 (*)
20958         { echo "$as_me:20958: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20959 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20960         cf_cv_prog_gnat_correct=no
20961         ;;
20962 esac
20963
20964         # Extract the first word of "m4", so it can be a program name with args.
20965 set dummy m4; ac_word=$2
20966 echo "$as_me:20966: checking for $ac_word" >&5
20967 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20968 if test "${ac_cv_prog_M4_exists+set}" = set; then
20969   echo $ECHO_N "(cached) $ECHO_C" >&6
20970 else
20971   if test -n "$M4_exists"; then
20972   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20973 else
20974   ac_save_IFS=$IFS; IFS=$ac_path_separator
20975 ac_dummy="$PATH"
20976 for ac_dir in $ac_dummy; do
20977   IFS=$ac_save_IFS
20978   test -z "$ac_dir" && ac_dir=.
20979   $as_executable_p "$ac_dir/$ac_word" || continue
20980 ac_cv_prog_M4_exists="yes"
20981 echo "$as_me:20981: found $ac_dir/$ac_word" >&5
20982 break
20983 done
20984
20985   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20986 fi
20987 fi
20988 M4_exists=$ac_cv_prog_M4_exists
20989 if test -n "$M4_exists"; then
20990   echo "$as_me:20990: result: $M4_exists" >&5
20991 echo "${ECHO_T}$M4_exists" >&6
20992 else
20993   echo "$as_me:20993: result: no" >&5
20994 echo "${ECHO_T}no" >&6
20995 fi
20996
20997         if test "$ac_cv_prog_M4_exists" = no; then
20998                 cf_cv_prog_gnat_correct=no
20999                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21000         fi
21001         if test "$cf_cv_prog_gnat_correct" = yes; then
21002                 echo "$as_me:21002: checking if GNAT works" >&5
21003 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21004
21005 rm -rf conftest* *~conftest*
21006 cat >>conftest.ads <<CF_EOF
21007 procedure conftest;
21008 CF_EOF
21009 cat >>conftest.adb <<CF_EOF
21010 with Text_IO;
21011 with GNAT.OS_Lib;
21012 procedure conftest is
21013 begin
21014    Text_IO.Put ("Hello World");
21015    Text_IO.New_Line;
21016    GNAT.OS_Lib.OS_Exit (0);
21017 end conftest;
21018 CF_EOF
21019 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21020    if ( ./conftest 1>&5 2>&1 ) ; then
21021       cf_cv_prog_gnat_correct=yes
21022    else
21023       cf_cv_prog_gnat_correct=no
21024    fi
21025 else
21026    cf_cv_prog_gnat_correct=no
21027 fi
21028 rm -rf conftest* *~conftest*
21029
21030                 echo "$as_me:21030: result: $cf_cv_prog_gnat_correct" >&5
21031 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21032         fi
21033 fi
21034
21035                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21036
21037         ADAFLAGS="$ADAFLAGS -gnatpn"
21038
21039         echo "$as_me:21039: checking optimization options for ADAFLAGS" >&5
21040 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21041         case "$CFLAGS" in
21042         (*-g*)
21043
21044         ADAFLAGS="$ADAFLAGS -g"
21045
21046                 ;;
21047         esac
21048         case "$CFLAGS" in
21049         (*-O*)
21050                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21051
21052         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21053
21054                 ;;
21055         esac
21056         echo "$as_me:21056: result: $ADAFLAGS" >&5
21057 echo "${ECHO_T}$ADAFLAGS" >&6
21058
21059 echo "$as_me:21059: checking if GNATPREP supports -T option" >&5
21060 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21061 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21062   echo $ECHO_N "(cached) $ECHO_C" >&6
21063 else
21064
21065 cf_cv_gnatprep_opt_t=no
21066 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21067
21068 fi
21069 echo "$as_me:21069: result: $cf_cv_gnatprep_opt_t" >&5
21070 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21071 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21072
21073 echo "$as_me:21073: checking if GNAT supports generics" >&5
21074 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21075 case $cf_gnat_version in
21076 (3.[1-9]*|[4-9].*)
21077         cf_gnat_generics=yes
21078         ;;
21079 (*)
21080         cf_gnat_generics=no
21081         ;;
21082 esac
21083 echo "$as_me:21083: result: $cf_gnat_generics" >&5
21084 echo "${ECHO_T}$cf_gnat_generics" >&6
21085
21086 if test "$cf_gnat_generics" = yes
21087 then
21088         cf_compile_generics=generics
21089         cf_generic_objects="\${GENOBJS}"
21090 else
21091         cf_compile_generics=
21092         cf_generic_objects=
21093 fi
21094
21095 echo "$as_me:21095: checking if GNAT supports SIGINT" >&5
21096 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21097 if test "${cf_cv_gnat_sigint+set}" = set; then
21098   echo $ECHO_N "(cached) $ECHO_C" >&6
21099 else
21100
21101 rm -rf conftest* *~conftest*
21102 cat >>conftest.ads <<CF_EOF
21103 with Ada.Interrupts.Names;
21104
21105 package ConfTest is
21106
21107    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21108    pragma Unreserve_All_Interrupts;
21109    pragma Warnings (On);
21110
21111    protected Process is
21112       procedure Stop;
21113       function Continue return Boolean;
21114       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21115    private
21116       Done : Boolean := False;
21117    end Process;
21118
21119 end ConfTest;
21120 CF_EOF
21121 cat >>conftest.adb <<CF_EOF
21122 package body ConfTest is
21123    protected body Process is
21124       procedure Stop is
21125       begin
21126          Done := True;
21127       end Stop;
21128       function Continue return Boolean is
21129       begin
21130          return not Done;
21131       end Continue;
21132    end Process;
21133 end ConfTest;
21134 CF_EOF
21135 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21136       cf_cv_gnat_sigint=yes
21137 else
21138    cf_cv_gnat_sigint=no
21139 fi
21140 rm -rf conftest* *~conftest*
21141
21142 fi
21143 echo "$as_me:21143: result: $cf_cv_gnat_sigint" >&5
21144 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21145
21146 if test $cf_cv_gnat_sigint = yes ; then
21147         USE_GNAT_SIGINT=""
21148 else
21149         USE_GNAT_SIGINT="#"
21150 fi
21151
21152 cf_gnat_libraries=no
21153 cf_gnat_projects=no
21154
21155 if test "$enable_gnat_projects" != no ; then
21156 echo "$as_me:21156: checking if GNAT supports project files" >&5
21157 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21158 case $cf_gnat_version in
21159 (3.[0-9]*)
21160         ;;
21161 (*)
21162         case $cf_cv_system_name in
21163         (cygwin*|msys*)
21164                 ;;
21165         (*)
21166                 mkdir conftest.src conftest.bin conftest.lib
21167                 cd conftest.src
21168                 rm -rf conftest* *~conftest*
21169                 cat >>library.gpr <<CF_EOF
21170 project Library is
21171   Kind := External ("LIB_KIND");
21172   for Library_Name use "ConfTest";
21173   for Object_Dir use ".";
21174   for Library_ALI_Dir use External("LIBRARY_DIR");
21175   for Library_Version use External ("SONAME");
21176   for Library_Kind use Kind;
21177   for Library_Dir use External("BUILD_DIR");
21178   Source_Dir := External ("SOURCE_DIR");
21179   for Source_Dirs use (Source_Dir);
21180 end Library;
21181 CF_EOF
21182                 cat >>confpackage.ads <<CF_EOF
21183 package ConfPackage is
21184    procedure conftest;
21185 end ConfPackage;
21186 CF_EOF
21187                 cat >>confpackage.adb <<CF_EOF
21188 with Text_IO;
21189 package body ConfPackage is
21190    procedure conftest is
21191    begin
21192       Text_IO.Put ("Hello World");
21193       Text_IO.New_Line;
21194    end conftest;
21195 end ConfPackage;
21196 CF_EOF
21197                 if ( $cf_ada_make $ADAFLAGS \
21198                                 -Plibrary.gpr \
21199                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21200                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21201                                 -XSOURCE_DIR=`pwd` \
21202                                 -XSONAME=libConfTest.so.1 \
21203                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21204                         cf_gnat_projects=yes
21205                 fi
21206                 cd ..
21207                 if test -f conftest.lib/confpackage.ali
21208                 then
21209                         cf_gnat_libraries=yes
21210                 fi
21211                 rm -rf conftest* *~conftest*
21212                 ;;
21213         esac
21214         ;;
21215 esac
21216 echo "$as_me:21216: result: $cf_gnat_projects" >&5
21217 echo "${ECHO_T}$cf_gnat_projects" >&6
21218 fi # enable_gnat_projects
21219
21220 if test $cf_gnat_projects = yes
21221 then
21222         echo "$as_me:21222: checking if GNAT supports libraries" >&5
21223 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21224         echo "$as_me:21224: result: $cf_gnat_libraries" >&5
21225 echo "${ECHO_T}$cf_gnat_libraries" >&6
21226 fi
21227
21228 if test "$cf_gnat_projects" = yes
21229 then
21230         USE_OLD_MAKERULES="#"
21231         USE_GNAT_PROJECTS=""
21232 else
21233         USE_OLD_MAKERULES=""
21234         USE_GNAT_PROJECTS="#"
21235 fi
21236
21237 if test "$cf_gnat_libraries" = yes
21238 then
21239         USE_GNAT_LIBRARIES=""
21240 else
21241         USE_GNAT_LIBRARIES="#"
21242 fi
21243
21244 echo "$as_me:21244: checking for ada-compiler" >&5
21245 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21246
21247 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21248 if test "${with_ada_compiler+set}" = set; then
21249   withval="$with_ada_compiler"
21250   cf_ada_compiler=$withval
21251 else
21252   cf_ada_compiler=gnatmake
21253 fi;
21254
21255 echo "$as_me:21255: result: $cf_ada_compiler" >&5
21256 echo "${ECHO_T}$cf_ada_compiler" >&6
21257
21258                         cf_ada_package=terminal_interface
21259
21260 echo "$as_me:21260: checking for ada-include" >&5
21261 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21262
21263 # Check whether --with-ada-include or --without-ada-include was given.
21264 if test "${with_ada_include+set}" = set; then
21265   withval="$with_ada_include"
21266
21267 else
21268   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21269 fi; if test -n "$prefix/share/ada/adainclude" ; then
21270
21271 if test "x$prefix" != xNONE; then
21272         cf_path_syntax="$prefix"
21273 else
21274         cf_path_syntax="$ac_default_prefix"
21275 fi
21276
21277 case ".$withval" in
21278 (.\$\(*\)*|.\'*\'*)
21279         ;;
21280 (..|./*|.\\*)
21281         ;;
21282 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21283         ;;
21284 (.\${*prefix}*|.\${*dir}*)
21285         eval withval="$withval"
21286         case ".$withval" in
21287         (.NONE/*)
21288                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21289                 ;;
21290         esac
21291         ;;
21292 (.no|.NONE/*)
21293         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21294         ;;
21295 (*)
21296         { { echo "$as_me:21296: error: expected a pathname, not \"$withval\"" >&5
21297 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21298    { (exit 1); exit 1; }; }
21299         ;;
21300 esac
21301
21302 fi
21303 eval ADA_INCLUDE="$withval"
21304
21305 echo "$as_me:21305: result: $ADA_INCLUDE" >&5
21306 echo "${ECHO_T}$ADA_INCLUDE" >&6
21307
21308 echo "$as_me:21308: checking for ada-objects" >&5
21309 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21310
21311 # Check whether --with-ada-objects or --without-ada-objects was given.
21312 if test "${with_ada_objects+set}" = set; then
21313   withval="$with_ada_objects"
21314
21315 else
21316   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21317 fi; if test -n "$prefix/lib/ada/adalib" ; then
21318
21319 if test "x$prefix" != xNONE; then
21320         cf_path_syntax="$prefix"
21321 else
21322         cf_path_syntax="$ac_default_prefix"
21323 fi
21324
21325 case ".$withval" in
21326 (.\$\(*\)*|.\'*\'*)
21327         ;;
21328 (..|./*|.\\*)
21329         ;;
21330 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21331         ;;
21332 (.\${*prefix}*|.\${*dir}*)
21333         eval withval="$withval"
21334         case ".$withval" in
21335         (.NONE/*)
21336                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21337                 ;;
21338         esac
21339         ;;
21340 (.no|.NONE/*)
21341         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21342         ;;
21343 (*)
21344         { { echo "$as_me:21344: error: expected a pathname, not \"$withval\"" >&5
21345 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21346    { (exit 1); exit 1; }; }
21347         ;;
21348 esac
21349
21350 fi
21351 eval ADA_OBJECTS="$withval"
21352
21353 echo "$as_me:21353: result: $ADA_OBJECTS" >&5
21354 echo "${ECHO_T}$ADA_OBJECTS" >&6
21355
21356 echo "$as_me:21356: checking if an Ada95 shared-library should be built" >&5
21357 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21358
21359 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21360 if test "${with_ada_sharedlib+set}" = set; then
21361   withval="$with_ada_sharedlib"
21362   with_ada_sharedlib=$withval
21363 else
21364   with_ada_sharedlib=no
21365 fi;
21366 echo "$as_me:21366: result: $with_ada_sharedlib" >&5
21367 echo "${ECHO_T}$with_ada_sharedlib" >&6
21368
21369 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21370 MAKE_ADA_SHAREDLIB="#"
21371
21372 if test "x$with_ada_sharedlib" != xno
21373 then
21374         MAKE_ADA_SHAREDLIB=
21375         if test "x$with_ada_sharedlib" != xyes
21376         then
21377                 ADA_SHAREDLIB="$with_ada_sharedlib"
21378         fi
21379 fi
21380
21381                 fi
21382         fi
21383 else
21384         cf_with_ada=no
21385 fi
21386
21387 # do this "late" to avoid conflict with header-checks
21388 if test "x$with_widec" = xyes ; then
21389         echo "$as_me:21389: checking for wchar_t" >&5
21390 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21391 if test "${ac_cv_type_wchar_t+set}" = set; then
21392   echo $ECHO_N "(cached) $ECHO_C" >&6
21393 else
21394   cat >conftest.$ac_ext <<_ACEOF
21395 #line 21395 "configure"
21396 #include "confdefs.h"
21397 $ac_includes_default
21398 int
21399 main ()
21400 {
21401 if ((wchar_t *) 0)
21402   return 0;
21403 if (sizeof (wchar_t))
21404   return 0;
21405   ;
21406   return 0;
21407 }
21408 _ACEOF
21409 rm -f conftest.$ac_objext
21410 if { (eval echo "$as_me:21410: \"$ac_compile\"") >&5
21411   (eval $ac_compile) 2>&5
21412   ac_status=$?
21413   echo "$as_me:21413: \$? = $ac_status" >&5
21414   (exit $ac_status); } &&
21415          { ac_try='test -s conftest.$ac_objext'
21416   { (eval echo "$as_me:21416: \"$ac_try\"") >&5
21417   (eval $ac_try) 2>&5
21418   ac_status=$?
21419   echo "$as_me:21419: \$? = $ac_status" >&5
21420   (exit $ac_status); }; }; then
21421   ac_cv_type_wchar_t=yes
21422 else
21423   echo "$as_me: failed program was:" >&5
21424 cat conftest.$ac_ext >&5
21425 ac_cv_type_wchar_t=no
21426 fi
21427 rm -f conftest.$ac_objext conftest.$ac_ext
21428 fi
21429 echo "$as_me:21429: result: $ac_cv_type_wchar_t" >&5
21430 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21431
21432 echo "$as_me:21432: checking size of wchar_t" >&5
21433 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21434 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21435   echo $ECHO_N "(cached) $ECHO_C" >&6
21436 else
21437   if test "$ac_cv_type_wchar_t" = yes; then
21438   if test "$cross_compiling" = yes; then
21439   # Depending upon the size, compute the lo and hi bounds.
21440 cat >conftest.$ac_ext <<_ACEOF
21441 #line 21441 "configure"
21442 #include "confdefs.h"
21443 $ac_includes_default
21444 int
21445 main ()
21446 {
21447 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21448   ;
21449   return 0;
21450 }
21451 _ACEOF
21452 rm -f conftest.$ac_objext
21453 if { (eval echo "$as_me:21453: \"$ac_compile\"") >&5
21454   (eval $ac_compile) 2>&5
21455   ac_status=$?
21456   echo "$as_me:21456: \$? = $ac_status" >&5
21457   (exit $ac_status); } &&
21458          { ac_try='test -s conftest.$ac_objext'
21459   { (eval echo "$as_me:21459: \"$ac_try\"") >&5
21460   (eval $ac_try) 2>&5
21461   ac_status=$?
21462   echo "$as_me:21462: \$? = $ac_status" >&5
21463   (exit $ac_status); }; }; then
21464   ac_lo=0 ac_mid=0
21465   while :; do
21466     cat >conftest.$ac_ext <<_ACEOF
21467 #line 21467 "configure"
21468 #include "confdefs.h"
21469 $ac_includes_default
21470 int
21471 main ()
21472 {
21473 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21474   ;
21475   return 0;
21476 }
21477 _ACEOF
21478 rm -f conftest.$ac_objext
21479 if { (eval echo "$as_me:21479: \"$ac_compile\"") >&5
21480   (eval $ac_compile) 2>&5
21481   ac_status=$?
21482   echo "$as_me:21482: \$? = $ac_status" >&5
21483   (exit $ac_status); } &&
21484          { ac_try='test -s conftest.$ac_objext'
21485   { (eval echo "$as_me:21485: \"$ac_try\"") >&5
21486   (eval $ac_try) 2>&5
21487   ac_status=$?
21488   echo "$as_me:21488: \$? = $ac_status" >&5
21489   (exit $ac_status); }; }; then
21490   ac_hi=$ac_mid; break
21491 else
21492   echo "$as_me: failed program was:" >&5
21493 cat conftest.$ac_ext >&5
21494 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21495 fi
21496 rm -f conftest.$ac_objext conftest.$ac_ext
21497   done
21498 else
21499   echo "$as_me: failed program was:" >&5
21500 cat conftest.$ac_ext >&5
21501 ac_hi=-1 ac_mid=-1
21502   while :; do
21503     cat >conftest.$ac_ext <<_ACEOF
21504 #line 21504 "configure"
21505 #include "confdefs.h"
21506 $ac_includes_default
21507 int
21508 main ()
21509 {
21510 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21511   ;
21512   return 0;
21513 }
21514 _ACEOF
21515 rm -f conftest.$ac_objext
21516 if { (eval echo "$as_me:21516: \"$ac_compile\"") >&5
21517   (eval $ac_compile) 2>&5
21518   ac_status=$?
21519   echo "$as_me:21519: \$? = $ac_status" >&5
21520   (exit $ac_status); } &&
21521          { ac_try='test -s conftest.$ac_objext'
21522   { (eval echo "$as_me:21522: \"$ac_try\"") >&5
21523   (eval $ac_try) 2>&5
21524   ac_status=$?
21525   echo "$as_me:21525: \$? = $ac_status" >&5
21526   (exit $ac_status); }; }; then
21527   ac_lo=$ac_mid; break
21528 else
21529   echo "$as_me: failed program was:" >&5
21530 cat conftest.$ac_ext >&5
21531 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21532 fi
21533 rm -f conftest.$ac_objext conftest.$ac_ext
21534   done
21535 fi
21536 rm -f conftest.$ac_objext conftest.$ac_ext
21537 # Binary search between lo and hi bounds.
21538 while test "x$ac_lo" != "x$ac_hi"; do
21539   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21540   cat >conftest.$ac_ext <<_ACEOF
21541 #line 21541 "configure"
21542 #include "confdefs.h"
21543 $ac_includes_default
21544 int
21545 main ()
21546 {
21547 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21548   ;
21549   return 0;
21550 }
21551 _ACEOF
21552 rm -f conftest.$ac_objext
21553 if { (eval echo "$as_me:21553: \"$ac_compile\"") >&5
21554   (eval $ac_compile) 2>&5
21555   ac_status=$?
21556   echo "$as_me:21556: \$? = $ac_status" >&5
21557   (exit $ac_status); } &&
21558          { ac_try='test -s conftest.$ac_objext'
21559   { (eval echo "$as_me:21559: \"$ac_try\"") >&5
21560   (eval $ac_try) 2>&5
21561   ac_status=$?
21562   echo "$as_me:21562: \$? = $ac_status" >&5
21563   (exit $ac_status); }; }; then
21564   ac_hi=$ac_mid
21565 else
21566   echo "$as_me: failed program was:" >&5
21567 cat conftest.$ac_ext >&5
21568 ac_lo=`expr $ac_mid + 1`
21569 fi
21570 rm -f conftest.$ac_objext conftest.$ac_ext
21571 done
21572 ac_cv_sizeof_wchar_t=$ac_lo
21573 else
21574   if test "$cross_compiling" = yes; then
21575   { { echo "$as_me:21575: error: cannot run test program while cross compiling" >&5
21576 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21577    { (exit 1); exit 1; }; }
21578 else
21579   cat >conftest.$ac_ext <<_ACEOF
21580 #line 21580 "configure"
21581 #include "confdefs.h"
21582 $ac_includes_default
21583 int
21584 main ()
21585 {
21586 FILE *f = fopen ("conftest.val", "w");
21587 if (!f)
21588   $ac_main_return (1);
21589 fprintf (f, "%d", (sizeof (wchar_t)));
21590 fclose (f);
21591   ;
21592   return 0;
21593 }
21594 _ACEOF
21595 rm -f conftest$ac_exeext
21596 if { (eval echo "$as_me:21596: \"$ac_link\"") >&5
21597   (eval $ac_link) 2>&5
21598   ac_status=$?
21599   echo "$as_me:21599: \$? = $ac_status" >&5
21600   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21601   { (eval echo "$as_me:21601: \"$ac_try\"") >&5
21602   (eval $ac_try) 2>&5
21603   ac_status=$?
21604   echo "$as_me:21604: \$? = $ac_status" >&5
21605   (exit $ac_status); }; }; then
21606   ac_cv_sizeof_wchar_t=`cat conftest.val`
21607 else
21608   echo "$as_me: program exited with status $ac_status" >&5
21609 echo "$as_me: failed program was:" >&5
21610 cat conftest.$ac_ext >&5
21611 fi
21612 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21613 fi
21614 fi
21615 rm -f conftest.val
21616 else
21617   ac_cv_sizeof_wchar_t=0
21618 fi
21619 fi
21620 echo "$as_me:21620: result: $ac_cv_sizeof_wchar_t" >&5
21621 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21622 cat >>confdefs.h <<EOF
21623 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21624 EOF
21625
21626 fi
21627
21628 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21629 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21630 ###
21631 ### ticlib modules may be a separate library, otherwise contained in termlib.
21632 ### termlib modules may be a separate library, otherwise contained in ncurses.
21633 ###
21634 ### The of "+" or " " between the tokens controls the way the script
21635 ### chooses to split module lists into libraries.
21636 ###
21637 ### (see CF_LIB_RULES).
21638 echo "$as_me:21638: checking for library subsets" >&5
21639 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21640 LIB_SUBSETS=
21641
21642 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21643         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21644         if test "$with_ticlib" != no ; then
21645                 LIB_SUBSETS="${LIB_SUBSETS} "
21646         else
21647                 LIB_SUBSETS="${LIB_SUBSETS}+"
21648         fi
21649 fi
21650
21651 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21652 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21653
21654 if test "$with_termlib" != no ; then
21655         LIB_SUBSETS="${LIB_SUBSETS} "
21656 else
21657         LIB_SUBSETS="${LIB_SUBSETS}+"
21658 fi
21659
21660 LIB_SUBSETS="${LIB_SUBSETS}base"
21661
21662 # Most term-driver calls are to tinfo, but some like init_pair are to the
21663 # base library (so it resides in base).
21664 if test "$with_term_driver" != no ; then
21665         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21666         case $cf_cv_system_name in
21667         (*mingw32*|*mingw64*)
21668                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21669                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21670                 ;;
21671         (*)
21672                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21673                 ;;
21674         esac
21675 fi
21676
21677 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21678 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21679
21680 echo "$as_me:21680: result: $LIB_SUBSETS" >&5
21681 echo "${ECHO_T}$LIB_SUBSETS" >&6
21682
21683 ### Construct the list of include-directories to be generated
21684
21685 if test "$srcdir" != "."; then
21686         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21687 fi
21688 CPPFLAGS="-I../include $CPPFLAGS"
21689 if test "$srcdir" != "."; then
21690         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21691 fi
21692 CPPFLAGS="-I. $CPPFLAGS"
21693
21694 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21695 if test "$srcdir" != "."; then
21696         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21697 fi
21698 if test "$GCC" != yes; then
21699         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21700 elif test "$includedir" != "/usr/include"; then
21701         if test "$includedir" = '${prefix}/include' ; then
21702                 if test x$prefix != x/usr ; then
21703                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21704                 fi
21705         else
21706                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21707         fi
21708 fi
21709
21710 ### Build up pieces for makefile rules
21711 echo "$as_me:21711: checking default library suffix" >&5
21712 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21713
21714         case $DFT_LWR_MODEL in
21715         (libtool) DFT_ARG_SUFFIX=''   ;;
21716         (normal)  DFT_ARG_SUFFIX=''   ;;
21717         (debug)   DFT_ARG_SUFFIX='_g' ;;
21718         (profile) DFT_ARG_SUFFIX='_p' ;;
21719         (shared)  DFT_ARG_SUFFIX=''   ;;
21720         esac
21721         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21722 echo "$as_me:21722: result: $DFT_ARG_SUFFIX" >&5
21723 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21724
21725 echo "$as_me:21725: checking default library-dependency suffix" >&5
21726 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21727
21728         case X$DFT_LWR_MODEL in
21729         (Xlibtool)
21730                 DFT_LIB_SUFFIX='.la'
21731                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21732                 ;;
21733         (Xdebug)
21734                 DFT_LIB_SUFFIX='_g.a'
21735                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21736                 ;;
21737         (Xprofile)
21738                 DFT_LIB_SUFFIX='_p.a'
21739                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21740                 ;;
21741         (Xshared)
21742                 case $cf_cv_system_name in
21743                 (aix[5-7]*)
21744                         DFT_LIB_SUFFIX='.so'
21745                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21746                         ;;
21747                 (cygwin*|msys*|mingw*)
21748                         DFT_LIB_SUFFIX='.dll'
21749                         DFT_DEP_SUFFIX='.dll.a'
21750                         ;;
21751                 (darwin*)
21752                         DFT_LIB_SUFFIX='.dylib'
21753                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21754                         ;;
21755                 (hpux*)
21756                         case $target in
21757                         (ia64*)
21758                                 DFT_LIB_SUFFIX='.so'
21759                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21760                                 ;;
21761                         (*)
21762                                 DFT_LIB_SUFFIX='.sl'
21763                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21764                                 ;;
21765                         esac
21766                         ;;
21767                 (*)
21768                         DFT_LIB_SUFFIX='.so'
21769                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21770                         ;;
21771                 esac
21772                 ;;
21773         (*)
21774                 DFT_LIB_SUFFIX='.a'
21775                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21776                 ;;
21777         esac
21778         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21779         then
21780                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21781                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21782         fi
21783 echo "$as_me:21783: result: $DFT_DEP_SUFFIX" >&5
21784 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21785
21786 echo "$as_me:21786: checking default object directory" >&5
21787 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21788
21789         case $DFT_LWR_MODEL in
21790         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21791         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21792         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21793         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21794         (shared)
21795                 case $cf_cv_system_name in
21796                 (cygwin|msys)
21797                         DFT_OBJ_SUBDIR='objects' ;;
21798                 (*)
21799                         DFT_OBJ_SUBDIR='obj_s' ;;
21800                 esac
21801         esac
21802 echo "$as_me:21802: result: $DFT_OBJ_SUBDIR" >&5
21803 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21804
21805 if test "x$cf_with_cxx" = xyes ; then
21806 echo "$as_me:21806: checking c++ library-dependency suffix" >&5
21807 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21808 if test "$with_libtool" != "no"; then
21809         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21810         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21811 elif test "$with_shared_cxx" != "no"; then
21812         # also for g++ users...
21813         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21814 else
21815         # we normally make a static library because C/C++ library rules differ
21816
21817         case Xnormal in
21818         (Xlibtool)
21819                 CXX_LIB_SUFFIX='.la'
21820                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21821                 ;;
21822         (Xdebug)
21823                 CXX_LIB_SUFFIX='_g.a'
21824                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21825                 ;;
21826         (Xprofile)
21827                 CXX_LIB_SUFFIX='_p.a'
21828                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21829                 ;;
21830         (Xshared)
21831                 case $cf_cv_system_name in
21832                 (aix[5-7]*)
21833                         CXX_LIB_SUFFIX='.so'
21834                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21835                         ;;
21836                 (cygwin*|msys*|mingw*)
21837                         CXX_LIB_SUFFIX='.dll'
21838                         CXX_DEP_SUFFIX='.dll.a'
21839                         ;;
21840                 (darwin*)
21841                         CXX_LIB_SUFFIX='.dylib'
21842                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21843                         ;;
21844                 (hpux*)
21845                         case $target in
21846                         (ia64*)
21847                                 CXX_LIB_SUFFIX='.so'
21848                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21849                                 ;;
21850                         (*)
21851                                 CXX_LIB_SUFFIX='.sl'
21852                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21853                                 ;;
21854                         esac
21855                         ;;
21856                 (*)
21857                         CXX_LIB_SUFFIX='.so'
21858                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21859                         ;;
21860                 esac
21861                 ;;
21862         (*)
21863                 CXX_LIB_SUFFIX='.a'
21864                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21865                 ;;
21866         esac
21867         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21868         then
21869                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21870                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21871         fi
21872
21873 fi
21874 echo "$as_me:21874: result: $CXX_LIB_SUFFIX" >&5
21875 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21876
21877 fi
21878
21879 # do not want -ldl in build except as needed for -lncurses dependency
21880 if test "x$with_dlsym" = xyes ; then
21881 if test $DFT_LWR_MODEL = shared || \
21882    test $DFT_LWR_MODEL = libtool ; then
21883
21884 # remove dl library from $LIBS
21885 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21886
21887 fi
21888 fi
21889 ### Set up low-level terminfo dependencies for makefiles.
21890
21891 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21892 # do not need libdl
21893 TICS_LIST=
21894 if test "x$with_dlsym" = xyes ; then
21895
21896 # remove dl library from $SHLIB_LIST
21897 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21898
21899 fi
21900
21901 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21902 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21903 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21904 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21905 then
21906         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21907 fi
21908
21909 if test "$with_ticlib" != no ; then
21910
21911         if test "x$with_ticlib" != xyes ; then
21912                 TICS_NAME=$with_ticlib
21913                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21914                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21915                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21916                 TICS_LIB_SUFFIX="${with_ticlib}"
21917         else
21918                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
21919                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21920                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21921                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21922         fi
21923         TICS_LDFLAGS="-L${LIB_DIR}"
21924         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
21925 else
21926         TICS_SUFFIX=${DFT_LIB_SUFFIX}
21927         TICS_LDFLAGS="-L${LIB_DIR}"
21928         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21929 fi
21930
21931 if test "$with_termlib" != no ; then
21932
21933         if test "x$with_termlib" != xyes ; then
21934                 TINFO_NAME=$with_termlib
21935                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21936                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21937                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21938                 TINFO_LIB_SUFFIX="${with_termlib}"
21939         else
21940                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21941                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21942                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21943                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21944         fi
21945
21946         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21947         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21948         if test "$DFT_LWR_MODEL" = "libtool"; then
21949                 TEST_ARGS="${TEST_DEPS}"
21950                 TEST_ARG2="${TEST_DEP2}"
21951                 TINFO_LDFLAGS="-L${LIB_DIR}"
21952                 TINFO_LIBS="$TEST_ARGS"
21953                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21954                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21955         else
21956                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21957                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21958                 if test "x$with_term_driver" != xno ; then
21959                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21960                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21961                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21962                 else
21963                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21964                         TINFO_LIBS="$TEST_ARGS"
21965                 fi
21966                 TINFO_LDFLAGS="-L${LIB_DIR}"
21967                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21968         fi
21969 else
21970         # the next lines are needed for linking libtic over libncurses
21971         TINFO_NAME=${LIB_NAME}
21972         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21973         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21974         if test "x$with_tic_depends" = xyes ; then
21975                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21976         else
21977                 TICS_LIST="$SHLIB_LIST"
21978         fi
21979
21980         TINFO_LDFLAGS="-L${LIB_DIR}"
21981         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21982 fi
21983
21984 if test "$DFT_LWR_MODEL" = shared ; then
21985         case $cf_cv_system_name in
21986         (cygwin*|msys*)
21987                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21988                 TINFO_SUFFIX=.dll
21989                 ;;
21990         esac
21991 fi
21992
21993 if test "x$with_dlsym" = xyes ; then
21994
21995 # remove dl library from $TICS_LIST
21996 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21997
21998 fi
21999
22000 if test "$DFT_LWR_MODEL" = "libtool"; then
22001         OBJEXT=lo
22002 fi
22003
22004 # needed for Ada95
22005 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22006
22007 case $DFT_LWR_MODEL in
22008 (normal|debug|profile)
22009
22010 if test "$GCC" = yes ; then
22011         case $cf_cv_system_name in
22012         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22013                 LDFLAGS_STATIC=
22014                 LDFLAGS_SHARED=
22015                 ;;
22016         (*)     # normally, except when broken
22017                 LDFLAGS_STATIC=-static
22018                 LDFLAGS_SHARED=-dynamic
22019                 ;;
22020         esac
22021 else
22022         case $cf_cv_system_name in
22023         (aix[4-7]*)     # from ld manpage
22024                 LDFLAGS_STATIC=-bstatic
22025                 LDFLAGS_SHARED=-bdynamic
22026                 ;;
22027         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22028                 # We could also use just "archive" and "shared".
22029                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22030                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22031                 ;;
22032         (irix*)         # from ld manpage IRIX64
22033                 LDFLAGS_STATIC=-Bstatic
22034                 LDFLAGS_SHARED=-Bdynamic
22035                 ;;
22036         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22037                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22038                 LDFLAGS_STATIC=-noso
22039                 LDFLAGS_SHARED=-so_archive
22040                 ;;
22041         (solaris2*)
22042                 LDFLAGS_STATIC=-Bstatic
22043                 LDFLAGS_SHARED=-Bdynamic
22044                 ;;
22045         esac
22046 fi
22047
22048 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22049 then
22050         echo "$as_me:22050: checking if linker supports switching between static/dynamic" >&5
22051 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22052
22053         rm -f libconftest.a
22054         cat >conftest.$ac_ext <<EOF
22055 #line 22055 "configure"
22056 #include <stdio.h>
22057 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22058 EOF
22059         if { (eval echo "$as_me:22059: \"$ac_compile\"") >&5
22060   (eval $ac_compile) 2>&5
22061   ac_status=$?
22062   echo "$as_me:22062: \$? = $ac_status" >&5
22063   (exit $ac_status); } ; then
22064                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22065                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22066         fi
22067         rm -f conftest.*
22068
22069         cf_save_LIBS="$LIBS"
22070
22071         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22072         cat >conftest.$ac_ext <<_ACEOF
22073 #line 22073 "configure"
22074 #include "confdefs.h"
22075
22076 #line 22076 "configure"
22077 #include <stdio.h>
22078 int cf_ldflags_static(FILE *fp);
22079
22080 int
22081 main ()
22082 {
22083
22084         return cf_ldflags_static(stdin);
22085
22086   ;
22087   return 0;
22088 }
22089 _ACEOF
22090 rm -f conftest.$ac_objext conftest$ac_exeext
22091 if { (eval echo "$as_me:22091: \"$ac_link\"") >&5
22092   (eval $ac_link) 2>&5
22093   ac_status=$?
22094   echo "$as_me:22094: \$? = $ac_status" >&5
22095   (exit $ac_status); } &&
22096          { ac_try='test -s conftest$ac_exeext'
22097   { (eval echo "$as_me:22097: \"$ac_try\"") >&5
22098   (eval $ac_try) 2>&5
22099   ac_status=$?
22100   echo "$as_me:22100: \$? = $ac_status" >&5
22101   (exit $ac_status); }; }; then
22102
22103         # some linkers simply ignore the -dynamic
22104         case x`file conftest$ac_exeext 2>/dev/null` in
22105         (*static*)
22106                 cf_ldflags_static=no
22107                 ;;
22108         (*)
22109                 cf_ldflags_static=yes
22110                 ;;
22111         esac
22112
22113 else
22114   echo "$as_me: failed program was:" >&5
22115 cat conftest.$ac_ext >&5
22116 cf_ldflags_static=no
22117 fi
22118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22119
22120         rm -f libconftest.*
22121         LIBS="$cf_save_LIBS"
22122
22123         echo "$as_me:22123: result: $cf_ldflags_static" >&5
22124 echo "${ECHO_T}$cf_ldflags_static" >&6
22125
22126         if test $cf_ldflags_static != yes
22127         then
22128                 LDFLAGS_STATIC=
22129                 LDFLAGS_SHARED=
22130         fi
22131 else
22132         LDFLAGS_STATIC=
22133         LDFLAGS_SHARED=
22134 fi
22135
22136         ;;
22137 esac
22138
22139 echo "$as_me:22139: checking where we will install curses.h" >&5
22140 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22141
22142 includesubdir=
22143 if test "$with_overwrite" = no && \
22144  ( test "x$includedir" = 'x${prefix}/include' || \
22145    test "x$includedir" = "x${prefix}/include" )
22146 then
22147         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22148 fi
22149 echo "$as_me:22149: result: ${includedir}${includesubdir}" >&5
22150 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22151
22152 ### Resolve a conflict between normal and wide-curses by forcing applications
22153 ### that will need libutf8 to add it to their configure script.
22154 if test "$with_overwrite" != no ; then
22155 if test "$NCURSES_LIBUTF8" = 1 ; then
22156         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22157         { echo "$as_me:22157: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22158 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22159 fi
22160 fi
22161 WITH_OVERWRITE=$with_overwrite
22162
22163 # used to separate tack out of the tree
22164 NCURSES_TREE=
22165
22166 ### predefined stuff for the test programs
22167
22168 cat >>confdefs.h <<\EOF
22169 #define HAVE_SLK_COLOR 1
22170 EOF
22171
22172 ### Construct the list of subdirectories for which we'll customize makefiles
22173 ### with the appropriate compile-rules.
22174
22175 echo "$as_me:22175: checking for src modules" >&5
22176 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22177
22178 # dependencies and linker-arguments for test-programs
22179 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22180 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22181 if test "$DFT_LWR_MODEL" = "libtool"; then
22182         TEST_ARGS="${TEST_DEPS}"
22183         TEST_ARG2="${TEST_DEP2}"
22184 else
22185         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22186         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22187 fi
22188
22189 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22190 cf_cv_src_modules=
22191 for cf_dir in $modules_to_build
22192 do
22193         if test -f $srcdir/$cf_dir/modules; then
22194
22195                 # We may/may not have tack in the distribution, though the
22196                 # makefile is.
22197                 if test $cf_dir = tack ; then
22198                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22199                                 continue
22200                         fi
22201                 fi
22202
22203                 if test -z "$cf_cv_src_modules"; then
22204                         cf_cv_src_modules=$cf_dir
22205                 else
22206                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22207                 fi
22208
22209                 # Make the ncurses_cfg.h file record the library interface files as
22210                 # well.  These are header files that are the same name as their
22211                 # directory.  Ncurses is the only library that does not follow
22212                 # that pattern.
22213                 if test $cf_dir = tack ; then
22214                         continue
22215                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22216
22217 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22218
22219                         cat >>confdefs.h <<EOF
22220 #define HAVE_${cf_have_include}_H 1
22221 EOF
22222
22223                         cat >>confdefs.h <<EOF
22224 #define HAVE_LIB${cf_have_include} 1
22225 EOF
22226
22227                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22228                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22229                         if test "$DFT_LWR_MODEL" = "libtool"; then
22230                                 TEST_ARGS="${TEST_DEPS}"
22231                                 TEST_ARG2="${TEST_DEP2}"
22232                         else
22233                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22234                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22235                         fi
22236                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22237                 fi
22238         fi
22239 done
22240 echo "$as_me:22240: result: $cf_cv_src_modules" >&5
22241 echo "${ECHO_T}$cf_cv_src_modules" >&6
22242
22243 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22244 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22245
22246 SRC_SUBDIRS=
22247 if test "x$cf_with_manpages" != xno ; then
22248         SRC_SUBDIRS="$SRC_SUBDIRS man"
22249 fi
22250 SRC_SUBDIRS="$SRC_SUBDIRS include"
22251 for cf_dir in $cf_cv_src_modules
22252 do
22253         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22254 done
22255 if test "x$cf_with_tests" != "xno" ; then
22256         SRC_SUBDIRS="$SRC_SUBDIRS test"
22257 fi
22258 # always make this, to install the ncurses-config script
22259 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22260 if test "$cf_with_cxx_binding" != no; then
22261         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22262         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22263 fi
22264
22265 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22266 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22267
22268 ADA_SUBDIRS=
22269 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22270         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22271         ADA_SUBDIRS="gen src"
22272         if test "x$cf_with_tests" != "xno" ; then
22273                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22274         fi
22275 fi
22276
22277 SUB_MAKEFILES=
22278 for cf_dir in $SRC_SUBDIRS
22279 do
22280         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22281 done
22282
22283 if test -n "$ADA_SUBDIRS"; then
22284         for cf_dir in $ADA_SUBDIRS
22285         do
22286                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22287         done
22288
22289 fi
22290
22291 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22292    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22293    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22294 fi
22295
22296 DIRS_TO_MAKE="lib"
22297 for cf_item in $cf_list_models
22298 do
22299
22300         case $cf_item in
22301         (libtool) cf_subdir='obj_lo'  ;;
22302         (normal)  cf_subdir='objects' ;;
22303         (debug)   cf_subdir='obj_g' ;;
22304         (profile) cf_subdir='obj_p' ;;
22305         (shared)
22306                 case $cf_cv_system_name in
22307                 (cygwin|msys)
22308                         cf_subdir='objects' ;;
22309                 (*)
22310                         cf_subdir='obj_s' ;;
22311                 esac
22312         esac
22313
22314         for cf_item2 in $DIRS_TO_MAKE
22315         do
22316                 test $cf_item2 = $cf_subdir && break
22317         done
22318         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22319 done
22320 for cf_dir in $DIRS_TO_MAKE
22321 do
22322         test ! -d $cf_dir && mkdir $cf_dir
22323 done
22324
22325 # symbols that differ when compiling Ada95 by itself.
22326 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22327
22328 # values to use as strings
22329
22330 cat >>confdefs.h <<EOF
22331 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22332 EOF
22333
22334 cat >>confdefs.h <<EOF
22335 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22336 EOF
22337
22338 ### Now that we're done running tests, add the compiler-warnings, if any
22339
22340 cf_fix_cppflags=no
22341 cf_new_cflags=
22342 cf_new_cppflags=
22343 cf_new_extra_cppflags=
22344
22345 for cf_add_cflags in $EXTRA_CFLAGS
22346 do
22347 case $cf_fix_cppflags in
22348 (no)
22349         case $cf_add_cflags in
22350         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22351                 case $cf_add_cflags in
22352                 (-D*)
22353                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22354
22355                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22356                                 && test -z "${cf_tst_cflags}" \
22357                                 && cf_fix_cppflags=yes
22358
22359                         if test $cf_fix_cppflags = yes ; then
22360                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22361                                 continue
22362                         elif test "${cf_tst_cflags}" = "\"'" ; then
22363                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22364                                 continue
22365                         fi
22366                         ;;
22367                 esac
22368                 case "$CPPFLAGS" in
22369                 (*$cf_add_cflags)
22370                         ;;
22371                 (*)
22372                         case $cf_add_cflags in
22373                         (-D*)
22374                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22375
22376 CPPFLAGS=`echo "$CPPFLAGS" | \
22377         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22378                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22379
22380                                 ;;
22381                         esac
22382                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22383                         ;;
22384                 esac
22385                 ;;
22386         (*)
22387                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22388                 ;;
22389         esac
22390         ;;
22391 (yes)
22392         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22393
22394         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22395
22396         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22397                 && test -z "${cf_tst_cflags}" \
22398                 && cf_fix_cppflags=no
22399         ;;
22400 esac
22401 done
22402
22403 if test -n "$cf_new_cflags" ; then
22404
22405         CFLAGS="$CFLAGS $cf_new_cflags"
22406 fi
22407
22408 if test -n "$cf_new_cppflags" ; then
22409
22410         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22411 fi
22412
22413 if test -n "$cf_new_extra_cppflags" ; then
22414
22415         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22416 fi
22417
22418 ### Define substitutions for header files to avoid name-pollution
22419
22420 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22421         HAVE_TCGETATTR=1
22422 else
22423         HAVE_TCGETATTR=0
22424 fi
22425
22426 if test "x$ac_cv_header_stdint_h" = xyes ; then
22427         HAVE_STDINT_H=1
22428 else
22429         HAVE_STDINT_H=0
22430 fi
22431
22432 if test "x$ac_cv_header_termio_h" = xyes ; then
22433         HAVE_TERMIO_H=1
22434 else
22435         HAVE_TERMIO_H=0
22436 fi
22437
22438 if test "x$ac_cv_header_termios_h" = xyes ; then
22439         HAVE_TERMIOS_H=1
22440 else
22441         HAVE_TERMIOS_H=0
22442 fi
22443
22444 ################################################################################
22445 test "x$use_database" = xyes && \
22446 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22447
22448 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22449 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22450
22451 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22452 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22453 fi
22454
22455 # Extract the first word of "tic", so it can be a program name with args.
22456 set dummy tic; ac_word=$2
22457 echo "$as_me:22457: checking for $ac_word" >&5
22458 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22459 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22460   echo $ECHO_N "(cached) $ECHO_C" >&6
22461 else
22462   case $TIC_PATH in
22463   [\\/]* | ?:[\\/]*)
22464   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22465   ;;
22466   *)
22467   ac_save_IFS=$IFS; IFS=$ac_path_separator
22468 ac_dummy="$PATH:/usr/local/ncurses/bin"
22469 for ac_dir in $ac_dummy; do
22470   IFS=$ac_save_IFS
22471   test -z "$ac_dir" && ac_dir=.
22472   if $as_executable_p "$ac_dir/$ac_word"; then
22473    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22474    echo "$as_me:22474: found $ac_dir/$ac_word" >&5
22475    break
22476 fi
22477 done
22478
22479   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22480   ;;
22481 esac
22482 fi
22483 TIC_PATH=$ac_cv_path_TIC_PATH
22484
22485 if test -n "$TIC_PATH"; then
22486   echo "$as_me:22486: result: $TIC_PATH" >&5
22487 echo "${ECHO_T}$TIC_PATH" >&6
22488 else
22489   echo "$as_me:22489: result: no" >&5
22490 echo "${ECHO_T}no" >&6
22491 fi
22492
22493 if test -n "$FALLBACK_LIST"
22494 then
22495         if test "$TIC_PATH" = unknown
22496         then
22497                 { echo "$as_me:22497: WARNING: no tic program found for fallbacks" >&5
22498 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22499         fi
22500 fi
22501
22502 if test "x$cf_with_tests" != xno ; then
22503         MAKE_TESTS=
22504 else
22505         MAKE_TESTS="#"
22506 fi
22507
22508 ADAHTML_DIR=../../doc/html/ada
22509
22510 # these could be configurable, but are not currently
22511 PANEL_NAME=panel
22512 MENU_NAME=menu
22513 FORM_NAME=form
22514 CXX_NAME=ncurses++
22515
22516 # workaround for OS/2 (20151017)
22517 case $cf_cv_system_name in
22518 (os2*)
22519         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22520         ;;
22521 (*)
22522         LIBTOOL_OPTS_CXX=
22523         ;;
22524 esac
22525
22526 # workaround for g++ versus Solaris (20131116)
22527 case $cf_cv_system_name in
22528 (solaris2*)
22529         case "x$CPPFLAGS" in
22530         (*-D_XOPEN_SOURCE_EXTENDED*)
22531                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22532
22533 echo "${as_me:-configure}:22533: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22534
22535                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22536                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22537                 ;;
22538         esac
22539         ;;
22540 esac
22541
22542 # Help to automatically enable the extended curses features when using either
22543 # the *-config or the ".pc" files by adding defines.
22544 echo "$as_me:22544: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22545 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22546 PKG_CFLAGS=
22547 for cf_loop1 in $CPPFLAGS_after_XOPEN
22548 do
22549         cf_found=no
22550         for cf_loop2 in $CPPFLAGS_before_XOPEN
22551         do
22552                 if test "x$cf_loop1" = "x$cf_loop2"
22553                 then
22554                         cf_found=yes
22555                         break
22556                 fi
22557         done
22558         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22559 done
22560 echo "$as_me:22560: result: $PKG_CFLAGS" >&5
22561 echo "${ECHO_T}$PKG_CFLAGS" >&6
22562
22563 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22564 case "x$NCURSES_OSPEED" in
22565 (*short*)
22566         cf_compatible=1
22567         ;;
22568 (*)
22569         cf_compatible=0
22570         ;;
22571 esac
22572
22573 cat >>confdefs.h <<EOF
22574 #define NCURSES_OSPEED_COMPAT $cf_compatible
22575 EOF
22576
22577 case "x$cf_cv_typeof_chtype" in
22578 (xshort|xint|xlong)
22579         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22580         ;;
22581 esac
22582
22583 case "x$cf_cv_typeof_mmask_t" in
22584 (xshort|xint|xlong)
22585         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22586         ;;
22587 esac
22588
22589 # substitute into misc/Makefile to suppress
22590 # (un)install.data from the
22591 # (un)install rules.
22592 if test "x$cf_with_db_install" = "xno"; then
22593         MISC_INSTALL_DATA=
22594         MISC_UNINSTALL_DATA=
22595 else
22596         MISC_INSTALL_DATA=install.data
22597         MISC_UNINSTALL_DATA=uninstall.data
22598 fi
22599
22600 SUB_SCRIPTS=
22601
22602 if test -n "$PACKAGE"
22603 then
22604         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22605         export PACKAGE
22606         echo "package: $PACKAGE"
22607 fi
22608
22609 UNALTERED_SYMS=
22610 cf_filter_syms=no
22611
22612 if test -n "$RESULTING_SYMS"
22613 then
22614         cf_filter_syms=$cf_dft_filter_syms
22615         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22616
22617 echo "${as_me:-configure}:22617: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22618
22619 fi
22620
22621 if test "x$WILDCARD_SYMS" = xno
22622 then
22623         cf_filter_syms=yes
22624 fi
22625
22626 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
22627
22628 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22629 if test $cf_filter_syms = yes
22630 then
22631         RESULTING_SYMS=resulting.map
22632 fi
22633
22634 if test "x$cross_compiling" = xyes ; then
22635         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22636 else
22637         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22638 fi
22639
22640 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"
22641 ac_config_commands="$ac_config_commands default"
22642 cat >confcache <<\_ACEOF
22643 # This file is a shell script that caches the results of configure
22644 # tests run on this system so they can be shared between configure
22645 # scripts and configure runs, see configure's option --config-cache.
22646 # It is not useful on other systems.  If it contains results you don't
22647 # want to keep, you may remove or edit it.
22648 #
22649 # config.status only pays attention to the cache file if you give it
22650 # the --recheck option to rerun configure.
22651 #
22652 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22653 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22654 # following values.
22655
22656 _ACEOF
22657
22658 # The following way of writing the cache mishandles newlines in values,
22659 # but we know of no workaround that is simple, portable, and efficient.
22660 # So, don't put newlines in cache variables' values.
22661 # Ultrix sh set writes to stderr and can't be redirected directly,
22662 # and sets the high bit in the cache file unless we assign to the vars.
22663 {
22664   (set) 2>&1 |
22665     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22666     *ac_space=\ *)
22667       # `set' does not quote correctly, so add quotes (double-quote
22668       # substitution turns \\\\ into \\, and sed turns \\ into \).
22669       sed -n \
22670         "s/'/'\\\\''/g;
22671           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22672       ;;
22673     *)
22674       # `set' quotes correctly as required by POSIX, so do not add quotes.
22675       sed -n \
22676         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22677       ;;
22678     esac;
22679 } |
22680   sed '
22681      t clear
22682      : clear
22683      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22684      t end
22685      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22686      : end' >>confcache
22687 if cmp -s $cache_file confcache; then :; else
22688   if test -w $cache_file; then
22689     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22690     cat confcache >$cache_file
22691   else
22692     echo "not updating unwritable cache $cache_file"
22693   fi
22694 fi
22695 rm -f confcache
22696
22697 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22698 # Let make expand exec_prefix.
22699 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22700
22701 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22702 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22703 # trailing colons and then remove the whole line if VPATH becomes empty
22704 # (actually we leave an empty line to preserve line numbers).
22705 if test "x$srcdir" = x.; then
22706   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22707 s/:*\$(srcdir):*/:/;
22708 s/:*\${srcdir}:*/:/;
22709 s/:*@srcdir@:*/:/;
22710 s/^\([^=]*=[    ]*\):*/\1/;
22711 s/:*$//;
22712 s/^[^=]*=[      ]*$//;
22713 }'
22714 fi
22715
22716 DEFS=-DHAVE_CONFIG_H
22717
22718 : ${CONFIG_STATUS=./config.status}
22719 ac_clean_files_save=$ac_clean_files
22720 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22721 { echo "$as_me:22721: creating $CONFIG_STATUS" >&5
22722 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22723 cat >$CONFIG_STATUS <<_ACEOF
22724 #! $SHELL
22725 # Generated automatically by configure.
22726 # Run this file to recreate the current configuration.
22727 # Compiler output produced by configure, useful for debugging
22728 # configure, is in config.log if it exists.
22729
22730 debug=false
22731 SHELL=\${CONFIG_SHELL-$SHELL}
22732 ac_cs_invocation="\$0 \$@"
22733
22734 _ACEOF
22735
22736 cat >>$CONFIG_STATUS <<\_ACEOF
22737 # Be Bourne compatible
22738 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22739   emulate sh
22740   NULLCMD=:
22741 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22742   set -o posix
22743 fi
22744
22745 # Name of the executable.
22746 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22747
22748 if expr a : '\(a\)' >/dev/null 2>&1; then
22749   as_expr=expr
22750 else
22751   as_expr=false
22752 fi
22753
22754 rm -f conf$$ conf$$.exe conf$$.file
22755 echo >conf$$.file
22756 if ln -s conf$$.file conf$$ 2>/dev/null; then
22757   # We could just check for DJGPP; but this test a) works b) is more generic
22758   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22759   if test -f conf$$.exe; then
22760     # Don't use ln at all; we don't have any links
22761     as_ln_s='cp -p'
22762   else
22763     as_ln_s='ln -s'
22764   fi
22765 elif ln conf$$.file conf$$ 2>/dev/null; then
22766   as_ln_s=ln
22767 else
22768   as_ln_s='cp -p'
22769 fi
22770 rm -f conf$$ conf$$.exe conf$$.file
22771
22772 as_executable_p="test -f"
22773
22774 # Support unset when possible.
22775 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22776   as_unset=unset
22777 else
22778   as_unset=false
22779 fi
22780
22781 # NLS nuisances.
22782 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22783 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22784 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22785 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22786 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22787 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22788 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22789 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22790
22791 # IFS
22792 # We need space, tab and new line, in precisely that order.
22793 as_nl='
22794 '
22795 IFS="   $as_nl"
22796
22797 # CDPATH.
22798 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22799
22800 exec 6>&1
22801
22802 _ACEOF
22803
22804 # Files that config.status was made for.
22805 if test -n "$ac_config_files"; then
22806   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22807 fi
22808
22809 if test -n "$ac_config_headers"; then
22810   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22811 fi
22812
22813 if test -n "$ac_config_links"; then
22814   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22815 fi
22816
22817 if test -n "$ac_config_commands"; then
22818   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22819 fi
22820
22821 cat >>$CONFIG_STATUS <<\EOF
22822
22823 ac_cs_usage="\
22824 \`$as_me' instantiates files from templates according to the
22825 current configuration.
22826
22827 Usage: $0 [OPTIONS] [FILE]...
22828
22829   -h, --help       print this help, then exit
22830   -V, --version    print version number, then exit
22831   -d, --debug      don't remove temporary files
22832       --recheck    update $as_me by reconfiguring in the same conditions
22833   --file=FILE[:TEMPLATE]
22834                    instantiate the configuration file FILE
22835   --header=FILE[:TEMPLATE]
22836                    instantiate the configuration header FILE
22837
22838 Configuration files:
22839 $config_files
22840
22841 Configuration headers:
22842 $config_headers
22843
22844 Configuration commands:
22845 $config_commands
22846
22847 Report bugs to <dickey@invisible-island.net>."
22848 EOF
22849
22850 cat >>$CONFIG_STATUS <<EOF
22851 ac_cs_version="\\
22852 config.status
22853 configured by $0, generated by GNU Autoconf 2.52.20150926,
22854   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22855
22856 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22857 Free Software Foundation, Inc.
22858 This config.status script is free software; the Free Software Foundation
22859 gives unlimited permission to copy, distribute and modify it."
22860 srcdir=$srcdir
22861 INSTALL="$INSTALL"
22862 EOF
22863
22864 cat >>$CONFIG_STATUS <<\EOF
22865 # If no file are specified by the user, then we need to provide default
22866 # value.  By we need to know if files were specified by the user.
22867 ac_need_defaults=:
22868 while test $# != 0
22869 do
22870   case $1 in
22871   --*=*)
22872     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22873     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22874     shift
22875     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22876     shift
22877     ;;
22878   -*);;
22879   *) # This is not an option, so the user has probably given explicit
22880      # arguments.
22881      ac_need_defaults=false;;
22882   esac
22883
22884   case $1 in
22885   # Handling of the options.
22886 EOF
22887 cat >>$CONFIG_STATUS <<EOF
22888   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22889     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22890     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22891 EOF
22892 cat >>$CONFIG_STATUS <<\EOF
22893   --version | --vers* | -V )
22894     echo "$ac_cs_version"; exit 0 ;;
22895   --he | --h)
22896     # Conflict between --help and --header
22897     { { echo "$as_me:22897: error: ambiguous option: $1
22898 Try \`$0 --help' for more information." >&5
22899 echo "$as_me: error: ambiguous option: $1
22900 Try \`$0 --help' for more information." >&2;}
22901    { (exit 1); exit 1; }; };;
22902   --help | --hel | -h )
22903     echo "$ac_cs_usage"; exit 0 ;;
22904   --debug | --d* | -d )
22905     debug=: ;;
22906   --file | --fil | --fi | --f )
22907     shift
22908     CONFIG_FILES="$CONFIG_FILES $1"
22909     ac_need_defaults=false;;
22910   --header | --heade | --head | --hea )
22911     shift
22912     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22913     ac_need_defaults=false;;
22914
22915   # This is an error.
22916   -*) { { echo "$as_me:22916: error: unrecognized option: $1
22917 Try \`$0 --help' for more information." >&5
22918 echo "$as_me: error: unrecognized option: $1
22919 Try \`$0 --help' for more information." >&2;}
22920    { (exit 1); exit 1; }; } ;;
22921
22922   *) ac_config_targets="$ac_config_targets $1" ;;
22923
22924   esac
22925   shift
22926 done
22927
22928 exec 5>>config.log
22929 cat >&5 << _ACEOF
22930
22931 ## ----------------------- ##
22932 ## Running config.status.  ##
22933 ## ----------------------- ##
22934
22935 This file was extended by $as_me 2.52.20150926, executed with
22936   CONFIG_FILES    = $CONFIG_FILES
22937   CONFIG_HEADERS  = $CONFIG_HEADERS
22938   CONFIG_LINKS    = $CONFIG_LINKS
22939   CONFIG_COMMANDS = $CONFIG_COMMANDS
22940   > $ac_cs_invocation
22941 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22942
22943 _ACEOF
22944 EOF
22945
22946 cat >>$CONFIG_STATUS <<EOF
22947 #
22948 # INIT-COMMANDS section.
22949 #
22950
22951 ### Special initialization commands, used to pass information from the
22952 ### configuration-run into config.status
22953
22954 AWK="$AWK"
22955 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22956 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22957 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22958 ECHO_LD="$ECHO_LD"
22959 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22960 LDCONFIG="$LDCONFIG"
22961 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22962 LIB_NAME="$LIB_NAME"
22963 LIB_PREFIX="$LIB_PREFIX"
22964 LIB_SUBSETS="$LIB_SUBSETS"
22965 LIB_SUFFIX="$LIB_SUFFIX"
22966 LIB_TRACING="$LIB_TRACING"
22967 LN_S="$LN_S"
22968 MAKE_TERMINFO="$MAKE_TERMINFO"
22969 NCURSES_MAJOR="$NCURSES_MAJOR"
22970 NCURSES_MINOR="$NCURSES_MINOR"
22971 NCURSES_OSPEED="$NCURSES_OSPEED"
22972 NCURSES_PATCH="$NCURSES_PATCH"
22973 SRC_SUBDIRS="$SRC_SUBDIRS"
22974 TERMINFO="$TERMINFO"
22975 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22976 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22977 TICS_NAME="$TICS_NAME"
22978 TICS_SUFFIX="$TICS_SUFFIX"
22979 TIC_PATH="$TIC_PATH"
22980 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22981 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22982 TINFO_NAME="$TINFO_NAME"
22983 TINFO_SUFFIX="$TINFO_SUFFIX"
22984 UNALTERED_SYMS="$UNALTERED_SYMS"
22985 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22986 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22987 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22988 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22989 WILDCARD_SYMS="$WILDCARD_SYMS"
22990 WITH_CURSES_H="$with_curses_h"
22991 WITH_ECHO="${enable_echo:=yes}"
22992 WITH_OVERWRITE="$with_overwrite"
22993 cf_LIST_MODELS="$cf_list_models"
22994 cf_cv_abi_version="$cf_cv_abi_version"
22995 cf_cv_do_relink="$cf_cv_do_relink"
22996 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22997 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22998 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22999 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23000 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23001 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23002 cf_cv_rel_version="$cf_cv_rel_version"
23003 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23004 cf_cv_shared_soname='$cf_cv_shared_soname'
23005 cf_cv_shlib_version="$cf_cv_shlib_version"
23006 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23007 cf_cv_system_name="$cf_cv_system_name"
23008 cf_cv_term_driver="$with_term_driver"
23009 cf_with_ada="$cf_with_ada"
23010 cf_with_cxx_binding="$cf_with_cxx_binding"
23011 cf_with_db_install="$cf_with_db_install"
23012 cf_with_manpages="$cf_with_manpages"
23013 cf_with_tests="$cf_with_tests"
23014 host="$host"
23015 target="$target"
23016 with_shared_cxx="$with_shared_cxx"
23017
23018 EOF
23019
23020 cat >>$CONFIG_STATUS <<\EOF
23021 for ac_config_target in $ac_config_targets
23022 do
23023   case "$ac_config_target" in
23024   # Handling of arguments.
23025   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23026   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23027   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23028   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23029   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23030   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23031   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23032   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23033   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23034   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23035   *) { { echo "$as_me:23035: error: invalid argument: $ac_config_target" >&5
23036 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23037    { (exit 1); exit 1; }; };;
23038   esac
23039 done
23040
23041 # If the user did not use the arguments to specify the items to instantiate,
23042 # then the envvar interface is used.  Set only those that are not.
23043 # We use the long form for the default assignment because of an extremely
23044 # bizarre bug on SunOS 4.1.3.
23045 if $ac_need_defaults; then
23046   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23047   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23048   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23049 fi
23050
23051 # Create a temporary directory, and hook for its removal unless debugging.
23052 $debug ||
23053 {
23054   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23055   trap '{ (exit 1); exit 1; }' 1 2 13 15
23056 }
23057
23058 # Create a (secure) tmp directory for tmp files.
23059 : ${TMPDIR=/tmp}
23060 {
23061   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23062   test -n "$tmp" && test -d "$tmp"
23063 }  ||
23064 {
23065   tmp=$TMPDIR/cs$$-$RANDOM
23066   (umask 077 && mkdir $tmp)
23067 } ||
23068 {
23069    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23070    { (exit 1); exit 1; }
23071 }
23072
23073 EOF
23074
23075 cat >>$CONFIG_STATUS <<EOF
23076
23077 #
23078 # CONFIG_FILES section.
23079 #
23080
23081 # No need to generate the scripts if there are no CONFIG_FILES.
23082 # This happens for instance when ./config.status config.h
23083 if test -n "\$CONFIG_FILES"; then
23084   # Protect against being on the right side of a sed subst in config.status.
23085   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23086    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23087 s,@SHELL@,$SHELL,;t t
23088 s,@exec_prefix@,$exec_prefix,;t t
23089 s,@prefix@,$prefix,;t t
23090 s,@program_transform_name@,$program_transform_name,;t t
23091 s,@bindir@,$bindir,;t t
23092 s,@sbindir@,$sbindir,;t t
23093 s,@libexecdir@,$libexecdir,;t t
23094 s,@datarootdir@,$datarootdir,;t t
23095 s,@datadir@,$datadir,;t t
23096 s,@sysconfdir@,$sysconfdir,;t t
23097 s,@sharedstatedir@,$sharedstatedir,;t t
23098 s,@localstatedir@,$localstatedir,;t t
23099 s,@libdir@,$libdir,;t t
23100 s,@includedir@,$includedir,;t t
23101 s,@oldincludedir@,$oldincludedir,;t t
23102 s,@infodir@,$infodir,;t t
23103 s,@mandir@,$mandir,;t t
23104 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23105 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23106 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23107 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23108 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23109 s,@build_alias@,$build_alias,;t t
23110 s,@host_alias@,$host_alias,;t t
23111 s,@target_alias@,$target_alias,;t t
23112 s,@ECHO_C@,$ECHO_C,;t t
23113 s,@ECHO_N@,$ECHO_N,;t t
23114 s,@ECHO_T@,$ECHO_T,;t t
23115 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23116 s,@DEFS@,$DEFS,;t t
23117 s,@LIBS@,$LIBS,;t t
23118 s,@top_builddir@,$top_builddir,;t t
23119 s,@EGREP@,$EGREP,;t t
23120 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23121 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23122 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23123 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23124 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23125 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23126 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23127 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23128 s,@VERSION@,$VERSION,;t t
23129 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23130 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23131 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23132 s,@PACKAGE@,$PACKAGE,;t t
23133 s,@build@,$build,;t t
23134 s,@build_cpu@,$build_cpu,;t t
23135 s,@build_vendor@,$build_vendor,;t t
23136 s,@build_os@,$build_os,;t t
23137 s,@host@,$host,;t t
23138 s,@host_cpu@,$host_cpu,;t t
23139 s,@host_vendor@,$host_vendor,;t t
23140 s,@host_os@,$host_os,;t t
23141 s,@target@,$target,;t t
23142 s,@target_cpu@,$target_cpu,;t t
23143 s,@target_vendor@,$target_vendor,;t t
23144 s,@target_os@,$target_os,;t t
23145 s,@CC@,$CC,;t t
23146 s,@CFLAGS@,$CFLAGS,;t t
23147 s,@LDFLAGS@,$LDFLAGS,;t t
23148 s,@CPPFLAGS@,$CPPFLAGS,;t t
23149 s,@ac_ct_CC@,$ac_ct_CC,;t t
23150 s,@EXEEXT@,$EXEEXT,;t t
23151 s,@OBJEXT@,$OBJEXT,;t t
23152 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23153 s,@CPP@,$CPP,;t t
23154 s,@LDCONFIG@,$LDCONFIG,;t t
23155 s,@CXX@,$CXX,;t t
23156 s,@CXXFLAGS@,$CXXFLAGS,;t t
23157 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23158 s,@AWK@,$AWK,;t t
23159 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23160 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23161 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23162 s,@LINT@,$LINT,;t t
23163 s,@LINT_OPTS@,$LINT_OPTS,;t t
23164 s,@LN_S@,$LN_S,;t t
23165 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23166 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23167 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23168 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23169 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23170 s,@SET_MAKE@,$SET_MAKE,;t t
23171 s,@CTAGS@,$CTAGS,;t t
23172 s,@ETAGS@,$ETAGS,;t t
23173 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23174 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23175 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23176 s,@RANLIB@,$RANLIB,;t t
23177 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23178 s,@LD@,$LD,;t t
23179 s,@ac_ct_LD@,$ac_ct_LD,;t t
23180 s,@AR@,$AR,;t t
23181 s,@ac_ct_AR@,$ac_ct_AR,;t t
23182 s,@NM@,$NM,;t t
23183 s,@ac_ct_NM@,$ac_ct_NM,;t t
23184 s,@ARFLAGS@,$ARFLAGS,;t t
23185 s,@DESTDIR@,$DESTDIR,;t t
23186 s,@BUILD_CC@,$BUILD_CC,;t t
23187 s,@BUILD_CPP@,$BUILD_CPP,;t t
23188 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23189 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23190 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23191 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23192 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23193 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23194 s,@cf_list_models@,$cf_list_models,;t t
23195 s,@ABI_VERSION@,$ABI_VERSION,;t t
23196 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23197 s,@LIBTOOL@,$LIBTOOL,;t t
23198 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23199 s,@LT_UNDEF@,$LT_UNDEF,;t t
23200 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23201 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23202 s,@LIB_CREATE@,$LIB_CREATE,;t t
23203 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23204 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23205 s,@LIB_PREP@,$LIB_PREP,;t t
23206 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23207 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23208 s,@LIB_LINK@,$LIB_LINK,;t t
23209 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23210 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23211 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23212 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23213 s,@TICS_NAME@,$TICS_NAME,;t t
23214 s,@TINFO_NAME@,$TINFO_NAME,;t t
23215 s,@LIB_NAME@,$LIB_NAME,;t t
23216 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23217 s,@CC_G_OPT@,$CC_G_OPT,;t t
23218 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23219 s,@LD_MODEL@,$LD_MODEL,;t t
23220 s,@shlibdir@,$shlibdir,;t t
23221 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23222 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23223 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23224 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23225 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23226 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23227 s,@LINK_PROGS@,$LINK_PROGS,;t t
23228 s,@LINK_TESTS@,$LINK_TESTS,;t t
23229 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23230 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23231 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23232 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23233 s,@RPATH_LIST@,$RPATH_LIST,;t t
23234 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23235 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23236 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23237 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23238 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23239 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23240 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23241 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23242 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23243 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23244 s,@XTERM_KBS@,$XTERM_KBS,;t t
23245 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23246 s,@TERMINFO@,$TERMINFO,;t t
23247 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23248 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23249 s,@TERMPATH@,$TERMPATH,;t t
23250 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23251 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23252 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23253 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23254 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23255 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23256 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23257 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23258 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23259 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23260 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23261 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23262 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23263 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23264 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23265 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23266 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23267 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23268 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23269 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23270 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23271 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23272 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23273 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23274 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23275 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23276 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23277 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23278 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23279 s,@PTHREAD@,$PTHREAD,;t t
23280 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23281 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23282 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23283 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23284 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23285 s,@ECHO_LT@,$ECHO_LT,;t t
23286 s,@ECHO_LD@,$ECHO_LD,;t t
23287 s,@RULE_CC@,$RULE_CC,;t t
23288 s,@SHOW_CC@,$SHOW_CC,;t t
23289 s,@ECHO_CC@,$ECHO_CC,;t t
23290 s,@ECHO_LINK@,$ECHO_LINK,;t t
23291 s,@ADAFLAGS@,$ADAFLAGS,;t t
23292 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23293 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23294 s,@ADA_TRACE@,$ADA_TRACE,;t t
23295 s,@MATH_LIB@,$MATH_LIB,;t t
23296 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23297 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23298 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23299 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23300 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23301 s,@TEST_LIBS@,$TEST_LIBS,;t t
23302 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23303 s,@CXXCPP@,$CXXCPP,;t t
23304 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23305 s,@CXX_AR@,$CXX_AR,;t t
23306 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23307 s,@CXXLIBS@,$CXXLIBS,;t t
23308 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23309 s,@gnat_exists@,$gnat_exists,;t t
23310 s,@M4_exists@,$M4_exists,;t t
23311 s,@cf_ada_make@,$cf_ada_make,;t t
23312 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23313 s,@cf_compile_generics@,$cf_compile_generics,;t t
23314 s,@cf_generic_objects@,$cf_generic_objects,;t t
23315 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23316 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23317 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23318 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23319 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23320 s,@cf_ada_package@,$cf_ada_package,;t t
23321 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23322 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23323 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23324 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23325 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23326 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23327 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23328 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23329 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23330 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23331 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23332 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23333 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23334 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23335 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23336 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23337 s,@TICS_LIBS@,$TICS_LIBS,;t t
23338 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23339 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23340 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23341 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23342 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23343 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23344 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23345 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23346 s,@includesubdir@,$includesubdir,;t t
23347 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23348 s,@TICS_LIST@,$TICS_LIST,;t t
23349 s,@TINFO_LIST@,$TINFO_LIST,;t t
23350 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23351 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23352 s,@TEST_ARGS@,$TEST_ARGS,;t t
23353 s,@TEST_DEPS@,$TEST_DEPS,;t t
23354 s,@TEST_ARG2@,$TEST_ARG2,;t t
23355 s,@TEST_DEP2@,$TEST_DEP2,;t t
23356 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23357 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23358 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23359 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23360 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23361 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23362 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23363 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23364 s,@cross_compiling@,$cross_compiling,;t t
23365 s,@TIC_PATH@,$TIC_PATH,;t t
23366 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23367 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23368 s,@PANEL_NAME@,$PANEL_NAME,;t t
23369 s,@MENU_NAME@,$MENU_NAME,;t t
23370 s,@FORM_NAME@,$FORM_NAME,;t t
23371 s,@CXX_NAME@,$CXX_NAME,;t t
23372 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23373 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23374 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23375 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23376 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23377 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23378 CEOF
23379
23380 EOF
23381
23382   cat >>$CONFIG_STATUS <<\EOF
23383   # Split the substitutions into bite-sized pieces for seds with
23384   # small command number limits, like on Digital OSF/1 and HP-UX.
23385   ac_max_sed_lines=48
23386   ac_sed_frag=1 # Number of current file.
23387   ac_beg=1 # First line for current file.
23388   ac_end=$ac_max_sed_lines # Line after last line for current file.
23389   ac_more_lines=:
23390   ac_sed_cmds=
23391   while $ac_more_lines; do
23392     if test $ac_beg -gt 1; then
23393       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23394     else
23395       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23396     fi
23397     if test ! -s $tmp/subs.frag; then
23398       ac_more_lines=false
23399     else
23400       # The purpose of the label and of the branching condition is to
23401       # speed up the sed processing (if there are no `@' at all, there
23402       # is no need to browse any of the substitutions).
23403       # These are the two extra sed commands mentioned above.
23404       (echo ':t
23405   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23406       # It is possible to make a multiline substitution using escaped newlines.
23407       # Ensure that we do not split the substitution between script fragments.
23408       ac_BEG=$ac_end
23409       ac_END=`expr $ac_end + $ac_max_sed_lines`
23410       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23411       if test -s $tmp/subs.next; then
23412         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23413         if test ! -s $tmp/subs.edit; then
23414           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23415           if test ! -s $tmp/subs.edit; then
23416             if test $ac_beg -gt 1; then
23417               ac_end=`expr $ac_end - 1`
23418               continue
23419             fi
23420           fi
23421         fi
23422       fi
23423
23424       if test -z "$ac_sed_cmds"; then
23425         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23426       else
23427         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23428       fi
23429       ac_sed_frag=`expr $ac_sed_frag + 1`
23430       ac_beg=$ac_end
23431       ac_end=`expr $ac_end + $ac_max_sed_lines`
23432     fi
23433   done
23434   if test -z "$ac_sed_cmds"; then
23435     ac_sed_cmds=cat
23436   fi
23437 fi # test -n "$CONFIG_FILES"
23438
23439 EOF
23440 cat >>$CONFIG_STATUS <<\EOF
23441 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23442   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23443   case $ac_file in
23444   - | *:- | *:-:* ) # input from stdin
23445         cat >$tmp/stdin
23446         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23447         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23448   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23449         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23450   * )   ac_file_in=$ac_file.in ;;
23451   esac
23452
23453   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23454   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23455          X"$ac_file" : 'X\(//\)[^/]' \| \
23456          X"$ac_file" : 'X\(//\)$' \| \
23457          X"$ac_file" : 'X\(/\)' \| \
23458          .     : '\(.\)' 2>/dev/null ||
23459 echo X"$ac_file" |
23460     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23461           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23462           /^X\(\/\/\)$/{ s//\1/; q; }
23463           /^X\(\/\).*/{ s//\1/; q; }
23464           s/.*/./; q'`
23465   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23466     { case "$ac_dir" in
23467   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23468   *)                      as_incr_dir=.;;
23469 esac
23470 as_dummy="$ac_dir"
23471 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23472   case $as_mkdir_dir in
23473     # Skip DOS drivespec
23474     ?:) as_incr_dir=$as_mkdir_dir ;;
23475     *)
23476       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23477       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23478     ;;
23479   esac
23480 done; }
23481
23482     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23483     # A "../" for each directory in $ac_dir_suffix.
23484     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23485   else
23486     ac_dir_suffix= ac_dots=
23487   fi
23488
23489   case $srcdir in
23490   .)  ac_srcdir=.
23491       if test -z "$ac_dots"; then
23492          ac_top_srcdir=.
23493       else
23494          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23495       fi ;;
23496   [\\/]* | ?:[\\/]* )
23497       ac_srcdir=$srcdir$ac_dir_suffix;
23498       ac_top_srcdir=$srcdir ;;
23499   *) # Relative path.
23500     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23501     ac_top_srcdir=$ac_dots$srcdir ;;
23502   esac
23503
23504   case $INSTALL in
23505   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23506   *) ac_INSTALL=$ac_dots$INSTALL ;;
23507   esac
23508
23509   if test x"$ac_file" != x-; then
23510     { echo "$as_me:23510: creating $ac_file" >&5
23511 echo "$as_me: creating $ac_file" >&6;}
23512     rm -f "$ac_file"
23513   fi
23514   # Let's still pretend it is `configure' which instantiates (i.e., don't
23515   # use $as_me), people would be surprised to read:
23516   #    /* config.h.  Generated automatically by config.status.  */
23517   configure_input="Generated automatically from `echo $ac_file_in |
23518                                                  sed 's,.*/,,'` by configure."
23519
23520   # First look for the input files in the build tree, otherwise in the
23521   # src tree.
23522   ac_file_inputs=`IFS=:
23523     for f in $ac_file_in; do
23524       case $f in
23525       -) echo $tmp/stdin ;;
23526       [\\/$]*)
23527          # Absolute (can't be DOS-style, as IFS=:)
23528          test -f "$f" || { { echo "$as_me:23528: error: cannot find input file: $f" >&5
23529 echo "$as_me: error: cannot find input file: $f" >&2;}
23530    { (exit 1); exit 1; }; }
23531          echo $f;;
23532       *) # Relative
23533          if test -f "$f"; then
23534            # Build tree
23535            echo $f
23536          elif test -f "$srcdir/$f"; then
23537            # Source tree
23538            echo $srcdir/$f
23539          else
23540            # /dev/null tree
23541            { { echo "$as_me:23541: error: cannot find input file: $f" >&5
23542 echo "$as_me: error: cannot find input file: $f" >&2;}
23543    { (exit 1); exit 1; }; }
23544          fi;;
23545       esac
23546     done` || { (exit 1); exit 1; }
23547 EOF
23548 cat >>$CONFIG_STATUS <<\EOF
23549   ac_warn_datarootdir=no
23550   if test x"$ac_file" != x-; then
23551     for ac_item in $ac_file_inputs
23552     do
23553       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23554       if test -n "$ac_seen"; then
23555         ac_used=`grep '@datarootdir@' $ac_item`
23556         if test -z "$ac_used"; then
23557           { echo "$as_me:23557: WARNING: datarootdir was used implicitly but not set:
23558 $ac_seen" >&5
23559 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23560 $ac_seen" >&2;}
23561           ac_warn_datarootdir=yes
23562         fi
23563       fi
23564       ac_seen=`grep '${datarootdir}' $ac_item`
23565       if test -n "$ac_seen"; then
23566         { echo "$as_me:23566: WARNING: datarootdir was used explicitly but not set:
23567 $ac_seen" >&5
23568 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23569 $ac_seen" >&2;}
23570         ac_warn_datarootdir=yes
23571       fi
23572     done
23573   fi
23574
23575 if test "x$ac_warn_datarootdir" = xyes; then
23576   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23577 fi
23578
23579 EOF
23580 cat >>$CONFIG_STATUS <<EOF
23581   sed "$ac_vpsub
23582 $extrasub
23583 EOF
23584 cat >>$CONFIG_STATUS <<\EOF
23585 :t
23586 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23587 s,@configure_input@,$configure_input,;t t
23588 s,@srcdir@,$ac_srcdir,;t t
23589 s,@top_srcdir@,$ac_top_srcdir,;t t
23590 s,@INSTALL@,$ac_INSTALL,;t t
23591 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23592   rm -f $tmp/stdin
23593   if test x"$ac_file" != x-; then
23594     cp $tmp/out $ac_file
23595
23596     for ac_name in prefix exec_prefix datarootdir
23597     do
23598         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23599         if test -n "$ac_seen"; then
23600             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23601             if test -z "$ac_init"; then
23602               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23603               { echo "$as_me:23603: WARNING: Variable $ac_name is used but was not set:
23604 $ac_seen" >&5
23605 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23606 $ac_seen" >&2;}
23607             fi
23608         fi
23609     done
23610     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23611     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23612     if test -s $tmp/out; then
23613       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23614       { echo "$as_me:23614: WARNING: Some variables may not be substituted:
23615 $ac_seen" >&5
23616 echo "$as_me: WARNING: Some variables may not be substituted:
23617 $ac_seen" >&2;}
23618     fi
23619   else
23620     cat $tmp/out
23621   fi
23622   rm -f $tmp/out
23623
23624 done
23625 EOF
23626 cat >>$CONFIG_STATUS <<\EOF
23627
23628 #
23629 # CONFIG_HEADER section.
23630 #
23631
23632 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23633 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23634 #
23635 # ac_d sets the value in "#define NAME VALUE" lines.
23636 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23637 ac_dB='[        ].*$,\1#\2'
23638 ac_dC=' '
23639 ac_dD=',;t'
23640 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23641 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23642 ac_iB='\([      ]\),\1#\2define\3'
23643 ac_iC=' '
23644 ac_iD='\4,;t'
23645 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23646 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23647 ac_uB='$,\1#\2define\3'
23648 ac_uC=' '
23649 ac_uD=',;t'
23650
23651 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23652   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23653   case $ac_file in
23654   - | *:- | *:-:* ) # input from stdin
23655         cat >$tmp/stdin
23656         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23657         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23658   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23659         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23660   * )   ac_file_in=$ac_file.in ;;
23661   esac
23662
23663   test x"$ac_file" != x- && { echo "$as_me:23663: creating $ac_file" >&5
23664 echo "$as_me: creating $ac_file" >&6;}
23665
23666   # First look for the input files in the build tree, otherwise in the
23667   # src tree.
23668   ac_file_inputs=`IFS=:
23669     for f in $ac_file_in; do
23670       case $f in
23671       -) echo $tmp/stdin ;;
23672       [\\/$]*)
23673          # Absolute (can't be DOS-style, as IFS=:)
23674          test -f "$f" || { { echo "$as_me:23674: error: cannot find input file: $f" >&5
23675 echo "$as_me: error: cannot find input file: $f" >&2;}
23676    { (exit 1); exit 1; }; }
23677          echo $f;;
23678       *) # Relative
23679          if test -f "$f"; then
23680            # Build tree
23681            echo $f
23682          elif test -f "$srcdir/$f"; then
23683            # Source tree
23684            echo $srcdir/$f
23685          else
23686            # /dev/null tree
23687            { { echo "$as_me:23687: error: cannot find input file: $f" >&5
23688 echo "$as_me: error: cannot find input file: $f" >&2;}
23689    { (exit 1); exit 1; }; }
23690          fi;;
23691       esac
23692     done` || { (exit 1); exit 1; }
23693   # Remove the trailing spaces.
23694   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23695
23696 EOF
23697
23698 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23699 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23700 # be either 'cat' or 'sort'.
23701 cat confdefs.h | uniq >conftest.vals
23702
23703 # Break up conftest.vals because some shells have a limit on
23704 # the size of here documents, and old seds have small limits too.
23705
23706 rm -f conftest.tail
23707 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23708 while grep . conftest.vals >/dev/null
23709 do
23710   # Write chunks of a limited-size here document to conftest.frag.
23711   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23712   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23713   echo 'CEOF' >> $CONFIG_STATUS
23714   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23715   rm -f conftest.vals
23716   mv conftest.tail conftest.vals
23717 done
23718 rm -f conftest.vals
23719
23720 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23721 # marker @DEFS@.
23722 echo '  cat >> conftest.edit <<CEOF
23723 /@DEFS@/r conftest.frag
23724 /@DEFS@/d
23725 CEOF
23726 sed -f conftest.edit $tmp/in > $tmp/out
23727 rm -f $tmp/in
23728 mv $tmp/out $tmp/in
23729 rm -f conftest.edit conftest.frag
23730 ' >> $CONFIG_STATUS
23731
23732 cat >>$CONFIG_STATUS <<\EOF
23733   # Let's still pretend it is `configure' which instantiates (i.e., don't
23734   # use $as_me), people would be surprised to read:
23735   #    /* config.h.  Generated automatically by config.status.  */
23736   if test x"$ac_file" = x-; then
23737     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23738   else
23739     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23740   fi
23741   cat $tmp/in >>$tmp/config.h
23742   rm -f $tmp/in
23743   if test x"$ac_file" != x-; then
23744     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23745       { echo "$as_me:23745: $ac_file is unchanged" >&5
23746 echo "$as_me: $ac_file is unchanged" >&6;}
23747     else
23748       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23749          X"$ac_file" : 'X\(//\)[^/]' \| \
23750          X"$ac_file" : 'X\(//\)$' \| \
23751          X"$ac_file" : 'X\(/\)' \| \
23752          .     : '\(.\)' 2>/dev/null ||
23753 echo X"$ac_file" |
23754     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23755           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23756           /^X\(\/\/\)$/{ s//\1/; q; }
23757           /^X\(\/\).*/{ s//\1/; q; }
23758           s/.*/./; q'`
23759       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23760         { case "$ac_dir" in
23761   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23762   *)                      as_incr_dir=.;;
23763 esac
23764 as_dummy="$ac_dir"
23765 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23766   case $as_mkdir_dir in
23767     # Skip DOS drivespec
23768     ?:) as_incr_dir=$as_mkdir_dir ;;
23769     *)
23770       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23771       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23772     ;;
23773   esac
23774 done; }
23775
23776       fi
23777       rm -f $ac_file
23778       mv $tmp/config.h $ac_file
23779     fi
23780   else
23781     cat $tmp/config.h
23782     rm -f $tmp/config.h
23783   fi
23784 done
23785 EOF
23786 cat >>$CONFIG_STATUS <<\EOF
23787 #
23788 # CONFIG_COMMANDS section.
23789 #
23790 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23791   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23792   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23793
23794   case $ac_dest in
23795     default )
23796 if test "x$cf_with_tests" != xno ; then
23797
23798 for cf_dir in test
23799 do
23800         if test ! -d $srcdir/$cf_dir; then
23801                 continue
23802         elif test -f $srcdir/$cf_dir/programs; then
23803                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23804         fi
23805 done
23806
23807 fi
23808
23809 cf_prefix=$LIB_PREFIX
23810
23811 case $cf_cv_shlib_version in
23812 (cygdll|msysdll|mingw)
23813         TINFO_NAME=$TINFO_ARG_SUFFIX
23814         TINFO_SUFFIX=.dll
23815         ;;
23816 esac
23817
23818 if test -n "$TINFO_SUFFIX" ; then
23819         case $TINFO_SUFFIX in
23820         (tw*)
23821                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23822                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23823                 ;;
23824         (t*)
23825                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23826                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23827                 ;;
23828         (w*)
23829                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23830                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23831                 ;;
23832         esac
23833 fi
23834
23835 for cf_dir in $SRC_SUBDIRS
23836 do
23837         if test ! -d $srcdir/$cf_dir ; then
23838                 continue
23839         elif test -f $srcdir/$cf_dir/modules; then
23840
23841                 SHARED_LIB=
23842                 Libs_To_Make=
23843                 cf_awk_program=
23844                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23845                 then
23846                         cf_awk_program="$cf_awk_program\
23847 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
23848 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
23849 "
23850                 fi
23851
23852                 if test "x$WILDCARD_SYMS" = xno
23853                 then
23854                         cf_awk_program="$cf_awk_program\
23855 /[      ]_\\*;/ { skip=1; next; }\
23856 "
23857                 fi
23858
23859                 if test "x$cf_awk_program" != "x"
23860                 then
23861                         cat >>$cf_dir/Makefile <<CF_EOF
23862
23863 # Generated by CF_LIB_RULES
23864 resulting.map: $UNALTERED_SYMS
23865         $AWK 'BEGIN { skip = 1; last=""; } \
23866 $cf_awk_program \
23867 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
23868  skip = 0; last = \$\$0; } \
23869 END { print last; }' < $UNALTERED_SYMS >\$@
23870
23871 distclean::
23872         rm -f resulting.map
23873 CF_EOF
23874                 fi
23875
23876                 for cf_item in $cf_LIST_MODELS
23877                 do
23878
23879         case X$cf_item in
23880         (Xlibtool)
23881                 cf_suffix='.la'
23882                 cf_depsuf=$cf_suffix
23883                 ;;
23884         (Xdebug)
23885                 cf_suffix='_g.a'
23886                 cf_depsuf=$cf_suffix
23887                 ;;
23888         (Xprofile)
23889                 cf_suffix='_p.a'
23890                 cf_depsuf=$cf_suffix
23891                 ;;
23892         (Xshared)
23893                 case $cf_cv_system_name in
23894                 (aix[5-7]*)
23895                         cf_suffix='.so'
23896                         cf_depsuf=$cf_suffix
23897                         ;;
23898                 (cygwin*|msys*|mingw*)
23899                         cf_suffix='.dll'
23900                         cf_depsuf='.dll.a'
23901                         ;;
23902                 (darwin*)
23903                         cf_suffix='.dylib'
23904                         cf_depsuf=$cf_suffix
23905                         ;;
23906                 (hpux*)
23907                         case $target in
23908                         (ia64*)
23909                                 cf_suffix='.so'
23910                                 cf_depsuf=$cf_suffix
23911                                 ;;
23912                         (*)
23913                                 cf_suffix='.sl'
23914                                 cf_depsuf=$cf_suffix
23915                                 ;;
23916                         esac
23917                         ;;
23918                 (*)
23919                         cf_suffix='.so'
23920                         cf_depsuf=$cf_suffix
23921                         ;;
23922                 esac
23923                 ;;
23924         (*)
23925                 cf_suffix='.a'
23926                 cf_depsuf=$cf_suffix
23927                 ;;
23928         esac
23929         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23930         then
23931                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23932                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23933         fi
23934
23935                         cf_libname=$cf_dir
23936                         test "$cf_dir" = c++ && cf_libname=ncurses++
23937                         if test $cf_item = shared ; then
23938                                 if test -n "${LIB_SUFFIX}"
23939                                 then
23940                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23941                                 else
23942                                         cf_shared_suffix="$cf_suffix"
23943                                 fi
23944                                 if test "$cf_cv_do_symlinks" = yes ; then
23945                                         cf_version_name=
23946
23947                                         case "$cf_cv_shlib_version" in
23948                                         (rel)
23949                                                 cf_version_name=REL_VERSION
23950                                                 ;;
23951                                         (abi)
23952                                                 cf_version_name=ABI_VERSION
23953                                                 ;;
23954                                         esac
23955
23956                                         if test -n "$cf_version_name"
23957                                         then
23958                                                 case "$cf_cv_system_name" in
23959                                                 (darwin*)
23960                                                         # "w", etc?
23961                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23962                                                         ;;
23963                                                 (*)
23964                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23965                                                         ;;
23966                                                 esac
23967                                         fi
23968                                         if test -n "${USE_LIB_SUFFIX}"
23969                                         then
23970                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23971                                         else
23972                                                 cf_shared_suffix="$cf_suffix"
23973                                         fi
23974                                 fi
23975                                 # cygwin needs import library, and has unique naming convention
23976                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23977                                 # use 'cyg' prefix for shared lib.
23978                                 case $cf_cv_shlib_version in
23979                                 (cygdll)
23980                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23981                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23982                                         ;;
23983                                 (msysdll)
23984                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23985                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23986                                         ;;
23987                                 (mingw)
23988                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23989                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23990                                         ;;
23991                                 (*)
23992                                         cf_add_lib=
23993                                         ;;
23994                                 esac
23995                                 if test -n "$cf_add_lib"
23996                                 then
23997                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23998                                         continue
23999                                 fi
24000                         fi
24001                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24002                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24003                 done
24004
24005                 if test $cf_dir = ncurses ; then
24006                         cf_subsets="$LIB_SUBSETS"
24007                         cf_r_parts="$cf_subsets"
24008                         cf_liblist="$Libs_To_Make"
24009
24010                         while test -n "$cf_r_parts"
24011                         do
24012                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24013                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24014                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24015                                         cf_add_lib=
24016                                         case $cf_l_parts in
24017                                         (*termlib*)
24018                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24019                                                 ;;
24020                                         (*ticlib*)
24021                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24022                                                 ;;
24023                                         (*)
24024                                                 break
24025                                                 ;;
24026                                         esac
24027                                         if test -n "$cf_add_lib"; then
24028                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24029                                         fi
24030                                 else
24031                                         break
24032                                 fi
24033                         done
24034                 else
24035                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24036                 fi
24037
24038                 if test $cf_dir = c++; then
24039                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24040                                 cf_list=
24041                                 for cf_item in $Libs_To_Make
24042                                 do
24043                                         case $cf_item in
24044                                         (*.a)
24045                                                 ;;
24046                                         (*)
24047                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24048                                                 ;;
24049                                         esac
24050                                         for cf_test in $cf_list
24051                                         do
24052                                                 if test "$cf_test" = "$cf_item"
24053                                                 then
24054                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24055                                                         cf_item=
24056                                                         break
24057                                                 fi
24058                                         done
24059                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24060                                 done
24061                                 Libs_To_Make="$cf_list"
24062                         fi
24063                 fi
24064
24065                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24066                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24067                         $cf_dir/Makefile >$cf_dir/Makefile.out
24068                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24069
24070                 $AWK -f $srcdir/mk-0th.awk \
24071                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24072                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24073
24074                 for cf_subset in $cf_subsets
24075                 do
24076                         cf_subdirs=
24077                         for cf_item in $cf_LIST_MODELS
24078                         do
24079
24080                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24081
24082 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24083
24084                         CXX_MODEL=$cf_ITEM
24085                         if test "$CXX_MODEL" = SHARED; then
24086                                 case $cf_cv_shlib_version in
24087                                 (cygdll|msysdll|mingw)
24088                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24089
24090 echo "${as_me:-configure}:24090: testing overriding CXX_MODEL to SHARED ..." 1>&5
24091
24092                                         with_shared_cxx=yes
24093                                         ;;
24094                                 (*)
24095                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24096                                         ;;
24097                                 esac
24098                         fi
24099
24100         case X$cf_item in
24101         (Xlibtool)
24102                 cf_suffix='.la'
24103                 cf_depsuf=$cf_suffix
24104                 ;;
24105         (Xdebug)
24106                 cf_suffix='_g.a'
24107                 cf_depsuf=$cf_suffix
24108                 ;;
24109         (Xprofile)
24110                 cf_suffix='_p.a'
24111                 cf_depsuf=$cf_suffix
24112                 ;;
24113         (Xshared)
24114                 case $cf_cv_system_name in
24115                 (aix[5-7]*)
24116                         cf_suffix='.so'
24117                         cf_depsuf=$cf_suffix
24118                         ;;
24119                 (cygwin*|msys*|mingw*)
24120                         cf_suffix='.dll'
24121                         cf_depsuf='.dll.a'
24122                         ;;
24123                 (darwin*)
24124                         cf_suffix='.dylib'
24125                         cf_depsuf=$cf_suffix
24126                         ;;
24127                 (hpux*)
24128                         case $target in
24129                         (ia64*)
24130                                 cf_suffix='.so'
24131                                 cf_depsuf=$cf_suffix
24132                                 ;;
24133                         (*)
24134                                 cf_suffix='.sl'
24135                                 cf_depsuf=$cf_suffix
24136                                 ;;
24137                         esac
24138                         ;;
24139                 (*)
24140                         cf_suffix='.so'
24141                         cf_depsuf=$cf_suffix
24142                         ;;
24143                 esac
24144                 ;;
24145         (*)
24146                 cf_suffix='.a'
24147                 cf_depsuf=$cf_suffix
24148                 ;;
24149         esac
24150         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24151         then
24152                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24153                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24154         fi
24155
24156         case $cf_item in
24157         (libtool) cf_subdir='obj_lo'  ;;
24158         (normal)  cf_subdir='objects' ;;
24159         (debug)   cf_subdir='obj_g' ;;
24160         (profile) cf_subdir='obj_p' ;;
24161         (shared)
24162                 case $cf_cv_system_name in
24163                 (cygwin|msys)
24164                         cf_subdir='objects' ;;
24165                 (*)
24166                         cf_subdir='obj_s' ;;
24167                 esac
24168         esac
24169
24170                         # Test for case where we build libtinfo with a different name.
24171                         cf_libname=$cf_dir
24172                         if test $cf_dir = ncurses ; then
24173                                 case $cf_subset in
24174                                 (*base*)
24175                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24176                                         ;;
24177                                 (*termlib*)
24178                                         cf_libname=$TINFO_LIB_SUFFIX
24179                                         ;;
24180                                 (ticlib*)
24181                                         cf_libname=$TICS_LIB_SUFFIX
24182                                         ;;
24183                                 esac
24184                         elif test $cf_dir = c++ ; then
24185                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24186                         else
24187                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24188                         fi
24189                         if test -n "${USE_ARG_SUFFIX}" ; then
24190                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24191                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24192                         fi
24193
24194                         # These dependencies really are for development, not
24195                         # builds, but they are useful in porting, too.
24196                         cf_depend="../include/ncurses_cfg.h"
24197                         if test "$srcdir" = "."; then
24198                                 cf_reldir="."
24199                         else
24200                                 cf_reldir="\${srcdir}"
24201                         fi
24202
24203                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24204                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24205                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24206                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24207                         fi
24208
24209                         cf_dir_suffix=
24210                         old_cf_suffix="$cf_suffix"
24211                         if test "$cf_cv_shlib_version_infix" = yes ; then
24212                         if test -n "$USE_LIB_SUFFIX" ; then
24213                                 case $USE_LIB_SUFFIX in
24214                                 (tw*)
24215                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24216                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24217                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24218                                         ;;
24219                                 (t*)
24220                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24221                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24222                                         cf_dir_suffix=t$EXTRA_SUFFIX
24223                                         ;;
24224                                 (w*)
24225                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24226                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24227                                         cf_dir_suffix=w$EXTRA_SUFFIX
24228                                         ;;
24229                                 (*)
24230                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24231                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24232                                         cf_dir_suffix=$EXTRA_SUFFIX
24233                                         ;;
24234                                 esac
24235                         fi
24236                         fi
24237
24238                         $AWK -f $srcdir/mk-1st.awk \
24239                                 name=${cf_libname}${cf_dir_suffix} \
24240                                 traces=$LIB_TRACING \
24241                                 MODEL=$cf_ITEM \
24242                                 CXX_MODEL=$CXX_MODEL \
24243                                 model=$cf_subdir \
24244                                 prefix=$cf_prefix \
24245                                 suffix=$cf_suffix \
24246                                 subset=$cf_subset \
24247                                 driver=$cf_cv_term_driver \
24248                                 SymLink="$LN_S" \
24249                                 TermlibRoot=$TINFO_NAME \
24250                                 TermlibSuffix=$TINFO_SUFFIX \
24251                                 ShlibVer=$cf_cv_shlib_version \
24252                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24253                                 ReLink=${cf_cv_do_relink:-no} \
24254                                 DoLinks=$cf_cv_do_symlinks \
24255                                 rmSoLocs=$cf_cv_rm_so_locs \
24256                                 ldconfig="$LDCONFIG" \
24257                                 overwrite=$WITH_OVERWRITE \
24258                                 depend="$cf_depend" \
24259                                 host="$host" \
24260                                 libtool_version="$LIBTOOL_VERSION" \
24261                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24262
24263                         cf_suffix="$old_cf_suffix"
24264
24265                         for cf_subdir2 in $cf_subdirs lib
24266                         do
24267                                 test $cf_subdir = $cf_subdir2 && break
24268                         done
24269                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24270                         $AWK -f $srcdir/mk-2nd.awk \
24271                                 name=$cf_dir \
24272                                 traces=$LIB_TRACING \
24273                                 MODEL=$cf_ITEM \
24274                                 model=$cf_subdir \
24275                                 subset=$cf_subset \
24276                                 srcdir=$srcdir \
24277                                 echo=$WITH_ECHO \
24278                                 crenames=$cf_cv_prog_CC_c_o \
24279                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24280                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24281                         cf_subdirs="$cf_subdirs $cf_subdir"
24282                         done
24283                 done
24284         fi
24285
24286         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24287 done
24288
24289 for cf_dir in $SRC_SUBDIRS
24290 do
24291         if test ! -d $srcdir/$cf_dir ; then
24292                 continue
24293         fi
24294
24295         if test -f $cf_dir/Makefile ; then
24296                 case "$cf_dir" in
24297                 (Ada95)
24298                         echo 'libs \' >> Makefile
24299                         echo 'install.libs \' >> Makefile
24300                         echo 'uninstall.libs ::' >> Makefile
24301                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24302                         ;;
24303                 esac
24304         fi
24305
24306         if test -f $srcdir/$cf_dir/modules; then
24307                 echo >> Makefile
24308                 if test -f $srcdir/$cf_dir/headers; then
24309 cat >> Makefile <<CF_EOF
24310 install.includes \\
24311 uninstall.includes \\
24312 CF_EOF
24313                 fi
24314 if test "$cf_dir" != "c++" ; then
24315 echo 'lint \' >> Makefile
24316 fi
24317 cat >> Makefile <<CF_EOF
24318 libs \\
24319 lintlib \\
24320 install.libs \\
24321 uninstall.libs \\
24322 install.$cf_dir \\
24323 uninstall.$cf_dir ::
24324         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24325 CF_EOF
24326         elif test -f $srcdir/$cf_dir/headers; then
24327 cat >> Makefile <<CF_EOF
24328
24329 libs \\
24330 install.libs \\
24331 uninstall.libs \\
24332 install.includes \\
24333 uninstall.includes ::
24334         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24335 CF_EOF
24336 fi
24337 done
24338
24339 if test "x$cf_with_db_install" = xyes; then
24340 cat >> Makefile <<CF_EOF
24341
24342 install.libs uninstall.libs \\
24343 install.data uninstall.data ::
24344 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24345 CF_EOF
24346 else
24347 cat >> Makefile <<CF_EOF
24348
24349 install.libs uninstall.libs ::
24350         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24351 CF_EOF
24352 fi
24353
24354 if test "x$cf_with_manpages" = xyes; then
24355 cat >> Makefile <<CF_EOF
24356
24357 install.man \\
24358 uninstall.man ::
24359         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24360 CF_EOF
24361 fi
24362
24363 cat >> Makefile <<CF_EOF
24364
24365 distclean ::
24366         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24367         rm -f headers.sh headers.sed mk_shared_lib.sh
24368         rm -f edit_man.* man_alias.*
24369         rm -rf \${DIRS_TO_MAKE}
24370 CF_EOF
24371
24372 # Special case: tack's manpage lives in its own directory.
24373 if test "x$cf_with_manpages" = xyes; then
24374 if test -d tack ; then
24375 if test -f $srcdir/$tack.h; then
24376 cat >> Makefile <<CF_EOF
24377
24378 install.man \\
24379 uninstall.man ::
24380         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24381 CF_EOF
24382 fi
24383 fi
24384 fi
24385
24386 rm -f headers.sed headers.sh
24387
24388 echo creating headers.sh
24389 cat >headers.sh <<CF_EOF
24390 #! $SHELL
24391 # This shell script is generated by the 'configure' script.  It is invoked in a
24392 # subdirectory of the build tree.  It generates a sed-script in the parent
24393 # directory that is used to adjust includes for header files that reside in a
24394 # subdirectory of /usr/include, etc.
24395 PRG=""
24396 while test \$# != 3
24397 do
24398 PRG="\$PRG \$1"; shift
24399 done
24400 DST=\$1
24401 REF=\$2
24402 SRC=\$3
24403 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24404 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24405 echo installing \$SRC in \$DST
24406 CF_EOF
24407
24408 if test $WITH_CURSES_H = yes; then
24409         cat >>headers.sh <<CF_EOF
24410 case \$DST in
24411 (/*/include/*)
24412         END=\`basename \$DST\`
24413         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24414         do
24415                 NAME=\`basename \$i\`
24416                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24417         done
24418         ;;
24419 (*)
24420         echo "" >> \$TMPSED
24421         ;;
24422 esac
24423 CF_EOF
24424
24425 else
24426         cat >>headers.sh <<CF_EOF
24427 case \$DST in
24428 (/*/include/*)
24429         END=\`basename \$DST\`
24430         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24431         do
24432                 NAME=\`basename \$i\`
24433                 if test "\$NAME" = "curses.h"
24434                 then
24435                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24436                         NAME=ncurses.h
24437                 fi
24438                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24439         done
24440         ;;
24441 (*)
24442         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24443         ;;
24444 esac
24445 CF_EOF
24446 fi
24447 cat >>headers.sh <<CF_EOF
24448 rm -f \$TMPSRC
24449 sed -f \$TMPSED \$SRC > \$TMPSRC
24450 NAME=\`basename \$SRC\`
24451 CF_EOF
24452 if test $WITH_CURSES_H != yes; then
24453         cat >>headers.sh <<CF_EOF
24454 test "\$NAME" = "curses.h" && NAME=ncurses.h
24455 CF_EOF
24456 fi
24457 cat >>headers.sh <<CF_EOF
24458 # Just in case someone gzip'd manpages, remove the conflicting copy.
24459 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24460
24461 eval \$PRG \$TMPSRC \$DST/\$NAME
24462 rm -f \$TMPSRC \$TMPSED
24463 CF_EOF
24464
24465 chmod 0755 headers.sh
24466
24467 for cf_dir in $SRC_SUBDIRS
24468 do
24469         if test ! -d $srcdir/$cf_dir ; then
24470                 continue
24471         fi
24472
24473         if test -f $srcdir/$cf_dir/headers; then
24474                 $AWK -f $srcdir/mk-hdr.awk \
24475                         subset="$LIB_SUBSETS" \
24476                         compat="$WITH_CURSES_H" \
24477                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24478         fi
24479
24480         if test -f $srcdir/$cf_dir/modules; then
24481                 if test "$cf_dir" != "c++" ; then
24482                         cat >>$cf_dir/Makefile <<"CF_EOF"
24483 depend : ${AUTO_SRC}
24484         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24485
24486 # DO NOT DELETE THIS LINE -- make depend depends on it.
24487 CF_EOF
24488                 fi
24489         fi
24490 done
24491
24492 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24493 if test -z "$USE_OLD_MAKERULES" ; then
24494         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24495 fi
24496 fi
24497  ;;
24498   esac
24499 done
24500 EOF
24501
24502 cat >>$CONFIG_STATUS <<\EOF
24503
24504 { (exit 0); exit 0; }
24505 EOF
24506 chmod +x $CONFIG_STATUS
24507 ac_clean_files=$ac_clean_files_save
24508
24509 # configure is writing to config.log, and then calls config.status.
24510 # config.status does its own redirection, appending to config.log.
24511 # Unfortunately, on DOS this fails, as config.log is still kept open
24512 # by configure, so config.status won't be able to write to it; its
24513 # output is simply discarded.  So we exec the FD to /dev/null,
24514 # effectively closing config.log, so it can be properly (re)opened and
24515 # appended to by config.status.  When coming back to configure, we
24516 # need to make the FD available again.
24517 if test "$no_create" != yes; then
24518   ac_cs_success=:
24519   exec 5>/dev/null
24520   $SHELL $CONFIG_STATUS || ac_cs_success=false
24521   exec 5>>config.log
24522   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24523   # would make configure fail if this is the last instruction.
24524   $ac_cs_success || { (exit 1); exit 1; }
24525 fi
24526 ${MAKE:-make} preinstall