]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
554cc815c558473544419e2934f9935d4d2b4827
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.631 .
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 (*[\ \  ]-*)
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/[   ]-[IUD][^       ][^     ]*//g' -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         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2273
2274 echo "${as_me:-configure}:2274: testing resulting CC: '$CC' ..." 1>&5
2275
2276         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2277
2278 echo "${as_me:-configure}:2278: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2279
2280         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2281
2282 echo "${as_me:-configure}:2282: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2283
2284         ;;
2285 (*)
2286         echo "$as_me:2286: result: ok" >&5
2287 echo "${ECHO_T}ok" >&6
2288         ;;
2289 esac
2290
2291 ac_ext=c
2292 ac_cpp='$CPP $CPPFLAGS'
2293 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2294 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2295 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2296 ac_main_return=return
2297 echo "$as_me:2297: checking how to run the C preprocessor" >&5
2298 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2299 # On Suns, sometimes $CPP names a directory.
2300 if test -n "$CPP" && test -d "$CPP"; then
2301   CPP=
2302 fi
2303 if test -z "$CPP"; then
2304   if test "${ac_cv_prog_CPP+set}" = set; then
2305   echo $ECHO_N "(cached) $ECHO_C" >&6
2306 else
2307       # Double quotes because CPP needs to be expanded
2308     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2309     do
2310       ac_preproc_ok=false
2311 for ac_c_preproc_warn_flag in '' yes
2312 do
2313   # Use a header file that comes with gcc, so configuring glibc
2314   # with a fresh cross-compiler works.
2315   # On the NeXT, cc -E runs the code through the compiler's parser,
2316   # not just through cpp. "Syntax error" is here to catch this case.
2317   cat >conftest.$ac_ext <<_ACEOF
2318 #line 2318 "configure"
2319 #include "confdefs.h"
2320 #include <assert.h>
2321                      Syntax error
2322 _ACEOF
2323 if { (eval echo "$as_me:2323: \"$ac_cpp conftest.$ac_ext\"") >&5
2324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2325   ac_status=$?
2326   egrep -v '^ *\+' conftest.er1 >conftest.err
2327   rm -f conftest.er1
2328   cat conftest.err >&5
2329   echo "$as_me:2329: \$? = $ac_status" >&5
2330   (exit $ac_status); } >/dev/null; then
2331   if test -s conftest.err; then
2332     ac_cpp_err=$ac_c_preproc_warn_flag
2333   else
2334     ac_cpp_err=
2335   fi
2336 else
2337   ac_cpp_err=yes
2338 fi
2339 if test -z "$ac_cpp_err"; then
2340   :
2341 else
2342   echo "$as_me: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   # Broken: fails on valid input.
2345 continue
2346 fi
2347 rm -f conftest.err conftest.$ac_ext
2348
2349   # OK, works on sane cases.  Now check whether non-existent headers
2350   # can be detected and how.
2351   cat >conftest.$ac_ext <<_ACEOF
2352 #line 2352 "configure"
2353 #include "confdefs.h"
2354 #include <ac_nonexistent.h>
2355 _ACEOF
2356 if { (eval echo "$as_me:2356: \"$ac_cpp conftest.$ac_ext\"") >&5
2357   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2358   ac_status=$?
2359   egrep -v '^ *\+' conftest.er1 >conftest.err
2360   rm -f conftest.er1
2361   cat conftest.err >&5
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit $ac_status); } >/dev/null; then
2364   if test -s conftest.err; then
2365     ac_cpp_err=$ac_c_preproc_warn_flag
2366   else
2367     ac_cpp_err=
2368   fi
2369 else
2370   ac_cpp_err=yes
2371 fi
2372 if test -z "$ac_cpp_err"; then
2373   # Broken: success on invalid input.
2374 continue
2375 else
2376   echo "$as_me: failed program was:" >&5
2377   cat conftest.$ac_ext >&5
2378   # Passes both tests.
2379 ac_preproc_ok=:
2380 break
2381 fi
2382 rm -f conftest.err conftest.$ac_ext
2383
2384 done
2385 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2386 rm -f conftest.err conftest.$ac_ext
2387 if $ac_preproc_ok; then
2388   break
2389 fi
2390
2391     done
2392     ac_cv_prog_CPP=$CPP
2393
2394 fi
2395   CPP=$ac_cv_prog_CPP
2396 else
2397   ac_cv_prog_CPP=$CPP
2398 fi
2399 echo "$as_me:2399: result: $CPP" >&5
2400 echo "${ECHO_T}$CPP" >&6
2401 ac_preproc_ok=false
2402 for ac_c_preproc_warn_flag in '' yes
2403 do
2404   # Use a header file that comes with gcc, so configuring glibc
2405   # with a fresh cross-compiler works.
2406   # On the NeXT, cc -E runs the code through the compiler's parser,
2407   # not just through cpp. "Syntax error" is here to catch this case.
2408   cat >conftest.$ac_ext <<_ACEOF
2409 #line 2409 "configure"
2410 #include "confdefs.h"
2411 #include <assert.h>
2412                      Syntax error
2413 _ACEOF
2414 if { (eval echo "$as_me:2414: \"$ac_cpp conftest.$ac_ext\"") >&5
2415   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2416   ac_status=$?
2417   egrep -v '^ *\+' conftest.er1 >conftest.err
2418   rm -f conftest.er1
2419   cat conftest.err >&5
2420   echo "$as_me:2420: \$? = $ac_status" >&5
2421   (exit $ac_status); } >/dev/null; then
2422   if test -s conftest.err; then
2423     ac_cpp_err=$ac_c_preproc_warn_flag
2424   else
2425     ac_cpp_err=
2426   fi
2427 else
2428   ac_cpp_err=yes
2429 fi
2430 if test -z "$ac_cpp_err"; then
2431   :
2432 else
2433   echo "$as_me: failed program was:" >&5
2434   cat conftest.$ac_ext >&5
2435   # Broken: fails on valid input.
2436 continue
2437 fi
2438 rm -f conftest.err conftest.$ac_ext
2439
2440   # OK, works on sane cases.  Now check whether non-existent headers
2441   # can be detected and how.
2442   cat >conftest.$ac_ext <<_ACEOF
2443 #line 2443 "configure"
2444 #include "confdefs.h"
2445 #include <ac_nonexistent.h>
2446 _ACEOF
2447 if { (eval echo "$as_me:2447: \"$ac_cpp conftest.$ac_ext\"") >&5
2448   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2449   ac_status=$?
2450   egrep -v '^ *\+' conftest.er1 >conftest.err
2451   rm -f conftest.er1
2452   cat conftest.err >&5
2453   echo "$as_me:2453: \$? = $ac_status" >&5
2454   (exit $ac_status); } >/dev/null; then
2455   if test -s conftest.err; then
2456     ac_cpp_err=$ac_c_preproc_warn_flag
2457   else
2458     ac_cpp_err=
2459   fi
2460 else
2461   ac_cpp_err=yes
2462 fi
2463 if test -z "$ac_cpp_err"; then
2464   # Broken: success on invalid input.
2465 continue
2466 else
2467   echo "$as_me: failed program was:" >&5
2468   cat conftest.$ac_ext >&5
2469   # Passes both tests.
2470 ac_preproc_ok=:
2471 break
2472 fi
2473 rm -f conftest.err conftest.$ac_ext
2474
2475 done
2476 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2477 rm -f conftest.err conftest.$ac_ext
2478 if $ac_preproc_ok; then
2479   :
2480 else
2481   { { echo "$as_me:2481: error: C preprocessor \"$CPP\" fails sanity check" >&5
2482 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2483    { (exit 1); exit 1; }; }
2484 fi
2485
2486 ac_ext=c
2487 ac_cpp='$CPP $CPPFLAGS'
2488 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2489 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2490 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2491 ac_main_return=return
2492
2493 if test $ac_cv_c_compiler_gnu = yes; then
2494     echo "$as_me:2494: checking whether $CC needs -traditional" >&5
2495 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2496 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2497   echo $ECHO_N "(cached) $ECHO_C" >&6
2498 else
2499     ac_pattern="Autoconf.*'x'"
2500   cat >conftest.$ac_ext <<_ACEOF
2501 #line 2501 "configure"
2502 #include "confdefs.h"
2503 #include <sgtty.h>
2504 int Autoconf = TIOCGETP;
2505 _ACEOF
2506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2507   egrep "$ac_pattern" >/dev/null 2>&1; then
2508   ac_cv_prog_gcc_traditional=yes
2509 else
2510   ac_cv_prog_gcc_traditional=no
2511 fi
2512 rm -rf conftest*
2513
2514   if test $ac_cv_prog_gcc_traditional = no; then
2515     cat >conftest.$ac_ext <<_ACEOF
2516 #line 2516 "configure"
2517 #include "confdefs.h"
2518 #include <termio.h>
2519 int Autoconf = TCGETA;
2520 _ACEOF
2521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2522   egrep "$ac_pattern" >/dev/null 2>&1; then
2523   ac_cv_prog_gcc_traditional=yes
2524 fi
2525 rm -rf conftest*
2526
2527   fi
2528 fi
2529 echo "$as_me:2529: result: $ac_cv_prog_gcc_traditional" >&5
2530 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2531   if test $ac_cv_prog_gcc_traditional = yes; then
2532     CC="$CC -traditional"
2533   fi
2534 fi
2535
2536 echo "$as_me:2536: checking whether $CC understands -c and -o together" >&5
2537 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2538 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2539   echo $ECHO_N "(cached) $ECHO_C" >&6
2540 else
2541
2542 cat > conftest.$ac_ext <<CF_EOF
2543 int main()
2544 {
2545         ${cf_cv_main_return:-return}(0);
2546 }
2547 CF_EOF
2548 # We do the test twice because some compilers refuse to overwrite an
2549 # existing .o file with -o, though they will create one.
2550 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2551 if { (eval echo "$as_me:2551: \"$ac_try\"") >&5
2552   (eval $ac_try) 2>&5
2553   ac_status=$?
2554   echo "$as_me:2554: \$? = $ac_status" >&5
2555   (exit $ac_status); } &&
2556   test -f conftest2.$ac_objext && { (eval echo "$as_me:2556: \"$ac_try\"") >&5
2557   (eval $ac_try) 2>&5
2558   ac_status=$?
2559   echo "$as_me:2559: \$? = $ac_status" >&5
2560   (exit $ac_status); };
2561 then
2562   eval cf_cv_prog_CC_c_o=yes
2563 else
2564   eval cf_cv_prog_CC_c_o=no
2565 fi
2566 rm -rf conftest*
2567
2568 fi
2569 if test $cf_cv_prog_CC_c_o = yes; then
2570   echo "$as_me:2570: result: yes" >&5
2571 echo "${ECHO_T}yes" >&6
2572 else
2573   echo "$as_me:2573: result: no" >&5
2574 echo "${ECHO_T}no" >&6
2575 fi
2576
2577 if test "$cross_compiling" = yes ; then
2578         LDCONFIG=:
2579 else
2580         case "$cf_cv_system_name" in
2581         (dragonfly*|mirbsd*|freebsd*)
2582                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2583                 ;;
2584         (*) LDPATH=$PATH:/sbin:/usr/sbin
2585                 # Extract the first word of "ldconfig", so it can be a program name with args.
2586 set dummy ldconfig; ac_word=$2
2587 echo "$as_me:2587: checking for $ac_word" >&5
2588 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2589 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2590   echo $ECHO_N "(cached) $ECHO_C" >&6
2591 else
2592   case $LDCONFIG in
2593   [\\/]* | ?:[\\/]*)
2594   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2595   ;;
2596   *)
2597   ac_save_IFS=$IFS; IFS=$ac_path_separator
2598 ac_dummy="$LDPATH"
2599 for ac_dir in $ac_dummy; do
2600   IFS=$ac_save_IFS
2601   test -z "$ac_dir" && ac_dir=.
2602   if $as_executable_p "$ac_dir/$ac_word"; then
2603    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2604    echo "$as_me:2604: found $ac_dir/$ac_word" >&5
2605    break
2606 fi
2607 done
2608
2609   ;;
2610 esac
2611 fi
2612 LDCONFIG=$ac_cv_path_LDCONFIG
2613
2614 if test -n "$LDCONFIG"; then
2615   echo "$as_me:2615: result: $LDCONFIG" >&5
2616 echo "${ECHO_T}$LDCONFIG" >&6
2617 else
2618   echo "$as_me:2618: result: no" >&5
2619 echo "${ECHO_T}no" >&6
2620 fi
2621
2622                 ;;
2623         esac
2624 fi
2625
2626 echo "$as_me:2626: checking if you want to ensure bool is consistent with C++" >&5
2627 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2628
2629 # Check whether --with-cxx or --without-cxx was given.
2630 if test "${with_cxx+set}" = set; then
2631   withval="$with_cxx"
2632   cf_with_cxx=$withval
2633 else
2634   cf_with_cxx=yes
2635 fi;
2636 echo "$as_me:2636: result: $cf_with_cxx" >&5
2637 echo "${ECHO_T}$cf_with_cxx" >&6
2638 if test "X$cf_with_cxx" = Xno ; then
2639         CXX=""
2640         GXX=""
2641 else
2642         # with autoconf 2.13, we can change the error to a warning:
2643                 ac_ext=cc
2644 ac_cpp='$CXXCPP $CPPFLAGS'
2645 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2646 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2647 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2648 ac_main_return=return
2649 if test -n "$ac_tool_prefix"; then
2650   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2651   do
2652     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2653 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2654 echo "$as_me:2654: checking for $ac_word" >&5
2655 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2656 if test "${ac_cv_prog_CXX+set}" = set; then
2657   echo $ECHO_N "(cached) $ECHO_C" >&6
2658 else
2659   if test -n "$CXX"; then
2660   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2661 else
2662   ac_save_IFS=$IFS; IFS=$ac_path_separator
2663 ac_dummy="$PATH"
2664 for ac_dir in $ac_dummy; do
2665   IFS=$ac_save_IFS
2666   test -z "$ac_dir" && ac_dir=.
2667   $as_executable_p "$ac_dir/$ac_word" || continue
2668 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2669 echo "$as_me:2669: found $ac_dir/$ac_word" >&5
2670 break
2671 done
2672
2673 fi
2674 fi
2675 CXX=$ac_cv_prog_CXX
2676 if test -n "$CXX"; then
2677   echo "$as_me:2677: result: $CXX" >&5
2678 echo "${ECHO_T}$CXX" >&6
2679 else
2680   echo "$as_me:2680: result: no" >&5
2681 echo "${ECHO_T}no" >&6
2682 fi
2683
2684     test -n "$CXX" && break
2685   done
2686 fi
2687 if test -z "$CXX"; then
2688   ac_ct_CXX=$CXX
2689   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2690 do
2691   # Extract the first word of "$ac_prog", so it can be a program name with args.
2692 set dummy $ac_prog; ac_word=$2
2693 echo "$as_me:2693: checking for $ac_word" >&5
2694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2695 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2696   echo $ECHO_N "(cached) $ECHO_C" >&6
2697 else
2698   if test -n "$ac_ct_CXX"; then
2699   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2700 else
2701   ac_save_IFS=$IFS; IFS=$ac_path_separator
2702 ac_dummy="$PATH"
2703 for ac_dir in $ac_dummy; do
2704   IFS=$ac_save_IFS
2705   test -z "$ac_dir" && ac_dir=.
2706   $as_executable_p "$ac_dir/$ac_word" || continue
2707 ac_cv_prog_ac_ct_CXX="$ac_prog"
2708 echo "$as_me:2708: found $ac_dir/$ac_word" >&5
2709 break
2710 done
2711
2712 fi
2713 fi
2714 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2715 if test -n "$ac_ct_CXX"; then
2716   echo "$as_me:2716: result: $ac_ct_CXX" >&5
2717 echo "${ECHO_T}$ac_ct_CXX" >&6
2718 else
2719   echo "$as_me:2719: result: no" >&5
2720 echo "${ECHO_T}no" >&6
2721 fi
2722
2723   test -n "$ac_ct_CXX" && break
2724 done
2725 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2726
2727   CXX=$ac_ct_CXX
2728 fi
2729
2730 # Provide some information about the compiler.
2731 echo "$as_me:2731:" \
2732      "checking for C++ compiler version" >&5
2733 ac_compiler=`set X $ac_compile; echo $2`
2734 { (eval echo "$as_me:2734: \"$ac_compiler --version </dev/null >&5\"") >&5
2735   (eval $ac_compiler --version </dev/null >&5) 2>&5
2736   ac_status=$?
2737   echo "$as_me:2737: \$? = $ac_status" >&5
2738   (exit $ac_status); }
2739 { (eval echo "$as_me:2739: \"$ac_compiler -v </dev/null >&5\"") >&5
2740   (eval $ac_compiler -v </dev/null >&5) 2>&5
2741   ac_status=$?
2742   echo "$as_me:2742: \$? = $ac_status" >&5
2743   (exit $ac_status); }
2744 { (eval echo "$as_me:2744: \"$ac_compiler -V </dev/null >&5\"") >&5
2745   (eval $ac_compiler -V </dev/null >&5) 2>&5
2746   ac_status=$?
2747   echo "$as_me:2747: \$? = $ac_status" >&5
2748   (exit $ac_status); }
2749
2750 echo "$as_me:2750: checking whether we are using the GNU C++ compiler" >&5
2751 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2752 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2753   echo $ECHO_N "(cached) $ECHO_C" >&6
2754 else
2755   cat >conftest.$ac_ext <<_ACEOF
2756 #line 2756 "configure"
2757 #include "confdefs.h"
2758
2759 int
2760 main ()
2761 {
2762 #ifndef __GNUC__
2763        choke me
2764 #endif
2765
2766   ;
2767   return 0;
2768 }
2769 _ACEOF
2770 rm -f conftest.$ac_objext
2771 if { (eval echo "$as_me:2771: \"$ac_compile\"") >&5
2772   (eval $ac_compile) 2>&5
2773   ac_status=$?
2774   echo "$as_me:2774: \$? = $ac_status" >&5
2775   (exit $ac_status); } &&
2776          { ac_try='test -s conftest.$ac_objext'
2777   { (eval echo "$as_me:2777: \"$ac_try\"") >&5
2778   (eval $ac_try) 2>&5
2779   ac_status=$?
2780   echo "$as_me:2780: \$? = $ac_status" >&5
2781   (exit $ac_status); }; }; then
2782   ac_compiler_gnu=yes
2783 else
2784   echo "$as_me: failed program was:" >&5
2785 cat conftest.$ac_ext >&5
2786 ac_compiler_gnu=no
2787 fi
2788 rm -f conftest.$ac_objext conftest.$ac_ext
2789 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2790
2791 fi
2792 echo "$as_me:2792: result: $ac_cv_cxx_compiler_gnu" >&5
2793 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2794 GXX=`test $ac_compiler_gnu = yes && echo yes`
2795 ac_test_CXXFLAGS=${CXXFLAGS+set}
2796 ac_save_CXXFLAGS=$CXXFLAGS
2797 CXXFLAGS="-g"
2798 echo "$as_me:2798: checking whether $CXX accepts -g" >&5
2799 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2800 if test "${ac_cv_prog_cxx_g+set}" = set; then
2801   echo $ECHO_N "(cached) $ECHO_C" >&6
2802 else
2803   cat >conftest.$ac_ext <<_ACEOF
2804 #line 2804 "configure"
2805 #include "confdefs.h"
2806
2807 int
2808 main ()
2809 {
2810
2811   ;
2812   return 0;
2813 }
2814 _ACEOF
2815 rm -f conftest.$ac_objext
2816 if { (eval echo "$as_me:2816: \"$ac_compile\"") >&5
2817   (eval $ac_compile) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); } &&
2821          { ac_try='test -s conftest.$ac_objext'
2822   { (eval echo "$as_me:2822: \"$ac_try\"") >&5
2823   (eval $ac_try) 2>&5
2824   ac_status=$?
2825   echo "$as_me:2825: \$? = $ac_status" >&5
2826   (exit $ac_status); }; }; then
2827   ac_cv_prog_cxx_g=yes
2828 else
2829   echo "$as_me: failed program was:" >&5
2830 cat conftest.$ac_ext >&5
2831 ac_cv_prog_cxx_g=no
2832 fi
2833 rm -f conftest.$ac_objext conftest.$ac_ext
2834 fi
2835 echo "$as_me:2835: result: $ac_cv_prog_cxx_g" >&5
2836 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2837 if test "$ac_test_CXXFLAGS" = set; then
2838   CXXFLAGS=$ac_save_CXXFLAGS
2839 elif test $ac_cv_prog_cxx_g = yes; then
2840   if test "$GXX" = yes; then
2841     CXXFLAGS="-g -O2"
2842   else
2843     CXXFLAGS="-g"
2844   fi
2845 else
2846   if test "$GXX" = yes; then
2847     CXXFLAGS="-O2"
2848   else
2849     CXXFLAGS=
2850   fi
2851 fi
2852 for ac_declaration in \
2853    ''\
2854    '#include <stdlib.h>' \
2855    'extern "C" void std::exit (int) throw (); using std::exit;' \
2856    'extern "C" void std::exit (int); using std::exit;' \
2857    'extern "C" void exit (int) throw ();' \
2858    'extern "C" void exit (int);' \
2859    'void exit (int);'
2860 do
2861   cat >conftest.$ac_ext <<_ACEOF
2862 #line 2862 "configure"
2863 #include "confdefs.h"
2864 #include <stdlib.h>
2865 $ac_declaration
2866 int
2867 main ()
2868 {
2869 exit (42);
2870   ;
2871   return 0;
2872 }
2873 _ACEOF
2874 rm -f conftest.$ac_objext
2875 if { (eval echo "$as_me:2875: \"$ac_compile\"") >&5
2876   (eval $ac_compile) 2>&5
2877   ac_status=$?
2878   echo "$as_me:2878: \$? = $ac_status" >&5
2879   (exit $ac_status); } &&
2880          { ac_try='test -s conftest.$ac_objext'
2881   { (eval echo "$as_me:2881: \"$ac_try\"") >&5
2882   (eval $ac_try) 2>&5
2883   ac_status=$?
2884   echo "$as_me:2884: \$? = $ac_status" >&5
2885   (exit $ac_status); }; }; then
2886   :
2887 else
2888   echo "$as_me: failed program was:" >&5
2889 cat conftest.$ac_ext >&5
2890 continue
2891 fi
2892 rm -f conftest.$ac_objext conftest.$ac_ext
2893   cat >conftest.$ac_ext <<_ACEOF
2894 #line 2894 "configure"
2895 #include "confdefs.h"
2896 $ac_declaration
2897 int
2898 main ()
2899 {
2900 exit (42);
2901   ;
2902   return 0;
2903 }
2904 _ACEOF
2905 rm -f conftest.$ac_objext
2906 if { (eval echo "$as_me:2906: \"$ac_compile\"") >&5
2907   (eval $ac_compile) 2>&5
2908   ac_status=$?
2909   echo "$as_me:2909: \$? = $ac_status" >&5
2910   (exit $ac_status); } &&
2911          { ac_try='test -s conftest.$ac_objext'
2912   { (eval echo "$as_me:2912: \"$ac_try\"") >&5
2913   (eval $ac_try) 2>&5
2914   ac_status=$?
2915   echo "$as_me:2915: \$? = $ac_status" >&5
2916   (exit $ac_status); }; }; then
2917   break
2918 else
2919   echo "$as_me: failed program was:" >&5
2920 cat conftest.$ac_ext >&5
2921 fi
2922 rm -f conftest.$ac_objext conftest.$ac_ext
2923 done
2924 rm -rf conftest*
2925 if test -n "$ac_declaration"; then
2926   echo '#ifdef __cplusplus' >>confdefs.h
2927   echo $ac_declaration      >>confdefs.h
2928   echo '#endif'             >>confdefs.h
2929 fi
2930
2931 ac_ext=c
2932 ac_cpp='$CPP $CPPFLAGS'
2933 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2934 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2935 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2936 ac_main_return=return
2937
2938         ac_ext=cc
2939 ac_cpp='$CXXCPP $CPPFLAGS'
2940 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2941 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2942 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2943 ac_main_return=return
2944
2945         if test "x$cf_with_cxx" != xno
2946         then
2947                 # Several of the C++ configurations do not work, particularly when
2948                 # cross-compiling (20140913 -TD)
2949                 echo "$as_me:2949: checking if $CXX works" >&5
2950 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2951
2952                 save_CPPFLAGS="$CPPFLAGS"
2953                 eval cf_includedir=${includedir}
2954                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2955
2956 cat >conftest.$ac_ext <<_ACEOF
2957 #line 2957 "configure"
2958 #include "confdefs.h"
2959
2960 #include <stdlib.h>
2961 #include <stdio.h>
2962
2963 int
2964 main ()
2965 {
2966
2967                 printf("Hello world!\n")
2968
2969   ;
2970   return 0;
2971 }
2972 _ACEOF
2973 rm -f conftest.$ac_objext
2974 if { (eval echo "$as_me:2974: \"$ac_compile\"") >&5
2975   (eval $ac_compile) 2>&5
2976   ac_status=$?
2977   echo "$as_me:2977: \$? = $ac_status" >&5
2978   (exit $ac_status); } &&
2979          { ac_try='test -s conftest.$ac_objext'
2980   { (eval echo "$as_me:2980: \"$ac_try\"") >&5
2981   (eval $ac_try) 2>&5
2982   ac_status=$?
2983   echo "$as_me:2983: \$? = $ac_status" >&5
2984   (exit $ac_status); }; }; then
2985   cf_cxx_works=yes
2986 else
2987   echo "$as_me: failed program was:" >&5
2988 cat conftest.$ac_ext >&5
2989 cf_cxx_works=no
2990 fi
2991 rm -f conftest.$ac_objext conftest.$ac_ext
2992                 CPPFLAGS="$save_CPPFLAGS"
2993
2994                 echo "$as_me:2994: result: $cf_cxx_works" >&5
2995 echo "${ECHO_T}$cf_cxx_works" >&6
2996                 if test "x$cf_cxx_works" = xno
2997                 then
2998                         { echo "$as_me:2998: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2999 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3000                         cf_with_cxx=no; CXX=""; GXX="";
3001                 fi
3002         fi
3003         ac_ext=c
3004 ac_cpp='$CPP $CPPFLAGS'
3005 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3006 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3008 ac_main_return=return
3009
3010         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3011         if test "$CXX" = "g++" ; then
3012                 # Extract the first word of "g++", so it can be a program name with args.
3013 set dummy g++; ac_word=$2
3014 echo "$as_me:3014: checking for $ac_word" >&5
3015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3016 if test "${ac_cv_path_CXX+set}" = set; then
3017   echo $ECHO_N "(cached) $ECHO_C" >&6
3018 else
3019   case $CXX in
3020   [\\/]* | ?:[\\/]*)
3021   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3022   ;;
3023   *)
3024   ac_save_IFS=$IFS; IFS=$ac_path_separator
3025 ac_dummy="$PATH"
3026 for ac_dir in $ac_dummy; do
3027   IFS=$ac_save_IFS
3028   test -z "$ac_dir" && ac_dir=.
3029   if $as_executable_p "$ac_dir/$ac_word"; then
3030    ac_cv_path_CXX="$ac_dir/$ac_word"
3031    echo "$as_me:3031: found $ac_dir/$ac_word" >&5
3032    break
3033 fi
3034 done
3035
3036   ;;
3037 esac
3038 fi
3039 CXX=$ac_cv_path_CXX
3040
3041 if test -n "$CXX"; then
3042   echo "$as_me:3042: result: $CXX" >&5
3043 echo "${ECHO_T}$CXX" >&6
3044 else
3045   echo "$as_me:3045: result: no" >&5
3046 echo "${ECHO_T}no" >&6
3047 fi
3048
3049         fi
3050         case "x$CXX" in
3051         (x|xg++)
3052                 { echo "$as_me:3052: WARNING: You don't have any C++ compiler, too bad" >&5
3053 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3054                 cf_with_cxx=no; CXX=""; GXX="";
3055                 ;;
3056         esac
3057 fi
3058
3059 GXX_VERSION=none
3060 if test "$GXX" = yes; then
3061         echo "$as_me:3061: checking version of ${CXX:-g++}" >&5
3062 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3063         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3064         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3065         echo "$as_me:3065: result: $GXX_VERSION" >&5
3066 echo "${ECHO_T}$GXX_VERSION" >&6
3067 fi
3068
3069 case $GXX_VERSION in
3070 (1*|2.[0-6]*)
3071         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3072         # cf_cxx_library=no
3073         { echo "$as_me:3073: WARNING: templates do not work" >&5
3074 echo "$as_me: WARNING: templates do not work" >&2;}
3075         ;;
3076 esac
3077
3078 echo "$as_me:3078: checking if you want to build C++ binding and demo" >&5
3079 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3080
3081 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3082 if test "${with_cxx_binding+set}" = set; then
3083   withval="$with_cxx_binding"
3084   cf_with_cxx_binding=$withval
3085 else
3086   cf_with_cxx_binding=$cf_with_cxx
3087 fi;
3088 echo "$as_me:3088: result: $cf_with_cxx_binding" >&5
3089 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3090
3091 echo "$as_me:3091: checking if you want to build with Ada95" >&5
3092 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3093 echo "$as_me:3093: result: $cf_with_ada" >&5
3094 echo "${ECHO_T}$cf_with_ada" >&6
3095
3096 echo "$as_me:3096: checking if you want to install terminal database" >&5
3097 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3098
3099 # Check whether --enable-db-install or --disable-db-install was given.
3100 if test "${enable_db_install+set}" = set; then
3101   enableval="$enable_db_install"
3102   cf_with_db_install=$enableval
3103 else
3104   cf_with_db_install=yes
3105 fi;
3106 echo "$as_me:3106: result: $cf_with_db_install" >&5
3107 echo "${ECHO_T}$cf_with_db_install" >&6
3108
3109 echo "$as_me:3109: checking if you want to install manpages" >&5
3110 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3111
3112 # Check whether --with-manpages or --without-manpages was given.
3113 if test "${with_manpages+set}" = set; then
3114   withval="$with_manpages"
3115   cf_with_manpages=$withval
3116 else
3117   cf_with_manpages=yes
3118 fi;
3119 echo "$as_me:3119: result: $cf_with_manpages" >&5
3120 echo "${ECHO_T}$cf_with_manpages" >&6
3121
3122 echo "$as_me:3122: checking if you want to build programs such as tic" >&5
3123 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3124
3125 # Check whether --with-progs or --without-progs was given.
3126 if test "${with_progs+set}" = set; then
3127   withval="$with_progs"
3128   cf_with_progs=$withval
3129 else
3130   cf_with_progs=yes
3131 fi;
3132 echo "$as_me:3132: result: $cf_with_progs" >&5
3133 echo "${ECHO_T}$cf_with_progs" >&6
3134
3135 echo "$as_me:3135: checking if you want to build test-programs" >&5
3136 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3137
3138 # Check whether --with-tests or --without-tests was given.
3139 if test "${with_tests+set}" = set; then
3140   withval="$with_tests"
3141   cf_with_tests=$withval
3142 else
3143   cf_with_tests=yes
3144 fi;
3145 echo "$as_me:3145: result: $cf_with_tests" >&5
3146 echo "${ECHO_T}$cf_with_tests" >&6
3147
3148 echo "$as_me:3148: checking if you wish to install curses.h" >&5
3149 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3150
3151 # Check whether --with-curses-h or --without-curses-h was given.
3152 if test "${with_curses_h+set}" = set; then
3153   withval="$with_curses_h"
3154   with_curses_h=$withval
3155 else
3156   with_curses_h=yes
3157 fi;
3158 echo "$as_me:3158: result: $with_curses_h" >&5
3159 echo "${ECHO_T}$with_curses_h" >&6
3160
3161 modules_to_build="ncurses"
3162 if test "X$cf_with_progs" != Xno ; then
3163 modules_to_build="$modules_to_build progs tack"
3164 fi
3165 modules_to_build="$modules_to_build panel menu form"
3166
3167 test "$program_prefix" != NONE &&
3168   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3169 # Use a double $ so make ignores it.
3170 test "$program_suffix" != NONE &&
3171   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3172 # Double any \ or $.  echo might interpret backslashes.
3173 # By default was `s,x,x', remove it if useless.
3174 cat <<\_ACEOF >conftest.sed
3175 s/[\\$]/&&/g;s/;s,x,x,$//
3176 _ACEOF
3177 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3178 rm conftest.sed
3179
3180 for ac_prog in mawk gawk nawk awk
3181 do
3182   # Extract the first word of "$ac_prog", so it can be a program name with args.
3183 set dummy $ac_prog; ac_word=$2
3184 echo "$as_me:3184: checking for $ac_word" >&5
3185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3186 if test "${ac_cv_prog_AWK+set}" = set; then
3187   echo $ECHO_N "(cached) $ECHO_C" >&6
3188 else
3189   if test -n "$AWK"; then
3190   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3191 else
3192   ac_save_IFS=$IFS; IFS=$ac_path_separator
3193 ac_dummy="$PATH"
3194 for ac_dir in $ac_dummy; do
3195   IFS=$ac_save_IFS
3196   test -z "$ac_dir" && ac_dir=.
3197   $as_executable_p "$ac_dir/$ac_word" || continue
3198 ac_cv_prog_AWK="$ac_prog"
3199 echo "$as_me:3199: found $ac_dir/$ac_word" >&5
3200 break
3201 done
3202
3203 fi
3204 fi
3205 AWK=$ac_cv_prog_AWK
3206 if test -n "$AWK"; then
3207   echo "$as_me:3207: result: $AWK" >&5
3208 echo "${ECHO_T}$AWK" >&6
3209 else
3210   echo "$as_me:3210: result: no" >&5
3211 echo "${ECHO_T}no" >&6
3212 fi
3213
3214   test -n "$AWK" && break
3215 done
3216
3217 test -z "$AWK" && { { echo "$as_me:3217: error: No awk program found" >&5
3218 echo "$as_me: error: No awk program found" >&2;}
3219    { (exit 1); exit 1; }; }
3220
3221 echo "$as_me:3221: checking for egrep" >&5
3222 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3223 if test "${ac_cv_prog_egrep+set}" = set; then
3224   echo $ECHO_N "(cached) $ECHO_C" >&6
3225 else
3226   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3227                 then ac_cv_prog_egrep='grep -E'
3228                 else ac_cv_prog_egrep='egrep'
3229         fi
3230 fi
3231 echo "$as_me:3231: result: $ac_cv_prog_egrep" >&5
3232 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3233         EGREP=$ac_cv_prog_egrep
3234
3235         test -z "$EGREP" && { { echo "$as_me:3235: error: No egrep program found" >&5
3236 echo "$as_me: error: No egrep program found" >&2;}
3237    { (exit 1); exit 1; }; }
3238
3239 # Find a good install program.  We prefer a C program (faster),
3240 # so one script is as good as another.  But avoid the broken or
3241 # incompatible versions:
3242 # SysV /etc/install, /usr/sbin/install
3243 # SunOS /usr/etc/install
3244 # IRIX /sbin/install
3245 # AIX /bin/install
3246 # AmigaOS /C/install, which installs bootblocks on floppy discs
3247 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3248 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3249 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3250 # ./install, which can be erroneously created by make from ./install.sh.
3251 echo "$as_me:3251: checking for a BSD compatible install" >&5
3252 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3253 if test -z "$INSTALL"; then
3254 if test "${ac_cv_path_install+set}" = set; then
3255   echo $ECHO_N "(cached) $ECHO_C" >&6
3256 else
3257     ac_save_IFS=$IFS; IFS=$ac_path_separator
3258   for ac_dir in $PATH; do
3259     IFS=$ac_save_IFS
3260     # Account for people who put trailing slashes in PATH elements.
3261     case $ac_dir/ in
3262     / | ./ | .// | /cC/* \
3263     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3264     | /usr/ucb/* ) ;;
3265     *)
3266       # OSF1 and SCO ODT 3.0 have their own names for install.
3267       # Don't use installbsd from OSF since it installs stuff as root
3268       # by default.
3269       for ac_prog in ginstall scoinst install; do
3270         if $as_executable_p "$ac_dir/$ac_prog"; then
3271           if test $ac_prog = install &&
3272             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3273             # AIX install.  It has an incompatible calling convention.
3274             :
3275           elif test $ac_prog = install &&
3276             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3277             # program-specific install script used by HP pwplus--don't use.
3278             :
3279           else
3280             ac_cv_path_install="$ac_dir/$ac_prog -c"
3281             break 2
3282           fi
3283         fi
3284       done
3285       ;;
3286     esac
3287   done
3288
3289 fi
3290   if test "${ac_cv_path_install+set}" = set; then
3291     INSTALL=$ac_cv_path_install
3292   else
3293     # As a last resort, use the slow shell script.  We don't cache a
3294     # path for INSTALL within a source directory, because that will
3295     # break other packages using the cache if that directory is
3296     # removed, or if the path is relative.
3297     INSTALL=$ac_install_sh
3298   fi
3299 fi
3300 echo "$as_me:3300: result: $INSTALL" >&5
3301 echo "${ECHO_T}$INSTALL" >&6
3302
3303 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3304 # It thinks the first close brace ends the variable substitution.
3305 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3306
3307 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3308
3309 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3310
3311 case $INSTALL in
3312 (/*)
3313         ;;
3314 (*)
3315         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3316         test -z "$cf_dir" && cf_dir=.
3317         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3318         ;;
3319 esac
3320
3321 for ac_prog in lint cppcheck splint
3322 do
3323   # Extract the first word of "$ac_prog", so it can be a program name with args.
3324 set dummy $ac_prog; ac_word=$2
3325 echo "$as_me:3325: checking for $ac_word" >&5
3326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3327 if test "${ac_cv_prog_LINT+set}" = set; then
3328   echo $ECHO_N "(cached) $ECHO_C" >&6
3329 else
3330   if test -n "$LINT"; then
3331   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3332 else
3333   ac_save_IFS=$IFS; IFS=$ac_path_separator
3334 ac_dummy="$PATH"
3335 for ac_dir in $ac_dummy; do
3336   IFS=$ac_save_IFS
3337   test -z "$ac_dir" && ac_dir=.
3338   $as_executable_p "$ac_dir/$ac_word" || continue
3339 ac_cv_prog_LINT="$ac_prog"
3340 echo "$as_me:3340: found $ac_dir/$ac_word" >&5
3341 break
3342 done
3343
3344 fi
3345 fi
3346 LINT=$ac_cv_prog_LINT
3347 if test -n "$LINT"; then
3348   echo "$as_me:3348: result: $LINT" >&5
3349 echo "${ECHO_T}$LINT" >&6
3350 else
3351   echo "$as_me:3351: result: no" >&5
3352 echo "${ECHO_T}no" >&6
3353 fi
3354
3355   test -n "$LINT" && break
3356 done
3357
3358 echo "$as_me:3358: checking whether ln -s works" >&5
3359 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3360 LN_S=$as_ln_s
3361 if test "$LN_S" = "ln -s"; then
3362   echo "$as_me:3362: result: yes" >&5
3363 echo "${ECHO_T}yes" >&6
3364 else
3365   echo "$as_me:3365: result: no, using $LN_S" >&5
3366 echo "${ECHO_T}no, using $LN_S" >&6
3367 fi
3368
3369 echo "$as_me:3369: checking if $LN_S -f options work" >&5
3370 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3371
3372 rm -f conf$$.src conf$$dst
3373 echo >conf$$.dst
3374 echo first >conf$$.src
3375 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3376         cf_prog_ln_sf=yes
3377 else
3378         cf_prog_ln_sf=no
3379 fi
3380 rm -f conf$$.dst conf$$src
3381 echo "$as_me:3381: result: $cf_prog_ln_sf" >&5
3382 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3383
3384 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3385
3386 echo "$as_me:3386: checking for long file names" >&5
3387 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3388 if test "${ac_cv_sys_long_file_names+set}" = set; then
3389   echo $ECHO_N "(cached) $ECHO_C" >&6
3390 else
3391   ac_cv_sys_long_file_names=yes
3392 # Test for long file names in all the places we know might matter:
3393 #      .                the current directory, where building will happen
3394 #      $prefix/lib      where we will be installing things
3395 #      $exec_prefix/lib likewise
3396 # eval it to expand exec_prefix.
3397 #      $TMPDIR          if set, where it might want to write temporary files
3398 # if $TMPDIR is not set:
3399 #      /tmp             where it might want to write temporary files
3400 #      /var/tmp         likewise
3401 #      /usr/tmp         likewise
3402 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3403   ac_tmpdirs=$TMPDIR
3404 else
3405   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3406 fi
3407 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3408   test -d $ac_dir || continue
3409   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3410   ac_xdir=$ac_dir/cf$$
3411   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3412   ac_tf1=$ac_xdir/conftest9012345
3413   ac_tf2=$ac_xdir/conftest9012346
3414   (echo 1 >$ac_tf1) 2>/dev/null
3415   (echo 2 >$ac_tf2) 2>/dev/null
3416   ac_val=`cat $ac_tf1 2>/dev/null`
3417   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3418     ac_cv_sys_long_file_names=no
3419     rm -rf $ac_xdir 2>/dev/null
3420     break
3421   fi
3422   rm -rf $ac_xdir 2>/dev/null
3423 done
3424 fi
3425 echo "$as_me:3425: result: $ac_cv_sys_long_file_names" >&5
3426 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3427 if test $ac_cv_sys_long_file_names = yes; then
3428
3429 cat >>confdefs.h <<\EOF
3430 #define HAVE_LONG_FILE_NAMES 1
3431 EOF
3432
3433 fi
3434
3435 # if we find pkg-config, check if we should install the ".pc" files.
3436
3437 echo "$as_me:3437: checking if you want to use pkg-config" >&5
3438 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3439
3440 # Check whether --with-pkg-config or --without-pkg-config was given.
3441 if test "${with_pkg_config+set}" = set; then
3442   withval="$with_pkg_config"
3443   cf_pkg_config=$withval
3444 else
3445   cf_pkg_config=yes
3446 fi;
3447 echo "$as_me:3447: result: $cf_pkg_config" >&5
3448 echo "${ECHO_T}$cf_pkg_config" >&6
3449
3450 case $cf_pkg_config in
3451 (no)
3452         PKG_CONFIG=none
3453         ;;
3454 (yes)
3455
3456 if test -n "$ac_tool_prefix"; then
3457   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3458 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3459 echo "$as_me:3459: checking for $ac_word" >&5
3460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3461 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3462   echo $ECHO_N "(cached) $ECHO_C" >&6
3463 else
3464   case $PKG_CONFIG in
3465   [\\/]* | ?:[\\/]*)
3466   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3467   ;;
3468   *)
3469   ac_save_IFS=$IFS; IFS=$ac_path_separator
3470 ac_dummy="$PATH"
3471 for ac_dir in $ac_dummy; do
3472   IFS=$ac_save_IFS
3473   test -z "$ac_dir" && ac_dir=.
3474   if $as_executable_p "$ac_dir/$ac_word"; then
3475    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3476    echo "$as_me:3476: found $ac_dir/$ac_word" >&5
3477    break
3478 fi
3479 done
3480
3481   ;;
3482 esac
3483 fi
3484 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3485
3486 if test -n "$PKG_CONFIG"; then
3487   echo "$as_me:3487: result: $PKG_CONFIG" >&5
3488 echo "${ECHO_T}$PKG_CONFIG" >&6
3489 else
3490   echo "$as_me:3490: result: no" >&5
3491 echo "${ECHO_T}no" >&6
3492 fi
3493
3494 fi
3495 if test -z "$ac_cv_path_PKG_CONFIG"; then
3496   ac_pt_PKG_CONFIG=$PKG_CONFIG
3497   # Extract the first word of "pkg-config", so it can be a program name with args.
3498 set dummy pkg-config; ac_word=$2
3499 echo "$as_me:3499: checking for $ac_word" >&5
3500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3501 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3502   echo $ECHO_N "(cached) $ECHO_C" >&6
3503 else
3504   case $ac_pt_PKG_CONFIG in
3505   [\\/]* | ?:[\\/]*)
3506   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3507   ;;
3508   *)
3509   ac_save_IFS=$IFS; IFS=$ac_path_separator
3510 ac_dummy="$PATH"
3511 for ac_dir in $ac_dummy; do
3512   IFS=$ac_save_IFS
3513   test -z "$ac_dir" && ac_dir=.
3514   if $as_executable_p "$ac_dir/$ac_word"; then
3515    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3516    echo "$as_me:3516: found $ac_dir/$ac_word" >&5
3517    break
3518 fi
3519 done
3520
3521   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3522   ;;
3523 esac
3524 fi
3525 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3526
3527 if test -n "$ac_pt_PKG_CONFIG"; then
3528   echo "$as_me:3528: result: $ac_pt_PKG_CONFIG" >&5
3529 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3530 else
3531   echo "$as_me:3531: result: no" >&5
3532 echo "${ECHO_T}no" >&6
3533 fi
3534
3535   PKG_CONFIG=$ac_pt_PKG_CONFIG
3536 else
3537   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3538 fi
3539
3540         ;;
3541 (*)
3542         PKG_CONFIG=$withval
3543         ;;
3544 esac
3545
3546 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3547 if test "$PKG_CONFIG" != none ; then
3548
3549 if test "x$prefix" != xNONE; then
3550         cf_path_syntax="$prefix"
3551 else
3552         cf_path_syntax="$ac_default_prefix"
3553 fi
3554
3555 case ".$PKG_CONFIG" in
3556 (.\$\(*\)*|.\'*\'*)
3557         ;;
3558 (..|./*|.\\*)
3559         ;;
3560 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3561         ;;
3562 (.\${*prefix}*|.\${*dir}*)
3563         eval PKG_CONFIG="$PKG_CONFIG"
3564         case ".$PKG_CONFIG" in
3565         (.NONE/*)
3566                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3567                 ;;
3568         esac
3569         ;;
3570 (.no|.NONE/*)
3571         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3572         ;;
3573 (*)
3574         { { echo "$as_me:3574: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3575 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3576    { (exit 1); exit 1; }; }
3577         ;;
3578 esac
3579
3580 elif test "x$cf_pkg_config" != xno ; then
3581         { echo "$as_me:3581: WARNING: pkg-config is not installed" >&5
3582 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3583 fi
3584
3585 case $PKG_CONFIG in
3586 (no|none|yes)
3587         echo "$as_me:3587: checking for pkg-config library directory" >&5
3588 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3589         ;;
3590 (*)
3591         echo "$as_me:3591: checking for $PKG_CONFIG library directory" >&5
3592 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3593         ;;
3594 esac
3595
3596 PKG_CONFIG_LIBDIR=no
3597
3598 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3599 if test "${with_pkg_config_libdir+set}" = set; then
3600   withval="$with_pkg_config_libdir"
3601   PKG_CONFIG_LIBDIR=$withval
3602 else
3603   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3604 fi;
3605
3606 case x$PKG_CONFIG_LIBDIR in
3607 (x/*)
3608         ;;
3609 (xyes)
3610         # Look for the library directory using the same prefix as the executable
3611         if test "x$PKG_CONFIG" = xnone
3612         then
3613                 cf_path=$prefix
3614         else
3615                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3616         fi
3617
3618         # If you don't like using the default architecture, you have to specify the
3619         # intended library directory and corresponding compiler/linker options.
3620         #
3621         # This case allows for Debian's 2014-flavor of multiarch, along with the
3622         # most common variations before that point.  Some other variants spell the
3623         # directory differently, e.g., "pkg-config", and put it in unusual places.
3624         # pkg-config has always been poorly standardized, which is ironic...
3625         case x`(arch) 2>/dev/null` in
3626         (*64)
3627                 cf_search_path="\
3628                         $cf_path/lib/*64-linux-gnu \
3629                         $cf_path/share \
3630                         $cf_path/lib64 \
3631                         $cf_path/lib32 \
3632                         $cf_path/lib"
3633                 ;;
3634         (*)
3635                 cf_search_path="\
3636                         $cf_path/lib/*-linux-gnu \
3637                         $cf_path/share \
3638                         $cf_path/lib32 \
3639                         $cf_path/lib \
3640                         $cf_path/libdata"
3641                 ;;
3642         esac
3643
3644         test -n "$verbose" && echo "    list..." 1>&6
3645
3646 echo "${as_me:-configure}:3646: testing list... ..." 1>&5
3647
3648         for cf_config in $cf_search_path
3649         do
3650                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3651
3652 echo "${as_me:-configure}:3652: testing checking $cf_config/pkgconfig ..." 1>&5
3653
3654                 if test -d $cf_config/pkgconfig
3655                 then
3656                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3657                         echo "$as_me:3657: checking done" >&5
3658 echo $ECHO_N "checking done... $ECHO_C" >&6
3659                         break
3660                 fi
3661         done
3662         ;;
3663 (*)
3664         ;;
3665 esac
3666
3667 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3668         echo "$as_me:3668: result: $PKG_CONFIG_LIBDIR" >&5
3669 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3670 fi
3671
3672 if test "x$PKG_CONFIG" != xnone
3673 then
3674         echo "$as_me:3674: checking if we should install .pc files for $PKG_CONFIG" >&5
3675 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3676 else
3677         echo "$as_me:3677: checking if we should install .pc files" >&5
3678 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3679 fi
3680
3681 # Check whether --enable-pc-files or --disable-pc-files was given.
3682 if test "${enable_pc_files+set}" = set; then
3683   enableval="$enable_pc_files"
3684   enable_pc_files=$enableval
3685 else
3686   enable_pc_files=no
3687 fi;
3688 echo "$as_me:3688: result: $enable_pc_files" >&5
3689 echo "${ECHO_T}$enable_pc_files" >&6
3690
3691 if test "x$enable_pc_files" != xno
3692 then
3693         MAKE_PC_FILES=
3694         case "x$PKG_CONFIG_LIBDIR" in
3695         (xno|xyes)
3696                 { echo "$as_me:3696: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3697 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3698                 ;;
3699         (*)
3700
3701 if test "x$prefix" != xNONE; then
3702         cf_path_syntax="$prefix"
3703 else
3704         cf_path_syntax="$ac_default_prefix"
3705 fi
3706
3707 case ".$PKG_CONFIG_LIBDIR" in
3708 (.\$\(*\)*|.\'*\'*)
3709         ;;
3710 (..|./*|.\\*)
3711         ;;
3712 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3713         ;;
3714 (.\${*prefix}*|.\${*dir}*)
3715         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3716         case ".$PKG_CONFIG_LIBDIR" in
3717         (.NONE/*)
3718                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3719                 ;;
3720         esac
3721         ;;
3722 (.no|.NONE/*)
3723         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3724         ;;
3725 (*)
3726         { { echo "$as_me:3726: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3727 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3728    { (exit 1); exit 1; }; }
3729         ;;
3730 esac
3731
3732                 ;;
3733         esac
3734 else
3735         MAKE_PC_FILES="#"
3736 fi
3737
3738 if test -z "$MAKE_PC_FILES"
3739 then
3740         echo "$as_me:3740: checking for suffix to add to pc-files" >&5
3741 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3742
3743 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3744 if test "${with_pc_suffix+set}" = set; then
3745   withval="$with_pc_suffix"
3746   case "x$withval" in
3747         (xyes|xno)
3748                 PC_MODULE_SUFFIX=
3749                 ;;
3750         (*)     PC_MODULE_SUFFIX="$withval"
3751                 ;;
3752         esac
3753 fi;
3754         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3755         echo "$as_me:3755: result: $PC_MODULE_SUFFIX" >&5
3756 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3757         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3758
3759 fi
3760
3761 echo "$as_me:3761: checking if we should assume mixed-case filenames" >&5
3762 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3763
3764 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3765 if test "${enable_mixed_case+set}" = set; then
3766   enableval="$enable_mixed_case"
3767   enable_mixedcase=$enableval
3768 else
3769   enable_mixedcase=auto
3770 fi;
3771 echo "$as_me:3771: result: $enable_mixedcase" >&5
3772 echo "${ECHO_T}$enable_mixedcase" >&6
3773 if test "$enable_mixedcase" = "auto" ; then
3774
3775 echo "$as_me:3775: checking if filesystem supports mixed-case filenames" >&5
3776 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3777 if test "${cf_cv_mixedcase+set}" = set; then
3778   echo $ECHO_N "(cached) $ECHO_C" >&6
3779 else
3780
3781 if test "$cross_compiling" = yes ; then
3782         case $target_alias in
3783         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3784                 cf_cv_mixedcase=no
3785                 ;;
3786         (*)
3787                 cf_cv_mixedcase=yes
3788                 ;;
3789         esac
3790 else
3791         rm -f conftest CONFTEST
3792         echo test >conftest
3793         if test -f CONFTEST ; then
3794                 cf_cv_mixedcase=no
3795         else
3796                 cf_cv_mixedcase=yes
3797         fi
3798         rm -f conftest CONFTEST
3799 fi
3800
3801 fi
3802 echo "$as_me:3802: result: $cf_cv_mixedcase" >&5
3803 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3804 test "$cf_cv_mixedcase" = yes &&
3805 cat >>confdefs.h <<\EOF
3806 #define MIXEDCASE_FILENAMES 1
3807 EOF
3808
3809 else
3810         cf_cv_mixedcase=$enable_mixedcase
3811         if test "x$enable_mixedcase" = "xyes" ; then
3812
3813 cat >>confdefs.h <<\EOF
3814 #define MIXEDCASE_FILENAMES 1
3815 EOF
3816
3817         fi
3818 fi
3819
3820 # do this after mixed-case option (tags/TAGS is not as important as tic).
3821 echo "$as_me:3821: checking whether ${MAKE-make} sets \${MAKE}" >&5
3822 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3823 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3824 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3825   echo $ECHO_N "(cached) $ECHO_C" >&6
3826 else
3827   cat >conftest.make <<\EOF
3828 all:
3829         @echo 'ac_maketemp="${MAKE}"'
3830 EOF
3831 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3832 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3833 if test -n "$ac_maketemp"; then
3834   eval ac_cv_prog_make_${ac_make}_set=yes
3835 else
3836   eval ac_cv_prog_make_${ac_make}_set=no
3837 fi
3838 rm -f conftest.make
3839 fi
3840 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3841   echo "$as_me:3841: result: yes" >&5
3842 echo "${ECHO_T}yes" >&6
3843   SET_MAKE=
3844 else
3845   echo "$as_me:3845: result: no" >&5
3846 echo "${ECHO_T}no" >&6
3847   SET_MAKE="MAKE=${MAKE-make}"
3848 fi
3849
3850 for ac_prog in exctags ctags
3851 do
3852   # Extract the first word of "$ac_prog", so it can be a program name with args.
3853 set dummy $ac_prog; ac_word=$2
3854 echo "$as_me:3854: checking for $ac_word" >&5
3855 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3856 if test "${ac_cv_prog_CTAGS+set}" = set; then
3857   echo $ECHO_N "(cached) $ECHO_C" >&6
3858 else
3859   if test -n "$CTAGS"; then
3860   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3861 else
3862   ac_save_IFS=$IFS; IFS=$ac_path_separator
3863 ac_dummy="$PATH"
3864 for ac_dir in $ac_dummy; do
3865   IFS=$ac_save_IFS
3866   test -z "$ac_dir" && ac_dir=.
3867   $as_executable_p "$ac_dir/$ac_word" || continue
3868 ac_cv_prog_CTAGS="$ac_prog"
3869 echo "$as_me:3869: found $ac_dir/$ac_word" >&5
3870 break
3871 done
3872
3873 fi
3874 fi
3875 CTAGS=$ac_cv_prog_CTAGS
3876 if test -n "$CTAGS"; then
3877   echo "$as_me:3877: result: $CTAGS" >&5
3878 echo "${ECHO_T}$CTAGS" >&6
3879 else
3880   echo "$as_me:3880: result: no" >&5
3881 echo "${ECHO_T}no" >&6
3882 fi
3883
3884   test -n "$CTAGS" && break
3885 done
3886
3887 for ac_prog in exetags etags
3888 do
3889   # Extract the first word of "$ac_prog", so it can be a program name with args.
3890 set dummy $ac_prog; ac_word=$2
3891 echo "$as_me:3891: checking for $ac_word" >&5
3892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3893 if test "${ac_cv_prog_ETAGS+set}" = set; then
3894   echo $ECHO_N "(cached) $ECHO_C" >&6
3895 else
3896   if test -n "$ETAGS"; then
3897   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3898 else
3899   ac_save_IFS=$IFS; IFS=$ac_path_separator
3900 ac_dummy="$PATH"
3901 for ac_dir in $ac_dummy; do
3902   IFS=$ac_save_IFS
3903   test -z "$ac_dir" && ac_dir=.
3904   $as_executable_p "$ac_dir/$ac_word" || continue
3905 ac_cv_prog_ETAGS="$ac_prog"
3906 echo "$as_me:3906: found $ac_dir/$ac_word" >&5
3907 break
3908 done
3909
3910 fi
3911 fi
3912 ETAGS=$ac_cv_prog_ETAGS
3913 if test -n "$ETAGS"; then
3914   echo "$as_me:3914: result: $ETAGS" >&5
3915 echo "${ECHO_T}$ETAGS" >&6
3916 else
3917   echo "$as_me:3917: result: no" >&5
3918 echo "${ECHO_T}no" >&6
3919 fi
3920
3921   test -n "$ETAGS" && break
3922 done
3923
3924 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3925 set dummy ${CTAGS:-ctags}; ac_word=$2
3926 echo "$as_me:3926: checking for $ac_word" >&5
3927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3928 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3929   echo $ECHO_N "(cached) $ECHO_C" >&6
3930 else
3931   if test -n "$MAKE_LOWER_TAGS"; then
3932   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3933 else
3934   ac_save_IFS=$IFS; IFS=$ac_path_separator
3935 ac_dummy="$PATH"
3936 for ac_dir in $ac_dummy; do
3937   IFS=$ac_save_IFS
3938   test -z "$ac_dir" && ac_dir=.
3939   $as_executable_p "$ac_dir/$ac_word" || continue
3940 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3941 echo "$as_me:3941: found $ac_dir/$ac_word" >&5
3942 break
3943 done
3944
3945   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3946 fi
3947 fi
3948 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3949 if test -n "$MAKE_LOWER_TAGS"; then
3950   echo "$as_me:3950: result: $MAKE_LOWER_TAGS" >&5
3951 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3952 else
3953   echo "$as_me:3953: result: no" >&5
3954 echo "${ECHO_T}no" >&6
3955 fi
3956
3957 if test "$cf_cv_mixedcase" = yes ; then
3958         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3959 set dummy ${ETAGS:-etags}; ac_word=$2
3960 echo "$as_me:3960: checking for $ac_word" >&5
3961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3962 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3963   echo $ECHO_N "(cached) $ECHO_C" >&6
3964 else
3965   if test -n "$MAKE_UPPER_TAGS"; then
3966   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3967 else
3968   ac_save_IFS=$IFS; IFS=$ac_path_separator
3969 ac_dummy="$PATH"
3970 for ac_dir in $ac_dummy; do
3971   IFS=$ac_save_IFS
3972   test -z "$ac_dir" && ac_dir=.
3973   $as_executable_p "$ac_dir/$ac_word" || continue
3974 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3975 echo "$as_me:3975: found $ac_dir/$ac_word" >&5
3976 break
3977 done
3978
3979   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3980 fi
3981 fi
3982 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3983 if test -n "$MAKE_UPPER_TAGS"; then
3984   echo "$as_me:3984: result: $MAKE_UPPER_TAGS" >&5
3985 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3986 else
3987   echo "$as_me:3987: result: no" >&5
3988 echo "${ECHO_T}no" >&6
3989 fi
3990
3991 else
3992         MAKE_UPPER_TAGS=no
3993 fi
3994
3995 if test "$MAKE_UPPER_TAGS" = yes ; then
3996         MAKE_UPPER_TAGS=
3997 else
3998         MAKE_UPPER_TAGS="#"
3999 fi
4000
4001 if test "$MAKE_LOWER_TAGS" = yes ; then
4002         MAKE_LOWER_TAGS=
4003 else
4004         MAKE_LOWER_TAGS="#"
4005 fi
4006
4007 echo "$as_me:4007: checking for makeflags variable" >&5
4008 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4009 if test "${cf_cv_makeflags+set}" = set; then
4010   echo $ECHO_N "(cached) $ECHO_C" >&6
4011 else
4012
4013         cf_cv_makeflags=''
4014         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4015         do
4016                 cat >cf_makeflags.tmp <<CF_EOF
4017 SHELL = $SHELL
4018 all :
4019         @ echo '.$cf_option'
4020 CF_EOF
4021                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4022                 case "$cf_result" in
4023                 (.*k|.*kw)
4024                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4025                         case "$cf_result" in
4026                         (.*CC=*)        cf_cv_makeflags=
4027                                 ;;
4028                         (*)     cf_cv_makeflags=$cf_option
4029                                 ;;
4030                         esac
4031                         break
4032                         ;;
4033                 (.-)    ;;
4034                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4035                         ;;
4036                 esac
4037         done
4038         rm -f cf_makeflags.tmp
4039
4040 fi
4041 echo "$as_me:4041: result: $cf_cv_makeflags" >&5
4042 echo "${ECHO_T}$cf_cv_makeflags" >&6
4043
4044 if test -n "$ac_tool_prefix"; then
4045   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4046 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4047 echo "$as_me:4047: checking for $ac_word" >&5
4048 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4049 if test "${ac_cv_prog_RANLIB+set}" = set; then
4050   echo $ECHO_N "(cached) $ECHO_C" >&6
4051 else
4052   if test -n "$RANLIB"; then
4053   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4054 else
4055   ac_save_IFS=$IFS; IFS=$ac_path_separator
4056 ac_dummy="$PATH"
4057 for ac_dir in $ac_dummy; do
4058   IFS=$ac_save_IFS
4059   test -z "$ac_dir" && ac_dir=.
4060   $as_executable_p "$ac_dir/$ac_word" || continue
4061 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4062 echo "$as_me:4062: found $ac_dir/$ac_word" >&5
4063 break
4064 done
4065
4066 fi
4067 fi
4068 RANLIB=$ac_cv_prog_RANLIB
4069 if test -n "$RANLIB"; then
4070   echo "$as_me:4070: result: $RANLIB" >&5
4071 echo "${ECHO_T}$RANLIB" >&6
4072 else
4073   echo "$as_me:4073: result: no" >&5
4074 echo "${ECHO_T}no" >&6
4075 fi
4076
4077 fi
4078 if test -z "$ac_cv_prog_RANLIB"; then
4079   ac_ct_RANLIB=$RANLIB
4080   # Extract the first word of "ranlib", so it can be a program name with args.
4081 set dummy ranlib; ac_word=$2
4082 echo "$as_me:4082: checking for $ac_word" >&5
4083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4084 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4085   echo $ECHO_N "(cached) $ECHO_C" >&6
4086 else
4087   if test -n "$ac_ct_RANLIB"; then
4088   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4089 else
4090   ac_save_IFS=$IFS; IFS=$ac_path_separator
4091 ac_dummy="$PATH"
4092 for ac_dir in $ac_dummy; do
4093   IFS=$ac_save_IFS
4094   test -z "$ac_dir" && ac_dir=.
4095   $as_executable_p "$ac_dir/$ac_word" || continue
4096 ac_cv_prog_ac_ct_RANLIB="ranlib"
4097 echo "$as_me:4097: found $ac_dir/$ac_word" >&5
4098 break
4099 done
4100
4101   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4102 fi
4103 fi
4104 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4105 if test -n "$ac_ct_RANLIB"; then
4106   echo "$as_me:4106: result: $ac_ct_RANLIB" >&5
4107 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4108 else
4109   echo "$as_me:4109: result: no" >&5
4110 echo "${ECHO_T}no" >&6
4111 fi
4112
4113   RANLIB=$ac_ct_RANLIB
4114 else
4115   RANLIB="$ac_cv_prog_RANLIB"
4116 fi
4117
4118 if test -n "$ac_tool_prefix"; then
4119   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4120 set dummy ${ac_tool_prefix}ld; ac_word=$2
4121 echo "$as_me:4121: checking for $ac_word" >&5
4122 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4123 if test "${ac_cv_prog_LD+set}" = set; then
4124   echo $ECHO_N "(cached) $ECHO_C" >&6
4125 else
4126   if test -n "$LD"; then
4127   ac_cv_prog_LD="$LD" # Let the user override the test.
4128 else
4129   ac_save_IFS=$IFS; IFS=$ac_path_separator
4130 ac_dummy="$PATH"
4131 for ac_dir in $ac_dummy; do
4132   IFS=$ac_save_IFS
4133   test -z "$ac_dir" && ac_dir=.
4134   $as_executable_p "$ac_dir/$ac_word" || continue
4135 ac_cv_prog_LD="${ac_tool_prefix}ld"
4136 echo "$as_me:4136: found $ac_dir/$ac_word" >&5
4137 break
4138 done
4139
4140 fi
4141 fi
4142 LD=$ac_cv_prog_LD
4143 if test -n "$LD"; then
4144   echo "$as_me:4144: result: $LD" >&5
4145 echo "${ECHO_T}$LD" >&6
4146 else
4147   echo "$as_me:4147: result: no" >&5
4148 echo "${ECHO_T}no" >&6
4149 fi
4150
4151 fi
4152 if test -z "$ac_cv_prog_LD"; then
4153   ac_ct_LD=$LD
4154   # Extract the first word of "ld", so it can be a program name with args.
4155 set dummy ld; ac_word=$2
4156 echo "$as_me:4156: checking for $ac_word" >&5
4157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4158 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4159   echo $ECHO_N "(cached) $ECHO_C" >&6
4160 else
4161   if test -n "$ac_ct_LD"; then
4162   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4163 else
4164   ac_save_IFS=$IFS; IFS=$ac_path_separator
4165 ac_dummy="$PATH"
4166 for ac_dir in $ac_dummy; do
4167   IFS=$ac_save_IFS
4168   test -z "$ac_dir" && ac_dir=.
4169   $as_executable_p "$ac_dir/$ac_word" || continue
4170 ac_cv_prog_ac_ct_LD="ld"
4171 echo "$as_me:4171: found $ac_dir/$ac_word" >&5
4172 break
4173 done
4174
4175   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4176 fi
4177 fi
4178 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4179 if test -n "$ac_ct_LD"; then
4180   echo "$as_me:4180: result: $ac_ct_LD" >&5
4181 echo "${ECHO_T}$ac_ct_LD" >&6
4182 else
4183   echo "$as_me:4183: result: no" >&5
4184 echo "${ECHO_T}no" >&6
4185 fi
4186
4187   LD=$ac_ct_LD
4188 else
4189   LD="$ac_cv_prog_LD"
4190 fi
4191
4192 if test -n "$ac_tool_prefix"; then
4193   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4194 set dummy ${ac_tool_prefix}ar; ac_word=$2
4195 echo "$as_me:4195: checking for $ac_word" >&5
4196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4197 if test "${ac_cv_prog_AR+set}" = set; then
4198   echo $ECHO_N "(cached) $ECHO_C" >&6
4199 else
4200   if test -n "$AR"; then
4201   ac_cv_prog_AR="$AR" # Let the user override the test.
4202 else
4203   ac_save_IFS=$IFS; IFS=$ac_path_separator
4204 ac_dummy="$PATH"
4205 for ac_dir in $ac_dummy; do
4206   IFS=$ac_save_IFS
4207   test -z "$ac_dir" && ac_dir=.
4208   $as_executable_p "$ac_dir/$ac_word" || continue
4209 ac_cv_prog_AR="${ac_tool_prefix}ar"
4210 echo "$as_me:4210: found $ac_dir/$ac_word" >&5
4211 break
4212 done
4213
4214 fi
4215 fi
4216 AR=$ac_cv_prog_AR
4217 if test -n "$AR"; then
4218   echo "$as_me:4218: result: $AR" >&5
4219 echo "${ECHO_T}$AR" >&6
4220 else
4221   echo "$as_me:4221: result: no" >&5
4222 echo "${ECHO_T}no" >&6
4223 fi
4224
4225 fi
4226 if test -z "$ac_cv_prog_AR"; then
4227   ac_ct_AR=$AR
4228   # Extract the first word of "ar", so it can be a program name with args.
4229 set dummy ar; ac_word=$2
4230 echo "$as_me:4230: checking for $ac_word" >&5
4231 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4232 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4233   echo $ECHO_N "(cached) $ECHO_C" >&6
4234 else
4235   if test -n "$ac_ct_AR"; then
4236   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4237 else
4238   ac_save_IFS=$IFS; IFS=$ac_path_separator
4239 ac_dummy="$PATH"
4240 for ac_dir in $ac_dummy; do
4241   IFS=$ac_save_IFS
4242   test -z "$ac_dir" && ac_dir=.
4243   $as_executable_p "$ac_dir/$ac_word" || continue
4244 ac_cv_prog_ac_ct_AR="ar"
4245 echo "$as_me:4245: found $ac_dir/$ac_word" >&5
4246 break
4247 done
4248
4249   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4250 fi
4251 fi
4252 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4253 if test -n "$ac_ct_AR"; then
4254   echo "$as_me:4254: result: $ac_ct_AR" >&5
4255 echo "${ECHO_T}$ac_ct_AR" >&6
4256 else
4257   echo "$as_me:4257: result: no" >&5
4258 echo "${ECHO_T}no" >&6
4259 fi
4260
4261   AR=$ac_ct_AR
4262 else
4263   AR="$ac_cv_prog_AR"
4264 fi
4265
4266 if test -n "$ac_tool_prefix"; then
4267   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4268 set dummy ${ac_tool_prefix}nm; ac_word=$2
4269 echo "$as_me:4269: checking for $ac_word" >&5
4270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4271 if test "${ac_cv_prog_NM+set}" = set; then
4272   echo $ECHO_N "(cached) $ECHO_C" >&6
4273 else
4274   if test -n "$NM"; then
4275   ac_cv_prog_NM="$NM" # Let the user override the test.
4276 else
4277   ac_save_IFS=$IFS; IFS=$ac_path_separator
4278 ac_dummy="$PATH"
4279 for ac_dir in $ac_dummy; do
4280   IFS=$ac_save_IFS
4281   test -z "$ac_dir" && ac_dir=.
4282   $as_executable_p "$ac_dir/$ac_word" || continue
4283 ac_cv_prog_NM="${ac_tool_prefix}nm"
4284 echo "$as_me:4284: found $ac_dir/$ac_word" >&5
4285 break
4286 done
4287
4288 fi
4289 fi
4290 NM=$ac_cv_prog_NM
4291 if test -n "$NM"; then
4292   echo "$as_me:4292: result: $NM" >&5
4293 echo "${ECHO_T}$NM" >&6
4294 else
4295   echo "$as_me:4295: result: no" >&5
4296 echo "${ECHO_T}no" >&6
4297 fi
4298
4299 fi
4300 if test -z "$ac_cv_prog_NM"; then
4301   ac_ct_NM=$NM
4302   # Extract the first word of "nm", so it can be a program name with args.
4303 set dummy nm; ac_word=$2
4304 echo "$as_me:4304: checking for $ac_word" >&5
4305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4306 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4307   echo $ECHO_N "(cached) $ECHO_C" >&6
4308 else
4309   if test -n "$ac_ct_NM"; then
4310   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4311 else
4312   ac_save_IFS=$IFS; IFS=$ac_path_separator
4313 ac_dummy="$PATH"
4314 for ac_dir in $ac_dummy; do
4315   IFS=$ac_save_IFS
4316   test -z "$ac_dir" && ac_dir=.
4317   $as_executable_p "$ac_dir/$ac_word" || continue
4318 ac_cv_prog_ac_ct_NM="nm"
4319 echo "$as_me:4319: found $ac_dir/$ac_word" >&5
4320 break
4321 done
4322
4323   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4324 fi
4325 fi
4326 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4327 if test -n "$ac_ct_NM"; then
4328   echo "$as_me:4328: result: $ac_ct_NM" >&5
4329 echo "${ECHO_T}$ac_ct_NM" >&6
4330 else
4331   echo "$as_me:4331: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4333 fi
4334
4335   NM=$ac_ct_NM
4336 else
4337   NM="$ac_cv_prog_NM"
4338 fi
4339
4340 if test -n "$ac_tool_prefix"; then
4341   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4342 set dummy ${ac_tool_prefix}ar; ac_word=$2
4343 echo "$as_me:4343: checking for $ac_word" >&5
4344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4345 if test "${ac_cv_prog_AR+set}" = set; then
4346   echo $ECHO_N "(cached) $ECHO_C" >&6
4347 else
4348   if test -n "$AR"; then
4349   ac_cv_prog_AR="$AR" # Let the user override the test.
4350 else
4351   ac_save_IFS=$IFS; IFS=$ac_path_separator
4352 ac_dummy="$PATH"
4353 for ac_dir in $ac_dummy; do
4354   IFS=$ac_save_IFS
4355   test -z "$ac_dir" && ac_dir=.
4356   $as_executable_p "$ac_dir/$ac_word" || continue
4357 ac_cv_prog_AR="${ac_tool_prefix}ar"
4358 echo "$as_me:4358: found $ac_dir/$ac_word" >&5
4359 break
4360 done
4361
4362 fi
4363 fi
4364 AR=$ac_cv_prog_AR
4365 if test -n "$AR"; then
4366   echo "$as_me:4366: result: $AR" >&5
4367 echo "${ECHO_T}$AR" >&6
4368 else
4369   echo "$as_me:4369: result: no" >&5
4370 echo "${ECHO_T}no" >&6
4371 fi
4372
4373 fi
4374 if test -z "$ac_cv_prog_AR"; then
4375   ac_ct_AR=$AR
4376   # Extract the first word of "ar", so it can be a program name with args.
4377 set dummy ar; ac_word=$2
4378 echo "$as_me:4378: checking for $ac_word" >&5
4379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4380 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4381   echo $ECHO_N "(cached) $ECHO_C" >&6
4382 else
4383   if test -n "$ac_ct_AR"; then
4384   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4385 else
4386   ac_save_IFS=$IFS; IFS=$ac_path_separator
4387 ac_dummy="$PATH"
4388 for ac_dir in $ac_dummy; do
4389   IFS=$ac_save_IFS
4390   test -z "$ac_dir" && ac_dir=.
4391   $as_executable_p "$ac_dir/$ac_word" || continue
4392 ac_cv_prog_ac_ct_AR="ar"
4393 echo "$as_me:4393: found $ac_dir/$ac_word" >&5
4394 break
4395 done
4396
4397   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4398 fi
4399 fi
4400 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4401 if test -n "$ac_ct_AR"; then
4402   echo "$as_me:4402: result: $ac_ct_AR" >&5
4403 echo "${ECHO_T}$ac_ct_AR" >&6
4404 else
4405   echo "$as_me:4405: result: no" >&5
4406 echo "${ECHO_T}no" >&6
4407 fi
4408
4409   AR=$ac_ct_AR
4410 else
4411   AR="$ac_cv_prog_AR"
4412 fi
4413
4414 echo "$as_me:4414: checking for options to update archives" >&5
4415 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4416 if test "${cf_cv_ar_flags+set}" = set; then
4417   echo $ECHO_N "(cached) $ECHO_C" >&6
4418 else
4419
4420         cf_cv_ar_flags=unknown
4421         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4422         do
4423
4424                 # check if $ARFLAGS already contains this choice
4425                 if test "x$ARFLAGS" != "x" ; then
4426                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4427                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4428                                 cf_cv_ar_flags=
4429                                 break
4430                         fi
4431                 fi
4432
4433                 rm -f conftest.$ac_cv_objext
4434                 rm -f conftest.a
4435
4436                 cat >conftest.$ac_ext <<EOF
4437 #line 4437 "configure"
4438 int     testdata[3] = { 123, 456, 789 };
4439 EOF
4440                 if { (eval echo "$as_me:4440: \"$ac_compile\"") >&5
4441   (eval $ac_compile) 2>&5
4442   ac_status=$?
4443   echo "$as_me:4443: \$? = $ac_status" >&5
4444   (exit $ac_status); } ; then
4445                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4446                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4447                         if test -f conftest.a ; then
4448                                 cf_cv_ar_flags=$cf_ar_flags
4449                                 break
4450                         fi
4451                 else
4452                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4453
4454 echo "${as_me:-configure}:4454: testing cannot compile test-program ..." 1>&5
4455
4456                         break
4457                 fi
4458         done
4459         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4460
4461 fi
4462 echo "$as_me:4462: result: $cf_cv_ar_flags" >&5
4463 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4464
4465 if test -n "$ARFLAGS" ; then
4466         if test -n "$cf_cv_ar_flags" ; then
4467                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4468         fi
4469 else
4470         ARFLAGS=$cf_cv_ar_flags
4471 fi
4472
4473 echo "$as_me:4473: checking if you have specified an install-prefix" >&5
4474 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4475
4476 # Check whether --with-install-prefix or --without-install-prefix was given.
4477 if test "${with_install_prefix+set}" = set; then
4478   withval="$with_install_prefix"
4479   case "x$withval" in
4480         (xyes|xno)
4481                 ;;
4482         (*)     DESTDIR="$withval"
4483                 ;;
4484         esac
4485 fi;
4486 echo "$as_me:4486: result: $DESTDIR" >&5
4487 echo "${ECHO_T}$DESTDIR" >&6
4488
4489 ###############################################################################
4490
4491 # If we're cross-compiling, allow the user to override the tools and their
4492 # options.  The configure script is oriented toward identifying the host
4493 # compiler, etc., but we need a build compiler to generate parts of the source.
4494
4495 if test "$cross_compiling" = yes ; then
4496
4497         # defaults that we might want to override
4498         : ${BUILD_CFLAGS:=''}
4499         : ${BUILD_CPPFLAGS:=''}
4500         : ${BUILD_LDFLAGS:=''}
4501         : ${BUILD_LIBS:=''}
4502         : ${BUILD_EXEEXT:='$x'}
4503         : ${BUILD_OBJEXT:='o'}
4504
4505 # Check whether --with-build-cc or --without-build-cc was given.
4506 if test "${with_build_cc+set}" = set; then
4507   withval="$with_build_cc"
4508   BUILD_CC="$withval"
4509 else
4510   for ac_prog in gcc cc cl
4511 do
4512   # Extract the first word of "$ac_prog", so it can be a program name with args.
4513 set dummy $ac_prog; ac_word=$2
4514 echo "$as_me:4514: checking for $ac_word" >&5
4515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4516 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4517   echo $ECHO_N "(cached) $ECHO_C" >&6
4518 else
4519   if test -n "$BUILD_CC"; then
4520   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4521 else
4522   ac_save_IFS=$IFS; IFS=$ac_path_separator
4523 ac_dummy="$PATH"
4524 for ac_dir in $ac_dummy; do
4525   IFS=$ac_save_IFS
4526   test -z "$ac_dir" && ac_dir=.
4527   $as_executable_p "$ac_dir/$ac_word" || continue
4528 ac_cv_prog_BUILD_CC="$ac_prog"
4529 echo "$as_me:4529: found $ac_dir/$ac_word" >&5
4530 break
4531 done
4532
4533 fi
4534 fi
4535 BUILD_CC=$ac_cv_prog_BUILD_CC
4536 if test -n "$BUILD_CC"; then
4537   echo "$as_me:4537: result: $BUILD_CC" >&5
4538 echo "${ECHO_T}$BUILD_CC" >&6
4539 else
4540   echo "$as_me:4540: result: no" >&5
4541 echo "${ECHO_T}no" >&6
4542 fi
4543
4544   test -n "$BUILD_CC" && break
4545 done
4546
4547 fi;
4548         echo "$as_me:4548: checking for native build C compiler" >&5
4549 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4550         echo "$as_me:4550: result: $BUILD_CC" >&5
4551 echo "${ECHO_T}$BUILD_CC" >&6
4552
4553         echo "$as_me:4553: checking for native build C preprocessor" >&5
4554 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4555
4556 # Check whether --with-build-cpp or --without-build-cpp was given.
4557 if test "${with_build_cpp+set}" = set; then
4558   withval="$with_build_cpp"
4559   BUILD_CPP="$withval"
4560 else
4561   BUILD_CPP='${BUILD_CC} -E'
4562 fi;
4563         echo "$as_me:4563: result: $BUILD_CPP" >&5
4564 echo "${ECHO_T}$BUILD_CPP" >&6
4565
4566         echo "$as_me:4566: checking for native build C flags" >&5
4567 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4568
4569 # Check whether --with-build-cflags or --without-build-cflags was given.
4570 if test "${with_build_cflags+set}" = set; then
4571   withval="$with_build_cflags"
4572   BUILD_CFLAGS="$withval"
4573 fi;
4574         echo "$as_me:4574: result: $BUILD_CFLAGS" >&5
4575 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4576
4577         echo "$as_me:4577: checking for native build C preprocessor-flags" >&5
4578 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4579
4580 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4581 if test "${with_build_cppflags+set}" = set; then
4582   withval="$with_build_cppflags"
4583   BUILD_CPPFLAGS="$withval"
4584 fi;
4585         echo "$as_me:4585: result: $BUILD_CPPFLAGS" >&5
4586 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4587
4588         echo "$as_me:4588: checking for native build linker-flags" >&5
4589 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4590
4591 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4592 if test "${with_build_ldflags+set}" = set; then
4593   withval="$with_build_ldflags"
4594   BUILD_LDFLAGS="$withval"
4595 fi;
4596         echo "$as_me:4596: result: $BUILD_LDFLAGS" >&5
4597 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4598
4599         echo "$as_me:4599: checking for native build linker-libraries" >&5
4600 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4601
4602 # Check whether --with-build-libs or --without-build-libs was given.
4603 if test "${with_build_libs+set}" = set; then
4604   withval="$with_build_libs"
4605   BUILD_LIBS="$withval"
4606 fi;
4607         echo "$as_me:4607: result: $BUILD_LIBS" >&5
4608 echo "${ECHO_T}$BUILD_LIBS" >&6
4609
4610         # this assumes we're on Unix.
4611         BUILD_EXEEXT=
4612         BUILD_OBJEXT=o
4613
4614         : ${BUILD_CC:='${CC}'}
4615
4616         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4617                 { { echo "$as_me:4617: error: Cross-build requires two compilers.
4618 Use --with-build-cc to specify the native compiler." >&5
4619 echo "$as_me: error: Cross-build requires two compilers.
4620 Use --with-build-cc to specify the native compiler." >&2;}
4621    { (exit 1); exit 1; }; }
4622         fi
4623
4624 else
4625         : ${BUILD_CC:='${CC}'}
4626         : ${BUILD_CPP:='${CPP}'}
4627         : ${BUILD_CFLAGS:='${CFLAGS}'}
4628         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4629         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4630         : ${BUILD_LIBS:='${LIBS}'}
4631         : ${BUILD_EXEEXT:='$x'}
4632         : ${BUILD_OBJEXT:='o'}
4633 fi
4634
4635 ###############################################################################
4636
4637 ### Options to allow the user to specify the set of libraries which are used.
4638 ### Use "--without-normal --with-shared" to allow the default model to be
4639 ### shared, for example.
4640 cf_list_models=""
4641
4642 echo "$as_me:4642: checking if libtool -version-number should be used" >&5
4643 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4644
4645 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4646 if test "${enable_libtool_version+set}" = set; then
4647   enableval="$enable_libtool_version"
4648   test "$enableval" != no && enableval=yes
4649         if test "$enableval" != "yes" ; then
4650     cf_libtool_version=no
4651         else
4652                 cf_libtool_version=yes
4653         fi
4654 else
4655   enableval=yes
4656         cf_libtool_version=yes
4657
4658 fi;
4659 echo "$as_me:4659: result: $cf_libtool_version" >&5
4660 echo "${ECHO_T}$cf_libtool_version" >&6
4661
4662 if test "$cf_libtool_version" = yes ; then
4663         LIBTOOL_VERSION="-version-number"
4664 else
4665         LIBTOOL_VERSION="-version-info"
4666         case "x$VERSION" in
4667         (x)
4668                 { echo "$as_me:4668: WARNING: VERSION was not set" >&5
4669 echo "$as_me: WARNING: VERSION was not set" >&2;}
4670                 ;;
4671         (x*.*.*)
4672                 ABI_VERSION="$VERSION"
4673                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4674
4675 echo "${as_me:-configure}:4675: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4676
4677                 ;;
4678         (x*:*:*)
4679                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4680                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4681
4682 echo "${as_me:-configure}:4682: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4683
4684                 ;;
4685         (*)
4686                 { echo "$as_me:4686: WARNING: unexpected VERSION value: $VERSION" >&5
4687 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4688                 ;;
4689         esac
4690 fi
4691
4692 LIBTOOL=
4693
4694 # common library maintenance symbols that are convenient for libtool scripts:
4695 LIB_CREATE='${AR} -cr'
4696 LIB_OBJECT='${OBJECTS}'
4697 LIB_SUFFIX=.a
4698 LIB_PREP="$RANLIB"
4699
4700 # symbols used to prop libtool up to enable it to determine what it should be
4701 # doing:
4702 LIB_CLEAN=
4703 LIB_COMPILE=
4704 LIB_LINK='${CC}'
4705 LIB_INSTALL=
4706 LIB_UNINSTALL=
4707
4708 echo "$as_me:4708: checking if you want to build libraries with libtool" >&5
4709 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4710
4711 # Check whether --with-libtool or --without-libtool was given.
4712 if test "${with_libtool+set}" = set; then
4713   withval="$with_libtool"
4714   with_libtool=$withval
4715 else
4716   with_libtool=no
4717 fi;
4718 echo "$as_me:4718: result: $with_libtool" >&5
4719 echo "${ECHO_T}$with_libtool" >&6
4720 if test "$with_libtool" != "no"; then
4721
4722         if test "$with_libtool" != "yes" ; then
4723
4724 if test "x$prefix" != xNONE; then
4725         cf_path_syntax="$prefix"
4726 else
4727         cf_path_syntax="$ac_default_prefix"
4728 fi
4729
4730 case ".$with_libtool" in
4731 (.\$\(*\)*|.\'*\'*)
4732         ;;
4733 (..|./*|.\\*)
4734         ;;
4735 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4736         ;;
4737 (.\${*prefix}*|.\${*dir}*)
4738         eval with_libtool="$with_libtool"
4739         case ".$with_libtool" in
4740         (.NONE/*)
4741                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4742                 ;;
4743         esac
4744         ;;
4745 (.no|.NONE/*)
4746         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4747         ;;
4748 (*)
4749         { { echo "$as_me:4749: error: expected a pathname, not \"$with_libtool\"" >&5
4750 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4751    { (exit 1); exit 1; }; }
4752         ;;
4753 esac
4754
4755                 LIBTOOL=$with_libtool
4756         else
4757                 if test -n "$ac_tool_prefix"; then
4758   for ac_prog in libtool glibtool
4759   do
4760     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4761 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4762 echo "$as_me:4762: checking for $ac_word" >&5
4763 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4764 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4765   echo $ECHO_N "(cached) $ECHO_C" >&6
4766 else
4767   if test -n "$LIBTOOL"; then
4768   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4769 else
4770   ac_save_IFS=$IFS; IFS=$ac_path_separator
4771 ac_dummy="$PATH"
4772 for ac_dir in $ac_dummy; do
4773   IFS=$ac_save_IFS
4774   test -z "$ac_dir" && ac_dir=.
4775   $as_executable_p "$ac_dir/$ac_word" || continue
4776 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4777 echo "$as_me:4777: found $ac_dir/$ac_word" >&5
4778 break
4779 done
4780
4781 fi
4782 fi
4783 LIBTOOL=$ac_cv_prog_LIBTOOL
4784 if test -n "$LIBTOOL"; then
4785   echo "$as_me:4785: result: $LIBTOOL" >&5
4786 echo "${ECHO_T}$LIBTOOL" >&6
4787 else
4788   echo "$as_me:4788: result: no" >&5
4789 echo "${ECHO_T}no" >&6
4790 fi
4791
4792     test -n "$LIBTOOL" && break
4793   done
4794 fi
4795 if test -z "$LIBTOOL"; then
4796   ac_ct_LIBTOOL=$LIBTOOL
4797   for ac_prog in libtool glibtool
4798 do
4799   # Extract the first word of "$ac_prog", so it can be a program name with args.
4800 set dummy $ac_prog; ac_word=$2
4801 echo "$as_me:4801: checking for $ac_word" >&5
4802 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4803 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4804   echo $ECHO_N "(cached) $ECHO_C" >&6
4805 else
4806   if test -n "$ac_ct_LIBTOOL"; then
4807   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4808 else
4809   ac_save_IFS=$IFS; IFS=$ac_path_separator
4810 ac_dummy="$PATH"
4811 for ac_dir in $ac_dummy; do
4812   IFS=$ac_save_IFS
4813   test -z "$ac_dir" && ac_dir=.
4814   $as_executable_p "$ac_dir/$ac_word" || continue
4815 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4816 echo "$as_me:4816: found $ac_dir/$ac_word" >&5
4817 break
4818 done
4819
4820 fi
4821 fi
4822 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4823 if test -n "$ac_ct_LIBTOOL"; then
4824   echo "$as_me:4824: result: $ac_ct_LIBTOOL" >&5
4825 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4826 else
4827   echo "$as_me:4827: result: no" >&5
4828 echo "${ECHO_T}no" >&6
4829 fi
4830
4831   test -n "$ac_ct_LIBTOOL" && break
4832 done
4833 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4834
4835   LIBTOOL=$ac_ct_LIBTOOL
4836 fi
4837
4838 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4839 then
4840         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.].*//'`
4841 else
4842         cf_cv_libtool_version=
4843 fi
4844 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4845
4846                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4847                 then
4848
4849 unset ac_cv_prog_ac_ct_LIBTOOL
4850 unset ac_ct_LIBTOOL
4851 unset LIBTOOL
4852
4853                         if test -n "$ac_tool_prefix"; then
4854   for ac_prog in glibtool
4855   do
4856     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4857 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4858 echo "$as_me:4858: checking for $ac_word" >&5
4859 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4860 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4861   echo $ECHO_N "(cached) $ECHO_C" >&6
4862 else
4863   if test -n "$LIBTOOL"; then
4864   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4865 else
4866   ac_save_IFS=$IFS; IFS=$ac_path_separator
4867 ac_dummy="$PATH"
4868 for ac_dir in $ac_dummy; do
4869   IFS=$ac_save_IFS
4870   test -z "$ac_dir" && ac_dir=.
4871   $as_executable_p "$ac_dir/$ac_word" || continue
4872 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4873 echo "$as_me:4873: found $ac_dir/$ac_word" >&5
4874 break
4875 done
4876
4877 fi
4878 fi
4879 LIBTOOL=$ac_cv_prog_LIBTOOL
4880 if test -n "$LIBTOOL"; then
4881   echo "$as_me:4881: result: $LIBTOOL" >&5
4882 echo "${ECHO_T}$LIBTOOL" >&6
4883 else
4884   echo "$as_me:4884: result: no" >&5
4885 echo "${ECHO_T}no" >&6
4886 fi
4887
4888     test -n "$LIBTOOL" && break
4889   done
4890 fi
4891 if test -z "$LIBTOOL"; then
4892   ac_ct_LIBTOOL=$LIBTOOL
4893   for ac_prog in glibtool
4894 do
4895   # Extract the first word of "$ac_prog", so it can be a program name with args.
4896 set dummy $ac_prog; ac_word=$2
4897 echo "$as_me:4897: checking for $ac_word" >&5
4898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4899 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4900   echo $ECHO_N "(cached) $ECHO_C" >&6
4901 else
4902   if test -n "$ac_ct_LIBTOOL"; then
4903   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4904 else
4905   ac_save_IFS=$IFS; IFS=$ac_path_separator
4906 ac_dummy="$PATH"
4907 for ac_dir in $ac_dummy; do
4908   IFS=$ac_save_IFS
4909   test -z "$ac_dir" && ac_dir=.
4910   $as_executable_p "$ac_dir/$ac_word" || continue
4911 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4912 echo "$as_me:4912: found $ac_dir/$ac_word" >&5
4913 break
4914 done
4915
4916 fi
4917 fi
4918 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4919 if test -n "$ac_ct_LIBTOOL"; then
4920   echo "$as_me:4920: result: $ac_ct_LIBTOOL" >&5
4921 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4922 else
4923   echo "$as_me:4923: result: no" >&5
4924 echo "${ECHO_T}no" >&6
4925 fi
4926
4927   test -n "$ac_ct_LIBTOOL" && break
4928 done
4929 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4930
4931   LIBTOOL=$ac_ct_LIBTOOL
4932 fi
4933
4934 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4935 then
4936         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.].*//'`
4937 else
4938         cf_cv_libtool_version=
4939 fi
4940 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4941
4942                 fi
4943         fi
4944         if test -z "$LIBTOOL" ; then
4945                 { { echo "$as_me:4945: error: Cannot find libtool" >&5
4946 echo "$as_me: error: Cannot find libtool" >&2;}
4947    { (exit 1); exit 1; }; }
4948         fi
4949         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4950         LIB_OBJECT='${OBJECTS:.o=.lo}'
4951         LIB_SUFFIX=.la
4952         LIB_CLEAN='${LIBTOOL} --mode=clean'
4953         LIB_COMPILE='${LIBTOOL} --mode=compile'
4954         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4955         LIB_INSTALL='${LIBTOOL} --mode=install'
4956         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4957         LIB_PREP=:
4958
4959 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4960 then
4961         echo "$as_me:4961: checking version of $LIBTOOL" >&5
4962 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4963
4964 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4965 then
4966         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.].*//'`
4967 else
4968         cf_cv_libtool_version=
4969 fi
4970 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4971
4972         echo "$as_me:4972: result: $cf_cv_libtool_version" >&5
4973 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4974         if test -z "$cf_cv_libtool_version" ; then
4975                 { { echo "$as_me:4975: error: This is not GNU libtool" >&5
4976 echo "$as_me: error: This is not GNU libtool" >&2;}
4977    { (exit 1); exit 1; }; }
4978         fi
4979 else
4980         { { echo "$as_me:4980: error: GNU libtool has not been found" >&5
4981 echo "$as_me: error: GNU libtool has not been found" >&2;}
4982    { (exit 1); exit 1; }; }
4983 fi
4984
4985         # special hack to add -no-undefined (which libtool should do for itself)
4986         LT_UNDEF=
4987         case "$cf_cv_system_name" in
4988         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
4989                 LT_UNDEF=-no-undefined
4990                 ;;
4991         esac
4992
4993         # special hack to add --tag option for C++ compiler
4994         case $cf_cv_libtool_version in
4995         (1.[5-9]*|[2-9].[0-9.a-z]*)
4996                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4997                 LIBTOOL="$LIBTOOL --tag=CC"
4998                 ;;
4999         (*)
5000                 LIBTOOL_CXX="$LIBTOOL"
5001                 ;;
5002         esac
5003 else
5004         LIBTOOL=""
5005         LIBTOOL_CXX=""
5006 fi
5007
5008 test -z "$LIBTOOL" && ECHO_LT=
5009
5010 if test "$with_libtool" != "no" ; then
5011
5012 cf_list_models="$cf_list_models libtool"
5013
5014 else
5015
5016 echo "$as_me:5016: checking if you want to build shared libraries" >&5
5017 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5018
5019 # Check whether --with-shared or --without-shared was given.
5020 if test "${with_shared+set}" = set; then
5021   withval="$with_shared"
5022   with_shared=$withval
5023 else
5024   with_shared=no
5025 fi;
5026 echo "$as_me:5026: result: $with_shared" >&5
5027 echo "${ECHO_T}$with_shared" >&6
5028 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5029
5030 echo "$as_me:5030: checking if you want to build static libraries" >&5
5031 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5032
5033 # Check whether --with-normal or --without-normal was given.
5034 if test "${with_normal+set}" = set; then
5035   withval="$with_normal"
5036   with_normal=$withval
5037 else
5038   with_normal=yes
5039 fi;
5040 echo "$as_me:5040: result: $with_normal" >&5
5041 echo "${ECHO_T}$with_normal" >&6
5042 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5043
5044 echo "$as_me:5044: checking if you want to build debug libraries" >&5
5045 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5046
5047 # Check whether --with-debug or --without-debug was given.
5048 if test "${with_debug+set}" = set; then
5049   withval="$with_debug"
5050   with_debug=$withval
5051 else
5052   with_debug=yes
5053 fi;
5054 echo "$as_me:5054: result: $with_debug" >&5
5055 echo "${ECHO_T}$with_debug" >&6
5056 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5057
5058 echo "$as_me:5058: checking if you want to build profiling libraries" >&5
5059 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5060
5061 # Check whether --with-profile or --without-profile was given.
5062 if test "${with_profile+set}" = set; then
5063   withval="$with_profile"
5064   with_profile=$withval
5065 else
5066   with_profile=no
5067 fi;
5068 echo "$as_me:5068: result: $with_profile" >&5
5069 echo "${ECHO_T}$with_profile" >&6
5070 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5071
5072 fi
5073
5074 if test "X$cf_with_cxx_binding" != Xno; then
5075 if test "x$with_shared" = "xyes"; then
5076 echo "$as_me:5076: checking if you want to build C++ shared libraries" >&5
5077 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5078
5079 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5080 if test "${with_cxx_shared+set}" = set; then
5081   withval="$with_cxx_shared"
5082   with_shared_cxx=$withval
5083 else
5084   with_shared_cxx=no
5085 fi;
5086 echo "$as_me:5086: result: $with_shared_cxx" >&5
5087 echo "${ECHO_T}$with_shared_cxx" >&6
5088 fi
5089 fi
5090
5091 ###############################################################################
5092
5093 echo "$as_me:5093: checking for specified models" >&5
5094 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5095 test -z "$cf_list_models" && cf_list_models=normal
5096 test "$with_libtool" != "no" && cf_list_models=libtool
5097 echo "$as_me:5097: result: $cf_list_models" >&5
5098 echo "${ECHO_T}$cf_list_models" >&6
5099
5100 ### Use the first model as the default, and save its suffix for use in building
5101 ### up test-applications.
5102 echo "$as_me:5102: checking for default model" >&5
5103 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5104 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5105 echo "$as_me:5105: result: $DFT_LWR_MODEL" >&5
5106 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5107
5108 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5109
5110 TICS_NAME=tic
5111
5112 TINFO_NAME=tinfo
5113
5114 LIB_NAME=ncurses
5115
5116 LIB_DIR=../lib
5117 LIB_2ND=../../lib
5118
5119 echo "$as_me:5119: checking if you want to have a library-prefix" >&5
5120 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5121
5122 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5123 if test "${with_lib_prefix+set}" = set; then
5124   withval="$with_lib_prefix"
5125   with_lib_prefix=$withval
5126 else
5127   with_lib_prefix=auto
5128 fi;
5129 echo "$as_me:5129: result: $with_lib_prefix" >&5
5130 echo "${ECHO_T}$with_lib_prefix" >&6
5131
5132 if test $with_lib_prefix = auto
5133 then
5134
5135         case $cf_cv_system_name in
5136         (OS/2*|os2*)
5137                 if test "$DFT_LWR_MODEL" = libtool; then
5138                         LIB_PREFIX='lib'
5139                 else
5140                         LIB_PREFIX=''
5141                 fi
5142                 ;;
5143         (*)     LIB_PREFIX='lib'
5144                 ;;
5145         esac
5146 cf_prefix=$LIB_PREFIX
5147
5148 elif test $with_lib_prefix = no
5149 then
5150         LIB_PREFIX=
5151 else
5152         LIB_PREFIX=$with_lib_prefix
5153 fi
5154
5155 LIB_SUFFIX=
5156
5157         echo "$as_me:5157: checking for PATH separator" >&5
5158 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5159         case $cf_cv_system_name in
5160         (os2*)  PATH_SEPARATOR=';'  ;;
5161         (*)     ${PATH_SEPARATOR:=':'}  ;;
5162         esac
5163
5164         echo "$as_me:5164: result: $PATH_SEPARATOR" >&5
5165 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5166
5167 ###############################################################################
5168
5169 echo "$as_me:5169: checking if you want to build a separate terminfo library" >&5
5170 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5171
5172 # Check whether --with-termlib or --without-termlib was given.
5173 if test "${with_termlib+set}" = set; then
5174   withval="$with_termlib"
5175   with_termlib=$withval
5176 else
5177   with_termlib=no
5178 fi;
5179 echo "$as_me:5179: result: $with_termlib" >&5
5180 echo "${ECHO_T}$with_termlib" >&6
5181
5182 echo "$as_me:5182: checking if you want to build a separate tic library" >&5
5183 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5184
5185 # Check whether --with-ticlib or --without-ticlib was given.
5186 if test "${with_ticlib+set}" = set; then
5187   withval="$with_ticlib"
5188   with_ticlib=$withval
5189 else
5190   with_ticlib=no
5191 fi;
5192 echo "$as_me:5192: result: $with_ticlib" >&5
5193 echo "${ECHO_T}$with_ticlib" >&6
5194
5195 ### Checks for special libraries, must be done up-front.
5196 SHLIB_LIST=""
5197
5198 echo "$as_me:5198: checking if you want to link with the GPM mouse library" >&5
5199 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5200
5201 # Check whether --with-gpm or --without-gpm was given.
5202 if test "${with_gpm+set}" = set; then
5203   withval="$with_gpm"
5204   with_gpm=$withval
5205 else
5206   with_gpm=maybe
5207 fi;
5208 echo "$as_me:5208: result: $with_gpm" >&5
5209 echo "${ECHO_T}$with_gpm" >&6
5210
5211 if test "$with_gpm" != no ; then
5212         echo "$as_me:5212: checking for gpm.h" >&5
5213 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5214 if test "${ac_cv_header_gpm_h+set}" = set; then
5215   echo $ECHO_N "(cached) $ECHO_C" >&6
5216 else
5217   cat >conftest.$ac_ext <<_ACEOF
5218 #line 5218 "configure"
5219 #include "confdefs.h"
5220 #include <gpm.h>
5221 _ACEOF
5222 if { (eval echo "$as_me:5222: \"$ac_cpp conftest.$ac_ext\"") >&5
5223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5224   ac_status=$?
5225   egrep -v '^ *\+' conftest.er1 >conftest.err
5226   rm -f conftest.er1
5227   cat conftest.err >&5
5228   echo "$as_me:5228: \$? = $ac_status" >&5
5229   (exit $ac_status); } >/dev/null; then
5230   if test -s conftest.err; then
5231     ac_cpp_err=$ac_c_preproc_warn_flag
5232   else
5233     ac_cpp_err=
5234   fi
5235 else
5236   ac_cpp_err=yes
5237 fi
5238 if test -z "$ac_cpp_err"; then
5239   ac_cv_header_gpm_h=yes
5240 else
5241   echo "$as_me: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   ac_cv_header_gpm_h=no
5244 fi
5245 rm -f conftest.err conftest.$ac_ext
5246 fi
5247 echo "$as_me:5247: result: $ac_cv_header_gpm_h" >&5
5248 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5249 if test $ac_cv_header_gpm_h = yes; then
5250
5251 cat >>confdefs.h <<\EOF
5252 #define HAVE_GPM_H 1
5253 EOF
5254
5255                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5256                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5257
5258 echo "${as_me:-configure}:5258: testing assuming we really have GPM library ..." 1>&5
5259
5260 cat >>confdefs.h <<\EOF
5261 #define HAVE_LIBGPM 1
5262 EOF
5263
5264                         with_gpm=yes
5265                 else
5266                         echo "$as_me:5266: checking for Gpm_Open in -lgpm" >&5
5267 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5268 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5269   echo $ECHO_N "(cached) $ECHO_C" >&6
5270 else
5271   ac_check_lib_save_LIBS=$LIBS
5272 LIBS="-lgpm  $LIBS"
5273 cat >conftest.$ac_ext <<_ACEOF
5274 #line 5274 "configure"
5275 #include "confdefs.h"
5276
5277 /* Override any gcc2 internal prototype to avoid an error.  */
5278 #ifdef __cplusplus
5279 extern "C"
5280 #endif
5281 /* We use char because int might match the return type of a gcc2
5282    builtin and then its argument prototype would still apply.  */
5283 char Gpm_Open ();
5284 int
5285 main ()
5286 {
5287 Gpm_Open ();
5288   ;
5289   return 0;
5290 }
5291 _ACEOF
5292 rm -f conftest.$ac_objext conftest$ac_exeext
5293 if { (eval echo "$as_me:5293: \"$ac_link\"") >&5
5294   (eval $ac_link) 2>&5
5295   ac_status=$?
5296   echo "$as_me:5296: \$? = $ac_status" >&5
5297   (exit $ac_status); } &&
5298          { ac_try='test -s conftest$ac_exeext'
5299   { (eval echo "$as_me:5299: \"$ac_try\"") >&5
5300   (eval $ac_try) 2>&5
5301   ac_status=$?
5302   echo "$as_me:5302: \$? = $ac_status" >&5
5303   (exit $ac_status); }; }; then
5304   ac_cv_lib_gpm_Gpm_Open=yes
5305 else
5306   echo "$as_me: failed program was:" >&5
5307 cat conftest.$ac_ext >&5
5308 ac_cv_lib_gpm_Gpm_Open=no
5309 fi
5310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5311 LIBS=$ac_check_lib_save_LIBS
5312 fi
5313 echo "$as_me:5313: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5314 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5315 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5316   :
5317 else
5318
5319                                 if test "$with_gpm" = maybe; then
5320                                         { echo "$as_me:5320: WARNING: Cannot link with GPM library" >&5
5321 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5322                                         with_gpm=no
5323                                 else
5324                                         { { echo "$as_me:5324: error: Cannot link with GPM library" >&5
5325 echo "$as_me: error: Cannot link with GPM library" >&2;}
5326    { (exit 1); exit 1; }; }
5327                                 fi
5328
5329 fi
5330
5331                 fi
5332
5333 else
5334
5335                 test "$with_gpm" != maybe && { echo "$as_me:5335: WARNING: Cannot find GPM header" >&5
5336 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5337                 with_gpm=no
5338
5339 fi
5340
5341 fi
5342
5343 if test "$with_gpm" != no ; then
5344         echo "$as_me:5344: checking if you want to load GPM dynamically" >&5
5345 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5346
5347 # Check whether --with-dlsym or --without-dlsym was given.
5348 if test "${with_dlsym+set}" = set; then
5349   withval="$with_dlsym"
5350   with_dlsym=$withval
5351 else
5352   with_dlsym=yes
5353 fi;
5354         echo "$as_me:5354: result: $with_dlsym" >&5
5355 echo "${ECHO_T}$with_dlsym" >&6
5356         if test "x$with_dlsym" = xyes ; then
5357
5358 cf_have_dlsym=no
5359 echo "$as_me:5359: checking for dlsym" >&5
5360 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5361 if test "${ac_cv_func_dlsym+set}" = set; then
5362   echo $ECHO_N "(cached) $ECHO_C" >&6
5363 else
5364   cat >conftest.$ac_ext <<_ACEOF
5365 #line 5365 "configure"
5366 #include "confdefs.h"
5367 /* System header to define __stub macros and hopefully few prototypes,
5368     which can conflict with char dlsym (); below.  */
5369 #include <assert.h>
5370 /* Override any gcc2 internal prototype to avoid an error.  */
5371 #ifdef __cplusplus
5372 extern "C"
5373 #endif
5374 /* We use char because int might match the return type of a gcc2
5375    builtin and then its argument prototype would still apply.  */
5376 char dlsym ();
5377 char (*f) ();
5378
5379 int
5380 main ()
5381 {
5382 /* The GNU C library defines this for functions which it implements
5383     to always fail with ENOSYS.  Some functions are actually named
5384     something starting with __ and the normal name is an alias.  */
5385 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5386 choke me
5387 #else
5388 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5389 #endif
5390
5391   ;
5392   return 0;
5393 }
5394 _ACEOF
5395 rm -f conftest.$ac_objext conftest$ac_exeext
5396 if { (eval echo "$as_me:5396: \"$ac_link\"") >&5
5397   (eval $ac_link) 2>&5
5398   ac_status=$?
5399   echo "$as_me:5399: \$? = $ac_status" >&5
5400   (exit $ac_status); } &&
5401          { ac_try='test -s conftest$ac_exeext'
5402   { (eval echo "$as_me:5402: \"$ac_try\"") >&5
5403   (eval $ac_try) 2>&5
5404   ac_status=$?
5405   echo "$as_me:5405: \$? = $ac_status" >&5
5406   (exit $ac_status); }; }; then
5407   ac_cv_func_dlsym=yes
5408 else
5409   echo "$as_me: failed program was:" >&5
5410 cat conftest.$ac_ext >&5
5411 ac_cv_func_dlsym=no
5412 fi
5413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5414 fi
5415 echo "$as_me:5415: result: $ac_cv_func_dlsym" >&5
5416 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5417 if test $ac_cv_func_dlsym = yes; then
5418   cf_have_dlsym=yes
5419 else
5420
5421 cf_have_libdl=no
5422 echo "$as_me:5422: checking for dlsym in -ldl" >&5
5423 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5424 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5425   echo $ECHO_N "(cached) $ECHO_C" >&6
5426 else
5427   ac_check_lib_save_LIBS=$LIBS
5428 LIBS="-ldl  $LIBS"
5429 cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5432
5433 /* Override any gcc2 internal prototype to avoid an error.  */
5434 #ifdef __cplusplus
5435 extern "C"
5436 #endif
5437 /* We use char because int might match the return type of a gcc2
5438    builtin and then its argument prototype would still apply.  */
5439 char dlsym ();
5440 int
5441 main ()
5442 {
5443 dlsym ();
5444   ;
5445   return 0;
5446 }
5447 _ACEOF
5448 rm -f conftest.$ac_objext conftest$ac_exeext
5449 if { (eval echo "$as_me:5449: \"$ac_link\"") >&5
5450   (eval $ac_link) 2>&5
5451   ac_status=$?
5452   echo "$as_me:5452: \$? = $ac_status" >&5
5453   (exit $ac_status); } &&
5454          { ac_try='test -s conftest$ac_exeext'
5455   { (eval echo "$as_me:5455: \"$ac_try\"") >&5
5456   (eval $ac_try) 2>&5
5457   ac_status=$?
5458   echo "$as_me:5458: \$? = $ac_status" >&5
5459   (exit $ac_status); }; }; then
5460   ac_cv_lib_dl_dlsym=yes
5461 else
5462   echo "$as_me: failed program was:" >&5
5463 cat conftest.$ac_ext >&5
5464 ac_cv_lib_dl_dlsym=no
5465 fi
5466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5467 LIBS=$ac_check_lib_save_LIBS
5468 fi
5469 echo "$as_me:5469: result: $ac_cv_lib_dl_dlsym" >&5
5470 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5471 if test $ac_cv_lib_dl_dlsym = yes; then
5472
5473         cf_have_dlsym=yes
5474         cf_have_libdl=yes
5475 fi
5476
5477 fi
5478
5479 if test "$cf_have_dlsym" = yes ; then
5480         test "$cf_have_libdl" = yes && {
5481 cf_add_libs="-ldl"
5482 # Filter out duplicates - this happens with badly-designed ".pc" files...
5483 for cf_add_1lib in $LIBS
5484 do
5485         for cf_add_2lib in $cf_add_libs
5486         do
5487                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5488                 then
5489                         cf_add_1lib=
5490                         break
5491                 fi
5492         done
5493         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5494 done
5495 LIBS="$cf_add_libs"
5496  }
5497
5498         echo "$as_me:5498: checking whether able to link to dl*() functions" >&5
5499 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5500         cat >conftest.$ac_ext <<_ACEOF
5501 #line 5501 "configure"
5502 #include "confdefs.h"
5503 #include <dlfcn.h>
5504 int
5505 main ()
5506 {
5507
5508                 void *obj;
5509                 if ((obj = dlopen("filename", 0)) != 0) {
5510                         if (dlsym(obj, "symbolname") == 0) {
5511                         dlclose(obj);
5512                         }
5513                 }
5514   ;
5515   return 0;
5516 }
5517 _ACEOF
5518 rm -f conftest.$ac_objext conftest$ac_exeext
5519 if { (eval echo "$as_me:5519: \"$ac_link\"") >&5
5520   (eval $ac_link) 2>&5
5521   ac_status=$?
5522   echo "$as_me:5522: \$? = $ac_status" >&5
5523   (exit $ac_status); } &&
5524          { ac_try='test -s conftest$ac_exeext'
5525   { (eval echo "$as_me:5525: \"$ac_try\"") >&5
5526   (eval $ac_try) 2>&5
5527   ac_status=$?
5528   echo "$as_me:5528: \$? = $ac_status" >&5
5529   (exit $ac_status); }; }; then
5530
5531 cat >>confdefs.h <<\EOF
5532 #define HAVE_LIBDL 1
5533 EOF
5534
5535 else
5536   echo "$as_me: failed program was:" >&5
5537 cat conftest.$ac_ext >&5
5538
5539                 { { echo "$as_me:5539: error: Cannot link test program for libdl" >&5
5540 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5541    { (exit 1); exit 1; }; }
5542 fi
5543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5544         echo "$as_me:5544: result: ok" >&5
5545 echo "${ECHO_T}ok" >&6
5546 else
5547         { { echo "$as_me:5547: error: Cannot find dlsym function" >&5
5548 echo "$as_me: error: Cannot find dlsym function" >&2;}
5549    { (exit 1); exit 1; }; }
5550 fi
5551
5552                 if test "x$with_gpm" != xyes ; then
5553                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5554
5555 echo "${as_me:-configure}:5555: testing assuming soname for gpm is $with_gpm ..." 1>&5
5556
5557                         cf_cv_gpm_soname="$with_gpm"
5558                 else
5559
5560 echo "$as_me:5560: checking for soname of gpm library" >&5
5561 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5562 if test "${cf_cv_gpm_soname+set}" = set; then
5563   echo $ECHO_N "(cached) $ECHO_C" >&6
5564 else
5565
5566 cf_cv_gpm_soname=unknown
5567 if test "$cross_compiling" != yes ; then
5568 cat >conftest.$ac_ext <<CF_EOF
5569 #include <gpm.h>
5570 int main()
5571 {
5572 if (Gpm_Open(0,0)) Gpm_Close();
5573         ${cf_cv_main_return:-return}(0);
5574 }
5575 CF_EOF
5576 cf_save_LIBS="$LIBS"
5577
5578 cf_add_libs="-lgpm"
5579 # Filter out duplicates - this happens with badly-designed ".pc" files...
5580 for cf_add_1lib in $LIBS
5581 do
5582         for cf_add_2lib in $cf_add_libs
5583         do
5584                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5585                 then
5586                         cf_add_1lib=
5587                         break
5588                 fi
5589         done
5590         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5591 done
5592 LIBS="$cf_add_libs"
5593
5594         if { (eval echo "$as_me:5594: \"$ac_compile\"") >&5
5595   (eval $ac_compile) 2>&5
5596   ac_status=$?
5597   echo "$as_me:5597: \$? = $ac_status" >&5
5598   (exit $ac_status); } ; then
5599                 if { (eval echo "$as_me:5599: \"$ac_link\"") >&5
5600   (eval $ac_link) 2>&5
5601   ac_status=$?
5602   echo "$as_me:5602: \$? = $ac_status" >&5
5603   (exit $ac_status); } ; then
5604                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5605                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5606                 fi
5607         fi
5608 rm -rf conftest*
5609 LIBS="$cf_save_LIBS"
5610 fi
5611
5612 fi
5613 echo "$as_me:5613: result: $cf_cv_gpm_soname" >&5
5614 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5615
5616                 fi
5617                 test "$cf_cv_gpm_soname" != "unknown" &&
5618 cat >>confdefs.h <<EOF
5619 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5620 EOF
5621
5622                 SHLIB_LIST="-ldl $SHLIB_LIST"
5623         else
5624                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5625
5626 cf_add_libs="-lgpm"
5627 # Filter out duplicates - this happens with badly-designed ".pc" files...
5628 for cf_add_1lib in $TEST_LIBS
5629 do
5630         for cf_add_2lib in $cf_add_libs
5631         do
5632                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5633                 then
5634                         cf_add_1lib=
5635                         break
5636                 fi
5637         done
5638         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5639 done
5640 TEST_LIBS="$cf_add_libs"
5641
5642         fi
5643
5644 cat >>confdefs.h <<\EOF
5645 #define HAVE_LIBGPM 1
5646 EOF
5647
5648 echo "$as_me:5648: checking for Gpm_Wgetch in -lgpm" >&5
5649 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5650 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5651   echo $ECHO_N "(cached) $ECHO_C" >&6
5652 else
5653   ac_check_lib_save_LIBS=$LIBS
5654 LIBS="-lgpm  $LIBS"
5655 cat >conftest.$ac_ext <<_ACEOF
5656 #line 5656 "configure"
5657 #include "confdefs.h"
5658
5659 /* Override any gcc2 internal prototype to avoid an error.  */
5660 #ifdef __cplusplus
5661 extern "C"
5662 #endif
5663 /* We use char because int might match the return type of a gcc2
5664    builtin and then its argument prototype would still apply.  */
5665 char Gpm_Wgetch ();
5666 int
5667 main ()
5668 {
5669 Gpm_Wgetch ();
5670   ;
5671   return 0;
5672 }
5673 _ACEOF
5674 rm -f conftest.$ac_objext conftest$ac_exeext
5675 if { (eval echo "$as_me:5675: \"$ac_link\"") >&5
5676   (eval $ac_link) 2>&5
5677   ac_status=$?
5678   echo "$as_me:5678: \$? = $ac_status" >&5
5679   (exit $ac_status); } &&
5680          { ac_try='test -s conftest$ac_exeext'
5681   { (eval echo "$as_me:5681: \"$ac_try\"") >&5
5682   (eval $ac_try) 2>&5
5683   ac_status=$?
5684   echo "$as_me:5684: \$? = $ac_status" >&5
5685   (exit $ac_status); }; }; then
5686   ac_cv_lib_gpm_Gpm_Wgetch=yes
5687 else
5688   echo "$as_me: failed program was:" >&5
5689 cat conftest.$ac_ext >&5
5690 ac_cv_lib_gpm_Gpm_Wgetch=no
5691 fi
5692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5693 LIBS=$ac_check_lib_save_LIBS
5694 fi
5695 echo "$as_me:5695: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5696 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5697 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5698
5699 echo "$as_me:5699: checking if GPM is weakly bound to curses library" >&5
5700 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5701 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5702   echo $ECHO_N "(cached) $ECHO_C" >&6
5703 else
5704
5705 cf_cv_check_gpm_wgetch=unknown
5706 if test "$cross_compiling" != yes ; then
5707
5708 cat >conftest.$ac_ext <<CF_EOF
5709 #include <gpm.h>
5710 int main()
5711 {
5712         Gpm_Wgetch();
5713         ${cf_cv_main_return:-return}(0);
5714 }
5715 CF_EOF
5716
5717         cf_save_LIBS="$LIBS"
5718         # This only works if we can look at the symbol table.  If a shared
5719         # library is stripped for install, we cannot use that.  So we're forced
5720         # to rely on the static library, noting that some packagers may not
5721         # include it.
5722         LIBS="-static -lgpm -dynamic $LIBS"
5723         if { (eval echo "$as_me:5723: \"$ac_compile\"") >&5
5724   (eval $ac_compile) 2>&5
5725   ac_status=$?
5726   echo "$as_me:5726: \$? = $ac_status" >&5
5727   (exit $ac_status); } ; then
5728                 if { (eval echo "$as_me:5728: \"$ac_link\"") >&5
5729   (eval $ac_link) 2>&5
5730   ac_status=$?
5731   echo "$as_me:5731: \$? = $ac_status" >&5
5732   (exit $ac_status); } ; then
5733                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5734                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5735                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5736                 fi
5737         fi
5738         rm -rf conftest*
5739         LIBS="$cf_save_LIBS"
5740 fi
5741
5742 fi
5743 echo "$as_me:5743: result: $cf_cv_check_gpm_wgetch" >&5
5744 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5745
5746 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5747         { echo "$as_me:5747: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5748 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5749 fi
5750
5751 fi
5752
5753 fi
5754
5755 # not everyone has "test -c"
5756 if test -c /dev/sysmouse 2>/dev/null ; then
5757 echo "$as_me:5757: checking if you want to use sysmouse" >&5
5758 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5759
5760 # Check whether --with-sysmouse or --without-sysmouse was given.
5761 if test "${with_sysmouse+set}" = set; then
5762   withval="$with_sysmouse"
5763   cf_with_sysmouse=$withval
5764 else
5765   cf_with_sysmouse=maybe
5766 fi;
5767         if test "$cf_with_sysmouse" != no ; then
5768         cat >conftest.$ac_ext <<_ACEOF
5769 #line 5769 "configure"
5770 #include "confdefs.h"
5771
5772 #include <osreldate.h>
5773 #if (__FreeBSD_version >= 400017)
5774 #include <sys/consio.h>
5775 #include <sys/fbio.h>
5776 #else
5777 #include <machine/console.h>
5778 #endif
5779
5780 int
5781 main ()
5782 {
5783
5784         struct mouse_info the_mouse;
5785         ioctl(0, CONS_MOUSECTL, &the_mouse);
5786
5787   ;
5788   return 0;
5789 }
5790 _ACEOF
5791 rm -f conftest.$ac_objext
5792 if { (eval echo "$as_me:5792: \"$ac_compile\"") >&5
5793   (eval $ac_compile) 2>&5
5794   ac_status=$?
5795   echo "$as_me:5795: \$? = $ac_status" >&5
5796   (exit $ac_status); } &&
5797          { ac_try='test -s conftest.$ac_objext'
5798   { (eval echo "$as_me:5798: \"$ac_try\"") >&5
5799   (eval $ac_try) 2>&5
5800   ac_status=$?
5801   echo "$as_me:5801: \$? = $ac_status" >&5
5802   (exit $ac_status); }; }; then
5803   cf_with_sysmouse=yes
5804 else
5805   echo "$as_me: failed program was:" >&5
5806 cat conftest.$ac_ext >&5
5807 cf_with_sysmouse=no
5808 fi
5809 rm -f conftest.$ac_objext conftest.$ac_ext
5810         fi
5811 echo "$as_me:5811: result: $cf_with_sysmouse" >&5
5812 echo "${ECHO_T}$cf_with_sysmouse" >&6
5813 test "$cf_with_sysmouse" = yes &&
5814 cat >>confdefs.h <<\EOF
5815 #define USE_SYSMOUSE 1
5816 EOF
5817
5818 fi
5819
5820 if test X"$CC_G_OPT" = X"" ; then
5821         CC_G_OPT='-g'
5822         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5823 fi
5824
5825 if test X"$CXX_G_OPT" = X"" ; then
5826         CXX_G_OPT='-g'
5827         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5828 fi
5829
5830 echo "$as_me:5830: checking for default loader flags" >&5
5831 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5832 case $DFT_LWR_MODEL in
5833 (libtool) LD_MODEL=''   ;;
5834 (normal)  LD_MODEL=''   ;;
5835 (debug)   LD_MODEL=$CC_G_OPT ;;
5836 (profile) LD_MODEL='-pg';;
5837 (shared)  LD_MODEL=''   ;;
5838 esac
5839 echo "$as_me:5839: result: $LD_MODEL" >&5
5840 echo "${ECHO_T}$LD_MODEL" >&6
5841
5842 case $DFT_LWR_MODEL in
5843 (shared)
5844
5845 echo "$as_me:5845: checking if rpath option should be used" >&5
5846 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5847
5848 # Check whether --enable-rpath or --disable-rpath was given.
5849 if test "${enable_rpath+set}" = set; then
5850   enableval="$enable_rpath"
5851   cf_cv_enable_rpath=$enableval
5852 else
5853   cf_cv_enable_rpath=no
5854 fi;
5855 echo "$as_me:5855: result: $cf_cv_enable_rpath" >&5
5856 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5857
5858 echo "$as_me:5858: checking if shared libraries should be relinked during install" >&5
5859 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5860
5861 # Check whether --enable-relink or --disable-relink was given.
5862 if test "${enable_relink+set}" = set; then
5863   enableval="$enable_relink"
5864   cf_cv_do_relink=$enableval
5865 else
5866   cf_cv_do_relink=yes
5867 fi;
5868 echo "$as_me:5868: result: $cf_cv_do_relink" >&5
5869 echo "${ECHO_T}$cf_cv_do_relink" >&6
5870         ;;
5871 esac
5872
5873 # we will build libraries one-level down.
5874 rel_builddir=..
5875
5876 LD_RPATH_OPT=
5877 echo "$as_me:5877: checking for an rpath option" >&5
5878 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5879 case $cf_cv_system_name in
5880 (irix*)
5881         if test "$GCC" = yes; then
5882                 LD_RPATH_OPT="-Wl,-rpath,"
5883         else
5884                 LD_RPATH_OPT="-rpath "
5885         fi
5886         ;;
5887 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5888         LD_RPATH_OPT="-Wl,-rpath,"
5889         ;;
5890 (openbsd[2-9].*|mirbsd*)
5891         LD_RPATH_OPT="-Wl,-rpath,"
5892         ;;
5893 (dragonfly*)
5894         LD_RPATH_OPT="-rpath "
5895         ;;
5896 (netbsd*)
5897         LD_RPATH_OPT="-Wl,-rpath,"
5898         ;;
5899 (osf*|mls+*)
5900         LD_RPATH_OPT="-rpath "
5901         ;;
5902 (solaris2*)
5903         LD_RPATH_OPT="-R"
5904         ;;
5905 (*)
5906         ;;
5907 esac
5908 echo "$as_me:5908: result: $LD_RPATH_OPT" >&5
5909 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5910
5911 case "x$LD_RPATH_OPT" in
5912 (x-R*)
5913         echo "$as_me:5913: checking if we need a space after rpath option" >&5
5914 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5915         cf_save_LIBS="$LIBS"
5916
5917 cf_add_libs="${LD_RPATH_OPT}$libdir"
5918 # Filter out duplicates - this happens with badly-designed ".pc" files...
5919 for cf_add_1lib in $LIBS
5920 do
5921         for cf_add_2lib in $cf_add_libs
5922         do
5923                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5924                 then
5925                         cf_add_1lib=
5926                         break
5927                 fi
5928         done
5929         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5930 done
5931 LIBS="$cf_add_libs"
5932
5933         cat >conftest.$ac_ext <<_ACEOF
5934 #line 5934 "configure"
5935 #include "confdefs.h"
5936
5937 int
5938 main ()
5939 {
5940
5941   ;
5942   return 0;
5943 }
5944 _ACEOF
5945 rm -f conftest.$ac_objext conftest$ac_exeext
5946 if { (eval echo "$as_me:5946: \"$ac_link\"") >&5
5947   (eval $ac_link) 2>&5
5948   ac_status=$?
5949   echo "$as_me:5949: \$? = $ac_status" >&5
5950   (exit $ac_status); } &&
5951          { ac_try='test -s conftest$ac_exeext'
5952   { (eval echo "$as_me:5952: \"$ac_try\"") >&5
5953   (eval $ac_try) 2>&5
5954   ac_status=$?
5955   echo "$as_me:5955: \$? = $ac_status" >&5
5956   (exit $ac_status); }; }; then
5957   cf_rpath_space=no
5958 else
5959   echo "$as_me: failed program was:" >&5
5960 cat conftest.$ac_ext >&5
5961 cf_rpath_space=yes
5962 fi
5963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5964         LIBS="$cf_save_LIBS"
5965         echo "$as_me:5965: result: $cf_rpath_space" >&5
5966 echo "${ECHO_T}$cf_rpath_space" >&6
5967         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5968         ;;
5969 esac
5970
5971         RM_SHARED_OPTS=
5972         LOCAL_LDFLAGS=
5973         LOCAL_LDFLAGS2=
5974         LD_SHARED_OPTS=
5975         INSTALL_LIB="-m 644"
5976         : ${rel_builddir:=.}
5977
5978         shlibdir=$libdir
5979
5980         MAKE_DLLS="#"
5981
5982         cf_cv_do_symlinks=no
5983         cf_ld_rpath_opt=
5984         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5985
5986         echo "$as_me:5986: checking if release/abi version should be used for shared libs" >&5
5987 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5988
5989 # Check whether --with-shlib-version or --without-shlib-version was given.
5990 if test "${with_shlib_version+set}" = set; then
5991   withval="$with_shlib_version"
5992   test -z "$withval" && withval=auto
5993         case $withval in
5994         (yes)
5995                 cf_cv_shlib_version=auto
5996                 ;;
5997         (rel|abi|auto)
5998                 cf_cv_shlib_version=$withval
5999                 ;;
6000         (*)
6001                 echo "$as_me:6001: result: $withval" >&5
6002 echo "${ECHO_T}$withval" >&6
6003                 { { echo "$as_me:6003: error: option value must be one of: rel, abi, or auto" >&5
6004 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6005    { (exit 1); exit 1; }; }
6006                 ;;
6007         esac
6008
6009 else
6010   cf_cv_shlib_version=auto
6011 fi;
6012         echo "$as_me:6012: result: $cf_cv_shlib_version" >&5
6013 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6014
6015         cf_cv_rm_so_locs=no
6016         cf_try_cflags=
6017
6018         # Some less-capable ports of gcc support only -fpic
6019         CC_SHARED_OPTS=
6020         if test "$GCC" = yes
6021         then
6022                 echo "$as_me:6022: checking which $CC option to use" >&5
6023 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6024                 cf_save_CFLAGS="$CFLAGS"
6025                 for CC_SHARED_OPTS in -fPIC -fpic ''
6026                 do
6027                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6028                         cat >conftest.$ac_ext <<_ACEOF
6029 #line 6029 "configure"
6030 #include "confdefs.h"
6031 #include <stdio.h>
6032 int
6033 main ()
6034 {
6035 int x = 1
6036   ;
6037   return 0;
6038 }
6039 _ACEOF
6040 rm -f conftest.$ac_objext
6041 if { (eval echo "$as_me:6041: \"$ac_compile\"") >&5
6042   (eval $ac_compile) 2>&5
6043   ac_status=$?
6044   echo "$as_me:6044: \$? = $ac_status" >&5
6045   (exit $ac_status); } &&
6046          { ac_try='test -s conftest.$ac_objext'
6047   { (eval echo "$as_me:6047: \"$ac_try\"") >&5
6048   (eval $ac_try) 2>&5
6049   ac_status=$?
6050   echo "$as_me:6050: \$? = $ac_status" >&5
6051   (exit $ac_status); }; }; then
6052   break
6053 else
6054   echo "$as_me: failed program was:" >&5
6055 cat conftest.$ac_ext >&5
6056 fi
6057 rm -f conftest.$ac_objext conftest.$ac_ext
6058                 done
6059                 echo "$as_me:6059: result: $CC_SHARED_OPTS" >&5
6060 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6061                 CFLAGS="$cf_save_CFLAGS"
6062         fi
6063
6064         cf_cv_shlib_version_infix=no
6065
6066         case $cf_cv_system_name in
6067         (aix4.3-9*|aix[5-7]*)
6068                 if test "$GCC" = yes; then
6069                         CC_SHARED_OPTS='-Wl,-brtl'
6070                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6071                 else
6072                         CC_SHARED_OPTS='-brtl'
6073                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6074                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6075                 fi
6076                 ;;
6077         (beos*)
6078                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6079                 ;;
6080         (cygwin*)
6081                 CC_SHARED_OPTS=
6082                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6083                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6084                 cf_cv_shlib_version=cygdll
6085                 cf_cv_shlib_version_infix=cygdll
6086                 shlibdir=$bindir
6087                 MAKE_DLLS=
6088                 cat >mk_shared_lib.sh <<-CF_EOF
6089                 #!$SHELL
6090                 SHARED_LIB=\$1
6091                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6092                 shift
6093                 cat <<-EOF
6094                 Linking shared library
6095                 ** SHARED_LIB \$SHARED_LIB
6096                 ** IMPORT_LIB \$IMPORT_LIB
6097 EOF
6098                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6099 CF_EOF
6100                 chmod +x mk_shared_lib.sh
6101                 ;;
6102         (msys*)
6103                 CC_SHARED_OPTS=
6104                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6105                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6106                 cf_cv_shlib_version=msysdll
6107                 cf_cv_shlib_version_infix=msysdll
6108                 shlibdir=$bindir
6109                 MAKE_DLLS=
6110                 cat >mk_shared_lib.sh <<-CF_EOF
6111                 #!$SHELL
6112                 SHARED_LIB=\$1
6113                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6114                 shift
6115                 cat <<-EOF
6116                 Linking shared library
6117                 ** SHARED_LIB \$SHARED_LIB
6118                 ** IMPORT_LIB \$IMPORT_LIB
6119 EOF
6120                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6121 CF_EOF
6122                 chmod +x mk_shared_lib.sh
6123                 ;;
6124         (darwin*)
6125                 cf_try_cflags="no-cpp-precomp"
6126                 CC_SHARED_OPTS="-dynamic"
6127                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6128                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6129                 cf_cv_shlib_version_infix=yes
6130                 echo "$as_me:6130: checking if ld -search_paths_first works" >&5
6131 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6132 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6133   echo $ECHO_N "(cached) $ECHO_C" >&6
6134 else
6135
6136                         cf_save_LDFLAGS=$LDFLAGS
6137                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6138                         cat >conftest.$ac_ext <<_ACEOF
6139 #line 6139 "configure"
6140 #include "confdefs.h"
6141
6142 int
6143 main ()
6144 {
6145 int i;
6146   ;
6147   return 0;
6148 }
6149 _ACEOF
6150 rm -f conftest.$ac_objext conftest$ac_exeext
6151 if { (eval echo "$as_me:6151: \"$ac_link\"") >&5
6152   (eval $ac_link) 2>&5
6153   ac_status=$?
6154   echo "$as_me:6154: \$? = $ac_status" >&5
6155   (exit $ac_status); } &&
6156          { ac_try='test -s conftest$ac_exeext'
6157   { (eval echo "$as_me:6157: \"$ac_try\"") >&5
6158   (eval $ac_try) 2>&5
6159   ac_status=$?
6160   echo "$as_me:6160: \$? = $ac_status" >&5
6161   (exit $ac_status); }; }; then
6162   cf_cv_ldflags_search_paths_first=yes
6163 else
6164   echo "$as_me: failed program was:" >&5
6165 cat conftest.$ac_ext >&5
6166 cf_cv_ldflags_search_paths_first=no
6167 fi
6168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6169                                 LDFLAGS=$cf_save_LDFLAGS
6170 fi
6171 echo "$as_me:6171: result: $cf_cv_ldflags_search_paths_first" >&5
6172 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6173                 if test $cf_cv_ldflags_search_paths_first = yes; then
6174                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6175                 fi
6176                 ;;
6177         (hpux[7-8]*)
6178                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6179                 if test "$GCC" != yes; then
6180                         CC_SHARED_OPTS='+Z'
6181                 fi
6182                 MK_SHARED_LIB='${LD} -b -o $@'
6183                 INSTALL_LIB="-m 555"
6184                 ;;
6185         (hpux*)
6186                 # (tested with gcc 2.7.2 -- I don't have c89)
6187                 if test "$GCC" = yes; then
6188                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6189                 else
6190                         CC_SHARED_OPTS='+Z'
6191                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6192                 fi
6193                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6194                 # HP-UX shared libraries must be executable, and should be
6195                 # readonly to exploit a quirk in the memory manager.
6196                 INSTALL_LIB="-m 555"
6197                 ;;
6198         (interix*)
6199                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6200                 if test "$cf_cv_shlib_version" = rel; then
6201                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6202                 else
6203                         cf_shared_soname='`basename `'
6204                 fi
6205                 CC_SHARED_OPTS=
6206                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6207                 ;;
6208         (irix*)
6209                 if test "$cf_cv_enable_rpath" = yes ; then
6210                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6211                 fi
6212                 # tested with IRIX 5.2 and 'cc'.
6213                 if test "$GCC" != yes; then
6214                         CC_SHARED_OPTS='-KPIC'
6215                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6216                 else
6217                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6218                 fi
6219                 cf_cv_rm_so_locs=yes
6220                 ;;
6221         (linux*|gnu*|k*bsd*-gnu)
6222                 if test "$DFT_LWR_MODEL" = "shared" ; then
6223                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6224                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6225                 fi
6226                 if test "$cf_cv_enable_rpath" = yes ; then
6227                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6228                 fi
6229
6230         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6231         if test "$cf_cv_shlib_version" = rel; then
6232                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6233         else
6234                 cf_cv_shared_soname='`basename $@`'
6235         fi
6236
6237                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6238                 ;;
6239         (mingw*)
6240                 cf_cv_shlib_version=mingw
6241                 cf_cv_shlib_version_infix=mingw
6242                 shlibdir=$bindir
6243                 MAKE_DLLS=
6244                 if test "$DFT_LWR_MODEL" = "shared" ; then
6245                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6246                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6247                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6248                 fi
6249                 CC_SHARED_OPTS=
6250                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6251                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6252                 cat >mk_shared_lib.sh <<-CF_EOF
6253                 #!$SHELL
6254                 SHARED_LIB=\$1
6255                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6256                 shift
6257                 cat <<-EOF
6258                 Linking shared library
6259                 ** SHARED_LIB \$SHARED_LIB
6260                 ** IMPORT_LIB \$IMPORT_LIB
6261 EOF
6262                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6263 CF_EOF
6264                 chmod +x mk_shared_lib.sh
6265                 ;;
6266         (openbsd[2-9].*|mirbsd*)
6267                 if test "$DFT_LWR_MODEL" = "shared" ; then
6268                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6269                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6270                 fi
6271                 if test "$cf_cv_enable_rpath" = yes ; then
6272                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6273                 fi
6274                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6275
6276         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6277         if test "$cf_cv_shlib_version" = rel; then
6278                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6279         else
6280                 cf_cv_shared_soname='`basename $@`'
6281         fi
6282
6283                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6284                 ;;
6285         (nto-qnx*|openbsd*|freebsd[12].*)
6286                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6287                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6288                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6289                 ;;
6290         (dragonfly*|freebsd*)
6291                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6292                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6293                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6294                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6295                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6296                 fi
6297
6298         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6299         if test "$cf_cv_shlib_version" = rel; then
6300                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6301         else
6302                 cf_cv_shared_soname='`basename $@`'
6303         fi
6304
6305                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6306                 ;;
6307         (netbsd*)
6308                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6309                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6310                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6311                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6312                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6313                         if test "$cf_cv_shlib_version" = auto; then
6314                         if test -f /usr/libexec/ld.elf_so; then
6315                                 cf_cv_shlib_version=abi
6316                         else
6317                                 cf_cv_shlib_version=rel
6318                         fi
6319                         fi
6320
6321         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6322         if test "$cf_cv_shlib_version" = rel; then
6323                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6324         else
6325                 cf_cv_shared_soname='`basename $@`'
6326         fi
6327
6328                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6329                 else
6330                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6331                 fi
6332                 ;;
6333         (osf*|mls+*)
6334                 # tested with OSF/1 V3.2 and 'cc'
6335                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6336                 # link with shared libs).
6337                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6338                 case $host_os in
6339                 (osf4*)
6340                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6341                         ;;
6342                 esac
6343                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6344                 if test "$DFT_LWR_MODEL" = "shared" ; then
6345                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6346                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6347                 fi
6348                 cf_cv_rm_so_locs=yes
6349                 ;;
6350         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6351                 # tested with osr5.0.5
6352                 if test "$GCC" != yes; then
6353                         CC_SHARED_OPTS='-belf -KPIC'
6354                 fi
6355                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6356                 if test "$cf_cv_enable_rpath" = yes ; then
6357                         # only way is to set LD_RUN_PATH but no switch for it
6358                         RUN_PATH=$libdir
6359                 fi
6360                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6361                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6362                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6363                 ;;
6364         (sunos4*)
6365                 # tested with SunOS 4.1.1 and gcc 2.7.0
6366                 if test "$GCC" != yes; then
6367                         CC_SHARED_OPTS='-KPIC'
6368                 fi
6369                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6370                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6371                 ;;
6372         (solaris2*)
6373                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6374                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6375                 if test "$DFT_LWR_MODEL" = "shared" ; then
6376                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6377                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6378                 fi
6379                 if test "$cf_cv_enable_rpath" = yes ; then
6380                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6381                 fi
6382
6383         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6384         if test "$cf_cv_shlib_version" = rel; then
6385                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6386         else
6387                 cf_cv_shared_soname='`basename $@`'
6388         fi
6389
6390                 if test "$GCC" != yes; then
6391                         cf_save_CFLAGS="$CFLAGS"
6392                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6393                         do
6394                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6395                                 cat >conftest.$ac_ext <<_ACEOF
6396 #line 6396 "configure"
6397 #include "confdefs.h"
6398 #include <stdio.h>
6399 int
6400 main ()
6401 {
6402 printf("Hello\n");
6403   ;
6404   return 0;
6405 }
6406 _ACEOF
6407 rm -f conftest.$ac_objext
6408 if { (eval echo "$as_me:6408: \"$ac_compile\"") >&5
6409   (eval $ac_compile) 2>&5
6410   ac_status=$?
6411   echo "$as_me:6411: \$? = $ac_status" >&5
6412   (exit $ac_status); } &&
6413          { ac_try='test -s conftest.$ac_objext'
6414   { (eval echo "$as_me:6414: \"$ac_try\"") >&5
6415   (eval $ac_try) 2>&5
6416   ac_status=$?
6417   echo "$as_me:6417: \$? = $ac_status" >&5
6418   (exit $ac_status); }; }; then
6419   break
6420 else
6421   echo "$as_me: failed program was:" >&5
6422 cat conftest.$ac_ext >&5
6423 fi
6424 rm -f conftest.$ac_objext conftest.$ac_ext
6425                         done
6426                         CFLAGS="$cf_save_CFLAGS"
6427                         CC_SHARED_OPTS=$cf_shared_opts
6428                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6429                 else
6430                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6431                 fi
6432                 ;;
6433         (sysv5uw7*|unix_sv*)
6434                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6435                 if test "$GCC" != yes; then
6436                         CC_SHARED_OPTS='-KPIC'
6437                 fi
6438                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6439                 ;;
6440         (*)
6441                 CC_SHARED_OPTS='unknown'
6442                 MK_SHARED_LIB='echo unknown'
6443                 ;;
6444         esac
6445
6446         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6447         case "$cf_cv_shlib_version" in
6448         (rel|abi)
6449                 case "$MK_SHARED_LIB" in
6450                 (*'-o $@')
6451                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6452                         ;;
6453                 (*)
6454                         { echo "$as_me:6454: WARNING: ignored --with-shlib-version" >&5
6455 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6456                         ;;
6457                 esac
6458                 ;;
6459         esac
6460
6461         if test -n "$cf_try_cflags"
6462         then
6463 cat > conftest.$ac_ext <<EOF
6464 #line 6464 "${as_me:-configure}"
6465 #include <stdio.h>
6466 int main(int argc, char *argv[])
6467 {
6468         printf("hello\n");
6469         return (argv[argc-1] == 0) ;
6470 }
6471 EOF
6472                 cf_save_CFLAGS="$CFLAGS"
6473                 for cf_opt in $cf_try_cflags
6474                 do
6475                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6476                         echo "$as_me:6476: checking if CFLAGS option -$cf_opt works" >&5
6477 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6478                         if { (eval echo "$as_me:6478: \"$ac_compile\"") >&5
6479   (eval $ac_compile) 2>&5
6480   ac_status=$?
6481   echo "$as_me:6481: \$? = $ac_status" >&5
6482   (exit $ac_status); }; then
6483                                 echo "$as_me:6483: result: yes" >&5
6484 echo "${ECHO_T}yes" >&6
6485                                 cf_save_CFLAGS="$CFLAGS"
6486                         else
6487                                 echo "$as_me:6487: result: no" >&5
6488 echo "${ECHO_T}no" >&6
6489                         fi
6490                 done
6491                 CFLAGS="$cf_save_CFLAGS"
6492         fi
6493
6494         # RPATH_LIST is a colon-separated list of directories
6495         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6496         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6497
6498         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6499
6500         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6501
6502 echo "${as_me:-configure}:6502: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6503
6504         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6505
6506 echo "${as_me:-configure}:6506: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6507
6508 for model in $cf_list_models; do
6509         case $model in
6510         (libtool)
6511
6512 echo "$as_me:6512: checking for additional libtool options" >&5
6513 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6514
6515 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6516 if test "${with_libtool_opts+set}" = set; then
6517   withval="$with_libtool_opts"
6518   with_libtool_opts=$withval
6519 else
6520   with_libtool_opts=no
6521 fi;
6522 echo "$as_me:6522: result: $with_libtool_opts" >&5
6523 echo "${ECHO_T}$with_libtool_opts" >&6
6524
6525 case .$with_libtool_opts in
6526 (.yes|.no|.)
6527         ;;
6528 (*)
6529         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6530         ;;
6531 esac
6532
6533 echo "$as_me:6533: checking if exported-symbols file should be used" >&5
6534 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6535
6536 # Check whether --with-export-syms or --without-export-syms was given.
6537 if test "${with_export_syms+set}" = set; then
6538   withval="$with_export_syms"
6539   with_export_syms=$withval
6540 else
6541   with_export_syms=no
6542 fi;
6543 if test "x$with_export_syms" = xyes
6544 then
6545         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6546
6547 fi
6548 echo "$as_me:6548: result: $with_export_syms" >&5
6549 echo "${ECHO_T}$with_export_syms" >&6
6550 if test "x$with_export_syms" != xno
6551 then
6552         EXPORT_SYMS="-export-symbols $with_export_syms"
6553
6554 fi
6555
6556                 ;;
6557         (shared)
6558                 if test "$CC_SHARED_OPTS" = "unknown"; then
6559                         { { echo "$as_me:6559: error: Shared libraries are not supported in this version" >&5
6560 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6561    { (exit 1); exit 1; }; }
6562                 fi
6563                 # workaround for inept transition to PIE vs PIC...
6564                 echo "$as_me:6564: checking if current CFLAGS link properly" >&5
6565 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6566                 cat >conftest.$ac_ext <<_ACEOF
6567 #line 6567 "configure"
6568 #include "confdefs.h"
6569 #include <stdio.h>
6570 int
6571 main ()
6572 {
6573 printf("Hello work\n");
6574   ;
6575   return 0;
6576 }
6577 _ACEOF
6578 rm -f conftest.$ac_objext conftest$ac_exeext
6579 if { (eval echo "$as_me:6579: \"$ac_link\"") >&5
6580   (eval $ac_link) 2>&5
6581   ac_status=$?
6582   echo "$as_me:6582: \$? = $ac_status" >&5
6583   (exit $ac_status); } &&
6584          { ac_try='test -s conftest$ac_exeext'
6585   { (eval echo "$as_me:6585: \"$ac_try\"") >&5
6586   (eval $ac_try) 2>&5
6587   ac_status=$?
6588   echo "$as_me:6588: \$? = $ac_status" >&5
6589   (exit $ac_status); }; }; then
6590   cf_cflags_work=yes
6591 else
6592   echo "$as_me: failed program was:" >&5
6593 cat conftest.$ac_ext >&5
6594 cf_cflags_work=no
6595 fi
6596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6597                 echo "$as_me:6597: result: $cf_cflags_work" >&5
6598 echo "${ECHO_T}$cf_cflags_work" >&6
6599                 if test "$cf_cflags_work" = no
6600                 then
6601                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6602
6603 echo "${as_me:-configure}:6603: testing try to work around by appending shared-options ..." 1>&5
6604
6605                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6606                 fi
6607
6608 echo "$as_me:6608: checking if versioned-symbols file should be used" >&5
6609 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6610
6611 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6612 if test "${with_versioned_syms+set}" = set; then
6613   withval="$with_versioned_syms"
6614   with_versioned_syms=$withval
6615 else
6616   with_versioned_syms=no
6617 fi;
6618 if test "x$with_versioned_syms" = xyes
6619 then
6620         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6621
6622 fi
6623 echo "$as_me:6623: result: $with_versioned_syms" >&5
6624 echo "${ECHO_T}$with_versioned_syms" >&6
6625
6626 RESULTING_SYMS=
6627 VERSIONED_SYMS=
6628 WILDCARD_SYMS=
6629
6630 if test "x$with_versioned_syms" != xno
6631 then
6632         RESULTING_SYMS=$with_versioned_syms
6633         case "x$MK_SHARED_LIB" in
6634         (*-Wl,*)
6635                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6636                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6637                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6638
6639 echo "${as_me:-configure}:6639: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6640
6641                 ;;
6642         (*-dy\ *)
6643                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6644                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6645                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6646
6647 echo "${as_me:-configure}:6647: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6648
6649                 ;;
6650         (*)
6651                 { echo "$as_me:6651: WARNING: this system does not support versioned-symbols" >&5
6652 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6653                 ;;
6654         esac
6655
6656         # Linux ld can selectively override scope, e.g., of symbols beginning with
6657         # "_" by first declaring some as global, and then using a wildcard to
6658         # declare the others as local.  Some other loaders cannot do this.  Check
6659         # by constructing a (very) simple shared library and inspecting its
6660         # symbols.
6661         if test "x$VERSIONED_SYMS" != "x"
6662         then
6663                 echo "$as_me:6663: checking if wildcards can be used to selectively omit symbols" >&5
6664 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6665                 WILDCARD_SYMS=no
6666
6667                 # make sources
6668                 rm -f conftest.*
6669
6670                 cat >conftest.ver <<EOF
6671 module_1.0 {
6672 global:
6673         globalf1;
6674 local:
6675         localf1;
6676 };
6677 module_2.0 {
6678 global:
6679         globalf2;
6680 local:
6681         localf2;
6682         _*;
6683 } module_1.0;
6684 submodule_1.0 {
6685 global:
6686         subglobalf1;
6687         _ismissing;
6688 local:
6689         sublocalf1;
6690 };
6691 submodule_2.0 {
6692 global:
6693         subglobalf2;
6694 local:
6695         sublocalf2;
6696         _*;
6697 } submodule_1.0;
6698 EOF
6699                 cat >conftest.$ac_ext <<EOF
6700 #line 6700 "configure"
6701 int     _ismissing(void) { return 1; }
6702 int     _localf1(void) { return 1; }
6703 int     _localf2(void) { return 2; }
6704 int     globalf1(void) { return 1; }
6705 int     globalf2(void) { return 2; }
6706 int     _sublocalf1(void) { return 1; }
6707 int     _sublocalf2(void) { return 2; }
6708 int     subglobalf1(void) { return 1; }
6709 int     subglobalf2(void) { return 2; }
6710 EOF
6711                 cat >conftest.mk <<EOF
6712 CC=${CC}
6713 CFLAGS=${CFLAGS}
6714 CPPFLAGS=${CPPFLAGS}
6715 LDFLAGS=${LDFLAGS}
6716 LIBS=${LIBS}
6717 VERSIONED_SYMS=${VERSIONED_SYMS}
6718 RESULTING_SYMS=conftest.ver
6719 MK_SHARED_LIB=${MK_SHARED_LIB}
6720 conftest.so: conftest.$ac_cv_objext
6721                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6722 EOF
6723
6724                 # compile source, make library
6725                 if make -f conftest.mk 2>&5 >/dev/null
6726                 then
6727                         # test for missing symbol in either Data or Text section
6728                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6729                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6730                 fi
6731                 echo "$as_me:6731: result: $WILDCARD_SYMS" >&5
6732 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6733                 rm -f conftest.*
6734         fi
6735 fi
6736
6737                 ;;
6738         esac
6739 done
6740
6741 # pretend that ncurses==ncursesw==ncursest
6742 echo "$as_me:6742: checking if you want to disable library suffixes" >&5
6743 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6744
6745 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6746 if test "${enable_lib_suffixes+set}" = set; then
6747   enableval="$enable_lib_suffixes"
6748   test "$enableval" != no && enableval=yes
6749         if test "$enableval" != "yes" ; then
6750     disable_lib_suffixes=yes
6751         else
6752                 disable_lib_suffixes=no
6753         fi
6754 else
6755   enableval=yes
6756         disable_lib_suffixes=no
6757
6758 fi;
6759 echo "$as_me:6759: result: $disable_lib_suffixes" >&5
6760 echo "${ECHO_T}$disable_lib_suffixes" >&6
6761
6762 ### If we're building with rpath, try to link non-standard libs that way too.
6763 if test "$DFT_LWR_MODEL" = "shared"; then
6764
6765 echo "$as_me:6765: checking if rpath-hack should be disabled" >&5
6766 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6767
6768 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6769 if test "${enable_rpath_hack+set}" = set; then
6770   enableval="$enable_rpath_hack"
6771   test "$enableval" != no && enableval=yes
6772         if test "$enableval" != "yes" ; then
6773     cf_disable_rpath_hack=yes
6774         else
6775                 cf_disable_rpath_hack=no
6776         fi
6777 else
6778   enableval=yes
6779         cf_disable_rpath_hack=no
6780
6781 fi;
6782 echo "$as_me:6782: result: $cf_disable_rpath_hack" >&5
6783 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6784 if test "$cf_disable_rpath_hack" = no ; then
6785
6786 echo "$as_me:6786: checking for updated LDFLAGS" >&5
6787 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6788 if test -n "$LD_RPATH_OPT" ; then
6789         echo "$as_me:6789: result: maybe" >&5
6790 echo "${ECHO_T}maybe" >&6
6791
6792         for ac_prog in ldd
6793 do
6794   # Extract the first word of "$ac_prog", so it can be a program name with args.
6795 set dummy $ac_prog; ac_word=$2
6796 echo "$as_me:6796: checking for $ac_word" >&5
6797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6798 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6799   echo $ECHO_N "(cached) $ECHO_C" >&6
6800 else
6801   if test -n "$cf_ldd_prog"; then
6802   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6803 else
6804   ac_save_IFS=$IFS; IFS=$ac_path_separator
6805 ac_dummy="$PATH"
6806 for ac_dir in $ac_dummy; do
6807   IFS=$ac_save_IFS
6808   test -z "$ac_dir" && ac_dir=.
6809   $as_executable_p "$ac_dir/$ac_word" || continue
6810 ac_cv_prog_cf_ldd_prog="$ac_prog"
6811 echo "$as_me:6811: found $ac_dir/$ac_word" >&5
6812 break
6813 done
6814
6815 fi
6816 fi
6817 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6818 if test -n "$cf_ldd_prog"; then
6819   echo "$as_me:6819: result: $cf_ldd_prog" >&5
6820 echo "${ECHO_T}$cf_ldd_prog" >&6
6821 else
6822   echo "$as_me:6822: result: no" >&5
6823 echo "${ECHO_T}no" >&6
6824 fi
6825
6826   test -n "$cf_ldd_prog" && break
6827 done
6828 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6829
6830         cf_rpath_list="/usr/lib /lib"
6831         if test "$cf_ldd_prog" != no
6832         then
6833                 cf_rpath_oops=
6834
6835 cat >conftest.$ac_ext <<_ACEOF
6836 #line 6836 "configure"
6837 #include "confdefs.h"
6838 #include <stdio.h>
6839 int
6840 main ()
6841 {
6842 printf("Hello");
6843   ;
6844   return 0;
6845 }
6846 _ACEOF
6847 rm -f conftest.$ac_objext conftest$ac_exeext
6848 if { (eval echo "$as_me:6848: \"$ac_link\"") >&5
6849   (eval $ac_link) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); } &&
6853          { ac_try='test -s conftest$ac_exeext'
6854   { (eval echo "$as_me:6854: \"$ac_try\"") >&5
6855   (eval $ac_try) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); }; }; then
6859   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6860                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6861 else
6862   echo "$as_me: failed program was:" >&5
6863 cat conftest.$ac_ext >&5
6864 fi
6865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6866
6867                 # If we passed the link-test, but get a "not found" on a given library,
6868                 # this could be due to inept reconfiguration of gcc to make it only
6869                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6870                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6871                 # /usr/local libraries.
6872                 if test -n "$cf_rpath_oops"
6873                 then
6874                         for cf_rpath_src in $cf_rpath_oops
6875                         do
6876                                 for cf_rpath_dir in \
6877                                         /usr/local \
6878                                         /usr/pkg \
6879                                         /opt/sfw
6880                                 do
6881                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6882                                         then
6883                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6884
6885 echo "${as_me:-configure}:6885: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6886
6887                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6888                                                 break
6889                                         fi
6890                                 done
6891                         done
6892                 fi
6893         fi
6894
6895         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6896
6897 echo "${as_me:-configure}:6897: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6898
6899 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6900
6901 echo "${as_me:-configure}:6901: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6902
6903 cf_rpath_dst=
6904 for cf_rpath_src in $LDFLAGS
6905 do
6906         case $cf_rpath_src in
6907         (-L*)
6908
6909                 # check if this refers to a directory which we will ignore
6910                 cf_rpath_skip=no
6911                 if test -n "$cf_rpath_list"
6912                 then
6913                         for cf_rpath_item in $cf_rpath_list
6914                         do
6915                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6916                                 then
6917                                         cf_rpath_skip=yes
6918                                         break
6919                                 fi
6920                         done
6921                 fi
6922
6923                 if test "$cf_rpath_skip" = no
6924                 then
6925                         # transform the option
6926                         if test "$LD_RPATH_OPT" = "-R " ; then
6927                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6928                         else
6929                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6930                         fi
6931
6932                         # if we have not already added this, add it now
6933                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6934                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6935                         then
6936                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6937
6938 echo "${as_me:-configure}:6938: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6939
6940                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6941                         fi
6942                 fi
6943                 ;;
6944         esac
6945         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6946 done
6947 LDFLAGS=$cf_rpath_dst
6948
6949 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6950
6951 echo "${as_me:-configure}:6951: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6952
6953 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6954
6955 echo "${as_me:-configure}:6955: testing ...checking LIBS $LIBS ..." 1>&5
6956
6957 cf_rpath_dst=
6958 for cf_rpath_src in $LIBS
6959 do
6960         case $cf_rpath_src in
6961         (-L*)
6962
6963                 # check if this refers to a directory which we will ignore
6964                 cf_rpath_skip=no
6965                 if test -n "$cf_rpath_list"
6966                 then
6967                         for cf_rpath_item in $cf_rpath_list
6968                         do
6969                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6970                                 then
6971                                         cf_rpath_skip=yes
6972                                         break
6973                                 fi
6974                         done
6975                 fi
6976
6977                 if test "$cf_rpath_skip" = no
6978                 then
6979                         # transform the option
6980                         if test "$LD_RPATH_OPT" = "-R " ; then
6981                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6982                         else
6983                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6984                         fi
6985
6986                         # if we have not already added this, add it now
6987                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6988                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6989                         then
6990                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6991
6992 echo "${as_me:-configure}:6992: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6993
6994                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6995                         fi
6996                 fi
6997                 ;;
6998         esac
6999         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7000 done
7001 LIBS=$cf_rpath_dst
7002
7003 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7004
7005 echo "${as_me:-configure}:7005: testing ...checked LIBS $LIBS ..." 1>&5
7006
7007         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7008
7009 echo "${as_me:-configure}:7009: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7010
7011 else
7012         echo "$as_me:7012: result: no" >&5
7013 echo "${ECHO_T}no" >&6
7014 fi
7015
7016 fi
7017
7018 fi
7019
7020 ###############################################################################
7021
7022 ###     use option --with-extra-suffix to append suffix to headers and libraries
7023 echo "$as_me:7023: checking if you wish to append extra suffix to header/library paths" >&5
7024 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7025 EXTRA_SUFFIX=
7026
7027 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7028 if test "${with_extra_suffix+set}" = set; then
7029   withval="$with_extra_suffix"
7030   case x$withval in
7031         (no)
7032                 ;;
7033         (xyes|x)
7034                 EXTRA_SUFFIX=$cf_cv_abi_version
7035                 ;;
7036         (*)
7037                 EXTRA_SUFFIX=$withval
7038                 ;;
7039         esac
7040
7041 fi;
7042 echo "$as_me:7042: result: $EXTRA_SUFFIX" >&5
7043 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7044
7045 ###     use option --disable-overwrite to leave out the link to -lcurses
7046 echo "$as_me:7046: checking if you wish to install ncurses overwriting curses" >&5
7047 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7048
7049 # Check whether --enable-overwrite or --disable-overwrite was given.
7050 if test "${enable_overwrite+set}" = set; then
7051   enableval="$enable_overwrite"
7052   with_overwrite=$enableval
7053 else
7054   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7055 fi;
7056 echo "$as_me:7056: result: $with_overwrite" >&5
7057 echo "${ECHO_T}$with_overwrite" >&6
7058
7059 echo "$as_me:7059: checking if external terminfo-database is used" >&5
7060 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7061
7062 # Check whether --enable-database or --disable-database was given.
7063 if test "${enable_database+set}" = set; then
7064   enableval="$enable_database"
7065   use_database=$enableval
7066 else
7067   use_database=yes
7068 fi;
7069 echo "$as_me:7069: result: $use_database" >&5
7070 echo "${ECHO_T}$use_database" >&6
7071
7072 case $host_os in
7073 (os2*)
7074         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7075         ;;
7076 (*)
7077         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7078         ;;
7079 esac
7080
7081 NCURSES_USE_DATABASE=0
7082 if test "$use_database" != no ; then
7083         NCURSES_USE_DATABASE=1
7084
7085         echo "$as_me:7085: checking which terminfo source-file will be installed" >&5
7086 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7087
7088 # Check whether --with-database or --without-database was given.
7089 if test "${with_database+set}" = set; then
7090   withval="$with_database"
7091   TERMINFO_SRC=$withval
7092 fi;
7093         echo "$as_me:7093: result: $TERMINFO_SRC" >&5
7094 echo "${ECHO_T}$TERMINFO_SRC" >&6
7095
7096         echo "$as_me:7096: checking whether to use hashed database instead of directory/tree" >&5
7097 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7098
7099 # Check whether --with-hashed-db or --without-hashed-db was given.
7100 if test "${with_hashed_db+set}" = set; then
7101   withval="$with_hashed_db"
7102
7103 else
7104   with_hashed_db=no
7105 fi;
7106         echo "$as_me:7106: result: $with_hashed_db" >&5
7107 echo "${ECHO_T}$with_hashed_db" >&6
7108 else
7109         with_hashed_db=no
7110 fi
7111
7112 echo "$as_me:7112: checking for list of fallback descriptions" >&5
7113 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7114
7115 # Check whether --with-fallbacks or --without-fallbacks was given.
7116 if test "${with_fallbacks+set}" = set; then
7117   withval="$with_fallbacks"
7118   with_fallback=$withval
7119 else
7120   with_fallback=
7121 fi;
7122 echo "$as_me:7122: result: $with_fallback" >&5
7123 echo "${ECHO_T}$with_fallback" >&6
7124 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7125
7126 echo "$as_me:7126: checking if you want modern xterm or antique" >&5
7127 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7128
7129 # Check whether --with-xterm-new or --without-xterm-new was given.
7130 if test "${with_xterm_new+set}" = set; then
7131   withval="$with_xterm_new"
7132   with_xterm_new=$withval
7133 else
7134   with_xterm_new=yes
7135 fi;
7136 case $with_xterm_new in
7137 (no) with_xterm_new=xterm-old;;
7138 (*)      with_xterm_new=xterm-new;;
7139 esac
7140 echo "$as_me:7140: result: $with_xterm_new" >&5
7141 echo "${ECHO_T}$with_xterm_new" >&6
7142 WHICH_XTERM=$with_xterm_new
7143
7144 echo "$as_me:7144: checking if xterm backspace sends BS or DEL" >&5
7145 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7146
7147 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7148 if test "${with_xterm_kbs+set}" = set; then
7149   withval="$with_xterm_kbs"
7150   with_xterm_kbs=$withval
7151 else
7152   with_xterm_kbs=BS
7153 fi;
7154 case x$with_xterm_kbs in
7155 (xyes|xno|xBS|xbs|x8)
7156         with_xterm_kbs=BS
7157         ;;
7158 (xDEL|xdel|x127)
7159         with_xterm_kbs=DEL
7160         ;;
7161 (*)
7162         with_xterm_kbs=$withval
7163         ;;
7164 esac
7165 echo "$as_me:7165: result: $with_xterm_kbs" >&5
7166 echo "${ECHO_T}$with_xterm_kbs" >&6
7167 XTERM_KBS=$with_xterm_kbs
7168
7169 MAKE_TERMINFO=
7170 if test "$use_database" = no ; then
7171         TERMINFO="${datadir}/terminfo"
7172         MAKE_TERMINFO="#"
7173 else
7174
7175 echo "$as_me:7175: checking for list of terminfo directories" >&5
7176 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7177
7178 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7179 if test "${with_terminfo_dirs+set}" = set; then
7180   withval="$with_terminfo_dirs"
7181
7182 else
7183   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7184 fi;
7185 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7186 cf_dst_path=
7187 for cf_src_path in $withval
7188 do
7189
7190 if test "x$prefix" != xNONE; then
7191         cf_path_syntax="$prefix"
7192 else
7193         cf_path_syntax="$ac_default_prefix"
7194 fi
7195
7196 case ".$cf_src_path" in
7197 (.\$\(*\)*|.\'*\'*)
7198         ;;
7199 (..|./*|.\\*)
7200         ;;
7201 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7202         ;;
7203 (.\${*prefix}*|.\${*dir}*)
7204         eval cf_src_path="$cf_src_path"
7205         case ".$cf_src_path" in
7206         (.NONE/*)
7207                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7208                 ;;
7209         esac
7210         ;;
7211 (.no|.NONE/*)
7212         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7213         ;;
7214 (*)
7215         { { echo "$as_me:7215: error: expected a pathname, not \"$cf_src_path\"" >&5
7216 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7217    { (exit 1); exit 1; }; }
7218         ;;
7219 esac
7220
7221   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7222   cf_dst_path="${cf_dst_path}${cf_src_path}"
7223 done
7224 IFS="$ac_save_ifs"
7225
7226 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7227 # so we have to check/work around.  We do prefer the result of "eval"...
7228 eval cf_dst_eval="$cf_dst_path"
7229 case "x$cf_dst_eval" in
7230 (xNONE*)
7231         TERMINFO_DIRS=$cf_dst_path
7232         ;;
7233 (*)
7234         TERMINFO_DIRS="$cf_dst_eval"
7235         ;;
7236 esac
7237
7238 echo "$as_me:7238: result: $TERMINFO_DIRS" >&5
7239 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7240 test -n "$TERMINFO_DIRS" &&
7241 cat >>confdefs.h <<EOF
7242 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7243 EOF
7244
7245 echo "$as_me:7245: checking for default terminfo directory" >&5
7246 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7247
7248 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7249 if test "${with_default_terminfo_dir+set}" = set; then
7250   withval="$with_default_terminfo_dir"
7251
7252 else
7253   withval="${TERMINFO:-${datadir}/terminfo}"
7254 fi; if test -n "${datadir}/terminfo" ; then
7255
7256 if test "x$prefix" != xNONE; then
7257         cf_path_syntax="$prefix"
7258 else
7259         cf_path_syntax="$ac_default_prefix"
7260 fi
7261
7262 case ".$withval" in
7263 (.\$\(*\)*|.\'*\'*)
7264         ;;
7265 (..|./*|.\\*)
7266         ;;
7267 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7268         ;;
7269 (.\${*prefix}*|.\${*dir}*)
7270         eval withval="$withval"
7271         case ".$withval" in
7272         (.NONE/*)
7273                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7274                 ;;
7275         esac
7276         ;;
7277 (.no|.NONE/*)
7278         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7279         ;;
7280 (*)
7281         { { echo "$as_me:7281: error: expected a pathname, not \"$withval\"" >&5
7282 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7283    { (exit 1); exit 1; }; }
7284         ;;
7285 esac
7286
7287 fi
7288 eval TERMINFO="$withval"
7289
7290 echo "$as_me:7290: result: $TERMINFO" >&5
7291 echo "${ECHO_T}$TERMINFO" >&6
7292
7293 cat >>confdefs.h <<EOF
7294 #define TERMINFO "$TERMINFO"
7295 EOF
7296
7297 fi
7298
7299 ###     use option --disable-big-core to make tic run on small machines
7300 ###     We need 4Mb, check if we can allocate 50% more than that.
7301 echo "$as_me:7301: checking if big-core option selected" >&5
7302 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7303
7304 # Check whether --enable-big-core or --disable-big-core was given.
7305 if test "${enable_big_core+set}" = set; then
7306   enableval="$enable_big_core"
7307   with_big_core=$enableval
7308 else
7309   if test "$cross_compiling" = yes; then
7310   with_big_core=no
7311 else
7312   cat >conftest.$ac_ext <<_ACEOF
7313 #line 7313 "configure"
7314 #include "confdefs.h"
7315
7316 #include <stdlib.h>
7317 #include <string.h>
7318 int main() {
7319         unsigned long n = 6000000L;
7320         char *s = malloc(n);
7321         if (s != 0)
7322                 s[0] = s[n-1] = 0;
7323         ${cf_cv_main_return:-return}(s == 0);
7324 }
7325 _ACEOF
7326 rm -f conftest$ac_exeext
7327 if { (eval echo "$as_me:7327: \"$ac_link\"") >&5
7328   (eval $ac_link) 2>&5
7329   ac_status=$?
7330   echo "$as_me:7330: \$? = $ac_status" >&5
7331   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7332   { (eval echo "$as_me:7332: \"$ac_try\"") >&5
7333   (eval $ac_try) 2>&5
7334   ac_status=$?
7335   echo "$as_me:7335: \$? = $ac_status" >&5
7336   (exit $ac_status); }; }; then
7337   with_big_core=yes
7338 else
7339   echo "$as_me: program exited with status $ac_status" >&5
7340 echo "$as_me: failed program was:" >&5
7341 cat conftest.$ac_ext >&5
7342 with_big_core=no
7343 fi
7344 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7345 fi
7346 fi;
7347 echo "$as_me:7347: result: $with_big_core" >&5
7348 echo "${ECHO_T}$with_big_core" >&6
7349 test "x$with_big_core" = "xyes" &&
7350 cat >>confdefs.h <<\EOF
7351 #define HAVE_BIG_CORE 1
7352 EOF
7353
7354 ### ISO C only guarantees 512-char strings, we have tables which load faster
7355 ### when constructed using "big" strings.  More than the C compiler, the awk
7356 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7357 echo "$as_me:7357: checking if big-strings option selected" >&5
7358 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7359
7360 # Check whether --enable-big-strings or --disable-big-strings was given.
7361 if test "${enable_big_strings+set}" = set; then
7362   enableval="$enable_big_strings"
7363   with_big_strings=$enableval
7364 else
7365
7366         case x$AWK in
7367         (x)
7368                 eval with_big_strings=no
7369                 ;;
7370         (*)
7371                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7372                         | $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
7373                         eval with_big_strings=yes
7374                 else
7375                         eval with_big_strings=no
7376                 fi
7377                 ;;
7378         esac
7379
7380 fi;
7381 echo "$as_me:7381: result: $with_big_strings" >&5
7382 echo "${ECHO_T}$with_big_strings" >&6
7383
7384 USE_BIG_STRINGS=0
7385 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7386
7387 ###     use option --enable-termcap to compile in the termcap fallback support
7388 echo "$as_me:7388: checking if you want termcap-fallback support" >&5
7389 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7390
7391 # Check whether --enable-termcap or --disable-termcap was given.
7392 if test "${enable_termcap+set}" = set; then
7393   enableval="$enable_termcap"
7394   with_termcap=$enableval
7395 else
7396   with_termcap=no
7397 fi;
7398 echo "$as_me:7398: result: $with_termcap" >&5
7399 echo "${ECHO_T}$with_termcap" >&6
7400
7401 NCURSES_USE_TERMCAP=0
7402 if test "x$with_termcap" != "xyes" ; then
7403         if test "$use_database" = no ; then
7404                 if test -z "$with_fallback" ; then
7405                         { { echo "$as_me:7405: error: You have disabled the database w/o specifying fallbacks" >&5
7406 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7407    { (exit 1); exit 1; }; }
7408                 fi
7409         fi
7410
7411 cat >>confdefs.h <<\EOF
7412 #define PURE_TERMINFO 1
7413 EOF
7414
7415 else
7416
7417         if test "$with_ticlib" != no ; then
7418                 { { echo "$as_me:7418: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7419 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7420    { (exit 1); exit 1; }; }
7421         fi
7422
7423         NCURSES_USE_TERMCAP=1
7424         echo "$as_me:7424: checking for list of termcap files" >&5
7425 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7426
7427 # Check whether --with-termpath or --without-termpath was given.
7428 if test "${with_termpath+set}" = set; then
7429   withval="$with_termpath"
7430
7431 else
7432   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7433 fi;
7434 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7435 cf_dst_path=
7436 for cf_src_path in $withval
7437 do
7438
7439 if test "x$prefix" != xNONE; then
7440         cf_path_syntax="$prefix"
7441 else
7442         cf_path_syntax="$ac_default_prefix"
7443 fi
7444
7445 case ".$cf_src_path" in
7446 (.\$\(*\)*|.\'*\'*)
7447         ;;
7448 (..|./*|.\\*)
7449         ;;
7450 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7451         ;;
7452 (.\${*prefix}*|.\${*dir}*)
7453         eval cf_src_path="$cf_src_path"
7454         case ".$cf_src_path" in
7455         (.NONE/*)
7456                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7457                 ;;
7458         esac
7459         ;;
7460 (.no|.NONE/*)
7461         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7462         ;;
7463 (*)
7464         { { echo "$as_me:7464: error: expected a pathname, not \"$cf_src_path\"" >&5
7465 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7466    { (exit 1); exit 1; }; }
7467         ;;
7468 esac
7469
7470   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7471   cf_dst_path="${cf_dst_path}${cf_src_path}"
7472 done
7473 IFS="$ac_save_ifs"
7474
7475 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7476 # so we have to check/work around.  We do prefer the result of "eval"...
7477 eval cf_dst_eval="$cf_dst_path"
7478 case "x$cf_dst_eval" in
7479 (xNONE*)
7480         TERMPATH=$cf_dst_path
7481         ;;
7482 (*)
7483         TERMPATH="$cf_dst_eval"
7484         ;;
7485 esac
7486
7487         echo "$as_me:7487: result: $TERMPATH" >&5
7488 echo "${ECHO_T}$TERMPATH" >&6
7489         test -n "$TERMPATH" &&
7490 cat >>confdefs.h <<EOF
7491 #define TERMPATH "$TERMPATH"
7492 EOF
7493
7494         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7495         echo "$as_me:7495: checking if fast termcap-loader is needed" >&5
7496 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7497
7498 # Check whether --enable-getcap or --disable-getcap was given.
7499 if test "${enable_getcap+set}" = set; then
7500   enableval="$enable_getcap"
7501   with_getcap=$enableval
7502 else
7503   with_getcap=no
7504 fi;
7505         echo "$as_me:7505: result: $with_getcap" >&5
7506 echo "${ECHO_T}$with_getcap" >&6
7507         test "x$with_getcap" = "xyes" &&
7508 cat >>confdefs.h <<\EOF
7509 #define USE_GETCAP 1
7510 EOF
7511
7512         echo "$as_me:7512: checking if translated termcaps will be cached in ~/.terminfo" >&5
7513 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7514
7515 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7516 if test "${enable_getcap_cache+set}" = set; then
7517   enableval="$enable_getcap_cache"
7518   with_getcap_cache=$enableval
7519 else
7520   with_getcap_cache=no
7521 fi;
7522         echo "$as_me:7522: result: $with_getcap_cache" >&5
7523 echo "${ECHO_T}$with_getcap_cache" >&6
7524         test "x$with_getcap_cache" = "xyes" &&
7525 cat >>confdefs.h <<\EOF
7526 #define USE_GETCAP_CACHE 1
7527 EOF
7528
7529 fi
7530
7531 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7532 echo "$as_me:7532: checking if ~/.terminfo is wanted" >&5
7533 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7534
7535 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7536 if test "${enable_home_terminfo+set}" = set; then
7537   enableval="$enable_home_terminfo"
7538   with_home_terminfo=$enableval
7539 else
7540   with_home_terminfo=yes
7541 fi;
7542 echo "$as_me:7542: result: $with_home_terminfo" >&5
7543 echo "${ECHO_T}$with_home_terminfo" >&6
7544 test "x$with_home_terminfo" = "xyes" &&
7545 cat >>confdefs.h <<\EOF
7546 #define USE_HOME_TERMINFO 1
7547 EOF
7548
7549 echo "$as_me:7549: checking if you want to use restricted environment when running as root" >&5
7550 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7551
7552 # Check whether --enable-root-environ or --disable-root-environ was given.
7553 if test "${enable_root_environ+set}" = set; then
7554   enableval="$enable_root_environ"
7555   with_root_environ=$enableval
7556 else
7557   with_root_environ=yes
7558 fi;
7559 echo "$as_me:7559: result: $with_root_environ" >&5
7560 echo "${ECHO_T}$with_root_environ" >&6
7561 test "x$with_root_environ" = xyes &&
7562 cat >>confdefs.h <<\EOF
7563 #define USE_ROOT_ENVIRON 1
7564 EOF
7565
7566 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7567 ###   to reduce storage requirements for the terminfo database.
7568
7569 for ac_func in \
7570         remove \
7571         unlink
7572 do
7573 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7574 echo "$as_me:7574: checking for $ac_func" >&5
7575 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7576 if eval "test \"\${$as_ac_var+set}\" = set"; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579   cat >conftest.$ac_ext <<_ACEOF
7580 #line 7580 "configure"
7581 #include "confdefs.h"
7582 /* System header to define __stub macros and hopefully few prototypes,
7583     which can conflict with char $ac_func (); below.  */
7584 #include <assert.h>
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 #ifdef __cplusplus
7587 extern "C"
7588 #endif
7589 /* We use char because int might match the return type of a gcc2
7590    builtin and then its argument prototype would still apply.  */
7591 char $ac_func ();
7592 char (*f) ();
7593
7594 int
7595 main ()
7596 {
7597 /* The GNU C library defines this for functions which it implements
7598     to always fail with ENOSYS.  Some functions are actually named
7599     something starting with __ and the normal name is an alias.  */
7600 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7601 choke me
7602 #else
7603 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7604 #endif
7605
7606   ;
7607   return 0;
7608 }
7609 _ACEOF
7610 rm -f conftest.$ac_objext conftest$ac_exeext
7611 if { (eval echo "$as_me:7611: \"$ac_link\"") >&5
7612   (eval $ac_link) 2>&5
7613   ac_status=$?
7614   echo "$as_me:7614: \$? = $ac_status" >&5
7615   (exit $ac_status); } &&
7616          { ac_try='test -s conftest$ac_exeext'
7617   { (eval echo "$as_me:7617: \"$ac_try\"") >&5
7618   (eval $ac_try) 2>&5
7619   ac_status=$?
7620   echo "$as_me:7620: \$? = $ac_status" >&5
7621   (exit $ac_status); }; }; then
7622   eval "$as_ac_var=yes"
7623 else
7624   echo "$as_me: failed program was:" >&5
7625 cat conftest.$ac_ext >&5
7626 eval "$as_ac_var=no"
7627 fi
7628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7629 fi
7630 echo "$as_me:7630: result: `eval echo '${'$as_ac_var'}'`" >&5
7631 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7632 if test `eval echo '${'$as_ac_var'}'` = yes; then
7633   cat >>confdefs.h <<EOF
7634 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7635 EOF
7636
7637 fi
7638 done
7639
7640 if test "$cross_compiling" = yes ; then
7641
7642 for ac_func in \
7643                 link \
7644                 symlink
7645 do
7646 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7647 echo "$as_me:7647: checking for $ac_func" >&5
7648 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7649 if eval "test \"\${$as_ac_var+set}\" = set"; then
7650   echo $ECHO_N "(cached) $ECHO_C" >&6
7651 else
7652   cat >conftest.$ac_ext <<_ACEOF
7653 #line 7653 "configure"
7654 #include "confdefs.h"
7655 /* System header to define __stub macros and hopefully few prototypes,
7656     which can conflict with char $ac_func (); below.  */
7657 #include <assert.h>
7658 /* Override any gcc2 internal prototype to avoid an error.  */
7659 #ifdef __cplusplus
7660 extern "C"
7661 #endif
7662 /* We use char because int might match the return type of a gcc2
7663    builtin and then its argument prototype would still apply.  */
7664 char $ac_func ();
7665 char (*f) ();
7666
7667 int
7668 main ()
7669 {
7670 /* The GNU C library defines this for functions which it implements
7671     to always fail with ENOSYS.  Some functions are actually named
7672     something starting with __ and the normal name is an alias.  */
7673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7674 choke me
7675 #else
7676 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7677 #endif
7678
7679   ;
7680   return 0;
7681 }
7682 _ACEOF
7683 rm -f conftest.$ac_objext conftest$ac_exeext
7684 if { (eval echo "$as_me:7684: \"$ac_link\"") >&5
7685   (eval $ac_link) 2>&5
7686   ac_status=$?
7687   echo "$as_me:7687: \$? = $ac_status" >&5
7688   (exit $ac_status); } &&
7689          { ac_try='test -s conftest$ac_exeext'
7690   { (eval echo "$as_me:7690: \"$ac_try\"") >&5
7691   (eval $ac_try) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit $ac_status); }; }; then
7695   eval "$as_ac_var=yes"
7696 else
7697   echo "$as_me: failed program was:" >&5
7698 cat conftest.$ac_ext >&5
7699 eval "$as_ac_var=no"
7700 fi
7701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7702 fi
7703 echo "$as_me:7703: result: `eval echo '${'$as_ac_var'}'`" >&5
7704 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7705 if test `eval echo '${'$as_ac_var'}'` = yes; then
7706   cat >>confdefs.h <<EOF
7707 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7708 EOF
7709
7710 fi
7711 done
7712
7713 else
7714         echo "$as_me:7714: checking if link/symlink functions work" >&5
7715 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7716 if test "${cf_cv_link_funcs+set}" = set; then
7717   echo $ECHO_N "(cached) $ECHO_C" >&6
7718 else
7719
7720                 cf_cv_link_funcs=
7721                 for cf_func in link symlink ; do
7722                         if test "$cross_compiling" = yes; then
7723
7724                         eval 'ac_cv_func_'$cf_func'=error'
7725 else
7726   cat >conftest.$ac_ext <<_ACEOF
7727 #line 7727 "configure"
7728 #include "confdefs.h"
7729
7730 #include <sys/types.h>
7731 #include <sys/stat.h>
7732 #ifdef HAVE_UNISTD_H
7733 #include <unistd.h>
7734 #endif
7735 int main()
7736 {
7737         int fail = 0;
7738         char *src = "config.log";
7739         char *dst = "conftest.chk";
7740         struct stat src_sb;
7741         struct stat dst_sb;
7742
7743         stat(src, &src_sb);
7744         fail = ($cf_func("config.log", "conftest.chk") < 0)
7745             || (stat(dst, &dst_sb) < 0)
7746             || (dst_sb.st_mtime != src_sb.st_mtime);
7747 #ifdef HAVE_UNLINK
7748         unlink(dst);
7749 #else
7750         remove(dst);
7751 #endif
7752         ${cf_cv_main_return:-return} (fail);
7753 }
7754
7755 _ACEOF
7756 rm -f conftest$ac_exeext
7757 if { (eval echo "$as_me:7757: \"$ac_link\"") >&5
7758   (eval $ac_link) 2>&5
7759   ac_status=$?
7760   echo "$as_me:7760: \$? = $ac_status" >&5
7761   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7762   { (eval echo "$as_me:7762: \"$ac_try\"") >&5
7763   (eval $ac_try) 2>&5
7764   ac_status=$?
7765   echo "$as_me:7765: \$? = $ac_status" >&5
7766   (exit $ac_status); }; }; then
7767
7768                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7769                         eval 'ac_cv_func_'$cf_func'=yes'
7770 else
7771   echo "$as_me: program exited with status $ac_status" >&5
7772 echo "$as_me: failed program was:" >&5
7773 cat conftest.$ac_ext >&5
7774
7775                         eval 'ac_cv_func_'$cf_func'=no'
7776 fi
7777 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7778 fi
7779                 done
7780                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7781
7782 fi
7783 echo "$as_me:7783: result: $cf_cv_link_funcs" >&5
7784 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7785         test "$ac_cv_func_link"    = yes &&
7786 cat >>confdefs.h <<\EOF
7787 #define HAVE_LINK 1
7788 EOF
7789
7790         test "$ac_cv_func_symlink" = yes &&
7791 cat >>confdefs.h <<\EOF
7792 #define HAVE_SYMLINK 1
7793 EOF
7794
7795 fi
7796
7797 with_links=no
7798 with_symlinks=no
7799
7800 # soft links (symbolic links) are useful for some systems where hard links do
7801 # not work, or to make it simpler to copy terminfo trees around.
7802 if test "x$ac_cv_func_symlink" = xyes ; then
7803         echo "$as_me:7803: checking if tic should use symbolic links" >&5
7804 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7805
7806 # Check whether --enable-symlinks or --disable-symlinks was given.
7807 if test "${enable_symlinks+set}" = set; then
7808   enableval="$enable_symlinks"
7809   with_symlinks=$enableval
7810 else
7811   with_symlinks=no
7812 fi;
7813         echo "$as_me:7813: result: $with_symlinks" >&5
7814 echo "${ECHO_T}$with_symlinks" >&6
7815 fi
7816
7817 # If we have hard links and did not choose to use soft links instead, there is
7818 # no reason to make this choice optional - use the hard links.
7819 if test "$with_symlinks" = no ; then
7820         echo "$as_me:7820: checking if tic should use hard links" >&5
7821 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7822         if test "x$ac_cv_func_link" = xyes ; then
7823                 with_links=yes
7824         else
7825                 with_links=no
7826         fi
7827         echo "$as_me:7827: result: $with_links" >&5
7828 echo "${ECHO_T}$with_links" >&6
7829 fi
7830
7831 test "x$with_links" = xyes &&
7832 cat >>confdefs.h <<\EOF
7833 #define USE_LINKS 1
7834 EOF
7835
7836 test "x$with_symlinks" = xyes &&
7837 cat >>confdefs.h <<\EOF
7838 #define USE_SYMLINKS 1
7839 EOF
7840
7841 ###   use option --enable-broken-linker to force on use of broken-linker support
7842 echo "$as_me:7842: checking if you want broken-linker support code" >&5
7843 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7844
7845 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7846 if test "${enable_broken_linker+set}" = set; then
7847   enableval="$enable_broken_linker"
7848   with_broken_linker=$enableval
7849 else
7850   with_broken_linker=${BROKEN_LINKER:-no}
7851 fi;
7852 echo "$as_me:7852: result: $with_broken_linker" >&5
7853 echo "${ECHO_T}$with_broken_linker" >&6
7854
7855 BROKEN_LINKER=0
7856 if test "x$with_broken_linker" = xyes ; then
7857
7858 cat >>confdefs.h <<\EOF
7859 #define BROKEN_LINKER 1
7860 EOF
7861
7862         BROKEN_LINKER=1
7863 elif test "$DFT_LWR_MODEL" = shared ; then
7864         case $cf_cv_system_name in
7865         (cygwin*)
7866
7867 cat >>confdefs.h <<\EOF
7868 #define BROKEN_LINKER 1
7869 EOF
7870
7871                 BROKEN_LINKER=1
7872                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7873
7874 echo "${as_me:-configure}:7874: testing cygwin linker is broken anyway ..." 1>&5
7875
7876                 ;;
7877         esac
7878 fi
7879
7880 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7881 echo "$as_me:7881: checking if tputs should process BSD-style prefix padding" >&5
7882 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7883
7884 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7885 if test "${enable_bsdpad+set}" = set; then
7886   enableval="$enable_bsdpad"
7887   with_bsdpad=$enableval
7888 else
7889   with_bsdpad=no
7890 fi;
7891 echo "$as_me:7891: result: $with_bsdpad" >&5
7892 echo "${ECHO_T}$with_bsdpad" >&6
7893 test "x$with_bsdpad" = xyes &&
7894 cat >>confdefs.h <<\EOF
7895 #define BSD_TPUTS 1
7896 EOF
7897
7898 ###   use option --enable-widec to turn on use of wide-character support
7899 NCURSES_CH_T=chtype
7900 NCURSES_LIBUTF8=0
7901
7902 NEED_WCHAR_H=0
7903 NCURSES_MBSTATE_T=0
7904 NCURSES_WCHAR_T=0
7905 NCURSES_WINT_T=0
7906
7907 # Check to define _XOPEN_SOURCE "automatically"
7908 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7909
7910 cf_XOPEN_SOURCE=500
7911 cf_POSIX_C_SOURCE=199506L
7912 cf_xopen_source=
7913
7914 case $host_os in
7915 (aix[4-7]*)
7916         cf_xopen_source="-D_ALL_SOURCE"
7917         ;;
7918 (cygwin|msys)
7919         cf_XOPEN_SOURCE=600
7920         ;;
7921 (darwin[0-8].*)
7922         cf_xopen_source="-D_APPLE_C_SOURCE"
7923         ;;
7924 (darwin*)
7925         cf_xopen_source="-D_DARWIN_C_SOURCE"
7926         cf_XOPEN_SOURCE=
7927         ;;
7928 (freebsd*|dragonfly*)
7929         # 5.x headers associate
7930         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7931         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7932         cf_POSIX_C_SOURCE=200112L
7933         cf_XOPEN_SOURCE=600
7934         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7935         ;;
7936 (hpux11*)
7937         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7938         ;;
7939 (hpux*)
7940         cf_xopen_source="-D_HPUX_SOURCE"
7941         ;;
7942 (irix[56].*)
7943         cf_xopen_source="-D_SGI_SOURCE"
7944         cf_XOPEN_SOURCE=
7945         ;;
7946 (linux*|gnu*|mint*|k*bsd*-gnu)
7947
7948 echo "$as_me:7948: checking if we must define _GNU_SOURCE" >&5
7949 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7950 if test "${cf_cv_gnu_source+set}" = set; then
7951   echo $ECHO_N "(cached) $ECHO_C" >&6
7952 else
7953
7954 cat >conftest.$ac_ext <<_ACEOF
7955 #line 7955 "configure"
7956 #include "confdefs.h"
7957 #include <sys/types.h>
7958 int
7959 main ()
7960 {
7961
7962 #ifndef _XOPEN_SOURCE
7963 make an error
7964 #endif
7965   ;
7966   return 0;
7967 }
7968 _ACEOF
7969 rm -f conftest.$ac_objext
7970 if { (eval echo "$as_me:7970: \"$ac_compile\"") >&5
7971   (eval $ac_compile) 2>&5
7972   ac_status=$?
7973   echo "$as_me:7973: \$? = $ac_status" >&5
7974   (exit $ac_status); } &&
7975          { ac_try='test -s conftest.$ac_objext'
7976   { (eval echo "$as_me:7976: \"$ac_try\"") >&5
7977   (eval $ac_try) 2>&5
7978   ac_status=$?
7979   echo "$as_me:7979: \$? = $ac_status" >&5
7980   (exit $ac_status); }; }; then
7981   cf_cv_gnu_source=no
7982 else
7983   echo "$as_me: failed program was:" >&5
7984 cat conftest.$ac_ext >&5
7985 cf_save="$CPPFLAGS"
7986          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7987          cat >conftest.$ac_ext <<_ACEOF
7988 #line 7988 "configure"
7989 #include "confdefs.h"
7990 #include <sys/types.h>
7991 int
7992 main ()
7993 {
7994
7995 #ifdef _XOPEN_SOURCE
7996 make an error
7997 #endif
7998   ;
7999   return 0;
8000 }
8001 _ACEOF
8002 rm -f conftest.$ac_objext
8003 if { (eval echo "$as_me:8003: \"$ac_compile\"") >&5
8004   (eval $ac_compile) 2>&5
8005   ac_status=$?
8006   echo "$as_me:8006: \$? = $ac_status" >&5
8007   (exit $ac_status); } &&
8008          { ac_try='test -s conftest.$ac_objext'
8009   { (eval echo "$as_me:8009: \"$ac_try\"") >&5
8010   (eval $ac_try) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit $ac_status); }; }; then
8014   cf_cv_gnu_source=no
8015 else
8016   echo "$as_me: failed program was:" >&5
8017 cat conftest.$ac_ext >&5
8018 cf_cv_gnu_source=yes
8019 fi
8020 rm -f conftest.$ac_objext conftest.$ac_ext
8021         CPPFLAGS="$cf_save"
8022
8023 fi
8024 rm -f conftest.$ac_objext conftest.$ac_ext
8025
8026 fi
8027 echo "$as_me:8027: result: $cf_cv_gnu_source" >&5
8028 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8029
8030 if test "$cf_cv_gnu_source" = yes
8031 then
8032 echo "$as_me:8032: checking if we should also define _DEFAULT_SOURCE" >&5
8033 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8034 if test "${cf_cv_default_source+set}" = set; then
8035   echo $ECHO_N "(cached) $ECHO_C" >&6
8036 else
8037
8038 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8039         cat >conftest.$ac_ext <<_ACEOF
8040 #line 8040 "configure"
8041 #include "confdefs.h"
8042 #include <sys/types.h>
8043 int
8044 main ()
8045 {
8046
8047 #ifdef _DEFAULT_SOURCE
8048 make an error
8049 #endif
8050   ;
8051   return 0;
8052 }
8053 _ACEOF
8054 rm -f conftest.$ac_objext
8055 if { (eval echo "$as_me:8055: \"$ac_compile\"") >&5
8056   (eval $ac_compile) 2>&5
8057   ac_status=$?
8058   echo "$as_me:8058: \$? = $ac_status" >&5
8059   (exit $ac_status); } &&
8060          { ac_try='test -s conftest.$ac_objext'
8061   { (eval echo "$as_me:8061: \"$ac_try\"") >&5
8062   (eval $ac_try) 2>&5
8063   ac_status=$?
8064   echo "$as_me:8064: \$? = $ac_status" >&5
8065   (exit $ac_status); }; }; then
8066   cf_cv_default_source=no
8067 else
8068   echo "$as_me: failed program was:" >&5
8069 cat conftest.$ac_ext >&5
8070 cf_cv_default_source=yes
8071 fi
8072 rm -f conftest.$ac_objext conftest.$ac_ext
8073
8074 fi
8075 echo "$as_me:8075: result: $cf_cv_default_source" >&5
8076 echo "${ECHO_T}$cf_cv_default_source" >&6
8077 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8078 fi
8079
8080         ;;
8081 (minix*)
8082         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8083         ;;
8084 (mirbsd*)
8085         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8086         cf_XOPEN_SOURCE=
8087
8088 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8089
8090 cf_save_CFLAGS="$CFLAGS"
8091 cf_save_CPPFLAGS="$CPPFLAGS"
8092
8093 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8094         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8095                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8096
8097 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8098         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8099                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8100
8101 echo "$as_me:8101: checking if we should define _POSIX_C_SOURCE" >&5
8102 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8103 if test "${cf_cv_posix_c_source+set}" = set; then
8104   echo $ECHO_N "(cached) $ECHO_C" >&6
8105 else
8106
8107 echo "${as_me:-configure}:8107: testing if the symbol is already defined go no further ..." 1>&5
8108
8109         cat >conftest.$ac_ext <<_ACEOF
8110 #line 8110 "configure"
8111 #include "confdefs.h"
8112 #include <sys/types.h>
8113 int
8114 main ()
8115 {
8116
8117 #ifndef _POSIX_C_SOURCE
8118 make an error
8119 #endif
8120   ;
8121   return 0;
8122 }
8123 _ACEOF
8124 rm -f conftest.$ac_objext
8125 if { (eval echo "$as_me:8125: \"$ac_compile\"") >&5
8126   (eval $ac_compile) 2>&5
8127   ac_status=$?
8128   echo "$as_me:8128: \$? = $ac_status" >&5
8129   (exit $ac_status); } &&
8130          { ac_try='test -s conftest.$ac_objext'
8131   { (eval echo "$as_me:8131: \"$ac_try\"") >&5
8132   (eval $ac_try) 2>&5
8133   ac_status=$?
8134   echo "$as_me:8134: \$? = $ac_status" >&5
8135   (exit $ac_status); }; }; then
8136   cf_cv_posix_c_source=no
8137 else
8138   echo "$as_me: failed program was:" >&5
8139 cat conftest.$ac_ext >&5
8140 cf_want_posix_source=no
8141          case .$cf_POSIX_C_SOURCE in
8142          (.[12]??*)
8143                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8144                 ;;
8145          (.2)
8146                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8147                 cf_want_posix_source=yes
8148                 ;;
8149          (.*)
8150                 cf_want_posix_source=yes
8151                 ;;
8152          esac
8153          if test "$cf_want_posix_source" = yes ; then
8154                 cat >conftest.$ac_ext <<_ACEOF
8155 #line 8155 "configure"
8156 #include "confdefs.h"
8157 #include <sys/types.h>
8158 int
8159 main ()
8160 {
8161
8162 #ifdef _POSIX_SOURCE
8163 make an error
8164 #endif
8165   ;
8166   return 0;
8167 }
8168 _ACEOF
8169 rm -f conftest.$ac_objext
8170 if { (eval echo "$as_me:8170: \"$ac_compile\"") >&5
8171   (eval $ac_compile) 2>&5
8172   ac_status=$?
8173   echo "$as_me:8173: \$? = $ac_status" >&5
8174   (exit $ac_status); } &&
8175          { ac_try='test -s conftest.$ac_objext'
8176   { (eval echo "$as_me:8176: \"$ac_try\"") >&5
8177   (eval $ac_try) 2>&5
8178   ac_status=$?
8179   echo "$as_me:8179: \$? = $ac_status" >&5
8180   (exit $ac_status); }; }; then
8181   :
8182 else
8183   echo "$as_me: failed program was:" >&5
8184 cat conftest.$ac_ext >&5
8185 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8186 fi
8187 rm -f conftest.$ac_objext conftest.$ac_ext
8188          fi
8189
8190 echo "${as_me:-configure}:8190: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8191
8192          CFLAGS="$cf_trim_CFLAGS"
8193          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8194
8195 echo "${as_me:-configure}:8195: testing if the second compile does not leave our definition intact error ..." 1>&5
8196
8197          cat >conftest.$ac_ext <<_ACEOF
8198 #line 8198 "configure"
8199 #include "confdefs.h"
8200 #include <sys/types.h>
8201 int
8202 main ()
8203 {
8204
8205 #ifndef _POSIX_C_SOURCE
8206 make an error
8207 #endif
8208   ;
8209   return 0;
8210 }
8211 _ACEOF
8212 rm -f conftest.$ac_objext
8213 if { (eval echo "$as_me:8213: \"$ac_compile\"") >&5
8214   (eval $ac_compile) 2>&5
8215   ac_status=$?
8216   echo "$as_me:8216: \$? = $ac_status" >&5
8217   (exit $ac_status); } &&
8218          { ac_try='test -s conftest.$ac_objext'
8219   { (eval echo "$as_me:8219: \"$ac_try\"") >&5
8220   (eval $ac_try) 2>&5
8221   ac_status=$?
8222   echo "$as_me:8222: \$? = $ac_status" >&5
8223   (exit $ac_status); }; }; then
8224   :
8225 else
8226   echo "$as_me: failed program was:" >&5
8227 cat conftest.$ac_ext >&5
8228 cf_cv_posix_c_source=no
8229 fi
8230 rm -f conftest.$ac_objext conftest.$ac_ext
8231          CFLAGS="$cf_save_CFLAGS"
8232          CPPFLAGS="$cf_save_CPPFLAGS"
8233
8234 fi
8235 rm -f conftest.$ac_objext conftest.$ac_ext
8236
8237 fi
8238 echo "$as_me:8238: result: $cf_cv_posix_c_source" >&5
8239 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8240
8241 if test "$cf_cv_posix_c_source" != no ; then
8242         CFLAGS="$cf_trim_CFLAGS"
8243         CPPFLAGS="$cf_trim_CPPFLAGS"
8244
8245 cf_fix_cppflags=no
8246 cf_new_cflags=
8247 cf_new_cppflags=
8248 cf_new_extra_cppflags=
8249
8250 for cf_add_cflags in $cf_cv_posix_c_source
8251 do
8252 case $cf_fix_cppflags in
8253 (no)
8254         case $cf_add_cflags in
8255         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8256                 case $cf_add_cflags in
8257                 (-D*)
8258                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8259
8260                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8261                                 && test -z "${cf_tst_cflags}" \
8262                                 && cf_fix_cppflags=yes
8263
8264                         if test $cf_fix_cppflags = yes ; then
8265                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8266                                 continue
8267                         elif test "${cf_tst_cflags}" = "\"'" ; then
8268                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8269                                 continue
8270                         fi
8271                         ;;
8272                 esac
8273                 case "$CPPFLAGS" in
8274                 (*$cf_add_cflags)
8275                         ;;
8276                 (*)
8277                         case $cf_add_cflags in
8278                         (-D*)
8279                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8280
8281 CPPFLAGS=`echo "$CPPFLAGS" | \
8282         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8283                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8284
8285                                 ;;
8286                         esac
8287                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8288                         ;;
8289                 esac
8290                 ;;
8291         (*)
8292                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8293                 ;;
8294         esac
8295         ;;
8296 (yes)
8297         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8298
8299         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8300
8301         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8302                 && test -z "${cf_tst_cflags}" \
8303                 && cf_fix_cppflags=no
8304         ;;
8305 esac
8306 done
8307
8308 if test -n "$cf_new_cflags" ; then
8309
8310         CFLAGS="$CFLAGS $cf_new_cflags"
8311 fi
8312
8313 if test -n "$cf_new_cppflags" ; then
8314
8315         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8316 fi
8317
8318 if test -n "$cf_new_extra_cppflags" ; then
8319
8320         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8321 fi
8322
8323 fi
8324
8325         ;;
8326 (netbsd*)
8327         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8328         ;;
8329 (openbsd[4-9]*)
8330         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8331         cf_xopen_source="-D_BSD_SOURCE"
8332         cf_XOPEN_SOURCE=600
8333         ;;
8334 (openbsd*)
8335         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8336         ;;
8337 (os2*)
8338         cf_XOPEN_SOURCE=
8339         ;;
8340 (osf[45]*)
8341         cf_xopen_source="-D_OSF_SOURCE"
8342         ;;
8343 (nto-qnx*)
8344         cf_xopen_source="-D_QNX_SOURCE"
8345         ;;
8346 (sco*)
8347         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8348         ;;
8349 (solaris2.*)
8350         cf_xopen_source="-D__EXTENSIONS__"
8351         cf_cv_xopen_source=broken
8352         ;;
8353 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8354         cf_XOPEN_SOURCE=
8355         cf_POSIX_C_SOURCE=
8356         ;;
8357 (*)
8358
8359 echo "$as_me:8359: checking if we should define _XOPEN_SOURCE" >&5
8360 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8361 if test "${cf_cv_xopen_source+set}" = set; then
8362   echo $ECHO_N "(cached) $ECHO_C" >&6
8363 else
8364
8365         cat >conftest.$ac_ext <<_ACEOF
8366 #line 8366 "configure"
8367 #include "confdefs.h"
8368
8369 #include <stdlib.h>
8370 #include <string.h>
8371 #include <sys/types.h>
8372
8373 int
8374 main ()
8375 {
8376
8377 #ifndef _XOPEN_SOURCE
8378 make an error
8379 #endif
8380   ;
8381   return 0;
8382 }
8383 _ACEOF
8384 rm -f conftest.$ac_objext
8385 if { (eval echo "$as_me:8385: \"$ac_compile\"") >&5
8386   (eval $ac_compile) 2>&5
8387   ac_status=$?
8388   echo "$as_me:8388: \$? = $ac_status" >&5
8389   (exit $ac_status); } &&
8390          { ac_try='test -s conftest.$ac_objext'
8391   { (eval echo "$as_me:8391: \"$ac_try\"") >&5
8392   (eval $ac_try) 2>&5
8393   ac_status=$?
8394   echo "$as_me:8394: \$? = $ac_status" >&5
8395   (exit $ac_status); }; }; then
8396   cf_cv_xopen_source=no
8397 else
8398   echo "$as_me: failed program was:" >&5
8399 cat conftest.$ac_ext >&5
8400 cf_save="$CPPFLAGS"
8401          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8402          cat >conftest.$ac_ext <<_ACEOF
8403 #line 8403 "configure"
8404 #include "confdefs.h"
8405
8406 #include <stdlib.h>
8407 #include <string.h>
8408 #include <sys/types.h>
8409
8410 int
8411 main ()
8412 {
8413
8414 #ifdef _XOPEN_SOURCE
8415 make an error
8416 #endif
8417   ;
8418   return 0;
8419 }
8420 _ACEOF
8421 rm -f conftest.$ac_objext
8422 if { (eval echo "$as_me:8422: \"$ac_compile\"") >&5
8423   (eval $ac_compile) 2>&5
8424   ac_status=$?
8425   echo "$as_me:8425: \$? = $ac_status" >&5
8426   (exit $ac_status); } &&
8427          { ac_try='test -s conftest.$ac_objext'
8428   { (eval echo "$as_me:8428: \"$ac_try\"") >&5
8429   (eval $ac_try) 2>&5
8430   ac_status=$?
8431   echo "$as_me:8431: \$? = $ac_status" >&5
8432   (exit $ac_status); }; }; then
8433   cf_cv_xopen_source=no
8434 else
8435   echo "$as_me: failed program was:" >&5
8436 cat conftest.$ac_ext >&5
8437 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8438 fi
8439 rm -f conftest.$ac_objext conftest.$ac_ext
8440         CPPFLAGS="$cf_save"
8441
8442 fi
8443 rm -f conftest.$ac_objext conftest.$ac_ext
8444
8445 fi
8446 echo "$as_me:8446: result: $cf_cv_xopen_source" >&5
8447 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8448
8449 if test "$cf_cv_xopen_source" != no ; then
8450
8451 CFLAGS=`echo "$CFLAGS" | \
8452         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8453                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8454
8455 CPPFLAGS=`echo "$CPPFLAGS" | \
8456         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8457                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8458
8459         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8460
8461 cf_fix_cppflags=no
8462 cf_new_cflags=
8463 cf_new_cppflags=
8464 cf_new_extra_cppflags=
8465
8466 for cf_add_cflags in $cf_temp_xopen_source
8467 do
8468 case $cf_fix_cppflags in
8469 (no)
8470         case $cf_add_cflags in
8471         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8472                 case $cf_add_cflags in
8473                 (-D*)
8474                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8475
8476                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8477                                 && test -z "${cf_tst_cflags}" \
8478                                 && cf_fix_cppflags=yes
8479
8480                         if test $cf_fix_cppflags = yes ; then
8481                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8482                                 continue
8483                         elif test "${cf_tst_cflags}" = "\"'" ; then
8484                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8485                                 continue
8486                         fi
8487                         ;;
8488                 esac
8489                 case "$CPPFLAGS" in
8490                 (*$cf_add_cflags)
8491                         ;;
8492                 (*)
8493                         case $cf_add_cflags in
8494                         (-D*)
8495                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8496
8497 CPPFLAGS=`echo "$CPPFLAGS" | \
8498         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8499                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8500
8501                                 ;;
8502                         esac
8503                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8504                         ;;
8505                 esac
8506                 ;;
8507         (*)
8508                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8509                 ;;
8510         esac
8511         ;;
8512 (yes)
8513         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8514
8515         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8516
8517         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8518                 && test -z "${cf_tst_cflags}" \
8519                 && cf_fix_cppflags=no
8520         ;;
8521 esac
8522 done
8523
8524 if test -n "$cf_new_cflags" ; then
8525
8526         CFLAGS="$CFLAGS $cf_new_cflags"
8527 fi
8528
8529 if test -n "$cf_new_cppflags" ; then
8530
8531         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8532 fi
8533
8534 if test -n "$cf_new_extra_cppflags" ; then
8535
8536         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8537 fi
8538
8539 fi
8540
8541 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8542
8543 cf_save_CFLAGS="$CFLAGS"
8544 cf_save_CPPFLAGS="$CPPFLAGS"
8545
8546 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8547         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8548                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8549
8550 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8551         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8552                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8553
8554 echo "$as_me:8554: checking if we should define _POSIX_C_SOURCE" >&5
8555 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8556 if test "${cf_cv_posix_c_source+set}" = set; then
8557   echo $ECHO_N "(cached) $ECHO_C" >&6
8558 else
8559
8560 echo "${as_me:-configure}:8560: testing if the symbol is already defined go no further ..." 1>&5
8561
8562         cat >conftest.$ac_ext <<_ACEOF
8563 #line 8563 "configure"
8564 #include "confdefs.h"
8565 #include <sys/types.h>
8566 int
8567 main ()
8568 {
8569
8570 #ifndef _POSIX_C_SOURCE
8571 make an error
8572 #endif
8573   ;
8574   return 0;
8575 }
8576 _ACEOF
8577 rm -f conftest.$ac_objext
8578 if { (eval echo "$as_me:8578: \"$ac_compile\"") >&5
8579   (eval $ac_compile) 2>&5
8580   ac_status=$?
8581   echo "$as_me:8581: \$? = $ac_status" >&5
8582   (exit $ac_status); } &&
8583          { ac_try='test -s conftest.$ac_objext'
8584   { (eval echo "$as_me:8584: \"$ac_try\"") >&5
8585   (eval $ac_try) 2>&5
8586   ac_status=$?
8587   echo "$as_me:8587: \$? = $ac_status" >&5
8588   (exit $ac_status); }; }; then
8589   cf_cv_posix_c_source=no
8590 else
8591   echo "$as_me: failed program was:" >&5
8592 cat conftest.$ac_ext >&5
8593 cf_want_posix_source=no
8594          case .$cf_POSIX_C_SOURCE in
8595          (.[12]??*)
8596                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8597                 ;;
8598          (.2)
8599                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8600                 cf_want_posix_source=yes
8601                 ;;
8602          (.*)
8603                 cf_want_posix_source=yes
8604                 ;;
8605          esac
8606          if test "$cf_want_posix_source" = yes ; then
8607                 cat >conftest.$ac_ext <<_ACEOF
8608 #line 8608 "configure"
8609 #include "confdefs.h"
8610 #include <sys/types.h>
8611 int
8612 main ()
8613 {
8614
8615 #ifdef _POSIX_SOURCE
8616 make an error
8617 #endif
8618   ;
8619   return 0;
8620 }
8621 _ACEOF
8622 rm -f conftest.$ac_objext
8623 if { (eval echo "$as_me:8623: \"$ac_compile\"") >&5
8624   (eval $ac_compile) 2>&5
8625   ac_status=$?
8626   echo "$as_me:8626: \$? = $ac_status" >&5
8627   (exit $ac_status); } &&
8628          { ac_try='test -s conftest.$ac_objext'
8629   { (eval echo "$as_me:8629: \"$ac_try\"") >&5
8630   (eval $ac_try) 2>&5
8631   ac_status=$?
8632   echo "$as_me:8632: \$? = $ac_status" >&5
8633   (exit $ac_status); }; }; then
8634   :
8635 else
8636   echo "$as_me: failed program was:" >&5
8637 cat conftest.$ac_ext >&5
8638 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8639 fi
8640 rm -f conftest.$ac_objext conftest.$ac_ext
8641          fi
8642
8643 echo "${as_me:-configure}:8643: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8644
8645          CFLAGS="$cf_trim_CFLAGS"
8646          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8647
8648 echo "${as_me:-configure}:8648: testing if the second compile does not leave our definition intact error ..." 1>&5
8649
8650          cat >conftest.$ac_ext <<_ACEOF
8651 #line 8651 "configure"
8652 #include "confdefs.h"
8653 #include <sys/types.h>
8654 int
8655 main ()
8656 {
8657
8658 #ifndef _POSIX_C_SOURCE
8659 make an error
8660 #endif
8661   ;
8662   return 0;
8663 }
8664 _ACEOF
8665 rm -f conftest.$ac_objext
8666 if { (eval echo "$as_me:8666: \"$ac_compile\"") >&5
8667   (eval $ac_compile) 2>&5
8668   ac_status=$?
8669   echo "$as_me:8669: \$? = $ac_status" >&5
8670   (exit $ac_status); } &&
8671          { ac_try='test -s conftest.$ac_objext'
8672   { (eval echo "$as_me:8672: \"$ac_try\"") >&5
8673   (eval $ac_try) 2>&5
8674   ac_status=$?
8675   echo "$as_me:8675: \$? = $ac_status" >&5
8676   (exit $ac_status); }; }; then
8677   :
8678 else
8679   echo "$as_me: failed program was:" >&5
8680 cat conftest.$ac_ext >&5
8681 cf_cv_posix_c_source=no
8682 fi
8683 rm -f conftest.$ac_objext conftest.$ac_ext
8684          CFLAGS="$cf_save_CFLAGS"
8685          CPPFLAGS="$cf_save_CPPFLAGS"
8686
8687 fi
8688 rm -f conftest.$ac_objext conftest.$ac_ext
8689
8690 fi
8691 echo "$as_me:8691: result: $cf_cv_posix_c_source" >&5
8692 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8693
8694 if test "$cf_cv_posix_c_source" != no ; then
8695         CFLAGS="$cf_trim_CFLAGS"
8696         CPPFLAGS="$cf_trim_CPPFLAGS"
8697
8698 cf_fix_cppflags=no
8699 cf_new_cflags=
8700 cf_new_cppflags=
8701 cf_new_extra_cppflags=
8702
8703 for cf_add_cflags in $cf_cv_posix_c_source
8704 do
8705 case $cf_fix_cppflags in
8706 (no)
8707         case $cf_add_cflags in
8708         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8709                 case $cf_add_cflags in
8710                 (-D*)
8711                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8712
8713                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8714                                 && test -z "${cf_tst_cflags}" \
8715                                 && cf_fix_cppflags=yes
8716
8717                         if test $cf_fix_cppflags = yes ; then
8718                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8719                                 continue
8720                         elif test "${cf_tst_cflags}" = "\"'" ; then
8721                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8722                                 continue
8723                         fi
8724                         ;;
8725                 esac
8726                 case "$CPPFLAGS" in
8727                 (*$cf_add_cflags)
8728                         ;;
8729                 (*)
8730                         case $cf_add_cflags in
8731                         (-D*)
8732                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8733
8734 CPPFLAGS=`echo "$CPPFLAGS" | \
8735         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8736                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8737
8738                                 ;;
8739                         esac
8740                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8741                         ;;
8742                 esac
8743                 ;;
8744         (*)
8745                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8746                 ;;
8747         esac
8748         ;;
8749 (yes)
8750         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8751
8752         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8753
8754         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8755                 && test -z "${cf_tst_cflags}" \
8756                 && cf_fix_cppflags=no
8757         ;;
8758 esac
8759 done
8760
8761 if test -n "$cf_new_cflags" ; then
8762
8763         CFLAGS="$CFLAGS $cf_new_cflags"
8764 fi
8765
8766 if test -n "$cf_new_cppflags" ; then
8767
8768         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8769 fi
8770
8771 if test -n "$cf_new_extra_cppflags" ; then
8772
8773         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8774 fi
8775
8776 fi
8777
8778         ;;
8779 esac
8780
8781 if test -n "$cf_xopen_source" ; then
8782
8783 cf_fix_cppflags=no
8784 cf_new_cflags=
8785 cf_new_cppflags=
8786 cf_new_extra_cppflags=
8787
8788 for cf_add_cflags in $cf_xopen_source
8789 do
8790 case $cf_fix_cppflags in
8791 (no)
8792         case $cf_add_cflags in
8793         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8794                 case $cf_add_cflags in
8795                 (-D*)
8796                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8797
8798                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8799                                 && test -z "${cf_tst_cflags}" \
8800                                 && cf_fix_cppflags=yes
8801
8802                         if test $cf_fix_cppflags = yes ; then
8803                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8804                                 continue
8805                         elif test "${cf_tst_cflags}" = "\"'" ; then
8806                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8807                                 continue
8808                         fi
8809                         ;;
8810                 esac
8811                 case "$CPPFLAGS" in
8812                 (*$cf_add_cflags)
8813                         ;;
8814                 (*)
8815                         case $cf_add_cflags in
8816                         (-D*)
8817                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8818
8819 CPPFLAGS=`echo "$CPPFLAGS" | \
8820         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8821                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8822
8823                                 ;;
8824                         esac
8825                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8826                         ;;
8827                 esac
8828                 ;;
8829         (*)
8830                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8831                 ;;
8832         esac
8833         ;;
8834 (yes)
8835         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8836
8837         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8838
8839         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8840                 && test -z "${cf_tst_cflags}" \
8841                 && cf_fix_cppflags=no
8842         ;;
8843 esac
8844 done
8845
8846 if test -n "$cf_new_cflags" ; then
8847         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8848
8849 echo "${as_me:-configure}:8849: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8850
8851         CFLAGS="$CFLAGS $cf_new_cflags"
8852 fi
8853
8854 if test -n "$cf_new_cppflags" ; then
8855         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8856
8857 echo "${as_me:-configure}:8857: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8858
8859         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8860 fi
8861
8862 if test -n "$cf_new_extra_cppflags" ; then
8863         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8864
8865 echo "${as_me:-configure}:8865: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8866
8867         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8868 fi
8869
8870 fi
8871
8872 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8873         echo "$as_me:8873: checking if _XOPEN_SOURCE really is set" >&5
8874 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8875         cat >conftest.$ac_ext <<_ACEOF
8876 #line 8876 "configure"
8877 #include "confdefs.h"
8878 #include <stdlib.h>
8879 int
8880 main ()
8881 {
8882
8883 #ifndef _XOPEN_SOURCE
8884 make an error
8885 #endif
8886   ;
8887   return 0;
8888 }
8889 _ACEOF
8890 rm -f conftest.$ac_objext
8891 if { (eval echo "$as_me:8891: \"$ac_compile\"") >&5
8892   (eval $ac_compile) 2>&5
8893   ac_status=$?
8894   echo "$as_me:8894: \$? = $ac_status" >&5
8895   (exit $ac_status); } &&
8896          { ac_try='test -s conftest.$ac_objext'
8897   { (eval echo "$as_me:8897: \"$ac_try\"") >&5
8898   (eval $ac_try) 2>&5
8899   ac_status=$?
8900   echo "$as_me:8900: \$? = $ac_status" >&5
8901   (exit $ac_status); }; }; then
8902   cf_XOPEN_SOURCE_set=yes
8903 else
8904   echo "$as_me: failed program was:" >&5
8905 cat conftest.$ac_ext >&5
8906 cf_XOPEN_SOURCE_set=no
8907 fi
8908 rm -f conftest.$ac_objext conftest.$ac_ext
8909         echo "$as_me:8909: result: $cf_XOPEN_SOURCE_set" >&5
8910 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8911         if test $cf_XOPEN_SOURCE_set = yes
8912         then
8913                 cat >conftest.$ac_ext <<_ACEOF
8914 #line 8914 "configure"
8915 #include "confdefs.h"
8916 #include <stdlib.h>
8917 int
8918 main ()
8919 {
8920
8921 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8922 make an error
8923 #endif
8924   ;
8925   return 0;
8926 }
8927 _ACEOF
8928 rm -f conftest.$ac_objext
8929 if { (eval echo "$as_me:8929: \"$ac_compile\"") >&5
8930   (eval $ac_compile) 2>&5
8931   ac_status=$?
8932   echo "$as_me:8932: \$? = $ac_status" >&5
8933   (exit $ac_status); } &&
8934          { ac_try='test -s conftest.$ac_objext'
8935   { (eval echo "$as_me:8935: \"$ac_try\"") >&5
8936   (eval $ac_try) 2>&5
8937   ac_status=$?
8938   echo "$as_me:8938: \$? = $ac_status" >&5
8939   (exit $ac_status); }; }; then
8940   cf_XOPEN_SOURCE_set_ok=yes
8941 else
8942   echo "$as_me: failed program was:" >&5
8943 cat conftest.$ac_ext >&5
8944 cf_XOPEN_SOURCE_set_ok=no
8945 fi
8946 rm -f conftest.$ac_objext conftest.$ac_ext
8947                 if test $cf_XOPEN_SOURCE_set_ok = no
8948                 then
8949                         { echo "$as_me:8949: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8950 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8951                 fi
8952         else
8953
8954 echo "$as_me:8954: checking if we should define _XOPEN_SOURCE" >&5
8955 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8956 if test "${cf_cv_xopen_source+set}" = set; then
8957   echo $ECHO_N "(cached) $ECHO_C" >&6
8958 else
8959
8960         cat >conftest.$ac_ext <<_ACEOF
8961 #line 8961 "configure"
8962 #include "confdefs.h"
8963
8964 #include <stdlib.h>
8965 #include <string.h>
8966 #include <sys/types.h>
8967
8968 int
8969 main ()
8970 {
8971
8972 #ifndef _XOPEN_SOURCE
8973 make an error
8974 #endif
8975   ;
8976   return 0;
8977 }
8978 _ACEOF
8979 rm -f conftest.$ac_objext
8980 if { (eval echo "$as_me:8980: \"$ac_compile\"") >&5
8981   (eval $ac_compile) 2>&5
8982   ac_status=$?
8983   echo "$as_me:8983: \$? = $ac_status" >&5
8984   (exit $ac_status); } &&
8985          { ac_try='test -s conftest.$ac_objext'
8986   { (eval echo "$as_me:8986: \"$ac_try\"") >&5
8987   (eval $ac_try) 2>&5
8988   ac_status=$?
8989   echo "$as_me:8989: \$? = $ac_status" >&5
8990   (exit $ac_status); }; }; then
8991   cf_cv_xopen_source=no
8992 else
8993   echo "$as_me: failed program was:" >&5
8994 cat conftest.$ac_ext >&5
8995 cf_save="$CPPFLAGS"
8996          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8997          cat >conftest.$ac_ext <<_ACEOF
8998 #line 8998 "configure"
8999 #include "confdefs.h"
9000
9001 #include <stdlib.h>
9002 #include <string.h>
9003 #include <sys/types.h>
9004
9005 int
9006 main ()
9007 {
9008
9009 #ifdef _XOPEN_SOURCE
9010 make an error
9011 #endif
9012   ;
9013   return 0;
9014 }
9015 _ACEOF
9016 rm -f conftest.$ac_objext
9017 if { (eval echo "$as_me:9017: \"$ac_compile\"") >&5
9018   (eval $ac_compile) 2>&5
9019   ac_status=$?
9020   echo "$as_me:9020: \$? = $ac_status" >&5
9021   (exit $ac_status); } &&
9022          { ac_try='test -s conftest.$ac_objext'
9023   { (eval echo "$as_me:9023: \"$ac_try\"") >&5
9024   (eval $ac_try) 2>&5
9025   ac_status=$?
9026   echo "$as_me:9026: \$? = $ac_status" >&5
9027   (exit $ac_status); }; }; then
9028   cf_cv_xopen_source=no
9029 else
9030   echo "$as_me: failed program was:" >&5
9031 cat conftest.$ac_ext >&5
9032 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9033 fi
9034 rm -f conftest.$ac_objext conftest.$ac_ext
9035         CPPFLAGS="$cf_save"
9036
9037 fi
9038 rm -f conftest.$ac_objext conftest.$ac_ext
9039
9040 fi
9041 echo "$as_me:9041: result: $cf_cv_xopen_source" >&5
9042 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9043
9044 if test "$cf_cv_xopen_source" != no ; then
9045
9046 CFLAGS=`echo "$CFLAGS" | \
9047         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9048                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9049
9050 CPPFLAGS=`echo "$CPPFLAGS" | \
9051         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9052                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9053
9054         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9055
9056 cf_fix_cppflags=no
9057 cf_new_cflags=
9058 cf_new_cppflags=
9059 cf_new_extra_cppflags=
9060
9061 for cf_add_cflags in $cf_temp_xopen_source
9062 do
9063 case $cf_fix_cppflags in
9064 (no)
9065         case $cf_add_cflags in
9066         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9067                 case $cf_add_cflags in
9068                 (-D*)
9069                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9070
9071                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9072                                 && test -z "${cf_tst_cflags}" \
9073                                 && cf_fix_cppflags=yes
9074
9075                         if test $cf_fix_cppflags = yes ; then
9076                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9077                                 continue
9078                         elif test "${cf_tst_cflags}" = "\"'" ; then
9079                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9080                                 continue
9081                         fi
9082                         ;;
9083                 esac
9084                 case "$CPPFLAGS" in
9085                 (*$cf_add_cflags)
9086                         ;;
9087                 (*)
9088                         case $cf_add_cflags in
9089                         (-D*)
9090                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9091
9092 CPPFLAGS=`echo "$CPPFLAGS" | \
9093         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9094                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9095
9096                                 ;;
9097                         esac
9098                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9099                         ;;
9100                 esac
9101                 ;;
9102         (*)
9103                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9104                 ;;
9105         esac
9106         ;;
9107 (yes)
9108         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9109
9110         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9111
9112         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9113                 && test -z "${cf_tst_cflags}" \
9114                 && cf_fix_cppflags=no
9115         ;;
9116 esac
9117 done
9118
9119 if test -n "$cf_new_cflags" ; then
9120
9121         CFLAGS="$CFLAGS $cf_new_cflags"
9122 fi
9123
9124 if test -n "$cf_new_cppflags" ; then
9125
9126         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9127 fi
9128
9129 if test -n "$cf_new_extra_cppflags" ; then
9130
9131         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9132 fi
9133
9134 fi
9135
9136         fi
9137 fi
9138
9139 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9140
9141 # Work around breakage on OS X
9142
9143 echo "$as_me:9143: checking if SIGWINCH is defined" >&5
9144 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9145 if test "${cf_cv_define_sigwinch+set}" = set; then
9146   echo $ECHO_N "(cached) $ECHO_C" >&6
9147 else
9148
9149         cat >conftest.$ac_ext <<_ACEOF
9150 #line 9150 "configure"
9151 #include "confdefs.h"
9152
9153 #include <sys/types.h>
9154 #include <sys/signal.h>
9155
9156 int
9157 main ()
9158 {
9159 int x = SIGWINCH
9160   ;
9161   return 0;
9162 }
9163 _ACEOF
9164 rm -f conftest.$ac_objext
9165 if { (eval echo "$as_me:9165: \"$ac_compile\"") >&5
9166   (eval $ac_compile) 2>&5
9167   ac_status=$?
9168   echo "$as_me:9168: \$? = $ac_status" >&5
9169   (exit $ac_status); } &&
9170          { ac_try='test -s conftest.$ac_objext'
9171   { (eval echo "$as_me:9171: \"$ac_try\"") >&5
9172   (eval $ac_try) 2>&5
9173   ac_status=$?
9174   echo "$as_me:9174: \$? = $ac_status" >&5
9175   (exit $ac_status); }; }; then
9176   cf_cv_define_sigwinch=yes
9177 else
9178   echo "$as_me: failed program was:" >&5
9179 cat conftest.$ac_ext >&5
9180 cat >conftest.$ac_ext <<_ACEOF
9181 #line 9181 "configure"
9182 #include "confdefs.h"
9183
9184 #undef _XOPEN_SOURCE
9185 #undef _POSIX_SOURCE
9186 #undef _POSIX_C_SOURCE
9187 #include <sys/types.h>
9188 #include <sys/signal.h>
9189
9190 int
9191 main ()
9192 {
9193 int x = SIGWINCH
9194   ;
9195   return 0;
9196 }
9197 _ACEOF
9198 rm -f conftest.$ac_objext
9199 if { (eval echo "$as_me:9199: \"$ac_compile\"") >&5
9200   (eval $ac_compile) 2>&5
9201   ac_status=$?
9202   echo "$as_me:9202: \$? = $ac_status" >&5
9203   (exit $ac_status); } &&
9204          { ac_try='test -s conftest.$ac_objext'
9205   { (eval echo "$as_me:9205: \"$ac_try\"") >&5
9206   (eval $ac_try) 2>&5
9207   ac_status=$?
9208   echo "$as_me:9208: \$? = $ac_status" >&5
9209   (exit $ac_status); }; }; then
9210   cf_cv_define_sigwinch=maybe
9211 else
9212   echo "$as_me: failed program was:" >&5
9213 cat conftest.$ac_ext >&5
9214 cf_cv_define_sigwinch=no
9215 fi
9216 rm -f conftest.$ac_objext conftest.$ac_ext
9217
9218 fi
9219 rm -f conftest.$ac_objext conftest.$ac_ext
9220
9221 fi
9222 echo "$as_me:9222: result: $cf_cv_define_sigwinch" >&5
9223 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9224
9225 if test "$cf_cv_define_sigwinch" = maybe ; then
9226 echo "$as_me:9226: checking for actual SIGWINCH definition" >&5
9227 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9228 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9229   echo $ECHO_N "(cached) $ECHO_C" >&6
9230 else
9231
9232 cf_cv_fixup_sigwinch=unknown
9233 cf_sigwinch=32
9234 while test $cf_sigwinch != 1
9235 do
9236         cat >conftest.$ac_ext <<_ACEOF
9237 #line 9237 "configure"
9238 #include "confdefs.h"
9239
9240 #undef _XOPEN_SOURCE
9241 #undef _POSIX_SOURCE
9242 #undef _POSIX_C_SOURCE
9243 #include <sys/types.h>
9244 #include <sys/signal.h>
9245
9246 int
9247 main ()
9248 {
9249
9250 #if SIGWINCH != $cf_sigwinch
9251 make an error
9252 #endif
9253 int x = SIGWINCH
9254   ;
9255   return 0;
9256 }
9257 _ACEOF
9258 rm -f conftest.$ac_objext
9259 if { (eval echo "$as_me:9259: \"$ac_compile\"") >&5
9260   (eval $ac_compile) 2>&5
9261   ac_status=$?
9262   echo "$as_me:9262: \$? = $ac_status" >&5
9263   (exit $ac_status); } &&
9264          { ac_try='test -s conftest.$ac_objext'
9265   { (eval echo "$as_me:9265: \"$ac_try\"") >&5
9266   (eval $ac_try) 2>&5
9267   ac_status=$?
9268   echo "$as_me:9268: \$? = $ac_status" >&5
9269   (exit $ac_status); }; }; then
9270   cf_cv_fixup_sigwinch=$cf_sigwinch
9271          break
9272 else
9273   echo "$as_me: failed program was:" >&5
9274 cat conftest.$ac_ext >&5
9275 fi
9276 rm -f conftest.$ac_objext conftest.$ac_ext
9277
9278 cf_sigwinch=`expr $cf_sigwinch - 1`
9279 done
9280
9281 fi
9282 echo "$as_me:9282: result: $cf_cv_fixup_sigwinch" >&5
9283 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9284
9285         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9286                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9287         fi
9288 fi
9289
9290 # Checks for CODESET support.
9291
9292 echo "$as_me:9292: checking for nl_langinfo and CODESET" >&5
9293 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9294 if test "${am_cv_langinfo_codeset+set}" = set; then
9295   echo $ECHO_N "(cached) $ECHO_C" >&6
9296 else
9297   cat >conftest.$ac_ext <<_ACEOF
9298 #line 9298 "configure"
9299 #include "confdefs.h"
9300 #include <langinfo.h>
9301 int
9302 main ()
9303 {
9304 char* cs = nl_langinfo(CODESET);
9305   ;
9306   return 0;
9307 }
9308 _ACEOF
9309 rm -f conftest.$ac_objext conftest$ac_exeext
9310 if { (eval echo "$as_me:9310: \"$ac_link\"") >&5
9311   (eval $ac_link) 2>&5
9312   ac_status=$?
9313   echo "$as_me:9313: \$? = $ac_status" >&5
9314   (exit $ac_status); } &&
9315          { ac_try='test -s conftest$ac_exeext'
9316   { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9317   (eval $ac_try) 2>&5
9318   ac_status=$?
9319   echo "$as_me:9319: \$? = $ac_status" >&5
9320   (exit $ac_status); }; }; then
9321   am_cv_langinfo_codeset=yes
9322 else
9323   echo "$as_me: failed program was:" >&5
9324 cat conftest.$ac_ext >&5
9325 am_cv_langinfo_codeset=no
9326 fi
9327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9328
9329 fi
9330 echo "$as_me:9330: result: $am_cv_langinfo_codeset" >&5
9331 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9332         if test $am_cv_langinfo_codeset = yes; then
9333
9334 cat >>confdefs.h <<\EOF
9335 #define HAVE_LANGINFO_CODESET 1
9336 EOF
9337
9338         fi
9339
9340 # use these variables to work around a defect in gcc's fixincludes.
9341 NCURSES_OK_WCHAR_T=
9342 NCURSES_OK_WINT_T=
9343
9344 echo "$as_me:9344: checking if you want wide-character code" >&5
9345 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9346
9347 # Check whether --enable-widec or --disable-widec was given.
9348 if test "${enable_widec+set}" = set; then
9349   enableval="$enable_widec"
9350   with_widec=$enableval
9351 else
9352   with_widec=no
9353 fi;
9354 echo "$as_me:9354: result: $with_widec" >&5
9355 echo "${ECHO_T}$with_widec" >&6
9356
9357 NCURSES_WCWIDTH_GRAPHICS=1
9358
9359 if test "x$with_widec" = xyes ; then
9360         if test "x$disable_lib_suffixes" = xno ; then
9361                 LIB_SUFFIX="w${LIB_SUFFIX}"
9362         fi
9363
9364 cat >>confdefs.h <<\EOF
9365 #define USE_WIDEC_SUPPORT 1
9366 EOF
9367
9368 cat >>confdefs.h <<\EOF
9369 #define NCURSES_WIDECHAR 1
9370 EOF
9371
9372 echo "$as_me:9372: checking if wchar.h can be used as is" >&5
9373 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9374 if test "${cf_cv_wchar_h_okay+set}" = set; then
9375   echo $ECHO_N "(cached) $ECHO_C" >&6
9376 else
9377
9378 cat >conftest.$ac_ext <<_ACEOF
9379 #line 9379 "configure"
9380 #include "confdefs.h"
9381
9382 #include <stdlib.h>
9383 #include <wchar.h>
9384
9385 int
9386 main ()
9387 {
9388
9389         wint_t foo = 0;
9390         int bar = iswpunct(foo)
9391   ;
9392   return 0;
9393 }
9394 _ACEOF
9395 rm -f conftest.$ac_objext
9396 if { (eval echo "$as_me:9396: \"$ac_compile\"") >&5
9397   (eval $ac_compile) 2>&5
9398   ac_status=$?
9399   echo "$as_me:9399: \$? = $ac_status" >&5
9400   (exit $ac_status); } &&
9401          { ac_try='test -s conftest.$ac_objext'
9402   { (eval echo "$as_me:9402: \"$ac_try\"") >&5
9403   (eval $ac_try) 2>&5
9404   ac_status=$?
9405   echo "$as_me:9405: \$? = $ac_status" >&5
9406   (exit $ac_status); }; }; then
9407   cf_cv_wchar_h_okay=yes
9408 else
9409   echo "$as_me: failed program was:" >&5
9410 cat conftest.$ac_ext >&5
9411 cf_cv_wchar_h_okay=no
9412 fi
9413 rm -f conftest.$ac_objext conftest.$ac_ext
9414 fi
9415 echo "$as_me:9415: result: $cf_cv_wchar_h_okay" >&5
9416 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9417
9418 if test $cf_cv_wchar_h_okay = no
9419 then
9420
9421 echo "$as_me:9421: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9422 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9423 cat >conftest.$ac_ext <<_ACEOF
9424 #line 9424 "configure"
9425 #include "confdefs.h"
9426 #include <sys/types.h>
9427
9428 int
9429 main ()
9430 {
9431
9432 #ifndef _XOPEN_SOURCE_EXTENDED
9433 make an error
9434 #endif
9435   ;
9436   return 0;
9437 }
9438 _ACEOF
9439 rm -f conftest.$ac_objext
9440 if { (eval echo "$as_me:9440: \"$ac_compile\"") >&5
9441   (eval $ac_compile) 2>&5
9442   ac_status=$?
9443   echo "$as_me:9443: \$? = $ac_status" >&5
9444   (exit $ac_status); } &&
9445          { ac_try='test -s conftest.$ac_objext'
9446   { (eval echo "$as_me:9446: \"$ac_try\"") >&5
9447   (eval $ac_try) 2>&5
9448   ac_status=$?
9449   echo "$as_me:9449: \$? = $ac_status" >&5
9450   (exit $ac_status); }; }; then
9451   cf_result=no
9452 else
9453   echo "$as_me: failed program was:" >&5
9454 cat conftest.$ac_ext >&5
9455 cf_result=yes
9456 fi
9457 rm -f conftest.$ac_objext conftest.$ac_ext
9458 echo "$as_me:9458: result: $cf_result" >&5
9459 echo "${ECHO_T}$cf_result" >&6
9460
9461 if test "$cf_result" = yes ; then
9462         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9463 elif test "x" != "x" ; then
9464         echo "$as_me:9464: checking checking for compatible value versus " >&5
9465 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9466         cat >conftest.$ac_ext <<_ACEOF
9467 #line 9467 "configure"
9468 #include "confdefs.h"
9469 #include <sys/types.h>
9470
9471 int
9472 main ()
9473 {
9474
9475 #if _XOPEN_SOURCE_EXTENDED- < 0
9476 make an error
9477 #endif
9478   ;
9479   return 0;
9480 }
9481 _ACEOF
9482 rm -f conftest.$ac_objext
9483 if { (eval echo "$as_me:9483: \"$ac_compile\"") >&5
9484   (eval $ac_compile) 2>&5
9485   ac_status=$?
9486   echo "$as_me:9486: \$? = $ac_status" >&5
9487   (exit $ac_status); } &&
9488          { ac_try='test -s conftest.$ac_objext'
9489   { (eval echo "$as_me:9489: \"$ac_try\"") >&5
9490   (eval $ac_try) 2>&5
9491   ac_status=$?
9492   echo "$as_me:9492: \$? = $ac_status" >&5
9493   (exit $ac_status); }; }; then
9494   cf_result=yes
9495 else
9496   echo "$as_me: failed program was:" >&5
9497 cat conftest.$ac_ext >&5
9498 cf_result=no
9499 fi
9500 rm -f conftest.$ac_objext conftest.$ac_ext
9501         echo "$as_me:9501: result: $cf_result" >&5
9502 echo "${ECHO_T}$cf_result" >&6
9503         if test "$cf_result" = no ; then
9504                 # perhaps we can override it - try...
9505                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9506         fi
9507 fi
9508
9509 fi
9510
9511 echo "$as_me:9511: checking if wcwidth agrees graphics are single-width" >&5
9512 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9513 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9514   echo $ECHO_N "(cached) $ECHO_C" >&6
9515 else
9516
9517 cat >conftest.in <<CF_EOF
9518 -       VT100 symbols
9519 0x250c  upper left corner
9520 0x2514  lower left corner
9521 0x2510  upper right corner
9522 0x2518  lower right corner
9523 0x251c  tee pointing left
9524 0x2524  tee pointing right
9525 0x2534  tee pointing up
9526 0x252c  tee pointing down
9527 0x2500  horizontal line
9528 0x2502  vertical line
9529 0x253c  large plus or crossover
9530 0x23ba  scan line 1
9531 0x23bd  scan line 9
9532 0x25c6  diamond
9533 0x2592  checker board (stipple)
9534 0x00b0  degree symbol
9535 0x00b1  plus/minus
9536 0x00b7  bullet
9537 -       Teletype 5410v1 symbols
9538 0x2190  arrow pointing left
9539 0x2192  arrow pointing right
9540 0x2193  arrow pointing down
9541 0x2191  arrow pointing up
9542 0x2592  board of squares
9543 0x2603  lantern symbol
9544 0x25ae  solid square block
9545 -       these defaults were invented for ncurses
9546 0x23bb  scan line 3
9547 0x23bc  scan line 7
9548 0x2264  less-than-or-equal-to
9549 0x2265  greater-than-or-equal-to
9550 0x03c0  greek pi
9551 0x2260  not-equal
9552 0x00a3  pound-sterling symbol
9553 -       thick-line-drawing
9554 0x250f  upper left corner
9555 0x2517  lower left corner
9556 0x2513  upper right corner
9557 0x251b  lower right corner
9558 0x2523  tee pointing left
9559 0x252b  tee pointing right
9560 0x253b  tee pointing up
9561 0x2533  tee pointing down
9562 0x2501  horizontal line
9563 0x2503  vertical line
9564 0x254b  large plus or crossover
9565 -       double-line-drawing
9566 0x2554  upper left corner
9567 0x255a  lower left corner
9568 0x2557  upper right corner
9569 0x255d  lower right corner
9570 0x2563  tee pointing left
9571 0x2560  tee pointing right
9572 0x2569  tee pointing up
9573 0x2566  tee pointing down
9574 0x2550  horizontal line
9575 0x2551  vertical line
9576 0x256c  large plus or crossover
9577 CF_EOF
9578 if test "$cross_compiling" = yes; then
9579   cf_cv_wcwidth_graphics=unknown
9580 else
9581   cat >conftest.$ac_ext <<_ACEOF
9582 #line 9582 "configure"
9583 #include "confdefs.h"
9584
9585 #include <locale.h>
9586 #include <stdio.h>
9587 #include <wchar.h>
9588
9589 #define MY_LEN 80
9590
9591 int
9592 main(void)
9593 {
9594         FILE *fp;
9595         int value;
9596         char buffer[MY_LEN + 1];
9597         char notes[MY_LEN + 1];
9598         int totals = 0;
9599         int passed = 0;
9600
9601         if (setlocale(LC_ALL, "en_US.UTF8") ||
9602                 setlocale(LC_ALL, "en_US.UTF-8") ||
9603                 setlocale(LC_ALL, "en_US.utf8") ||
9604                 setlocale(LC_ALL, "en_US.utf-8")) {
9605                 if ((fp = fopen("conftest.in", "r")) != 0) {
9606                         while (fgets(buffer, MY_LEN, fp) != 0) {
9607                                 if (*buffer == '-') {
9608                                         fprintf(stderr, "\t%s", buffer);
9609                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9610                                         ++totals;
9611                                         if (wcwidth(value) == 1)
9612                                                 ++passed;
9613                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9614                                 } else {
9615                                         fprintf(stderr, "?\t%s", buffer);
9616                                 }
9617                         }
9618                 }
9619         }
9620         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9621         return (totals == passed) ? 0 : 1;
9622 }
9623
9624 _ACEOF
9625 rm -f conftest$ac_exeext
9626 if { (eval echo "$as_me:9626: \"$ac_link\"") >&5
9627   (eval $ac_link) 2>&5
9628   ac_status=$?
9629   echo "$as_me:9629: \$? = $ac_status" >&5
9630   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9631   { (eval echo "$as_me:9631: \"$ac_try\"") >&5
9632   (eval $ac_try) 2>&5
9633   ac_status=$?
9634   echo "$as_me:9634: \$? = $ac_status" >&5
9635   (exit $ac_status); }; }; then
9636   cf_cv_wcwidth_graphics=yes
9637 else
9638   echo "$as_me: program exited with status $ac_status" >&5
9639 echo "$as_me: failed program was:" >&5
9640 cat conftest.$ac_ext >&5
9641 cf_cv_wcwidth_graphics=no
9642 fi
9643 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9644 fi
9645
9646 fi
9647 echo "$as_me:9647: result: $cf_cv_wcwidth_graphics" >&5
9648 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9649
9650         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9651
9652         # with_overwrite=no
9653         NCURSES_CH_T=cchar_t
9654
9655 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9656 do
9657 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9658 echo "$as_me:9658: checking for $ac_func" >&5
9659 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9660 if eval "test \"\${$as_ac_var+set}\" = set"; then
9661   echo $ECHO_N "(cached) $ECHO_C" >&6
9662 else
9663   cat >conftest.$ac_ext <<_ACEOF
9664 #line 9664 "configure"
9665 #include "confdefs.h"
9666 /* System header to define __stub macros and hopefully few prototypes,
9667     which can conflict with char $ac_func (); below.  */
9668 #include <assert.h>
9669 /* Override any gcc2 internal prototype to avoid an error.  */
9670 #ifdef __cplusplus
9671 extern "C"
9672 #endif
9673 /* We use char because int might match the return type of a gcc2
9674    builtin and then its argument prototype would still apply.  */
9675 char $ac_func ();
9676 char (*f) ();
9677
9678 int
9679 main ()
9680 {
9681 /* The GNU C library defines this for functions which it implements
9682     to always fail with ENOSYS.  Some functions are actually named
9683     something starting with __ and the normal name is an alias.  */
9684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9685 choke me
9686 #else
9687 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9688 #endif
9689
9690   ;
9691   return 0;
9692 }
9693 _ACEOF
9694 rm -f conftest.$ac_objext conftest$ac_exeext
9695 if { (eval echo "$as_me:9695: \"$ac_link\"") >&5
9696   (eval $ac_link) 2>&5
9697   ac_status=$?
9698   echo "$as_me:9698: \$? = $ac_status" >&5
9699   (exit $ac_status); } &&
9700          { ac_try='test -s conftest$ac_exeext'
9701   { (eval echo "$as_me:9701: \"$ac_try\"") >&5
9702   (eval $ac_try) 2>&5
9703   ac_status=$?
9704   echo "$as_me:9704: \$? = $ac_status" >&5
9705   (exit $ac_status); }; }; then
9706   eval "$as_ac_var=yes"
9707 else
9708   echo "$as_me: failed program was:" >&5
9709 cat conftest.$ac_ext >&5
9710 eval "$as_ac_var=no"
9711 fi
9712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9713 fi
9714 echo "$as_me:9714: result: `eval echo '${'$as_ac_var'}'`" >&5
9715 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9716 if test `eval echo '${'$as_ac_var'}'` = yes; then
9717   cat >>confdefs.h <<EOF
9718 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9719 EOF
9720
9721 fi
9722 done
9723
9724         if test "x$ac_cv_func_putwc" != xyes ; then
9725
9726 echo "$as_me:9726: checking for multibyte character support" >&5
9727 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9728 if test "${cf_cv_utf8_lib+set}" = set; then
9729   echo $ECHO_N "(cached) $ECHO_C" >&6
9730 else
9731
9732         cf_save_LIBS="$LIBS"
9733         cat >conftest.$ac_ext <<_ACEOF
9734 #line 9734 "configure"
9735 #include "confdefs.h"
9736
9737 #include <stdlib.h>
9738 int
9739 main ()
9740 {
9741 putwc(0,0);
9742   ;
9743   return 0;
9744 }
9745 _ACEOF
9746 rm -f conftest.$ac_objext conftest$ac_exeext
9747 if { (eval echo "$as_me:9747: \"$ac_link\"") >&5
9748   (eval $ac_link) 2>&5
9749   ac_status=$?
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); } &&
9752          { ac_try='test -s conftest$ac_exeext'
9753   { (eval echo "$as_me:9753: \"$ac_try\"") >&5
9754   (eval $ac_try) 2>&5
9755   ac_status=$?
9756   echo "$as_me:9756: \$? = $ac_status" >&5
9757   (exit $ac_status); }; }; then
9758   cf_cv_utf8_lib=yes
9759 else
9760   echo "$as_me: failed program was:" >&5
9761 cat conftest.$ac_ext >&5
9762
9763 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9764 # will be set on completion of the AC_TRY_LINK below.
9765 cf_cv_header_path_utf8=
9766 cf_cv_library_path_utf8=
9767
9768 echo "${as_me:-configure}:9768: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9769
9770 cf_save_LIBS="$LIBS"
9771
9772 cat >conftest.$ac_ext <<_ACEOF
9773 #line 9773 "configure"
9774 #include "confdefs.h"
9775
9776 #include <libutf8.h>
9777 int
9778 main ()
9779 {
9780 putwc(0,0);
9781   ;
9782   return 0;
9783 }
9784 _ACEOF
9785 rm -f conftest.$ac_objext conftest$ac_exeext
9786 if { (eval echo "$as_me:9786: \"$ac_link\"") >&5
9787   (eval $ac_link) 2>&5
9788   ac_status=$?
9789   echo "$as_me:9789: \$? = $ac_status" >&5
9790   (exit $ac_status); } &&
9791          { ac_try='test -s conftest$ac_exeext'
9792   { (eval echo "$as_me:9792: \"$ac_try\"") >&5
9793   (eval $ac_try) 2>&5
9794   ac_status=$?
9795   echo "$as_me:9795: \$? = $ac_status" >&5
9796   (exit $ac_status); }; }; then
9797
9798         cf_cv_find_linkage_utf8=yes
9799         cf_cv_header_path_utf8=/usr/include
9800         cf_cv_library_path_utf8=/usr/lib
9801
9802 else
9803   echo "$as_me: failed program was:" >&5
9804 cat conftest.$ac_ext >&5
9805
9806 LIBS="-lutf8  $cf_save_LIBS"
9807
9808 cat >conftest.$ac_ext <<_ACEOF
9809 #line 9809 "configure"
9810 #include "confdefs.h"
9811
9812 #include <libutf8.h>
9813 int
9814 main ()
9815 {
9816 putwc(0,0);
9817   ;
9818   return 0;
9819 }
9820 _ACEOF
9821 rm -f conftest.$ac_objext conftest$ac_exeext
9822 if { (eval echo "$as_me:9822: \"$ac_link\"") >&5
9823   (eval $ac_link) 2>&5
9824   ac_status=$?
9825   echo "$as_me:9825: \$? = $ac_status" >&5
9826   (exit $ac_status); } &&
9827          { ac_try='test -s conftest$ac_exeext'
9828   { (eval echo "$as_me:9828: \"$ac_try\"") >&5
9829   (eval $ac_try) 2>&5
9830   ac_status=$?
9831   echo "$as_me:9831: \$? = $ac_status" >&5
9832   (exit $ac_status); }; }; then
9833
9834         cf_cv_find_linkage_utf8=yes
9835         cf_cv_header_path_utf8=/usr/include
9836         cf_cv_library_path_utf8=/usr/lib
9837         cf_cv_library_file_utf8="-lutf8"
9838
9839 else
9840   echo "$as_me: failed program was:" >&5
9841 cat conftest.$ac_ext >&5
9842
9843         cf_cv_find_linkage_utf8=no
9844         LIBS="$cf_save_LIBS"
9845
9846         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9847
9848 echo "${as_me:-configure}:9848: testing find linkage for utf8 library ..." 1>&5
9849
9850 echo "${as_me:-configure}:9850: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9851
9852         cf_save_CPPFLAGS="$CPPFLAGS"
9853         cf_test_CPPFLAGS="$CPPFLAGS"
9854
9855 cf_search=
9856
9857 # collect the current set of include-directories from compiler flags
9858 cf_header_path_list=""
9859 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9860         for cf_header_path in $CPPFLAGS $CFLAGS
9861         do
9862                 case $cf_header_path in
9863                 (-I*)
9864                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9865
9866 test "x$cf_header_path" != "xNONE" && \
9867 test -d "$cf_header_path" && \
9868  {
9869         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9870         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9871         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9872         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9873         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9874         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9875 }
9876
9877                         cf_header_path_list="$cf_header_path_list $cf_search"
9878                         ;;
9879                 esac
9880         done
9881 fi
9882
9883 # add the variations for the package we are looking for
9884
9885 cf_search=
9886
9887 test "x$prefix" != "xNONE" && \
9888 test -d "$prefix" && \
9889  {
9890         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9891         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9892         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9893         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9894         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9895         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9896 }
9897
9898 for cf_subdir_prefix in \
9899         /usr \
9900         /usr/local \
9901         /usr/pkg \
9902         /opt \
9903         /opt/local \
9904         $HOME
9905 do
9906
9907 test "x$cf_subdir_prefix" != "x$prefix" && \
9908 test -d "$cf_subdir_prefix" && \
9909 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9910         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9911         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9912         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9913         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9914         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9915         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9916 }
9917
9918 done
9919
9920 test "$includedir" != NONE && \
9921 test "$includedir" != "/usr/include" && \
9922 test -d "$includedir" && {
9923         test -d $includedir &&    cf_search="$cf_search $includedir"
9924         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9925 }
9926
9927 test "$oldincludedir" != NONE && \
9928 test "$oldincludedir" != "/usr/include" && \
9929 test -d "$oldincludedir" && {
9930         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9931         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9932 }
9933
9934 cf_search="$cf_search $cf_header_path_list"
9935
9936         for cf_cv_header_path_utf8 in $cf_search
9937         do
9938                 if test -d $cf_cv_header_path_utf8 ; then
9939                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9940
9941 echo "${as_me:-configure}:9941: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9942
9943                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9944                         cat >conftest.$ac_ext <<_ACEOF
9945 #line 9945 "configure"
9946 #include "confdefs.h"
9947
9948 #include <libutf8.h>
9949 int
9950 main ()
9951 {
9952 putwc(0,0);
9953   ;
9954   return 0;
9955 }
9956 _ACEOF
9957 rm -f conftest.$ac_objext
9958 if { (eval echo "$as_me:9958: \"$ac_compile\"") >&5
9959   (eval $ac_compile) 2>&5
9960   ac_status=$?
9961   echo "$as_me:9961: \$? = $ac_status" >&5
9962   (exit $ac_status); } &&
9963          { ac_try='test -s conftest.$ac_objext'
9964   { (eval echo "$as_me:9964: \"$ac_try\"") >&5
9965   (eval $ac_try) 2>&5
9966   ac_status=$?
9967   echo "$as_me:9967: \$? = $ac_status" >&5
9968   (exit $ac_status); }; }; then
9969
9970                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9971
9972 echo "${as_me:-configure}:9972: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9973
9974                                 cf_cv_find_linkage_utf8=maybe
9975                                 cf_test_CPPFLAGS="$CPPFLAGS"
9976                                 break
9977 else
9978   echo "$as_me: failed program was:" >&5
9979 cat conftest.$ac_ext >&5
9980
9981                                 CPPFLAGS="$cf_save_CPPFLAGS"
9982
9983 fi
9984 rm -f conftest.$ac_objext conftest.$ac_ext
9985                 fi
9986         done
9987
9988         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9989
9990 echo "${as_me:-configure}:9990: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9991
9992                 cf_save_LIBS="$LIBS"
9993                 cf_save_LDFLAGS="$LDFLAGS"
9994
9995                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9996
9997 cf_search=
9998 cf_library_path_list=""
9999 if test -n "${LDFLAGS}${LIBS}" ; then
10000         for cf_library_path in $LDFLAGS $LIBS
10001         do
10002                 case $cf_library_path in
10003                 (-L*)
10004                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10005
10006 test "x$cf_library_path" != "xNONE" && \
10007 test -d "$cf_library_path" && \
10008  {
10009         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10010         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10011         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10012         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10013         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10014         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10015 }
10016
10017                         cf_library_path_list="$cf_library_path_list $cf_search"
10018                         ;;
10019                 esac
10020         done
10021 fi
10022
10023 cf_search=
10024
10025 test "x$prefix" != "xNONE" && \
10026 test -d "$prefix" && \
10027  {
10028         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10029         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10030         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10031         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10032         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10033         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10034 }
10035
10036 for cf_subdir_prefix in \
10037         /usr \
10038         /usr/local \
10039         /usr/pkg \
10040         /opt \
10041         /opt/local \
10042         $HOME
10043 do
10044
10045 test "x$cf_subdir_prefix" != "x$prefix" && \
10046 test -d "$cf_subdir_prefix" && \
10047 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10048         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10049         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10050         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10051         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10052         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10053         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10054 }
10055
10056 done
10057
10058 cf_search="$cf_library_path_list $cf_search"
10059
10060                         for cf_cv_library_path_utf8 in $cf_search
10061                         do
10062                                 if test -d $cf_cv_library_path_utf8 ; then
10063                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10064
10065 echo "${as_me:-configure}:10065: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10066
10067                                         CPPFLAGS="$cf_test_CPPFLAGS"
10068                                         LIBS="-lutf8  $cf_save_LIBS"
10069                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10070                                         cat >conftest.$ac_ext <<_ACEOF
10071 #line 10071 "configure"
10072 #include "confdefs.h"
10073
10074 #include <libutf8.h>
10075 int
10076 main ()
10077 {
10078 putwc(0,0);
10079   ;
10080   return 0;
10081 }
10082 _ACEOF
10083 rm -f conftest.$ac_objext conftest$ac_exeext
10084 if { (eval echo "$as_me:10084: \"$ac_link\"") >&5
10085   (eval $ac_link) 2>&5
10086   ac_status=$?
10087   echo "$as_me:10087: \$? = $ac_status" >&5
10088   (exit $ac_status); } &&
10089          { ac_try='test -s conftest$ac_exeext'
10090   { (eval echo "$as_me:10090: \"$ac_try\"") >&5
10091   (eval $ac_try) 2>&5
10092   ac_status=$?
10093   echo "$as_me:10093: \$? = $ac_status" >&5
10094   (exit $ac_status); }; }; then
10095
10096                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10097
10098 echo "${as_me:-configure}:10098: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10099
10100                                         cf_cv_find_linkage_utf8=yes
10101                                         cf_cv_library_file_utf8="-lutf8"
10102                                         break
10103 else
10104   echo "$as_me: failed program was:" >&5
10105 cat conftest.$ac_ext >&5
10106
10107                                         CPPFLAGS="$cf_save_CPPFLAGS"
10108                                         LIBS="$cf_save_LIBS"
10109                                         LDFLAGS="$cf_save_LDFLAGS"
10110
10111 fi
10112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10113                                 fi
10114                         done
10115                         CPPFLAGS="$cf_save_CPPFLAGS"
10116                         LDFLAGS="$cf_save_LDFLAGS"
10117                 fi
10118
10119         else
10120                 cf_cv_find_linkage_utf8=no
10121         fi
10122
10123 fi
10124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10125
10126 fi
10127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10128
10129 LIBS="$cf_save_LIBS"
10130
10131 if test "$cf_cv_find_linkage_utf8" = yes ; then
10132 cf_cv_utf8_lib=add-on
10133 else
10134 cf_cv_utf8_lib=no
10135 fi
10136
10137 fi
10138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10139 fi
10140 echo "$as_me:10140: result: $cf_cv_utf8_lib" >&5
10141 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10142
10143 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10144 # ncurses/ncursesw:
10145 if test "$cf_cv_utf8_lib" = "add-on" ; then
10146
10147 cat >>confdefs.h <<\EOF
10148 #define HAVE_LIBUTF8_H 1
10149 EOF
10150
10151 if test -n "$cf_cv_header_path_utf8" ; then
10152   for cf_add_incdir in $cf_cv_header_path_utf8
10153   do
10154         while test $cf_add_incdir != /usr/include
10155         do
10156           if test -d $cf_add_incdir
10157           then
10158                 cf_have_incdir=no
10159                 if test -n "$CFLAGS$CPPFLAGS" ; then
10160                   # a loop is needed to ensure we can add subdirs of existing dirs
10161                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10162                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10163                           cf_have_incdir=yes; break
10164                         fi
10165                   done
10166                 fi
10167
10168                 if test "$cf_have_incdir" = no ; then
10169                   if test "$cf_add_incdir" = /usr/local/include ; then
10170                         if test "$GCC" = yes
10171                         then
10172                           cf_save_CPPFLAGS=$CPPFLAGS
10173                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10174                           cat >conftest.$ac_ext <<_ACEOF
10175 #line 10175 "configure"
10176 #include "confdefs.h"
10177 #include <stdio.h>
10178 int
10179 main ()
10180 {
10181 printf("Hello")
10182   ;
10183   return 0;
10184 }
10185 _ACEOF
10186 rm -f conftest.$ac_objext
10187 if { (eval echo "$as_me:10187: \"$ac_compile\"") >&5
10188   (eval $ac_compile) 2>&5
10189   ac_status=$?
10190   echo "$as_me:10190: \$? = $ac_status" >&5
10191   (exit $ac_status); } &&
10192          { ac_try='test -s conftest.$ac_objext'
10193   { (eval echo "$as_me:10193: \"$ac_try\"") >&5
10194   (eval $ac_try) 2>&5
10195   ac_status=$?
10196   echo "$as_me:10196: \$? = $ac_status" >&5
10197   (exit $ac_status); }; }; then
10198   :
10199 else
10200   echo "$as_me: failed program was:" >&5
10201 cat conftest.$ac_ext >&5
10202 cf_have_incdir=yes
10203 fi
10204 rm -f conftest.$ac_objext conftest.$ac_ext
10205                           CPPFLAGS=$cf_save_CPPFLAGS
10206                         fi
10207                   fi
10208                 fi
10209
10210                 if test "$cf_have_incdir" = no ; then
10211                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10212
10213 echo "${as_me:-configure}:10213: testing adding $cf_add_incdir to include-path ..." 1>&5
10214
10215                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10216
10217                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10218                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10219                   cf_add_incdir="$cf_top_incdir"
10220                 else
10221                   break
10222                 fi
10223           else
10224                 break
10225           fi
10226         done
10227   done
10228 fi
10229
10230 if test -n "$cf_cv_library_path_utf8" ; then
10231         for cf_add_libdir in $cf_cv_library_path_utf8
10232         do
10233                 if test $cf_add_libdir = /usr/lib ; then
10234                         :
10235                 elif test -d $cf_add_libdir
10236                 then
10237                         cf_have_libdir=no
10238                         if test -n "$LDFLAGS$LIBS" ; then
10239                                 # a loop is needed to ensure we can add subdirs of existing dirs
10240                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10241                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10242                                                 cf_have_libdir=yes; break
10243                                         fi
10244                                 done
10245                         fi
10246                         if test "$cf_have_libdir" = no ; then
10247                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10248
10249 echo "${as_me:-configure}:10249: testing adding $cf_add_libdir to library-path ..." 1>&5
10250
10251                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10252                         fi
10253                 fi
10254         done
10255 fi
10256
10257 cf_add_libs="$cf_cv_library_file_utf8"
10258 # Filter out duplicates - this happens with badly-designed ".pc" files...
10259 for cf_add_1lib in $LIBS
10260 do
10261         for cf_add_2lib in $cf_add_libs
10262         do
10263                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10264                 then
10265                         cf_add_1lib=
10266                         break
10267                 fi
10268         done
10269         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10270 done
10271 LIBS="$cf_add_libs"
10272
10273 fi
10274
10275                 if test "$cf_cv_utf8_lib" != no ; then
10276                         NCURSES_LIBUTF8=1
10277                 fi
10278         fi
10279
10280 # This is needed on Tru64 5.0 to declare mbstate_t
10281 echo "$as_me:10281: checking if we must include wchar.h to declare mbstate_t" >&5
10282 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10283 if test "${cf_cv_mbstate_t+set}" = set; then
10284   echo $ECHO_N "(cached) $ECHO_C" >&6
10285 else
10286
10287 cat >conftest.$ac_ext <<_ACEOF
10288 #line 10288 "configure"
10289 #include "confdefs.h"
10290
10291 #include <stdlib.h>
10292 #include <stdarg.h>
10293 #include <stdio.h>
10294 #ifdef HAVE_LIBUTF8_H
10295 #include <libutf8.h>
10296 #endif
10297 int
10298 main ()
10299 {
10300 mbstate_t state
10301   ;
10302   return 0;
10303 }
10304 _ACEOF
10305 rm -f conftest.$ac_objext
10306 if { (eval echo "$as_me:10306: \"$ac_compile\"") >&5
10307   (eval $ac_compile) 2>&5
10308   ac_status=$?
10309   echo "$as_me:10309: \$? = $ac_status" >&5
10310   (exit $ac_status); } &&
10311          { ac_try='test -s conftest.$ac_objext'
10312   { (eval echo "$as_me:10312: \"$ac_try\"") >&5
10313   (eval $ac_try) 2>&5
10314   ac_status=$?
10315   echo "$as_me:10315: \$? = $ac_status" >&5
10316   (exit $ac_status); }; }; then
10317   cf_cv_mbstate_t=no
10318 else
10319   echo "$as_me: failed program was:" >&5
10320 cat conftest.$ac_ext >&5
10321 cat >conftest.$ac_ext <<_ACEOF
10322 #line 10322 "configure"
10323 #include "confdefs.h"
10324
10325 #include <stdlib.h>
10326 #include <stdarg.h>
10327 #include <stdio.h>
10328 #include <wchar.h>
10329 #ifdef HAVE_LIBUTF8_H
10330 #include <libutf8.h>
10331 #endif
10332 int
10333 main ()
10334 {
10335 mbstate_t value
10336   ;
10337   return 0;
10338 }
10339 _ACEOF
10340 rm -f conftest.$ac_objext
10341 if { (eval echo "$as_me:10341: \"$ac_compile\"") >&5
10342   (eval $ac_compile) 2>&5
10343   ac_status=$?
10344   echo "$as_me:10344: \$? = $ac_status" >&5
10345   (exit $ac_status); } &&
10346          { ac_try='test -s conftest.$ac_objext'
10347   { (eval echo "$as_me:10347: \"$ac_try\"") >&5
10348   (eval $ac_try) 2>&5
10349   ac_status=$?
10350   echo "$as_me:10350: \$? = $ac_status" >&5
10351   (exit $ac_status); }; }; then
10352   cf_cv_mbstate_t=yes
10353 else
10354   echo "$as_me: failed program was:" >&5
10355 cat conftest.$ac_ext >&5
10356 cf_cv_mbstate_t=unknown
10357 fi
10358 rm -f conftest.$ac_objext conftest.$ac_ext
10359 fi
10360 rm -f conftest.$ac_objext conftest.$ac_ext
10361 fi
10362 echo "$as_me:10362: result: $cf_cv_mbstate_t" >&5
10363 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10364
10365 if test "$cf_cv_mbstate_t" = yes ; then
10366
10367 cat >>confdefs.h <<\EOF
10368 #define NEED_WCHAR_H 1
10369 EOF
10370
10371         NEED_WCHAR_H=1
10372 fi
10373
10374 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10375 if test "$cf_cv_mbstate_t" = unknown ; then
10376         NCURSES_MBSTATE_T=1
10377 fi
10378
10379 # This is needed on Tru64 5.0 to declare wchar_t
10380 echo "$as_me:10380: checking if we must include wchar.h to declare wchar_t" >&5
10381 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10382 if test "${cf_cv_wchar_t+set}" = set; then
10383   echo $ECHO_N "(cached) $ECHO_C" >&6
10384 else
10385
10386 cat >conftest.$ac_ext <<_ACEOF
10387 #line 10387 "configure"
10388 #include "confdefs.h"
10389
10390 #include <stdlib.h>
10391 #include <stdarg.h>
10392 #include <stdio.h>
10393 #ifdef HAVE_LIBUTF8_H
10394 #include <libutf8.h>
10395 #endif
10396 int
10397 main ()
10398 {
10399 wchar_t state
10400   ;
10401   return 0;
10402 }
10403 _ACEOF
10404 rm -f conftest.$ac_objext
10405 if { (eval echo "$as_me:10405: \"$ac_compile\"") >&5
10406   (eval $ac_compile) 2>&5
10407   ac_status=$?
10408   echo "$as_me:10408: \$? = $ac_status" >&5
10409   (exit $ac_status); } &&
10410          { ac_try='test -s conftest.$ac_objext'
10411   { (eval echo "$as_me:10411: \"$ac_try\"") >&5
10412   (eval $ac_try) 2>&5
10413   ac_status=$?
10414   echo "$as_me:10414: \$? = $ac_status" >&5
10415   (exit $ac_status); }; }; then
10416   cf_cv_wchar_t=no
10417 else
10418   echo "$as_me: failed program was:" >&5
10419 cat conftest.$ac_ext >&5
10420 cat >conftest.$ac_ext <<_ACEOF
10421 #line 10421 "configure"
10422 #include "confdefs.h"
10423
10424 #include <stdlib.h>
10425 #include <stdarg.h>
10426 #include <stdio.h>
10427 #include <wchar.h>
10428 #ifdef HAVE_LIBUTF8_H
10429 #include <libutf8.h>
10430 #endif
10431 int
10432 main ()
10433 {
10434 wchar_t value
10435   ;
10436   return 0;
10437 }
10438 _ACEOF
10439 rm -f conftest.$ac_objext
10440 if { (eval echo "$as_me:10440: \"$ac_compile\"") >&5
10441   (eval $ac_compile) 2>&5
10442   ac_status=$?
10443   echo "$as_me:10443: \$? = $ac_status" >&5
10444   (exit $ac_status); } &&
10445          { ac_try='test -s conftest.$ac_objext'
10446   { (eval echo "$as_me:10446: \"$ac_try\"") >&5
10447   (eval $ac_try) 2>&5
10448   ac_status=$?
10449   echo "$as_me:10449: \$? = $ac_status" >&5
10450   (exit $ac_status); }; }; then
10451   cf_cv_wchar_t=yes
10452 else
10453   echo "$as_me: failed program was:" >&5
10454 cat conftest.$ac_ext >&5
10455 cf_cv_wchar_t=unknown
10456 fi
10457 rm -f conftest.$ac_objext conftest.$ac_ext
10458 fi
10459 rm -f conftest.$ac_objext conftest.$ac_ext
10460 fi
10461 echo "$as_me:10461: result: $cf_cv_wchar_t" >&5
10462 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10463
10464 if test "$cf_cv_wchar_t" = yes ; then
10465
10466 cat >>confdefs.h <<\EOF
10467 #define NEED_WCHAR_H 1
10468 EOF
10469
10470         NEED_WCHAR_H=1
10471 fi
10472
10473 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10474 if test "$cf_cv_wchar_t" = unknown ; then
10475         NCURSES_WCHAR_T=1
10476 fi
10477
10478 # if we find wchar_t in either place, use substitution to provide a fallback.
10479 if test "$cf_cv_wchar_t" != unknown ; then
10480         NCURSES_OK_WCHAR_T=1
10481 fi
10482
10483 # This is needed on Tru64 5.0 to declare wint_t
10484 echo "$as_me:10484: checking if we must include wchar.h to declare wint_t" >&5
10485 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10486 if test "${cf_cv_wint_t+set}" = set; then
10487   echo $ECHO_N "(cached) $ECHO_C" >&6
10488 else
10489
10490 cat >conftest.$ac_ext <<_ACEOF
10491 #line 10491 "configure"
10492 #include "confdefs.h"
10493
10494 #include <stdlib.h>
10495 #include <stdarg.h>
10496 #include <stdio.h>
10497 #ifdef HAVE_LIBUTF8_H
10498 #include <libutf8.h>
10499 #endif
10500 int
10501 main ()
10502 {
10503 wint_t state
10504   ;
10505   return 0;
10506 }
10507 _ACEOF
10508 rm -f conftest.$ac_objext
10509 if { (eval echo "$as_me:10509: \"$ac_compile\"") >&5
10510   (eval $ac_compile) 2>&5
10511   ac_status=$?
10512   echo "$as_me:10512: \$? = $ac_status" >&5
10513   (exit $ac_status); } &&
10514          { ac_try='test -s conftest.$ac_objext'
10515   { (eval echo "$as_me:10515: \"$ac_try\"") >&5
10516   (eval $ac_try) 2>&5
10517   ac_status=$?
10518   echo "$as_me:10518: \$? = $ac_status" >&5
10519   (exit $ac_status); }; }; then
10520   cf_cv_wint_t=no
10521 else
10522   echo "$as_me: failed program was:" >&5
10523 cat conftest.$ac_ext >&5
10524 cat >conftest.$ac_ext <<_ACEOF
10525 #line 10525 "configure"
10526 #include "confdefs.h"
10527
10528 #include <stdlib.h>
10529 #include <stdarg.h>
10530 #include <stdio.h>
10531 #include <wchar.h>
10532 #ifdef HAVE_LIBUTF8_H
10533 #include <libutf8.h>
10534 #endif
10535 int
10536 main ()
10537 {
10538 wint_t value
10539   ;
10540   return 0;
10541 }
10542 _ACEOF
10543 rm -f conftest.$ac_objext
10544 if { (eval echo "$as_me:10544: \"$ac_compile\"") >&5
10545   (eval $ac_compile) 2>&5
10546   ac_status=$?
10547   echo "$as_me:10547: \$? = $ac_status" >&5
10548   (exit $ac_status); } &&
10549          { ac_try='test -s conftest.$ac_objext'
10550   { (eval echo "$as_me:10550: \"$ac_try\"") >&5
10551   (eval $ac_try) 2>&5
10552   ac_status=$?
10553   echo "$as_me:10553: \$? = $ac_status" >&5
10554   (exit $ac_status); }; }; then
10555   cf_cv_wint_t=yes
10556 else
10557   echo "$as_me: failed program was:" >&5
10558 cat conftest.$ac_ext >&5
10559 cf_cv_wint_t=unknown
10560 fi
10561 rm -f conftest.$ac_objext conftest.$ac_ext
10562 fi
10563 rm -f conftest.$ac_objext conftest.$ac_ext
10564 fi
10565 echo "$as_me:10565: result: $cf_cv_wint_t" >&5
10566 echo "${ECHO_T}$cf_cv_wint_t" >&6
10567
10568 if test "$cf_cv_wint_t" = yes ; then
10569
10570 cat >>confdefs.h <<\EOF
10571 #define NEED_WCHAR_H 1
10572 EOF
10573
10574         NEED_WCHAR_H=1
10575 fi
10576
10577 # if we do not find wint_t in either place, use substitution to provide a fallback.
10578 if test "$cf_cv_wint_t" = unknown ; then
10579         NCURSES_WINT_T=1
10580 fi
10581
10582 # if we find wint_t in either place, use substitution to provide a fallback.
10583 if test "$cf_cv_wint_t" != unknown ; then
10584         NCURSES_OK_WINT_T=1
10585 fi
10586
10587         if test "$NCURSES_MBSTATE_T" != 0; then
10588
10589 cat >>confdefs.h <<\EOF
10590 #define NEED_MBSTATE_T_DEF 1
10591 EOF
10592
10593         fi
10594 fi
10595
10596 ###   use option --disable-lp64 to allow long chtype
10597 echo "$as_me:10597: checking whether to enable _LP64 definition in curses.h" >&5
10598 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10599
10600 # Check whether --enable-lp64 or --disable-lp64 was given.
10601 if test "${enable_lp64+set}" = set; then
10602   enableval="$enable_lp64"
10603   with_lp64=$enableval
10604 else
10605   with_lp64=$cf_dft_with_lp64
10606 fi;
10607 echo "$as_me:10607: result: $with_lp64" >&5
10608 echo "${ECHO_T}$with_lp64" >&6
10609
10610 if test "x$with_lp64" = xyes ; then
10611         cf_cv_enable_lp64=1
10612 else
10613         cf_cv_enable_lp64=0
10614 fi
10615
10616 # Check whether --enable-largefile or --disable-largefile was given.
10617 if test "${enable_largefile+set}" = set; then
10618   enableval="$enable_largefile"
10619
10620 fi;
10621 if test "$enable_largefile" != no; then
10622
10623   echo "$as_me:10623: checking for special C compiler options needed for large files" >&5
10624 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10625 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10626   echo $ECHO_N "(cached) $ECHO_C" >&6
10627 else
10628   ac_cv_sys_largefile_CC=no
10629      if test "$GCC" != yes; then
10630        ac_save_CC=$CC
10631        while :; do
10632          # IRIX 6.2 and later do not support large files by default,
10633          # so use the C compiler's -n32 option if that helps.
10634          cat >conftest.$ac_ext <<_ACEOF
10635 #line 10635 "configure"
10636 #include "confdefs.h"
10637 #include <sys/types.h>
10638  /* Check that off_t can represent 2**63 - 1 correctly.
10639     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10640     since some C++ compilers masquerading as C compilers
10641     incorrectly reject 9223372036854775807.  */
10642 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10643   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10644                        && LARGE_OFF_T % 2147483647 == 1)
10645                       ? 1 : -1];
10646 int
10647 main ()
10648 {
10649
10650   ;
10651   return 0;
10652 }
10653 _ACEOF
10654          rm -f conftest.$ac_objext
10655 if { (eval echo "$as_me:10655: \"$ac_compile\"") >&5
10656   (eval $ac_compile) 2>&5
10657   ac_status=$?
10658   echo "$as_me:10658: \$? = $ac_status" >&5
10659   (exit $ac_status); } &&
10660          { ac_try='test -s conftest.$ac_objext'
10661   { (eval echo "$as_me:10661: \"$ac_try\"") >&5
10662   (eval $ac_try) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit $ac_status); }; }; then
10666   break
10667 else
10668   echo "$as_me: failed program was:" >&5
10669 cat conftest.$ac_ext >&5
10670 fi
10671 rm -f conftest.$ac_objext
10672          CC="$CC -n32"
10673          rm -f conftest.$ac_objext
10674 if { (eval echo "$as_me:10674: \"$ac_compile\"") >&5
10675   (eval $ac_compile) 2>&5
10676   ac_status=$?
10677   echo "$as_me:10677: \$? = $ac_status" >&5
10678   (exit $ac_status); } &&
10679          { ac_try='test -s conftest.$ac_objext'
10680   { (eval echo "$as_me:10680: \"$ac_try\"") >&5
10681   (eval $ac_try) 2>&5
10682   ac_status=$?
10683   echo "$as_me:10683: \$? = $ac_status" >&5
10684   (exit $ac_status); }; }; then
10685   ac_cv_sys_largefile_CC=' -n32'; break
10686 else
10687   echo "$as_me: failed program was:" >&5
10688 cat conftest.$ac_ext >&5
10689 fi
10690 rm -f conftest.$ac_objext
10691          break
10692        done
10693        CC=$ac_save_CC
10694        rm -f conftest.$ac_ext
10695     fi
10696 fi
10697 echo "$as_me:10697: result: $ac_cv_sys_largefile_CC" >&5
10698 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10699   if test "$ac_cv_sys_largefile_CC" != no; then
10700     CC=$CC$ac_cv_sys_largefile_CC
10701   fi
10702
10703   echo "$as_me:10703: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10704 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10705 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10706   echo $ECHO_N "(cached) $ECHO_C" >&6
10707 else
10708   while :; do
10709   ac_cv_sys_file_offset_bits=no
10710   cat >conftest.$ac_ext <<_ACEOF
10711 #line 10711 "configure"
10712 #include "confdefs.h"
10713 #include <sys/types.h>
10714  /* Check that off_t can represent 2**63 - 1 correctly.
10715     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10716     since some C++ compilers masquerading as C compilers
10717     incorrectly reject 9223372036854775807.  */
10718 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10719   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10720                        && LARGE_OFF_T % 2147483647 == 1)
10721                       ? 1 : -1];
10722 int
10723 main ()
10724 {
10725
10726   ;
10727   return 0;
10728 }
10729 _ACEOF
10730 rm -f conftest.$ac_objext
10731 if { (eval echo "$as_me:10731: \"$ac_compile\"") >&5
10732   (eval $ac_compile) 2>&5
10733   ac_status=$?
10734   echo "$as_me:10734: \$? = $ac_status" >&5
10735   (exit $ac_status); } &&
10736          { ac_try='test -s conftest.$ac_objext'
10737   { (eval echo "$as_me:10737: \"$ac_try\"") >&5
10738   (eval $ac_try) 2>&5
10739   ac_status=$?
10740   echo "$as_me:10740: \$? = $ac_status" >&5
10741   (exit $ac_status); }; }; then
10742   break
10743 else
10744   echo "$as_me: failed program was:" >&5
10745 cat conftest.$ac_ext >&5
10746 fi
10747 rm -f conftest.$ac_objext conftest.$ac_ext
10748   cat >conftest.$ac_ext <<_ACEOF
10749 #line 10749 "configure"
10750 #include "confdefs.h"
10751 #define _FILE_OFFSET_BITS 64
10752 #include <sys/types.h>
10753  /* Check that off_t can represent 2**63 - 1 correctly.
10754     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10755     since some C++ compilers masquerading as C compilers
10756     incorrectly reject 9223372036854775807.  */
10757 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10758   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10759                        && LARGE_OFF_T % 2147483647 == 1)
10760                       ? 1 : -1];
10761 int
10762 main ()
10763 {
10764
10765   ;
10766   return 0;
10767 }
10768 _ACEOF
10769 rm -f conftest.$ac_objext
10770 if { (eval echo "$as_me:10770: \"$ac_compile\"") >&5
10771   (eval $ac_compile) 2>&5
10772   ac_status=$?
10773   echo "$as_me:10773: \$? = $ac_status" >&5
10774   (exit $ac_status); } &&
10775          { ac_try='test -s conftest.$ac_objext'
10776   { (eval echo "$as_me:10776: \"$ac_try\"") >&5
10777   (eval $ac_try) 2>&5
10778   ac_status=$?
10779   echo "$as_me:10779: \$? = $ac_status" >&5
10780   (exit $ac_status); }; }; then
10781   ac_cv_sys_file_offset_bits=64; break
10782 else
10783   echo "$as_me: failed program was:" >&5
10784 cat conftest.$ac_ext >&5
10785 fi
10786 rm -f conftest.$ac_objext conftest.$ac_ext
10787   break
10788 done
10789 fi
10790 echo "$as_me:10790: result: $ac_cv_sys_file_offset_bits" >&5
10791 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10792 if test "$ac_cv_sys_file_offset_bits" != no; then
10793
10794 cat >>confdefs.h <<EOF
10795 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10796 EOF
10797
10798 fi
10799 rm -rf conftest*
10800   echo "$as_me:10800: checking for _LARGE_FILES value needed for large files" >&5
10801 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10802 if test "${ac_cv_sys_large_files+set}" = set; then
10803   echo $ECHO_N "(cached) $ECHO_C" >&6
10804 else
10805   while :; do
10806   ac_cv_sys_large_files=no
10807   cat >conftest.$ac_ext <<_ACEOF
10808 #line 10808 "configure"
10809 #include "confdefs.h"
10810 #include <sys/types.h>
10811  /* Check that off_t can represent 2**63 - 1 correctly.
10812     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10813     since some C++ compilers masquerading as C compilers
10814     incorrectly reject 9223372036854775807.  */
10815 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10816   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10817                        && LARGE_OFF_T % 2147483647 == 1)
10818                       ? 1 : -1];
10819 int
10820 main ()
10821 {
10822
10823   ;
10824   return 0;
10825 }
10826 _ACEOF
10827 rm -f conftest.$ac_objext
10828 if { (eval echo "$as_me:10828: \"$ac_compile\"") >&5
10829   (eval $ac_compile) 2>&5
10830   ac_status=$?
10831   echo "$as_me:10831: \$? = $ac_status" >&5
10832   (exit $ac_status); } &&
10833          { ac_try='test -s conftest.$ac_objext'
10834   { (eval echo "$as_me:10834: \"$ac_try\"") >&5
10835   (eval $ac_try) 2>&5
10836   ac_status=$?
10837   echo "$as_me:10837: \$? = $ac_status" >&5
10838   (exit $ac_status); }; }; then
10839   break
10840 else
10841   echo "$as_me: failed program was:" >&5
10842 cat conftest.$ac_ext >&5
10843 fi
10844 rm -f conftest.$ac_objext conftest.$ac_ext
10845   cat >conftest.$ac_ext <<_ACEOF
10846 #line 10846 "configure"
10847 #include "confdefs.h"
10848 #define _LARGE_FILES 1
10849 #include <sys/types.h>
10850  /* Check that off_t can represent 2**63 - 1 correctly.
10851     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10852     since some C++ compilers masquerading as C compilers
10853     incorrectly reject 9223372036854775807.  */
10854 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10855   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10856                        && LARGE_OFF_T % 2147483647 == 1)
10857                       ? 1 : -1];
10858 int
10859 main ()
10860 {
10861
10862   ;
10863   return 0;
10864 }
10865 _ACEOF
10866 rm -f conftest.$ac_objext
10867 if { (eval echo "$as_me:10867: \"$ac_compile\"") >&5
10868   (eval $ac_compile) 2>&5
10869   ac_status=$?
10870   echo "$as_me:10870: \$? = $ac_status" >&5
10871   (exit $ac_status); } &&
10872          { ac_try='test -s conftest.$ac_objext'
10873   { (eval echo "$as_me:10873: \"$ac_try\"") >&5
10874   (eval $ac_try) 2>&5
10875   ac_status=$?
10876   echo "$as_me:10876: \$? = $ac_status" >&5
10877   (exit $ac_status); }; }; then
10878   ac_cv_sys_large_files=1; break
10879 else
10880   echo "$as_me: failed program was:" >&5
10881 cat conftest.$ac_ext >&5
10882 fi
10883 rm -f conftest.$ac_objext conftest.$ac_ext
10884   break
10885 done
10886 fi
10887 echo "$as_me:10887: result: $ac_cv_sys_large_files" >&5
10888 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10889 if test "$ac_cv_sys_large_files" != no; then
10890
10891 cat >>confdefs.h <<EOF
10892 #define _LARGE_FILES $ac_cv_sys_large_files
10893 EOF
10894
10895 fi
10896 rm -rf conftest*
10897 fi
10898
10899         if test "$enable_largefile" != no ; then
10900         echo "$as_me:10900: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10901 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10902 if test "${ac_cv_sys_largefile_source+set}" = set; then
10903   echo $ECHO_N "(cached) $ECHO_C" >&6
10904 else
10905   while :; do
10906   ac_cv_sys_largefile_source=no
10907   cat >conftest.$ac_ext <<_ACEOF
10908 #line 10908 "configure"
10909 #include "confdefs.h"
10910 #include <stdio.h>
10911 int
10912 main ()
10913 {
10914 return !fseeko;
10915   ;
10916   return 0;
10917 }
10918 _ACEOF
10919 rm -f conftest.$ac_objext
10920 if { (eval echo "$as_me:10920: \"$ac_compile\"") >&5
10921   (eval $ac_compile) 2>&5
10922   ac_status=$?
10923   echo "$as_me:10923: \$? = $ac_status" >&5
10924   (exit $ac_status); } &&
10925          { ac_try='test -s conftest.$ac_objext'
10926   { (eval echo "$as_me:10926: \"$ac_try\"") >&5
10927   (eval $ac_try) 2>&5
10928   ac_status=$?
10929   echo "$as_me:10929: \$? = $ac_status" >&5
10930   (exit $ac_status); }; }; then
10931   break
10932 else
10933   echo "$as_me: failed program was:" >&5
10934 cat conftest.$ac_ext >&5
10935 fi
10936 rm -f conftest.$ac_objext conftest.$ac_ext
10937   cat >conftest.$ac_ext <<_ACEOF
10938 #line 10938 "configure"
10939 #include "confdefs.h"
10940 #define _LARGEFILE_SOURCE 1
10941 #include <stdio.h>
10942 int
10943 main ()
10944 {
10945 return !fseeko;
10946   ;
10947   return 0;
10948 }
10949 _ACEOF
10950 rm -f conftest.$ac_objext
10951 if { (eval echo "$as_me:10951: \"$ac_compile\"") >&5
10952   (eval $ac_compile) 2>&5
10953   ac_status=$?
10954   echo "$as_me:10954: \$? = $ac_status" >&5
10955   (exit $ac_status); } &&
10956          { ac_try='test -s conftest.$ac_objext'
10957   { (eval echo "$as_me:10957: \"$ac_try\"") >&5
10958   (eval $ac_try) 2>&5
10959   ac_status=$?
10960   echo "$as_me:10960: \$? = $ac_status" >&5
10961   (exit $ac_status); }; }; then
10962   ac_cv_sys_largefile_source=1; break
10963 else
10964   echo "$as_me: failed program was:" >&5
10965 cat conftest.$ac_ext >&5
10966 fi
10967 rm -f conftest.$ac_objext conftest.$ac_ext
10968   break
10969 done
10970 fi
10971 echo "$as_me:10971: result: $ac_cv_sys_largefile_source" >&5
10972 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10973 if test "$ac_cv_sys_largefile_source" != no; then
10974
10975 cat >>confdefs.h <<EOF
10976 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10977 EOF
10978
10979 fi
10980 rm -rf conftest*
10981
10982 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10983 # in glibc 2.1.3, but that breaks too many other things.
10984 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10985 echo "$as_me:10985: checking for fseeko" >&5
10986 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10987 if test "${ac_cv_func_fseeko+set}" = set; then
10988   echo $ECHO_N "(cached) $ECHO_C" >&6
10989 else
10990   cat >conftest.$ac_ext <<_ACEOF
10991 #line 10991 "configure"
10992 #include "confdefs.h"
10993 #include <stdio.h>
10994 int
10995 main ()
10996 {
10997 return fseeko && fseeko (stdin, 0, 0);
10998   ;
10999   return 0;
11000 }
11001 _ACEOF
11002 rm -f conftest.$ac_objext conftest$ac_exeext
11003 if { (eval echo "$as_me:11003: \"$ac_link\"") >&5
11004   (eval $ac_link) 2>&5
11005   ac_status=$?
11006   echo "$as_me:11006: \$? = $ac_status" >&5
11007   (exit $ac_status); } &&
11008          { ac_try='test -s conftest$ac_exeext'
11009   { (eval echo "$as_me:11009: \"$ac_try\"") >&5
11010   (eval $ac_try) 2>&5
11011   ac_status=$?
11012   echo "$as_me:11012: \$? = $ac_status" >&5
11013   (exit $ac_status); }; }; then
11014   ac_cv_func_fseeko=yes
11015 else
11016   echo "$as_me: failed program was:" >&5
11017 cat conftest.$ac_ext >&5
11018 ac_cv_func_fseeko=no
11019 fi
11020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11021 fi
11022 echo "$as_me:11022: result: $ac_cv_func_fseeko" >&5
11023 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11024 if test $ac_cv_func_fseeko = yes; then
11025
11026 cat >>confdefs.h <<\EOF
11027 #define HAVE_FSEEKO 1
11028 EOF
11029
11030 fi
11031
11032         # Normally we would collect these definitions in the config.h,
11033         # but (like _XOPEN_SOURCE), some environments rely on having these
11034         # defined before any of the system headers are included.  Another
11035         # case comes up with C++, e.g., on AIX the compiler compiles the
11036         # header files by themselves before looking at the body files it is
11037         # told to compile.  For ncurses, those header files do not include
11038         # the config.h
11039         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11040         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11041         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11042
11043         echo "$as_me:11043: checking whether to use struct dirent64" >&5
11044 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11045 if test "${cf_cv_struct_dirent64+set}" = set; then
11046   echo $ECHO_N "(cached) $ECHO_C" >&6
11047 else
11048
11049                 cat >conftest.$ac_ext <<_ACEOF
11050 #line 11050 "configure"
11051 #include "confdefs.h"
11052
11053 #include <sys/types.h>
11054 #include <dirent.h>
11055
11056 int
11057 main ()
11058 {
11059
11060                 /* if transitional largefile support is setup, this is true */
11061                 extern struct dirent64 * readdir(DIR *);
11062                 struct dirent64 *x = readdir((DIR *)0);
11063                 struct dirent *y = readdir((DIR *)0);
11064                 int z = x - y;
11065
11066   ;
11067   return 0;
11068 }
11069 _ACEOF
11070 rm -f conftest.$ac_objext
11071 if { (eval echo "$as_me:11071: \"$ac_compile\"") >&5
11072   (eval $ac_compile) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit $ac_status); } &&
11076          { ac_try='test -s conftest.$ac_objext'
11077   { (eval echo "$as_me:11077: \"$ac_try\"") >&5
11078   (eval $ac_try) 2>&5
11079   ac_status=$?
11080   echo "$as_me:11080: \$? = $ac_status" >&5
11081   (exit $ac_status); }; }; then
11082   cf_cv_struct_dirent64=yes
11083 else
11084   echo "$as_me: failed program was:" >&5
11085 cat conftest.$ac_ext >&5
11086 cf_cv_struct_dirent64=no
11087 fi
11088 rm -f conftest.$ac_objext conftest.$ac_ext
11089
11090 fi
11091 echo "$as_me:11091: result: $cf_cv_struct_dirent64" >&5
11092 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11093         test "$cf_cv_struct_dirent64" = yes &&
11094 cat >>confdefs.h <<\EOF
11095 #define HAVE_STRUCT_DIRENT64 1
11096 EOF
11097
11098         fi
11099
11100 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11101 echo "$as_me:11101: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11102 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11103
11104 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11105 if test "${enable_tparm_varargs+set}" = set; then
11106   enableval="$enable_tparm_varargs"
11107   with_tparm_varargs=$enableval
11108 else
11109   with_tparm_varargs=yes
11110 fi;
11111 echo "$as_me:11111: result: $with_tparm_varargs" >&5
11112 echo "${ECHO_T}$with_tparm_varargs" >&6
11113 NCURSES_TPARM_VARARGS=0
11114 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11115
11116 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11117 if test "$with_ticlib" != no ; then
11118 echo "$as_me:11118: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11119 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11120
11121 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11122 if test "${enable_tic_depends+set}" = set; then
11123   enableval="$enable_tic_depends"
11124   with_tic_depends=$enableval
11125 else
11126   with_tic_depends=yes
11127 fi;
11128 echo "$as_me:11128: result: $with_tic_depends" >&5
11129 echo "${ECHO_T}$with_tic_depends" >&6
11130 else
11131         with_tic_depends=no
11132 fi
11133
11134 ###   use option --with-bool to override bool's type
11135 echo "$as_me:11135: checking for type of bool" >&5
11136 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11137
11138 # Check whether --with-bool or --without-bool was given.
11139 if test "${with_bool+set}" = set; then
11140   withval="$with_bool"
11141   NCURSES_BOOL="$withval"
11142 else
11143   NCURSES_BOOL=auto
11144 fi;
11145 echo "$as_me:11145: result: $NCURSES_BOOL" >&5
11146 echo "${ECHO_T}$NCURSES_BOOL" >&6
11147
11148 echo "$as_me:11148: checking for alternate terminal capabilities file" >&5
11149 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11150
11151 # Check whether --with-caps or --without-caps was given.
11152 if test "${with_caps+set}" = set; then
11153   withval="$with_caps"
11154   TERMINFO_CAPS=Caps.$withval
11155 else
11156   TERMINFO_CAPS=Caps
11157 fi;
11158 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11159 echo "$as_me:11159: result: $TERMINFO_CAPS" >&5
11160 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11161
11162 ###   use option --with-chtype to override chtype's type
11163 echo "$as_me:11163: checking for type of chtype" >&5
11164 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11165
11166 # Check whether --with-chtype or --without-chtype was given.
11167 if test "${with_chtype+set}" = set; then
11168   withval="$with_chtype"
11169   NCURSES_CHTYPE="$withval"
11170 else
11171   NCURSES_CHTYPE=$cf_dft_chtype
11172 fi;
11173 echo "$as_me:11173: result: $NCURSES_CHTYPE" >&5
11174 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11175
11176 ###   use option --with-ospeed to override ospeed's type
11177 echo "$as_me:11177: checking for type of ospeed" >&5
11178 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11179
11180 # Check whether --with-ospeed or --without-ospeed was given.
11181 if test "${with_ospeed+set}" = set; then
11182   withval="$with_ospeed"
11183   NCURSES_OSPEED="$withval"
11184 else
11185   NCURSES_OSPEED=short
11186 fi;
11187 echo "$as_me:11187: result: $NCURSES_OSPEED" >&5
11188 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11189
11190 ###   use option --with-mmask-t to override mmask_t's type
11191 echo "$as_me:11191: checking for type of mmask_t" >&5
11192 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11193
11194 # Check whether --with-mmask-t or --without-mmask-t was given.
11195 if test "${with_mmask_t+set}" = set; then
11196   withval="$with_mmask_t"
11197   NCURSES_MMASK_T="$withval"
11198 else
11199   NCURSES_MMASK_T=$cf_dft_mmask_t
11200 fi;
11201 echo "$as_me:11201: result: $NCURSES_MMASK_T" >&5
11202 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11203
11204 ###   use option --with-ccharw-max to override CCHARW_MAX size
11205 echo "$as_me:11205: checking for size CCHARW_MAX" >&5
11206 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11207
11208 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11209 if test "${with_ccharw_max+set}" = set; then
11210   withval="$with_ccharw_max"
11211   NCURSES_CCHARW_MAX="$withval"
11212 else
11213   NCURSES_CCHARW_MAX=5
11214 fi;
11215 echo "$as_me:11215: result: $NCURSES_CCHARW_MAX" >&5
11216 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11217
11218 ###   use option --with-tparm-arg to override tparm's argument type
11219 echo "$as_me:11219: checking for type of tparm args" >&5
11220 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11221
11222 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11223 if test "${with_tparm_arg+set}" = set; then
11224   withval="$with_tparm_arg"
11225   NCURSES_TPARM_ARG="$withval"
11226 else
11227   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11228 fi;
11229 echo "$as_me:11229: result: $NCURSES_TPARM_ARG" >&5
11230 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11231
11232 ### Enable compiling-in rcs id's
11233 echo "$as_me:11233: checking if RCS identifiers should be compiled-in" >&5
11234 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11235
11236 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11237 if test "${with_rcs_ids+set}" = set; then
11238   withval="$with_rcs_ids"
11239   with_rcs_ids=$withval
11240 else
11241   with_rcs_ids=no
11242 fi;
11243 echo "$as_me:11243: result: $with_rcs_ids" >&5
11244 echo "${ECHO_T}$with_rcs_ids" >&6
11245 test "x$with_rcs_ids" = xyes &&
11246 cat >>confdefs.h <<\EOF
11247 #define USE_RCS_IDS 1
11248 EOF
11249
11250 ###############################################################################
11251
11252 echo "$as_me:11252: checking format of man-pages" >&5
11253 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11254
11255 # Check whether --with-manpage-format or --without-manpage-format was given.
11256 if test "${with_manpage_format+set}" = set; then
11257   withval="$with_manpage_format"
11258   MANPAGE_FORMAT=$withval
11259 else
11260   MANPAGE_FORMAT=unknown
11261 fi;
11262
11263 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11264 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11265
11266 cf_unknown=
11267
11268 case $MANPAGE_FORMAT in
11269 (unknown)
11270         if test -z "$MANPATH" ; then
11271                 MANPATH="/usr/man:/usr/share/man"
11272         fi
11273
11274         # look for the 'date' man-page (it's most likely to be installed!)
11275         MANPAGE_FORMAT=
11276         cf_preform=no
11277         cf_catonly=yes
11278         cf_example=date
11279
11280         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11281         for cf_dir in $MANPATH; do
11282                 test -z "$cf_dir" && cf_dir=/usr/man
11283                 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
11284                 do
11285                         cf_test=`echo $cf_name | sed -e 's/*//'`
11286                         if test "x$cf_test" = "x$cf_name" ; then
11287
11288                                 case "$cf_name" in
11289                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11290                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11291                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11292                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11293                                 esac
11294
11295                                 case "$cf_name" in
11296                                 ($cf_dir/man*)
11297                                         cf_catonly=no
11298                                         ;;
11299                                 ($cf_dir/cat*)
11300                                         cf_preform=yes
11301                                         ;;
11302                                 esac
11303                                 break
11304                         fi
11305
11306                         # if we found a match in either man* or cat*, stop looking
11307                         if test -n "$MANPAGE_FORMAT" ; then
11308                                 cf_found=no
11309                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11310                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11311                                 case "$cf_name" in
11312                                 ($cf_dir/cat*)
11313                                         cf_found=yes
11314                                         ;;
11315                                 esac
11316                                 test $cf_found=yes && break
11317                         fi
11318                 done
11319                 # only check the first directory in $MANPATH where we find manpages
11320                 if test -n "$MANPAGE_FORMAT" ; then
11321                         break
11322                 fi
11323         done
11324         # if we did not find the example, just assume it is normal
11325         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11326         IFS="$ac_save_ifs"
11327         ;;
11328 (*)
11329         for cf_option in $MANPAGE_FORMAT; do
11330         case $cf_option in
11331         (gzip|compress|BSDI|normal|formatted|catonly)
11332                 ;;
11333         (*)
11334                 cf_unknown="$cf_unknown $cf_option"
11335                 ;;
11336         esac
11337         done
11338         ;;
11339 esac
11340
11341 echo "$as_me:11341: result: $MANPAGE_FORMAT" >&5
11342 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11343 if test -n "$cf_unknown" ; then
11344         { echo "$as_me:11344: WARNING: Unexpected manpage-format $cf_unknown" >&5
11345 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11346 fi
11347
11348 echo "$as_me:11348: checking for manpage renaming" >&5
11349 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11350
11351 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11352 if test "${with_manpage_renames+set}" = set; then
11353   withval="$with_manpage_renames"
11354   MANPAGE_RENAMES=$withval
11355 else
11356   MANPAGE_RENAMES=yes
11357 fi;
11358
11359 case ".$MANPAGE_RENAMES" in
11360 (.no)
11361         ;;
11362 (.|.yes)
11363         # Debian 'man' program?
11364         if test -f /etc/debian_version ; then
11365                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11366         else
11367                 MANPAGE_RENAMES=no
11368         fi
11369         ;;
11370 esac
11371
11372 if test "$MANPAGE_RENAMES" != no ; then
11373         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11374                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11375         elif test ! -f $MANPAGE_RENAMES ; then
11376                 { { echo "$as_me:11376: error: not a filename: $MANPAGE_RENAMES" >&5
11377 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11378    { (exit 1); exit 1; }; }
11379         fi
11380
11381         test ! -d man && mkdir man
11382
11383         # Construct a sed-script to perform renaming within man-pages
11384         if test -n "$MANPAGE_RENAMES" ; then
11385                 test ! -d man && mkdir man
11386                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11387         fi
11388 fi
11389
11390 echo "$as_me:11390: result: $MANPAGE_RENAMES" >&5
11391 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11392
11393 echo "$as_me:11393: checking if manpage aliases will be installed" >&5
11394 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11395
11396 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11397 if test "${with_manpage_aliases+set}" = set; then
11398   withval="$with_manpage_aliases"
11399   MANPAGE_ALIASES=$withval
11400 else
11401   MANPAGE_ALIASES=yes
11402 fi;
11403
11404 echo "$as_me:11404: result: $MANPAGE_ALIASES" >&5
11405 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11406
11407 case "x$LN_S" in
11408 (xln*)
11409         cf_use_symlinks=yes
11410         ;;
11411 (*)
11412         cf_use_symlinks=no
11413         ;;
11414 esac
11415
11416 MANPAGE_SYMLINKS=no
11417 if test "$MANPAGE_ALIASES" = yes ; then
11418 echo "$as_me:11418: checking if manpage symlinks should be used" >&5
11419 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11420
11421 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11422 if test "${with_manpage_symlinks+set}" = set; then
11423   withval="$with_manpage_symlinks"
11424   MANPAGE_SYMLINKS=$withval
11425 else
11426   MANPAGE_SYMLINKS=$cf_use_symlinks
11427 fi;
11428
11429 if test "$$cf_use_symlinks" = no; then
11430 if test "$MANPAGE_SYMLINKS" = yes ; then
11431         { echo "$as_me:11431: WARNING: cannot make symlinks" >&5
11432 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11433         MANPAGE_SYMLINKS=no
11434 fi
11435 fi
11436
11437 echo "$as_me:11437: result: $MANPAGE_SYMLINKS" >&5
11438 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11439 fi
11440
11441 echo "$as_me:11441: checking for manpage tbl" >&5
11442 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11443
11444 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11445 if test "${with_manpage_tbl+set}" = set; then
11446   withval="$with_manpage_tbl"
11447   MANPAGE_TBL=$withval
11448 else
11449   MANPAGE_TBL=no
11450 fi;
11451
11452 echo "$as_me:11452: result: $MANPAGE_TBL" >&5
11453 echo "${ECHO_T}$MANPAGE_TBL" >&6
11454
11455 if test "$prefix" = "NONE" ; then
11456         cf_prefix="$ac_default_prefix"
11457 else
11458         cf_prefix="$prefix"
11459 fi
11460
11461 case "$MANPAGE_FORMAT" in
11462 (*catonly*)
11463         cf_format=yes
11464         cf_inboth=no
11465         ;;
11466 (*formatted*)
11467         cf_format=yes
11468         cf_inboth=yes
11469         ;;
11470 (*)
11471         cf_format=no
11472         cf_inboth=no
11473         ;;
11474 esac
11475
11476 test ! -d man && mkdir man
11477
11478 cf_so_strip=
11479 cf_compress=
11480 case "$MANPAGE_FORMAT" in
11481 (*compress*)
11482         cf_so_strip="Z"
11483         cf_compress=compress
11484         ;;
11485 (*gzip*)
11486         cf_so_strip="gz"
11487         cf_compress=gzip
11488         ;;
11489 esac
11490
11491 cf_edit_man=./edit_man.sh
11492 cf_man_alias=`pwd`/man_alias.sed
11493
11494 cat >$cf_edit_man <<CF_EOF
11495 #! $SHELL
11496 # this script is generated by the configure-script CF_MAN_PAGES macro.
11497
11498 prefix="$cf_prefix"
11499 datarootdir="$datarootdir"
11500 datadir="$datadir"
11501
11502 NCURSES_MAJOR="$NCURSES_MAJOR"
11503 NCURSES_MINOR="$NCURSES_MINOR"
11504 NCURSES_PATCH="$NCURSES_PATCH"
11505
11506 NCURSES_OSPEED="$NCURSES_OSPEED"
11507 TERMINFO="$TERMINFO"
11508
11509 INSTALL="$INSTALL"
11510 INSTALL_DATA="$INSTALL_DATA"
11511
11512 transform="$program_transform_name"
11513
11514 TMP=\${TMPDIR:=/tmp}/man\$\$
11515 trap "rm -f \$TMP" 0 1 2 5 15
11516
11517 form=\$1
11518 shift || exit 1
11519
11520 verb=\$1
11521 shift || exit 1
11522
11523 mandir=\$1
11524 shift || exit 1
11525
11526 srcdir=\$1
11527 top_srcdir=\$srcdir/..
11528 shift || exit 1
11529
11530 if test "\$form" = normal ; then
11531         if test "$cf_format" = yes ; then
11532         if test "$cf_inboth" = no ; then
11533                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11534                 exit $?
11535         fi
11536         fi
11537         cf_subdir=\$mandir/man
11538         cf_tables=$MANPAGE_TBL
11539 else
11540         cf_subdir=\$mandir/cat
11541         cf_tables=yes
11542 fi
11543
11544 # process the list of source-files
11545 for i in \$* ; do
11546 case \$i in
11547 (*.orig|*.rej) ;;
11548 (*.[0-9]*)
11549         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11550         if test \$verb = installing ; then
11551         if test ! -d \$cf_subdir\${section} ; then
11552                 mkdir -p \$cf_subdir\$section
11553         fi
11554         fi
11555
11556         # replace variables in man page
11557         if test ! -f $cf_man_alias ; then
11558 cat >>$cf_man_alias <<-CF_EOF2
11559                 s,@DATADIR@,\$datadir,g
11560                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11561                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11562                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11563                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11564                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11565                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11566 CF_EOF
11567
11568         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11569         do
11570                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11571                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11572 cat >>$cf_edit_man <<-CF_EOF
11573                 s,@$cf_NAME@,$cf_name,g
11574 CF_EOF
11575         done
11576
11577 cat >>$cf_edit_man <<CF_EOF
11578 CF_EOF2
11579                 echo "...made $cf_man_alias"
11580         fi
11581
11582         aliases=
11583         cf_source=\`basename \$i\`
11584         inalias=\$cf_source
11585         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11586         if test ! -f \$inalias ; then
11587                 echo .. skipped \$cf_source
11588                 continue
11589         fi
11590 CF_EOF
11591
11592 if test "$MANPAGE_ALIASES" != no ; then
11593 cat >>$cf_edit_man <<CF_EOF
11594         nCurses=ignore.3x
11595         test $with_curses_h = yes && nCurses=ncurses.3x
11596         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11597 CF_EOF
11598 fi
11599
11600 if test "$MANPAGE_RENAMES" = no ; then
11601 cat >>$cf_edit_man <<CF_EOF
11602         # perform program transformations for section 1 man pages
11603         if test \$section = 1 ; then
11604                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11605         else
11606                 cf_target=\$cf_subdir\${section}/\$cf_source
11607         fi
11608 CF_EOF
11609 else
11610 cat >>$cf_edit_man <<CF_EOF
11611         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11612         if test -z "\$cf_target" ; then
11613                 echo '? missing rename for '\$cf_source
11614                 cf_target="\$cf_source"
11615         fi
11616         cf_target="\$cf_subdir\${section}/\${cf_target}"
11617
11618 CF_EOF
11619 fi
11620
11621 cat >>$cf_edit_man <<CF_EOF
11622         sed     -f $cf_man_alias \\
11623 CF_EOF
11624
11625 if test -f $MANPAGE_RENAMES ; then
11626 cat >>$cf_edit_man <<CF_EOF
11627                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11628 CF_EOF
11629 else
11630 cat >>$cf_edit_man <<CF_EOF
11631                 < \$i >\$TMP
11632 CF_EOF
11633 fi
11634
11635 cat >>$cf_edit_man <<CF_EOF
11636 if test \$cf_tables = yes ; then
11637         tbl \$TMP >\$TMP.out
11638         mv \$TMP.out \$TMP
11639 fi
11640 CF_EOF
11641
11642 if test $with_overwrite != yes ; then
11643 cat >>$cf_edit_man <<CF_EOF
11644         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11645         mv \$TMP.out \$TMP
11646 CF_EOF
11647 fi
11648
11649 if test $with_curses_h != yes ; then
11650 cat >>$cf_edit_man <<CF_EOF
11651         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11652         mv \$TMP.out \$TMP
11653 CF_EOF
11654 fi
11655
11656 cat >>$cf_edit_man <<CF_EOF
11657         if test \$form = format ; then
11658                 nroff -man \$TMP >\$TMP.out
11659                 mv \$TMP.out \$TMP
11660         fi
11661 CF_EOF
11662
11663 if test -n "$cf_compress" ; then
11664 cat >>$cf_edit_man <<CF_EOF
11665         if test \$verb = installing ; then
11666         if ( $cf_compress -f \$TMP )
11667         then
11668                 mv \$TMP.$cf_so_strip \$TMP
11669         fi
11670         fi
11671         cf_target="\$cf_target.$cf_so_strip"
11672 CF_EOF
11673 fi
11674
11675 case "$MANPAGE_FORMAT" in
11676 (*BSDI*)
11677 cat >>$cf_edit_man <<CF_EOF
11678         if test \$form = format ; then
11679                 # BSDI installs only .0 suffixes in the cat directories
11680                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11681         fi
11682 CF_EOF
11683   ;;
11684 esac
11685
11686 cat >>$cf_edit_man <<CF_EOF
11687         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11688         if test \$verb = installing ; then
11689                 echo \$verb \$cf_target
11690                 \$INSTALL_DATA \$TMP \$cf_target
11691                 test -d \$cf_subdir\${section} &&
11692                 test -n "\$aliases" && (
11693                         cd \$cf_subdir\${section} && (
11694                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11695                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11696                                 cf_target=\`basename \$cf_target\`
11697                                 for cf_alias in \$aliases
11698                                 do
11699                                         if test \$section = 1 ; then
11700                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11701                                         fi
11702
11703                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11704                                                 if test -f \$cf_alias\${suffix} ; then
11705                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11706                                                         then
11707                                                                 continue
11708                                                         fi
11709                                                 fi
11710                                                 echo .. \$verb alias \$cf_alias\${suffix}
11711 CF_EOF
11712 case "x$LN_S" in
11713 (*-f)
11714 cat >>$cf_edit_man <<CF_EOF
11715                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11716 CF_EOF
11717         ;;
11718 (*)
11719 cat >>$cf_edit_man <<CF_EOF
11720                                                 rm -f \$cf_alias\${suffix}
11721                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11722 CF_EOF
11723         ;;
11724 esac
11725 cat >>$cf_edit_man <<CF_EOF
11726                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11727                                                 echo ".so \$cf_source" >\$TMP
11728 CF_EOF
11729 if test -n "$cf_compress" ; then
11730 cat >>$cf_edit_man <<CF_EOF
11731                                                 if test -n "$cf_so_strip" ; then
11732                                                         $cf_compress -f \$TMP
11733                                                         mv \$TMP.$cf_so_strip \$TMP
11734                                                 fi
11735 CF_EOF
11736 fi
11737 cat >>$cf_edit_man <<CF_EOF
11738                                                 echo .. \$verb alias \$cf_alias\${suffix}
11739                                                 rm -f \$cf_alias\${suffix}
11740                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11741                                         fi
11742                                 done
11743                         )
11744                 )
11745         elif test \$verb = removing ; then
11746                 test -f \$cf_target && (
11747                         echo \$verb \$cf_target
11748                         rm -f \$cf_target
11749                 )
11750                 test -d \$cf_subdir\${section} &&
11751                 test -n "\$aliases" && (
11752                         cd \$cf_subdir\${section} && (
11753                                 for cf_alias in \$aliases
11754                                 do
11755                                         if test \$section = 1 ; then
11756                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11757                                         fi
11758
11759                                         echo .. \$verb alias \$cf_alias\${suffix}
11760                                         rm -f \$cf_alias\${suffix}
11761                                 done
11762                         )
11763                 )
11764         else
11765 #               echo ".hy 0"
11766                 cat \$TMP
11767         fi
11768         ;;
11769 esac
11770 done
11771
11772 if test $cf_inboth = yes ; then
11773 if test \$form != format ; then
11774         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11775 fi
11776 fi
11777
11778 exit 0
11779 CF_EOF
11780 chmod 755 $cf_edit_man
11781
11782 ###############################################################################
11783
11784 ### Note that some functions (such as const) are normally disabled anyway.
11785 echo "$as_me:11785: checking if you want to build with function extensions" >&5
11786 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11787
11788 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11789 if test "${enable_ext_funcs+set}" = set; then
11790   enableval="$enable_ext_funcs"
11791   with_ext_funcs=$enableval
11792 else
11793   with_ext_funcs=yes
11794 fi;
11795 echo "$as_me:11795: result: $with_ext_funcs" >&5
11796 echo "${ECHO_T}$with_ext_funcs" >&6
11797 if test "x$with_ext_funcs" = xyes ; then
11798         NCURSES_EXT_FUNCS=1
11799
11800 cat >>confdefs.h <<\EOF
11801 #define HAVE_ASSUME_DEFAULT_COLORS 1
11802 EOF
11803
11804 cat >>confdefs.h <<\EOF
11805 #define HAVE_CURSES_VERSION 1
11806 EOF
11807
11808 cat >>confdefs.h <<\EOF
11809 #define HAVE_HAS_KEY 1
11810 EOF
11811
11812 cat >>confdefs.h <<\EOF
11813 #define HAVE_RESIZETERM 1
11814 EOF
11815
11816 cat >>confdefs.h <<\EOF
11817 #define HAVE_RESIZE_TERM 1
11818 EOF
11819
11820 cat >>confdefs.h <<\EOF
11821 #define HAVE_TERM_ENTRY_H 1
11822 EOF
11823
11824 cat >>confdefs.h <<\EOF
11825 #define HAVE_USE_DEFAULT_COLORS 1
11826 EOF
11827
11828 cat >>confdefs.h <<\EOF
11829 #define HAVE_USE_EXTENDED_NAMES 1
11830 EOF
11831
11832 cat >>confdefs.h <<\EOF
11833 #define HAVE_USE_SCREEN 1
11834 EOF
11835
11836 cat >>confdefs.h <<\EOF
11837 #define HAVE_USE_WINDOW 1
11838 EOF
11839
11840 cat >>confdefs.h <<\EOF
11841 #define HAVE_WRESIZE 1
11842 EOF
11843
11844 cat >>confdefs.h <<\EOF
11845 #define NCURSES_EXT_FUNCS 1
11846 EOF
11847
11848         GENERATED_EXT_FUNCS=generated
11849 else
11850         NCURSES_EXT_FUNCS=0
11851         GENERATED_EXT_FUNCS=
11852 fi
11853
11854 echo "$as_me:11854: checking if you want to build with SCREEN extensions" >&5
11855 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11856
11857 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11858 if test "${enable_sp_funcs+set}" = set; then
11859   enableval="$enable_sp_funcs"
11860   with_sp_funcs=$enableval
11861 else
11862   with_sp_funcs=$cf_dft_ext_spfuncs
11863 fi;
11864 echo "$as_me:11864: result: $with_sp_funcs" >&5
11865 echo "${ECHO_T}$with_sp_funcs" >&6
11866 if test "x$with_sp_funcs" = xyes ; then
11867         NCURSES_SP_FUNCS=1
11868
11869 cat >>confdefs.h <<\EOF
11870 #define NCURSES_SP_FUNCS 1
11871 EOF
11872
11873         GENERATED_SP_FUNCS=generated
11874 else
11875         NCURSES_SP_FUNCS=0
11876         GENERATED_SP_FUNCS=
11877 fi
11878
11879 echo "$as_me:11879: checking if you want to build with terminal-driver" >&5
11880 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11881
11882 # Check whether --enable-term-driver or --disable-term-driver was given.
11883 if test "${enable_term_driver+set}" = set; then
11884   enableval="$enable_term_driver"
11885   with_term_driver=$enableval
11886 else
11887   with_term_driver=no
11888 fi;
11889 echo "$as_me:11889: result: $with_term_driver" >&5
11890 echo "${ECHO_T}$with_term_driver" >&6
11891 if test "x$with_term_driver" = xyes ; then
11892
11893 cat >>confdefs.h <<\EOF
11894 #define USE_TERM_DRIVER 1
11895 EOF
11896
11897         if test "x$with_termlib" != xno ; then
11898                 { { echo "$as_me:11898: error: The term-driver option conflicts with the termlib option" >&5
11899 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11900    { (exit 1); exit 1; }; }
11901         fi
11902         if test "x$with_sp_funcs" != xyes ; then
11903                 { { echo "$as_me:11903: error: The term-driver option relies upon sp-funcs" >&5
11904 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11905    { (exit 1); exit 1; }; }
11906         fi
11907 fi
11908
11909 ###   use option --enable-const to turn on use of const beyond that in XSI.
11910 echo "$as_me:11910: checking for extended use of const keyword" >&5
11911 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11912
11913 # Check whether --enable-const or --disable-const was given.
11914 if test "${enable_const+set}" = set; then
11915   enableval="$enable_const"
11916   with_ext_const=$enableval
11917 else
11918   with_ext_const=$cf_dft_ext_const
11919 fi;
11920 echo "$as_me:11920: result: $with_ext_const" >&5
11921 echo "${ECHO_T}$with_ext_const" >&6
11922 NCURSES_CONST='/*nothing*/'
11923 if test "x$with_ext_const" = xyes ; then
11924         NCURSES_CONST=const
11925 fi
11926
11927 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11928 echo "$as_me:11928: checking if you want to use extended colors" >&5
11929 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11930
11931 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11932 if test "${enable_ext_colors+set}" = set; then
11933   enableval="$enable_ext_colors"
11934   with_ext_colors=$enableval
11935 else
11936   with_ext_colors=$cf_dft_ext_colors
11937 fi;
11938 echo "$as_me:11938: result: $with_ext_colors" >&5
11939 echo "${ECHO_T}$with_ext_colors" >&6
11940 NCURSES_EXT_COLORS=0
11941 if test "x$with_ext_colors" = xyes ; then
11942         if test "x$with_widec" != xyes ; then
11943                 { echo "$as_me:11943: WARNING: This option applies only to wide-character library" >&5
11944 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11945         else
11946                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11947
11948 if test "${with_abi_version+set}" != set; then
11949         case $cf_cv_rel_version in
11950         (5.*)
11951                 cf_cv_rel_version=6.0
11952                 cf_cv_abi_version=6
11953                 { echo "$as_me:11953: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11954 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11955                 ;;
11956         esac
11957 fi
11958
11959                 NCURSES_EXT_COLORS=1
11960
11961 cat >>confdefs.h <<\EOF
11962 #define NCURSES_EXT_COLORS 1
11963 EOF
11964
11965         fi
11966 fi
11967
11968 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11969 echo "$as_me:11969: checking if you want to use extended mouse encoding" >&5
11970 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11971
11972 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11973 if test "${enable_ext_mouse+set}" = set; then
11974   enableval="$enable_ext_mouse"
11975   with_ext_mouse=$enableval
11976 else
11977   with_ext_mouse=$cf_dft_ext_mouse
11978 fi;
11979 echo "$as_me:11979: result: $with_ext_mouse" >&5
11980 echo "${ECHO_T}$with_ext_mouse" >&6
11981 NCURSES_MOUSE_VERSION=1
11982 if test "x$with_ext_mouse" = xyes ; then
11983         NCURSES_MOUSE_VERSION=2
11984
11985 if test "${with_abi_version+set}" != set; then
11986         case $cf_cv_rel_version in
11987         (5.*)
11988                 cf_cv_rel_version=6.0
11989                 cf_cv_abi_version=6
11990                 { echo "$as_me:11990: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11991 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11992                 ;;
11993         esac
11994 fi
11995
11996 fi
11997
11998 ###   use option --enable-ext-putwin to turn on extended screendumps
11999 echo "$as_me:11999: checking if you want to use extended putwin/screendump" >&5
12000 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12001
12002 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12003 if test "${enable_ext_putwin+set}" = set; then
12004   enableval="$enable_ext_putwin"
12005   with_ext_putwin=$enableval
12006 else
12007   with_ext_putwin=$cf_dft_ext_putwin
12008 fi;
12009 echo "$as_me:12009: result: $with_ext_putwin" >&5
12010 echo "${ECHO_T}$with_ext_putwin" >&6
12011 if test "x$with_ext_putwin" = xyes ; then
12012
12013 cat >>confdefs.h <<\EOF
12014 #define NCURSES_EXT_PUTWIN 1
12015 EOF
12016
12017 fi
12018
12019 echo "$as_me:12019: checking if you want \$NCURSES_NO_PADDING code" >&5
12020 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12021
12022 # Check whether --enable-no-padding or --disable-no-padding was given.
12023 if test "${enable_no_padding+set}" = set; then
12024   enableval="$enable_no_padding"
12025   with_no_padding=$enableval
12026 else
12027   with_no_padding=$with_ext_funcs
12028 fi;
12029 echo "$as_me:12029: result: $with_no_padding" >&5
12030 echo "${ECHO_T}$with_no_padding" >&6
12031 test "x$with_no_padding" = xyes &&
12032 cat >>confdefs.h <<\EOF
12033 #define NCURSES_NO_PADDING 1
12034 EOF
12035
12036 echo "$as_me:12036: checking for ANSI C header files" >&5
12037 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12038 if test "${ac_cv_header_stdc+set}" = set; then
12039   echo $ECHO_N "(cached) $ECHO_C" >&6
12040 else
12041   cat >conftest.$ac_ext <<_ACEOF
12042 #line 12042 "configure"
12043 #include "confdefs.h"
12044 #include <stdlib.h>
12045 #include <stdarg.h>
12046 #include <string.h>
12047 #include <float.h>
12048
12049 _ACEOF
12050 if { (eval echo "$as_me:12050: \"$ac_cpp conftest.$ac_ext\"") >&5
12051   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12052   ac_status=$?
12053   egrep -v '^ *\+' conftest.er1 >conftest.err
12054   rm -f conftest.er1
12055   cat conftest.err >&5
12056   echo "$as_me:12056: \$? = $ac_status" >&5
12057   (exit $ac_status); } >/dev/null; then
12058   if test -s conftest.err; then
12059     ac_cpp_err=$ac_c_preproc_warn_flag
12060   else
12061     ac_cpp_err=
12062   fi
12063 else
12064   ac_cpp_err=yes
12065 fi
12066 if test -z "$ac_cpp_err"; then
12067   ac_cv_header_stdc=yes
12068 else
12069   echo "$as_me: failed program was:" >&5
12070   cat conftest.$ac_ext >&5
12071   ac_cv_header_stdc=no
12072 fi
12073 rm -f conftest.err conftest.$ac_ext
12074
12075 if test $ac_cv_header_stdc = yes; then
12076   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12077   cat >conftest.$ac_ext <<_ACEOF
12078 #line 12078 "configure"
12079 #include "confdefs.h"
12080 #include <string.h>
12081
12082 _ACEOF
12083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12084   egrep "memchr" >/dev/null 2>&1; then
12085   :
12086 else
12087   ac_cv_header_stdc=no
12088 fi
12089 rm -rf conftest*
12090
12091 fi
12092
12093 if test $ac_cv_header_stdc = yes; then
12094   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12095   cat >conftest.$ac_ext <<_ACEOF
12096 #line 12096 "configure"
12097 #include "confdefs.h"
12098 #include <stdlib.h>
12099
12100 _ACEOF
12101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12102   egrep "free" >/dev/null 2>&1; then
12103   :
12104 else
12105   ac_cv_header_stdc=no
12106 fi
12107 rm -rf conftest*
12108
12109 fi
12110
12111 if test $ac_cv_header_stdc = yes; then
12112   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12113   if test "$cross_compiling" = yes; then
12114   :
12115 else
12116   cat >conftest.$ac_ext <<_ACEOF
12117 #line 12117 "configure"
12118 #include "confdefs.h"
12119 #include <ctype.h>
12120 #if ((' ' & 0x0FF) == 0x020)
12121 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12122 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12123 #else
12124 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12125                      || ('j' <= (c) && (c) <= 'r') \
12126                      || ('s' <= (c) && (c) <= 'z'))
12127 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12128 #endif
12129
12130 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12131 int
12132 main ()
12133 {
12134   int i;
12135   for (i = 0; i < 256; i++)
12136     if (XOR (islower (i), ISLOWER (i))
12137         || toupper (i) != TOUPPER (i))
12138       $ac_main_return(2);
12139   $ac_main_return (0);
12140 }
12141 _ACEOF
12142 rm -f conftest$ac_exeext
12143 if { (eval echo "$as_me:12143: \"$ac_link\"") >&5
12144   (eval $ac_link) 2>&5
12145   ac_status=$?
12146   echo "$as_me:12146: \$? = $ac_status" >&5
12147   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12148   { (eval echo "$as_me:12148: \"$ac_try\"") >&5
12149   (eval $ac_try) 2>&5
12150   ac_status=$?
12151   echo "$as_me:12151: \$? = $ac_status" >&5
12152   (exit $ac_status); }; }; then
12153   :
12154 else
12155   echo "$as_me: program exited with status $ac_status" >&5
12156 echo "$as_me: failed program was:" >&5
12157 cat conftest.$ac_ext >&5
12158 ac_cv_header_stdc=no
12159 fi
12160 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12161 fi
12162 fi
12163 fi
12164 echo "$as_me:12164: result: $ac_cv_header_stdc" >&5
12165 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12166 if test $ac_cv_header_stdc = yes; then
12167
12168 cat >>confdefs.h <<\EOF
12169 #define STDC_HEADERS 1
12170 EOF
12171
12172 fi
12173
12174 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12175
12176 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12177                   inttypes.h stdint.h unistd.h
12178 do
12179 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12180 echo "$as_me:12180: checking for $ac_header" >&5
12181 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12182 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12183   echo $ECHO_N "(cached) $ECHO_C" >&6
12184 else
12185   cat >conftest.$ac_ext <<_ACEOF
12186 #line 12186 "configure"
12187 #include "confdefs.h"
12188 $ac_includes_default
12189 #include <$ac_header>
12190 _ACEOF
12191 rm -f conftest.$ac_objext
12192 if { (eval echo "$as_me:12192: \"$ac_compile\"") >&5
12193   (eval $ac_compile) 2>&5
12194   ac_status=$?
12195   echo "$as_me:12195: \$? = $ac_status" >&5
12196   (exit $ac_status); } &&
12197          { ac_try='test -s conftest.$ac_objext'
12198   { (eval echo "$as_me:12198: \"$ac_try\"") >&5
12199   (eval $ac_try) 2>&5
12200   ac_status=$?
12201   echo "$as_me:12201: \$? = $ac_status" >&5
12202   (exit $ac_status); }; }; then
12203   eval "$as_ac_Header=yes"
12204 else
12205   echo "$as_me: failed program was:" >&5
12206 cat conftest.$ac_ext >&5
12207 eval "$as_ac_Header=no"
12208 fi
12209 rm -f conftest.$ac_objext conftest.$ac_ext
12210 fi
12211 echo "$as_me:12211: result: `eval echo '${'$as_ac_Header'}'`" >&5
12212 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12213 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12214   cat >>confdefs.h <<EOF
12215 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12216 EOF
12217
12218 fi
12219 done
12220
12221 echo "$as_me:12221: checking for signed char" >&5
12222 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12223 if test "${ac_cv_type_signed_char+set}" = set; then
12224   echo $ECHO_N "(cached) $ECHO_C" >&6
12225 else
12226   cat >conftest.$ac_ext <<_ACEOF
12227 #line 12227 "configure"
12228 #include "confdefs.h"
12229 $ac_includes_default
12230 int
12231 main ()
12232 {
12233 if ((signed char *) 0)
12234   return 0;
12235 if (sizeof (signed char))
12236   return 0;
12237   ;
12238   return 0;
12239 }
12240 _ACEOF
12241 rm -f conftest.$ac_objext
12242 if { (eval echo "$as_me:12242: \"$ac_compile\"") >&5
12243   (eval $ac_compile) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit $ac_status); } &&
12247          { ac_try='test -s conftest.$ac_objext'
12248   { (eval echo "$as_me:12248: \"$ac_try\"") >&5
12249   (eval $ac_try) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit $ac_status); }; }; then
12253   ac_cv_type_signed_char=yes
12254 else
12255   echo "$as_me: failed program was:" >&5
12256 cat conftest.$ac_ext >&5
12257 ac_cv_type_signed_char=no
12258 fi
12259 rm -f conftest.$ac_objext conftest.$ac_ext
12260 fi
12261 echo "$as_me:12261: result: $ac_cv_type_signed_char" >&5
12262 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12263
12264 echo "$as_me:12264: checking size of signed char" >&5
12265 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12266 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12267   echo $ECHO_N "(cached) $ECHO_C" >&6
12268 else
12269   if test "$ac_cv_type_signed_char" = yes; then
12270   if test "$cross_compiling" = yes; then
12271   # Depending upon the size, compute the lo and hi bounds.
12272 cat >conftest.$ac_ext <<_ACEOF
12273 #line 12273 "configure"
12274 #include "confdefs.h"
12275 $ac_includes_default
12276 int
12277 main ()
12278 {
12279 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12280   ;
12281   return 0;
12282 }
12283 _ACEOF
12284 rm -f conftest.$ac_objext
12285 if { (eval echo "$as_me:12285: \"$ac_compile\"") >&5
12286   (eval $ac_compile) 2>&5
12287   ac_status=$?
12288   echo "$as_me:12288: \$? = $ac_status" >&5
12289   (exit $ac_status); } &&
12290          { ac_try='test -s conftest.$ac_objext'
12291   { (eval echo "$as_me:12291: \"$ac_try\"") >&5
12292   (eval $ac_try) 2>&5
12293   ac_status=$?
12294   echo "$as_me:12294: \$? = $ac_status" >&5
12295   (exit $ac_status); }; }; then
12296   ac_lo=0 ac_mid=0
12297   while :; do
12298     cat >conftest.$ac_ext <<_ACEOF
12299 #line 12299 "configure"
12300 #include "confdefs.h"
12301 $ac_includes_default
12302 int
12303 main ()
12304 {
12305 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12306   ;
12307   return 0;
12308 }
12309 _ACEOF
12310 rm -f conftest.$ac_objext
12311 if { (eval echo "$as_me:12311: \"$ac_compile\"") >&5
12312   (eval $ac_compile) 2>&5
12313   ac_status=$?
12314   echo "$as_me:12314: \$? = $ac_status" >&5
12315   (exit $ac_status); } &&
12316          { ac_try='test -s conftest.$ac_objext'
12317   { (eval echo "$as_me:12317: \"$ac_try\"") >&5
12318   (eval $ac_try) 2>&5
12319   ac_status=$?
12320   echo "$as_me:12320: \$? = $ac_status" >&5
12321   (exit $ac_status); }; }; then
12322   ac_hi=$ac_mid; break
12323 else
12324   echo "$as_me: failed program was:" >&5
12325 cat conftest.$ac_ext >&5
12326 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12327 fi
12328 rm -f conftest.$ac_objext conftest.$ac_ext
12329   done
12330 else
12331   echo "$as_me: failed program was:" >&5
12332 cat conftest.$ac_ext >&5
12333 ac_hi=-1 ac_mid=-1
12334   while :; do
12335     cat >conftest.$ac_ext <<_ACEOF
12336 #line 12336 "configure"
12337 #include "confdefs.h"
12338 $ac_includes_default
12339 int
12340 main ()
12341 {
12342 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12343   ;
12344   return 0;
12345 }
12346 _ACEOF
12347 rm -f conftest.$ac_objext
12348 if { (eval echo "$as_me:12348: \"$ac_compile\"") >&5
12349   (eval $ac_compile) 2>&5
12350   ac_status=$?
12351   echo "$as_me:12351: \$? = $ac_status" >&5
12352   (exit $ac_status); } &&
12353          { ac_try='test -s conftest.$ac_objext'
12354   { (eval echo "$as_me:12354: \"$ac_try\"") >&5
12355   (eval $ac_try) 2>&5
12356   ac_status=$?
12357   echo "$as_me:12357: \$? = $ac_status" >&5
12358   (exit $ac_status); }; }; then
12359   ac_lo=$ac_mid; break
12360 else
12361   echo "$as_me: failed program was:" >&5
12362 cat conftest.$ac_ext >&5
12363 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12364 fi
12365 rm -f conftest.$ac_objext conftest.$ac_ext
12366   done
12367 fi
12368 rm -f conftest.$ac_objext conftest.$ac_ext
12369 # Binary search between lo and hi bounds.
12370 while test "x$ac_lo" != "x$ac_hi"; do
12371   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12372   cat >conftest.$ac_ext <<_ACEOF
12373 #line 12373 "configure"
12374 #include "confdefs.h"
12375 $ac_includes_default
12376 int
12377 main ()
12378 {
12379 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12380   ;
12381   return 0;
12382 }
12383 _ACEOF
12384 rm -f conftest.$ac_objext
12385 if { (eval echo "$as_me:12385: \"$ac_compile\"") >&5
12386   (eval $ac_compile) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit $ac_status); } &&
12390          { ac_try='test -s conftest.$ac_objext'
12391   { (eval echo "$as_me:12391: \"$ac_try\"") >&5
12392   (eval $ac_try) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit $ac_status); }; }; then
12396   ac_hi=$ac_mid
12397 else
12398   echo "$as_me: failed program was:" >&5
12399 cat conftest.$ac_ext >&5
12400 ac_lo=`expr $ac_mid + 1`
12401 fi
12402 rm -f conftest.$ac_objext conftest.$ac_ext
12403 done
12404 ac_cv_sizeof_signed_char=$ac_lo
12405 else
12406   if test "$cross_compiling" = yes; then
12407   { { echo "$as_me:12407: error: cannot run test program while cross compiling" >&5
12408 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12409    { (exit 1); exit 1; }; }
12410 else
12411   cat >conftest.$ac_ext <<_ACEOF
12412 #line 12412 "configure"
12413 #include "confdefs.h"
12414 $ac_includes_default
12415 int
12416 main ()
12417 {
12418 FILE *f = fopen ("conftest.val", "w");
12419 if (!f)
12420   $ac_main_return (1);
12421 fprintf (f, "%d", (sizeof (signed char)));
12422 fclose (f);
12423   ;
12424   return 0;
12425 }
12426 _ACEOF
12427 rm -f conftest$ac_exeext
12428 if { (eval echo "$as_me:12428: \"$ac_link\"") >&5
12429   (eval $ac_link) 2>&5
12430   ac_status=$?
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12433   { (eval echo "$as_me:12433: \"$ac_try\"") >&5
12434   (eval $ac_try) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit $ac_status); }; }; then
12438   ac_cv_sizeof_signed_char=`cat conftest.val`
12439 else
12440   echo "$as_me: program exited with status $ac_status" >&5
12441 echo "$as_me: failed program was:" >&5
12442 cat conftest.$ac_ext >&5
12443 fi
12444 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12445 fi
12446 fi
12447 rm -f conftest.val
12448 else
12449   ac_cv_sizeof_signed_char=0
12450 fi
12451 fi
12452 echo "$as_me:12452: result: $ac_cv_sizeof_signed_char" >&5
12453 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12454 cat >>confdefs.h <<EOF
12455 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12456 EOF
12457
12458 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12459         NCURSES_SBOOL="signed char"
12460 else
12461         NCURSES_SBOOL="char"
12462 fi
12463 echo "$as_me:12463: checking if you want to use signed Boolean array in term.h" >&5
12464 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12465
12466 # Check whether --enable-signed-char or --disable-signed-char was given.
12467 if test "${enable_signed_char+set}" = set; then
12468   enableval="$enable_signed_char"
12469   with_signed_char=$enableval
12470 else
12471   with_signed_char=no
12472 fi;
12473 echo "$as_me:12473: result: $with_signed_char" >&5
12474 echo "${ECHO_T}$with_signed_char" >&6
12475 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12476
12477 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12478 echo "$as_me:12478: checking if you want SIGWINCH handler" >&5
12479 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12480
12481 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12482 if test "${enable_sigwinch+set}" = set; then
12483   enableval="$enable_sigwinch"
12484   with_sigwinch=$enableval
12485 else
12486   with_sigwinch=$with_ext_funcs
12487 fi;
12488 echo "$as_me:12488: result: $with_sigwinch" >&5
12489 echo "${ECHO_T}$with_sigwinch" >&6
12490 test "x$with_sigwinch" = xyes &&
12491 cat >>confdefs.h <<\EOF
12492 #define USE_SIGWINCH 1
12493 EOF
12494
12495 ###   use option --enable-tcap-names to allow user to define new capabilities
12496 echo "$as_me:12496: checking if you want user-definable terminal capabilities like termcap" >&5
12497 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12498
12499 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12500 if test "${enable_tcap_names+set}" = set; then
12501   enableval="$enable_tcap_names"
12502   with_tcap_names=$enableval
12503 else
12504   with_tcap_names=$with_ext_funcs
12505 fi;
12506 echo "$as_me:12506: result: $with_tcap_names" >&5
12507 echo "${ECHO_T}$with_tcap_names" >&6
12508 NCURSES_XNAMES=0
12509 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12510
12511 ###############################################################################
12512 # These options are relatively safe to experiment with.
12513
12514 echo "$as_me:12514: checking if you want all development code" >&5
12515 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12516
12517 # Check whether --with-develop or --without-develop was given.
12518 if test "${with_develop+set}" = set; then
12519   withval="$with_develop"
12520   with_develop=$withval
12521 else
12522   with_develop=no
12523 fi;
12524 echo "$as_me:12524: result: $with_develop" >&5
12525 echo "${ECHO_T}$with_develop" >&6
12526
12527 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12528 echo "$as_me:12528: checking if you want hard-tabs code" >&5
12529 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12530
12531 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12532 if test "${enable_hard_tabs+set}" = set; then
12533   enableval="$enable_hard_tabs"
12534
12535 else
12536   enable_hard_tabs=$with_develop
12537 fi;
12538 echo "$as_me:12538: result: $enable_hard_tabs" >&5
12539 echo "${ECHO_T}$enable_hard_tabs" >&6
12540 test "x$enable_hard_tabs" = xyes &&
12541 cat >>confdefs.h <<\EOF
12542 #define USE_HARD_TABS 1
12543 EOF
12544
12545 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12546 echo "$as_me:12546: checking if you want limited support for xmc" >&5
12547 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12548
12549 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12550 if test "${enable_xmc_glitch+set}" = set; then
12551   enableval="$enable_xmc_glitch"
12552
12553 else
12554   enable_xmc_glitch=$with_develop
12555 fi;
12556 echo "$as_me:12556: result: $enable_xmc_glitch" >&5
12557 echo "${ECHO_T}$enable_xmc_glitch" >&6
12558 test "x$enable_xmc_glitch" = xyes &&
12559 cat >>confdefs.h <<\EOF
12560 #define USE_XMC_SUPPORT 1
12561 EOF
12562
12563 ###############################################################################
12564 # These are just experimental, probably should not be in a package:
12565
12566 echo "$as_me:12566: checking if you do not want to assume colors are white-on-black" >&5
12567 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12568
12569 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12570 if test "${enable_assumed_color+set}" = set; then
12571   enableval="$enable_assumed_color"
12572   with_assumed_color=$enableval
12573 else
12574   with_assumed_color=yes
12575 fi;
12576 echo "$as_me:12576: result: $with_assumed_color" >&5
12577 echo "${ECHO_T}$with_assumed_color" >&6
12578 test "x$with_assumed_color" = xyes &&
12579 cat >>confdefs.h <<\EOF
12580 #define USE_ASSUMED_COLOR 1
12581 EOF
12582
12583 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12584 echo "$as_me:12584: checking if you want hashmap scrolling-optimization code" >&5
12585 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12586
12587 # Check whether --enable-hashmap or --disable-hashmap was given.
12588 if test "${enable_hashmap+set}" = set; then
12589   enableval="$enable_hashmap"
12590   with_hashmap=$enableval
12591 else
12592   with_hashmap=yes
12593 fi;
12594 echo "$as_me:12594: result: $with_hashmap" >&5
12595 echo "${ECHO_T}$with_hashmap" >&6
12596 test "x$with_hashmap" = xyes &&
12597 cat >>confdefs.h <<\EOF
12598 #define USE_HASHMAP 1
12599 EOF
12600
12601 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12602 echo "$as_me:12602: checking if you want colorfgbg code" >&5
12603 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12604
12605 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12606 if test "${enable_colorfgbg+set}" = set; then
12607   enableval="$enable_colorfgbg"
12608   with_colorfgbg=$enableval
12609 else
12610   with_colorfgbg=no
12611 fi;
12612 echo "$as_me:12612: result: $with_colorfgbg" >&5
12613 echo "${ECHO_T}$with_colorfgbg" >&6
12614 test "x$with_colorfgbg" = xyes &&
12615 cat >>confdefs.h <<\EOF
12616 #define USE_COLORFGBG 1
12617 EOF
12618
12619 ###   use option --enable-interop to turn on use of bindings used for interop
12620 echo "$as_me:12620: checking if you want interop bindings" >&5
12621 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12622
12623 # Check whether --enable-interop or --disable-interop was given.
12624 if test "${enable_interop+set}" = set; then
12625   enableval="$enable_interop"
12626   with_exp_interop=$enableval
12627 else
12628   with_exp_interop=$cf_dft_interop
12629 fi;
12630 echo "$as_me:12630: result: $with_exp_interop" >&5
12631 echo "${ECHO_T}$with_exp_interop" >&6
12632
12633 NCURSES_INTEROP_FUNCS=0
12634 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12635
12636 # This is still experimental (20080329), but should ultimately be moved to
12637 # the script-block --with-normal, etc.
12638
12639 echo "$as_me:12639: checking if you want to link with the pthread library" >&5
12640 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12641
12642 # Check whether --with-pthread or --without-pthread was given.
12643 if test "${with_pthread+set}" = set; then
12644   withval="$with_pthread"
12645   with_pthread=$withval
12646 else
12647   with_pthread=no
12648 fi;
12649 echo "$as_me:12649: result: $with_pthread" >&5
12650 echo "${ECHO_T}$with_pthread" >&6
12651
12652 if test "$with_pthread" != no ; then
12653         echo "$as_me:12653: checking for pthread.h" >&5
12654 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12655 if test "${ac_cv_header_pthread_h+set}" = set; then
12656   echo $ECHO_N "(cached) $ECHO_C" >&6
12657 else
12658   cat >conftest.$ac_ext <<_ACEOF
12659 #line 12659 "configure"
12660 #include "confdefs.h"
12661 #include <pthread.h>
12662 _ACEOF
12663 if { (eval echo "$as_me:12663: \"$ac_cpp conftest.$ac_ext\"") >&5
12664   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12665   ac_status=$?
12666   egrep -v '^ *\+' conftest.er1 >conftest.err
12667   rm -f conftest.er1
12668   cat conftest.err >&5
12669   echo "$as_me:12669: \$? = $ac_status" >&5
12670   (exit $ac_status); } >/dev/null; then
12671   if test -s conftest.err; then
12672     ac_cpp_err=$ac_c_preproc_warn_flag
12673   else
12674     ac_cpp_err=
12675   fi
12676 else
12677   ac_cpp_err=yes
12678 fi
12679 if test -z "$ac_cpp_err"; then
12680   ac_cv_header_pthread_h=yes
12681 else
12682   echo "$as_me: failed program was:" >&5
12683   cat conftest.$ac_ext >&5
12684   ac_cv_header_pthread_h=no
12685 fi
12686 rm -f conftest.err conftest.$ac_ext
12687 fi
12688 echo "$as_me:12688: result: $ac_cv_header_pthread_h" >&5
12689 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12690 if test $ac_cv_header_pthread_h = yes; then
12691
12692 cat >>confdefs.h <<\EOF
12693 #define HAVE_PTHREADS_H 1
12694 EOF
12695
12696         for cf_lib_pthread in pthread c_r
12697         do
12698             echo "$as_me:12698: checking if we can link with the $cf_lib_pthread library" >&5
12699 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12700             cf_save_LIBS="$LIBS"
12701
12702 cf_add_libs="-l$cf_lib_pthread"
12703 # Filter out duplicates - this happens with badly-designed ".pc" files...
12704 for cf_add_1lib in $LIBS
12705 do
12706         for cf_add_2lib in $cf_add_libs
12707         do
12708                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12709                 then
12710                         cf_add_1lib=
12711                         break
12712                 fi
12713         done
12714         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12715 done
12716 LIBS="$cf_add_libs"
12717
12718             cat >conftest.$ac_ext <<_ACEOF
12719 #line 12719 "configure"
12720 #include "confdefs.h"
12721
12722 #include <pthread.h>
12723
12724 int
12725 main ()
12726 {
12727
12728                 int rc = pthread_create(0,0,0,0);
12729                 int r2 = pthread_mutexattr_settype(0, 0);
12730
12731   ;
12732   return 0;
12733 }
12734 _ACEOF
12735 rm -f conftest.$ac_objext conftest$ac_exeext
12736 if { (eval echo "$as_me:12736: \"$ac_link\"") >&5
12737   (eval $ac_link) 2>&5
12738   ac_status=$?
12739   echo "$as_me:12739: \$? = $ac_status" >&5
12740   (exit $ac_status); } &&
12741          { ac_try='test -s conftest$ac_exeext'
12742   { (eval echo "$as_me:12742: \"$ac_try\"") >&5
12743   (eval $ac_try) 2>&5
12744   ac_status=$?
12745   echo "$as_me:12745: \$? = $ac_status" >&5
12746   (exit $ac_status); }; }; then
12747   with_pthread=yes
12748 else
12749   echo "$as_me: failed program was:" >&5
12750 cat conftest.$ac_ext >&5
12751 with_pthread=no
12752 fi
12753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12754             LIBS="$cf_save_LIBS"
12755             echo "$as_me:12755: result: $with_pthread" >&5
12756 echo "${ECHO_T}$with_pthread" >&6
12757             test "$with_pthread" = yes && break
12758         done
12759
12760         if test "$with_pthread" = yes ; then
12761
12762 cf_add_libs="-l$cf_lib_pthread"
12763 # Filter out duplicates - this happens with badly-designed ".pc" files...
12764 for cf_add_1lib in $LIBS
12765 do
12766         for cf_add_2lib in $cf_add_libs
12767         do
12768                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12769                 then
12770                         cf_add_1lib=
12771                         break
12772                 fi
12773         done
12774         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12775 done
12776 LIBS="$cf_add_libs"
12777
12778 cat >>confdefs.h <<\EOF
12779 #define HAVE_LIBPTHREADS 1
12780 EOF
12781
12782         else
12783             { { echo "$as_me:12783: error: Cannot link with pthread library" >&5
12784 echo "$as_me: error: Cannot link with pthread library" >&2;}
12785    { (exit 1); exit 1; }; }
12786         fi
12787
12788 fi
12789
12790 fi
12791
12792 if test "x$with_pthread" != xno; then
12793         echo "$as_me:12793: checking for pthread_kill" >&5
12794 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12795 if test "${ac_cv_func_pthread_kill+set}" = set; then
12796   echo $ECHO_N "(cached) $ECHO_C" >&6
12797 else
12798   cat >conftest.$ac_ext <<_ACEOF
12799 #line 12799 "configure"
12800 #include "confdefs.h"
12801 /* System header to define __stub macros and hopefully few prototypes,
12802     which can conflict with char pthread_kill (); below.  */
12803 #include <assert.h>
12804 /* Override any gcc2 internal prototype to avoid an error.  */
12805 #ifdef __cplusplus
12806 extern "C"
12807 #endif
12808 /* We use char because int might match the return type of a gcc2
12809    builtin and then its argument prototype would still apply.  */
12810 char pthread_kill ();
12811 char (*f) ();
12812
12813 int
12814 main ()
12815 {
12816 /* The GNU C library defines this for functions which it implements
12817     to always fail with ENOSYS.  Some functions are actually named
12818     something starting with __ and the normal name is an alias.  */
12819 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12820 choke me
12821 #else
12822 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12823 #endif
12824
12825   ;
12826   return 0;
12827 }
12828 _ACEOF
12829 rm -f conftest.$ac_objext conftest$ac_exeext
12830 if { (eval echo "$as_me:12830: \"$ac_link\"") >&5
12831   (eval $ac_link) 2>&5
12832   ac_status=$?
12833   echo "$as_me:12833: \$? = $ac_status" >&5
12834   (exit $ac_status); } &&
12835          { ac_try='test -s conftest$ac_exeext'
12836   { (eval echo "$as_me:12836: \"$ac_try\"") >&5
12837   (eval $ac_try) 2>&5
12838   ac_status=$?
12839   echo "$as_me:12839: \$? = $ac_status" >&5
12840   (exit $ac_status); }; }; then
12841   ac_cv_func_pthread_kill=yes
12842 else
12843   echo "$as_me: failed program was:" >&5
12844 cat conftest.$ac_ext >&5
12845 ac_cv_func_pthread_kill=no
12846 fi
12847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12848 fi
12849 echo "$as_me:12849: result: $ac_cv_func_pthread_kill" >&5
12850 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12851 if test $ac_cv_func_pthread_kill = yes; then
12852
12853                 echo "$as_me:12853: checking if you want to allow EINTR in wgetch with pthreads" >&5
12854 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12855
12856 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12857 if test "${enable_pthreads_eintr+set}" = set; then
12858   enableval="$enable_pthreads_eintr"
12859   use_pthreads_eintr=$enableval
12860 else
12861   use_pthreads_eintr=no
12862 fi;
12863                 echo "$as_me:12863: result: $use_pthreads_eintr" >&5
12864 echo "${ECHO_T}$use_pthreads_eintr" >&6
12865                 if test "x$use_pthreads_eintr" = xyes ; then
12866
12867 cat >>confdefs.h <<\EOF
12868 #define USE_PTHREADS_EINTR 1
12869 EOF
12870
12871                 fi
12872 fi
12873
12874         echo "$as_me:12874: checking if you want to use weak-symbols for pthreads" >&5
12875 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12876
12877 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12878 if test "${enable_weak_symbols+set}" = set; then
12879   enableval="$enable_weak_symbols"
12880   use_weak_symbols=$enableval
12881 else
12882   use_weak_symbols=no
12883 fi;
12884         echo "$as_me:12884: result: $use_weak_symbols" >&5
12885 echo "${ECHO_T}$use_weak_symbols" >&6
12886         if test "x$use_weak_symbols" = xyes ; then
12887
12888 echo "$as_me:12888: checking if $CC supports weak symbols" >&5
12889 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12890 if test "${cf_cv_weak_symbols+set}" = set; then
12891   echo $ECHO_N "(cached) $ECHO_C" >&6
12892 else
12893
12894 cat >conftest.$ac_ext <<_ACEOF
12895 #line 12895 "configure"
12896 #include "confdefs.h"
12897
12898 #include <stdio.h>
12899 int
12900 main ()
12901 {
12902
12903 #if defined(__GNUC__)
12904 #  if defined __USE_ISOC99
12905 #    define _cat_pragma(exp)    _Pragma(#exp)
12906 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12907 #  else
12908 #    define _weak_pragma(exp)
12909 #  endif
12910 #  define _declare(name)        __extension__ extern __typeof__(name) name
12911 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12912 #endif
12913
12914 weak_symbol(fopen);
12915
12916   ;
12917   return 0;
12918 }
12919 _ACEOF
12920 rm -f conftest.$ac_objext
12921 if { (eval echo "$as_me:12921: \"$ac_compile\"") >&5
12922   (eval $ac_compile) 2>&5
12923   ac_status=$?
12924   echo "$as_me:12924: \$? = $ac_status" >&5
12925   (exit $ac_status); } &&
12926          { ac_try='test -s conftest.$ac_objext'
12927   { (eval echo "$as_me:12927: \"$ac_try\"") >&5
12928   (eval $ac_try) 2>&5
12929   ac_status=$?
12930   echo "$as_me:12930: \$? = $ac_status" >&5
12931   (exit $ac_status); }; }; then
12932   cf_cv_weak_symbols=yes
12933 else
12934   echo "$as_me: failed program was:" >&5
12935 cat conftest.$ac_ext >&5
12936 cf_cv_weak_symbols=no
12937 fi
12938 rm -f conftest.$ac_objext conftest.$ac_ext
12939
12940 fi
12941 echo "$as_me:12941: result: $cf_cv_weak_symbols" >&5
12942 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12943
12944         else
12945                 cf_cv_weak_symbols=no
12946         fi
12947
12948         if test "x$cf_cv_weak_symbols" = xyes ; then
12949
12950 cat >>confdefs.h <<\EOF
12951 #define USE_WEAK_SYMBOLS 1
12952 EOF
12953
12954         fi
12955 fi
12956
12957 PTHREAD=
12958 if test "x$with_pthread" = "xyes" ; then
12959
12960 cat >>confdefs.h <<\EOF
12961 #define USE_PTHREADS 1
12962 EOF
12963
12964         enable_reentrant=yes
12965         if test "x$cf_cv_weak_symbols" = xyes ; then
12966                 PTHREAD=-lpthread
12967         fi
12968 fi
12969
12970 # Reentrant code has to be opaque; there's little advantage to making ncurses
12971 # opaque outside of that, so there is no --enable-opaque option.  We can use
12972 # this option without --with-pthreads, but this will be always set for
12973 # pthreads.
12974 echo "$as_me:12974: checking if you want reentrant code" >&5
12975 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12976
12977 # Check whether --enable-reentrant or --disable-reentrant was given.
12978 if test "${enable_reentrant+set}" = set; then
12979   enableval="$enable_reentrant"
12980   with_reentrant=$enableval
12981 else
12982   with_reentrant=no
12983 fi;
12984 echo "$as_me:12984: result: $with_reentrant" >&5
12985 echo "${ECHO_T}$with_reentrant" >&6
12986 if test "x$with_reentrant" = xyes ; then
12987         cf_cv_enable_reentrant=1
12988         cf_cv_enable_opaque="NCURSES_INTERNALS"
12989         NCURSES_OPAQUE=1
12990         NCURSES_SIZE_T=int
12991         if test "x$cf_cv_weak_symbols" = xyes ; then
12992
12993 # remove pthread library from $LIBS
12994 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12995
12996 cf_add_libs="-lpthread"
12997 # Filter out duplicates - this happens with badly-designed ".pc" files...
12998 for cf_add_1lib in $TEST_LIBS
12999 do
13000         for cf_add_2lib in $cf_add_libs
13001         do
13002                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13003                 then
13004                         cf_add_1lib=
13005                         break
13006                 fi
13007         done
13008         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13009 done
13010 TEST_LIBS="$cf_add_libs"
13011
13012 cf_add_libs="-lpthread"
13013 # Filter out duplicates - this happens with badly-designed ".pc" files...
13014 for cf_add_1lib in $TEST_LIBS2
13015 do
13016         for cf_add_2lib in $cf_add_libs
13017         do
13018                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13019                 then
13020                         cf_add_1lib=
13021                         break
13022                 fi
13023         done
13024         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13025 done
13026 TEST_LIBS2="$cf_add_libs"
13027
13028         else
13029                 # when not using weak symbols but with_reentrant,
13030                 # add 't' to the library suffix on all platforms
13031                 # except cygwin, where we only do that if ALSO
13032                 # compiling with full thread support.
13033                 case "$host" in
13034                 (*cygwin* | *msys*)
13035                         if test "$with_pthread" = "yes" ; then
13036                                 if test "x$disable_lib_suffixes" = "xno" ; then
13037                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13038                                 fi
13039                         fi ;;
13040                 (*)
13041                         if test "x$disable_lib_suffixes" = "xno" ; then
13042                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13043                         fi
13044                         ;;
13045                 esac
13046         fi
13047
13048 cat >>confdefs.h <<\EOF
13049 #define USE_REENTRANT 1
13050 EOF
13051
13052 if test "${with_abi_version+set}" != set; then
13053         case $cf_cv_rel_version in
13054         (5.*)
13055                 cf_cv_rel_version=6.0
13056                 cf_cv_abi_version=6
13057                 { echo "$as_me:13057: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13058 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13059                 ;;
13060         esac
13061 fi
13062
13063 else
13064         cf_cv_enable_reentrant=0
13065         cf_cv_enable_opaque="NCURSES_OPAQUE"
13066         NCURSES_OPAQUE=0
13067         NCURSES_SIZE_T=short
13068 fi
13069
13070 ### Allow using a different wrap-prefix
13071 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13072         echo "$as_me:13072: checking for prefix used to wrap public variables" >&5
13073 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13074
13075 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13076 if test "${with_wrap_prefix+set}" = set; then
13077   withval="$with_wrap_prefix"
13078   NCURSES_WRAP_PREFIX=$withval
13079 else
13080   NCURSES_WRAP_PREFIX=_nc_
13081 fi;
13082         echo "$as_me:13082: result: $NCURSES_WRAP_PREFIX" >&5
13083 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13084 else
13085         NCURSES_WRAP_PREFIX=_nc_
13086 fi
13087
13088 cat >>confdefs.h <<EOF
13089 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13090 EOF
13091
13092 echo "$as_me:13092: checking if you want experimental safe-sprintf code" >&5
13093 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13094
13095 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13096 if test "${enable_safe_sprintf+set}" = set; then
13097   enableval="$enable_safe_sprintf"
13098   with_safe_sprintf=$enableval
13099 else
13100   with_safe_sprintf=no
13101 fi;
13102 echo "$as_me:13102: result: $with_safe_sprintf" >&5
13103 echo "${ECHO_T}$with_safe_sprintf" >&6
13104 test "x$with_safe_sprintf" = xyes &&
13105 cat >>confdefs.h <<\EOF
13106 #define USE_SAFE_SPRINTF 1
13107 EOF
13108
13109 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13110 # when hashmap is used scroll hints are useless
13111 if test "$with_hashmap" = no ; then
13112 echo "$as_me:13112: checking if you want to experiment without scrolling-hints code" >&5
13113 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13114
13115 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13116 if test "${enable_scroll_hints+set}" = set; then
13117   enableval="$enable_scroll_hints"
13118   with_scroll_hints=$enableval
13119 else
13120   with_scroll_hints=yes
13121 fi;
13122 echo "$as_me:13122: result: $with_scroll_hints" >&5
13123 echo "${ECHO_T}$with_scroll_hints" >&6
13124 test "x$with_scroll_hints" = xyes &&
13125 cat >>confdefs.h <<\EOF
13126 #define USE_SCROLL_HINTS 1
13127 EOF
13128
13129 fi
13130
13131 echo "$as_me:13131: checking if you want wgetch-events code" >&5
13132 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13133
13134 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13135 if test "${enable_wgetch_events+set}" = set; then
13136   enableval="$enable_wgetch_events"
13137   with_wgetch_events=$enableval
13138 else
13139   with_wgetch_events=no
13140 fi;
13141 echo "$as_me:13141: result: $with_wgetch_events" >&5
13142 echo "${ECHO_T}$with_wgetch_events" >&6
13143 test "x$with_wgetch_events" = xyes &&
13144 cat >>confdefs.h <<\EOF
13145 #define NCURSES_WGETCH_EVENTS 1
13146 EOF
13147
13148 ###############################################################################
13149
13150 ###     use option --disable-echo to suppress full display compiling commands
13151
13152 echo "$as_me:13152: checking if you want to see long compiling messages" >&5
13153 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13154
13155 # Check whether --enable-echo or --disable-echo was given.
13156 if test "${enable_echo+set}" = set; then
13157   enableval="$enable_echo"
13158   test "$enableval" != no && enableval=yes
13159         if test "$enableval" != "yes" ; then
13160
13161         ECHO_LT='--silent'
13162         ECHO_LD='@echo linking $@;'
13163         RULE_CC='@echo compiling $<'
13164         SHOW_CC='@echo compiling $@'
13165         ECHO_CC='@'
13166
13167         else
13168
13169         ECHO_LT=''
13170         ECHO_LD=''
13171         RULE_CC=''
13172         SHOW_CC=''
13173         ECHO_CC=''
13174
13175         fi
13176 else
13177   enableval=yes
13178
13179         ECHO_LT=''
13180         ECHO_LD=''
13181         RULE_CC=''
13182         SHOW_CC=''
13183         ECHO_CC=''
13184
13185 fi;
13186 echo "$as_me:13186: result: $enableval" >&5
13187 echo "${ECHO_T}$enableval" >&6
13188
13189 if test "x$enable_echo" = xyes; then
13190         ECHO_LINK=
13191 else
13192         ECHO_LINK='@ echo linking $@ ... ;'
13193         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13194         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13195 fi
13196
13197 ###     use option --enable-warnings to turn on all gcc warnings
13198 echo "$as_me:13198: checking if you want to see compiler warnings" >&5
13199 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13200
13201 # Check whether --enable-warnings or --disable-warnings was given.
13202 if test "${enable_warnings+set}" = set; then
13203   enableval="$enable_warnings"
13204   with_warnings=$enableval
13205 fi;
13206 echo "$as_me:13206: result: $with_warnings" >&5
13207 echo "${ECHO_T}$with_warnings" >&6
13208
13209 if test "x$with_warnings" = "xyes"; then
13210
13211         ADAFLAGS="$ADAFLAGS -gnatg"
13212
13213 INTEL_COMPILER=no
13214
13215 if test "$GCC" = yes ; then
13216         case $host_os in
13217         (linux*|gnu*)
13218                 echo "$as_me:13218: checking if this is really Intel C compiler" >&5
13219 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13220                 cf_save_CFLAGS="$CFLAGS"
13221                 CFLAGS="$CFLAGS -no-gcc"
13222                 cat >conftest.$ac_ext <<_ACEOF
13223 #line 13223 "configure"
13224 #include "confdefs.h"
13225
13226 int
13227 main ()
13228 {
13229
13230 #ifdef __INTEL_COMPILER
13231 #else
13232 make an error
13233 #endif
13234
13235   ;
13236   return 0;
13237 }
13238 _ACEOF
13239 rm -f conftest.$ac_objext
13240 if { (eval echo "$as_me:13240: \"$ac_compile\"") >&5
13241   (eval $ac_compile) 2>&5
13242   ac_status=$?
13243   echo "$as_me:13243: \$? = $ac_status" >&5
13244   (exit $ac_status); } &&
13245          { ac_try='test -s conftest.$ac_objext'
13246   { (eval echo "$as_me:13246: \"$ac_try\"") >&5
13247   (eval $ac_try) 2>&5
13248   ac_status=$?
13249   echo "$as_me:13249: \$? = $ac_status" >&5
13250   (exit $ac_status); }; }; then
13251   INTEL_COMPILER=yes
13252 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13253
13254 else
13255   echo "$as_me: failed program was:" >&5
13256 cat conftest.$ac_ext >&5
13257 fi
13258 rm -f conftest.$ac_objext conftest.$ac_ext
13259                 CFLAGS="$cf_save_CFLAGS"
13260                 echo "$as_me:13260: result: $INTEL_COMPILER" >&5
13261 echo "${ECHO_T}$INTEL_COMPILER" >&6
13262                 ;;
13263         esac
13264 fi
13265
13266 CLANG_COMPILER=no
13267
13268 if test "$GCC" = yes ; then
13269         echo "$as_me:13269: checking if this is really Clang C compiler" >&5
13270 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13271         cf_save_CFLAGS="$CFLAGS"
13272         CFLAGS="$CFLAGS -Qunused-arguments"
13273         cat >conftest.$ac_ext <<_ACEOF
13274 #line 13274 "configure"
13275 #include "confdefs.h"
13276
13277 int
13278 main ()
13279 {
13280
13281 #ifdef __clang__
13282 #else
13283 make an error
13284 #endif
13285
13286   ;
13287   return 0;
13288 }
13289 _ACEOF
13290 rm -f conftest.$ac_objext
13291 if { (eval echo "$as_me:13291: \"$ac_compile\"") >&5
13292   (eval $ac_compile) 2>&5
13293   ac_status=$?
13294   echo "$as_me:13294: \$? = $ac_status" >&5
13295   (exit $ac_status); } &&
13296          { ac_try='test -s conftest.$ac_objext'
13297   { (eval echo "$as_me:13297: \"$ac_try\"") >&5
13298   (eval $ac_try) 2>&5
13299   ac_status=$?
13300   echo "$as_me:13300: \$? = $ac_status" >&5
13301   (exit $ac_status); }; }; then
13302   CLANG_COMPILER=yes
13303 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13304
13305 else
13306   echo "$as_me: failed program was:" >&5
13307 cat conftest.$ac_ext >&5
13308 fi
13309 rm -f conftest.$ac_objext conftest.$ac_ext
13310         CFLAGS="$cf_save_CFLAGS"
13311         echo "$as_me:13311: result: $CLANG_COMPILER" >&5
13312 echo "${ECHO_T}$CLANG_COMPILER" >&6
13313 fi
13314
13315 cat > conftest.$ac_ext <<EOF
13316 #line 13316 "${as_me:-configure}"
13317 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13318 EOF
13319
13320 if test "$INTEL_COMPILER" = yes
13321 then
13322 # The "-wdXXX" options suppress warnings:
13323 # remark #1419: external declaration in primary source file
13324 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13325 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13326 # remark #193: zero used for undefined preprocessing identifier
13327 # remark #593: variable "curs_sb_left_arrow" was set but never used
13328 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13329 # remark #869: parameter "tw" was never referenced
13330 # remark #981: operands are evaluated in unspecified order
13331 # warning #279: controlling expression is constant
13332
13333         { echo "$as_me:13333: checking for $CC warning options..." >&5
13334 echo "$as_me: checking for $CC warning options..." >&6;}
13335         cf_save_CFLAGS="$CFLAGS"
13336         EXTRA_CFLAGS="-Wall"
13337         for cf_opt in \
13338                 wd1419 \
13339                 wd1683 \
13340                 wd1684 \
13341                 wd193 \
13342                 wd593 \
13343                 wd279 \
13344                 wd810 \
13345                 wd869 \
13346                 wd981
13347         do
13348                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13349                 if { (eval echo "$as_me:13349: \"$ac_compile\"") >&5
13350   (eval $ac_compile) 2>&5
13351   ac_status=$?
13352   echo "$as_me:13352: \$? = $ac_status" >&5
13353   (exit $ac_status); }; then
13354                         test -n "$verbose" && echo "$as_me:13354: result: ... -$cf_opt" >&5
13355 echo "${ECHO_T}... -$cf_opt" >&6
13356                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13357                 fi
13358         done
13359         CFLAGS="$cf_save_CFLAGS"
13360
13361 elif test "$GCC" = yes
13362 then
13363         { echo "$as_me:13363: checking for $CC warning options..." >&5
13364 echo "$as_me: checking for $CC warning options..." >&6;}
13365         cf_save_CFLAGS="$CFLAGS"
13366         EXTRA_CFLAGS=
13367         cf_warn_CONST=""
13368         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13369         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13370         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13371         for cf_opt in W Wall \
13372                 Wbad-function-cast \
13373                 Wcast-align \
13374                 Wcast-qual \
13375                 Wdeclaration-after-statement \
13376                 Wextra \
13377                 Winline \
13378                 Wmissing-declarations \
13379                 Wmissing-prototypes \
13380                 Wnested-externs \
13381                 Wpointer-arith \
13382                 Wshadow \
13383                 Wstrict-prototypes \
13384                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13385         do
13386                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13387                 if { (eval echo "$as_me:13387: \"$ac_compile\"") >&5
13388   (eval $ac_compile) 2>&5
13389   ac_status=$?
13390   echo "$as_me:13390: \$? = $ac_status" >&5
13391   (exit $ac_status); }; then
13392                         test -n "$verbose" && echo "$as_me:13392: result: ... -$cf_opt" >&5
13393 echo "${ECHO_T}... -$cf_opt" >&6
13394                         case $cf_opt in
13395                         (Wcast-qual)
13396                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13397                                 ;;
13398                         (Winline)
13399                                 case $GCC_VERSION in
13400                                 ([34].*)
13401                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13402
13403 echo "${as_me:-configure}:13403: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13404
13405                                         continue;;
13406                                 esac
13407                                 ;;
13408                         (Wpointer-arith)
13409                                 case $GCC_VERSION in
13410                                 ([12].*)
13411                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13412
13413 echo "${as_me:-configure}:13413: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13414
13415                                         continue;;
13416                                 esac
13417                                 ;;
13418                         esac
13419                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13420                 fi
13421         done
13422         CFLAGS="$cf_save_CFLAGS"
13423 fi
13424 rm -rf conftest*
13425
13426         if test "x$cf_with_cxx" = xyes ; then
13427
13428 INTEL_CPLUSPLUS=no
13429
13430 if test "$GCC" = yes ; then
13431         case $host_os in
13432         (linux*|gnu*)
13433                 echo "$as_me:13433: checking if this is really Intel C++ compiler" >&5
13434 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13435                 cf_save_CFLAGS="$CXXFLAGS"
13436                 CXXFLAGS="$CXXFLAGS -no-gcc"
13437                 cat >conftest.$ac_ext <<_ACEOF
13438 #line 13438 "configure"
13439 #include "confdefs.h"
13440
13441 int
13442 main ()
13443 {
13444
13445 #ifdef __INTEL_COMPILER
13446 #else
13447 make an error
13448 #endif
13449
13450   ;
13451   return 0;
13452 }
13453 _ACEOF
13454 rm -f conftest.$ac_objext
13455 if { (eval echo "$as_me:13455: \"$ac_compile\"") >&5
13456   (eval $ac_compile) 2>&5
13457   ac_status=$?
13458   echo "$as_me:13458: \$? = $ac_status" >&5
13459   (exit $ac_status); } &&
13460          { ac_try='test -s conftest.$ac_objext'
13461   { (eval echo "$as_me:13461: \"$ac_try\"") >&5
13462   (eval $ac_try) 2>&5
13463   ac_status=$?
13464   echo "$as_me:13464: \$? = $ac_status" >&5
13465   (exit $ac_status); }; }; then
13466   INTEL_CPLUSPLUS=yes
13467 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13468
13469 else
13470   echo "$as_me: failed program was:" >&5
13471 cat conftest.$ac_ext >&5
13472 fi
13473 rm -f conftest.$ac_objext conftest.$ac_ext
13474                 CXXFLAGS="$cf_save_CFLAGS"
13475                 echo "$as_me:13475: result: $INTEL_CPLUSPLUS" >&5
13476 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13477                 ;;
13478         esac
13479 fi
13480
13481 CLANG_CPLUSPLUS=no
13482
13483 if test "$GCC" = yes ; then
13484         echo "$as_me:13484: checking if this is really Clang C++ compiler" >&5
13485 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13486         cf_save_CFLAGS="$CXXFLAGS"
13487         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13488         cat >conftest.$ac_ext <<_ACEOF
13489 #line 13489 "configure"
13490 #include "confdefs.h"
13491
13492 int
13493 main ()
13494 {
13495
13496 #ifdef __clang__
13497 #else
13498 make an error
13499 #endif
13500
13501   ;
13502   return 0;
13503 }
13504 _ACEOF
13505 rm -f conftest.$ac_objext
13506 if { (eval echo "$as_me:13506: \"$ac_compile\"") >&5
13507   (eval $ac_compile) 2>&5
13508   ac_status=$?
13509   echo "$as_me:13509: \$? = $ac_status" >&5
13510   (exit $ac_status); } &&
13511          { ac_try='test -s conftest.$ac_objext'
13512   { (eval echo "$as_me:13512: \"$ac_try\"") >&5
13513   (eval $ac_try) 2>&5
13514   ac_status=$?
13515   echo "$as_me:13515: \$? = $ac_status" >&5
13516   (exit $ac_status); }; }; then
13517   CLANG_CPLUSPLUS=yes
13518 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13519
13520 else
13521   echo "$as_me: failed program was:" >&5
13522 cat conftest.$ac_ext >&5
13523 fi
13524 rm -f conftest.$ac_objext conftest.$ac_ext
13525         CXXFLAGS="$cf_save_CFLAGS"
13526         echo "$as_me:13526: result: $CLANG_CPLUSPLUS" >&5
13527 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13528 fi
13529
13530 ac_ext=cc
13531 ac_cpp='$CXXCPP $CPPFLAGS'
13532 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13533 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13534 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13535 ac_main_return=return
13536
13537 cat > conftest.$ac_ext <<EOF
13538 #line 13538 "configure"
13539 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13540 EOF
13541
13542 if test "$INTEL_CPLUSPLUS" = yes
13543 then
13544 # The "-wdXXX" options suppress warnings:
13545 # remark #1419: external declaration in primary source file
13546 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13547 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13548 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13549 # remark #193: zero used for undefined preprocessing identifier
13550 # remark #593: variable "curs_sb_left_arrow" was set but never used
13551 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13552 # remark #869: parameter "tw" was never referenced
13553 # remark #981: operands are evaluated in unspecified order
13554 # warning #269: invalid format string conversion
13555
13556         { echo "$as_me:13556: checking for $CC warning options..." >&5
13557 echo "$as_me: checking for $CC warning options..." >&6;}
13558         cf_save_CXXFLAGS="$CXXFLAGS"
13559         EXTRA_CXXFLAGS="-Wall"
13560         for cf_opt in \
13561                 wd1419 \
13562                 wd1682 \
13563                 wd1683 \
13564                 wd1684 \
13565                 wd193 \
13566                 wd279 \
13567                 wd593 \
13568                 wd810 \
13569                 wd869 \
13570                 wd981
13571         do
13572                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13573                 if { (eval echo "$as_me:13573: \"$ac_compile\"") >&5
13574   (eval $ac_compile) 2>&5
13575   ac_status=$?
13576   echo "$as_me:13576: \$? = $ac_status" >&5
13577   (exit $ac_status); }; then
13578                         test -n "$verbose" && echo "$as_me:13578: result: ... -$cf_opt" >&5
13579 echo "${ECHO_T}... -$cf_opt" >&6
13580                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13581                 fi
13582         done
13583         CXXFLAGS="$cf_save_CXXFLAGS"
13584
13585 elif test "$GXX" = yes
13586 then
13587         { echo "$as_me:13587: checking for $CXX warning options..." >&5
13588 echo "$as_me: checking for $CXX warning options..." >&6;}
13589         cf_save_CXXFLAGS="$CXXFLAGS"
13590         EXTRA_CXXFLAGS="-W -Wall"
13591         cf_gxx_extra_warnings=""
13592         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13593         case "$GCC_VERSION" in
13594         ([1-2].*)
13595                 ;;
13596         (*)
13597                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13598                 ;;
13599         esac
13600         for cf_opt in \
13601                 Wabi \
13602                 fabi-version=0 \
13603                 Wextra \
13604                 Wignored-qualifiers \
13605                 Wlogical-op \
13606                 Woverloaded-virtual \
13607                 Wsign-promo \
13608                 Wsynth \
13609                 Wold-style-cast \
13610                 Wcast-align \
13611                 Wcast-qual \
13612                 Wpointer-arith \
13613                 Wshadow \
13614                 Wundef $cf_gxx_extra_warnings Wno-unused
13615         do
13616                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13617                 if { (eval echo "$as_me:13617: \"$ac_compile\"") >&5
13618   (eval $ac_compile) 2>&5
13619   ac_status=$?
13620   echo "$as_me:13620: \$? = $ac_status" >&5
13621   (exit $ac_status); }; then
13622                         test -n "$verbose" && echo "$as_me:13622: result: ... -$cf_opt" >&5
13623 echo "${ECHO_T}... -$cf_opt" >&6
13624                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13625                 else
13626                         test -n "$verbose" && echo "$as_me:13626: result: ... no -$cf_opt" >&5
13627 echo "${ECHO_T}... no -$cf_opt" >&6
13628                 fi
13629         done
13630         CXXFLAGS="$cf_save_CXXFLAGS"
13631 fi
13632
13633 rm -rf conftest*
13634 ac_ext=c
13635 ac_cpp='$CPP $CPPFLAGS'
13636 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13637 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13638 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13639 ac_main_return=return
13640
13641         fi
13642 fi
13643
13644 if test "$GCC" = yes
13645 then
13646 cat > conftest.i <<EOF
13647 #ifndef GCC_PRINTF
13648 #define GCC_PRINTF 0
13649 #endif
13650 #ifndef GCC_SCANF
13651 #define GCC_SCANF 0
13652 #endif
13653 #ifndef GCC_NORETURN
13654 #define GCC_NORETURN /* nothing */
13655 #endif
13656 #ifndef GCC_UNUSED
13657 #define GCC_UNUSED /* nothing */
13658 #endif
13659 EOF
13660 if test "$GCC" = yes
13661 then
13662         { echo "$as_me:13662: checking for $CC __attribute__ directives..." >&5
13663 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13664 cat > conftest.$ac_ext <<EOF
13665 #line 13665 "${as_me:-configure}"
13666 #include "confdefs.h"
13667 #include "conftest.h"
13668 #include "conftest.i"
13669 #if     GCC_PRINTF
13670 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13671 #else
13672 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13673 #endif
13674 #if     GCC_SCANF
13675 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13676 #else
13677 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13678 #endif
13679 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13680 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13681 extern void foo(void) GCC_NORETURN;
13682 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13683 EOF
13684         cf_printf_attribute=no
13685         cf_scanf_attribute=no
13686         for cf_attribute in scanf printf unused noreturn
13687         do
13688
13689 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13690
13691                 cf_directive="__attribute__(($cf_attribute))"
13692                 echo "checking for $CC $cf_directive" 1>&5
13693
13694                 case $cf_attribute in
13695                 (printf)
13696                         cf_printf_attribute=yes
13697                         cat >conftest.h <<EOF
13698 #define GCC_$cf_ATTRIBUTE 1
13699 EOF
13700                         ;;
13701                 (scanf)
13702                         cf_scanf_attribute=yes
13703                         cat >conftest.h <<EOF
13704 #define GCC_$cf_ATTRIBUTE 1
13705 EOF
13706                         ;;
13707                 (*)
13708                         cat >conftest.h <<EOF
13709 #define GCC_$cf_ATTRIBUTE $cf_directive
13710 EOF
13711                         ;;
13712                 esac
13713
13714                 if { (eval echo "$as_me:13714: \"$ac_compile\"") >&5
13715   (eval $ac_compile) 2>&5
13716   ac_status=$?
13717   echo "$as_me:13717: \$? = $ac_status" >&5
13718   (exit $ac_status); }; then
13719                         test -n "$verbose" && echo "$as_me:13719: result: ... $cf_attribute" >&5
13720 echo "${ECHO_T}... $cf_attribute" >&6
13721                         cat conftest.h >>confdefs.h
13722                         case $cf_attribute in
13723                         (noreturn)
13724
13725 cat >>confdefs.h <<EOF
13726 #define GCC_NORETURN $cf_directive
13727 EOF
13728
13729                                 ;;
13730                         (printf)
13731                                 cf_value='/* nothing */'
13732                                 if test "$cf_printf_attribute" != no ; then
13733                                         cf_value='__attribute__((format(printf,fmt,var)))'
13734
13735 cat >>confdefs.h <<\EOF
13736 #define GCC_PRINTF 1
13737 EOF
13738
13739                                 fi
13740
13741 cat >>confdefs.h <<EOF
13742 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13743 EOF
13744
13745                                 ;;
13746                         (scanf)
13747                                 cf_value='/* nothing */'
13748                                 if test "$cf_scanf_attribute" != no ; then
13749                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13750
13751 cat >>confdefs.h <<\EOF
13752 #define GCC_SCANF 1
13753 EOF
13754
13755                                 fi
13756
13757 cat >>confdefs.h <<EOF
13758 #define GCC_SCANFLIKE(fmt,var) $cf_value
13759 EOF
13760
13761                                 ;;
13762                         (unused)
13763
13764 cat >>confdefs.h <<EOF
13765 #define GCC_UNUSED $cf_directive
13766 EOF
13767
13768                                 ;;
13769                         esac
13770                 fi
13771         done
13772 else
13773         fgrep define conftest.i >>confdefs.h
13774 fi
13775 rm -rf conftest*
13776 fi
13777
13778 echo "$as_me:13778: checking if you want to work around bogus compiler/loader warnings" >&5
13779 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13780
13781 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13782 if test "${enable_string_hacks+set}" = set; then
13783   enableval="$enable_string_hacks"
13784   with_string_hacks=$enableval
13785 else
13786   with_string_hacks=no
13787 fi;
13788 echo "$as_me:13788: result: $with_string_hacks" >&5
13789 echo "${ECHO_T}$with_string_hacks" >&6
13790
13791 if test "x$with_string_hacks" = "xyes"; then
13792
13793 cat >>confdefs.h <<\EOF
13794 #define USE_STRING_HACKS 1
13795 EOF
13796
13797         { echo "$as_me:13797: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13798 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13799
13800 for ac_func in strlcat strlcpy snprintf
13801 do
13802 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13803 echo "$as_me:13803: checking for $ac_func" >&5
13804 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13805 if eval "test \"\${$as_ac_var+set}\" = set"; then
13806   echo $ECHO_N "(cached) $ECHO_C" >&6
13807 else
13808   cat >conftest.$ac_ext <<_ACEOF
13809 #line 13809 "configure"
13810 #include "confdefs.h"
13811 /* System header to define __stub macros and hopefully few prototypes,
13812     which can conflict with char $ac_func (); below.  */
13813 #include <assert.h>
13814 /* Override any gcc2 internal prototype to avoid an error.  */
13815 #ifdef __cplusplus
13816 extern "C"
13817 #endif
13818 /* We use char because int might match the return type of a gcc2
13819    builtin and then its argument prototype would still apply.  */
13820 char $ac_func ();
13821 char (*f) ();
13822
13823 int
13824 main ()
13825 {
13826 /* The GNU C library defines this for functions which it implements
13827     to always fail with ENOSYS.  Some functions are actually named
13828     something starting with __ and the normal name is an alias.  */
13829 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13830 choke me
13831 #else
13832 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13833 #endif
13834
13835   ;
13836   return 0;
13837 }
13838 _ACEOF
13839 rm -f conftest.$ac_objext conftest$ac_exeext
13840 if { (eval echo "$as_me:13840: \"$ac_link\"") >&5
13841   (eval $ac_link) 2>&5
13842   ac_status=$?
13843   echo "$as_me:13843: \$? = $ac_status" >&5
13844   (exit $ac_status); } &&
13845          { ac_try='test -s conftest$ac_exeext'
13846   { (eval echo "$as_me:13846: \"$ac_try\"") >&5
13847   (eval $ac_try) 2>&5
13848   ac_status=$?
13849   echo "$as_me:13849: \$? = $ac_status" >&5
13850   (exit $ac_status); }; }; then
13851   eval "$as_ac_var=yes"
13852 else
13853   echo "$as_me: failed program was:" >&5
13854 cat conftest.$ac_ext >&5
13855 eval "$as_ac_var=no"
13856 fi
13857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13858 fi
13859 echo "$as_me:13859: result: `eval echo '${'$as_ac_var'}'`" >&5
13860 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13861 if test `eval echo '${'$as_ac_var'}'` = yes; then
13862   cat >>confdefs.h <<EOF
13863 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13864 EOF
13865
13866 fi
13867 done
13868
13869 fi
13870
13871 ###     use option --enable-assertions to turn on generation of assertion code
13872 echo "$as_me:13872: checking if you want to enable runtime assertions" >&5
13873 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13874
13875 # Check whether --enable-assertions or --disable-assertions was given.
13876 if test "${enable_assertions+set}" = set; then
13877   enableval="$enable_assertions"
13878   with_assertions=$enableval
13879 else
13880   with_assertions=no
13881 fi;
13882 echo "$as_me:13882: result: $with_assertions" >&5
13883 echo "${ECHO_T}$with_assertions" >&6
13884 if test -n "$GCC"
13885 then
13886         if test "$with_assertions" = no
13887         then
13888                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13889         else
13890
13891         ADAFLAGS="$ADAFLAGS -gnata"
13892
13893         fi
13894 fi
13895
13896 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13897
13898 echo "$as_me:13898: checking if you want to use dmalloc for testing" >&5
13899 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13900
13901 # Check whether --with-dmalloc or --without-dmalloc was given.
13902 if test "${with_dmalloc+set}" = set; then
13903   withval="$with_dmalloc"
13904
13905 cat >>confdefs.h <<EOF
13906 #define USE_DMALLOC 1
13907 EOF
13908
13909         : ${with_cflags:=-g}
13910         : ${with_no_leaks:=yes}
13911          with_dmalloc=yes
13912 else
13913   with_dmalloc=
13914 fi;
13915 echo "$as_me:13915: result: ${with_dmalloc:-no}" >&5
13916 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13917
13918 case .$with_cflags in
13919 (.*-g*)
13920         case .$CFLAGS in
13921         (.*-g*)
13922                 ;;
13923         (*)
13924
13925 cf_fix_cppflags=no
13926 cf_new_cflags=
13927 cf_new_cppflags=
13928 cf_new_extra_cppflags=
13929
13930 for cf_add_cflags in -g
13931 do
13932 case $cf_fix_cppflags in
13933 (no)
13934         case $cf_add_cflags in
13935         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13936                 case $cf_add_cflags in
13937                 (-D*)
13938                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13939
13940                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13941                                 && test -z "${cf_tst_cflags}" \
13942                                 && cf_fix_cppflags=yes
13943
13944                         if test $cf_fix_cppflags = yes ; then
13945                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13946                                 continue
13947                         elif test "${cf_tst_cflags}" = "\"'" ; then
13948                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13949                                 continue
13950                         fi
13951                         ;;
13952                 esac
13953                 case "$CPPFLAGS" in
13954                 (*$cf_add_cflags)
13955                         ;;
13956                 (*)
13957                         case $cf_add_cflags in
13958                         (-D*)
13959                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13960
13961 CPPFLAGS=`echo "$CPPFLAGS" | \
13962         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13963                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13964
13965                                 ;;
13966                         esac
13967                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13968                         ;;
13969                 esac
13970                 ;;
13971         (*)
13972                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13973                 ;;
13974         esac
13975         ;;
13976 (yes)
13977         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13978
13979         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13980
13981         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13982                 && test -z "${cf_tst_cflags}" \
13983                 && cf_fix_cppflags=no
13984         ;;
13985 esac
13986 done
13987
13988 if test -n "$cf_new_cflags" ; then
13989
13990         CFLAGS="$CFLAGS $cf_new_cflags"
13991 fi
13992
13993 if test -n "$cf_new_cppflags" ; then
13994
13995         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13996 fi
13997
13998 if test -n "$cf_new_extra_cppflags" ; then
13999
14000         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14001 fi
14002
14003                 ;;
14004         esac
14005         ;;
14006 esac
14007
14008 if test "$with_dmalloc" = yes ; then
14009         echo "$as_me:14009: checking for dmalloc.h" >&5
14010 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14011 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14012   echo $ECHO_N "(cached) $ECHO_C" >&6
14013 else
14014   cat >conftest.$ac_ext <<_ACEOF
14015 #line 14015 "configure"
14016 #include "confdefs.h"
14017 #include <dmalloc.h>
14018 _ACEOF
14019 if { (eval echo "$as_me:14019: \"$ac_cpp conftest.$ac_ext\"") >&5
14020   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14021   ac_status=$?
14022   egrep -v '^ *\+' conftest.er1 >conftest.err
14023   rm -f conftest.er1
14024   cat conftest.err >&5
14025   echo "$as_me:14025: \$? = $ac_status" >&5
14026   (exit $ac_status); } >/dev/null; then
14027   if test -s conftest.err; then
14028     ac_cpp_err=$ac_c_preproc_warn_flag
14029   else
14030     ac_cpp_err=
14031   fi
14032 else
14033   ac_cpp_err=yes
14034 fi
14035 if test -z "$ac_cpp_err"; then
14036   ac_cv_header_dmalloc_h=yes
14037 else
14038   echo "$as_me: failed program was:" >&5
14039   cat conftest.$ac_ext >&5
14040   ac_cv_header_dmalloc_h=no
14041 fi
14042 rm -f conftest.err conftest.$ac_ext
14043 fi
14044 echo "$as_me:14044: result: $ac_cv_header_dmalloc_h" >&5
14045 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14046 if test $ac_cv_header_dmalloc_h = yes; then
14047
14048 echo "$as_me:14048: checking for dmalloc_debug in -ldmalloc" >&5
14049 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14050 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14051   echo $ECHO_N "(cached) $ECHO_C" >&6
14052 else
14053   ac_check_lib_save_LIBS=$LIBS
14054 LIBS="-ldmalloc  $LIBS"
14055 cat >conftest.$ac_ext <<_ACEOF
14056 #line 14056 "configure"
14057 #include "confdefs.h"
14058
14059 /* Override any gcc2 internal prototype to avoid an error.  */
14060 #ifdef __cplusplus
14061 extern "C"
14062 #endif
14063 /* We use char because int might match the return type of a gcc2
14064    builtin and then its argument prototype would still apply.  */
14065 char dmalloc_debug ();
14066 int
14067 main ()
14068 {
14069 dmalloc_debug ();
14070   ;
14071   return 0;
14072 }
14073 _ACEOF
14074 rm -f conftest.$ac_objext conftest$ac_exeext
14075 if { (eval echo "$as_me:14075: \"$ac_link\"") >&5
14076   (eval $ac_link) 2>&5
14077   ac_status=$?
14078   echo "$as_me:14078: \$? = $ac_status" >&5
14079   (exit $ac_status); } &&
14080          { ac_try='test -s conftest$ac_exeext'
14081   { (eval echo "$as_me:14081: \"$ac_try\"") >&5
14082   (eval $ac_try) 2>&5
14083   ac_status=$?
14084   echo "$as_me:14084: \$? = $ac_status" >&5
14085   (exit $ac_status); }; }; then
14086   ac_cv_lib_dmalloc_dmalloc_debug=yes
14087 else
14088   echo "$as_me: failed program was:" >&5
14089 cat conftest.$ac_ext >&5
14090 ac_cv_lib_dmalloc_dmalloc_debug=no
14091 fi
14092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14093 LIBS=$ac_check_lib_save_LIBS
14094 fi
14095 echo "$as_me:14095: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14096 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14097 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14098   cat >>confdefs.h <<EOF
14099 #define HAVE_LIBDMALLOC 1
14100 EOF
14101
14102   LIBS="-ldmalloc $LIBS"
14103
14104 fi
14105
14106 fi
14107
14108 fi
14109
14110 echo "$as_me:14110: checking if you want to use dbmalloc for testing" >&5
14111 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14112
14113 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14114 if test "${with_dbmalloc+set}" = set; then
14115   withval="$with_dbmalloc"
14116
14117 cat >>confdefs.h <<EOF
14118 #define USE_DBMALLOC 1
14119 EOF
14120
14121         : ${with_cflags:=-g}
14122         : ${with_no_leaks:=yes}
14123          with_dbmalloc=yes
14124 else
14125   with_dbmalloc=
14126 fi;
14127 echo "$as_me:14127: result: ${with_dbmalloc:-no}" >&5
14128 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14129
14130 case .$with_cflags in
14131 (.*-g*)
14132         case .$CFLAGS in
14133         (.*-g*)
14134                 ;;
14135         (*)
14136
14137 cf_fix_cppflags=no
14138 cf_new_cflags=
14139 cf_new_cppflags=
14140 cf_new_extra_cppflags=
14141
14142 for cf_add_cflags in -g
14143 do
14144 case $cf_fix_cppflags in
14145 (no)
14146         case $cf_add_cflags in
14147         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14148                 case $cf_add_cflags in
14149                 (-D*)
14150                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14151
14152                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14153                                 && test -z "${cf_tst_cflags}" \
14154                                 && cf_fix_cppflags=yes
14155
14156                         if test $cf_fix_cppflags = yes ; then
14157                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14158                                 continue
14159                         elif test "${cf_tst_cflags}" = "\"'" ; then
14160                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14161                                 continue
14162                         fi
14163                         ;;
14164                 esac
14165                 case "$CPPFLAGS" in
14166                 (*$cf_add_cflags)
14167                         ;;
14168                 (*)
14169                         case $cf_add_cflags in
14170                         (-D*)
14171                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14172
14173 CPPFLAGS=`echo "$CPPFLAGS" | \
14174         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14175                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14176
14177                                 ;;
14178                         esac
14179                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14180                         ;;
14181                 esac
14182                 ;;
14183         (*)
14184                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14185                 ;;
14186         esac
14187         ;;
14188 (yes)
14189         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14190
14191         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14192
14193         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14194                 && test -z "${cf_tst_cflags}" \
14195                 && cf_fix_cppflags=no
14196         ;;
14197 esac
14198 done
14199
14200 if test -n "$cf_new_cflags" ; then
14201
14202         CFLAGS="$CFLAGS $cf_new_cflags"
14203 fi
14204
14205 if test -n "$cf_new_cppflags" ; then
14206
14207         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14208 fi
14209
14210 if test -n "$cf_new_extra_cppflags" ; then
14211
14212         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14213 fi
14214
14215                 ;;
14216         esac
14217         ;;
14218 esac
14219
14220 if test "$with_dbmalloc" = yes ; then
14221         echo "$as_me:14221: checking for dbmalloc.h" >&5
14222 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14223 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14224   echo $ECHO_N "(cached) $ECHO_C" >&6
14225 else
14226   cat >conftest.$ac_ext <<_ACEOF
14227 #line 14227 "configure"
14228 #include "confdefs.h"
14229 #include <dbmalloc.h>
14230 _ACEOF
14231 if { (eval echo "$as_me:14231: \"$ac_cpp conftest.$ac_ext\"") >&5
14232   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14233   ac_status=$?
14234   egrep -v '^ *\+' conftest.er1 >conftest.err
14235   rm -f conftest.er1
14236   cat conftest.err >&5
14237   echo "$as_me:14237: \$? = $ac_status" >&5
14238   (exit $ac_status); } >/dev/null; then
14239   if test -s conftest.err; then
14240     ac_cpp_err=$ac_c_preproc_warn_flag
14241   else
14242     ac_cpp_err=
14243   fi
14244 else
14245   ac_cpp_err=yes
14246 fi
14247 if test -z "$ac_cpp_err"; then
14248   ac_cv_header_dbmalloc_h=yes
14249 else
14250   echo "$as_me: failed program was:" >&5
14251   cat conftest.$ac_ext >&5
14252   ac_cv_header_dbmalloc_h=no
14253 fi
14254 rm -f conftest.err conftest.$ac_ext
14255 fi
14256 echo "$as_me:14256: result: $ac_cv_header_dbmalloc_h" >&5
14257 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14258 if test $ac_cv_header_dbmalloc_h = yes; then
14259
14260 echo "$as_me:14260: checking for debug_malloc in -ldbmalloc" >&5
14261 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14262 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14263   echo $ECHO_N "(cached) $ECHO_C" >&6
14264 else
14265   ac_check_lib_save_LIBS=$LIBS
14266 LIBS="-ldbmalloc  $LIBS"
14267 cat >conftest.$ac_ext <<_ACEOF
14268 #line 14268 "configure"
14269 #include "confdefs.h"
14270
14271 /* Override any gcc2 internal prototype to avoid an error.  */
14272 #ifdef __cplusplus
14273 extern "C"
14274 #endif
14275 /* We use char because int might match the return type of a gcc2
14276    builtin and then its argument prototype would still apply.  */
14277 char debug_malloc ();
14278 int
14279 main ()
14280 {
14281 debug_malloc ();
14282   ;
14283   return 0;
14284 }
14285 _ACEOF
14286 rm -f conftest.$ac_objext conftest$ac_exeext
14287 if { (eval echo "$as_me:14287: \"$ac_link\"") >&5
14288   (eval $ac_link) 2>&5
14289   ac_status=$?
14290   echo "$as_me:14290: \$? = $ac_status" >&5
14291   (exit $ac_status); } &&
14292          { ac_try='test -s conftest$ac_exeext'
14293   { (eval echo "$as_me:14293: \"$ac_try\"") >&5
14294   (eval $ac_try) 2>&5
14295   ac_status=$?
14296   echo "$as_me:14296: \$? = $ac_status" >&5
14297   (exit $ac_status); }; }; then
14298   ac_cv_lib_dbmalloc_debug_malloc=yes
14299 else
14300   echo "$as_me: failed program was:" >&5
14301 cat conftest.$ac_ext >&5
14302 ac_cv_lib_dbmalloc_debug_malloc=no
14303 fi
14304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14305 LIBS=$ac_check_lib_save_LIBS
14306 fi
14307 echo "$as_me:14307: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14308 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14309 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14310   cat >>confdefs.h <<EOF
14311 #define HAVE_LIBDBMALLOC 1
14312 EOF
14313
14314   LIBS="-ldbmalloc $LIBS"
14315
14316 fi
14317
14318 fi
14319
14320 fi
14321
14322 echo "$as_me:14322: checking if you want to use valgrind for testing" >&5
14323 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14324
14325 # Check whether --with-valgrind or --without-valgrind was given.
14326 if test "${with_valgrind+set}" = set; then
14327   withval="$with_valgrind"
14328
14329 cat >>confdefs.h <<EOF
14330 #define USE_VALGRIND 1
14331 EOF
14332
14333         : ${with_cflags:=-g}
14334         : ${with_no_leaks:=yes}
14335          with_valgrind=yes
14336 else
14337   with_valgrind=
14338 fi;
14339 echo "$as_me:14339: result: ${with_valgrind:-no}" >&5
14340 echo "${ECHO_T}${with_valgrind:-no}" >&6
14341
14342 case .$with_cflags in
14343 (.*-g*)
14344         case .$CFLAGS in
14345         (.*-g*)
14346                 ;;
14347         (*)
14348
14349 cf_fix_cppflags=no
14350 cf_new_cflags=
14351 cf_new_cppflags=
14352 cf_new_extra_cppflags=
14353
14354 for cf_add_cflags in -g
14355 do
14356 case $cf_fix_cppflags in
14357 (no)
14358         case $cf_add_cflags in
14359         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14360                 case $cf_add_cflags in
14361                 (-D*)
14362                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14363
14364                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14365                                 && test -z "${cf_tst_cflags}" \
14366                                 && cf_fix_cppflags=yes
14367
14368                         if test $cf_fix_cppflags = yes ; then
14369                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14370                                 continue
14371                         elif test "${cf_tst_cflags}" = "\"'" ; then
14372                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14373                                 continue
14374                         fi
14375                         ;;
14376                 esac
14377                 case "$CPPFLAGS" in
14378                 (*$cf_add_cflags)
14379                         ;;
14380                 (*)
14381                         case $cf_add_cflags in
14382                         (-D*)
14383                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14384
14385 CPPFLAGS=`echo "$CPPFLAGS" | \
14386         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14387                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14388
14389                                 ;;
14390                         esac
14391                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14392                         ;;
14393                 esac
14394                 ;;
14395         (*)
14396                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14397                 ;;
14398         esac
14399         ;;
14400 (yes)
14401         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14402
14403         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14404
14405         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14406                 && test -z "${cf_tst_cflags}" \
14407                 && cf_fix_cppflags=no
14408         ;;
14409 esac
14410 done
14411
14412 if test -n "$cf_new_cflags" ; then
14413
14414         CFLAGS="$CFLAGS $cf_new_cflags"
14415 fi
14416
14417 if test -n "$cf_new_cppflags" ; then
14418
14419         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14420 fi
14421
14422 if test -n "$cf_new_extra_cppflags" ; then
14423
14424         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14425 fi
14426
14427                 ;;
14428         esac
14429         ;;
14430 esac
14431
14432 echo "$as_me:14432: checking if you want to perform memory-leak testing" >&5
14433 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14434
14435 # Check whether --enable-leaks or --disable-leaks was given.
14436 if test "${enable_leaks+set}" = set; then
14437   enableval="$enable_leaks"
14438   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14439 else
14440   : ${with_no_leaks:=no}
14441 fi;
14442 echo "$as_me:14442: result: $with_no_leaks" >&5
14443 echo "${ECHO_T}$with_no_leaks" >&6
14444
14445 if test "$with_no_leaks" = yes ; then
14446
14447 cat >>confdefs.h <<\EOF
14448 #define NO_LEAKS 1
14449 EOF
14450
14451 cat >>confdefs.h <<\EOF
14452 #define YY_NO_LEAKS 1
14453 EOF
14454
14455 fi
14456
14457 cat >>confdefs.h <<\EOF
14458 #define HAVE_NC_ALLOC_H 1
14459 EOF
14460
14461 ###     use option --enable-expanded to generate certain macros as functions
14462
14463 # Check whether --enable-expanded or --disable-expanded was given.
14464 if test "${enable_expanded+set}" = set; then
14465   enableval="$enable_expanded"
14466   test "x$enableval" = xyes &&
14467 cat >>confdefs.h <<\EOF
14468 #define NCURSES_EXPANDED 1
14469 EOF
14470
14471 fi;
14472
14473 ###     use option --disable-macros to suppress macros in favor of functions
14474
14475 # Check whether --enable-macros or --disable-macros was given.
14476 if test "${enable_macros+set}" = set; then
14477   enableval="$enable_macros"
14478   test "$enableval" = no &&
14479 cat >>confdefs.h <<\EOF
14480 #define NCURSES_NOMACROS 1
14481 EOF
14482
14483 fi;
14484
14485 # Normally we only add trace() to the debug-library.  Allow this to be
14486 # extended to all models of the ncurses library:
14487 cf_all_traces=no
14488 case "$CFLAGS $CPPFLAGS" in
14489 (*-DTRACE*)
14490         cf_all_traces=yes
14491         ;;
14492 esac
14493
14494 echo "$as_me:14494: checking whether to add trace feature to all models" >&5
14495 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14496
14497 # Check whether --with-trace or --without-trace was given.
14498 if test "${with_trace+set}" = set; then
14499   withval="$with_trace"
14500   cf_with_trace=$withval
14501 else
14502   cf_with_trace=$cf_all_traces
14503 fi;
14504 echo "$as_me:14504: result: $cf_with_trace" >&5
14505 echo "${ECHO_T}$cf_with_trace" >&6
14506
14507 if test "x$cf_with_trace" = xyes ; then
14508         LIB_TRACING=all
14509         ADA_TRACE=TRUE
14510
14511 cf_fix_cppflags=no
14512 cf_new_cflags=
14513 cf_new_cppflags=
14514 cf_new_extra_cppflags=
14515
14516 for cf_add_cflags in -DTRACE
14517 do
14518 case $cf_fix_cppflags in
14519 (no)
14520         case $cf_add_cflags in
14521         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14522                 case $cf_add_cflags in
14523                 (-D*)
14524                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14525
14526                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14527                                 && test -z "${cf_tst_cflags}" \
14528                                 && cf_fix_cppflags=yes
14529
14530                         if test $cf_fix_cppflags = yes ; then
14531                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14532                                 continue
14533                         elif test "${cf_tst_cflags}" = "\"'" ; then
14534                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14535                                 continue
14536                         fi
14537                         ;;
14538                 esac
14539                 case "$CPPFLAGS" in
14540                 (*$cf_add_cflags)
14541                         ;;
14542                 (*)
14543                         case $cf_add_cflags in
14544                         (-D*)
14545                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14546
14547 CPPFLAGS=`echo "$CPPFLAGS" | \
14548         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14549                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14550
14551                                 ;;
14552                         esac
14553                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14554                         ;;
14555                 esac
14556                 ;;
14557         (*)
14558                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14559                 ;;
14560         esac
14561         ;;
14562 (yes)
14563         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14564
14565         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14566
14567         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14568                 && test -z "${cf_tst_cflags}" \
14569                 && cf_fix_cppflags=no
14570         ;;
14571 esac
14572 done
14573
14574 if test -n "$cf_new_cflags" ; then
14575
14576         CFLAGS="$CFLAGS $cf_new_cflags"
14577 fi
14578
14579 if test -n "$cf_new_cppflags" ; then
14580
14581         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14582 fi
14583
14584 if test -n "$cf_new_extra_cppflags" ; then
14585
14586         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14587 fi
14588
14589 else
14590         LIB_TRACING=DEBUG
14591         ADA_TRACE=FALSE
14592 fi
14593
14594 echo "$as_me:14594: checking if we want to use GNAT projects" >&5
14595 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14596
14597 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14598 if test "${enable_gnat_projects+set}" = set; then
14599   enableval="$enable_gnat_projects"
14600   test "$enableval" != no && enableval=yes
14601         if test "$enableval" != "yes" ; then
14602     enable_gnat_projects=no
14603         else
14604                 enable_gnat_projects=yes
14605         fi
14606 else
14607   enableval=yes
14608         enable_gnat_projects=yes
14609
14610 fi;
14611 echo "$as_me:14611: result: $enable_gnat_projects" >&5
14612 echo "${ECHO_T}$enable_gnat_projects" >&6
14613
14614 ###     Checks for libraries.
14615 case $cf_cv_system_name in
14616 (*mingw32*|*mingw64*)
14617         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
14618         LIBS=" -lpsapi $LIBS"
14619         ;;
14620 (*)
14621 echo "$as_me:14621: checking for gettimeofday" >&5
14622 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14623 if test "${ac_cv_func_gettimeofday+set}" = set; then
14624   echo $ECHO_N "(cached) $ECHO_C" >&6
14625 else
14626   cat >conftest.$ac_ext <<_ACEOF
14627 #line 14627 "configure"
14628 #include "confdefs.h"
14629 /* System header to define __stub macros and hopefully few prototypes,
14630     which can conflict with char gettimeofday (); below.  */
14631 #include <assert.h>
14632 /* Override any gcc2 internal prototype to avoid an error.  */
14633 #ifdef __cplusplus
14634 extern "C"
14635 #endif
14636 /* We use char because int might match the return type of a gcc2
14637    builtin and then its argument prototype would still apply.  */
14638 char gettimeofday ();
14639 char (*f) ();
14640
14641 int
14642 main ()
14643 {
14644 /* The GNU C library defines this for functions which it implements
14645     to always fail with ENOSYS.  Some functions are actually named
14646     something starting with __ and the normal name is an alias.  */
14647 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14648 choke me
14649 #else
14650 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14651 #endif
14652
14653   ;
14654   return 0;
14655 }
14656 _ACEOF
14657 rm -f conftest.$ac_objext conftest$ac_exeext
14658 if { (eval echo "$as_me:14658: \"$ac_link\"") >&5
14659   (eval $ac_link) 2>&5
14660   ac_status=$?
14661   echo "$as_me:14661: \$? = $ac_status" >&5
14662   (exit $ac_status); } &&
14663          { ac_try='test -s conftest$ac_exeext'
14664   { (eval echo "$as_me:14664: \"$ac_try\"") >&5
14665   (eval $ac_try) 2>&5
14666   ac_status=$?
14667   echo "$as_me:14667: \$? = $ac_status" >&5
14668   (exit $ac_status); }; }; then
14669   ac_cv_func_gettimeofday=yes
14670 else
14671   echo "$as_me: failed program was:" >&5
14672 cat conftest.$ac_ext >&5
14673 ac_cv_func_gettimeofday=no
14674 fi
14675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14676 fi
14677 echo "$as_me:14677: result: $ac_cv_func_gettimeofday" >&5
14678 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14679 if test $ac_cv_func_gettimeofday = yes; then
14680
14681 cat >>confdefs.h <<\EOF
14682 #define HAVE_GETTIMEOFDAY 1
14683 EOF
14684
14685 else
14686
14687 echo "$as_me:14687: checking for gettimeofday in -lbsd" >&5
14688 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14689 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14690   echo $ECHO_N "(cached) $ECHO_C" >&6
14691 else
14692   ac_check_lib_save_LIBS=$LIBS
14693 LIBS="-lbsd  $LIBS"
14694 cat >conftest.$ac_ext <<_ACEOF
14695 #line 14695 "configure"
14696 #include "confdefs.h"
14697
14698 /* Override any gcc2 internal prototype to avoid an error.  */
14699 #ifdef __cplusplus
14700 extern "C"
14701 #endif
14702 /* We use char because int might match the return type of a gcc2
14703    builtin and then its argument prototype would still apply.  */
14704 char gettimeofday ();
14705 int
14706 main ()
14707 {
14708 gettimeofday ();
14709   ;
14710   return 0;
14711 }
14712 _ACEOF
14713 rm -f conftest.$ac_objext conftest$ac_exeext
14714 if { (eval echo "$as_me:14714: \"$ac_link\"") >&5
14715   (eval $ac_link) 2>&5
14716   ac_status=$?
14717   echo "$as_me:14717: \$? = $ac_status" >&5
14718   (exit $ac_status); } &&
14719          { ac_try='test -s conftest$ac_exeext'
14720   { (eval echo "$as_me:14720: \"$ac_try\"") >&5
14721   (eval $ac_try) 2>&5
14722   ac_status=$?
14723   echo "$as_me:14723: \$? = $ac_status" >&5
14724   (exit $ac_status); }; }; then
14725   ac_cv_lib_bsd_gettimeofday=yes
14726 else
14727   echo "$as_me: failed program was:" >&5
14728 cat conftest.$ac_ext >&5
14729 ac_cv_lib_bsd_gettimeofday=no
14730 fi
14731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14732 LIBS=$ac_check_lib_save_LIBS
14733 fi
14734 echo "$as_me:14734: result: $ac_cv_lib_bsd_gettimeofday" >&5
14735 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14736 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14737
14738 cat >>confdefs.h <<\EOF
14739 #define HAVE_GETTIMEOFDAY 1
14740 EOF
14741
14742 cf_add_libs="-lbsd"
14743 # Filter out duplicates - this happens with badly-designed ".pc" files...
14744 for cf_add_1lib in $LIBS
14745 do
14746         for cf_add_2lib in $cf_add_libs
14747         do
14748                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14749                 then
14750                         cf_add_1lib=
14751                         break
14752                 fi
14753         done
14754         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14755 done
14756 LIBS="$cf_add_libs"
14757
14758 fi
14759
14760 fi
14761         ;;
14762 esac
14763
14764 echo "$as_me:14764: checking if -lm needed for math functions" >&5
14765 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14766 if test "${cf_cv_need_libm+set}" = set; then
14767   echo $ECHO_N "(cached) $ECHO_C" >&6
14768 else
14769
14770         cat >conftest.$ac_ext <<_ACEOF
14771 #line 14771 "configure"
14772 #include "confdefs.h"
14773
14774         #include <stdio.h>
14775         #include <math.h>
14776
14777 int
14778 main ()
14779 {
14780 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14781   ;
14782   return 0;
14783 }
14784 _ACEOF
14785 rm -f conftest.$ac_objext conftest$ac_exeext
14786 if { (eval echo "$as_me:14786: \"$ac_link\"") >&5
14787   (eval $ac_link) 2>&5
14788   ac_status=$?
14789   echo "$as_me:14789: \$? = $ac_status" >&5
14790   (exit $ac_status); } &&
14791          { ac_try='test -s conftest$ac_exeext'
14792   { (eval echo "$as_me:14792: \"$ac_try\"") >&5
14793   (eval $ac_try) 2>&5
14794   ac_status=$?
14795   echo "$as_me:14795: \$? = $ac_status" >&5
14796   (exit $ac_status); }; }; then
14797   cf_cv_need_libm=no
14798 else
14799   echo "$as_me: failed program was:" >&5
14800 cat conftest.$ac_ext >&5
14801 cf_cv_need_libm=yes
14802 fi
14803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14804 fi
14805 echo "$as_me:14805: result: $cf_cv_need_libm" >&5
14806 echo "${ECHO_T}$cf_cv_need_libm" >&6
14807 if test "$cf_cv_need_libm" = yes
14808 then
14809 MATH_LIB=-lm
14810 fi
14811
14812 ###     Checks for header files.
14813 echo "$as_me:14813: checking for ANSI C header files" >&5
14814 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14815 if test "${ac_cv_header_stdc+set}" = set; then
14816   echo $ECHO_N "(cached) $ECHO_C" >&6
14817 else
14818   cat >conftest.$ac_ext <<_ACEOF
14819 #line 14819 "configure"
14820 #include "confdefs.h"
14821 #include <stdlib.h>
14822 #include <stdarg.h>
14823 #include <string.h>
14824 #include <float.h>
14825
14826 _ACEOF
14827 if { (eval echo "$as_me:14827: \"$ac_cpp conftest.$ac_ext\"") >&5
14828   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14829   ac_status=$?
14830   egrep -v '^ *\+' conftest.er1 >conftest.err
14831   rm -f conftest.er1
14832   cat conftest.err >&5
14833   echo "$as_me:14833: \$? = $ac_status" >&5
14834   (exit $ac_status); } >/dev/null; then
14835   if test -s conftest.err; then
14836     ac_cpp_err=$ac_c_preproc_warn_flag
14837   else
14838     ac_cpp_err=
14839   fi
14840 else
14841   ac_cpp_err=yes
14842 fi
14843 if test -z "$ac_cpp_err"; then
14844   ac_cv_header_stdc=yes
14845 else
14846   echo "$as_me: failed program was:" >&5
14847   cat conftest.$ac_ext >&5
14848   ac_cv_header_stdc=no
14849 fi
14850 rm -f conftest.err conftest.$ac_ext
14851
14852 if test $ac_cv_header_stdc = yes; then
14853   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14854   cat >conftest.$ac_ext <<_ACEOF
14855 #line 14855 "configure"
14856 #include "confdefs.h"
14857 #include <string.h>
14858
14859 _ACEOF
14860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14861   egrep "memchr" >/dev/null 2>&1; then
14862   :
14863 else
14864   ac_cv_header_stdc=no
14865 fi
14866 rm -rf conftest*
14867
14868 fi
14869
14870 if test $ac_cv_header_stdc = yes; then
14871   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14872   cat >conftest.$ac_ext <<_ACEOF
14873 #line 14873 "configure"
14874 #include "confdefs.h"
14875 #include <stdlib.h>
14876
14877 _ACEOF
14878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14879   egrep "free" >/dev/null 2>&1; then
14880   :
14881 else
14882   ac_cv_header_stdc=no
14883 fi
14884 rm -rf conftest*
14885
14886 fi
14887
14888 if test $ac_cv_header_stdc = yes; then
14889   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14890   if test "$cross_compiling" = yes; then
14891   :
14892 else
14893   cat >conftest.$ac_ext <<_ACEOF
14894 #line 14894 "configure"
14895 #include "confdefs.h"
14896 #include <ctype.h>
14897 #if ((' ' & 0x0FF) == 0x020)
14898 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14899 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14900 #else
14901 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14902                      || ('j' <= (c) && (c) <= 'r') \
14903                      || ('s' <= (c) && (c) <= 'z'))
14904 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14905 #endif
14906
14907 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14908 int
14909 main ()
14910 {
14911   int i;
14912   for (i = 0; i < 256; i++)
14913     if (XOR (islower (i), ISLOWER (i))
14914         || toupper (i) != TOUPPER (i))
14915       $ac_main_return(2);
14916   $ac_main_return (0);
14917 }
14918 _ACEOF
14919 rm -f conftest$ac_exeext
14920 if { (eval echo "$as_me:14920: \"$ac_link\"") >&5
14921   (eval $ac_link) 2>&5
14922   ac_status=$?
14923   echo "$as_me:14923: \$? = $ac_status" >&5
14924   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14925   { (eval echo "$as_me:14925: \"$ac_try\"") >&5
14926   (eval $ac_try) 2>&5
14927   ac_status=$?
14928   echo "$as_me:14928: \$? = $ac_status" >&5
14929   (exit $ac_status); }; }; then
14930   :
14931 else
14932   echo "$as_me: program exited with status $ac_status" >&5
14933 echo "$as_me: failed program was:" >&5
14934 cat conftest.$ac_ext >&5
14935 ac_cv_header_stdc=no
14936 fi
14937 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14938 fi
14939 fi
14940 fi
14941 echo "$as_me:14941: result: $ac_cv_header_stdc" >&5
14942 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14943 if test $ac_cv_header_stdc = yes; then
14944
14945 cat >>confdefs.h <<\EOF
14946 #define STDC_HEADERS 1
14947 EOF
14948
14949 fi
14950
14951 ac_header_dirent=no
14952 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14953   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14954 echo "$as_me:14954: checking for $ac_hdr that defines DIR" >&5
14955 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14957   echo $ECHO_N "(cached) $ECHO_C" >&6
14958 else
14959   cat >conftest.$ac_ext <<_ACEOF
14960 #line 14960 "configure"
14961 #include "confdefs.h"
14962 #include <sys/types.h>
14963 #include <$ac_hdr>
14964
14965 int
14966 main ()
14967 {
14968 if ((DIR *) 0)
14969 return 0;
14970   ;
14971   return 0;
14972 }
14973 _ACEOF
14974 rm -f conftest.$ac_objext
14975 if { (eval echo "$as_me:14975: \"$ac_compile\"") >&5
14976   (eval $ac_compile) 2>&5
14977   ac_status=$?
14978   echo "$as_me:14978: \$? = $ac_status" >&5
14979   (exit $ac_status); } &&
14980          { ac_try='test -s conftest.$ac_objext'
14981   { (eval echo "$as_me:14981: \"$ac_try\"") >&5
14982   (eval $ac_try) 2>&5
14983   ac_status=$?
14984   echo "$as_me:14984: \$? = $ac_status" >&5
14985   (exit $ac_status); }; }; then
14986   eval "$as_ac_Header=yes"
14987 else
14988   echo "$as_me: failed program was:" >&5
14989 cat conftest.$ac_ext >&5
14990 eval "$as_ac_Header=no"
14991 fi
14992 rm -f conftest.$ac_objext conftest.$ac_ext
14993 fi
14994 echo "$as_me:14994: result: `eval echo '${'$as_ac_Header'}'`" >&5
14995 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14996 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14997   cat >>confdefs.h <<EOF
14998 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14999 EOF
15000
15001 ac_header_dirent=$ac_hdr; break
15002 fi
15003
15004 done
15005 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15006 if test $ac_header_dirent = dirent.h; then
15007   echo "$as_me:15007: checking for opendir in -ldir" >&5
15008 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15009 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15010   echo $ECHO_N "(cached) $ECHO_C" >&6
15011 else
15012   ac_check_lib_save_LIBS=$LIBS
15013 LIBS="-ldir  $LIBS"
15014 cat >conftest.$ac_ext <<_ACEOF
15015 #line 15015 "configure"
15016 #include "confdefs.h"
15017
15018 /* Override any gcc2 internal prototype to avoid an error.  */
15019 #ifdef __cplusplus
15020 extern "C"
15021 #endif
15022 /* We use char because int might match the return type of a gcc2
15023    builtin and then its argument prototype would still apply.  */
15024 char opendir ();
15025 int
15026 main ()
15027 {
15028 opendir ();
15029   ;
15030   return 0;
15031 }
15032 _ACEOF
15033 rm -f conftest.$ac_objext conftest$ac_exeext
15034 if { (eval echo "$as_me:15034: \"$ac_link\"") >&5
15035   (eval $ac_link) 2>&5
15036   ac_status=$?
15037   echo "$as_me:15037: \$? = $ac_status" >&5
15038   (exit $ac_status); } &&
15039          { ac_try='test -s conftest$ac_exeext'
15040   { (eval echo "$as_me:15040: \"$ac_try\"") >&5
15041   (eval $ac_try) 2>&5
15042   ac_status=$?
15043   echo "$as_me:15043: \$? = $ac_status" >&5
15044   (exit $ac_status); }; }; then
15045   ac_cv_lib_dir_opendir=yes
15046 else
15047   echo "$as_me: failed program was:" >&5
15048 cat conftest.$ac_ext >&5
15049 ac_cv_lib_dir_opendir=no
15050 fi
15051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15052 LIBS=$ac_check_lib_save_LIBS
15053 fi
15054 echo "$as_me:15054: result: $ac_cv_lib_dir_opendir" >&5
15055 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15056 if test $ac_cv_lib_dir_opendir = yes; then
15057   LIBS="$LIBS -ldir"
15058 fi
15059
15060 else
15061   echo "$as_me:15061: checking for opendir in -lx" >&5
15062 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15063 if test "${ac_cv_lib_x_opendir+set}" = set; then
15064   echo $ECHO_N "(cached) $ECHO_C" >&6
15065 else
15066   ac_check_lib_save_LIBS=$LIBS
15067 LIBS="-lx  $LIBS"
15068 cat >conftest.$ac_ext <<_ACEOF
15069 #line 15069 "configure"
15070 #include "confdefs.h"
15071
15072 /* Override any gcc2 internal prototype to avoid an error.  */
15073 #ifdef __cplusplus
15074 extern "C"
15075 #endif
15076 /* We use char because int might match the return type of a gcc2
15077    builtin and then its argument prototype would still apply.  */
15078 char opendir ();
15079 int
15080 main ()
15081 {
15082 opendir ();
15083   ;
15084   return 0;
15085 }
15086 _ACEOF
15087 rm -f conftest.$ac_objext conftest$ac_exeext
15088 if { (eval echo "$as_me:15088: \"$ac_link\"") >&5
15089   (eval $ac_link) 2>&5
15090   ac_status=$?
15091   echo "$as_me:15091: \$? = $ac_status" >&5
15092   (exit $ac_status); } &&
15093          { ac_try='test -s conftest$ac_exeext'
15094   { (eval echo "$as_me:15094: \"$ac_try\"") >&5
15095   (eval $ac_try) 2>&5
15096   ac_status=$?
15097   echo "$as_me:15097: \$? = $ac_status" >&5
15098   (exit $ac_status); }; }; then
15099   ac_cv_lib_x_opendir=yes
15100 else
15101   echo "$as_me: failed program was:" >&5
15102 cat conftest.$ac_ext >&5
15103 ac_cv_lib_x_opendir=no
15104 fi
15105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15106 LIBS=$ac_check_lib_save_LIBS
15107 fi
15108 echo "$as_me:15108: result: $ac_cv_lib_x_opendir" >&5
15109 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15110 if test $ac_cv_lib_x_opendir = yes; then
15111   LIBS="$LIBS -lx"
15112 fi
15113
15114 fi
15115
15116 echo "$as_me:15116: checking whether time.h and sys/time.h may both be included" >&5
15117 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15118 if test "${ac_cv_header_time+set}" = set; then
15119   echo $ECHO_N "(cached) $ECHO_C" >&6
15120 else
15121   cat >conftest.$ac_ext <<_ACEOF
15122 #line 15122 "configure"
15123 #include "confdefs.h"
15124 #include <sys/types.h>
15125 #include <sys/time.h>
15126 #include <time.h>
15127
15128 int
15129 main ()
15130 {
15131 if ((struct tm *) 0)
15132 return 0;
15133   ;
15134   return 0;
15135 }
15136 _ACEOF
15137 rm -f conftest.$ac_objext
15138 if { (eval echo "$as_me:15138: \"$ac_compile\"") >&5
15139   (eval $ac_compile) 2>&5
15140   ac_status=$?
15141   echo "$as_me:15141: \$? = $ac_status" >&5
15142   (exit $ac_status); } &&
15143          { ac_try='test -s conftest.$ac_objext'
15144   { (eval echo "$as_me:15144: \"$ac_try\"") >&5
15145   (eval $ac_try) 2>&5
15146   ac_status=$?
15147   echo "$as_me:15147: \$? = $ac_status" >&5
15148   (exit $ac_status); }; }; then
15149   ac_cv_header_time=yes
15150 else
15151   echo "$as_me: failed program was:" >&5
15152 cat conftest.$ac_ext >&5
15153 ac_cv_header_time=no
15154 fi
15155 rm -f conftest.$ac_objext conftest.$ac_ext
15156 fi
15157 echo "$as_me:15157: result: $ac_cv_header_time" >&5
15158 echo "${ECHO_T}$ac_cv_header_time" >&6
15159 if test $ac_cv_header_time = yes; then
15160
15161 cat >>confdefs.h <<\EOF
15162 #define TIME_WITH_SYS_TIME 1
15163 EOF
15164
15165 fi
15166
15167 cf_regex_func=no
15168
15169 cf_regex_libs="regex re"
15170 case $host_os in
15171 (mingw*)
15172         cf_regex_libs="gnurx $cf_regex_libs"
15173         ;;
15174 esac
15175
15176 echo "$as_me:15176: checking for regcomp" >&5
15177 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15178 if test "${ac_cv_func_regcomp+set}" = set; then
15179   echo $ECHO_N "(cached) $ECHO_C" >&6
15180 else
15181   cat >conftest.$ac_ext <<_ACEOF
15182 #line 15182 "configure"
15183 #include "confdefs.h"
15184 /* System header to define __stub macros and hopefully few prototypes,
15185     which can conflict with char regcomp (); below.  */
15186 #include <assert.h>
15187 /* Override any gcc2 internal prototype to avoid an error.  */
15188 #ifdef __cplusplus
15189 extern "C"
15190 #endif
15191 /* We use char because int might match the return type of a gcc2
15192    builtin and then its argument prototype would still apply.  */
15193 char regcomp ();
15194 char (*f) ();
15195
15196 int
15197 main ()
15198 {
15199 /* The GNU C library defines this for functions which it implements
15200     to always fail with ENOSYS.  Some functions are actually named
15201     something starting with __ and the normal name is an alias.  */
15202 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15203 choke me
15204 #else
15205 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15206 #endif
15207
15208   ;
15209   return 0;
15210 }
15211 _ACEOF
15212 rm -f conftest.$ac_objext conftest$ac_exeext
15213 if { (eval echo "$as_me:15213: \"$ac_link\"") >&5
15214   (eval $ac_link) 2>&5
15215   ac_status=$?
15216   echo "$as_me:15216: \$? = $ac_status" >&5
15217   (exit $ac_status); } &&
15218          { ac_try='test -s conftest$ac_exeext'
15219   { (eval echo "$as_me:15219: \"$ac_try\"") >&5
15220   (eval $ac_try) 2>&5
15221   ac_status=$?
15222   echo "$as_me:15222: \$? = $ac_status" >&5
15223   (exit $ac_status); }; }; then
15224   ac_cv_func_regcomp=yes
15225 else
15226   echo "$as_me: failed program was:" >&5
15227 cat conftest.$ac_ext >&5
15228 ac_cv_func_regcomp=no
15229 fi
15230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15231 fi
15232 echo "$as_me:15232: result: $ac_cv_func_regcomp" >&5
15233 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15234 if test $ac_cv_func_regcomp = yes; then
15235   cf_regex_func=regcomp
15236 else
15237
15238         for cf_regex_lib in $cf_regex_libs
15239         do
15240                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15241 echo "$as_me:15241: checking for regcomp in -l$cf_regex_lib" >&5
15242 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15243 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15244   echo $ECHO_N "(cached) $ECHO_C" >&6
15245 else
15246   ac_check_lib_save_LIBS=$LIBS
15247 LIBS="-l$cf_regex_lib  $LIBS"
15248 cat >conftest.$ac_ext <<_ACEOF
15249 #line 15249 "configure"
15250 #include "confdefs.h"
15251
15252 /* Override any gcc2 internal prototype to avoid an error.  */
15253 #ifdef __cplusplus
15254 extern "C"
15255 #endif
15256 /* We use char because int might match the return type of a gcc2
15257    builtin and then its argument prototype would still apply.  */
15258 char regcomp ();
15259 int
15260 main ()
15261 {
15262 regcomp ();
15263   ;
15264   return 0;
15265 }
15266 _ACEOF
15267 rm -f conftest.$ac_objext conftest$ac_exeext
15268 if { (eval echo "$as_me:15268: \"$ac_link\"") >&5
15269   (eval $ac_link) 2>&5
15270   ac_status=$?
15271   echo "$as_me:15271: \$? = $ac_status" >&5
15272   (exit $ac_status); } &&
15273          { ac_try='test -s conftest$ac_exeext'
15274   { (eval echo "$as_me:15274: \"$ac_try\"") >&5
15275   (eval $ac_try) 2>&5
15276   ac_status=$?
15277   echo "$as_me:15277: \$? = $ac_status" >&5
15278   (exit $ac_status); }; }; then
15279   eval "$as_ac_Lib=yes"
15280 else
15281   echo "$as_me: failed program was:" >&5
15282 cat conftest.$ac_ext >&5
15283 eval "$as_ac_Lib=no"
15284 fi
15285 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15286 LIBS=$ac_check_lib_save_LIBS
15287 fi
15288 echo "$as_me:15288: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15289 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15290 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15291
15292 cf_add_libs="-l$cf_regex_lib"
15293 # Filter out duplicates - this happens with badly-designed ".pc" files...
15294 for cf_add_1lib in $LIBS
15295 do
15296         for cf_add_2lib in $cf_add_libs
15297         do
15298                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15299                 then
15300                         cf_add_1lib=
15301                         break
15302                 fi
15303         done
15304         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15305 done
15306 LIBS="$cf_add_libs"
15307
15308                                 cf_regex_func=regcomp
15309                                 break
15310 fi
15311
15312         done
15313
15314 fi
15315
15316 if test "$cf_regex_func" = no ; then
15317         echo "$as_me:15317: checking for compile" >&5
15318 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15319 if test "${ac_cv_func_compile+set}" = set; then
15320   echo $ECHO_N "(cached) $ECHO_C" >&6
15321 else
15322   cat >conftest.$ac_ext <<_ACEOF
15323 #line 15323 "configure"
15324 #include "confdefs.h"
15325 /* System header to define __stub macros and hopefully few prototypes,
15326     which can conflict with char compile (); below.  */
15327 #include <assert.h>
15328 /* Override any gcc2 internal prototype to avoid an error.  */
15329 #ifdef __cplusplus
15330 extern "C"
15331 #endif
15332 /* We use char because int might match the return type of a gcc2
15333    builtin and then its argument prototype would still apply.  */
15334 char compile ();
15335 char (*f) ();
15336
15337 int
15338 main ()
15339 {
15340 /* The GNU C library defines this for functions which it implements
15341     to always fail with ENOSYS.  Some functions are actually named
15342     something starting with __ and the normal name is an alias.  */
15343 #if defined (__stub_compile) || defined (__stub___compile)
15344 choke me
15345 #else
15346 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15347 #endif
15348
15349   ;
15350   return 0;
15351 }
15352 _ACEOF
15353 rm -f conftest.$ac_objext conftest$ac_exeext
15354 if { (eval echo "$as_me:15354: \"$ac_link\"") >&5
15355   (eval $ac_link) 2>&5
15356   ac_status=$?
15357   echo "$as_me:15357: \$? = $ac_status" >&5
15358   (exit $ac_status); } &&
15359          { ac_try='test -s conftest$ac_exeext'
15360   { (eval echo "$as_me:15360: \"$ac_try\"") >&5
15361   (eval $ac_try) 2>&5
15362   ac_status=$?
15363   echo "$as_me:15363: \$? = $ac_status" >&5
15364   (exit $ac_status); }; }; then
15365   ac_cv_func_compile=yes
15366 else
15367   echo "$as_me: failed program was:" >&5
15368 cat conftest.$ac_ext >&5
15369 ac_cv_func_compile=no
15370 fi
15371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15372 fi
15373 echo "$as_me:15373: result: $ac_cv_func_compile" >&5
15374 echo "${ECHO_T}$ac_cv_func_compile" >&6
15375 if test $ac_cv_func_compile = yes; then
15376   cf_regex_func=compile
15377 else
15378
15379                 echo "$as_me:15379: checking for compile in -lgen" >&5
15380 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15381 if test "${ac_cv_lib_gen_compile+set}" = set; then
15382   echo $ECHO_N "(cached) $ECHO_C" >&6
15383 else
15384   ac_check_lib_save_LIBS=$LIBS
15385 LIBS="-lgen  $LIBS"
15386 cat >conftest.$ac_ext <<_ACEOF
15387 #line 15387 "configure"
15388 #include "confdefs.h"
15389
15390 /* Override any gcc2 internal prototype to avoid an error.  */
15391 #ifdef __cplusplus
15392 extern "C"
15393 #endif
15394 /* We use char because int might match the return type of a gcc2
15395    builtin and then its argument prototype would still apply.  */
15396 char compile ();
15397 int
15398 main ()
15399 {
15400 compile ();
15401   ;
15402   return 0;
15403 }
15404 _ACEOF
15405 rm -f conftest.$ac_objext conftest$ac_exeext
15406 if { (eval echo "$as_me:15406: \"$ac_link\"") >&5
15407   (eval $ac_link) 2>&5
15408   ac_status=$?
15409   echo "$as_me:15409: \$? = $ac_status" >&5
15410   (exit $ac_status); } &&
15411          { ac_try='test -s conftest$ac_exeext'
15412   { (eval echo "$as_me:15412: \"$ac_try\"") >&5
15413   (eval $ac_try) 2>&5
15414   ac_status=$?
15415   echo "$as_me:15415: \$? = $ac_status" >&5
15416   (exit $ac_status); }; }; then
15417   ac_cv_lib_gen_compile=yes
15418 else
15419   echo "$as_me: failed program was:" >&5
15420 cat conftest.$ac_ext >&5
15421 ac_cv_lib_gen_compile=no
15422 fi
15423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15424 LIBS=$ac_check_lib_save_LIBS
15425 fi
15426 echo "$as_me:15426: result: $ac_cv_lib_gen_compile" >&5
15427 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15428 if test $ac_cv_lib_gen_compile = yes; then
15429
15430 cf_add_libs="-lgen"
15431 # Filter out duplicates - this happens with badly-designed ".pc" files...
15432 for cf_add_1lib in $LIBS
15433 do
15434         for cf_add_2lib in $cf_add_libs
15435         do
15436                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15437                 then
15438                         cf_add_1lib=
15439                         break
15440                 fi
15441         done
15442         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15443 done
15444 LIBS="$cf_add_libs"
15445
15446                                 cf_regex_func=compile
15447 fi
15448
15449 fi
15450
15451 fi
15452
15453 if test "$cf_regex_func" = no ; then
15454         { echo "$as_me:15454: WARNING: cannot find regular expression library" >&5
15455 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15456 fi
15457
15458 echo "$as_me:15458: checking for regular-expression headers" >&5
15459 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15460 if test "${cf_cv_regex_hdrs+set}" = set; then
15461   echo $ECHO_N "(cached) $ECHO_C" >&6
15462 else
15463
15464 cf_cv_regex_hdrs=no
15465 case $cf_regex_func in
15466 (compile)
15467         for cf_regex_hdr in regexp.h regexpr.h
15468         do
15469                 cat >conftest.$ac_ext <<_ACEOF
15470 #line 15470 "configure"
15471 #include "confdefs.h"
15472 #include <$cf_regex_hdr>
15473 int
15474 main ()
15475 {
15476
15477                         char *p = compile("", "", "", 0);
15478                         int x = step("", "");
15479
15480   ;
15481   return 0;
15482 }
15483 _ACEOF
15484 rm -f conftest.$ac_objext conftest$ac_exeext
15485 if { (eval echo "$as_me:15485: \"$ac_link\"") >&5
15486   (eval $ac_link) 2>&5
15487   ac_status=$?
15488   echo "$as_me:15488: \$? = $ac_status" >&5
15489   (exit $ac_status); } &&
15490          { ac_try='test -s conftest$ac_exeext'
15491   { (eval echo "$as_me:15491: \"$ac_try\"") >&5
15492   (eval $ac_try) 2>&5
15493   ac_status=$?
15494   echo "$as_me:15494: \$? = $ac_status" >&5
15495   (exit $ac_status); }; }; then
15496
15497                         cf_cv_regex_hdrs=$cf_regex_hdr
15498                         break
15499
15500 else
15501   echo "$as_me: failed program was:" >&5
15502 cat conftest.$ac_ext >&5
15503 fi
15504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15505         done
15506         ;;
15507 (*)
15508         for cf_regex_hdr in regex.h
15509         do
15510                 cat >conftest.$ac_ext <<_ACEOF
15511 #line 15511 "configure"
15512 #include "confdefs.h"
15513 #include <sys/types.h>
15514 #include <$cf_regex_hdr>
15515 int
15516 main ()
15517 {
15518
15519                         regex_t *p;
15520                         int x = regcomp(p, "", 0);
15521                         int y = regexec(p, "", 0, 0, 0);
15522                         regfree(p);
15523
15524   ;
15525   return 0;
15526 }
15527 _ACEOF
15528 rm -f conftest.$ac_objext conftest$ac_exeext
15529 if { (eval echo "$as_me:15529: \"$ac_link\"") >&5
15530   (eval $ac_link) 2>&5
15531   ac_status=$?
15532   echo "$as_me:15532: \$? = $ac_status" >&5
15533   (exit $ac_status); } &&
15534          { ac_try='test -s conftest$ac_exeext'
15535   { (eval echo "$as_me:15535: \"$ac_try\"") >&5
15536   (eval $ac_try) 2>&5
15537   ac_status=$?
15538   echo "$as_me:15538: \$? = $ac_status" >&5
15539   (exit $ac_status); }; }; then
15540
15541                         cf_cv_regex_hdrs=$cf_regex_hdr
15542                         break
15543
15544 else
15545   echo "$as_me: failed program was:" >&5
15546 cat conftest.$ac_ext >&5
15547 fi
15548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15549         done
15550         ;;
15551 esac
15552
15553 fi
15554 echo "$as_me:15554: result: $cf_cv_regex_hdrs" >&5
15555 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15556
15557 case $cf_cv_regex_hdrs in
15558         (no)            { echo "$as_me:15558: WARNING: no regular expression header found" >&5
15559 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15560         (regex.h)
15561 cat >>confdefs.h <<\EOF
15562 #define HAVE_REGEX_H_FUNCS 1
15563 EOF
15564  ;;
15565         (regexp.h)
15566 cat >>confdefs.h <<\EOF
15567 #define HAVE_REGEXP_H_FUNCS 1
15568 EOF
15569  ;;
15570         (regexpr.h)
15571 cat >>confdefs.h <<\EOF
15572 #define HAVE_REGEXPR_H_FUNCS 1
15573 EOF
15574  ;;
15575 esac
15576
15577 for ac_header in \
15578 fcntl.h \
15579 getopt.h \
15580 limits.h \
15581 locale.h \
15582 math.h \
15583 poll.h \
15584 sys/bsdtypes.h \
15585 sys/ioctl.h \
15586 sys/param.h \
15587 sys/poll.h \
15588 sys/select.h \
15589 sys/time.h \
15590 sys/times.h \
15591 ttyent.h \
15592 unistd.h \
15593 wctype.h \
15594
15595 do
15596 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15597 echo "$as_me:15597: checking for $ac_header" >&5
15598 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15599 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15600   echo $ECHO_N "(cached) $ECHO_C" >&6
15601 else
15602   cat >conftest.$ac_ext <<_ACEOF
15603 #line 15603 "configure"
15604 #include "confdefs.h"
15605 #include <$ac_header>
15606 _ACEOF
15607 if { (eval echo "$as_me:15607: \"$ac_cpp conftest.$ac_ext\"") >&5
15608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15609   ac_status=$?
15610   egrep -v '^ *\+' conftest.er1 >conftest.err
15611   rm -f conftest.er1
15612   cat conftest.err >&5
15613   echo "$as_me:15613: \$? = $ac_status" >&5
15614   (exit $ac_status); } >/dev/null; then
15615   if test -s conftest.err; then
15616     ac_cpp_err=$ac_c_preproc_warn_flag
15617   else
15618     ac_cpp_err=
15619   fi
15620 else
15621   ac_cpp_err=yes
15622 fi
15623 if test -z "$ac_cpp_err"; then
15624   eval "$as_ac_Header=yes"
15625 else
15626   echo "$as_me: failed program was:" >&5
15627   cat conftest.$ac_ext >&5
15628   eval "$as_ac_Header=no"
15629 fi
15630 rm -f conftest.err conftest.$ac_ext
15631 fi
15632 echo "$as_me:15632: result: `eval echo '${'$as_ac_Header'}'`" >&5
15633 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15634 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15635   cat >>confdefs.h <<EOF
15636 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15637 EOF
15638
15639 fi
15640 done
15641
15642 for ac_header in unistd.h getopt.h
15643 do
15644 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15645 echo "$as_me:15645: checking for $ac_header" >&5
15646 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15648   echo $ECHO_N "(cached) $ECHO_C" >&6
15649 else
15650   cat >conftest.$ac_ext <<_ACEOF
15651 #line 15651 "configure"
15652 #include "confdefs.h"
15653 #include <$ac_header>
15654 _ACEOF
15655 if { (eval echo "$as_me:15655: \"$ac_cpp conftest.$ac_ext\"") >&5
15656   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15657   ac_status=$?
15658   egrep -v '^ *\+' conftest.er1 >conftest.err
15659   rm -f conftest.er1
15660   cat conftest.err >&5
15661   echo "$as_me:15661: \$? = $ac_status" >&5
15662   (exit $ac_status); } >/dev/null; then
15663   if test -s conftest.err; then
15664     ac_cpp_err=$ac_c_preproc_warn_flag
15665   else
15666     ac_cpp_err=
15667   fi
15668 else
15669   ac_cpp_err=yes
15670 fi
15671 if test -z "$ac_cpp_err"; then
15672   eval "$as_ac_Header=yes"
15673 else
15674   echo "$as_me: failed program was:" >&5
15675   cat conftest.$ac_ext >&5
15676   eval "$as_ac_Header=no"
15677 fi
15678 rm -f conftest.err conftest.$ac_ext
15679 fi
15680 echo "$as_me:15680: result: `eval echo '${'$as_ac_Header'}'`" >&5
15681 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15682 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15683   cat >>confdefs.h <<EOF
15684 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15685 EOF
15686
15687 fi
15688 done
15689
15690 echo "$as_me:15690: checking for header declaring getopt variables" >&5
15691 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15692 if test "${cf_cv_getopt_header+set}" = set; then
15693   echo $ECHO_N "(cached) $ECHO_C" >&6
15694 else
15695
15696 cf_cv_getopt_header=none
15697 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15698 do
15699 cat >conftest.$ac_ext <<_ACEOF
15700 #line 15700 "configure"
15701 #include "confdefs.h"
15702
15703 #include <$cf_header>
15704 int
15705 main ()
15706 {
15707 int x = optind; char *y = optarg
15708   ;
15709   return 0;
15710 }
15711 _ACEOF
15712 rm -f conftest.$ac_objext
15713 if { (eval echo "$as_me:15713: \"$ac_compile\"") >&5
15714   (eval $ac_compile) 2>&5
15715   ac_status=$?
15716   echo "$as_me:15716: \$? = $ac_status" >&5
15717   (exit $ac_status); } &&
15718          { ac_try='test -s conftest.$ac_objext'
15719   { (eval echo "$as_me:15719: \"$ac_try\"") >&5
15720   (eval $ac_try) 2>&5
15721   ac_status=$?
15722   echo "$as_me:15722: \$? = $ac_status" >&5
15723   (exit $ac_status); }; }; then
15724   cf_cv_getopt_header=$cf_header
15725  break
15726 else
15727   echo "$as_me: failed program was:" >&5
15728 cat conftest.$ac_ext >&5
15729 fi
15730 rm -f conftest.$ac_objext conftest.$ac_ext
15731 done
15732
15733 fi
15734 echo "$as_me:15734: result: $cf_cv_getopt_header" >&5
15735 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15736 if test $cf_cv_getopt_header != none ; then
15737
15738 cat >>confdefs.h <<\EOF
15739 #define HAVE_GETOPT_HEADER 1
15740 EOF
15741
15742 fi
15743 if test $cf_cv_getopt_header = getopt.h ; then
15744
15745 cat >>confdefs.h <<\EOF
15746 #define NEED_GETOPT_H 1
15747 EOF
15748
15749 fi
15750
15751 # check for ISC (this may also define _POSIX_SOURCE)
15752 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15753 if test "x$ISC" = xyes ; then
15754
15755 echo "$as_me:15755: checking for main in -lcposix" >&5
15756 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15757 if test "${ac_cv_lib_cposix_main+set}" = set; then
15758   echo $ECHO_N "(cached) $ECHO_C" >&6
15759 else
15760   ac_check_lib_save_LIBS=$LIBS
15761 LIBS="-lcposix  $LIBS"
15762 cat >conftest.$ac_ext <<_ACEOF
15763 #line 15763 "configure"
15764 #include "confdefs.h"
15765
15766 int
15767 main ()
15768 {
15769 main ();
15770   ;
15771   return 0;
15772 }
15773 _ACEOF
15774 rm -f conftest.$ac_objext conftest$ac_exeext
15775 if { (eval echo "$as_me:15775: \"$ac_link\"") >&5
15776   (eval $ac_link) 2>&5
15777   ac_status=$?
15778   echo "$as_me:15778: \$? = $ac_status" >&5
15779   (exit $ac_status); } &&
15780          { ac_try='test -s conftest$ac_exeext'
15781   { (eval echo "$as_me:15781: \"$ac_try\"") >&5
15782   (eval $ac_try) 2>&5
15783   ac_status=$?
15784   echo "$as_me:15784: \$? = $ac_status" >&5
15785   (exit $ac_status); }; }; then
15786   ac_cv_lib_cposix_main=yes
15787 else
15788   echo "$as_me: failed program was:" >&5
15789 cat conftest.$ac_ext >&5
15790 ac_cv_lib_cposix_main=no
15791 fi
15792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15793 LIBS=$ac_check_lib_save_LIBS
15794 fi
15795 echo "$as_me:15795: result: $ac_cv_lib_cposix_main" >&5
15796 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15797 if test $ac_cv_lib_cposix_main = yes; then
15798   cat >>confdefs.h <<EOF
15799 #define HAVE_LIBCPOSIX 1
15800 EOF
15801
15802   LIBS="-lcposix $LIBS"
15803
15804 fi
15805
15806         echo "$as_me:15806: checking for bzero in -linet" >&5
15807 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15808 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15809   echo $ECHO_N "(cached) $ECHO_C" >&6
15810 else
15811   ac_check_lib_save_LIBS=$LIBS
15812 LIBS="-linet  $LIBS"
15813 cat >conftest.$ac_ext <<_ACEOF
15814 #line 15814 "configure"
15815 #include "confdefs.h"
15816
15817 /* Override any gcc2 internal prototype to avoid an error.  */
15818 #ifdef __cplusplus
15819 extern "C"
15820 #endif
15821 /* We use char because int might match the return type of a gcc2
15822    builtin and then its argument prototype would still apply.  */
15823 char bzero ();
15824 int
15825 main ()
15826 {
15827 bzero ();
15828   ;
15829   return 0;
15830 }
15831 _ACEOF
15832 rm -f conftest.$ac_objext conftest$ac_exeext
15833 if { (eval echo "$as_me:15833: \"$ac_link\"") >&5
15834   (eval $ac_link) 2>&5
15835   ac_status=$?
15836   echo "$as_me:15836: \$? = $ac_status" >&5
15837   (exit $ac_status); } &&
15838          { ac_try='test -s conftest$ac_exeext'
15839   { (eval echo "$as_me:15839: \"$ac_try\"") >&5
15840   (eval $ac_try) 2>&5
15841   ac_status=$?
15842   echo "$as_me:15842: \$? = $ac_status" >&5
15843   (exit $ac_status); }; }; then
15844   ac_cv_lib_inet_bzero=yes
15845 else
15846   echo "$as_me: failed program was:" >&5
15847 cat conftest.$ac_ext >&5
15848 ac_cv_lib_inet_bzero=no
15849 fi
15850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15851 LIBS=$ac_check_lib_save_LIBS
15852 fi
15853 echo "$as_me:15853: result: $ac_cv_lib_inet_bzero" >&5
15854 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15855 if test $ac_cv_lib_inet_bzero = yes; then
15856
15857 cf_add_libs="-linet"
15858 # Filter out duplicates - this happens with badly-designed ".pc" files...
15859 for cf_add_1lib in $LIBS
15860 do
15861         for cf_add_2lib in $cf_add_libs
15862         do
15863                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15864                 then
15865                         cf_add_1lib=
15866                         break
15867                 fi
15868         done
15869         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15870 done
15871 LIBS="$cf_add_libs"
15872
15873 fi
15874 fi
15875
15876 echo "$as_me:15876: checking if sys/time.h works with sys/select.h" >&5
15877 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15878 if test "${cf_cv_sys_time_select+set}" = set; then
15879   echo $ECHO_N "(cached) $ECHO_C" >&6
15880 else
15881
15882 cat >conftest.$ac_ext <<_ACEOF
15883 #line 15883 "configure"
15884 #include "confdefs.h"
15885
15886 #include <sys/types.h>
15887 #ifdef HAVE_SYS_TIME_H
15888 #include <sys/time.h>
15889 #endif
15890 #ifdef HAVE_SYS_SELECT_H
15891 #include <sys/select.h>
15892 #endif
15893
15894 int
15895 main ()
15896 {
15897
15898   ;
15899   return 0;
15900 }
15901 _ACEOF
15902 rm -f conftest.$ac_objext
15903 if { (eval echo "$as_me:15903: \"$ac_compile\"") >&5
15904   (eval $ac_compile) 2>&5
15905   ac_status=$?
15906   echo "$as_me:15906: \$? = $ac_status" >&5
15907   (exit $ac_status); } &&
15908          { ac_try='test -s conftest.$ac_objext'
15909   { (eval echo "$as_me:15909: \"$ac_try\"") >&5
15910   (eval $ac_try) 2>&5
15911   ac_status=$?
15912   echo "$as_me:15912: \$? = $ac_status" >&5
15913   (exit $ac_status); }; }; then
15914   cf_cv_sys_time_select=yes
15915 else
15916   echo "$as_me: failed program was:" >&5
15917 cat conftest.$ac_ext >&5
15918 cf_cv_sys_time_select=no
15919 fi
15920 rm -f conftest.$ac_objext conftest.$ac_ext
15921
15922 fi
15923
15924 echo "$as_me:15924: result: $cf_cv_sys_time_select" >&5
15925 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15926 test "$cf_cv_sys_time_select" = yes &&
15927 cat >>confdefs.h <<\EOF
15928 #define HAVE_SYS_TIME_SELECT 1
15929 EOF
15930
15931 ###     checks for compiler characteristics
15932 ac_ext=c
15933 ac_cpp='$CPP $CPPFLAGS'
15934 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15935 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15936 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15937 ac_main_return=return
15938
15939 echo "$as_me:15939: checking for an ANSI C-conforming const" >&5
15940 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15941 if test "${ac_cv_c_const+set}" = set; then
15942   echo $ECHO_N "(cached) $ECHO_C" >&6
15943 else
15944   cat >conftest.$ac_ext <<_ACEOF
15945 #line 15945 "configure"
15946 #include "confdefs.h"
15947
15948 int
15949 main ()
15950 {
15951 /* FIXME: Include the comments suggested by Paul. */
15952 #ifndef __cplusplus
15953   /* Ultrix mips cc rejects this.  */
15954   typedef int charset[2];
15955   const charset x;
15956   /* SunOS 4.1.1 cc rejects this.  */
15957   char const *const *ccp;
15958   char **p;
15959   /* NEC SVR4.0.2 mips cc rejects this.  */
15960   struct point {int x, y;};
15961   static struct point const zero = {0,0};
15962   /* AIX XL C 1.02.0.0 rejects this.
15963      It does not let you subtract one const X* pointer from another in
15964      an arm of an if-expression whose if-part is not a constant
15965      expression */
15966   const char *g = "string";
15967   ccp = &g + (g ? g-g : 0);
15968   /* HPUX 7.0 cc rejects these. */
15969   ++ccp;
15970   p = (char**) ccp;
15971   ccp = (char const *const *) p;
15972   { /* SCO 3.2v4 cc rejects this.  */
15973     char *t;
15974     char const *s = 0 ? (char *) 0 : (char const *) 0;
15975
15976     *t++ = 0;
15977   }
15978   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15979     int x[] = {25, 17};
15980     const int *foo = &x[0];
15981     ++foo;
15982   }
15983   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15984     typedef const int *iptr;
15985     iptr p = 0;
15986     ++p;
15987   }
15988   { /* AIX XL C 1.02.0.0 rejects this saying
15989        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15990     struct s { int j; const int *ap[3]; };
15991     struct s *b; b->j = 5;
15992   }
15993   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15994     const int foo = 10;
15995   }
15996 #endif
15997
15998   ;
15999   return 0;
16000 }
16001 _ACEOF
16002 rm -f conftest.$ac_objext
16003 if { (eval echo "$as_me:16003: \"$ac_compile\"") >&5
16004   (eval $ac_compile) 2>&5
16005   ac_status=$?
16006   echo "$as_me:16006: \$? = $ac_status" >&5
16007   (exit $ac_status); } &&
16008          { ac_try='test -s conftest.$ac_objext'
16009   { (eval echo "$as_me:16009: \"$ac_try\"") >&5
16010   (eval $ac_try) 2>&5
16011   ac_status=$?
16012   echo "$as_me:16012: \$? = $ac_status" >&5
16013   (exit $ac_status); }; }; then
16014   ac_cv_c_const=yes
16015 else
16016   echo "$as_me: failed program was:" >&5
16017 cat conftest.$ac_ext >&5
16018 ac_cv_c_const=no
16019 fi
16020 rm -f conftest.$ac_objext conftest.$ac_ext
16021 fi
16022 echo "$as_me:16022: result: $ac_cv_c_const" >&5
16023 echo "${ECHO_T}$ac_cv_c_const" >&6
16024 if test $ac_cv_c_const = no; then
16025
16026 cat >>confdefs.h <<\EOF
16027 #define const
16028 EOF
16029
16030 fi
16031
16032 echo "$as_me:16032: checking for inline" >&5
16033 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16034 if test "${ac_cv_c_inline+set}" = set; then
16035   echo $ECHO_N "(cached) $ECHO_C" >&6
16036 else
16037   ac_cv_c_inline=no
16038 for ac_kw in inline __inline__ __inline; do
16039   cat >conftest.$ac_ext <<_ACEOF
16040 #line 16040 "configure"
16041 #include "confdefs.h"
16042 #ifndef __cplusplus
16043 static $ac_kw int static_foo () {return 0; }
16044 $ac_kw int foo () {return 0; }
16045 #endif
16046
16047 _ACEOF
16048 rm -f conftest.$ac_objext
16049 if { (eval echo "$as_me:16049: \"$ac_compile\"") >&5
16050   (eval $ac_compile) 2>&5
16051   ac_status=$?
16052   echo "$as_me:16052: \$? = $ac_status" >&5
16053   (exit $ac_status); } &&
16054          { ac_try='test -s conftest.$ac_objext'
16055   { (eval echo "$as_me:16055: \"$ac_try\"") >&5
16056   (eval $ac_try) 2>&5
16057   ac_status=$?
16058   echo "$as_me:16058: \$? = $ac_status" >&5
16059   (exit $ac_status); }; }; then
16060   ac_cv_c_inline=$ac_kw; break
16061 else
16062   echo "$as_me: failed program was:" >&5
16063 cat conftest.$ac_ext >&5
16064 fi
16065 rm -f conftest.$ac_objext conftest.$ac_ext
16066 done
16067
16068 fi
16069 echo "$as_me:16069: result: $ac_cv_c_inline" >&5
16070 echo "${ECHO_T}$ac_cv_c_inline" >&6
16071 case $ac_cv_c_inline in
16072   inline | yes) ;;
16073   no)
16074 cat >>confdefs.h <<\EOF
16075 #define inline
16076 EOF
16077  ;;
16078   *)  cat >>confdefs.h <<EOF
16079 #define inline $ac_cv_c_inline
16080 EOF
16081  ;;
16082 esac
16083
16084 NCURSES_INLINE=
16085 if test "$ac_cv_c_inline" != no ; then
16086         NCURSES_INLINE=inline
16087         if test "$INTEL_COMPILER" = yes
16088         then
16089                 :
16090         elif test "$CLANG_COMPILER" = yes
16091         then
16092                 :
16093         elif test "$GCC" = yes
16094         then
16095                 echo "$as_me:16095: checking if $CC supports options to tune inlining" >&5
16096 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16097 if test "${cf_cv_gcc_inline+set}" = set; then
16098   echo $ECHO_N "(cached) $ECHO_C" >&6
16099 else
16100
16101                 cf_save_CFLAGS=$CFLAGS
16102                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16103                 cat >conftest.$ac_ext <<_ACEOF
16104 #line 16104 "configure"
16105 #include "confdefs.h"
16106 inline int foo(void) { return 1; }
16107 int
16108 main ()
16109 {
16110 ${cf_cv_main_return:-return} foo()
16111   ;
16112   return 0;
16113 }
16114 _ACEOF
16115 rm -f conftest.$ac_objext
16116 if { (eval echo "$as_me:16116: \"$ac_compile\"") >&5
16117   (eval $ac_compile) 2>&5
16118   ac_status=$?
16119   echo "$as_me:16119: \$? = $ac_status" >&5
16120   (exit $ac_status); } &&
16121          { ac_try='test -s conftest.$ac_objext'
16122   { (eval echo "$as_me:16122: \"$ac_try\"") >&5
16123   (eval $ac_try) 2>&5
16124   ac_status=$?
16125   echo "$as_me:16125: \$? = $ac_status" >&5
16126   (exit $ac_status); }; }; then
16127   cf_cv_gcc_inline=yes
16128 else
16129   echo "$as_me: failed program was:" >&5
16130 cat conftest.$ac_ext >&5
16131 cf_cv_gcc_inline=no
16132 fi
16133 rm -f conftest.$ac_objext conftest.$ac_ext
16134                 CFLAGS=$cf_save_CFLAGS
16135
16136 fi
16137 echo "$as_me:16137: result: $cf_cv_gcc_inline" >&5
16138 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16139                 if test "$cf_cv_gcc_inline" = yes ; then
16140
16141 cf_fix_cppflags=no
16142 cf_new_cflags=
16143 cf_new_cppflags=
16144 cf_new_extra_cppflags=
16145
16146 for cf_add_cflags in --param max-inline-insns-single=1200
16147 do
16148 case $cf_fix_cppflags in
16149 (no)
16150         case $cf_add_cflags in
16151         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16152                 case $cf_add_cflags in
16153                 (-D*)
16154                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16155
16156                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16157                                 && test -z "${cf_tst_cflags}" \
16158                                 && cf_fix_cppflags=yes
16159
16160                         if test $cf_fix_cppflags = yes ; then
16161                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16162                                 continue
16163                         elif test "${cf_tst_cflags}" = "\"'" ; then
16164                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16165                                 continue
16166                         fi
16167                         ;;
16168                 esac
16169                 case "$CPPFLAGS" in
16170                 (*$cf_add_cflags)
16171                         ;;
16172                 (*)
16173                         case $cf_add_cflags in
16174                         (-D*)
16175                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16176
16177 CPPFLAGS=`echo "$CPPFLAGS" | \
16178         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16179                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16180
16181                                 ;;
16182                         esac
16183                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16184                         ;;
16185                 esac
16186                 ;;
16187         (*)
16188                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16189                 ;;
16190         esac
16191         ;;
16192 (yes)
16193         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16194
16195         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16196
16197         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16198                 && test -z "${cf_tst_cflags}" \
16199                 && cf_fix_cppflags=no
16200         ;;
16201 esac
16202 done
16203
16204 if test -n "$cf_new_cflags" ; then
16205
16206         CFLAGS="$CFLAGS $cf_new_cflags"
16207 fi
16208
16209 if test -n "$cf_new_cppflags" ; then
16210
16211         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16212 fi
16213
16214 if test -n "$cf_new_extra_cppflags" ; then
16215
16216         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16217 fi
16218
16219                 fi
16220         fi
16221 fi
16222
16223 echo "$as_me:16223: checking for signal global datatype" >&5
16224 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16225 if test "${cf_cv_sig_atomic_t+set}" = set; then
16226   echo $ECHO_N "(cached) $ECHO_C" >&6
16227 else
16228
16229         for cf_type in \
16230                 "volatile sig_atomic_t" \
16231                 "sig_atomic_t" \
16232                 "int"
16233         do
16234         cat >conftest.$ac_ext <<_ACEOF
16235 #line 16235 "configure"
16236 #include "confdefs.h"
16237
16238 #include <sys/types.h>
16239 #include <signal.h>
16240 #include <stdio.h>
16241
16242 extern $cf_type x;
16243 $cf_type x;
16244 static void handler(int sig)
16245 {
16246         x = 5;
16247 }
16248 int
16249 main ()
16250 {
16251 signal(SIGINT, handler);
16252                  x = 1
16253   ;
16254   return 0;
16255 }
16256 _ACEOF
16257 rm -f conftest.$ac_objext
16258 if { (eval echo "$as_me:16258: \"$ac_compile\"") >&5
16259   (eval $ac_compile) 2>&5
16260   ac_status=$?
16261   echo "$as_me:16261: \$? = $ac_status" >&5
16262   (exit $ac_status); } &&
16263          { ac_try='test -s conftest.$ac_objext'
16264   { (eval echo "$as_me:16264: \"$ac_try\"") >&5
16265   (eval $ac_try) 2>&5
16266   ac_status=$?
16267   echo "$as_me:16267: \$? = $ac_status" >&5
16268   (exit $ac_status); }; }; then
16269   cf_cv_sig_atomic_t=$cf_type
16270 else
16271   echo "$as_me: failed program was:" >&5
16272 cat conftest.$ac_ext >&5
16273 cf_cv_sig_atomic_t=no
16274 fi
16275 rm -f conftest.$ac_objext conftest.$ac_ext
16276                 test "$cf_cv_sig_atomic_t" != no && break
16277         done
16278
16279 fi
16280
16281 echo "$as_me:16281: result: $cf_cv_sig_atomic_t" >&5
16282 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16283 test "$cf_cv_sig_atomic_t" != no &&
16284 cat >>confdefs.h <<EOF
16285 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16286 EOF
16287
16288 if test $NCURSES_CHTYPE = auto ; then
16289
16290 echo "$as_me:16290: checking for type of chtype" >&5
16291 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16292 if test "${cf_cv_typeof_chtype+set}" = set; then
16293   echo $ECHO_N "(cached) $ECHO_C" >&6
16294 else
16295
16296                 if test "$cross_compiling" = yes; then
16297   cf_cv_typeof_chtype=long
16298 else
16299   cat >conftest.$ac_ext <<_ACEOF
16300 #line 16300 "configure"
16301 #include "confdefs.h"
16302
16303 #define WANT_BITS 31
16304 #include <stdio.h>
16305 int main()
16306 {
16307         FILE *fp = fopen("cf_test.out", "w");
16308         if (fp != 0) {
16309                 char *result = "long";
16310                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16311                         int n;
16312                         unsigned int x, y;
16313                         for (n = 0; n < WANT_BITS; n++) {
16314                                 x = (1 << n);
16315                                 y = (x >> n);
16316                                 if (y != 1 || x == 0) {
16317                                         x = 0;
16318                                         break;
16319                                 }
16320                         }
16321                         /*
16322                          * If x is nonzero, an int is big enough for the bits
16323                          * that we want.
16324                          */
16325                         result = (x != 0) ? "int" : "long";
16326                 }
16327                 fputs(result, fp);
16328                 fclose(fp);
16329         }
16330         ${cf_cv_main_return:-return}(0);
16331 }
16332
16333 _ACEOF
16334 rm -f conftest$ac_exeext
16335 if { (eval echo "$as_me:16335: \"$ac_link\"") >&5
16336   (eval $ac_link) 2>&5
16337   ac_status=$?
16338   echo "$as_me:16338: \$? = $ac_status" >&5
16339   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16340   { (eval echo "$as_me:16340: \"$ac_try\"") >&5
16341   (eval $ac_try) 2>&5
16342   ac_status=$?
16343   echo "$as_me:16343: \$? = $ac_status" >&5
16344   (exit $ac_status); }; }; then
16345   cf_cv_typeof_chtype=`cat cf_test.out`
16346 else
16347   echo "$as_me: program exited with status $ac_status" >&5
16348 echo "$as_me: failed program was:" >&5
16349 cat conftest.$ac_ext >&5
16350 cf_cv_typeof_chtype=long
16351 fi
16352 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16353 fi
16354                 rm -f cf_test.out
16355
16356 fi
16357
16358 echo "$as_me:16358: result: $cf_cv_typeof_chtype" >&5
16359 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16360
16361 cat >>confdefs.h <<EOF
16362 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16363 EOF
16364
16365 else
16366         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16367 fi
16368 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16369
16370 echo "$as_me:16370: checking if unsigned literals are legal" >&5
16371 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16372 if test "${cf_cv_unsigned_literals+set}" = set; then
16373   echo $ECHO_N "(cached) $ECHO_C" >&6
16374 else
16375
16376         cat >conftest.$ac_ext <<_ACEOF
16377 #line 16377 "configure"
16378 #include "confdefs.h"
16379
16380 int
16381 main ()
16382 {
16383 long x = 1L + 1UL + 1U + 1
16384   ;
16385   return 0;
16386 }
16387 _ACEOF
16388 rm -f conftest.$ac_objext
16389 if { (eval echo "$as_me:16389: \"$ac_compile\"") >&5
16390   (eval $ac_compile) 2>&5
16391   ac_status=$?
16392   echo "$as_me:16392: \$? = $ac_status" >&5
16393   (exit $ac_status); } &&
16394          { ac_try='test -s conftest.$ac_objext'
16395   { (eval echo "$as_me:16395: \"$ac_try\"") >&5
16396   (eval $ac_try) 2>&5
16397   ac_status=$?
16398   echo "$as_me:16398: \$? = $ac_status" >&5
16399   (exit $ac_status); }; }; then
16400   cf_cv_unsigned_literals=yes
16401 else
16402   echo "$as_me: failed program was:" >&5
16403 cat conftest.$ac_ext >&5
16404 cf_cv_unsigned_literals=no
16405 fi
16406 rm -f conftest.$ac_objext conftest.$ac_ext
16407
16408 fi
16409
16410 echo "$as_me:16410: result: $cf_cv_unsigned_literals" >&5
16411 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16412
16413 cf_cv_1UL="1"
16414 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16415 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16416
16417 if test $NCURSES_MMASK_T = auto ; then
16418         cf_cv_typeof_mmask_t=long
16419 else
16420         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16421 fi
16422 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16423
16424 ###     Checks for external-data
16425
16426 echo "$as_me:16426: checking if external errno is declared" >&5
16427 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16428 if test "${cf_cv_dcl_errno+set}" = set; then
16429   echo $ECHO_N "(cached) $ECHO_C" >&6
16430 else
16431
16432         cat >conftest.$ac_ext <<_ACEOF
16433 #line 16433 "configure"
16434 #include "confdefs.h"
16435
16436 #ifdef HAVE_STDLIB_H
16437 #include <stdlib.h>
16438 #endif
16439 #include <stdio.h>
16440 #include <sys/types.h>
16441 #include <errno.h>
16442 int
16443 main ()
16444 {
16445 int x = (int) errno
16446   ;
16447   return 0;
16448 }
16449 _ACEOF
16450 rm -f conftest.$ac_objext
16451 if { (eval echo "$as_me:16451: \"$ac_compile\"") >&5
16452   (eval $ac_compile) 2>&5
16453   ac_status=$?
16454   echo "$as_me:16454: \$? = $ac_status" >&5
16455   (exit $ac_status); } &&
16456          { ac_try='test -s conftest.$ac_objext'
16457   { (eval echo "$as_me:16457: \"$ac_try\"") >&5
16458   (eval $ac_try) 2>&5
16459   ac_status=$?
16460   echo "$as_me:16460: \$? = $ac_status" >&5
16461   (exit $ac_status); }; }; then
16462   cf_cv_dcl_errno=yes
16463 else
16464   echo "$as_me: failed program was:" >&5
16465 cat conftest.$ac_ext >&5
16466 cf_cv_dcl_errno=no
16467 fi
16468 rm -f conftest.$ac_objext conftest.$ac_ext
16469
16470 fi
16471 echo "$as_me:16471: result: $cf_cv_dcl_errno" >&5
16472 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16473
16474 if test "$cf_cv_dcl_errno" = no ; then
16475
16476 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16477
16478         cat >>confdefs.h <<EOF
16479 #define $cf_result 1
16480 EOF
16481
16482 fi
16483
16484 # It's possible (for near-UNIX clones) that the data doesn't exist
16485
16486 echo "$as_me:16486: checking if external errno exists" >&5
16487 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16488 if test "${cf_cv_have_errno+set}" = set; then
16489   echo $ECHO_N "(cached) $ECHO_C" >&6
16490 else
16491
16492         cat >conftest.$ac_ext <<_ACEOF
16493 #line 16493 "configure"
16494 #include "confdefs.h"
16495
16496 #undef errno
16497 extern int errno;
16498
16499 int
16500 main ()
16501 {
16502 errno = 2
16503   ;
16504   return 0;
16505 }
16506 _ACEOF
16507 rm -f conftest.$ac_objext conftest$ac_exeext
16508 if { (eval echo "$as_me:16508: \"$ac_link\"") >&5
16509   (eval $ac_link) 2>&5
16510   ac_status=$?
16511   echo "$as_me:16511: \$? = $ac_status" >&5
16512   (exit $ac_status); } &&
16513          { ac_try='test -s conftest$ac_exeext'
16514   { (eval echo "$as_me:16514: \"$ac_try\"") >&5
16515   (eval $ac_try) 2>&5
16516   ac_status=$?
16517   echo "$as_me:16517: \$? = $ac_status" >&5
16518   (exit $ac_status); }; }; then
16519   cf_cv_have_errno=yes
16520 else
16521   echo "$as_me: failed program was:" >&5
16522 cat conftest.$ac_ext >&5
16523 cf_cv_have_errno=no
16524 fi
16525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16526
16527 fi
16528 echo "$as_me:16528: result: $cf_cv_have_errno" >&5
16529 echo "${ECHO_T}$cf_cv_have_errno" >&6
16530
16531 if test "$cf_cv_have_errno" = yes ; then
16532
16533 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16534
16535         cat >>confdefs.h <<EOF
16536 #define $cf_result 1
16537 EOF
16538
16539 fi
16540
16541 echo "$as_me:16541: checking if data-only library module links" >&5
16542 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16543 if test "${cf_cv_link_dataonly+set}" = set; then
16544   echo $ECHO_N "(cached) $ECHO_C" >&6
16545 else
16546
16547         rm -f conftest.a
16548         cat >conftest.$ac_ext <<EOF
16549 #line 16549 "configure"
16550 int     testdata[3] = { 123, 456, 789 };
16551 EOF
16552         if { (eval echo "$as_me:16552: \"$ac_compile\"") >&5
16553   (eval $ac_compile) 2>&5
16554   ac_status=$?
16555   echo "$as_me:16555: \$? = $ac_status" >&5
16556   (exit $ac_status); } ; then
16557                 mv conftest.o data.o && \
16558                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16559         fi
16560         rm -f conftest.$ac_ext data.o
16561         cat >conftest.$ac_ext <<EOF
16562 #line 16562 "configure"
16563 int     testfunc()
16564 {
16565 #if defined(NeXT)
16566         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16567 #else
16568         extern int testdata[3];
16569         return testdata[0] == 123
16570            &&  testdata[1] == 456
16571            &&  testdata[2] == 789;
16572 #endif
16573 }
16574 EOF
16575         if { (eval echo "$as_me:16575: \"$ac_compile\"") >&5
16576   (eval $ac_compile) 2>&5
16577   ac_status=$?
16578   echo "$as_me:16578: \$? = $ac_status" >&5
16579   (exit $ac_status); }; then
16580                 mv conftest.o func.o && \
16581                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16582         fi
16583         rm -f conftest.$ac_ext func.o
16584         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16585         cf_saveLIBS="$LIBS"
16586         LIBS="conftest.a $LIBS"
16587         if test "$cross_compiling" = yes; then
16588   cf_cv_link_dataonly=unknown
16589 else
16590   cat >conftest.$ac_ext <<_ACEOF
16591 #line 16591 "configure"
16592 #include "confdefs.h"
16593
16594         int main()
16595         {
16596                 extern int testfunc();
16597                 ${cf_cv_main_return:-return} (!testfunc());
16598         }
16599
16600 _ACEOF
16601 rm -f conftest$ac_exeext
16602 if { (eval echo "$as_me:16602: \"$ac_link\"") >&5
16603   (eval $ac_link) 2>&5
16604   ac_status=$?
16605   echo "$as_me:16605: \$? = $ac_status" >&5
16606   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16607   { (eval echo "$as_me:16607: \"$ac_try\"") >&5
16608   (eval $ac_try) 2>&5
16609   ac_status=$?
16610   echo "$as_me:16610: \$? = $ac_status" >&5
16611   (exit $ac_status); }; }; then
16612   cf_cv_link_dataonly=yes
16613 else
16614   echo "$as_me: program exited with status $ac_status" >&5
16615 echo "$as_me: failed program was:" >&5
16616 cat conftest.$ac_ext >&5
16617 cf_cv_link_dataonly=no
16618 fi
16619 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16620 fi
16621         LIBS="$cf_saveLIBS"
16622
16623 fi
16624
16625 echo "$as_me:16625: result: $cf_cv_link_dataonly" >&5
16626 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16627
16628 if test "$cf_cv_link_dataonly" = no ; then
16629
16630 cat >>confdefs.h <<\EOF
16631 #define BROKEN_LINKER 1
16632 EOF
16633
16634         BROKEN_LINKER=1
16635 fi
16636
16637 ###     Checks for library functions.
16638
16639 for ac_func in \
16640 getcwd \
16641 getegid \
16642 geteuid \
16643 getopt \
16644 getttynam \
16645 issetugid \
16646 poll \
16647 putenv \
16648 remove \
16649 select \
16650 setbuf \
16651 setbuffer \
16652 setenv \
16653 setvbuf \
16654 sigaction \
16655 sigvec \
16656 strdup \
16657 strstr \
16658 tcgetpgrp \
16659 times \
16660 vsnprintf \
16661
16662 do
16663 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16664 echo "$as_me:16664: checking for $ac_func" >&5
16665 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16666 if eval "test \"\${$as_ac_var+set}\" = set"; then
16667   echo $ECHO_N "(cached) $ECHO_C" >&6
16668 else
16669   cat >conftest.$ac_ext <<_ACEOF
16670 #line 16670 "configure"
16671 #include "confdefs.h"
16672 /* System header to define __stub macros and hopefully few prototypes,
16673     which can conflict with char $ac_func (); below.  */
16674 #include <assert.h>
16675 /* Override any gcc2 internal prototype to avoid an error.  */
16676 #ifdef __cplusplus
16677 extern "C"
16678 #endif
16679 /* We use char because int might match the return type of a gcc2
16680    builtin and then its argument prototype would still apply.  */
16681 char $ac_func ();
16682 char (*f) ();
16683
16684 int
16685 main ()
16686 {
16687 /* The GNU C library defines this for functions which it implements
16688     to always fail with ENOSYS.  Some functions are actually named
16689     something starting with __ and the normal name is an alias.  */
16690 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16691 choke me
16692 #else
16693 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16694 #endif
16695
16696   ;
16697   return 0;
16698 }
16699 _ACEOF
16700 rm -f conftest.$ac_objext conftest$ac_exeext
16701 if { (eval echo "$as_me:16701: \"$ac_link\"") >&5
16702   (eval $ac_link) 2>&5
16703   ac_status=$?
16704   echo "$as_me:16704: \$? = $ac_status" >&5
16705   (exit $ac_status); } &&
16706          { ac_try='test -s conftest$ac_exeext'
16707   { (eval echo "$as_me:16707: \"$ac_try\"") >&5
16708   (eval $ac_try) 2>&5
16709   ac_status=$?
16710   echo "$as_me:16710: \$? = $ac_status" >&5
16711   (exit $ac_status); }; }; then
16712   eval "$as_ac_var=yes"
16713 else
16714   echo "$as_me: failed program was:" >&5
16715 cat conftest.$ac_ext >&5
16716 eval "$as_ac_var=no"
16717 fi
16718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16719 fi
16720 echo "$as_me:16720: result: `eval echo '${'$as_ac_var'}'`" >&5
16721 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16722 if test `eval echo '${'$as_ac_var'}'` = yes; then
16723   cat >>confdefs.h <<EOF
16724 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16725 EOF
16726
16727 fi
16728 done
16729
16730 if test "x$ac_cv_func_getopt" = xno &&
16731    test "x$cf_with_progs$cf_with_tests" != xnono; then
16732         { { echo "$as_me:16732: error: getopt is required for building programs" >&5
16733 echo "$as_me: error: getopt is required for building programs" >&2;}
16734    { (exit 1); exit 1; }; }
16735 fi
16736
16737 if test "x$with_getcap" = "xyes" ; then
16738
16739 echo "$as_me:16739: checking for terminal-capability database functions" >&5
16740 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16741 if test "${cf_cv_cgetent+set}" = set; then
16742   echo $ECHO_N "(cached) $ECHO_C" >&6
16743 else
16744
16745 cat >conftest.$ac_ext <<_ACEOF
16746 #line 16746 "configure"
16747 #include "confdefs.h"
16748
16749 #include <stdlib.h>
16750 int
16751 main ()
16752 {
16753
16754         char temp[128];
16755         char *buf = temp;
16756         char *db_array = temp;
16757         cgetent(&buf, &db_array, "vt100");
16758         cgetcap(buf, "tc", '=');
16759         cgetmatch(buf, "tc");
16760
16761   ;
16762   return 0;
16763 }
16764 _ACEOF
16765 rm -f conftest.$ac_objext conftest$ac_exeext
16766 if { (eval echo "$as_me:16766: \"$ac_link\"") >&5
16767   (eval $ac_link) 2>&5
16768   ac_status=$?
16769   echo "$as_me:16769: \$? = $ac_status" >&5
16770   (exit $ac_status); } &&
16771          { ac_try='test -s conftest$ac_exeext'
16772   { (eval echo "$as_me:16772: \"$ac_try\"") >&5
16773   (eval $ac_try) 2>&5
16774   ac_status=$?
16775   echo "$as_me:16775: \$? = $ac_status" >&5
16776   (exit $ac_status); }; }; then
16777   cf_cv_cgetent=yes
16778 else
16779   echo "$as_me: failed program was:" >&5
16780 cat conftest.$ac_ext >&5
16781 cf_cv_cgetent=no
16782 fi
16783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16784
16785 fi
16786 echo "$as_me:16786: result: $cf_cv_cgetent" >&5
16787 echo "${ECHO_T}$cf_cv_cgetent" >&6
16788
16789 if test "$cf_cv_cgetent" = yes
16790 then
16791
16792 cat >>confdefs.h <<\EOF
16793 #define HAVE_BSD_CGETENT 1
16794 EOF
16795
16796 echo "$as_me:16796: checking if cgetent uses const parameter" >&5
16797 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16798 if test "${cf_cv_cgetent_const+set}" = set; then
16799   echo $ECHO_N "(cached) $ECHO_C" >&6
16800 else
16801
16802 cat >conftest.$ac_ext <<_ACEOF
16803 #line 16803 "configure"
16804 #include "confdefs.h"
16805
16806 #include <stdlib.h>
16807 int
16808 main ()
16809 {
16810
16811         char temp[128];
16812         char *buf = temp;
16813 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16814         const char *db_array = temp;
16815         cgetent(&buf, &db_array, "vt100");
16816 #endif
16817         cgetcap(buf, "tc", '=');
16818         cgetmatch(buf, "tc");
16819
16820   ;
16821   return 0;
16822 }
16823 _ACEOF
16824 rm -f conftest.$ac_objext conftest$ac_exeext
16825 if { (eval echo "$as_me:16825: \"$ac_link\"") >&5
16826   (eval $ac_link) 2>&5
16827   ac_status=$?
16828   echo "$as_me:16828: \$? = $ac_status" >&5
16829   (exit $ac_status); } &&
16830          { ac_try='test -s conftest$ac_exeext'
16831   { (eval echo "$as_me:16831: \"$ac_try\"") >&5
16832   (eval $ac_try) 2>&5
16833   ac_status=$?
16834   echo "$as_me:16834: \$? = $ac_status" >&5
16835   (exit $ac_status); }; }; then
16836   cf_cv_cgetent_const=yes
16837 else
16838   echo "$as_me: failed program was:" >&5
16839 cat conftest.$ac_ext >&5
16840 cf_cv_cgetent_const=no
16841 fi
16842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16843
16844 fi
16845 echo "$as_me:16845: result: $cf_cv_cgetent_const" >&5
16846 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16847         if test "$cf_cv_cgetent_const" = yes
16848         then
16849
16850 cat >>confdefs.h <<EOF
16851 #define CGETENT_CONST const
16852 EOF
16853
16854         fi
16855 fi
16856
16857 fi
16858
16859 echo "$as_me:16859: checking for isascii" >&5
16860 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16861 if test "${cf_cv_have_isascii+set}" = set; then
16862   echo $ECHO_N "(cached) $ECHO_C" >&6
16863 else
16864
16865         cat >conftest.$ac_ext <<_ACEOF
16866 #line 16866 "configure"
16867 #include "confdefs.h"
16868 #include <ctype.h>
16869 int
16870 main ()
16871 {
16872 int x = isascii(' ')
16873   ;
16874   return 0;
16875 }
16876 _ACEOF
16877 rm -f conftest.$ac_objext conftest$ac_exeext
16878 if { (eval echo "$as_me:16878: \"$ac_link\"") >&5
16879   (eval $ac_link) 2>&5
16880   ac_status=$?
16881   echo "$as_me:16881: \$? = $ac_status" >&5
16882   (exit $ac_status); } &&
16883          { ac_try='test -s conftest$ac_exeext'
16884   { (eval echo "$as_me:16884: \"$ac_try\"") >&5
16885   (eval $ac_try) 2>&5
16886   ac_status=$?
16887   echo "$as_me:16887: \$? = $ac_status" >&5
16888   (exit $ac_status); }; }; then
16889   cf_cv_have_isascii=yes
16890 else
16891   echo "$as_me: failed program was:" >&5
16892 cat conftest.$ac_ext >&5
16893 cf_cv_have_isascii=no
16894 fi
16895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16896
16897 fi
16898 echo "$as_me:16898: result: $cf_cv_have_isascii" >&5
16899 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16900 test "$cf_cv_have_isascii" = yes &&
16901 cat >>confdefs.h <<\EOF
16902 #define HAVE_ISASCII 1
16903 EOF
16904
16905 if test "$ac_cv_func_sigaction" = yes; then
16906 echo "$as_me:16906: checking whether sigaction needs _POSIX_SOURCE" >&5
16907 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16908 cat >conftest.$ac_ext <<_ACEOF
16909 #line 16909 "configure"
16910 #include "confdefs.h"
16911
16912 #include <sys/types.h>
16913 #include <signal.h>
16914 int
16915 main ()
16916 {
16917 struct sigaction act
16918   ;
16919   return 0;
16920 }
16921 _ACEOF
16922 rm -f conftest.$ac_objext
16923 if { (eval echo "$as_me:16923: \"$ac_compile\"") >&5
16924   (eval $ac_compile) 2>&5
16925   ac_status=$?
16926   echo "$as_me:16926: \$? = $ac_status" >&5
16927   (exit $ac_status); } &&
16928          { ac_try='test -s conftest.$ac_objext'
16929   { (eval echo "$as_me:16929: \"$ac_try\"") >&5
16930   (eval $ac_try) 2>&5
16931   ac_status=$?
16932   echo "$as_me:16932: \$? = $ac_status" >&5
16933   (exit $ac_status); }; }; then
16934   sigact_bad=no
16935 else
16936   echo "$as_me: failed program was:" >&5
16937 cat conftest.$ac_ext >&5
16938
16939 cat >conftest.$ac_ext <<_ACEOF
16940 #line 16940 "configure"
16941 #include "confdefs.h"
16942
16943 #define _POSIX_SOURCE
16944 #include <sys/types.h>
16945 #include <signal.h>
16946 int
16947 main ()
16948 {
16949 struct sigaction act
16950   ;
16951   return 0;
16952 }
16953 _ACEOF
16954 rm -f conftest.$ac_objext
16955 if { (eval echo "$as_me:16955: \"$ac_compile\"") >&5
16956   (eval $ac_compile) 2>&5
16957   ac_status=$?
16958   echo "$as_me:16958: \$? = $ac_status" >&5
16959   (exit $ac_status); } &&
16960          { ac_try='test -s conftest.$ac_objext'
16961   { (eval echo "$as_me:16961: \"$ac_try\"") >&5
16962   (eval $ac_try) 2>&5
16963   ac_status=$?
16964   echo "$as_me:16964: \$? = $ac_status" >&5
16965   (exit $ac_status); }; }; then
16966   sigact_bad=yes
16967
16968 cat >>confdefs.h <<\EOF
16969 #define _POSIX_SOURCE 1
16970 EOF
16971
16972 else
16973   echo "$as_me: failed program was:" >&5
16974 cat conftest.$ac_ext >&5
16975 sigact_bad=unknown
16976 fi
16977 rm -f conftest.$ac_objext conftest.$ac_ext
16978 fi
16979 rm -f conftest.$ac_objext conftest.$ac_ext
16980 echo "$as_me:16980: result: $sigact_bad" >&5
16981 echo "${ECHO_T}$sigact_bad" >&6
16982 fi
16983
16984 echo "$as_me:16984: checking if nanosleep really works" >&5
16985 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16986 if test "${cf_cv_func_nanosleep+set}" = set; then
16987   echo $ECHO_N "(cached) $ECHO_C" >&6
16988 else
16989
16990 if test "$cross_compiling" = yes; then
16991   cf_cv_func_nanosleep=unknown
16992 else
16993   cat >conftest.$ac_ext <<_ACEOF
16994 #line 16994 "configure"
16995 #include "confdefs.h"
16996
16997 #include <stdio.h>
16998 #include <errno.h>
16999 #include <time.h>
17000
17001 #ifdef HAVE_SYS_TIME_H
17002 #include <sys/time.h>
17003 #endif
17004
17005 int main() {
17006         struct timespec ts1, ts2;
17007         int code;
17008         ts1.tv_sec  = 0;
17009         ts1.tv_nsec = 750000000;
17010         ts2.tv_sec  = 0;
17011         ts2.tv_nsec = 0;
17012         errno = 0;
17013         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17014         ${cf_cv_main_return:-return}(code != 0);
17015 }
17016
17017 _ACEOF
17018 rm -f conftest$ac_exeext
17019 if { (eval echo "$as_me:17019: \"$ac_link\"") >&5
17020   (eval $ac_link) 2>&5
17021   ac_status=$?
17022   echo "$as_me:17022: \$? = $ac_status" >&5
17023   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17024   { (eval echo "$as_me:17024: \"$ac_try\"") >&5
17025   (eval $ac_try) 2>&5
17026   ac_status=$?
17027   echo "$as_me:17027: \$? = $ac_status" >&5
17028   (exit $ac_status); }; }; then
17029   cf_cv_func_nanosleep=yes
17030 else
17031   echo "$as_me: program exited with status $ac_status" >&5
17032 echo "$as_me: failed program was:" >&5
17033 cat conftest.$ac_ext >&5
17034 cf_cv_func_nanosleep=no
17035 fi
17036 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17037 fi
17038 fi
17039 echo "$as_me:17039: result: $cf_cv_func_nanosleep" >&5
17040 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17041
17042 test "$cf_cv_func_nanosleep" = "yes" &&
17043 cat >>confdefs.h <<\EOF
17044 #define HAVE_NANOSLEEP 1
17045 EOF
17046
17047 for ac_header in \
17048 termio.h \
17049 termios.h \
17050 unistd.h \
17051
17052 do
17053 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17054 echo "$as_me:17054: checking for $ac_header" >&5
17055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17057   echo $ECHO_N "(cached) $ECHO_C" >&6
17058 else
17059   cat >conftest.$ac_ext <<_ACEOF
17060 #line 17060 "configure"
17061 #include "confdefs.h"
17062 #include <$ac_header>
17063 _ACEOF
17064 if { (eval echo "$as_me:17064: \"$ac_cpp conftest.$ac_ext\"") >&5
17065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17066   ac_status=$?
17067   egrep -v '^ *\+' conftest.er1 >conftest.err
17068   rm -f conftest.er1
17069   cat conftest.err >&5
17070   echo "$as_me:17070: \$? = $ac_status" >&5
17071   (exit $ac_status); } >/dev/null; then
17072   if test -s conftest.err; then
17073     ac_cpp_err=$ac_c_preproc_warn_flag
17074   else
17075     ac_cpp_err=
17076   fi
17077 else
17078   ac_cpp_err=yes
17079 fi
17080 if test -z "$ac_cpp_err"; then
17081   eval "$as_ac_Header=yes"
17082 else
17083   echo "$as_me: failed program was:" >&5
17084   cat conftest.$ac_ext >&5
17085   eval "$as_ac_Header=no"
17086 fi
17087 rm -f conftest.err conftest.$ac_ext
17088 fi
17089 echo "$as_me:17089: result: `eval echo '${'$as_ac_Header'}'`" >&5
17090 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17091 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17092   cat >>confdefs.h <<EOF
17093 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17094 EOF
17095
17096 fi
17097 done
17098
17099 if test "$ISC" = yes ; then
17100
17101 for ac_header in sys/termio.h
17102 do
17103 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17104 echo "$as_me:17104: checking for $ac_header" >&5
17105 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17107   echo $ECHO_N "(cached) $ECHO_C" >&6
17108 else
17109   cat >conftest.$ac_ext <<_ACEOF
17110 #line 17110 "configure"
17111 #include "confdefs.h"
17112 #include <$ac_header>
17113 _ACEOF
17114 if { (eval echo "$as_me:17114: \"$ac_cpp conftest.$ac_ext\"") >&5
17115   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17116   ac_status=$?
17117   egrep -v '^ *\+' conftest.er1 >conftest.err
17118   rm -f conftest.er1
17119   cat conftest.err >&5
17120   echo "$as_me:17120: \$? = $ac_status" >&5
17121   (exit $ac_status); } >/dev/null; then
17122   if test -s conftest.err; then
17123     ac_cpp_err=$ac_c_preproc_warn_flag
17124   else
17125     ac_cpp_err=
17126   fi
17127 else
17128   ac_cpp_err=yes
17129 fi
17130 if test -z "$ac_cpp_err"; then
17131   eval "$as_ac_Header=yes"
17132 else
17133   echo "$as_me: failed program was:" >&5
17134   cat conftest.$ac_ext >&5
17135   eval "$as_ac_Header=no"
17136 fi
17137 rm -f conftest.err conftest.$ac_ext
17138 fi
17139 echo "$as_me:17139: result: `eval echo '${'$as_ac_Header'}'`" >&5
17140 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17141 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17142   cat >>confdefs.h <<EOF
17143 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17144 EOF
17145
17146 fi
17147 done
17148
17149 fi
17150 if test "$ac_cv_header_termios_h" = yes ; then
17151         case "$CFLAGS $CPPFLAGS" in
17152         (*-D_POSIX_SOURCE*)
17153                 termios_bad=dunno ;;
17154         (*)     termios_bad=maybe ;;
17155         esac
17156         if test "$termios_bad" = maybe ; then
17157         echo "$as_me:17157: checking whether termios.h needs _POSIX_SOURCE" >&5
17158 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17159         cat >conftest.$ac_ext <<_ACEOF
17160 #line 17160 "configure"
17161 #include "confdefs.h"
17162 #include <termios.h>
17163 int
17164 main ()
17165 {
17166 struct termios foo; int x = foo.c_iflag
17167   ;
17168   return 0;
17169 }
17170 _ACEOF
17171 rm -f conftest.$ac_objext
17172 if { (eval echo "$as_me:17172: \"$ac_compile\"") >&5
17173   (eval $ac_compile) 2>&5
17174   ac_status=$?
17175   echo "$as_me:17175: \$? = $ac_status" >&5
17176   (exit $ac_status); } &&
17177          { ac_try='test -s conftest.$ac_objext'
17178   { (eval echo "$as_me:17178: \"$ac_try\"") >&5
17179   (eval $ac_try) 2>&5
17180   ac_status=$?
17181   echo "$as_me:17181: \$? = $ac_status" >&5
17182   (exit $ac_status); }; }; then
17183   termios_bad=no
17184 else
17185   echo "$as_me: failed program was:" >&5
17186 cat conftest.$ac_ext >&5
17187
17188                 cat >conftest.$ac_ext <<_ACEOF
17189 #line 17189 "configure"
17190 #include "confdefs.h"
17191
17192 #define _POSIX_SOURCE
17193 #include <termios.h>
17194 int
17195 main ()
17196 {
17197 struct termios foo; int x = foo.c_iflag
17198   ;
17199   return 0;
17200 }
17201 _ACEOF
17202 rm -f conftest.$ac_objext
17203 if { (eval echo "$as_me:17203: \"$ac_compile\"") >&5
17204   (eval $ac_compile) 2>&5
17205   ac_status=$?
17206   echo "$as_me:17206: \$? = $ac_status" >&5
17207   (exit $ac_status); } &&
17208          { ac_try='test -s conftest.$ac_objext'
17209   { (eval echo "$as_me:17209: \"$ac_try\"") >&5
17210   (eval $ac_try) 2>&5
17211   ac_status=$?
17212   echo "$as_me:17212: \$? = $ac_status" >&5
17213   (exit $ac_status); }; }; then
17214   termios_bad=unknown
17215 else
17216   echo "$as_me: failed program was:" >&5
17217 cat conftest.$ac_ext >&5
17218 termios_bad=yes
17219 cat >>confdefs.h <<\EOF
17220 #define _POSIX_SOURCE 1
17221 EOF
17222
17223 fi
17224 rm -f conftest.$ac_objext conftest.$ac_ext
17225
17226 fi
17227 rm -f conftest.$ac_objext conftest.$ac_ext
17228         echo "$as_me:17228: result: $termios_bad" >&5
17229 echo "${ECHO_T}$termios_bad" >&6
17230         fi
17231 fi
17232
17233 echo "$as_me:17233: checking for tcgetattr" >&5
17234 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17235 if test "${cf_cv_have_tcgetattr+set}" = set; then
17236   echo $ECHO_N "(cached) $ECHO_C" >&6
17237 else
17238
17239 cat >conftest.$ac_ext <<_ACEOF
17240 #line 17240 "configure"
17241 #include "confdefs.h"
17242
17243 #include <sys/types.h>
17244 #ifdef HAVE_UNISTD_H
17245 #include <unistd.h>
17246 #endif
17247 #ifdef HAVE_TERMIOS_H
17248 #include <termios.h>
17249 #define TTY struct termios
17250 #else
17251 #ifdef HAVE_TERMIO_H
17252 #include <termio.h>
17253 #define TTY struct termio
17254 #endif
17255 #endif
17256
17257 int
17258 main ()
17259 {
17260
17261 TTY foo;
17262 tcgetattr(1, &foo);
17263   ;
17264   return 0;
17265 }
17266 _ACEOF
17267 rm -f conftest.$ac_objext conftest$ac_exeext
17268 if { (eval echo "$as_me:17268: \"$ac_link\"") >&5
17269   (eval $ac_link) 2>&5
17270   ac_status=$?
17271   echo "$as_me:17271: \$? = $ac_status" >&5
17272   (exit $ac_status); } &&
17273          { ac_try='test -s conftest$ac_exeext'
17274   { (eval echo "$as_me:17274: \"$ac_try\"") >&5
17275   (eval $ac_try) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit $ac_status); }; }; then
17279   cf_cv_have_tcgetattr=yes
17280 else
17281   echo "$as_me: failed program was:" >&5
17282 cat conftest.$ac_ext >&5
17283 cf_cv_have_tcgetattr=no
17284 fi
17285 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17286 fi
17287 echo "$as_me:17287: result: $cf_cv_have_tcgetattr" >&5
17288 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17289 test "$cf_cv_have_tcgetattr" = yes &&
17290 cat >>confdefs.h <<\EOF
17291 #define HAVE_TCGETATTR 1
17292 EOF
17293
17294 echo "$as_me:17294: checking for vsscanf function or workaround" >&5
17295 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17296 if test "${cf_cv_func_vsscanf+set}" = set; then
17297   echo $ECHO_N "(cached) $ECHO_C" >&6
17298 else
17299
17300 cat >conftest.$ac_ext <<_ACEOF
17301 #line 17301 "configure"
17302 #include "confdefs.h"
17303
17304 #include <stdarg.h>
17305 #include <stdio.h>
17306 int
17307 main ()
17308 {
17309
17310         va_list ap;
17311         vsscanf("from", "%d", ap)
17312   ;
17313   return 0;
17314 }
17315 _ACEOF
17316 rm -f conftest.$ac_objext conftest$ac_exeext
17317 if { (eval echo "$as_me:17317: \"$ac_link\"") >&5
17318   (eval $ac_link) 2>&5
17319   ac_status=$?
17320   echo "$as_me:17320: \$? = $ac_status" >&5
17321   (exit $ac_status); } &&
17322          { ac_try='test -s conftest$ac_exeext'
17323   { (eval echo "$as_me:17323: \"$ac_try\"") >&5
17324   (eval $ac_try) 2>&5
17325   ac_status=$?
17326   echo "$as_me:17326: \$? = $ac_status" >&5
17327   (exit $ac_status); }; }; then
17328   cf_cv_func_vsscanf=vsscanf
17329 else
17330   echo "$as_me: failed program was:" >&5
17331 cat conftest.$ac_ext >&5
17332
17333 cat >conftest.$ac_ext <<_ACEOF
17334 #line 17334 "configure"
17335 #include "confdefs.h"
17336
17337 #include <stdarg.h>
17338 #include <stdio.h>
17339 int
17340 main ()
17341 {
17342
17343         FILE strbuf;
17344         char *str = "from";
17345
17346         strbuf._flag = _IOREAD;
17347         strbuf._ptr = strbuf._base = (unsigned char *) str;
17348         strbuf._cnt = strlen(str);
17349         strbuf._file = _NFILE;
17350         return (vfscanf(&strbuf, "%d", ap))
17351   ;
17352   return 0;
17353 }
17354 _ACEOF
17355 rm -f conftest.$ac_objext conftest$ac_exeext
17356 if { (eval echo "$as_me:17356: \"$ac_link\"") >&5
17357   (eval $ac_link) 2>&5
17358   ac_status=$?
17359   echo "$as_me:17359: \$? = $ac_status" >&5
17360   (exit $ac_status); } &&
17361          { ac_try='test -s conftest$ac_exeext'
17362   { (eval echo "$as_me:17362: \"$ac_try\"") >&5
17363   (eval $ac_try) 2>&5
17364   ac_status=$?
17365   echo "$as_me:17365: \$? = $ac_status" >&5
17366   (exit $ac_status); }; }; then
17367   cf_cv_func_vsscanf=vfscanf
17368 else
17369   echo "$as_me: failed program was:" >&5
17370 cat conftest.$ac_ext >&5
17371
17372 cat >conftest.$ac_ext <<_ACEOF
17373 #line 17373 "configure"
17374 #include "confdefs.h"
17375
17376 #include <stdarg.h>
17377 #include <stdio.h>
17378 int
17379 main ()
17380 {
17381
17382         FILE strbuf;
17383         char *str = "from";
17384
17385         strbuf._flag = _IOREAD;
17386         strbuf._ptr = strbuf._base = (unsigned char *) str;
17387         strbuf._cnt = strlen(str);
17388         strbuf._file = _NFILE;
17389         return (_doscan(&strbuf, "%d", ap))
17390   ;
17391   return 0;
17392 }
17393 _ACEOF
17394 rm -f conftest.$ac_objext conftest$ac_exeext
17395 if { (eval echo "$as_me:17395: \"$ac_link\"") >&5
17396   (eval $ac_link) 2>&5
17397   ac_status=$?
17398   echo "$as_me:17398: \$? = $ac_status" >&5
17399   (exit $ac_status); } &&
17400          { ac_try='test -s conftest$ac_exeext'
17401   { (eval echo "$as_me:17401: \"$ac_try\"") >&5
17402   (eval $ac_try) 2>&5
17403   ac_status=$?
17404   echo "$as_me:17404: \$? = $ac_status" >&5
17405   (exit $ac_status); }; }; then
17406   cf_cv_func_vsscanf=_doscan
17407 else
17408   echo "$as_me: failed program was:" >&5
17409 cat conftest.$ac_ext >&5
17410
17411 cf_cv_func_vsscanf=no
17412 fi
17413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17414 fi
17415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17416 fi
17417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17418 fi
17419 echo "$as_me:17419: result: $cf_cv_func_vsscanf" >&5
17420 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17421
17422 case $cf_cv_func_vsscanf in
17423 (vsscanf)
17424 cat >>confdefs.h <<\EOF
17425 #define HAVE_VSSCANF 1
17426 EOF
17427 ;;
17428 (vfscanf)
17429 cat >>confdefs.h <<\EOF
17430 #define HAVE_VFSCANF 1
17431 EOF
17432 ;;
17433 (_doscan)
17434 cat >>confdefs.h <<\EOF
17435 #define HAVE__DOSCAN 1
17436 EOF
17437 ;;
17438 esac
17439
17440 echo "$as_me:17440: checking for working mkstemp" >&5
17441 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17442 if test "${cf_cv_func_mkstemp+set}" = set; then
17443   echo $ECHO_N "(cached) $ECHO_C" >&6
17444 else
17445
17446 rm -rf conftest*
17447 if test "$cross_compiling" = yes; then
17448   cf_cv_func_mkstemp=maybe
17449 else
17450   cat >conftest.$ac_ext <<_ACEOF
17451 #line 17451 "configure"
17452 #include "confdefs.h"
17453
17454 #include <sys/types.h>
17455 #include <stdlib.h>
17456 #include <stdio.h>
17457 #include <string.h>
17458 #include <sys/stat.h>
17459 int main()
17460 {
17461         char *tmpl = "conftestXXXXXX";
17462         char name[2][80];
17463         int n;
17464         int result = 0;
17465         int fd;
17466         struct stat sb;
17467
17468         umask(077);
17469         for (n = 0; n < 2; ++n) {
17470                 strcpy(name[n], tmpl);
17471                 if ((fd = mkstemp(name[n])) >= 0) {
17472                         if (!strcmp(name[n], tmpl)
17473                          || stat(name[n], &sb) != 0
17474                          || (sb.st_mode & S_IFMT) != S_IFREG
17475                          || (sb.st_mode & 077) != 0) {
17476                                 result = 1;
17477                         }
17478                         close(fd);
17479                 }
17480         }
17481         if (result == 0
17482          && !strcmp(name[0], name[1]))
17483                 result = 1;
17484         ${cf_cv_main_return:-return}(result);
17485 }
17486
17487 _ACEOF
17488 rm -f conftest$ac_exeext
17489 if { (eval echo "$as_me:17489: \"$ac_link\"") >&5
17490   (eval $ac_link) 2>&5
17491   ac_status=$?
17492   echo "$as_me:17492: \$? = $ac_status" >&5
17493   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17494   { (eval echo "$as_me:17494: \"$ac_try\"") >&5
17495   (eval $ac_try) 2>&5
17496   ac_status=$?
17497   echo "$as_me:17497: \$? = $ac_status" >&5
17498   (exit $ac_status); }; }; then
17499   cf_cv_func_mkstemp=yes
17500
17501 else
17502   echo "$as_me: program exited with status $ac_status" >&5
17503 echo "$as_me: failed program was:" >&5
17504 cat conftest.$ac_ext >&5
17505 cf_cv_func_mkstemp=no
17506
17507 fi
17508 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17509 fi
17510
17511 fi
17512 echo "$as_me:17512: result: $cf_cv_func_mkstemp" >&5
17513 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17514 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17515         echo "$as_me:17515: checking for mkstemp" >&5
17516 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17517 if test "${ac_cv_func_mkstemp+set}" = set; then
17518   echo $ECHO_N "(cached) $ECHO_C" >&6
17519 else
17520   cat >conftest.$ac_ext <<_ACEOF
17521 #line 17521 "configure"
17522 #include "confdefs.h"
17523 /* System header to define __stub macros and hopefully few prototypes,
17524     which can conflict with char mkstemp (); below.  */
17525 #include <assert.h>
17526 /* Override any gcc2 internal prototype to avoid an error.  */
17527 #ifdef __cplusplus
17528 extern "C"
17529 #endif
17530 /* We use char because int might match the return type of a gcc2
17531    builtin and then its argument prototype would still apply.  */
17532 char mkstemp ();
17533 char (*f) ();
17534
17535 int
17536 main ()
17537 {
17538 /* The GNU C library defines this for functions which it implements
17539     to always fail with ENOSYS.  Some functions are actually named
17540     something starting with __ and the normal name is an alias.  */
17541 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17542 choke me
17543 #else
17544 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17545 #endif
17546
17547   ;
17548   return 0;
17549 }
17550 _ACEOF
17551 rm -f conftest.$ac_objext 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); } &&
17557          { ac_try='test -s conftest$ac_exeext'
17558   { (eval echo "$as_me:17558: \"$ac_try\"") >&5
17559   (eval $ac_try) 2>&5
17560   ac_status=$?
17561   echo "$as_me:17561: \$? = $ac_status" >&5
17562   (exit $ac_status); }; }; then
17563   ac_cv_func_mkstemp=yes
17564 else
17565   echo "$as_me: failed program was:" >&5
17566 cat conftest.$ac_ext >&5
17567 ac_cv_func_mkstemp=no
17568 fi
17569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17570 fi
17571 echo "$as_me:17571: result: $ac_cv_func_mkstemp" >&5
17572 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17573
17574 fi
17575 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17576
17577 cat >>confdefs.h <<\EOF
17578 #define HAVE_MKSTEMP 1
17579 EOF
17580
17581 fi
17582
17583 # setup for prototype of fallback for vsscanf()
17584
17585 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17586         HAVE_VSSCANF=1
17587 else
17588         HAVE_VSSCANF=0
17589 fi
17590
17591 if test "x$cross_compiling" = xyes ; then
17592         { echo "$as_me:17592: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17593 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17594 else
17595         echo "$as_me:17595: checking whether setvbuf arguments are reversed" >&5
17596 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17597 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17598   echo $ECHO_N "(cached) $ECHO_C" >&6
17599 else
17600   if test "$cross_compiling" = yes; then
17601   { { echo "$as_me:17601: error: cannot run test program while cross compiling" >&5
17602 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17603    { (exit 1); exit 1; }; }
17604 else
17605   cat >conftest.$ac_ext <<_ACEOF
17606 #line 17606 "configure"
17607 #include "confdefs.h"
17608 #include <stdio.h>
17609 /* If setvbuf has the reversed format, exit 0. */
17610 int
17611 main ()
17612 {
17613   /* This call has the arguments reversed.
17614      A reversed system may check and see that the address of main
17615      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17616   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17617     $ac_main_return(1);
17618   putc('\r', stdout);
17619   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17620 }
17621 _ACEOF
17622 rm -f conftest$ac_exeext
17623 if { (eval echo "$as_me:17623: \"$ac_link\"") >&5
17624   (eval $ac_link) 2>&5
17625   ac_status=$?
17626   echo "$as_me:17626: \$? = $ac_status" >&5
17627   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17628   { (eval echo "$as_me:17628: \"$ac_try\"") >&5
17629   (eval $ac_try) 2>&5
17630   ac_status=$?
17631   echo "$as_me:17631: \$? = $ac_status" >&5
17632   (exit $ac_status); }; }; then
17633   ac_cv_func_setvbuf_reversed=yes
17634 else
17635   echo "$as_me: program exited with status $ac_status" >&5
17636 echo "$as_me: failed program was:" >&5
17637 cat conftest.$ac_ext >&5
17638 ac_cv_func_setvbuf_reversed=no
17639 fi
17640 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17641 fi
17642 rm -f core core.* *.core
17643 fi
17644 echo "$as_me:17644: result: $ac_cv_func_setvbuf_reversed" >&5
17645 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17646 if test $ac_cv_func_setvbuf_reversed = yes; then
17647
17648 cat >>confdefs.h <<\EOF
17649 #define SETVBUF_REVERSED 1
17650 EOF
17651
17652 fi
17653
17654 fi
17655 echo "$as_me:17655: checking for intptr_t" >&5
17656 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17657 if test "${ac_cv_type_intptr_t+set}" = set; then
17658   echo $ECHO_N "(cached) $ECHO_C" >&6
17659 else
17660   cat >conftest.$ac_ext <<_ACEOF
17661 #line 17661 "configure"
17662 #include "confdefs.h"
17663 $ac_includes_default
17664 int
17665 main ()
17666 {
17667 if ((intptr_t *) 0)
17668   return 0;
17669 if (sizeof (intptr_t))
17670   return 0;
17671   ;
17672   return 0;
17673 }
17674 _ACEOF
17675 rm -f conftest.$ac_objext
17676 if { (eval echo "$as_me:17676: \"$ac_compile\"") >&5
17677   (eval $ac_compile) 2>&5
17678   ac_status=$?
17679   echo "$as_me:17679: \$? = $ac_status" >&5
17680   (exit $ac_status); } &&
17681          { ac_try='test -s conftest.$ac_objext'
17682   { (eval echo "$as_me:17682: \"$ac_try\"") >&5
17683   (eval $ac_try) 2>&5
17684   ac_status=$?
17685   echo "$as_me:17685: \$? = $ac_status" >&5
17686   (exit $ac_status); }; }; then
17687   ac_cv_type_intptr_t=yes
17688 else
17689   echo "$as_me: failed program was:" >&5
17690 cat conftest.$ac_ext >&5
17691 ac_cv_type_intptr_t=no
17692 fi
17693 rm -f conftest.$ac_objext conftest.$ac_ext
17694 fi
17695 echo "$as_me:17695: result: $ac_cv_type_intptr_t" >&5
17696 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17697 if test $ac_cv_type_intptr_t = yes; then
17698   :
17699 else
17700
17701 cat >>confdefs.h <<EOF
17702 #define intptr_t long
17703 EOF
17704
17705 fi
17706
17707 echo "$as_me:17707: checking for ssize_t" >&5
17708 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17709 if test "${ac_cv_type_ssize_t+set}" = set; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 else
17712   cat >conftest.$ac_ext <<_ACEOF
17713 #line 17713 "configure"
17714 #include "confdefs.h"
17715 $ac_includes_default
17716 int
17717 main ()
17718 {
17719 if ((ssize_t *) 0)
17720   return 0;
17721 if (sizeof (ssize_t))
17722   return 0;
17723   ;
17724   return 0;
17725 }
17726 _ACEOF
17727 rm -f conftest.$ac_objext
17728 if { (eval echo "$as_me:17728: \"$ac_compile\"") >&5
17729   (eval $ac_compile) 2>&5
17730   ac_status=$?
17731   echo "$as_me:17731: \$? = $ac_status" >&5
17732   (exit $ac_status); } &&
17733          { ac_try='test -s conftest.$ac_objext'
17734   { (eval echo "$as_me:17734: \"$ac_try\"") >&5
17735   (eval $ac_try) 2>&5
17736   ac_status=$?
17737   echo "$as_me:17737: \$? = $ac_status" >&5
17738   (exit $ac_status); }; }; then
17739   ac_cv_type_ssize_t=yes
17740 else
17741   echo "$as_me: failed program was:" >&5
17742 cat conftest.$ac_ext >&5
17743 ac_cv_type_ssize_t=no
17744 fi
17745 rm -f conftest.$ac_objext conftest.$ac_ext
17746 fi
17747 echo "$as_me:17747: result: $ac_cv_type_ssize_t" >&5
17748 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17749 if test $ac_cv_type_ssize_t = yes; then
17750   :
17751 else
17752
17753 cat >>confdefs.h <<EOF
17754 #define ssize_t int
17755 EOF
17756
17757 fi
17758
17759 echo "$as_me:17759: checking for type sigaction_t" >&5
17760 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17761 if test "${cf_cv_type_sigaction+set}" = set; then
17762   echo $ECHO_N "(cached) $ECHO_C" >&6
17763 else
17764
17765         cat >conftest.$ac_ext <<_ACEOF
17766 #line 17766 "configure"
17767 #include "confdefs.h"
17768
17769 #include <signal.h>
17770 int
17771 main ()
17772 {
17773 sigaction_t x
17774   ;
17775   return 0;
17776 }
17777 _ACEOF
17778 rm -f conftest.$ac_objext
17779 if { (eval echo "$as_me:17779: \"$ac_compile\"") >&5
17780   (eval $ac_compile) 2>&5
17781   ac_status=$?
17782   echo "$as_me:17782: \$? = $ac_status" >&5
17783   (exit $ac_status); } &&
17784          { ac_try='test -s conftest.$ac_objext'
17785   { (eval echo "$as_me:17785: \"$ac_try\"") >&5
17786   (eval $ac_try) 2>&5
17787   ac_status=$?
17788   echo "$as_me:17788: \$? = $ac_status" >&5
17789   (exit $ac_status); }; }; then
17790   cf_cv_type_sigaction=yes
17791 else
17792   echo "$as_me: failed program was:" >&5
17793 cat conftest.$ac_ext >&5
17794 cf_cv_type_sigaction=no
17795 fi
17796 rm -f conftest.$ac_objext conftest.$ac_ext
17797 fi
17798
17799 echo "$as_me:17799: result: $cf_cv_type_sigaction" >&5
17800 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17801 test "$cf_cv_type_sigaction" = yes &&
17802 cat >>confdefs.h <<\EOF
17803 #define HAVE_TYPE_SIGACTION 1
17804 EOF
17805
17806 echo "$as_me:17806: checking declaration of size-change" >&5
17807 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17808 if test "${cf_cv_sizechange+set}" = set; then
17809   echo $ECHO_N "(cached) $ECHO_C" >&6
17810 else
17811
17812         cf_cv_sizechange=unknown
17813         cf_save_CPPFLAGS="$CPPFLAGS"
17814
17815 for cf_opts in "" "NEED_PTEM_H"
17816 do
17817
17818         CPPFLAGS="$cf_save_CPPFLAGS"
17819         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17820         cat >conftest.$ac_ext <<_ACEOF
17821 #line 17821 "configure"
17822 #include "confdefs.h"
17823 #include <sys/types.h>
17824 #ifdef HAVE_TERMIOS_H
17825 #include <termios.h>
17826 #else
17827 #ifdef HAVE_TERMIO_H
17828 #include <termio.h>
17829 #endif
17830 #endif
17831 #ifdef NEED_PTEM_H
17832 /* This is a workaround for SCO:  they neglected to define struct winsize in
17833  * termios.h -- it's only in termio.h and ptem.h
17834  */
17835 #include        <sys/stream.h>
17836 #include        <sys/ptem.h>
17837 #endif
17838 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17839 #include <sys/ioctl.h>
17840 #endif
17841
17842 int
17843 main ()
17844 {
17845
17846 #ifdef TIOCGSIZE
17847         struct ttysize win;     /* FIXME: what system is this? */
17848         int y = win.ts_lines;
17849         int x = win.ts_cols;
17850 #else
17851 #ifdef TIOCGWINSZ
17852         struct winsize win;
17853         int y = win.ws_row;
17854         int x = win.ws_col;
17855 #else
17856         no TIOCGSIZE or TIOCGWINSZ
17857 #endif /* TIOCGWINSZ */
17858 #endif /* TIOCGSIZE */
17859
17860   ;
17861   return 0;
17862 }
17863 _ACEOF
17864 rm -f conftest.$ac_objext
17865 if { (eval echo "$as_me:17865: \"$ac_compile\"") >&5
17866   (eval $ac_compile) 2>&5
17867   ac_status=$?
17868   echo "$as_me:17868: \$? = $ac_status" >&5
17869   (exit $ac_status); } &&
17870          { ac_try='test -s conftest.$ac_objext'
17871   { (eval echo "$as_me:17871: \"$ac_try\"") >&5
17872   (eval $ac_try) 2>&5
17873   ac_status=$?
17874   echo "$as_me:17874: \$? = $ac_status" >&5
17875   (exit $ac_status); }; }; then
17876   cf_cv_sizechange=yes
17877 else
17878   echo "$as_me: failed program was:" >&5
17879 cat conftest.$ac_ext >&5
17880 cf_cv_sizechange=no
17881 fi
17882 rm -f conftest.$ac_objext conftest.$ac_ext
17883
17884         CPPFLAGS="$cf_save_CPPFLAGS"
17885         if test "$cf_cv_sizechange" = yes ; then
17886                 echo "size-change succeeded ($cf_opts)" >&5
17887                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17888                 break
17889         fi
17890 done
17891
17892 fi
17893 echo "$as_me:17893: result: $cf_cv_sizechange" >&5
17894 echo "${ECHO_T}$cf_cv_sizechange" >&6
17895 if test "$cf_cv_sizechange" != no ; then
17896
17897 cat >>confdefs.h <<\EOF
17898 #define HAVE_SIZECHANGE 1
17899 EOF
17900
17901         case $cf_cv_sizechange in
17902         (NEED*)
17903                 cat >>confdefs.h <<EOF
17904 #define $cf_cv_sizechange  1
17905 EOF
17906
17907                 ;;
17908         esac
17909 fi
17910
17911 echo "$as_me:17911: checking for memmove" >&5
17912 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17913 if test "${ac_cv_func_memmove+set}" = set; then
17914   echo $ECHO_N "(cached) $ECHO_C" >&6
17915 else
17916   cat >conftest.$ac_ext <<_ACEOF
17917 #line 17917 "configure"
17918 #include "confdefs.h"
17919 /* System header to define __stub macros and hopefully few prototypes,
17920     which can conflict with char memmove (); below.  */
17921 #include <assert.h>
17922 /* Override any gcc2 internal prototype to avoid an error.  */
17923 #ifdef __cplusplus
17924 extern "C"
17925 #endif
17926 /* We use char because int might match the return type of a gcc2
17927    builtin and then its argument prototype would still apply.  */
17928 char memmove ();
17929 char (*f) ();
17930
17931 int
17932 main ()
17933 {
17934 /* The GNU C library defines this for functions which it implements
17935     to always fail with ENOSYS.  Some functions are actually named
17936     something starting with __ and the normal name is an alias.  */
17937 #if defined (__stub_memmove) || defined (__stub___memmove)
17938 choke me
17939 #else
17940 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17941 #endif
17942
17943   ;
17944   return 0;
17945 }
17946 _ACEOF
17947 rm -f conftest.$ac_objext conftest$ac_exeext
17948 if { (eval echo "$as_me:17948: \"$ac_link\"") >&5
17949   (eval $ac_link) 2>&5
17950   ac_status=$?
17951   echo "$as_me:17951: \$? = $ac_status" >&5
17952   (exit $ac_status); } &&
17953          { ac_try='test -s conftest$ac_exeext'
17954   { (eval echo "$as_me:17954: \"$ac_try\"") >&5
17955   (eval $ac_try) 2>&5
17956   ac_status=$?
17957   echo "$as_me:17957: \$? = $ac_status" >&5
17958   (exit $ac_status); }; }; then
17959   ac_cv_func_memmove=yes
17960 else
17961   echo "$as_me: failed program was:" >&5
17962 cat conftest.$ac_ext >&5
17963 ac_cv_func_memmove=no
17964 fi
17965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17966 fi
17967 echo "$as_me:17967: result: $ac_cv_func_memmove" >&5
17968 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17969 if test $ac_cv_func_memmove = yes; then
17970   :
17971 else
17972
17973 echo "$as_me:17973: checking for bcopy" >&5
17974 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17975 if test "${ac_cv_func_bcopy+set}" = set; then
17976   echo $ECHO_N "(cached) $ECHO_C" >&6
17977 else
17978   cat >conftest.$ac_ext <<_ACEOF
17979 #line 17979 "configure"
17980 #include "confdefs.h"
17981 /* System header to define __stub macros and hopefully few prototypes,
17982     which can conflict with char bcopy (); below.  */
17983 #include <assert.h>
17984 /* Override any gcc2 internal prototype to avoid an error.  */
17985 #ifdef __cplusplus
17986 extern "C"
17987 #endif
17988 /* We use char because int might match the return type of a gcc2
17989    builtin and then its argument prototype would still apply.  */
17990 char bcopy ();
17991 char (*f) ();
17992
17993 int
17994 main ()
17995 {
17996 /* The GNU C library defines this for functions which it implements
17997     to always fail with ENOSYS.  Some functions are actually named
17998     something starting with __ and the normal name is an alias.  */
17999 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18000 choke me
18001 #else
18002 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18003 #endif
18004
18005   ;
18006   return 0;
18007 }
18008 _ACEOF
18009 rm -f conftest.$ac_objext conftest$ac_exeext
18010 if { (eval echo "$as_me:18010: \"$ac_link\"") >&5
18011   (eval $ac_link) 2>&5
18012   ac_status=$?
18013   echo "$as_me:18013: \$? = $ac_status" >&5
18014   (exit $ac_status); } &&
18015          { ac_try='test -s conftest$ac_exeext'
18016   { (eval echo "$as_me:18016: \"$ac_try\"") >&5
18017   (eval $ac_try) 2>&5
18018   ac_status=$?
18019   echo "$as_me:18019: \$? = $ac_status" >&5
18020   (exit $ac_status); }; }; then
18021   ac_cv_func_bcopy=yes
18022 else
18023   echo "$as_me: failed program was:" >&5
18024 cat conftest.$ac_ext >&5
18025 ac_cv_func_bcopy=no
18026 fi
18027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18028 fi
18029 echo "$as_me:18029: result: $ac_cv_func_bcopy" >&5
18030 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18031 if test $ac_cv_func_bcopy = yes; then
18032
18033         echo "$as_me:18033: checking if bcopy does overlapping moves" >&5
18034 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18035 if test "${cf_cv_good_bcopy+set}" = set; then
18036   echo $ECHO_N "(cached) $ECHO_C" >&6
18037 else
18038
18039                 if test "$cross_compiling" = yes; then
18040   cf_cv_good_bcopy=unknown
18041 else
18042   cat >conftest.$ac_ext <<_ACEOF
18043 #line 18043 "configure"
18044 #include "confdefs.h"
18045
18046 int main() {
18047         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18048         char temp[40];
18049         bcopy(data, temp, sizeof(data));
18050         bcopy(temp+10, temp, 15);
18051         bcopy(temp+5, temp+15, 10);
18052         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18053 }
18054
18055 _ACEOF
18056 rm -f conftest$ac_exeext
18057 if { (eval echo "$as_me:18057: \"$ac_link\"") >&5
18058   (eval $ac_link) 2>&5
18059   ac_status=$?
18060   echo "$as_me:18060: \$? = $ac_status" >&5
18061   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18062   { (eval echo "$as_me:18062: \"$ac_try\"") >&5
18063   (eval $ac_try) 2>&5
18064   ac_status=$?
18065   echo "$as_me:18065: \$? = $ac_status" >&5
18066   (exit $ac_status); }; }; then
18067   cf_cv_good_bcopy=yes
18068 else
18069   echo "$as_me: program exited with status $ac_status" >&5
18070 echo "$as_me: failed program was:" >&5
18071 cat conftest.$ac_ext >&5
18072 cf_cv_good_bcopy=no
18073 fi
18074 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18075 fi
18076
18077 fi
18078 echo "$as_me:18078: result: $cf_cv_good_bcopy" >&5
18079 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18080
18081 else
18082   cf_cv_good_bcopy=no
18083 fi
18084
18085         if test "$cf_cv_good_bcopy" = yes ; then
18086
18087 cat >>confdefs.h <<\EOF
18088 #define USE_OK_BCOPY 1
18089 EOF
18090
18091         else
18092
18093 cat >>confdefs.h <<\EOF
18094 #define USE_MY_MEMMOVE 1
18095 EOF
18096
18097         fi
18098
18099 fi
18100
18101 tty 2>&1 >/dev/null || {
18102 for ac_func in posix_openpt
18103 do
18104 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18105 echo "$as_me:18105: checking for $ac_func" >&5
18106 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18107 if eval "test \"\${$as_ac_var+set}\" = set"; then
18108   echo $ECHO_N "(cached) $ECHO_C" >&6
18109 else
18110   cat >conftest.$ac_ext <<_ACEOF
18111 #line 18111 "configure"
18112 #include "confdefs.h"
18113 /* System header to define __stub macros and hopefully few prototypes,
18114     which can conflict with char $ac_func (); below.  */
18115 #include <assert.h>
18116 /* Override any gcc2 internal prototype to avoid an error.  */
18117 #ifdef __cplusplus
18118 extern "C"
18119 #endif
18120 /* We use char because int might match the return type of a gcc2
18121    builtin and then its argument prototype would still apply.  */
18122 char $ac_func ();
18123 char (*f) ();
18124
18125 int
18126 main ()
18127 {
18128 /* The GNU C library defines this for functions which it implements
18129     to always fail with ENOSYS.  Some functions are actually named
18130     something starting with __ and the normal name is an alias.  */
18131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18132 choke me
18133 #else
18134 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18135 #endif
18136
18137   ;
18138   return 0;
18139 }
18140 _ACEOF
18141 rm -f conftest.$ac_objext conftest$ac_exeext
18142 if { (eval echo "$as_me:18142: \"$ac_link\"") >&5
18143   (eval $ac_link) 2>&5
18144   ac_status=$?
18145   echo "$as_me:18145: \$? = $ac_status" >&5
18146   (exit $ac_status); } &&
18147          { ac_try='test -s conftest$ac_exeext'
18148   { (eval echo "$as_me:18148: \"$ac_try\"") >&5
18149   (eval $ac_try) 2>&5
18150   ac_status=$?
18151   echo "$as_me:18151: \$? = $ac_status" >&5
18152   (exit $ac_status); }; }; then
18153   eval "$as_ac_var=yes"
18154 else
18155   echo "$as_me: failed program was:" >&5
18156 cat conftest.$ac_ext >&5
18157 eval "$as_ac_var=no"
18158 fi
18159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18160 fi
18161 echo "$as_me:18161: result: `eval echo '${'$as_ac_var'}'`" >&5
18162 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18163 if test `eval echo '${'$as_ac_var'}'` = yes; then
18164   cat >>confdefs.h <<EOF
18165 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18166 EOF
18167
18168 fi
18169 done
18170  }
18171 echo "$as_me:18171: checking if poll really works" >&5
18172 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18173 if test "${cf_cv_working_poll+set}" = set; then
18174   echo $ECHO_N "(cached) $ECHO_C" >&6
18175 else
18176
18177 if test "$cross_compiling" = yes; then
18178   cf_cv_working_poll=unknown
18179 else
18180   cat >conftest.$ac_ext <<_ACEOF
18181 #line 18181 "configure"
18182 #include "confdefs.h"
18183
18184 #include <stdlib.h>
18185 #include <stdio.h>
18186 #include <unistd.h>
18187 #include <fcntl.h>
18188 #ifdef HAVE_POLL_H
18189 #include <poll.h>
18190 #else
18191 #include <sys/poll.h>
18192 #endif
18193 int main(void) {
18194         struct pollfd myfds;
18195         int ret;
18196
18197         /* check for Darwin bug with respect to "devices" */
18198         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18199         if (myfds.fd < 0)
18200                 myfds.fd = 0;
18201         myfds.events = POLLIN;
18202         myfds.revents = 0;
18203
18204         ret = poll(&myfds, 1, 100);
18205
18206         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18207                 ret = -1;
18208         } else {
18209                 int fd = 0;
18210                 if (!isatty(fd)) {
18211                         fd = open("/dev/tty", 2);       /* O_RDWR */
18212                 }
18213 #ifdef HAVE_POSIX_OPENPT
18214                 if (fd < 0) {
18215                         fd = posix_openpt(O_RDWR);
18216                 }
18217 #endif
18218
18219                 if (fd >= 0) {
18220                         /* also check with standard input */
18221                         myfds.fd = fd;
18222                         myfds.events = POLLIN;
18223                         myfds.revents = 0;
18224                         ret = poll(&myfds, 1, 100);
18225                 } else {
18226                         ret = -1;
18227                 }
18228         }
18229         ${cf_cv_main_return:-return}(ret < 0);
18230 }
18231 _ACEOF
18232 rm -f conftest$ac_exeext
18233 if { (eval echo "$as_me:18233: \"$ac_link\"") >&5
18234   (eval $ac_link) 2>&5
18235   ac_status=$?
18236   echo "$as_me:18236: \$? = $ac_status" >&5
18237   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18238   { (eval echo "$as_me:18238: \"$ac_try\"") >&5
18239   (eval $ac_try) 2>&5
18240   ac_status=$?
18241   echo "$as_me:18241: \$? = $ac_status" >&5
18242   (exit $ac_status); }; }; then
18243   cf_cv_working_poll=yes
18244 else
18245   echo "$as_me: program exited with status $ac_status" >&5
18246 echo "$as_me: failed program was:" >&5
18247 cat conftest.$ac_ext >&5
18248 cf_cv_working_poll=no
18249 fi
18250 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18251 fi
18252 fi
18253 echo "$as_me:18253: result: $cf_cv_working_poll" >&5
18254 echo "${ECHO_T}$cf_cv_working_poll" >&6
18255 test "$cf_cv_working_poll" = "yes" &&
18256 cat >>confdefs.h <<\EOF
18257 #define HAVE_WORKING_POLL 1
18258 EOF
18259
18260 echo "$as_me:18260: checking for va_copy" >&5
18261 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18262 if test "${cf_cv_have_va_copy+set}" = set; then
18263   echo $ECHO_N "(cached) $ECHO_C" >&6
18264 else
18265
18266 cat >conftest.$ac_ext <<_ACEOF
18267 #line 18267 "configure"
18268 #include "confdefs.h"
18269
18270 #include <stdarg.h>
18271
18272 int
18273 main ()
18274 {
18275
18276         static va_list dst;
18277         static va_list src;
18278         va_copy(dst, src)
18279   ;
18280   return 0;
18281 }
18282 _ACEOF
18283 rm -f conftest.$ac_objext conftest$ac_exeext
18284 if { (eval echo "$as_me:18284: \"$ac_link\"") >&5
18285   (eval $ac_link) 2>&5
18286   ac_status=$?
18287   echo "$as_me:18287: \$? = $ac_status" >&5
18288   (exit $ac_status); } &&
18289          { ac_try='test -s conftest$ac_exeext'
18290   { (eval echo "$as_me:18290: \"$ac_try\"") >&5
18291   (eval $ac_try) 2>&5
18292   ac_status=$?
18293   echo "$as_me:18293: \$? = $ac_status" >&5
18294   (exit $ac_status); }; }; then
18295   cf_cv_have_va_copy=yes
18296 else
18297   echo "$as_me: failed program was:" >&5
18298 cat conftest.$ac_ext >&5
18299 cf_cv_have_va_copy=no
18300 fi
18301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18302 fi
18303 echo "$as_me:18303: result: $cf_cv_have_va_copy" >&5
18304 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18305
18306 test "$cf_cv_have_va_copy" = yes &&
18307 cat >>confdefs.h <<\EOF
18308 #define HAVE_VA_COPY 1
18309 EOF
18310
18311 echo "$as_me:18311: checking for __va_copy" >&5
18312 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18313 if test "${cf_cv_have___va_copy+set}" = set; then
18314   echo $ECHO_N "(cached) $ECHO_C" >&6
18315 else
18316
18317 cat >conftest.$ac_ext <<_ACEOF
18318 #line 18318 "configure"
18319 #include "confdefs.h"
18320
18321 #include <stdarg.h>
18322
18323 int
18324 main ()
18325 {
18326
18327         static va_list dst;
18328         static va_list src;
18329         __va_copy(dst, src)
18330   ;
18331   return 0;
18332 }
18333 _ACEOF
18334 rm -f conftest.$ac_objext conftest$ac_exeext
18335 if { (eval echo "$as_me:18335: \"$ac_link\"") >&5
18336   (eval $ac_link) 2>&5
18337   ac_status=$?
18338   echo "$as_me:18338: \$? = $ac_status" >&5
18339   (exit $ac_status); } &&
18340          { ac_try='test -s conftest$ac_exeext'
18341   { (eval echo "$as_me:18341: \"$ac_try\"") >&5
18342   (eval $ac_try) 2>&5
18343   ac_status=$?
18344   echo "$as_me:18344: \$? = $ac_status" >&5
18345   (exit $ac_status); }; }; then
18346   cf_cv_have___va_copy=yes
18347 else
18348   echo "$as_me: failed program was:" >&5
18349 cat conftest.$ac_ext >&5
18350 cf_cv_have___va_copy=no
18351 fi
18352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18353 fi
18354 echo "$as_me:18354: result: $cf_cv_have___va_copy" >&5
18355 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18356
18357 test "$cf_cv_have___va_copy" = yes &&
18358 cat >>confdefs.h <<\EOF
18359 #define HAVE___VA_COPY 1
18360 EOF
18361
18362 echo "$as_me:18362: checking for pid_t" >&5
18363 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18364 if test "${ac_cv_type_pid_t+set}" = set; then
18365   echo $ECHO_N "(cached) $ECHO_C" >&6
18366 else
18367   cat >conftest.$ac_ext <<_ACEOF
18368 #line 18368 "configure"
18369 #include "confdefs.h"
18370 $ac_includes_default
18371 int
18372 main ()
18373 {
18374 if ((pid_t *) 0)
18375   return 0;
18376 if (sizeof (pid_t))
18377   return 0;
18378   ;
18379   return 0;
18380 }
18381 _ACEOF
18382 rm -f conftest.$ac_objext
18383 if { (eval echo "$as_me:18383: \"$ac_compile\"") >&5
18384   (eval $ac_compile) 2>&5
18385   ac_status=$?
18386   echo "$as_me:18386: \$? = $ac_status" >&5
18387   (exit $ac_status); } &&
18388          { ac_try='test -s conftest.$ac_objext'
18389   { (eval echo "$as_me:18389: \"$ac_try\"") >&5
18390   (eval $ac_try) 2>&5
18391   ac_status=$?
18392   echo "$as_me:18392: \$? = $ac_status" >&5
18393   (exit $ac_status); }; }; then
18394   ac_cv_type_pid_t=yes
18395 else
18396   echo "$as_me: failed program was:" >&5
18397 cat conftest.$ac_ext >&5
18398 ac_cv_type_pid_t=no
18399 fi
18400 rm -f conftest.$ac_objext conftest.$ac_ext
18401 fi
18402 echo "$as_me:18402: result: $ac_cv_type_pid_t" >&5
18403 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18404 if test $ac_cv_type_pid_t = yes; then
18405   :
18406 else
18407
18408 cat >>confdefs.h <<EOF
18409 #define pid_t int
18410 EOF
18411
18412 fi
18413
18414 for ac_header in unistd.h vfork.h
18415 do
18416 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18417 echo "$as_me:18417: checking for $ac_header" >&5
18418 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18419 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18420   echo $ECHO_N "(cached) $ECHO_C" >&6
18421 else
18422   cat >conftest.$ac_ext <<_ACEOF
18423 #line 18423 "configure"
18424 #include "confdefs.h"
18425 #include <$ac_header>
18426 _ACEOF
18427 if { (eval echo "$as_me:18427: \"$ac_cpp conftest.$ac_ext\"") >&5
18428   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18429   ac_status=$?
18430   egrep -v '^ *\+' conftest.er1 >conftest.err
18431   rm -f conftest.er1
18432   cat conftest.err >&5
18433   echo "$as_me:18433: \$? = $ac_status" >&5
18434   (exit $ac_status); } >/dev/null; then
18435   if test -s conftest.err; then
18436     ac_cpp_err=$ac_c_preproc_warn_flag
18437   else
18438     ac_cpp_err=
18439   fi
18440 else
18441   ac_cpp_err=yes
18442 fi
18443 if test -z "$ac_cpp_err"; then
18444   eval "$as_ac_Header=yes"
18445 else
18446   echo "$as_me: failed program was:" >&5
18447   cat conftest.$ac_ext >&5
18448   eval "$as_ac_Header=no"
18449 fi
18450 rm -f conftest.err conftest.$ac_ext
18451 fi
18452 echo "$as_me:18452: result: `eval echo '${'$as_ac_Header'}'`" >&5
18453 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18454 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18455   cat >>confdefs.h <<EOF
18456 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18457 EOF
18458
18459 fi
18460 done
18461
18462 for ac_func in fork vfork
18463 do
18464 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18465 echo "$as_me:18465: checking for $ac_func" >&5
18466 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18467 if eval "test \"\${$as_ac_var+set}\" = set"; then
18468   echo $ECHO_N "(cached) $ECHO_C" >&6
18469 else
18470   cat >conftest.$ac_ext <<_ACEOF
18471 #line 18471 "configure"
18472 #include "confdefs.h"
18473 /* System header to define __stub macros and hopefully few prototypes,
18474     which can conflict with char $ac_func (); below.  */
18475 #include <assert.h>
18476 /* Override any gcc2 internal prototype to avoid an error.  */
18477 #ifdef __cplusplus
18478 extern "C"
18479 #endif
18480 /* We use char because int might match the return type of a gcc2
18481    builtin and then its argument prototype would still apply.  */
18482 char $ac_func ();
18483 char (*f) ();
18484
18485 int
18486 main ()
18487 {
18488 /* The GNU C library defines this for functions which it implements
18489     to always fail with ENOSYS.  Some functions are actually named
18490     something starting with __ and the normal name is an alias.  */
18491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18492 choke me
18493 #else
18494 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18495 #endif
18496
18497   ;
18498   return 0;
18499 }
18500 _ACEOF
18501 rm -f conftest.$ac_objext conftest$ac_exeext
18502 if { (eval echo "$as_me:18502: \"$ac_link\"") >&5
18503   (eval $ac_link) 2>&5
18504   ac_status=$?
18505   echo "$as_me:18505: \$? = $ac_status" >&5
18506   (exit $ac_status); } &&
18507          { ac_try='test -s conftest$ac_exeext'
18508   { (eval echo "$as_me:18508: \"$ac_try\"") >&5
18509   (eval $ac_try) 2>&5
18510   ac_status=$?
18511   echo "$as_me:18511: \$? = $ac_status" >&5
18512   (exit $ac_status); }; }; then
18513   eval "$as_ac_var=yes"
18514 else
18515   echo "$as_me: failed program was:" >&5
18516 cat conftest.$ac_ext >&5
18517 eval "$as_ac_var=no"
18518 fi
18519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18520 fi
18521 echo "$as_me:18521: result: `eval echo '${'$as_ac_var'}'`" >&5
18522 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18523 if test `eval echo '${'$as_ac_var'}'` = yes; then
18524   cat >>confdefs.h <<EOF
18525 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18526 EOF
18527
18528 fi
18529 done
18530
18531 ac_cv_func_fork_works=$ac_cv_func_fork
18532 if test "x$ac_cv_func_fork" = xyes; then
18533   echo "$as_me:18533: checking for working fork" >&5
18534 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18535 if test "${ac_cv_func_fork_works+set}" = set; then
18536   echo $ECHO_N "(cached) $ECHO_C" >&6
18537 else
18538   if test "$cross_compiling" = yes; then
18539   ac_cv_func_fork_works=cross
18540 else
18541   cat >conftest.$ac_ext <<_ACEOF
18542 /* By Rüdiger Kuhlmann. */
18543       #include <sys/types.h>
18544       #if HAVE_UNISTD_H
18545       # include <unistd.h>
18546       #endif
18547       /* Some systems only have a dummy stub for fork() */
18548       int main ()
18549       {
18550         if (fork() < 0)
18551           $ac_main_return (1);
18552         $ac_main_return (0);
18553       }
18554 _ACEOF
18555 rm -f conftest$ac_exeext
18556 if { (eval echo "$as_me:18556: \"$ac_link\"") >&5
18557   (eval $ac_link) 2>&5
18558   ac_status=$?
18559   echo "$as_me:18559: \$? = $ac_status" >&5
18560   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18561   { (eval echo "$as_me:18561: \"$ac_try\"") >&5
18562   (eval $ac_try) 2>&5
18563   ac_status=$?
18564   echo "$as_me:18564: \$? = $ac_status" >&5
18565   (exit $ac_status); }; }; then
18566   ac_cv_func_fork_works=yes
18567 else
18568   echo "$as_me: program exited with status $ac_status" >&5
18569 echo "$as_me: failed program was:" >&5
18570 cat conftest.$ac_ext >&5
18571 ac_cv_func_fork_works=no
18572 fi
18573 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18574 fi
18575 fi
18576 echo "$as_me:18576: result: $ac_cv_func_fork_works" >&5
18577 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18578
18579 fi
18580 if test "x$ac_cv_func_fork_works" = xcross; then
18581   case $host in
18582     *-*-amigaos* | *-*-msdosdjgpp*)
18583       # Override, as these systems have only a dummy fork() stub
18584       ac_cv_func_fork_works=no
18585       ;;
18586     *)
18587       ac_cv_func_fork_works=yes
18588       ;;
18589   esac
18590   { echo "$as_me:18590: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18591 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18592 fi
18593 ac_cv_func_vfork_works=$ac_cv_func_vfork
18594 if test "x$ac_cv_func_vfork" = xyes; then
18595   echo "$as_me:18595: checking for working vfork" >&5
18596 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18597 if test "${ac_cv_func_vfork_works+set}" = set; then
18598   echo $ECHO_N "(cached) $ECHO_C" >&6
18599 else
18600   if test "$cross_compiling" = yes; then
18601   ac_cv_func_vfork_works=cross
18602 else
18603   cat >conftest.$ac_ext <<_ACEOF
18604 #line 18604 "configure"
18605 #include "confdefs.h"
18606 /* Thanks to Paul Eggert for this test.  */
18607 #include <stdio.h>
18608 #include <sys/types.h>
18609 #include <sys/stat.h>
18610 #if HAVE_UNISTD_H
18611 # include <unistd.h>
18612 #endif
18613 #if HAVE_VFORK_H
18614 # include <vfork.h>
18615 #endif
18616 /* On some sparc systems, changes by the child to local and incoming
18617    argument registers are propagated back to the parent.  The compiler
18618    is told about this with #include <vfork.h>, but some compilers
18619    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18620    static variable whose address is put into a register that is
18621    clobbered by the vfork.  */
18622 static
18623 #ifdef __cplusplus
18624 sparc_address_test (int arg)
18625 # else
18626 sparc_address_test (arg) int arg;
18627 #endif
18628 {
18629   static pid_t child;
18630   if (!child) {
18631     child = vfork ();
18632     if (child < 0) {
18633       perror ("vfork");
18634       _exit(2);
18635     }
18636     if (!child) {
18637       arg = getpid();
18638       write(-1, "", 0);
18639       _exit (arg);
18640     }
18641   }
18642 }
18643
18644 int
18645 main ()
18646 {
18647   pid_t parent = getpid ();
18648   pid_t child;
18649
18650   sparc_address_test ();
18651
18652   child = vfork ();
18653
18654   if (child == 0) {
18655     /* Here is another test for sparc vfork register problems.  This
18656        test uses lots of local variables, at least as many local
18657        variables as main has allocated so far including compiler
18658        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18659        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18660        reuse the register of parent for one of the local variables,
18661        since it will think that parent can't possibly be used any more
18662        in this routine.  Assigning to the local variable will thus
18663        munge parent in the parent process.  */
18664     pid_t
18665       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18666       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18667     /* Convince the compiler that p..p7 are live; otherwise, it might
18668        use the same hardware register for all 8 local variables.  */
18669     if (p != p1 || p != p2 || p != p3 || p != p4
18670         || p != p5 || p != p6 || p != p7)
18671       _exit(1);
18672
18673     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18674        from child file descriptors.  If the child closes a descriptor
18675        before it execs or exits, this munges the parent's descriptor
18676        as well.  Test for this by closing stdout in the child.  */
18677     _exit(close(fileno(stdout)) != 0);
18678   } else {
18679     int status;
18680     struct stat st;
18681
18682     while (wait(&status) != child)
18683       ;
18684     $ac_main_return(
18685          /* Was there some problem with vforking?  */
18686          child < 0
18687
18688          /* Did the child fail?  (This shouldn't happen.)  */
18689          || status
18690
18691          /* Did the vfork/compiler bug occur?  */
18692          || parent != getpid()
18693
18694          /* Did the file descriptor bug occur?  */
18695          || fstat(fileno(stdout), &st) != 0
18696          );
18697   }
18698 }
18699 _ACEOF
18700 rm -f conftest$ac_exeext
18701 if { (eval echo "$as_me:18701: \"$ac_link\"") >&5
18702   (eval $ac_link) 2>&5
18703   ac_status=$?
18704   echo "$as_me:18704: \$? = $ac_status" >&5
18705   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18706   { (eval echo "$as_me:18706: \"$ac_try\"") >&5
18707   (eval $ac_try) 2>&5
18708   ac_status=$?
18709   echo "$as_me:18709: \$? = $ac_status" >&5
18710   (exit $ac_status); }; }; then
18711   ac_cv_func_vfork_works=yes
18712 else
18713   echo "$as_me: program exited with status $ac_status" >&5
18714 echo "$as_me: failed program was:" >&5
18715 cat conftest.$ac_ext >&5
18716 ac_cv_func_vfork_works=no
18717 fi
18718 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18719 fi
18720 fi
18721 echo "$as_me:18721: result: $ac_cv_func_vfork_works" >&5
18722 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18723
18724 fi;
18725 if test "x$ac_cv_func_fork_works" = xcross; then
18726   ac_cv_func_vfork_works=ac_cv_func_vfork
18727   { echo "$as_me:18727: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18728 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18729 fi
18730
18731 if test "x$ac_cv_func_vfork_works" = xyes; then
18732
18733 cat >>confdefs.h <<\EOF
18734 #define HAVE_WORKING_VFORK 1
18735 EOF
18736
18737 else
18738
18739 cat >>confdefs.h <<\EOF
18740 #define vfork fork
18741 EOF
18742
18743 fi
18744 if test "x$ac_cv_func_fork_works" = xyes; then
18745
18746 cat >>confdefs.h <<\EOF
18747 #define HAVE_WORKING_FORK 1
18748 EOF
18749
18750 fi
18751
18752 # special check for test/ditto.c
18753
18754 echo "$as_me:18754: checking for openpty in -lutil" >&5
18755 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18756 if test "${ac_cv_lib_util_openpty+set}" = set; then
18757   echo $ECHO_N "(cached) $ECHO_C" >&6
18758 else
18759   ac_check_lib_save_LIBS=$LIBS
18760 LIBS="-lutil  $LIBS"
18761 cat >conftest.$ac_ext <<_ACEOF
18762 #line 18762 "configure"
18763 #include "confdefs.h"
18764
18765 /* Override any gcc2 internal prototype to avoid an error.  */
18766 #ifdef __cplusplus
18767 extern "C"
18768 #endif
18769 /* We use char because int might match the return type of a gcc2
18770    builtin and then its argument prototype would still apply.  */
18771 char openpty ();
18772 int
18773 main ()
18774 {
18775 openpty ();
18776   ;
18777   return 0;
18778 }
18779 _ACEOF
18780 rm -f conftest.$ac_objext conftest$ac_exeext
18781 if { (eval echo "$as_me:18781: \"$ac_link\"") >&5
18782   (eval $ac_link) 2>&5
18783   ac_status=$?
18784   echo "$as_me:18784: \$? = $ac_status" >&5
18785   (exit $ac_status); } &&
18786          { ac_try='test -s conftest$ac_exeext'
18787   { (eval echo "$as_me:18787: \"$ac_try\"") >&5
18788   (eval $ac_try) 2>&5
18789   ac_status=$?
18790   echo "$as_me:18790: \$? = $ac_status" >&5
18791   (exit $ac_status); }; }; then
18792   ac_cv_lib_util_openpty=yes
18793 else
18794   echo "$as_me: failed program was:" >&5
18795 cat conftest.$ac_ext >&5
18796 ac_cv_lib_util_openpty=no
18797 fi
18798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18799 LIBS=$ac_check_lib_save_LIBS
18800 fi
18801 echo "$as_me:18801: result: $ac_cv_lib_util_openpty" >&5
18802 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18803 if test $ac_cv_lib_util_openpty = yes; then
18804   cf_cv_lib_util=yes
18805 else
18806   cf_cv_lib_util=no
18807 fi
18808
18809 echo "$as_me:18809: checking for openpty header" >&5
18810 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18811 if test "${cf_cv_func_openpty+set}" = set; then
18812   echo $ECHO_N "(cached) $ECHO_C" >&6
18813 else
18814
18815         cf_save_LIBS="$LIBS"
18816         test $cf_cv_lib_util = yes && {
18817 cf_add_libs="-lutil"
18818 # Filter out duplicates - this happens with badly-designed ".pc" files...
18819 for cf_add_1lib in $LIBS
18820 do
18821         for cf_add_2lib in $cf_add_libs
18822         do
18823                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18824                 then
18825                         cf_add_1lib=
18826                         break
18827                 fi
18828         done
18829         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18830 done
18831 LIBS="$cf_add_libs"
18832  }
18833         for cf_header in pty.h libutil.h util.h
18834         do
18835         cat >conftest.$ac_ext <<_ACEOF
18836 #line 18836 "configure"
18837 #include "confdefs.h"
18838
18839 #include <$cf_header>
18840
18841 int
18842 main ()
18843 {
18844
18845         int x = openpty((int *)0, (int *)0, (char *)0,
18846                                    (struct termios *)0, (struct winsize *)0);
18847
18848   ;
18849   return 0;
18850 }
18851 _ACEOF
18852 rm -f conftest.$ac_objext conftest$ac_exeext
18853 if { (eval echo "$as_me:18853: \"$ac_link\"") >&5
18854   (eval $ac_link) 2>&5
18855   ac_status=$?
18856   echo "$as_me:18856: \$? = $ac_status" >&5
18857   (exit $ac_status); } &&
18858          { ac_try='test -s conftest$ac_exeext'
18859   { (eval echo "$as_me:18859: \"$ac_try\"") >&5
18860   (eval $ac_try) 2>&5
18861   ac_status=$?
18862   echo "$as_me:18862: \$? = $ac_status" >&5
18863   (exit $ac_status); }; }; then
18864
18865                 cf_cv_func_openpty=$cf_header
18866                 break
18867
18868 else
18869   echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18871
18872                 cf_cv_func_openpty=no
18873
18874 fi
18875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18876         done
18877         LIBS="$cf_save_LIBS"
18878
18879 fi
18880 echo "$as_me:18880: result: $cf_cv_func_openpty" >&5
18881 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18882
18883 if test "$cf_cv_func_openpty" != no ; then
18884
18885 cat >>confdefs.h <<EOF
18886 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18887 EOF
18888
18889 cat >>confdefs.h <<\EOF
18890 #define USE_XTERM_PTY 1
18891 EOF
18892
18893         if test "x$cf_cv_lib_util" = xyes ; then
18894
18895 cf_add_libs="-lutil"
18896 # Filter out duplicates - this happens with badly-designed ".pc" files...
18897 for cf_add_1lib in $TEST_LIBS
18898 do
18899         for cf_add_2lib in $cf_add_libs
18900         do
18901                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18902                 then
18903                         cf_add_1lib=
18904                         break
18905                 fi
18906         done
18907         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18908 done
18909 TEST_LIBS="$cf_add_libs"
18910
18911         fi
18912 fi
18913
18914 if test "$with_hashed_db" != no ; then
18915
18916 cat >>confdefs.h <<\EOF
18917 #define USE_HASHED_DB 1
18918 EOF
18919
18920 case $with_hashed_db in
18921 (yes|*able*)
18922         ;;
18923 (*)
18924         if test -d "$with_hashed_db" ; then
18925
18926 if test -n "$with_hashed_db/include" ; then
18927   for cf_add_incdir in $with_hashed_db/include
18928   do
18929         while test $cf_add_incdir != /usr/include
18930         do
18931           if test -d $cf_add_incdir
18932           then
18933                 cf_have_incdir=no
18934                 if test -n "$CFLAGS$CPPFLAGS" ; then
18935                   # a loop is needed to ensure we can add subdirs of existing dirs
18936                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18937                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18938                           cf_have_incdir=yes; break
18939                         fi
18940                   done
18941                 fi
18942
18943                 if test "$cf_have_incdir" = no ; then
18944                   if test "$cf_add_incdir" = /usr/local/include ; then
18945                         if test "$GCC" = yes
18946                         then
18947                           cf_save_CPPFLAGS=$CPPFLAGS
18948                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18949                           cat >conftest.$ac_ext <<_ACEOF
18950 #line 18950 "configure"
18951 #include "confdefs.h"
18952 #include <stdio.h>
18953 int
18954 main ()
18955 {
18956 printf("Hello")
18957   ;
18958   return 0;
18959 }
18960 _ACEOF
18961 rm -f conftest.$ac_objext
18962 if { (eval echo "$as_me:18962: \"$ac_compile\"") >&5
18963   (eval $ac_compile) 2>&5
18964   ac_status=$?
18965   echo "$as_me:18965: \$? = $ac_status" >&5
18966   (exit $ac_status); } &&
18967          { ac_try='test -s conftest.$ac_objext'
18968   { (eval echo "$as_me:18968: \"$ac_try\"") >&5
18969   (eval $ac_try) 2>&5
18970   ac_status=$?
18971   echo "$as_me:18971: \$? = $ac_status" >&5
18972   (exit $ac_status); }; }; then
18973   :
18974 else
18975   echo "$as_me: failed program was:" >&5
18976 cat conftest.$ac_ext >&5
18977 cf_have_incdir=yes
18978 fi
18979 rm -f conftest.$ac_objext conftest.$ac_ext
18980                           CPPFLAGS=$cf_save_CPPFLAGS
18981                         fi
18982                   fi
18983                 fi
18984
18985                 if test "$cf_have_incdir" = no ; then
18986                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18987
18988 echo "${as_me:-configure}:18988: testing adding $cf_add_incdir to include-path ..." 1>&5
18989
18990                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18991
18992                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18993                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18994                   cf_add_incdir="$cf_top_incdir"
18995                 else
18996                   break
18997                 fi
18998           else
18999                 break
19000           fi
19001         done
19002   done
19003 fi
19004
19005 if test -n "$with_hashed_db/lib" ; then
19006         for cf_add_libdir in $with_hashed_db/lib
19007         do
19008                 if test $cf_add_libdir = /usr/lib ; then
19009                         :
19010                 elif test -d $cf_add_libdir
19011                 then
19012                         cf_have_libdir=no
19013                         if test -n "$LDFLAGS$LIBS" ; then
19014                                 # a loop is needed to ensure we can add subdirs of existing dirs
19015                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19016                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19017                                                 cf_have_libdir=yes; break
19018                                         fi
19019                                 done
19020                         fi
19021                         if test "$cf_have_libdir" = no ; then
19022                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19023
19024 echo "${as_me:-configure}:19024: testing adding $cf_add_libdir to library-path ..." 1>&5
19025
19026                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19027                         fi
19028                 fi
19029         done
19030 fi
19031
19032         else
19033                 case "$with_hashed_db" in
19034                 (./*|../*|/*)
19035                         { echo "$as_me:19035: WARNING: no such directory $with_hashed_db" >&5
19036 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19037                         ;;
19038                 (*)
19039
19040 cf_search=
19041
19042 test "x$prefix" != "xNONE" && \
19043 test -d "$prefix" && \
19044  {
19045         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19046         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19047         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19048         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19049         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19050         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19051 }
19052
19053 for cf_subdir_prefix in \
19054         /usr \
19055         /usr/local \
19056         /usr/pkg \
19057         /opt \
19058         /opt/local \
19059         $HOME
19060 do
19061
19062 test "x$cf_subdir_prefix" != "x$prefix" && \
19063 test -d "$cf_subdir_prefix" && \
19064 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19065         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19066         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19067         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19068         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19069         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19070         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"
19071 }
19072
19073 done
19074
19075         for cf_item in $cf_search
19076         do
19077                 case $cf_item in
19078                 (*/$with_hashed_db)
19079
19080 if test -n "$cf_item" ; then
19081   for cf_add_incdir in $cf_item
19082   do
19083         while test $cf_add_incdir != /usr/include
19084         do
19085           if test -d $cf_add_incdir
19086           then
19087                 cf_have_incdir=no
19088                 if test -n "$CFLAGS$CPPFLAGS" ; then
19089                   # a loop is needed to ensure we can add subdirs of existing dirs
19090                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19091                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19092                           cf_have_incdir=yes; break
19093                         fi
19094                   done
19095                 fi
19096
19097                 if test "$cf_have_incdir" = no ; then
19098                   if test "$cf_add_incdir" = /usr/local/include ; then
19099                         if test "$GCC" = yes
19100                         then
19101                           cf_save_CPPFLAGS=$CPPFLAGS
19102                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19103                           cat >conftest.$ac_ext <<_ACEOF
19104 #line 19104 "configure"
19105 #include "confdefs.h"
19106 #include <stdio.h>
19107 int
19108 main ()
19109 {
19110 printf("Hello")
19111   ;
19112   return 0;
19113 }
19114 _ACEOF
19115 rm -f conftest.$ac_objext
19116 if { (eval echo "$as_me:19116: \"$ac_compile\"") >&5
19117   (eval $ac_compile) 2>&5
19118   ac_status=$?
19119   echo "$as_me:19119: \$? = $ac_status" >&5
19120   (exit $ac_status); } &&
19121          { ac_try='test -s conftest.$ac_objext'
19122   { (eval echo "$as_me:19122: \"$ac_try\"") >&5
19123   (eval $ac_try) 2>&5
19124   ac_status=$?
19125   echo "$as_me:19125: \$? = $ac_status" >&5
19126   (exit $ac_status); }; }; then
19127   :
19128 else
19129   echo "$as_me: failed program was:" >&5
19130 cat conftest.$ac_ext >&5
19131 cf_have_incdir=yes
19132 fi
19133 rm -f conftest.$ac_objext conftest.$ac_ext
19134                           CPPFLAGS=$cf_save_CPPFLAGS
19135                         fi
19136                   fi
19137                 fi
19138
19139                 if test "$cf_have_incdir" = no ; then
19140                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19141
19142 echo "${as_me:-configure}:19142: testing adding $cf_add_incdir to include-path ..." 1>&5
19143
19144                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19145
19146                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19147                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19148                   cf_add_incdir="$cf_top_incdir"
19149                 else
19150                   break
19151                 fi
19152           else
19153                 break
19154           fi
19155         done
19156   done
19157 fi
19158
19159                         ;;
19160                 esac
19161         done
19162
19163 cf_search=
19164
19165 test "x$prefix" != "xNONE" && \
19166 test -d "$prefix" && \
19167  {
19168         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19169         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19170         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19171         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19172         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19173         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19174 }
19175
19176 for cf_subdir_prefix in \
19177         /usr \
19178         /usr/local \
19179         /usr/pkg \
19180         /opt \
19181         /opt/local \
19182         $HOME
19183 do
19184
19185 test "x$cf_subdir_prefix" != "x$prefix" && \
19186 test -d "$cf_subdir_prefix" && \
19187 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19188         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19189         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19190         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19191         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19192         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19193         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"
19194 }
19195
19196 done
19197
19198         for cf_item in $cf_search
19199         do
19200                 case $cf_item in
19201                 (*/$with_hashed_db)
19202
19203 if test -n "$cf_item" ; then
19204         for cf_add_libdir in $cf_item
19205         do
19206                 if test $cf_add_libdir = /usr/lib ; then
19207                         :
19208                 elif test -d $cf_add_libdir
19209                 then
19210                         cf_have_libdir=no
19211                         if test -n "$LDFLAGS$LIBS" ; then
19212                                 # a loop is needed to ensure we can add subdirs of existing dirs
19213                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19214                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19215                                                 cf_have_libdir=yes; break
19216                                         fi
19217                                 done
19218                         fi
19219                         if test "$cf_have_libdir" = no ; then
19220                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19221
19222 echo "${as_me:-configure}:19222: testing adding $cf_add_libdir to library-path ..." 1>&5
19223
19224                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19225                         fi
19226                 fi
19227         done
19228 fi
19229
19230                         ;;
19231                 esac
19232         done
19233
19234                         ;;
19235                 esac
19236         fi
19237 esac
19238
19239 echo "$as_me:19239: checking for db.h" >&5
19240 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19241 if test "${ac_cv_header_db_h+set}" = set; then
19242   echo $ECHO_N "(cached) $ECHO_C" >&6
19243 else
19244   cat >conftest.$ac_ext <<_ACEOF
19245 #line 19245 "configure"
19246 #include "confdefs.h"
19247 #include <db.h>
19248 _ACEOF
19249 if { (eval echo "$as_me:19249: \"$ac_cpp conftest.$ac_ext\"") >&5
19250   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19251   ac_status=$?
19252   egrep -v '^ *\+' conftest.er1 >conftest.err
19253   rm -f conftest.er1
19254   cat conftest.err >&5
19255   echo "$as_me:19255: \$? = $ac_status" >&5
19256   (exit $ac_status); } >/dev/null; then
19257   if test -s conftest.err; then
19258     ac_cpp_err=$ac_c_preproc_warn_flag
19259   else
19260     ac_cpp_err=
19261   fi
19262 else
19263   ac_cpp_err=yes
19264 fi
19265 if test -z "$ac_cpp_err"; then
19266   ac_cv_header_db_h=yes
19267 else
19268   echo "$as_me: failed program was:" >&5
19269   cat conftest.$ac_ext >&5
19270   ac_cv_header_db_h=no
19271 fi
19272 rm -f conftest.err conftest.$ac_ext
19273 fi
19274 echo "$as_me:19274: result: $ac_cv_header_db_h" >&5
19275 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19276 if test $ac_cv_header_db_h = yes; then
19277
19278 echo "$as_me:19278: checking for version of db" >&5
19279 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19280 if test "${cf_cv_hashed_db_version+set}" = set; then
19281   echo $ECHO_N "(cached) $ECHO_C" >&6
19282 else
19283
19284 cf_cv_hashed_db_version=unknown
19285
19286 for cf_db_version in 1 2 3 4 5 6
19287 do
19288
19289 echo "${as_me:-configure}:19289: testing checking for db version $cf_db_version ..." 1>&5
19290
19291         cat >conftest.$ac_ext <<_ACEOF
19292 #line 19292 "configure"
19293 #include "confdefs.h"
19294
19295 $ac_includes_default
19296 #include <db.h>
19297
19298 #ifdef DB_VERSION_MAJOR
19299         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19300 #if $cf_db_version == DB_VERSION_MAJOR
19301         /* ok */
19302 #else
19303         make an error
19304 #endif
19305 #else
19306 #if $cf_db_version == 1
19307         /* ok: assuming this is DB 1.8.5 */
19308 #else
19309         make an error
19310 #endif
19311 #endif
19312
19313 int
19314 main ()
19315 {
19316 DBT *foo = 0
19317   ;
19318   return 0;
19319 }
19320 _ACEOF
19321 rm -f conftest.$ac_objext
19322 if { (eval echo "$as_me:19322: \"$ac_compile\"") >&5
19323   (eval $ac_compile) 2>&5
19324   ac_status=$?
19325   echo "$as_me:19325: \$? = $ac_status" >&5
19326   (exit $ac_status); } &&
19327          { ac_try='test -s conftest.$ac_objext'
19328   { (eval echo "$as_me:19328: \"$ac_try\"") >&5
19329   (eval $ac_try) 2>&5
19330   ac_status=$?
19331   echo "$as_me:19331: \$? = $ac_status" >&5
19332   (exit $ac_status); }; }; then
19333
19334         cf_cv_hashed_db_version=$cf_db_version
19335         break
19336
19337 else
19338   echo "$as_me: failed program was:" >&5
19339 cat conftest.$ac_ext >&5
19340 fi
19341 rm -f conftest.$ac_objext conftest.$ac_ext
19342 done
19343
19344 fi
19345 echo "$as_me:19345: result: $cf_cv_hashed_db_version" >&5
19346 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19347
19348 if test "$cf_cv_hashed_db_version" = unknown ; then
19349         { { echo "$as_me:19349: error: Cannot determine version of db" >&5
19350 echo "$as_me: error: Cannot determine version of db" >&2;}
19351    { (exit 1); exit 1; }; }
19352 else
19353
19354 echo "$as_me:19354: checking for db libraries" >&5
19355 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19356 if test "${cf_cv_hashed_db_libs+set}" = set; then
19357   echo $ECHO_N "(cached) $ECHO_C" >&6
19358 else
19359
19360 cf_cv_hashed_db_libs=unknown
19361 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19362 do
19363         cf_save_libs="$LIBS"
19364         if test -n "$cf_db_libs"; then
19365
19366 cf_add_libs="-l$cf_db_libs"
19367 # Filter out duplicates - this happens with badly-designed ".pc" files...
19368 for cf_add_1lib in $LIBS
19369 do
19370         for cf_add_2lib in $cf_add_libs
19371         do
19372                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19373                 then
19374                         cf_add_1lib=
19375                         break
19376                 fi
19377         done
19378         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19379 done
19380 LIBS="$cf_add_libs"
19381
19382         fi
19383
19384 echo "${as_me:-configure}:19384: testing checking for library "$cf_db_libs" ..." 1>&5
19385
19386         cat >conftest.$ac_ext <<_ACEOF
19387 #line 19387 "configure"
19388 #include "confdefs.h"
19389
19390 $ac_includes_default
19391 #include <db.h>
19392
19393 int
19394 main ()
19395 {
19396
19397         char *path = "/tmp/foo";
19398 #ifdef DB_VERSION_MAJOR
19399 #if DB_VERSION_MAJOR >= 4
19400         DB *result = 0;
19401         db_create(&result, NULL, 0);
19402         result->open(result,
19403                 NULL,
19404                 path,
19405                 path,
19406                 DB_HASH,
19407                 DB_CREATE,
19408                 0644);
19409 #elif DB_VERSION_MAJOR >= 3
19410         DB *result = 0;
19411         db_create(&result, NULL, 0);
19412         result->open(result,
19413                 path,
19414                 path,
19415                 DB_HASH,
19416                 DB_CREATE,
19417                 0644);
19418 #elif DB_VERSION_MAJOR >= 2
19419         DB *result = 0;
19420         db_open(path,
19421                 DB_HASH,
19422                 DB_CREATE,
19423                 0644,
19424                 (DB_ENV *) 0,
19425                 (DB_INFO *) 0,
19426                 &result);
19427 #endif /* DB_VERSION_MAJOR */
19428 #else
19429         DB *result = dbopen(path,
19430                      2,
19431                      0644,
19432                      DB_HASH,
19433                      0);
19434 #endif
19435         ${cf_cv_main_return:-return}(result != 0)
19436
19437   ;
19438   return 0;
19439 }
19440 _ACEOF
19441 rm -f conftest.$ac_objext conftest$ac_exeext
19442 if { (eval echo "$as_me:19442: \"$ac_link\"") >&5
19443   (eval $ac_link) 2>&5
19444   ac_status=$?
19445   echo "$as_me:19445: \$? = $ac_status" >&5
19446   (exit $ac_status); } &&
19447          { ac_try='test -s conftest$ac_exeext'
19448   { (eval echo "$as_me:19448: \"$ac_try\"") >&5
19449   (eval $ac_try) 2>&5
19450   ac_status=$?
19451   echo "$as_me:19451: \$? = $ac_status" >&5
19452   (exit $ac_status); }; }; then
19453
19454         if test -n "$cf_db_libs" ; then
19455                 cf_cv_hashed_db_libs=$cf_db_libs
19456         else
19457                 cf_cv_hashed_db_libs=default
19458         fi
19459         LIBS="$cf_save_libs"
19460         break
19461
19462 else
19463   echo "$as_me: failed program was:" >&5
19464 cat conftest.$ac_ext >&5
19465 fi
19466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19467         LIBS="$cf_save_libs"
19468 done
19469
19470 fi
19471 echo "$as_me:19471: result: $cf_cv_hashed_db_libs" >&5
19472 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19473
19474         if test "$cf_cv_hashed_db_libs" = unknown ; then
19475                 { { echo "$as_me:19475: error: Cannot determine library for db" >&5
19476 echo "$as_me: error: Cannot determine library for db" >&2;}
19477    { (exit 1); exit 1; }; }
19478         elif test "$cf_cv_hashed_db_libs" != default ; then
19479
19480 cf_add_libs="-l$cf_cv_hashed_db_libs"
19481 # Filter out duplicates - this happens with badly-designed ".pc" files...
19482 for cf_add_1lib in $LIBS
19483 do
19484         for cf_add_2lib in $cf_add_libs
19485         do
19486                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19487                 then
19488                         cf_add_1lib=
19489                         break
19490                 fi
19491         done
19492         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19493 done
19494 LIBS="$cf_add_libs"
19495
19496         fi
19497 fi
19498
19499 else
19500
19501         { { echo "$as_me:19501: error: Cannot find db.h" >&5
19502 echo "$as_me: error: Cannot find db.h" >&2;}
19503    { (exit 1); exit 1; }; }
19504
19505 fi
19506
19507 fi
19508
19509 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19510         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19511         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19512 fi
19513
19514 # Just in case, check if the C compiler has a bool type.
19515
19516 echo "$as_me:19516: checking if we should include stdbool.h" >&5
19517 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19518
19519 if test "${cf_cv_header_stdbool_h+set}" = set; then
19520   echo $ECHO_N "(cached) $ECHO_C" >&6
19521 else
19522
19523         cat >conftest.$ac_ext <<_ACEOF
19524 #line 19524 "configure"
19525 #include "confdefs.h"
19526
19527 int
19528 main ()
19529 {
19530 bool foo = false
19531   ;
19532   return 0;
19533 }
19534 _ACEOF
19535 rm -f conftest.$ac_objext
19536 if { (eval echo "$as_me:19536: \"$ac_compile\"") >&5
19537   (eval $ac_compile) 2>&5
19538   ac_status=$?
19539   echo "$as_me:19539: \$? = $ac_status" >&5
19540   (exit $ac_status); } &&
19541          { ac_try='test -s conftest.$ac_objext'
19542   { (eval echo "$as_me:19542: \"$ac_try\"") >&5
19543   (eval $ac_try) 2>&5
19544   ac_status=$?
19545   echo "$as_me:19545: \$? = $ac_status" >&5
19546   (exit $ac_status); }; }; then
19547   cf_cv_header_stdbool_h=0
19548 else
19549   echo "$as_me: failed program was:" >&5
19550 cat conftest.$ac_ext >&5
19551 cat >conftest.$ac_ext <<_ACEOF
19552 #line 19552 "configure"
19553 #include "confdefs.h"
19554
19555 #ifndef __BEOS__
19556 #include <stdbool.h>
19557 #endif
19558
19559 int
19560 main ()
19561 {
19562 bool foo = false
19563   ;
19564   return 0;
19565 }
19566 _ACEOF
19567 rm -f conftest.$ac_objext
19568 if { (eval echo "$as_me:19568: \"$ac_compile\"") >&5
19569   (eval $ac_compile) 2>&5
19570   ac_status=$?
19571   echo "$as_me:19571: \$? = $ac_status" >&5
19572   (exit $ac_status); } &&
19573          { ac_try='test -s conftest.$ac_objext'
19574   { (eval echo "$as_me:19574: \"$ac_try\"") >&5
19575   (eval $ac_try) 2>&5
19576   ac_status=$?
19577   echo "$as_me:19577: \$? = $ac_status" >&5
19578   (exit $ac_status); }; }; then
19579   cf_cv_header_stdbool_h=1
19580 else
19581   echo "$as_me: failed program was:" >&5
19582 cat conftest.$ac_ext >&5
19583 cf_cv_header_stdbool_h=0
19584 fi
19585 rm -f conftest.$ac_objext conftest.$ac_ext
19586 fi
19587 rm -f conftest.$ac_objext conftest.$ac_ext
19588 fi
19589
19590 if test "$cf_cv_header_stdbool_h" = 1
19591 then    echo "$as_me:19591: result: yes" >&5
19592 echo "${ECHO_T}yes" >&6
19593 else    echo "$as_me:19593: result: no" >&5
19594 echo "${ECHO_T}no" >&6
19595 fi
19596
19597 echo "$as_me:19597: checking for builtin bool type" >&5
19598 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19599
19600 if test "${cf_cv_cc_bool_type+set}" = set; then
19601   echo $ECHO_N "(cached) $ECHO_C" >&6
19602 else
19603
19604         cat >conftest.$ac_ext <<_ACEOF
19605 #line 19605 "configure"
19606 #include "confdefs.h"
19607
19608 #include <stdio.h>
19609 #include <sys/types.h>
19610
19611 int
19612 main ()
19613 {
19614 bool x = false
19615   ;
19616   return 0;
19617 }
19618 _ACEOF
19619 rm -f conftest.$ac_objext
19620 if { (eval echo "$as_me:19620: \"$ac_compile\"") >&5
19621   (eval $ac_compile) 2>&5
19622   ac_status=$?
19623   echo "$as_me:19623: \$? = $ac_status" >&5
19624   (exit $ac_status); } &&
19625          { ac_try='test -s conftest.$ac_objext'
19626   { (eval echo "$as_me:19626: \"$ac_try\"") >&5
19627   (eval $ac_try) 2>&5
19628   ac_status=$?
19629   echo "$as_me:19629: \$? = $ac_status" >&5
19630   (exit $ac_status); }; }; then
19631   cf_cv_cc_bool_type=1
19632 else
19633   echo "$as_me: failed program was:" >&5
19634 cat conftest.$ac_ext >&5
19635 cf_cv_cc_bool_type=0
19636 fi
19637 rm -f conftest.$ac_objext conftest.$ac_ext
19638
19639 fi
19640
19641 if test "$cf_cv_cc_bool_type" = 1
19642 then    echo "$as_me:19642: result: yes" >&5
19643 echo "${ECHO_T}yes" >&6
19644 else    echo "$as_me:19644: result: no" >&5
19645 echo "${ECHO_T}no" >&6
19646 fi
19647
19648 # Check for C++ compiler characteristics (and ensure that it's there!)
19649 if test -n "$CXX" ; then
19650         ac_ext=cc
19651 ac_cpp='$CXXCPP $CPPFLAGS'
19652 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19653 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19654 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19655 ac_main_return=return
19656
19657 if test -n "$GXX" ; then
19658
19659         cf_save="$LIBS"
19660         LIBS="$LIBS $CXXLIBS"
19661         echo "$as_me:19661: checking if we already have C++ library" >&5
19662 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19663         cat >conftest.$ac_ext <<_ACEOF
19664 #line 19664 "configure"
19665 #include "confdefs.h"
19666
19667                         #include <iostream>
19668 int
19669 main ()
19670 {
19671
19672                         std::cout << "Hello World!" << std::endl;
19673   ;
19674   return 0;
19675 }
19676 _ACEOF
19677 rm -f conftest.$ac_objext conftest$ac_exeext
19678 if { (eval echo "$as_me:19678: \"$ac_link\"") >&5
19679   (eval $ac_link) 2>&5
19680   ac_status=$?
19681   echo "$as_me:19681: \$? = $ac_status" >&5
19682   (exit $ac_status); } &&
19683          { ac_try='test -s conftest$ac_exeext'
19684   { (eval echo "$as_me:19684: \"$ac_try\"") >&5
19685   (eval $ac_try) 2>&5
19686   ac_status=$?
19687   echo "$as_me:19687: \$? = $ac_status" >&5
19688   (exit $ac_status); }; }; then
19689   cf_have_libstdcpp=yes
19690 else
19691   echo "$as_me: failed program was:" >&5
19692 cat conftest.$ac_ext >&5
19693 cf_have_libstdcpp=no
19694 fi
19695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19696         echo "$as_me:19696: result: $cf_have_libstdcpp" >&5
19697 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19698         LIBS="$cf_save"
19699
19700         if test $cf_have_libstdcpp != yes
19701         then
19702                 case $cf_cv_system_name in
19703                 (os2*)
19704                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19705                                 cf_stdcpp_libname=stdcpp
19706                         else
19707                                 cf_stdcpp_libname=stdc++
19708                         fi
19709                         ;;
19710                 (*)
19711                         cf_stdcpp_libname=stdc++
19712                         ;;
19713                 esac
19714
19715                 echo "$as_me:19715: checking for library $cf_stdcpp_libname" >&5
19716 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19717 if test "${cf_cv_libstdcpp+set}" = set; then
19718   echo $ECHO_N "(cached) $ECHO_C" >&6
19719 else
19720
19721                         cf_save="$LIBS"
19722                         LIBS="$LIBS $CXXLIBS"
19723
19724 cf_add_libs="-l$cf_stdcpp_libname"
19725 # Filter out duplicates - this happens with badly-designed ".pc" files...
19726 for cf_add_1lib in $LIBS
19727 do
19728         for cf_add_2lib in $cf_add_libs
19729         do
19730                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19731                 then
19732                         cf_add_1lib=
19733                         break
19734                 fi
19735         done
19736         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19737 done
19738 LIBS="$cf_add_libs"
19739
19740                 cat >conftest.$ac_ext <<_ACEOF
19741 #line 19741 "configure"
19742 #include "confdefs.h"
19743
19744                                 #include <iostream>
19745 int
19746 main ()
19747 {
19748
19749                                 std::cout << "Hello World!" << std::endl;
19750   ;
19751   return 0;
19752 }
19753 _ACEOF
19754 rm -f conftest.$ac_objext conftest$ac_exeext
19755 if { (eval echo "$as_me:19755: \"$ac_link\"") >&5
19756   (eval $ac_link) 2>&5
19757   ac_status=$?
19758   echo "$as_me:19758: \$? = $ac_status" >&5
19759   (exit $ac_status); } &&
19760          { ac_try='test -s conftest$ac_exeext'
19761   { (eval echo "$as_me:19761: \"$ac_try\"") >&5
19762   (eval $ac_try) 2>&5
19763   ac_status=$?
19764   echo "$as_me:19764: \$? = $ac_status" >&5
19765   (exit $ac_status); }; }; then
19766   cf_cv_libstdcpp=yes
19767 else
19768   echo "$as_me: failed program was:" >&5
19769 cat conftest.$ac_ext >&5
19770 cf_cv_libstdcpp=no
19771 fi
19772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19773                         LIBS="$cf_save"
19774
19775 fi
19776 echo "$as_me:19776: result: $cf_cv_libstdcpp" >&5
19777 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19778                 test "$cf_cv_libstdcpp" = yes && {
19779 cf_add_libs="-l$cf_stdcpp_libname"
19780 # Filter out duplicates - this happens with badly-designed ".pc" files...
19781 for cf_add_1lib in $CXXLIBS
19782 do
19783         for cf_add_2lib in $cf_add_libs
19784         do
19785                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19786                 then
19787                         cf_add_1lib=
19788                         break
19789                 fi
19790         done
19791         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19792 done
19793 CXXLIBS="$cf_add_libs"
19794  }
19795         fi
19796 fi
19797
19798         echo "$as_me:19798: checking whether $CXX understands -c and -o together" >&5
19799 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19800 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19801   echo $ECHO_N "(cached) $ECHO_C" >&6
19802 else
19803
19804 cat > conftest.$ac_ext <<CF_EOF
19805 int main()
19806 {
19807         ${cf_cv_main_return:-return}(0);
19808 }
19809 CF_EOF
19810 # We do the test twice because some compilers refuse to overwrite an
19811 # existing .o file with -o, though they will create one.
19812 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19813 if { (eval echo "$as_me:19813: \"$ac_try\"") >&5
19814   (eval $ac_try) 2>&5
19815   ac_status=$?
19816   echo "$as_me:19816: \$? = $ac_status" >&5
19817   (exit $ac_status); } &&
19818   test -f conftest2.$ac_objext && { (eval echo "$as_me:19818: \"$ac_try\"") >&5
19819   (eval $ac_try) 2>&5
19820   ac_status=$?
19821   echo "$as_me:19821: \$? = $ac_status" >&5
19822   (exit $ac_status); };
19823 then
19824   eval cf_cv_prog_CXX_c_o=yes
19825 else
19826   eval cf_cv_prog_CXX_c_o=no
19827 fi
19828 rm -rf conftest*
19829
19830 fi
19831 if test $cf_cv_prog_CXX_c_o = yes; then
19832   echo "$as_me:19832: result: yes" >&5
19833 echo "${ECHO_T}yes" >&6
19834 else
19835   echo "$as_me:19835: result: no" >&5
19836 echo "${ECHO_T}no" >&6
19837 fi
19838
19839         case $GXX_VERSION in
19840         (1*|2.0-6*)
19841                 cf_cxx_library=yes
19842                 ;;
19843         (*-2.7*|2.7*)
19844
19845 cf_cxx_library=unknown
19846 case $cf_cv_system_name in
19847 (os2*)
19848         cf_gpp_libname=gpp
19849         ;;
19850 (*)
19851         cf_gpp_libname=g++
19852         ;;
19853 esac
19854 if test "$GXX" = yes; then
19855         echo "$as_me:19855: checking for lib$cf_gpp_libname" >&5
19856 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19857         cf_save="$LIBS"
19858
19859 cf_add_libs="-l$cf_gpp_libname"
19860 # Filter out duplicates - this happens with badly-designed ".pc" files...
19861 for cf_add_1lib in $LIBS
19862 do
19863         for cf_add_2lib in $cf_add_libs
19864         do
19865                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19866                 then
19867                         cf_add_1lib=
19868                         break
19869                 fi
19870         done
19871         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19872 done
19873 LIBS="$cf_add_libs"
19874
19875         cat >conftest.$ac_ext <<_ACEOF
19876 #line 19876 "configure"
19877 #include "confdefs.h"
19878
19879 #include <$cf_gpp_libname/builtin.h>
19880
19881 int
19882 main ()
19883 {
19884 two_arg_error_handler_t foo2 = lib_error_handler
19885   ;
19886   return 0;
19887 }
19888 _ACEOF
19889 rm -f conftest.$ac_objext conftest$ac_exeext
19890 if { (eval echo "$as_me:19890: \"$ac_link\"") >&5
19891   (eval $ac_link) 2>&5
19892   ac_status=$?
19893   echo "$as_me:19893: \$? = $ac_status" >&5
19894   (exit $ac_status); } &&
19895          { ac_try='test -s conftest$ac_exeext'
19896   { (eval echo "$as_me:19896: \"$ac_try\"") >&5
19897   (eval $ac_try) 2>&5
19898   ac_status=$?
19899   echo "$as_me:19899: \$? = $ac_status" >&5
19900   (exit $ac_status); }; }; then
19901   cf_cxx_library=yes
19902
19903 cf_add_libs="-l$cf_gpp_libname"
19904 # Filter out duplicates - this happens with badly-designed ".pc" files...
19905 for cf_add_1lib in $CXXLIBS
19906 do
19907         for cf_add_2lib in $cf_add_libs
19908         do
19909                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19910                 then
19911                         cf_add_1lib=
19912                         break
19913                 fi
19914         done
19915         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19916 done
19917 CXXLIBS="$cf_add_libs"
19918
19919          if test "$cf_gpp_libname" = cpp ; then
19920
19921 cat >>confdefs.h <<\EOF
19922 #define HAVE_GPP_BUILTIN_H 1
19923 EOF
19924
19925          else
19926
19927 cat >>confdefs.h <<\EOF
19928 #define HAVE_GXX_BUILTIN_H 1
19929 EOF
19930
19931          fi
19932 else
19933   echo "$as_me: failed program was:" >&5
19934 cat conftest.$ac_ext >&5
19935 cat >conftest.$ac_ext <<_ACEOF
19936 #line 19936 "configure"
19937 #include "confdefs.h"
19938
19939 #include <builtin.h>
19940
19941 int
19942 main ()
19943 {
19944 two_arg_error_handler_t foo2 = lib_error_handler
19945   ;
19946   return 0;
19947 }
19948 _ACEOF
19949 rm -f conftest.$ac_objext conftest$ac_exeext
19950 if { (eval echo "$as_me:19950: \"$ac_link\"") >&5
19951   (eval $ac_link) 2>&5
19952   ac_status=$?
19953   echo "$as_me:19953: \$? = $ac_status" >&5
19954   (exit $ac_status); } &&
19955          { ac_try='test -s conftest$ac_exeext'
19956   { (eval echo "$as_me:19956: \"$ac_try\"") >&5
19957   (eval $ac_try) 2>&5
19958   ac_status=$?
19959   echo "$as_me:19959: \$? = $ac_status" >&5
19960   (exit $ac_status); }; }; then
19961   cf_cxx_library=yes
19962
19963 cf_add_libs="-l$cf_gpp_libname"
19964 # Filter out duplicates - this happens with badly-designed ".pc" files...
19965 for cf_add_1lib in $CXXLIBS
19966 do
19967         for cf_add_2lib in $cf_add_libs
19968         do
19969                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19970                 then
19971                         cf_add_1lib=
19972                         break
19973                 fi
19974         done
19975         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19976 done
19977 CXXLIBS="$cf_add_libs"
19978
19979 cat >>confdefs.h <<\EOF
19980 #define HAVE_BUILTIN_H 1
19981 EOF
19982
19983 else
19984   echo "$as_me: failed program was:" >&5
19985 cat conftest.$ac_ext >&5
19986 cf_cxx_library=no
19987 fi
19988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19989 fi
19990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19991         LIBS="$cf_save"
19992         echo "$as_me:19992: result: $cf_cxx_library" >&5
19993 echo "${ECHO_T}$cf_cxx_library" >&6
19994 fi
19995
19996                 ;;
19997         (*)
19998                 cf_cxx_library=no
19999                 ;;
20000         esac
20001
20002         ac_ext=cc
20003 ac_cpp='$CXXCPP $CPPFLAGS'
20004 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20005 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20006 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20007 ac_main_return=return
20008 echo "$as_me:20008: checking how to run the C++ preprocessor" >&5
20009 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20010 if test -z "$CXXCPP"; then
20011   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20012   echo $ECHO_N "(cached) $ECHO_C" >&6
20013 else
20014       # Double quotes because CXXCPP needs to be expanded
20015     for CXXCPP in "$CXX -E" "/lib/cpp"
20016     do
20017       ac_preproc_ok=false
20018 for ac_cxx_preproc_warn_flag in '' yes
20019 do
20020   # Use a header file that comes with gcc, so configuring glibc
20021   # with a fresh cross-compiler works.
20022   # On the NeXT, cc -E runs the code through the compiler's parser,
20023   # not just through cpp. "Syntax error" is here to catch this case.
20024   cat >conftest.$ac_ext <<_ACEOF
20025 #line 20025 "configure"
20026 #include "confdefs.h"
20027 #include <assert.h>
20028                      Syntax error
20029 _ACEOF
20030 if { (eval echo "$as_me:20030: \"$ac_cpp conftest.$ac_ext\"") >&5
20031   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20032   ac_status=$?
20033   egrep -v '^ *\+' conftest.er1 >conftest.err
20034   rm -f conftest.er1
20035   cat conftest.err >&5
20036   echo "$as_me:20036: \$? = $ac_status" >&5
20037   (exit $ac_status); } >/dev/null; then
20038   if test -s conftest.err; then
20039     ac_cpp_err=$ac_cxx_preproc_warn_flag
20040   else
20041     ac_cpp_err=
20042   fi
20043 else
20044   ac_cpp_err=yes
20045 fi
20046 if test -z "$ac_cpp_err"; then
20047   :
20048 else
20049   echo "$as_me: failed program was:" >&5
20050   cat conftest.$ac_ext >&5
20051   # Broken: fails on valid input.
20052 continue
20053 fi
20054 rm -f conftest.err conftest.$ac_ext
20055
20056   # OK, works on sane cases.  Now check whether non-existent headers
20057   # can be detected and how.
20058   cat >conftest.$ac_ext <<_ACEOF
20059 #line 20059 "configure"
20060 #include "confdefs.h"
20061 #include <ac_nonexistent.h>
20062 _ACEOF
20063 if { (eval echo "$as_me:20063: \"$ac_cpp conftest.$ac_ext\"") >&5
20064   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20065   ac_status=$?
20066   egrep -v '^ *\+' conftest.er1 >conftest.err
20067   rm -f conftest.er1
20068   cat conftest.err >&5
20069   echo "$as_me:20069: \$? = $ac_status" >&5
20070   (exit $ac_status); } >/dev/null; then
20071   if test -s conftest.err; then
20072     ac_cpp_err=$ac_cxx_preproc_warn_flag
20073   else
20074     ac_cpp_err=
20075   fi
20076 else
20077   ac_cpp_err=yes
20078 fi
20079 if test -z "$ac_cpp_err"; then
20080   # Broken: success on invalid input.
20081 continue
20082 else
20083   echo "$as_me: failed program was:" >&5
20084   cat conftest.$ac_ext >&5
20085   # Passes both tests.
20086 ac_preproc_ok=:
20087 break
20088 fi
20089 rm -f conftest.err conftest.$ac_ext
20090
20091 done
20092 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20093 rm -f conftest.err conftest.$ac_ext
20094 if $ac_preproc_ok; then
20095   break
20096 fi
20097
20098     done
20099     ac_cv_prog_CXXCPP=$CXXCPP
20100
20101 fi
20102   CXXCPP=$ac_cv_prog_CXXCPP
20103 else
20104   ac_cv_prog_CXXCPP=$CXXCPP
20105 fi
20106 echo "$as_me:20106: result: $CXXCPP" >&5
20107 echo "${ECHO_T}$CXXCPP" >&6
20108 ac_preproc_ok=false
20109 for ac_cxx_preproc_warn_flag in '' yes
20110 do
20111   # Use a header file that comes with gcc, so configuring glibc
20112   # with a fresh cross-compiler works.
20113   # On the NeXT, cc -E runs the code through the compiler's parser,
20114   # not just through cpp. "Syntax error" is here to catch this case.
20115   cat >conftest.$ac_ext <<_ACEOF
20116 #line 20116 "configure"
20117 #include "confdefs.h"
20118 #include <assert.h>
20119                      Syntax error
20120 _ACEOF
20121 if { (eval echo "$as_me:20121: \"$ac_cpp conftest.$ac_ext\"") >&5
20122   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20123   ac_status=$?
20124   egrep -v '^ *\+' conftest.er1 >conftest.err
20125   rm -f conftest.er1
20126   cat conftest.err >&5
20127   echo "$as_me:20127: \$? = $ac_status" >&5
20128   (exit $ac_status); } >/dev/null; then
20129   if test -s conftest.err; then
20130     ac_cpp_err=$ac_cxx_preproc_warn_flag
20131   else
20132     ac_cpp_err=
20133   fi
20134 else
20135   ac_cpp_err=yes
20136 fi
20137 if test -z "$ac_cpp_err"; then
20138   :
20139 else
20140   echo "$as_me: failed program was:" >&5
20141   cat conftest.$ac_ext >&5
20142   # Broken: fails on valid input.
20143 continue
20144 fi
20145 rm -f conftest.err conftest.$ac_ext
20146
20147   # OK, works on sane cases.  Now check whether non-existent headers
20148   # can be detected and how.
20149   cat >conftest.$ac_ext <<_ACEOF
20150 #line 20150 "configure"
20151 #include "confdefs.h"
20152 #include <ac_nonexistent.h>
20153 _ACEOF
20154 if { (eval echo "$as_me:20154: \"$ac_cpp conftest.$ac_ext\"") >&5
20155   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20156   ac_status=$?
20157   egrep -v '^ *\+' conftest.er1 >conftest.err
20158   rm -f conftest.er1
20159   cat conftest.err >&5
20160   echo "$as_me:20160: \$? = $ac_status" >&5
20161   (exit $ac_status); } >/dev/null; then
20162   if test -s conftest.err; then
20163     ac_cpp_err=$ac_cxx_preproc_warn_flag
20164   else
20165     ac_cpp_err=
20166   fi
20167 else
20168   ac_cpp_err=yes
20169 fi
20170 if test -z "$ac_cpp_err"; then
20171   # Broken: success on invalid input.
20172 continue
20173 else
20174   echo "$as_me: failed program was:" >&5
20175   cat conftest.$ac_ext >&5
20176   # Passes both tests.
20177 ac_preproc_ok=:
20178 break
20179 fi
20180 rm -f conftest.err conftest.$ac_ext
20181
20182 done
20183 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20184 rm -f conftest.err conftest.$ac_ext
20185 if $ac_preproc_ok; then
20186   :
20187 else
20188   { { echo "$as_me:20188: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20189 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20190    { (exit 1); exit 1; }; }
20191 fi
20192
20193 ac_ext=cc
20194 ac_cpp='$CXXCPP $CPPFLAGS'
20195 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20196 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20197 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20198 ac_main_return=return
20199
20200 for ac_header in typeinfo
20201 do
20202 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20203 echo "$as_me:20203: checking for $ac_header" >&5
20204 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20205 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20206   echo $ECHO_N "(cached) $ECHO_C" >&6
20207 else
20208   cat >conftest.$ac_ext <<_ACEOF
20209 #line 20209 "configure"
20210 #include "confdefs.h"
20211 #include <$ac_header>
20212 _ACEOF
20213 if { (eval echo "$as_me:20213: \"$ac_cpp conftest.$ac_ext\"") >&5
20214   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20215   ac_status=$?
20216   egrep -v '^ *\+' conftest.er1 >conftest.err
20217   rm -f conftest.er1
20218   cat conftest.err >&5
20219   echo "$as_me:20219: \$? = $ac_status" >&5
20220   (exit $ac_status); } >/dev/null; then
20221   if test -s conftest.err; then
20222     ac_cpp_err=$ac_cxx_preproc_warn_flag
20223   else
20224     ac_cpp_err=
20225   fi
20226 else
20227   ac_cpp_err=yes
20228 fi
20229 if test -z "$ac_cpp_err"; then
20230   eval "$as_ac_Header=yes"
20231 else
20232   echo "$as_me: failed program was:" >&5
20233   cat conftest.$ac_ext >&5
20234   eval "$as_ac_Header=no"
20235 fi
20236 rm -f conftest.err conftest.$ac_ext
20237 fi
20238 echo "$as_me:20238: result: `eval echo '${'$as_ac_Header'}'`" >&5
20239 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20240 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20241   cat >>confdefs.h <<EOF
20242 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20243 EOF
20244
20245 fi
20246 done
20247
20248 for ac_header in iostream
20249 do
20250 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20251 echo "$as_me:20251: checking for $ac_header" >&5
20252 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20253 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20254   echo $ECHO_N "(cached) $ECHO_C" >&6
20255 else
20256   cat >conftest.$ac_ext <<_ACEOF
20257 #line 20257 "configure"
20258 #include "confdefs.h"
20259 #include <$ac_header>
20260 _ACEOF
20261 if { (eval echo "$as_me:20261: \"$ac_cpp conftest.$ac_ext\"") >&5
20262   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20263   ac_status=$?
20264   egrep -v '^ *\+' conftest.er1 >conftest.err
20265   rm -f conftest.er1
20266   cat conftest.err >&5
20267   echo "$as_me:20267: \$? = $ac_status" >&5
20268   (exit $ac_status); } >/dev/null; then
20269   if test -s conftest.err; then
20270     ac_cpp_err=$ac_cxx_preproc_warn_flag
20271   else
20272     ac_cpp_err=
20273   fi
20274 else
20275   ac_cpp_err=yes
20276 fi
20277 if test -z "$ac_cpp_err"; then
20278   eval "$as_ac_Header=yes"
20279 else
20280   echo "$as_me: failed program was:" >&5
20281   cat conftest.$ac_ext >&5
20282   eval "$as_ac_Header=no"
20283 fi
20284 rm -f conftest.err conftest.$ac_ext
20285 fi
20286 echo "$as_me:20286: result: `eval echo '${'$as_ac_Header'}'`" >&5
20287 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20288 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20289   cat >>confdefs.h <<EOF
20290 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20291 EOF
20292
20293 fi
20294 done
20295
20296 if test x"$ac_cv_header_iostream" = xyes ; then
20297         echo "$as_me:20297: checking if iostream uses std-namespace" >&5
20298 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20299         cat >conftest.$ac_ext <<_ACEOF
20300 #line 20300 "configure"
20301 #include "confdefs.h"
20302
20303 #include <iostream>
20304 using std::endl;
20305 using std::cerr;
20306 int
20307 main ()
20308 {
20309
20310 cerr << "testing" << endl;
20311
20312   ;
20313   return 0;
20314 }
20315 _ACEOF
20316 rm -f conftest.$ac_objext
20317 if { (eval echo "$as_me:20317: \"$ac_compile\"") >&5
20318   (eval $ac_compile) 2>&5
20319   ac_status=$?
20320   echo "$as_me:20320: \$? = $ac_status" >&5
20321   (exit $ac_status); } &&
20322          { ac_try='test -s conftest.$ac_objext'
20323   { (eval echo "$as_me:20323: \"$ac_try\"") >&5
20324   (eval $ac_try) 2>&5
20325   ac_status=$?
20326   echo "$as_me:20326: \$? = $ac_status" >&5
20327   (exit $ac_status); }; }; then
20328   cf_iostream_namespace=yes
20329 else
20330   echo "$as_me: failed program was:" >&5
20331 cat conftest.$ac_ext >&5
20332 cf_iostream_namespace=no
20333 fi
20334 rm -f conftest.$ac_objext conftest.$ac_ext
20335         echo "$as_me:20335: result: $cf_iostream_namespace" >&5
20336 echo "${ECHO_T}$cf_iostream_namespace" >&6
20337         if test "$cf_iostream_namespace" = yes ; then
20338
20339 cat >>confdefs.h <<\EOF
20340 #define IOSTREAM_NAMESPACE 1
20341 EOF
20342
20343         fi
20344 fi
20345
20346 echo "$as_me:20346: checking if we should include stdbool.h" >&5
20347 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20348
20349 if test "${cf_cv_header_stdbool_h+set}" = set; then
20350   echo $ECHO_N "(cached) $ECHO_C" >&6
20351 else
20352
20353         cat >conftest.$ac_ext <<_ACEOF
20354 #line 20354 "configure"
20355 #include "confdefs.h"
20356
20357 int
20358 main ()
20359 {
20360 bool foo = false
20361   ;
20362   return 0;
20363 }
20364 _ACEOF
20365 rm -f conftest.$ac_objext
20366 if { (eval echo "$as_me:20366: \"$ac_compile\"") >&5
20367   (eval $ac_compile) 2>&5
20368   ac_status=$?
20369   echo "$as_me:20369: \$? = $ac_status" >&5
20370   (exit $ac_status); } &&
20371          { ac_try='test -s conftest.$ac_objext'
20372   { (eval echo "$as_me:20372: \"$ac_try\"") >&5
20373   (eval $ac_try) 2>&5
20374   ac_status=$?
20375   echo "$as_me:20375: \$? = $ac_status" >&5
20376   (exit $ac_status); }; }; then
20377   cf_cv_header_stdbool_h=0
20378 else
20379   echo "$as_me: failed program was:" >&5
20380 cat conftest.$ac_ext >&5
20381 cat >conftest.$ac_ext <<_ACEOF
20382 #line 20382 "configure"
20383 #include "confdefs.h"
20384
20385 #ifndef __BEOS__
20386 #include <stdbool.h>
20387 #endif
20388
20389 int
20390 main ()
20391 {
20392 bool foo = false
20393   ;
20394   return 0;
20395 }
20396 _ACEOF
20397 rm -f conftest.$ac_objext
20398 if { (eval echo "$as_me:20398: \"$ac_compile\"") >&5
20399   (eval $ac_compile) 2>&5
20400   ac_status=$?
20401   echo "$as_me:20401: \$? = $ac_status" >&5
20402   (exit $ac_status); } &&
20403          { ac_try='test -s conftest.$ac_objext'
20404   { (eval echo "$as_me:20404: \"$ac_try\"") >&5
20405   (eval $ac_try) 2>&5
20406   ac_status=$?
20407   echo "$as_me:20407: \$? = $ac_status" >&5
20408   (exit $ac_status); }; }; then
20409   cf_cv_header_stdbool_h=1
20410 else
20411   echo "$as_me: failed program was:" >&5
20412 cat conftest.$ac_ext >&5
20413 cf_cv_header_stdbool_h=0
20414 fi
20415 rm -f conftest.$ac_objext conftest.$ac_ext
20416 fi
20417 rm -f conftest.$ac_objext conftest.$ac_ext
20418 fi
20419
20420 if test "$cf_cv_header_stdbool_h" = 1
20421 then    echo "$as_me:20421: result: yes" >&5
20422 echo "${ECHO_T}yes" >&6
20423 else    echo "$as_me:20423: result: no" >&5
20424 echo "${ECHO_T}no" >&6
20425 fi
20426
20427 echo "$as_me:20427: checking for builtin bool type" >&5
20428 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20429
20430 if test "${cf_cv_builtin_bool+set}" = set; then
20431   echo $ECHO_N "(cached) $ECHO_C" >&6
20432 else
20433
20434         cat >conftest.$ac_ext <<_ACEOF
20435 #line 20435 "configure"
20436 #include "confdefs.h"
20437
20438 #include <stdio.h>
20439 #include <sys/types.h>
20440
20441 int
20442 main ()
20443 {
20444 bool x = false
20445   ;
20446   return 0;
20447 }
20448 _ACEOF
20449 rm -f conftest.$ac_objext
20450 if { (eval echo "$as_me:20450: \"$ac_compile\"") >&5
20451   (eval $ac_compile) 2>&5
20452   ac_status=$?
20453   echo "$as_me:20453: \$? = $ac_status" >&5
20454   (exit $ac_status); } &&
20455          { ac_try='test -s conftest.$ac_objext'
20456   { (eval echo "$as_me:20456: \"$ac_try\"") >&5
20457   (eval $ac_try) 2>&5
20458   ac_status=$?
20459   echo "$as_me:20459: \$? = $ac_status" >&5
20460   (exit $ac_status); }; }; then
20461   cf_cv_builtin_bool=1
20462 else
20463   echo "$as_me: failed program was:" >&5
20464 cat conftest.$ac_ext >&5
20465 cf_cv_builtin_bool=0
20466 fi
20467 rm -f conftest.$ac_objext conftest.$ac_ext
20468
20469 fi
20470
20471 if test "$cf_cv_builtin_bool" = 1
20472 then    echo "$as_me:20472: result: yes" >&5
20473 echo "${ECHO_T}yes" >&6
20474 else    echo "$as_me:20474: result: no" >&5
20475 echo "${ECHO_T}no" >&6
20476 fi
20477
20478 echo "$as_me:20478: checking for size of bool" >&5
20479 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20480 if test "${cf_cv_type_of_bool+set}" = set; then
20481   echo $ECHO_N "(cached) $ECHO_C" >&6
20482 else
20483
20484         rm -f cf_test.out
20485         if test "$cross_compiling" = yes; then
20486   cf_cv_type_of_bool=unknown
20487 else
20488   cat >conftest.$ac_ext <<_ACEOF
20489 #line 20489 "configure"
20490 #include "confdefs.h"
20491
20492 #include <stdlib.h>
20493 #include <stdio.h>
20494
20495 #if defined(__cplusplus)
20496
20497 #ifdef HAVE_GXX_BUILTIN_H
20498 #include <g++/builtin.h>
20499 #elif HAVE_GPP_BUILTIN_H
20500 #include <gpp/builtin.h>
20501 #elif HAVE_BUILTIN_H
20502 #include <builtin.h>
20503 #endif
20504
20505 #else
20506
20507 #if $cf_cv_header_stdbool_h
20508 #include <stdbool.h>
20509 #endif
20510
20511 #endif
20512
20513 int main()
20514 {
20515         FILE *fp = fopen("cf_test.out", "w");
20516         if (fp != 0) {
20517                 bool x = true;
20518                 if ((bool)(-x) >= 0)
20519                         fputs("unsigned ", fp);
20520                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20521                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20522                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20523                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20524                 fclose(fp);
20525         }
20526         ${cf_cv_main_return:-return}(0);
20527 }
20528
20529 _ACEOF
20530 rm -f conftest$ac_exeext
20531 if { (eval echo "$as_me:20531: \"$ac_link\"") >&5
20532   (eval $ac_link) 2>&5
20533   ac_status=$?
20534   echo "$as_me:20534: \$? = $ac_status" >&5
20535   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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   cf_cv_type_of_bool=`cat cf_test.out`
20542                  if test -z "$cf_cv_type_of_bool"; then
20543                    cf_cv_type_of_bool=unknown
20544                  fi
20545 else
20546   echo "$as_me: program exited with status $ac_status" >&5
20547 echo "$as_me: failed program was:" >&5
20548 cat conftest.$ac_ext >&5
20549 cf_cv_type_of_bool=unknown
20550 fi
20551 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20552 fi
20553
20554 fi
20555
20556         rm -f cf_test.out
20557 echo "$as_me:20557: result: $cf_cv_type_of_bool" >&5
20558 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20559 if test "$cf_cv_type_of_bool" = unknown ; then
20560         case .$NCURSES_BOOL in
20561         (.auto|.) NCURSES_BOOL=unsigned;;
20562         esac
20563         { echo "$as_me:20563: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20564 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20565         cf_cv_type_of_bool=$NCURSES_BOOL
20566 fi
20567
20568 echo "$as_me:20568: checking for special defines needed for etip.h" >&5
20569 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20570 cf_save_CXXFLAGS="$CXXFLAGS"
20571 cf_result="none"
20572
20573 # etip.h includes ncurses.h which includes ncurses_dll.h
20574 # But ncurses_dll.h is generated - fix here.
20575 test -d include || mkdir include
20576 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
20577
20578 for cf_math in "" MATH_H
20579 do
20580 for cf_excp in "" MATH_EXCEPTION
20581 do
20582         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20583         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20584         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20585 cat >conftest.$ac_ext <<_ACEOF
20586 #line 20586 "configure"
20587 #include "confdefs.h"
20588
20589 #include <etip.h.in>
20590
20591 int
20592 main ()
20593 {
20594
20595   ;
20596   return 0;
20597 }
20598 _ACEOF
20599 rm -f conftest.$ac_objext
20600 if { (eval echo "$as_me:20600: \"$ac_compile\"") >&5
20601   (eval $ac_compile) 2>&5
20602   ac_status=$?
20603   echo "$as_me:20603: \$? = $ac_status" >&5
20604   (exit $ac_status); } &&
20605          { ac_try='test -s conftest.$ac_objext'
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
20612         test -n "$cf_math" && cat >>confdefs.h <<EOF
20613 #define ETIP_NEEDS_${cf_math} 1
20614 EOF
20615
20616         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20617 #define ETIP_NEEDS_${cf_excp} 1
20618 EOF
20619
20620         cf_result="$cf_math $cf_excp"
20621         break 2
20622
20623 else
20624   echo "$as_me: failed program was:" >&5
20625 cat conftest.$ac_ext >&5
20626 fi
20627 rm -f conftest.$ac_objext conftest.$ac_ext
20628 done
20629 done
20630 echo "$as_me:20630: result: $cf_result" >&5
20631 echo "${ECHO_T}$cf_result" >&6
20632 CXXFLAGS="$cf_save_CXXFLAGS"
20633
20634 if test -n "$CXX"; then
20635 echo "$as_me:20635: checking if $CXX accepts parameter initialization" >&5
20636 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20637 if test "${cf_cv_cpp_param_init+set}" = set; then
20638   echo $ECHO_N "(cached) $ECHO_C" >&6
20639 else
20640
20641         ac_ext=cc
20642 ac_cpp='$CXXCPP $CPPFLAGS'
20643 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20644 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20645 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20646 ac_main_return=return
20647
20648         if test "$cross_compiling" = yes; then
20649   cf_cv_cpp_param_init=unknown
20650 else
20651   cat >conftest.$ac_ext <<_ACEOF
20652 #line 20652 "configure"
20653 #include "confdefs.h"
20654
20655 class TEST {
20656 private:
20657         int value;
20658 public:
20659         TEST(int x = 1);
20660         ~TEST();
20661 };
20662
20663 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20664 {
20665         value = x;
20666 }
20667 int main() { }
20668
20669 _ACEOF
20670 rm -f conftest$ac_exeext
20671 if { (eval echo "$as_me:20671: \"$ac_link\"") >&5
20672   (eval $ac_link) 2>&5
20673   ac_status=$?
20674   echo "$as_me:20674: \$? = $ac_status" >&5
20675   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20676   { (eval echo "$as_me:20676: \"$ac_try\"") >&5
20677   (eval $ac_try) 2>&5
20678   ac_status=$?
20679   echo "$as_me:20679: \$? = $ac_status" >&5
20680   (exit $ac_status); }; }; then
20681   cf_cv_cpp_param_init=yes
20682 else
20683   echo "$as_me: program exited with status $ac_status" >&5
20684 echo "$as_me: failed program was:" >&5
20685 cat conftest.$ac_ext >&5
20686 cf_cv_cpp_param_init=no
20687 fi
20688 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20689 fi
20690         ac_ext=cc
20691 ac_cpp='$CXXCPP $CPPFLAGS'
20692 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20693 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20694 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20695 ac_main_return=return
20696
20697 fi
20698 echo "$as_me:20698: result: $cf_cv_cpp_param_init" >&5
20699 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20700 fi
20701 test "$cf_cv_cpp_param_init" = yes &&
20702 cat >>confdefs.h <<\EOF
20703 #define CPP_HAS_PARAM_INIT 1
20704 EOF
20705
20706 if test -n "$CXX"; then
20707
20708 echo "$as_me:20708: checking if $CXX accepts static_cast" >&5
20709 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20710 if test "${cf_cv_cpp_static_cast+set}" = set; then
20711   echo $ECHO_N "(cached) $ECHO_C" >&6
20712 else
20713
20714         ac_ext=cc
20715 ac_cpp='$CXXCPP $CPPFLAGS'
20716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20717 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20719 ac_main_return=return
20720
20721         cat >conftest.$ac_ext <<_ACEOF
20722 #line 20722 "configure"
20723 #include "confdefs.h"
20724
20725 class NCursesPanel
20726 {
20727 public:
20728   NCursesPanel(int nlines,
20729                int ncols,
20730                int begin_y = 0,
20731                int begin_x = 0)
20732   {
20733   }
20734   NCursesPanel();
20735   ~NCursesPanel();
20736 };
20737
20738 template<class T> class NCursesUserPanel : public NCursesPanel
20739 {
20740 public:
20741   NCursesUserPanel (int nlines,
20742                     int ncols,
20743                     int begin_y = 0,
20744                     int begin_x = 0,
20745                     const T* p_UserData = static_cast<T*>(0))
20746     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20747   {
20748   };
20749   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20750   {
20751   };
20752
20753   virtual ~NCursesUserPanel() {};
20754 };
20755
20756 int
20757 main ()
20758 {
20759
20760         const char* p_UserData = static_cast<char*>(0)
20761   ;
20762   return 0;
20763 }
20764 _ACEOF
20765 rm -f conftest.$ac_objext
20766 if { (eval echo "$as_me:20766: \"$ac_compile\"") >&5
20767   (eval $ac_compile) 2>&5
20768   ac_status=$?
20769   echo "$as_me:20769: \$? = $ac_status" >&5
20770   (exit $ac_status); } &&
20771          { ac_try='test -s conftest.$ac_objext'
20772   { (eval echo "$as_me:20772: \"$ac_try\"") >&5
20773   (eval $ac_try) 2>&5
20774   ac_status=$?
20775   echo "$as_me:20775: \$? = $ac_status" >&5
20776   (exit $ac_status); }; }; then
20777   cf_cv_cpp_static_cast=yes
20778 else
20779   echo "$as_me: failed program was:" >&5
20780 cat conftest.$ac_ext >&5
20781 cf_cv_cpp_static_cast=no
20782 fi
20783 rm -f conftest.$ac_objext conftest.$ac_ext
20784
20785         ac_ext=cc
20786 ac_cpp='$CXXCPP $CPPFLAGS'
20787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20790 ac_main_return=return
20791
20792 fi
20793 echo "$as_me:20793: result: $cf_cv_cpp_static_cast" >&5
20794 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20795
20796 fi
20797
20798 test "$cf_cv_cpp_static_cast" = yes &&
20799 cat >>confdefs.h <<\EOF
20800 #define CPP_HAS_STATIC_CAST 1
20801 EOF
20802
20803         CXX_AR='$(AR)'
20804         CXX_ARFLAGS='$(ARFLAGS)'
20805         case $cf_cv_system_name in
20806         (irix*)
20807             if test "$GXX" != yes ; then
20808                 CXX_AR='$(CXX)'
20809                 CXX_ARFLAGS='-ar -o'
20810             fi
20811             ;;
20812         (sco3.2v5*)
20813             CXXLDFLAGS="-u main"
20814             ;;
20815         (solaris2*)
20816             if test "$GXX" != yes ; then
20817                 CXX_AR='$(CXX)'
20818                 CXX_ARFLAGS='-xar -o'
20819             fi
20820             ;;
20821         esac
20822
20823 else
20824         cf_cxx_library=no
20825         cf_cv_builtin_bool=1
20826
20827         # Just because we are not configuring against C++ right now does not
20828         # mean that a user will not want to use C++.  Some distributors disable
20829         # the C++ portion of this configuration as a shortcut (or just to avoid
20830         # compiling the demo in the c++ directory).  So we need a reasonable
20831         # default for the 'bool' type.
20832         #
20833         # Caveat: since the storage of the bool type is not standardized, it
20834         # may change.
20835
20836         if test "$NCURSES_BOOL" != auto ; then
20837                 cf_cv_type_of_bool=$NCURSES_BOOL
20838                 cf_cv_header_stdbool_h=0
20839         else
20840                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20841
20842 echo "$as_me:20842: checking for size of bool" >&5
20843 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20844 if test "${cf_cv_type_of_bool+set}" = set; then
20845   echo $ECHO_N "(cached) $ECHO_C" >&6
20846 else
20847
20848         rm -f cf_test.out
20849         if test "$cross_compiling" = yes; then
20850   cf_cv_type_of_bool=unknown
20851 else
20852   cat >conftest.$ac_ext <<_ACEOF
20853 #line 20853 "configure"
20854 #include "confdefs.h"
20855
20856 #include <stdlib.h>
20857 #include <stdio.h>
20858
20859 #if defined(__cplusplus)
20860
20861 #ifdef HAVE_GXX_BUILTIN_H
20862 #include <g++/builtin.h>
20863 #elif HAVE_GPP_BUILTIN_H
20864 #include <gpp/builtin.h>
20865 #elif HAVE_BUILTIN_H
20866 #include <builtin.h>
20867 #endif
20868
20869 #else
20870
20871 #if $cf_cv_header_stdbool_h
20872 #include <stdbool.h>
20873 #endif
20874
20875 #endif
20876
20877 int main()
20878 {
20879         FILE *fp = fopen("cf_test.out", "w");
20880         if (fp != 0) {
20881                 bool x = true;
20882                 if ((bool)(-x) >= 0)
20883                         fputs("unsigned ", fp);
20884                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20885                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20886                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20887                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20888                 fclose(fp);
20889         }
20890         ${cf_cv_main_return:-return}(0);
20891 }
20892
20893 _ACEOF
20894 rm -f conftest$ac_exeext
20895 if { (eval echo "$as_me:20895: \"$ac_link\"") >&5
20896   (eval $ac_link) 2>&5
20897   ac_status=$?
20898   echo "$as_me:20898: \$? = $ac_status" >&5
20899   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20900   { (eval echo "$as_me:20900: \"$ac_try\"") >&5
20901   (eval $ac_try) 2>&5
20902   ac_status=$?
20903   echo "$as_me:20903: \$? = $ac_status" >&5
20904   (exit $ac_status); }; }; then
20905   cf_cv_type_of_bool=`cat cf_test.out`
20906                  if test -z "$cf_cv_type_of_bool"; then
20907                    cf_cv_type_of_bool=unknown
20908                  fi
20909 else
20910   echo "$as_me: program exited with status $ac_status" >&5
20911 echo "$as_me: failed program was:" >&5
20912 cat conftest.$ac_ext >&5
20913 cf_cv_type_of_bool=unknown
20914 fi
20915 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20916 fi
20917
20918 fi
20919
20920         rm -f cf_test.out
20921 echo "$as_me:20921: result: $cf_cv_type_of_bool" >&5
20922 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20923 if test "$cf_cv_type_of_bool" = unknown ; then
20924         case .$NCURSES_BOOL in
20925         (.auto|.) NCURSES_BOOL=unsigned;;
20926         esac
20927         { echo "$as_me:20927: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20928 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20929         cf_cv_type_of_bool=$NCURSES_BOOL
20930 fi
20931
20932                 else
20933                         echo "$as_me:20933: checking for fallback type of bool" >&5
20934 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20935                         case "$host_cpu" in
20936                         (i?86)  cf_cv_type_of_bool=char ;;
20937                         (*)     cf_cv_type_of_bool=int  ;;
20938                         esac
20939                         echo "$as_me:20939: result: $cf_cv_type_of_bool" >&5
20940 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20941                 fi
20942         fi
20943 fi
20944
20945 # If the C compiler did not declare bool, and we did not determine that the C++
20946 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20947 # ncurses library use the same type as C++ bool.  Note that this allows one to
20948 # specify the type of bool in a configure-script option and postpone
20949 # integration with the C++ compiler provided that the types are compatible.
20950 USE_CXX_BOOL=1
20951 if test $cf_cv_cc_bool_type = 1
20952 then
20953         # oops: C has a bool.  Unlikely, but C++ could differ.
20954         USE_CXX_BOOL=0
20955 elif test $cf_cv_builtin_bool = 0
20956 then
20957         # C++ has no bool
20958         USE_CXX_BOOL=0
20959 else
20960         # this is the normal case
20961         USE_CXX_BOOL='defined(__cplusplus)'
20962 fi
20963
20964 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20965
20966         if test "$cf_with_ada" != "no" ; then
20967                 if test "$with_libtool" != "no"; then
20968                         { echo "$as_me:20968: WARNING: libtool does not support Ada - disabling feature" >&5
20969 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20970                         cf_with_ada=no
20971                 fi
20972         fi
20973
20974         if test "$cf_with_ada" != "no" ; then
20975
20976 cf_ada_make=gnatmake
20977 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20978 set dummy $cf_ada_make; ac_word=$2
20979 echo "$as_me:20979: checking for $ac_word" >&5
20980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20981 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20982   echo $ECHO_N "(cached) $ECHO_C" >&6
20983 else
20984   if test -n "$gnat_exists"; then
20985   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20986 else
20987   ac_save_IFS=$IFS; IFS=$ac_path_separator
20988 ac_dummy="$PATH"
20989 for ac_dir in $ac_dummy; do
20990   IFS=$ac_save_IFS
20991   test -z "$ac_dir" && ac_dir=.
20992   $as_executable_p "$ac_dir/$ac_word" || continue
20993 ac_cv_prog_gnat_exists="yes"
20994 echo "$as_me:20994: found $ac_dir/$ac_word" >&5
20995 break
20996 done
20997
20998   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20999 fi
21000 fi
21001 gnat_exists=$ac_cv_prog_gnat_exists
21002 if test -n "$gnat_exists"; then
21003   echo "$as_me:21003: result: $gnat_exists" >&5
21004 echo "${ECHO_T}$gnat_exists" >&6
21005 else
21006   echo "$as_me:21006: result: no" >&5
21007 echo "${ECHO_T}no" >&6
21008 fi
21009
21010 if test "$ac_cv_prog_gnat_exists" = no; then
21011         cf_ada_make=
21012         cf_cv_prog_gnat_correct=no
21013 else
21014
21015 echo "$as_me:21015: checking for gnat version" >&5
21016 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21017 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21018         grep '[0-9].[0-9][0-9]*' |\
21019         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21020 echo "$as_me:21020: result: $cf_gnat_version" >&5
21021 echo "${ECHO_T}$cf_gnat_version" >&6
21022
21023 case $cf_gnat_version in
21024 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21025         cf_cv_prog_gnat_correct=yes
21026         ;;
21027 (*)
21028         { echo "$as_me:21028: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21029 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21030         cf_cv_prog_gnat_correct=no
21031         ;;
21032 esac
21033
21034         # Extract the first word of "m4", so it can be a program name with args.
21035 set dummy m4; ac_word=$2
21036 echo "$as_me:21036: checking for $ac_word" >&5
21037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21038 if test "${ac_cv_prog_M4_exists+set}" = set; then
21039   echo $ECHO_N "(cached) $ECHO_C" >&6
21040 else
21041   if test -n "$M4_exists"; then
21042   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21043 else
21044   ac_save_IFS=$IFS; IFS=$ac_path_separator
21045 ac_dummy="$PATH"
21046 for ac_dir in $ac_dummy; do
21047   IFS=$ac_save_IFS
21048   test -z "$ac_dir" && ac_dir=.
21049   $as_executable_p "$ac_dir/$ac_word" || continue
21050 ac_cv_prog_M4_exists="yes"
21051 echo "$as_me:21051: found $ac_dir/$ac_word" >&5
21052 break
21053 done
21054
21055   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21056 fi
21057 fi
21058 M4_exists=$ac_cv_prog_M4_exists
21059 if test -n "$M4_exists"; then
21060   echo "$as_me:21060: result: $M4_exists" >&5
21061 echo "${ECHO_T}$M4_exists" >&6
21062 else
21063   echo "$as_me:21063: result: no" >&5
21064 echo "${ECHO_T}no" >&6
21065 fi
21066
21067         if test "$ac_cv_prog_M4_exists" = no; then
21068                 cf_cv_prog_gnat_correct=no
21069                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21070         fi
21071         if test "$cf_cv_prog_gnat_correct" = yes; then
21072                 echo "$as_me:21072: checking if GNAT works" >&5
21073 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21074
21075 rm -rf conftest* *~conftest*
21076 cat >>conftest.ads <<CF_EOF
21077 procedure conftest;
21078 CF_EOF
21079 cat >>conftest.adb <<CF_EOF
21080 with Text_IO;
21081 with GNAT.OS_Lib;
21082 procedure conftest is
21083 begin
21084    Text_IO.Put ("Hello World");
21085    Text_IO.New_Line;
21086    GNAT.OS_Lib.OS_Exit (0);
21087 end conftest;
21088 CF_EOF
21089 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21090    if ( ./conftest 1>&5 2>&1 ) ; then
21091       cf_cv_prog_gnat_correct=yes
21092    else
21093       cf_cv_prog_gnat_correct=no
21094    fi
21095 else
21096    cf_cv_prog_gnat_correct=no
21097 fi
21098 rm -rf conftest* *~conftest*
21099
21100                 echo "$as_me:21100: result: $cf_cv_prog_gnat_correct" >&5
21101 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21102         fi
21103 fi
21104
21105                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21106
21107         ADAFLAGS="$ADAFLAGS -gnatpn"
21108
21109         echo "$as_me:21109: checking optimization options for ADAFLAGS" >&5
21110 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21111         case "$CFLAGS" in
21112         (*-g*)
21113
21114         ADAFLAGS="$ADAFLAGS -g"
21115
21116                 ;;
21117         esac
21118         case "$CFLAGS" in
21119         (*-O*)
21120                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21121
21122         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21123
21124                 ;;
21125         esac
21126         echo "$as_me:21126: result: $ADAFLAGS" >&5
21127 echo "${ECHO_T}$ADAFLAGS" >&6
21128
21129 echo "$as_me:21129: checking if GNATPREP supports -T option" >&5
21130 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21131 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21132   echo $ECHO_N "(cached) $ECHO_C" >&6
21133 else
21134
21135 cf_cv_gnatprep_opt_t=no
21136 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21137
21138 fi
21139 echo "$as_me:21139: result: $cf_cv_gnatprep_opt_t" >&5
21140 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21141 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21142
21143 echo "$as_me:21143: checking if GNAT supports generics" >&5
21144 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21145 case $cf_gnat_version in
21146 (3.[1-9]*|[4-9].*)
21147         cf_gnat_generics=yes
21148         ;;
21149 (*)
21150         cf_gnat_generics=no
21151         ;;
21152 esac
21153 echo "$as_me:21153: result: $cf_gnat_generics" >&5
21154 echo "${ECHO_T}$cf_gnat_generics" >&6
21155
21156 if test "$cf_gnat_generics" = yes
21157 then
21158         cf_compile_generics=generics
21159         cf_generic_objects="\${GENOBJS}"
21160 else
21161         cf_compile_generics=
21162         cf_generic_objects=
21163 fi
21164
21165 echo "$as_me:21165: checking if GNAT supports SIGINT" >&5
21166 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21167 if test "${cf_cv_gnat_sigint+set}" = set; then
21168   echo $ECHO_N "(cached) $ECHO_C" >&6
21169 else
21170
21171 rm -rf conftest* *~conftest*
21172 cat >>conftest.ads <<CF_EOF
21173 with Ada.Interrupts.Names;
21174
21175 package ConfTest is
21176
21177    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21178    pragma Unreserve_All_Interrupts;
21179    pragma Warnings (On);
21180
21181    protected Process is
21182       procedure Stop;
21183       function Continue return Boolean;
21184       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21185    private
21186       Done : Boolean := False;
21187    end Process;
21188
21189 end ConfTest;
21190 CF_EOF
21191 cat >>conftest.adb <<CF_EOF
21192 package body ConfTest is
21193    protected body Process is
21194       procedure Stop is
21195       begin
21196          Done := True;
21197       end Stop;
21198       function Continue return Boolean is
21199       begin
21200          return not Done;
21201       end Continue;
21202    end Process;
21203 end ConfTest;
21204 CF_EOF
21205 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21206       cf_cv_gnat_sigint=yes
21207 else
21208    cf_cv_gnat_sigint=no
21209 fi
21210 rm -rf conftest* *~conftest*
21211
21212 fi
21213 echo "$as_me:21213: result: $cf_cv_gnat_sigint" >&5
21214 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21215
21216 if test $cf_cv_gnat_sigint = yes ; then
21217         USE_GNAT_SIGINT=""
21218 else
21219         USE_GNAT_SIGINT="#"
21220 fi
21221
21222 cf_gnat_libraries=no
21223 cf_gnat_projects=no
21224
21225 if test "$enable_gnat_projects" != no ; then
21226 echo "$as_me:21226: checking if GNAT supports project files" >&5
21227 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21228 case $cf_gnat_version in
21229 (3.[0-9]*)
21230         ;;
21231 (*)
21232         case $cf_cv_system_name in
21233         (cygwin*|msys*)
21234                 ;;
21235         (*)
21236                 mkdir conftest.src conftest.bin conftest.lib
21237                 cd conftest.src
21238                 rm -rf conftest* *~conftest*
21239                 cat >>library.gpr <<CF_EOF
21240 project Library is
21241   Kind := External ("LIB_KIND");
21242   for Library_Name use "ConfTest";
21243   for Object_Dir use ".";
21244   for Library_ALI_Dir use External("LIBRARY_DIR");
21245   for Library_Version use External ("SONAME");
21246   for Library_Kind use Kind;
21247   for Library_Dir use External("BUILD_DIR");
21248   Source_Dir := External ("SOURCE_DIR");
21249   for Source_Dirs use (Source_Dir);
21250 end Library;
21251 CF_EOF
21252                 cat >>confpackage.ads <<CF_EOF
21253 package ConfPackage is
21254    procedure conftest;
21255 end ConfPackage;
21256 CF_EOF
21257                 cat >>confpackage.adb <<CF_EOF
21258 with Text_IO;
21259 package body ConfPackage is
21260    procedure conftest is
21261    begin
21262       Text_IO.Put ("Hello World");
21263       Text_IO.New_Line;
21264    end conftest;
21265 end ConfPackage;
21266 CF_EOF
21267                 if ( $cf_ada_make $ADAFLAGS \
21268                                 -Plibrary.gpr \
21269                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21270                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21271                                 -XSOURCE_DIR=`pwd` \
21272                                 -XSONAME=libConfTest.so.1 \
21273                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21274                         cf_gnat_projects=yes
21275                 fi
21276                 cd ..
21277                 if test -f conftest.lib/confpackage.ali
21278                 then
21279                         cf_gnat_libraries=yes
21280                 fi
21281                 rm -rf conftest* *~conftest*
21282                 ;;
21283         esac
21284         ;;
21285 esac
21286 echo "$as_me:21286: result: $cf_gnat_projects" >&5
21287 echo "${ECHO_T}$cf_gnat_projects" >&6
21288 fi # enable_gnat_projects
21289
21290 if test $cf_gnat_projects = yes
21291 then
21292         echo "$as_me:21292: checking if GNAT supports libraries" >&5
21293 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21294         echo "$as_me:21294: result: $cf_gnat_libraries" >&5
21295 echo "${ECHO_T}$cf_gnat_libraries" >&6
21296 fi
21297
21298 if test "$cf_gnat_projects" = yes
21299 then
21300         USE_OLD_MAKERULES="#"
21301         USE_GNAT_PROJECTS=""
21302 else
21303         USE_OLD_MAKERULES=""
21304         USE_GNAT_PROJECTS="#"
21305 fi
21306
21307 if test "$cf_gnat_libraries" = yes
21308 then
21309         USE_GNAT_LIBRARIES=""
21310 else
21311         USE_GNAT_LIBRARIES="#"
21312 fi
21313
21314 echo "$as_me:21314: checking for ada-compiler" >&5
21315 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21316
21317 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21318 if test "${with_ada_compiler+set}" = set; then
21319   withval="$with_ada_compiler"
21320   cf_ada_compiler=$withval
21321 else
21322   cf_ada_compiler=gnatmake
21323 fi;
21324
21325 echo "$as_me:21325: result: $cf_ada_compiler" >&5
21326 echo "${ECHO_T}$cf_ada_compiler" >&6
21327
21328                         cf_ada_package=terminal_interface
21329
21330 echo "$as_me:21330: checking for ada-include" >&5
21331 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21332
21333 # Check whether --with-ada-include or --without-ada-include was given.
21334 if test "${with_ada_include+set}" = set; then
21335   withval="$with_ada_include"
21336
21337 else
21338   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21339 fi; if test -n "$prefix/share/ada/adainclude" ; then
21340
21341 if test "x$prefix" != xNONE; then
21342         cf_path_syntax="$prefix"
21343 else
21344         cf_path_syntax="$ac_default_prefix"
21345 fi
21346
21347 case ".$withval" in
21348 (.\$\(*\)*|.\'*\'*)
21349         ;;
21350 (..|./*|.\\*)
21351         ;;
21352 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21353         ;;
21354 (.\${*prefix}*|.\${*dir}*)
21355         eval withval="$withval"
21356         case ".$withval" in
21357         (.NONE/*)
21358                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21359                 ;;
21360         esac
21361         ;;
21362 (.no|.NONE/*)
21363         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21364         ;;
21365 (*)
21366         { { echo "$as_me:21366: error: expected a pathname, not \"$withval\"" >&5
21367 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21368    { (exit 1); exit 1; }; }
21369         ;;
21370 esac
21371
21372 fi
21373 eval ADA_INCLUDE="$withval"
21374
21375 echo "$as_me:21375: result: $ADA_INCLUDE" >&5
21376 echo "${ECHO_T}$ADA_INCLUDE" >&6
21377
21378 echo "$as_me:21378: checking for ada-objects" >&5
21379 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21380
21381 # Check whether --with-ada-objects or --without-ada-objects was given.
21382 if test "${with_ada_objects+set}" = set; then
21383   withval="$with_ada_objects"
21384
21385 else
21386   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21387 fi; if test -n "$prefix/lib/ada/adalib" ; then
21388
21389 if test "x$prefix" != xNONE; then
21390         cf_path_syntax="$prefix"
21391 else
21392         cf_path_syntax="$ac_default_prefix"
21393 fi
21394
21395 case ".$withval" in
21396 (.\$\(*\)*|.\'*\'*)
21397         ;;
21398 (..|./*|.\\*)
21399         ;;
21400 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21401         ;;
21402 (.\${*prefix}*|.\${*dir}*)
21403         eval withval="$withval"
21404         case ".$withval" in
21405         (.NONE/*)
21406                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21407                 ;;
21408         esac
21409         ;;
21410 (.no|.NONE/*)
21411         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21412         ;;
21413 (*)
21414         { { echo "$as_me:21414: error: expected a pathname, not \"$withval\"" >&5
21415 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21416    { (exit 1); exit 1; }; }
21417         ;;
21418 esac
21419
21420 fi
21421 eval ADA_OBJECTS="$withval"
21422
21423 echo "$as_me:21423: result: $ADA_OBJECTS" >&5
21424 echo "${ECHO_T}$ADA_OBJECTS" >&6
21425
21426 echo "$as_me:21426: checking if an Ada95 shared-library should be built" >&5
21427 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21428
21429 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21430 if test "${with_ada_sharedlib+set}" = set; then
21431   withval="$with_ada_sharedlib"
21432   with_ada_sharedlib=$withval
21433 else
21434   with_ada_sharedlib=no
21435 fi;
21436 echo "$as_me:21436: result: $with_ada_sharedlib" >&5
21437 echo "${ECHO_T}$with_ada_sharedlib" >&6
21438
21439 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21440 MAKE_ADA_SHAREDLIB="#"
21441
21442 if test "x$with_ada_sharedlib" != xno
21443 then
21444         MAKE_ADA_SHAREDLIB=
21445         if test "x$with_ada_sharedlib" != xyes
21446         then
21447                 ADA_SHAREDLIB="$with_ada_sharedlib"
21448         fi
21449 fi
21450
21451                 fi
21452         fi
21453 else
21454         cf_with_ada=no
21455 fi
21456
21457 # do this "late" to avoid conflict with header-checks
21458 if test "x$with_widec" = xyes ; then
21459         echo "$as_me:21459: checking for wchar_t" >&5
21460 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21461 if test "${ac_cv_type_wchar_t+set}" = set; then
21462   echo $ECHO_N "(cached) $ECHO_C" >&6
21463 else
21464   cat >conftest.$ac_ext <<_ACEOF
21465 #line 21465 "configure"
21466 #include "confdefs.h"
21467 $ac_includes_default
21468 int
21469 main ()
21470 {
21471 if ((wchar_t *) 0)
21472   return 0;
21473 if (sizeof (wchar_t))
21474   return 0;
21475   ;
21476   return 0;
21477 }
21478 _ACEOF
21479 rm -f conftest.$ac_objext
21480 if { (eval echo "$as_me:21480: \"$ac_compile\"") >&5
21481   (eval $ac_compile) 2>&5
21482   ac_status=$?
21483   echo "$as_me:21483: \$? = $ac_status" >&5
21484   (exit $ac_status); } &&
21485          { ac_try='test -s conftest.$ac_objext'
21486   { (eval echo "$as_me:21486: \"$ac_try\"") >&5
21487   (eval $ac_try) 2>&5
21488   ac_status=$?
21489   echo "$as_me:21489: \$? = $ac_status" >&5
21490   (exit $ac_status); }; }; then
21491   ac_cv_type_wchar_t=yes
21492 else
21493   echo "$as_me: failed program was:" >&5
21494 cat conftest.$ac_ext >&5
21495 ac_cv_type_wchar_t=no
21496 fi
21497 rm -f conftest.$ac_objext conftest.$ac_ext
21498 fi
21499 echo "$as_me:21499: result: $ac_cv_type_wchar_t" >&5
21500 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21501
21502 echo "$as_me:21502: checking size of wchar_t" >&5
21503 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21504 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21505   echo $ECHO_N "(cached) $ECHO_C" >&6
21506 else
21507   if test "$ac_cv_type_wchar_t" = yes; then
21508   if test "$cross_compiling" = yes; then
21509   # Depending upon the size, compute the lo and hi bounds.
21510 cat >conftest.$ac_ext <<_ACEOF
21511 #line 21511 "configure"
21512 #include "confdefs.h"
21513 $ac_includes_default
21514 int
21515 main ()
21516 {
21517 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21518   ;
21519   return 0;
21520 }
21521 _ACEOF
21522 rm -f conftest.$ac_objext
21523 if { (eval echo "$as_me:21523: \"$ac_compile\"") >&5
21524   (eval $ac_compile) 2>&5
21525   ac_status=$?
21526   echo "$as_me:21526: \$? = $ac_status" >&5
21527   (exit $ac_status); } &&
21528          { ac_try='test -s conftest.$ac_objext'
21529   { (eval echo "$as_me:21529: \"$ac_try\"") >&5
21530   (eval $ac_try) 2>&5
21531   ac_status=$?
21532   echo "$as_me:21532: \$? = $ac_status" >&5
21533   (exit $ac_status); }; }; then
21534   ac_lo=0 ac_mid=0
21535   while :; do
21536     cat >conftest.$ac_ext <<_ACEOF
21537 #line 21537 "configure"
21538 #include "confdefs.h"
21539 $ac_includes_default
21540 int
21541 main ()
21542 {
21543 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21544   ;
21545   return 0;
21546 }
21547 _ACEOF
21548 rm -f conftest.$ac_objext
21549 if { (eval echo "$as_me:21549: \"$ac_compile\"") >&5
21550   (eval $ac_compile) 2>&5
21551   ac_status=$?
21552   echo "$as_me:21552: \$? = $ac_status" >&5
21553   (exit $ac_status); } &&
21554          { ac_try='test -s conftest.$ac_objext'
21555   { (eval echo "$as_me:21555: \"$ac_try\"") >&5
21556   (eval $ac_try) 2>&5
21557   ac_status=$?
21558   echo "$as_me:21558: \$? = $ac_status" >&5
21559   (exit $ac_status); }; }; then
21560   ac_hi=$ac_mid; break
21561 else
21562   echo "$as_me: failed program was:" >&5
21563 cat conftest.$ac_ext >&5
21564 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21565 fi
21566 rm -f conftest.$ac_objext conftest.$ac_ext
21567   done
21568 else
21569   echo "$as_me: failed program was:" >&5
21570 cat conftest.$ac_ext >&5
21571 ac_hi=-1 ac_mid=-1
21572   while :; do
21573     cat >conftest.$ac_ext <<_ACEOF
21574 #line 21574 "configure"
21575 #include "confdefs.h"
21576 $ac_includes_default
21577 int
21578 main ()
21579 {
21580 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21581   ;
21582   return 0;
21583 }
21584 _ACEOF
21585 rm -f conftest.$ac_objext
21586 if { (eval echo "$as_me:21586: \"$ac_compile\"") >&5
21587   (eval $ac_compile) 2>&5
21588   ac_status=$?
21589   echo "$as_me:21589: \$? = $ac_status" >&5
21590   (exit $ac_status); } &&
21591          { ac_try='test -s conftest.$ac_objext'
21592   { (eval echo "$as_me:21592: \"$ac_try\"") >&5
21593   (eval $ac_try) 2>&5
21594   ac_status=$?
21595   echo "$as_me:21595: \$? = $ac_status" >&5
21596   (exit $ac_status); }; }; then
21597   ac_lo=$ac_mid; break
21598 else
21599   echo "$as_me: failed program was:" >&5
21600 cat conftest.$ac_ext >&5
21601 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21602 fi
21603 rm -f conftest.$ac_objext conftest.$ac_ext
21604   done
21605 fi
21606 rm -f conftest.$ac_objext conftest.$ac_ext
21607 # Binary search between lo and hi bounds.
21608 while test "x$ac_lo" != "x$ac_hi"; do
21609   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21610   cat >conftest.$ac_ext <<_ACEOF
21611 #line 21611 "configure"
21612 #include "confdefs.h"
21613 $ac_includes_default
21614 int
21615 main ()
21616 {
21617 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21618   ;
21619   return 0;
21620 }
21621 _ACEOF
21622 rm -f conftest.$ac_objext
21623 if { (eval echo "$as_me:21623: \"$ac_compile\"") >&5
21624   (eval $ac_compile) 2>&5
21625   ac_status=$?
21626   echo "$as_me:21626: \$? = $ac_status" >&5
21627   (exit $ac_status); } &&
21628          { ac_try='test -s conftest.$ac_objext'
21629   { (eval echo "$as_me:21629: \"$ac_try\"") >&5
21630   (eval $ac_try) 2>&5
21631   ac_status=$?
21632   echo "$as_me:21632: \$? = $ac_status" >&5
21633   (exit $ac_status); }; }; then
21634   ac_hi=$ac_mid
21635 else
21636   echo "$as_me: failed program was:" >&5
21637 cat conftest.$ac_ext >&5
21638 ac_lo=`expr $ac_mid + 1`
21639 fi
21640 rm -f conftest.$ac_objext conftest.$ac_ext
21641 done
21642 ac_cv_sizeof_wchar_t=$ac_lo
21643 else
21644   if test "$cross_compiling" = yes; then
21645   { { echo "$as_me:21645: error: cannot run test program while cross compiling" >&5
21646 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21647    { (exit 1); exit 1; }; }
21648 else
21649   cat >conftest.$ac_ext <<_ACEOF
21650 #line 21650 "configure"
21651 #include "confdefs.h"
21652 $ac_includes_default
21653 int
21654 main ()
21655 {
21656 FILE *f = fopen ("conftest.val", "w");
21657 if (!f)
21658   $ac_main_return (1);
21659 fprintf (f, "%d", (sizeof (wchar_t)));
21660 fclose (f);
21661   ;
21662   return 0;
21663 }
21664 _ACEOF
21665 rm -f conftest$ac_exeext
21666 if { (eval echo "$as_me:21666: \"$ac_link\"") >&5
21667   (eval $ac_link) 2>&5
21668   ac_status=$?
21669   echo "$as_me:21669: \$? = $ac_status" >&5
21670   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21671   { (eval echo "$as_me:21671: \"$ac_try\"") >&5
21672   (eval $ac_try) 2>&5
21673   ac_status=$?
21674   echo "$as_me:21674: \$? = $ac_status" >&5
21675   (exit $ac_status); }; }; then
21676   ac_cv_sizeof_wchar_t=`cat conftest.val`
21677 else
21678   echo "$as_me: program exited with status $ac_status" >&5
21679 echo "$as_me: failed program was:" >&5
21680 cat conftest.$ac_ext >&5
21681 fi
21682 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21683 fi
21684 fi
21685 rm -f conftest.val
21686 else
21687   ac_cv_sizeof_wchar_t=0
21688 fi
21689 fi
21690 echo "$as_me:21690: result: $ac_cv_sizeof_wchar_t" >&5
21691 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21692 cat >>confdefs.h <<EOF
21693 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21694 EOF
21695
21696 fi
21697
21698 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21699 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21700 ###
21701 ### ticlib modules may be a separate library, otherwise contained in termlib.
21702 ### termlib modules may be a separate library, otherwise contained in ncurses.
21703 ###
21704 ### The of "+" or " " between the tokens controls the way the script
21705 ### chooses to split module lists into libraries.
21706 ###
21707 ### (see CF_LIB_RULES).
21708 echo "$as_me:21708: checking for library subsets" >&5
21709 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21710 LIB_SUBSETS=
21711
21712 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21713         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21714         if test "$with_ticlib" != no ; then
21715                 LIB_SUBSETS="${LIB_SUBSETS} "
21716         else
21717                 LIB_SUBSETS="${LIB_SUBSETS}+"
21718         fi
21719 fi
21720
21721 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21722 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21723
21724 if test "$with_termlib" != no ; then
21725         LIB_SUBSETS="${LIB_SUBSETS} "
21726 else
21727         LIB_SUBSETS="${LIB_SUBSETS}+"
21728 fi
21729
21730 LIB_SUBSETS="${LIB_SUBSETS}base"
21731
21732 # Most term-driver calls are to tinfo, but some like init_pair are to the
21733 # base library (so it resides in base).
21734 if test "$with_term_driver" != no ; then
21735         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21736         case $cf_cv_system_name in
21737         (*mingw32*|*mingw64*)
21738                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21739                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21740                 ;;
21741         (*)
21742                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21743                 ;;
21744         esac
21745 fi
21746
21747 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21748 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21749
21750 echo "$as_me:21750: result: $LIB_SUBSETS" >&5
21751 echo "${ECHO_T}$LIB_SUBSETS" >&6
21752
21753 ### Construct the list of include-directories to be generated
21754
21755 if test "$srcdir" != "."; then
21756         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21757 fi
21758 CPPFLAGS="-I../include $CPPFLAGS"
21759 if test "$srcdir" != "."; then
21760         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21761 fi
21762 CPPFLAGS="-I. $CPPFLAGS"
21763
21764 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21765 if test "$srcdir" != "."; then
21766         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21767 fi
21768 if test "$GCC" != yes; then
21769         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21770 elif test "$includedir" != "/usr/include"; then
21771         if test "$includedir" = '${prefix}/include' ; then
21772                 if test x$prefix != x/usr ; then
21773                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21774                 fi
21775         else
21776                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21777         fi
21778 fi
21779
21780 ### Build up pieces for makefile rules
21781 echo "$as_me:21781: checking default library suffix" >&5
21782 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21783
21784         case $DFT_LWR_MODEL in
21785         (libtool) DFT_ARG_SUFFIX=''   ;;
21786         (normal)  DFT_ARG_SUFFIX=''   ;;
21787         (debug)   DFT_ARG_SUFFIX='_g' ;;
21788         (profile) DFT_ARG_SUFFIX='_p' ;;
21789         (shared)  DFT_ARG_SUFFIX=''   ;;
21790         esac
21791         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21792 echo "$as_me:21792: result: $DFT_ARG_SUFFIX" >&5
21793 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21794
21795 echo "$as_me:21795: checking default library-dependency suffix" >&5
21796 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21797
21798         case X$DFT_LWR_MODEL in
21799         (Xlibtool)
21800                 DFT_LIB_SUFFIX='.la'
21801                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21802                 ;;
21803         (Xdebug)
21804                 DFT_LIB_SUFFIX='_g.a'
21805                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21806                 ;;
21807         (Xprofile)
21808                 DFT_LIB_SUFFIX='_p.a'
21809                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21810                 ;;
21811         (Xshared)
21812                 case $cf_cv_system_name in
21813                 (aix[5-7]*)
21814                         DFT_LIB_SUFFIX='.so'
21815                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21816                         ;;
21817                 (cygwin*|msys*|mingw*)
21818                         DFT_LIB_SUFFIX='.dll'
21819                         DFT_DEP_SUFFIX='.dll.a'
21820                         ;;
21821                 (darwin*)
21822                         DFT_LIB_SUFFIX='.dylib'
21823                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21824                         ;;
21825                 (hpux*)
21826                         case $target in
21827                         (ia64*)
21828                                 DFT_LIB_SUFFIX='.so'
21829                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21830                                 ;;
21831                         (*)
21832                                 DFT_LIB_SUFFIX='.sl'
21833                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21834                                 ;;
21835                         esac
21836                         ;;
21837                 (*)
21838                         DFT_LIB_SUFFIX='.so'
21839                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21840                         ;;
21841                 esac
21842                 ;;
21843         (*)
21844                 DFT_LIB_SUFFIX='.a'
21845                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21846                 ;;
21847         esac
21848         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21849         then
21850                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21851                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21852         fi
21853 echo "$as_me:21853: result: $DFT_DEP_SUFFIX" >&5
21854 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21855
21856 echo "$as_me:21856: checking default object directory" >&5
21857 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21858
21859         case $DFT_LWR_MODEL in
21860         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21861         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21862         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21863         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21864         (shared)
21865                 case $cf_cv_system_name in
21866                 (cygwin|msys)
21867                         DFT_OBJ_SUBDIR='objects' ;;
21868                 (*)
21869                         DFT_OBJ_SUBDIR='obj_s' ;;
21870                 esac
21871         esac
21872 echo "$as_me:21872: result: $DFT_OBJ_SUBDIR" >&5
21873 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21874
21875 if test "x$cf_with_cxx" = xyes ; then
21876 echo "$as_me:21876: checking c++ library-dependency suffix" >&5
21877 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21878 if test "$with_libtool" != "no"; then
21879         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21880         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21881 elif test "$with_shared_cxx" != "no"; then
21882         # also for g++ users...
21883         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21884 else
21885         # we normally make a static library because C/C++ library rules differ
21886
21887         case Xnormal in
21888         (Xlibtool)
21889                 CXX_LIB_SUFFIX='.la'
21890                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21891                 ;;
21892         (Xdebug)
21893                 CXX_LIB_SUFFIX='_g.a'
21894                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21895                 ;;
21896         (Xprofile)
21897                 CXX_LIB_SUFFIX='_p.a'
21898                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21899                 ;;
21900         (Xshared)
21901                 case $cf_cv_system_name in
21902                 (aix[5-7]*)
21903                         CXX_LIB_SUFFIX='.so'
21904                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21905                         ;;
21906                 (cygwin*|msys*|mingw*)
21907                         CXX_LIB_SUFFIX='.dll'
21908                         CXX_DEP_SUFFIX='.dll.a'
21909                         ;;
21910                 (darwin*)
21911                         CXX_LIB_SUFFIX='.dylib'
21912                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21913                         ;;
21914                 (hpux*)
21915                         case $target in
21916                         (ia64*)
21917                                 CXX_LIB_SUFFIX='.so'
21918                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21919                                 ;;
21920                         (*)
21921                                 CXX_LIB_SUFFIX='.sl'
21922                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21923                                 ;;
21924                         esac
21925                         ;;
21926                 (*)
21927                         CXX_LIB_SUFFIX='.so'
21928                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21929                         ;;
21930                 esac
21931                 ;;
21932         (*)
21933                 CXX_LIB_SUFFIX='.a'
21934                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21935                 ;;
21936         esac
21937         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21938         then
21939                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21940                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21941         fi
21942
21943 fi
21944 echo "$as_me:21944: result: $CXX_LIB_SUFFIX" >&5
21945 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21946
21947 fi
21948
21949 # do not want -ldl in build except as needed for -lncurses dependency
21950 if test "x$with_dlsym" = xyes ; then
21951 if test $DFT_LWR_MODEL = shared || \
21952    test $DFT_LWR_MODEL = libtool ; then
21953
21954 # remove dl library from $LIBS
21955 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21956
21957 fi
21958 fi
21959 ### Set up low-level terminfo dependencies for makefiles.
21960
21961 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21962 # do not need libdl
21963 TICS_LIST=
21964 if test "x$with_dlsym" = xyes ; then
21965
21966 # remove dl library from $SHLIB_LIST
21967 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21968
21969 fi
21970
21971 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21972 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21973 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21974 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21975 then
21976         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21977 fi
21978
21979 if test "$with_ticlib" != no ; then
21980
21981         if test "x$with_ticlib" != xyes ; then
21982                 TICS_NAME=$with_ticlib
21983                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21984                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21985                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21986                 TICS_LIB_SUFFIX="${with_ticlib}"
21987         else
21988                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
21989                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21990                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21991                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21992         fi
21993         TICS_LDFLAGS="-L${LIB_DIR}"
21994         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
21995 else
21996         TICS_SUFFIX=${DFT_LIB_SUFFIX}
21997         TICS_LDFLAGS="-L${LIB_DIR}"
21998         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21999 fi
22000
22001 if test "$with_termlib" != no ; then
22002
22003         if test "x$with_termlib" != xyes ; then
22004                 TINFO_NAME=$with_termlib
22005                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22006                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22007                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22008                 TINFO_LIB_SUFFIX="${with_termlib}"
22009         else
22010                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22011                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22012                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22013                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22014         fi
22015
22016         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22017         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22018         if test "$DFT_LWR_MODEL" = "libtool"; then
22019                 TEST_ARGS="${TEST_DEPS}"
22020                 TEST_ARG2="${TEST_DEP2}"
22021                 TINFO_LDFLAGS="-L${LIB_DIR}"
22022                 TINFO_LIBS="$TEST_ARGS"
22023                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22024                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22025         else
22026                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22027                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22028                 if test "x$with_term_driver" != xno ; then
22029                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22030                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22031                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22032                 else
22033                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22034                         TINFO_LIBS="$TEST_ARGS"
22035                 fi
22036                 TINFO_LDFLAGS="-L${LIB_DIR}"
22037                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22038         fi
22039 else
22040         # the next lines are needed for linking libtic over libncurses
22041         TINFO_NAME=${LIB_NAME}
22042         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22043         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22044         if test "x$with_tic_depends" = xyes ; then
22045                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22046         else
22047                 TICS_LIST="$SHLIB_LIST"
22048         fi
22049
22050         TINFO_LDFLAGS="-L${LIB_DIR}"
22051         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22052 fi
22053
22054 if test "$DFT_LWR_MODEL" = shared ; then
22055         case $cf_cv_system_name in
22056         (cygwin*|msys*)
22057                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22058                 TINFO_SUFFIX=.dll
22059                 ;;
22060         esac
22061 fi
22062
22063 if test "x$with_dlsym" = xyes ; then
22064
22065 # remove dl library from $TICS_LIST
22066 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22067
22068 fi
22069
22070 if test "$DFT_LWR_MODEL" = "libtool"; then
22071         OBJEXT=lo
22072 fi
22073
22074 # needed for Ada95
22075 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22076
22077 case $DFT_LWR_MODEL in
22078 (normal|debug|profile)
22079
22080 if test "$GCC" = yes ; then
22081         case $cf_cv_system_name in
22082         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22083                 LDFLAGS_STATIC=
22084                 LDFLAGS_SHARED=
22085                 ;;
22086         (*)     # normally, except when broken
22087                 LDFLAGS_STATIC=-static
22088                 LDFLAGS_SHARED=-dynamic
22089                 ;;
22090         esac
22091 else
22092         case $cf_cv_system_name in
22093         (aix[4-7]*)     # from ld manpage
22094                 LDFLAGS_STATIC=-bstatic
22095                 LDFLAGS_SHARED=-bdynamic
22096                 ;;
22097         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22098                 # We could also use just "archive" and "shared".
22099                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22100                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22101                 ;;
22102         (irix*)         # from ld manpage IRIX64
22103                 LDFLAGS_STATIC=-Bstatic
22104                 LDFLAGS_SHARED=-Bdynamic
22105                 ;;
22106         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22107                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22108                 LDFLAGS_STATIC=-noso
22109                 LDFLAGS_SHARED=-so_archive
22110                 ;;
22111         (solaris2*)
22112                 LDFLAGS_STATIC=-Bstatic
22113                 LDFLAGS_SHARED=-Bdynamic
22114                 ;;
22115         esac
22116 fi
22117
22118 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22119 then
22120         echo "$as_me:22120: checking if linker supports switching between static/dynamic" >&5
22121 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22122
22123         rm -f libconftest.a
22124         cat >conftest.$ac_ext <<EOF
22125 #line 22125 "configure"
22126 #include <stdio.h>
22127 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22128 EOF
22129         if { (eval echo "$as_me:22129: \"$ac_compile\"") >&5
22130   (eval $ac_compile) 2>&5
22131   ac_status=$?
22132   echo "$as_me:22132: \$? = $ac_status" >&5
22133   (exit $ac_status); } ; then
22134                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22135                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22136         fi
22137         rm -f conftest.*
22138
22139         cf_save_LIBS="$LIBS"
22140
22141         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22142         cat >conftest.$ac_ext <<_ACEOF
22143 #line 22143 "configure"
22144 #include "confdefs.h"
22145
22146 #line 22146 "configure"
22147 #include <stdio.h>
22148 int cf_ldflags_static(FILE *fp);
22149
22150 int
22151 main ()
22152 {
22153
22154         return cf_ldflags_static(stdin);
22155
22156   ;
22157   return 0;
22158 }
22159 _ACEOF
22160 rm -f conftest.$ac_objext conftest$ac_exeext
22161 if { (eval echo "$as_me:22161: \"$ac_link\"") >&5
22162   (eval $ac_link) 2>&5
22163   ac_status=$?
22164   echo "$as_me:22164: \$? = $ac_status" >&5
22165   (exit $ac_status); } &&
22166          { ac_try='test -s conftest$ac_exeext'
22167   { (eval echo "$as_me:22167: \"$ac_try\"") >&5
22168   (eval $ac_try) 2>&5
22169   ac_status=$?
22170   echo "$as_me:22170: \$? = $ac_status" >&5
22171   (exit $ac_status); }; }; then
22172
22173         # some linkers simply ignore the -dynamic
22174         case x`file conftest$ac_exeext 2>/dev/null` in
22175         (*static*)
22176                 cf_ldflags_static=no
22177                 ;;
22178         (*)
22179                 cf_ldflags_static=yes
22180                 ;;
22181         esac
22182
22183 else
22184   echo "$as_me: failed program was:" >&5
22185 cat conftest.$ac_ext >&5
22186 cf_ldflags_static=no
22187 fi
22188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22189
22190         rm -f libconftest.*
22191         LIBS="$cf_save_LIBS"
22192
22193         echo "$as_me:22193: result: $cf_ldflags_static" >&5
22194 echo "${ECHO_T}$cf_ldflags_static" >&6
22195
22196         if test $cf_ldflags_static != yes
22197         then
22198                 LDFLAGS_STATIC=
22199                 LDFLAGS_SHARED=
22200         fi
22201 else
22202         LDFLAGS_STATIC=
22203         LDFLAGS_SHARED=
22204 fi
22205
22206         ;;
22207 esac
22208
22209 echo "$as_me:22209: checking where we will install curses.h" >&5
22210 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22211
22212 includesubdir=
22213 if test "$with_overwrite" = no && \
22214  ( test "x$includedir" = 'x${prefix}/include' || \
22215    test "x$includedir" = "x${prefix}/include" )
22216 then
22217         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22218 fi
22219 echo "$as_me:22219: result: ${includedir}${includesubdir}" >&5
22220 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22221
22222 ### Resolve a conflict between normal and wide-curses by forcing applications
22223 ### that will need libutf8 to add it to their configure script.
22224 if test "$with_overwrite" != no ; then
22225 if test "$NCURSES_LIBUTF8" = 1 ; then
22226         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22227         { echo "$as_me:22227: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22228 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22229 fi
22230 fi
22231 WITH_OVERWRITE=$with_overwrite
22232
22233 # used to separate tack out of the tree
22234 NCURSES_TREE=
22235
22236 ### predefined stuff for the test programs
22237
22238 cat >>confdefs.h <<\EOF
22239 #define HAVE_SLK_COLOR 1
22240 EOF
22241
22242 ### Construct the list of subdirectories for which we'll customize makefiles
22243 ### with the appropriate compile-rules.
22244
22245 echo "$as_me:22245: checking for src modules" >&5
22246 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22247
22248 # dependencies and linker-arguments for test-programs
22249 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22250 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22251 if test "$DFT_LWR_MODEL" = "libtool"; then
22252         TEST_ARGS="${TEST_DEPS}"
22253         TEST_ARG2="${TEST_DEP2}"
22254 else
22255         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22256         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22257 fi
22258
22259 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22260 cf_cv_src_modules=
22261 for cf_dir in $modules_to_build
22262 do
22263         if test -f $srcdir/$cf_dir/modules; then
22264
22265                 # We may/may not have tack in the distribution, though the
22266                 # makefile is.
22267                 if test $cf_dir = tack ; then
22268                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22269                                 continue
22270                         fi
22271                 fi
22272
22273                 if test -z "$cf_cv_src_modules"; then
22274                         cf_cv_src_modules=$cf_dir
22275                 else
22276                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22277                 fi
22278
22279                 # Make the ncurses_cfg.h file record the library interface files as
22280                 # well.  These are header files that are the same name as their
22281                 # directory.  Ncurses is the only library that does not follow
22282                 # that pattern.
22283                 if test $cf_dir = tack ; then
22284                         continue
22285                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22286
22287 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22288
22289                         cat >>confdefs.h <<EOF
22290 #define HAVE_${cf_have_include}_H 1
22291 EOF
22292
22293                         cat >>confdefs.h <<EOF
22294 #define HAVE_LIB${cf_have_include} 1
22295 EOF
22296
22297                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22298                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22299                         if test "$DFT_LWR_MODEL" = "libtool"; then
22300                                 TEST_ARGS="${TEST_DEPS}"
22301                                 TEST_ARG2="${TEST_DEP2}"
22302                         else
22303                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22304                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22305                         fi
22306                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22307                 fi
22308         fi
22309 done
22310 echo "$as_me:22310: result: $cf_cv_src_modules" >&5
22311 echo "${ECHO_T}$cf_cv_src_modules" >&6
22312
22313 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22314 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22315
22316 SRC_SUBDIRS=
22317 if test "x$cf_with_manpages" != xno ; then
22318         SRC_SUBDIRS="$SRC_SUBDIRS man"
22319 fi
22320 SRC_SUBDIRS="$SRC_SUBDIRS include"
22321 for cf_dir in $cf_cv_src_modules
22322 do
22323         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22324 done
22325 if test "x$cf_with_tests" != "xno" ; then
22326         SRC_SUBDIRS="$SRC_SUBDIRS test"
22327 fi
22328 # always make this, to install the ncurses-config script
22329 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22330 if test "$cf_with_cxx_binding" != no; then
22331         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22332         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22333 fi
22334
22335 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22336 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22337
22338 ADA_SUBDIRS=
22339 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22340         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22341         ADA_SUBDIRS="gen src"
22342         if test "x$cf_with_tests" != "xno" ; then
22343                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22344         fi
22345 fi
22346
22347 SUB_MAKEFILES=
22348 for cf_dir in $SRC_SUBDIRS
22349 do
22350         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22351 done
22352
22353 if test -n "$ADA_SUBDIRS"; then
22354         for cf_dir in $ADA_SUBDIRS
22355         do
22356                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22357         done
22358
22359 fi
22360
22361 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22362    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22363    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22364 fi
22365
22366 DIRS_TO_MAKE="lib"
22367 for cf_item in $cf_list_models
22368 do
22369
22370         case $cf_item in
22371         (libtool) cf_subdir='obj_lo'  ;;
22372         (normal)  cf_subdir='objects' ;;
22373         (debug)   cf_subdir='obj_g' ;;
22374         (profile) cf_subdir='obj_p' ;;
22375         (shared)
22376                 case $cf_cv_system_name in
22377                 (cygwin|msys)
22378                         cf_subdir='objects' ;;
22379                 (*)
22380                         cf_subdir='obj_s' ;;
22381                 esac
22382         esac
22383
22384         for cf_item2 in $DIRS_TO_MAKE
22385         do
22386                 test $cf_item2 = $cf_subdir && break
22387         done
22388         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22389 done
22390 for cf_dir in $DIRS_TO_MAKE
22391 do
22392         test ! -d $cf_dir && mkdir $cf_dir
22393 done
22394
22395 # symbols that differ when compiling Ada95 by itself.
22396 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22397
22398 # values to use as strings
22399
22400 cat >>confdefs.h <<EOF
22401 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22402 EOF
22403
22404 cat >>confdefs.h <<EOF
22405 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22406 EOF
22407
22408 ### Now that we're done running tests, add the compiler-warnings, if any
22409
22410 cf_fix_cppflags=no
22411 cf_new_cflags=
22412 cf_new_cppflags=
22413 cf_new_extra_cppflags=
22414
22415 for cf_add_cflags in $EXTRA_CFLAGS
22416 do
22417 case $cf_fix_cppflags in
22418 (no)
22419         case $cf_add_cflags in
22420         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22421                 case $cf_add_cflags in
22422                 (-D*)
22423                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22424
22425                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22426                                 && test -z "${cf_tst_cflags}" \
22427                                 && cf_fix_cppflags=yes
22428
22429                         if test $cf_fix_cppflags = yes ; then
22430                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22431                                 continue
22432                         elif test "${cf_tst_cflags}" = "\"'" ; then
22433                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22434                                 continue
22435                         fi
22436                         ;;
22437                 esac
22438                 case "$CPPFLAGS" in
22439                 (*$cf_add_cflags)
22440                         ;;
22441                 (*)
22442                         case $cf_add_cflags in
22443                         (-D*)
22444                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22445
22446 CPPFLAGS=`echo "$CPPFLAGS" | \
22447         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22448                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22449
22450                                 ;;
22451                         esac
22452                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22453                         ;;
22454                 esac
22455                 ;;
22456         (*)
22457                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22458                 ;;
22459         esac
22460         ;;
22461 (yes)
22462         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22463
22464         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22465
22466         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22467                 && test -z "${cf_tst_cflags}" \
22468                 && cf_fix_cppflags=no
22469         ;;
22470 esac
22471 done
22472
22473 if test -n "$cf_new_cflags" ; then
22474
22475         CFLAGS="$CFLAGS $cf_new_cflags"
22476 fi
22477
22478 if test -n "$cf_new_cppflags" ; then
22479
22480         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22481 fi
22482
22483 if test -n "$cf_new_extra_cppflags" ; then
22484
22485         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22486 fi
22487
22488 ### Define substitutions for header files to avoid name-pollution
22489
22490 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22491         HAVE_TCGETATTR=1
22492 else
22493         HAVE_TCGETATTR=0
22494 fi
22495
22496 if test "x$ac_cv_header_stdint_h" = xyes ; then
22497         HAVE_STDINT_H=1
22498 else
22499         HAVE_STDINT_H=0
22500 fi
22501
22502 if test "x$ac_cv_header_termio_h" = xyes ; then
22503         HAVE_TERMIO_H=1
22504 else
22505         HAVE_TERMIO_H=0
22506 fi
22507
22508 if test "x$ac_cv_header_termios_h" = xyes ; then
22509         HAVE_TERMIOS_H=1
22510 else
22511         HAVE_TERMIOS_H=0
22512 fi
22513
22514 ################################################################################
22515 test "x$use_database" = xyes && \
22516 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22517
22518 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22519 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22520
22521 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22522 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22523 fi
22524
22525 # Extract the first word of "tic", so it can be a program name with args.
22526 set dummy tic; ac_word=$2
22527 echo "$as_me:22527: checking for $ac_word" >&5
22528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22529 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22530   echo $ECHO_N "(cached) $ECHO_C" >&6
22531 else
22532   case $TIC_PATH in
22533   [\\/]* | ?:[\\/]*)
22534   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22535   ;;
22536   *)
22537   ac_save_IFS=$IFS; IFS=$ac_path_separator
22538 ac_dummy="$PATH:/usr/local/ncurses/bin"
22539 for ac_dir in $ac_dummy; do
22540   IFS=$ac_save_IFS
22541   test -z "$ac_dir" && ac_dir=.
22542   if $as_executable_p "$ac_dir/$ac_word"; then
22543    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22544    echo "$as_me:22544: found $ac_dir/$ac_word" >&5
22545    break
22546 fi
22547 done
22548
22549   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22550   ;;
22551 esac
22552 fi
22553 TIC_PATH=$ac_cv_path_TIC_PATH
22554
22555 if test -n "$TIC_PATH"; then
22556   echo "$as_me:22556: result: $TIC_PATH" >&5
22557 echo "${ECHO_T}$TIC_PATH" >&6
22558 else
22559   echo "$as_me:22559: result: no" >&5
22560 echo "${ECHO_T}no" >&6
22561 fi
22562
22563 if test -n "$FALLBACK_LIST"
22564 then
22565         if test "$TIC_PATH" = unknown
22566         then
22567                 { echo "$as_me:22567: WARNING: no tic program found for fallbacks" >&5
22568 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22569         fi
22570 fi
22571
22572 if test "x$cf_with_tests" != xno ; then
22573         MAKE_TESTS=
22574 else
22575         MAKE_TESTS="#"
22576 fi
22577
22578 ADAHTML_DIR=../../doc/html/ada
22579
22580 # these could be configurable, but are not currently
22581 PANEL_NAME=panel
22582 MENU_NAME=menu
22583 FORM_NAME=form
22584 CXX_NAME=ncurses++
22585
22586 # workaround for OS/2 (20151017)
22587 case $cf_cv_system_name in
22588 (os2*)
22589         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22590         ;;
22591 (*)
22592         LIBTOOL_OPTS_CXX=
22593         ;;
22594 esac
22595
22596 # workaround for g++ versus Solaris (20131116)
22597 case $cf_cv_system_name in
22598 (solaris2*)
22599         case "x$CPPFLAGS" in
22600         (*-D_XOPEN_SOURCE_EXTENDED*)
22601                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22602
22603 echo "${as_me:-configure}:22603: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22604
22605                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22606                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22607                 ;;
22608         esac
22609         ;;
22610 esac
22611
22612 # Help to automatically enable the extended curses features when using either
22613 # the *-config or the ".pc" files by adding defines.
22614 echo "$as_me:22614: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22615 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22616 PKG_CFLAGS=
22617 for cf_loop1 in $CPPFLAGS_after_XOPEN
22618 do
22619         cf_found=no
22620         for cf_loop2 in $CPPFLAGS_before_XOPEN
22621         do
22622                 if test "x$cf_loop1" = "x$cf_loop2"
22623                 then
22624                         cf_found=yes
22625                         break
22626                 fi
22627         done
22628         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22629 done
22630 echo "$as_me:22630: result: $PKG_CFLAGS" >&5
22631 echo "${ECHO_T}$PKG_CFLAGS" >&6
22632
22633 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22634 case "x$NCURSES_OSPEED" in
22635 (*short*)
22636         cf_compatible=1
22637         ;;
22638 (*)
22639         cf_compatible=0
22640         ;;
22641 esac
22642
22643 cat >>confdefs.h <<EOF
22644 #define NCURSES_OSPEED_COMPAT $cf_compatible
22645 EOF
22646
22647 case "x$cf_cv_typeof_chtype" in
22648 (xshort|xint|xlong)
22649         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22650         ;;
22651 esac
22652
22653 case "x$cf_cv_typeof_mmask_t" in
22654 (xshort|xint|xlong)
22655         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22656         ;;
22657 esac
22658
22659 # substitute into misc/Makefile to suppress
22660 # (un)install.data from the
22661 # (un)install rules.
22662 if test "x$cf_with_db_install" = "xno"; then
22663         MISC_INSTALL_DATA=
22664         MISC_UNINSTALL_DATA=
22665 else
22666         MISC_INSTALL_DATA=install.data
22667         MISC_UNINSTALL_DATA=uninstall.data
22668 fi
22669
22670 SUB_SCRIPTS=
22671
22672 if test -n "$PACKAGE"
22673 then
22674         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22675         export PACKAGE
22676         echo "package: $PACKAGE"
22677 fi
22678
22679 UNALTERED_SYMS=
22680 cf_filter_syms=no
22681
22682 if test -n "$RESULTING_SYMS"
22683 then
22684         cf_filter_syms=$cf_dft_filter_syms
22685         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22686
22687 echo "${as_me:-configure}:22687: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22688
22689 fi
22690
22691 if test "x$WILDCARD_SYMS" = xno
22692 then
22693         cf_filter_syms=yes
22694 fi
22695
22696 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
22697
22698 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22699 if test $cf_filter_syms = yes
22700 then
22701         RESULTING_SYMS=resulting.map
22702 fi
22703
22704 if test "x$cross_compiling" = xyes ; then
22705         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22706 else
22707         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22708 fi
22709
22710 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"
22711 ac_config_commands="$ac_config_commands default"
22712 cat >confcache <<\_ACEOF
22713 # This file is a shell script that caches the results of configure
22714 # tests run on this system so they can be shared between configure
22715 # scripts and configure runs, see configure's option --config-cache.
22716 # It is not useful on other systems.  If it contains results you don't
22717 # want to keep, you may remove or edit it.
22718 #
22719 # config.status only pays attention to the cache file if you give it
22720 # the --recheck option to rerun configure.
22721 #
22722 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22723 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22724 # following values.
22725
22726 _ACEOF
22727
22728 # The following way of writing the cache mishandles newlines in values,
22729 # but we know of no workaround that is simple, portable, and efficient.
22730 # So, don't put newlines in cache variables' values.
22731 # Ultrix sh set writes to stderr and can't be redirected directly,
22732 # and sets the high bit in the cache file unless we assign to the vars.
22733 {
22734   (set) 2>&1 |
22735     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22736     *ac_space=\ *)
22737       # `set' does not quote correctly, so add quotes (double-quote
22738       # substitution turns \\\\ into \\, and sed turns \\ into \).
22739       sed -n \
22740         "s/'/'\\\\''/g;
22741           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22742       ;;
22743     *)
22744       # `set' quotes correctly as required by POSIX, so do not add quotes.
22745       sed -n \
22746         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22747       ;;
22748     esac;
22749 } |
22750   sed '
22751      t clear
22752      : clear
22753      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22754      t end
22755      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22756      : end' >>confcache
22757 if cmp -s $cache_file confcache; then :; else
22758   if test -w $cache_file; then
22759     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22760     cat confcache >$cache_file
22761   else
22762     echo "not updating unwritable cache $cache_file"
22763   fi
22764 fi
22765 rm -f confcache
22766
22767 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22768 # Let make expand exec_prefix.
22769 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22770
22771 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22772 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22773 # trailing colons and then remove the whole line if VPATH becomes empty
22774 # (actually we leave an empty line to preserve line numbers).
22775 if test "x$srcdir" = x.; then
22776   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22777 s/:*\$(srcdir):*/:/;
22778 s/:*\${srcdir}:*/:/;
22779 s/:*@srcdir@:*/:/;
22780 s/^\([^=]*=[    ]*\):*/\1/;
22781 s/:*$//;
22782 s/^[^=]*=[      ]*$//;
22783 }'
22784 fi
22785
22786 DEFS=-DHAVE_CONFIG_H
22787
22788 : ${CONFIG_STATUS=./config.status}
22789 ac_clean_files_save=$ac_clean_files
22790 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22791 { echo "$as_me:22791: creating $CONFIG_STATUS" >&5
22792 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22793 cat >$CONFIG_STATUS <<_ACEOF
22794 #! $SHELL
22795 # Generated automatically by configure.
22796 # Run this file to recreate the current configuration.
22797 # Compiler output produced by configure, useful for debugging
22798 # configure, is in config.log if it exists.
22799
22800 debug=false
22801 SHELL=\${CONFIG_SHELL-$SHELL}
22802 ac_cs_invocation="\$0 \$@"
22803
22804 _ACEOF
22805
22806 cat >>$CONFIG_STATUS <<\_ACEOF
22807 # Be Bourne compatible
22808 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22809   emulate sh
22810   NULLCMD=:
22811 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22812   set -o posix
22813 fi
22814
22815 # Name of the executable.
22816 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22817
22818 if expr a : '\(a\)' >/dev/null 2>&1; then
22819   as_expr=expr
22820 else
22821   as_expr=false
22822 fi
22823
22824 rm -f conf$$ conf$$.exe conf$$.file
22825 echo >conf$$.file
22826 if ln -s conf$$.file conf$$ 2>/dev/null; then
22827   # We could just check for DJGPP; but this test a) works b) is more generic
22828   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22829   if test -f conf$$.exe; then
22830     # Don't use ln at all; we don't have any links
22831     as_ln_s='cp -p'
22832   else
22833     as_ln_s='ln -s'
22834   fi
22835 elif ln conf$$.file conf$$ 2>/dev/null; then
22836   as_ln_s=ln
22837 else
22838   as_ln_s='cp -p'
22839 fi
22840 rm -f conf$$ conf$$.exe conf$$.file
22841
22842 as_executable_p="test -f"
22843
22844 # Support unset when possible.
22845 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22846   as_unset=unset
22847 else
22848   as_unset=false
22849 fi
22850
22851 # NLS nuisances.
22852 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22853 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22854 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22855 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22856 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22857 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22858 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22859 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22860
22861 # IFS
22862 # We need space, tab and new line, in precisely that order.
22863 as_nl='
22864 '
22865 IFS="   $as_nl"
22866
22867 # CDPATH.
22868 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22869
22870 exec 6>&1
22871
22872 _ACEOF
22873
22874 # Files that config.status was made for.
22875 if test -n "$ac_config_files"; then
22876   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22877 fi
22878
22879 if test -n "$ac_config_headers"; then
22880   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22881 fi
22882
22883 if test -n "$ac_config_links"; then
22884   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22885 fi
22886
22887 if test -n "$ac_config_commands"; then
22888   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22889 fi
22890
22891 cat >>$CONFIG_STATUS <<\EOF
22892
22893 ac_cs_usage="\
22894 \`$as_me' instantiates files from templates according to the
22895 current configuration.
22896
22897 Usage: $0 [OPTIONS] [FILE]...
22898
22899   -h, --help       print this help, then exit
22900   -V, --version    print version number, then exit
22901   -d, --debug      don't remove temporary files
22902       --recheck    update $as_me by reconfiguring in the same conditions
22903   --file=FILE[:TEMPLATE]
22904                    instantiate the configuration file FILE
22905   --header=FILE[:TEMPLATE]
22906                    instantiate the configuration header FILE
22907
22908 Configuration files:
22909 $config_files
22910
22911 Configuration headers:
22912 $config_headers
22913
22914 Configuration commands:
22915 $config_commands
22916
22917 Report bugs to <dickey@invisible-island.net>."
22918 EOF
22919
22920 cat >>$CONFIG_STATUS <<EOF
22921 ac_cs_version="\\
22922 config.status
22923 configured by $0, generated by GNU Autoconf 2.52.20150926,
22924   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22925
22926 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22927 Free Software Foundation, Inc.
22928 This config.status script is free software; the Free Software Foundation
22929 gives unlimited permission to copy, distribute and modify it."
22930 srcdir=$srcdir
22931 INSTALL="$INSTALL"
22932 EOF
22933
22934 cat >>$CONFIG_STATUS <<\EOF
22935 # If no file are specified by the user, then we need to provide default
22936 # value.  By we need to know if files were specified by the user.
22937 ac_need_defaults=:
22938 while test $# != 0
22939 do
22940   case $1 in
22941   --*=*)
22942     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22943     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22944     shift
22945     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22946     shift
22947     ;;
22948   -*);;
22949   *) # This is not an option, so the user has probably given explicit
22950      # arguments.
22951      ac_need_defaults=false;;
22952   esac
22953
22954   case $1 in
22955   # Handling of the options.
22956 EOF
22957 cat >>$CONFIG_STATUS <<EOF
22958   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22959     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22960     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22961 EOF
22962 cat >>$CONFIG_STATUS <<\EOF
22963   --version | --vers* | -V )
22964     echo "$ac_cs_version"; exit 0 ;;
22965   --he | --h)
22966     # Conflict between --help and --header
22967     { { echo "$as_me:22967: error: ambiguous option: $1
22968 Try \`$0 --help' for more information." >&5
22969 echo "$as_me: error: ambiguous option: $1
22970 Try \`$0 --help' for more information." >&2;}
22971    { (exit 1); exit 1; }; };;
22972   --help | --hel | -h )
22973     echo "$ac_cs_usage"; exit 0 ;;
22974   --debug | --d* | -d )
22975     debug=: ;;
22976   --file | --fil | --fi | --f )
22977     shift
22978     CONFIG_FILES="$CONFIG_FILES $1"
22979     ac_need_defaults=false;;
22980   --header | --heade | --head | --hea )
22981     shift
22982     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22983     ac_need_defaults=false;;
22984
22985   # This is an error.
22986   -*) { { echo "$as_me:22986: error: unrecognized option: $1
22987 Try \`$0 --help' for more information." >&5
22988 echo "$as_me: error: unrecognized option: $1
22989 Try \`$0 --help' for more information." >&2;}
22990    { (exit 1); exit 1; }; } ;;
22991
22992   *) ac_config_targets="$ac_config_targets $1" ;;
22993
22994   esac
22995   shift
22996 done
22997
22998 exec 5>>config.log
22999 cat >&5 << _ACEOF
23000
23001 ## ----------------------- ##
23002 ## Running config.status.  ##
23003 ## ----------------------- ##
23004
23005 This file was extended by $as_me 2.52.20150926, executed with
23006   CONFIG_FILES    = $CONFIG_FILES
23007   CONFIG_HEADERS  = $CONFIG_HEADERS
23008   CONFIG_LINKS    = $CONFIG_LINKS
23009   CONFIG_COMMANDS = $CONFIG_COMMANDS
23010   > $ac_cs_invocation
23011 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23012
23013 _ACEOF
23014 EOF
23015
23016 cat >>$CONFIG_STATUS <<EOF
23017 #
23018 # INIT-COMMANDS section.
23019 #
23020
23021 ### Special initialization commands, used to pass information from the
23022 ### configuration-run into config.status
23023
23024 AWK="$AWK"
23025 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23026 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23027 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23028 ECHO_LD="$ECHO_LD"
23029 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23030 LDCONFIG="$LDCONFIG"
23031 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23032 LIB_NAME="$LIB_NAME"
23033 LIB_PREFIX="$LIB_PREFIX"
23034 LIB_SUBSETS="$LIB_SUBSETS"
23035 LIB_SUFFIX="$LIB_SUFFIX"
23036 LIB_TRACING="$LIB_TRACING"
23037 LN_S="$LN_S"
23038 MAKE_TERMINFO="$MAKE_TERMINFO"
23039 NCURSES_MAJOR="$NCURSES_MAJOR"
23040 NCURSES_MINOR="$NCURSES_MINOR"
23041 NCURSES_OSPEED="$NCURSES_OSPEED"
23042 NCURSES_PATCH="$NCURSES_PATCH"
23043 SRC_SUBDIRS="$SRC_SUBDIRS"
23044 TERMINFO="$TERMINFO"
23045 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23046 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23047 TICS_NAME="$TICS_NAME"
23048 TICS_SUFFIX="$TICS_SUFFIX"
23049 TIC_PATH="$TIC_PATH"
23050 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23051 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23052 TINFO_NAME="$TINFO_NAME"
23053 TINFO_SUFFIX="$TINFO_SUFFIX"
23054 UNALTERED_SYMS="$UNALTERED_SYMS"
23055 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23056 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23057 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23058 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23059 WILDCARD_SYMS="$WILDCARD_SYMS"
23060 WITH_CURSES_H="$with_curses_h"
23061 WITH_ECHO="${enable_echo:=yes}"
23062 WITH_OVERWRITE="$with_overwrite"
23063 cf_LIST_MODELS="$cf_list_models"
23064 cf_cv_abi_version="$cf_cv_abi_version"
23065 cf_cv_do_relink="$cf_cv_do_relink"
23066 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23067 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23068 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23069 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23070 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23071 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23072 cf_cv_rel_version="$cf_cv_rel_version"
23073 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23074 cf_cv_shared_soname='$cf_cv_shared_soname'
23075 cf_cv_shlib_version="$cf_cv_shlib_version"
23076 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23077 cf_cv_system_name="$cf_cv_system_name"
23078 cf_cv_term_driver="$with_term_driver"
23079 cf_with_ada="$cf_with_ada"
23080 cf_with_cxx_binding="$cf_with_cxx_binding"
23081 cf_with_db_install="$cf_with_db_install"
23082 cf_with_manpages="$cf_with_manpages"
23083 cf_with_tests="$cf_with_tests"
23084 host="$host"
23085 target="$target"
23086 with_shared_cxx="$with_shared_cxx"
23087
23088 EOF
23089
23090 cat >>$CONFIG_STATUS <<\EOF
23091 for ac_config_target in $ac_config_targets
23092 do
23093   case "$ac_config_target" in
23094   # Handling of arguments.
23095   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23096   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23097   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23098   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23099   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23100   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23101   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23102   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23103   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23104   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23105   *) { { echo "$as_me:23105: error: invalid argument: $ac_config_target" >&5
23106 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23107    { (exit 1); exit 1; }; };;
23108   esac
23109 done
23110
23111 # If the user did not use the arguments to specify the items to instantiate,
23112 # then the envvar interface is used.  Set only those that are not.
23113 # We use the long form for the default assignment because of an extremely
23114 # bizarre bug on SunOS 4.1.3.
23115 if $ac_need_defaults; then
23116   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23117   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23118   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23119 fi
23120
23121 # Create a temporary directory, and hook for its removal unless debugging.
23122 $debug ||
23123 {
23124   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23125   trap '{ (exit 1); exit 1; }' 1 2 13 15
23126 }
23127
23128 # Create a (secure) tmp directory for tmp files.
23129 : ${TMPDIR=/tmp}
23130 {
23131   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23132   test -n "$tmp" && test -d "$tmp"
23133 }  ||
23134 {
23135   tmp=$TMPDIR/cs$$-$RANDOM
23136   (umask 077 && mkdir $tmp)
23137 } ||
23138 {
23139    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23140    { (exit 1); exit 1; }
23141 }
23142
23143 EOF
23144
23145 cat >>$CONFIG_STATUS <<EOF
23146
23147 #
23148 # CONFIG_FILES section.
23149 #
23150
23151 # No need to generate the scripts if there are no CONFIG_FILES.
23152 # This happens for instance when ./config.status config.h
23153 if test -n "\$CONFIG_FILES"; then
23154   # Protect against being on the right side of a sed subst in config.status.
23155   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23156    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23157 s,@SHELL@,$SHELL,;t t
23158 s,@exec_prefix@,$exec_prefix,;t t
23159 s,@prefix@,$prefix,;t t
23160 s,@program_transform_name@,$program_transform_name,;t t
23161 s,@bindir@,$bindir,;t t
23162 s,@sbindir@,$sbindir,;t t
23163 s,@libexecdir@,$libexecdir,;t t
23164 s,@datarootdir@,$datarootdir,;t t
23165 s,@datadir@,$datadir,;t t
23166 s,@sysconfdir@,$sysconfdir,;t t
23167 s,@sharedstatedir@,$sharedstatedir,;t t
23168 s,@localstatedir@,$localstatedir,;t t
23169 s,@libdir@,$libdir,;t t
23170 s,@includedir@,$includedir,;t t
23171 s,@oldincludedir@,$oldincludedir,;t t
23172 s,@infodir@,$infodir,;t t
23173 s,@mandir@,$mandir,;t t
23174 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23175 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23176 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23177 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23178 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23179 s,@build_alias@,$build_alias,;t t
23180 s,@host_alias@,$host_alias,;t t
23181 s,@target_alias@,$target_alias,;t t
23182 s,@ECHO_C@,$ECHO_C,;t t
23183 s,@ECHO_N@,$ECHO_N,;t t
23184 s,@ECHO_T@,$ECHO_T,;t t
23185 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23186 s,@DEFS@,$DEFS,;t t
23187 s,@LIBS@,$LIBS,;t t
23188 s,@top_builddir@,$top_builddir,;t t
23189 s,@EGREP@,$EGREP,;t t
23190 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23191 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23192 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23193 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23194 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23195 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23196 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23197 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23198 s,@VERSION@,$VERSION,;t t
23199 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23200 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23201 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23202 s,@PACKAGE@,$PACKAGE,;t t
23203 s,@build@,$build,;t t
23204 s,@build_cpu@,$build_cpu,;t t
23205 s,@build_vendor@,$build_vendor,;t t
23206 s,@build_os@,$build_os,;t t
23207 s,@host@,$host,;t t
23208 s,@host_cpu@,$host_cpu,;t t
23209 s,@host_vendor@,$host_vendor,;t t
23210 s,@host_os@,$host_os,;t t
23211 s,@target@,$target,;t t
23212 s,@target_cpu@,$target_cpu,;t t
23213 s,@target_vendor@,$target_vendor,;t t
23214 s,@target_os@,$target_os,;t t
23215 s,@CC@,$CC,;t t
23216 s,@CFLAGS@,$CFLAGS,;t t
23217 s,@LDFLAGS@,$LDFLAGS,;t t
23218 s,@CPPFLAGS@,$CPPFLAGS,;t t
23219 s,@ac_ct_CC@,$ac_ct_CC,;t t
23220 s,@EXEEXT@,$EXEEXT,;t t
23221 s,@OBJEXT@,$OBJEXT,;t t
23222 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23223 s,@CPP@,$CPP,;t t
23224 s,@LDCONFIG@,$LDCONFIG,;t t
23225 s,@CXX@,$CXX,;t t
23226 s,@CXXFLAGS@,$CXXFLAGS,;t t
23227 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23228 s,@AWK@,$AWK,;t t
23229 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23230 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23231 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23232 s,@LINT@,$LINT,;t t
23233 s,@LINT_OPTS@,$LINT_OPTS,;t t
23234 s,@LN_S@,$LN_S,;t t
23235 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23236 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23237 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23238 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23239 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23240 s,@SET_MAKE@,$SET_MAKE,;t t
23241 s,@CTAGS@,$CTAGS,;t t
23242 s,@ETAGS@,$ETAGS,;t t
23243 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23244 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23245 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23246 s,@RANLIB@,$RANLIB,;t t
23247 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23248 s,@LD@,$LD,;t t
23249 s,@ac_ct_LD@,$ac_ct_LD,;t t
23250 s,@AR@,$AR,;t t
23251 s,@ac_ct_AR@,$ac_ct_AR,;t t
23252 s,@NM@,$NM,;t t
23253 s,@ac_ct_NM@,$ac_ct_NM,;t t
23254 s,@ARFLAGS@,$ARFLAGS,;t t
23255 s,@DESTDIR@,$DESTDIR,;t t
23256 s,@BUILD_CC@,$BUILD_CC,;t t
23257 s,@BUILD_CPP@,$BUILD_CPP,;t t
23258 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23259 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23260 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23261 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23262 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23263 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23264 s,@cf_list_models@,$cf_list_models,;t t
23265 s,@ABI_VERSION@,$ABI_VERSION,;t t
23266 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23267 s,@LIBTOOL@,$LIBTOOL,;t t
23268 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23269 s,@LT_UNDEF@,$LT_UNDEF,;t t
23270 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23271 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23272 s,@LIB_CREATE@,$LIB_CREATE,;t t
23273 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23274 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23275 s,@LIB_PREP@,$LIB_PREP,;t t
23276 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23277 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23278 s,@LIB_LINK@,$LIB_LINK,;t t
23279 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23280 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23281 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23282 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23283 s,@TICS_NAME@,$TICS_NAME,;t t
23284 s,@TINFO_NAME@,$TINFO_NAME,;t t
23285 s,@LIB_NAME@,$LIB_NAME,;t t
23286 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23287 s,@CC_G_OPT@,$CC_G_OPT,;t t
23288 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23289 s,@LD_MODEL@,$LD_MODEL,;t t
23290 s,@shlibdir@,$shlibdir,;t t
23291 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23292 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23293 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23294 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23295 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23296 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23297 s,@LINK_PROGS@,$LINK_PROGS,;t t
23298 s,@LINK_TESTS@,$LINK_TESTS,;t t
23299 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23300 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23301 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23302 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23303 s,@RPATH_LIST@,$RPATH_LIST,;t t
23304 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23305 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23306 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23307 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23308 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23309 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23310 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23311 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23312 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23313 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23314 s,@XTERM_KBS@,$XTERM_KBS,;t t
23315 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23316 s,@TERMINFO@,$TERMINFO,;t t
23317 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23318 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23319 s,@TERMPATH@,$TERMPATH,;t t
23320 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23321 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23322 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23323 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23324 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23325 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23326 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23327 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23328 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23329 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23330 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23331 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23332 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23333 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23334 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23335 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23336 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23337 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23338 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23339 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23340 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23341 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23342 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23343 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23344 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23345 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23346 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23347 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23348 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23349 s,@PTHREAD@,$PTHREAD,;t t
23350 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23351 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23352 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23353 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23354 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23355 s,@ECHO_LT@,$ECHO_LT,;t t
23356 s,@ECHO_LD@,$ECHO_LD,;t t
23357 s,@RULE_CC@,$RULE_CC,;t t
23358 s,@SHOW_CC@,$SHOW_CC,;t t
23359 s,@ECHO_CC@,$ECHO_CC,;t t
23360 s,@ECHO_LINK@,$ECHO_LINK,;t t
23361 s,@ADAFLAGS@,$ADAFLAGS,;t t
23362 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23363 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23364 s,@ADA_TRACE@,$ADA_TRACE,;t t
23365 s,@MATH_LIB@,$MATH_LIB,;t t
23366 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23367 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23368 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23369 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23370 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23371 s,@TEST_LIBS@,$TEST_LIBS,;t t
23372 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23373 s,@CXXCPP@,$CXXCPP,;t t
23374 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23375 s,@CXX_AR@,$CXX_AR,;t t
23376 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23377 s,@CXXLIBS@,$CXXLIBS,;t t
23378 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23379 s,@gnat_exists@,$gnat_exists,;t t
23380 s,@M4_exists@,$M4_exists,;t t
23381 s,@cf_ada_make@,$cf_ada_make,;t t
23382 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23383 s,@cf_compile_generics@,$cf_compile_generics,;t t
23384 s,@cf_generic_objects@,$cf_generic_objects,;t t
23385 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23386 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23387 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23388 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23389 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23390 s,@cf_ada_package@,$cf_ada_package,;t t
23391 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23392 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23393 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23394 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23395 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23396 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23397 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23398 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23399 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23400 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23401 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23402 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23403 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23404 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23405 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23406 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23407 s,@TICS_LIBS@,$TICS_LIBS,;t t
23408 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23409 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23410 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23411 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23412 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23413 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23414 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23415 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23416 s,@includesubdir@,$includesubdir,;t t
23417 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23418 s,@TICS_LIST@,$TICS_LIST,;t t
23419 s,@TINFO_LIST@,$TINFO_LIST,;t t
23420 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23421 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23422 s,@TEST_ARGS@,$TEST_ARGS,;t t
23423 s,@TEST_DEPS@,$TEST_DEPS,;t t
23424 s,@TEST_ARG2@,$TEST_ARG2,;t t
23425 s,@TEST_DEP2@,$TEST_DEP2,;t t
23426 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23427 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23428 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23429 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23430 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23431 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23432 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23433 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23434 s,@cross_compiling@,$cross_compiling,;t t
23435 s,@TIC_PATH@,$TIC_PATH,;t t
23436 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23437 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23438 s,@PANEL_NAME@,$PANEL_NAME,;t t
23439 s,@MENU_NAME@,$MENU_NAME,;t t
23440 s,@FORM_NAME@,$FORM_NAME,;t t
23441 s,@CXX_NAME@,$CXX_NAME,;t t
23442 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23443 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23444 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23445 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23446 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23447 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23448 CEOF
23449
23450 EOF
23451
23452   cat >>$CONFIG_STATUS <<\EOF
23453   # Split the substitutions into bite-sized pieces for seds with
23454   # small command number limits, like on Digital OSF/1 and HP-UX.
23455   ac_max_sed_lines=48
23456   ac_sed_frag=1 # Number of current file.
23457   ac_beg=1 # First line for current file.
23458   ac_end=$ac_max_sed_lines # Line after last line for current file.
23459   ac_more_lines=:
23460   ac_sed_cmds=
23461   while $ac_more_lines; do
23462     if test $ac_beg -gt 1; then
23463       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23464     else
23465       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23466     fi
23467     if test ! -s $tmp/subs.frag; then
23468       ac_more_lines=false
23469     else
23470       # The purpose of the label and of the branching condition is to
23471       # speed up the sed processing (if there are no `@' at all, there
23472       # is no need to browse any of the substitutions).
23473       # These are the two extra sed commands mentioned above.
23474       (echo ':t
23475   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23476       # It is possible to make a multiline substitution using escaped newlines.
23477       # Ensure that we do not split the substitution between script fragments.
23478       ac_BEG=$ac_end
23479       ac_END=`expr $ac_end + $ac_max_sed_lines`
23480       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23481       if test -s $tmp/subs.next; then
23482         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23483         if test ! -s $tmp/subs.edit; then
23484           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23485           if test ! -s $tmp/subs.edit; then
23486             if test $ac_beg -gt 1; then
23487               ac_end=`expr $ac_end - 1`
23488               continue
23489             fi
23490           fi
23491         fi
23492       fi
23493
23494       if test -z "$ac_sed_cmds"; then
23495         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23496       else
23497         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23498       fi
23499       ac_sed_frag=`expr $ac_sed_frag + 1`
23500       ac_beg=$ac_end
23501       ac_end=`expr $ac_end + $ac_max_sed_lines`
23502     fi
23503   done
23504   if test -z "$ac_sed_cmds"; then
23505     ac_sed_cmds=cat
23506   fi
23507 fi # test -n "$CONFIG_FILES"
23508
23509 EOF
23510 cat >>$CONFIG_STATUS <<\EOF
23511 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23512   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23513   case $ac_file in
23514   - | *:- | *:-:* ) # input from stdin
23515         cat >$tmp/stdin
23516         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23517         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23518   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23519         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23520   * )   ac_file_in=$ac_file.in ;;
23521   esac
23522
23523   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23524   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23525          X"$ac_file" : 'X\(//\)[^/]' \| \
23526          X"$ac_file" : 'X\(//\)$' \| \
23527          X"$ac_file" : 'X\(/\)' \| \
23528          .     : '\(.\)' 2>/dev/null ||
23529 echo X"$ac_file" |
23530     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23531           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23532           /^X\(\/\/\)$/{ s//\1/; q; }
23533           /^X\(\/\).*/{ s//\1/; q; }
23534           s/.*/./; q'`
23535   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23536     { case "$ac_dir" in
23537   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23538   *)                      as_incr_dir=.;;
23539 esac
23540 as_dummy="$ac_dir"
23541 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23542   case $as_mkdir_dir in
23543     # Skip DOS drivespec
23544     ?:) as_incr_dir=$as_mkdir_dir ;;
23545     *)
23546       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23547       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23548     ;;
23549   esac
23550 done; }
23551
23552     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23553     # A "../" for each directory in $ac_dir_suffix.
23554     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23555   else
23556     ac_dir_suffix= ac_dots=
23557   fi
23558
23559   case $srcdir in
23560   .)  ac_srcdir=.
23561       if test -z "$ac_dots"; then
23562          ac_top_srcdir=.
23563       else
23564          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23565       fi ;;
23566   [\\/]* | ?:[\\/]* )
23567       ac_srcdir=$srcdir$ac_dir_suffix;
23568       ac_top_srcdir=$srcdir ;;
23569   *) # Relative path.
23570     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23571     ac_top_srcdir=$ac_dots$srcdir ;;
23572   esac
23573
23574   case $INSTALL in
23575   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23576   *) ac_INSTALL=$ac_dots$INSTALL ;;
23577   esac
23578
23579   if test x"$ac_file" != x-; then
23580     { echo "$as_me:23580: creating $ac_file" >&5
23581 echo "$as_me: creating $ac_file" >&6;}
23582     rm -f "$ac_file"
23583   fi
23584   # Let's still pretend it is `configure' which instantiates (i.e., don't
23585   # use $as_me), people would be surprised to read:
23586   #    /* config.h.  Generated automatically by config.status.  */
23587   configure_input="Generated automatically from `echo $ac_file_in |
23588                                                  sed 's,.*/,,'` by configure."
23589
23590   # First look for the input files in the build tree, otherwise in the
23591   # src tree.
23592   ac_file_inputs=`IFS=:
23593     for f in $ac_file_in; do
23594       case $f in
23595       -) echo $tmp/stdin ;;
23596       [\\/$]*)
23597          # Absolute (can't be DOS-style, as IFS=:)
23598          test -f "$f" || { { echo "$as_me:23598: error: cannot find input file: $f" >&5
23599 echo "$as_me: error: cannot find input file: $f" >&2;}
23600    { (exit 1); exit 1; }; }
23601          echo $f;;
23602       *) # Relative
23603          if test -f "$f"; then
23604            # Build tree
23605            echo $f
23606          elif test -f "$srcdir/$f"; then
23607            # Source tree
23608            echo $srcdir/$f
23609          else
23610            # /dev/null tree
23611            { { echo "$as_me:23611: error: cannot find input file: $f" >&5
23612 echo "$as_me: error: cannot find input file: $f" >&2;}
23613    { (exit 1); exit 1; }; }
23614          fi;;
23615       esac
23616     done` || { (exit 1); exit 1; }
23617 EOF
23618 cat >>$CONFIG_STATUS <<\EOF
23619   ac_warn_datarootdir=no
23620   if test x"$ac_file" != x-; then
23621     for ac_item in $ac_file_inputs
23622     do
23623       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23624       if test -n "$ac_seen"; then
23625         ac_used=`grep '@datarootdir@' $ac_item`
23626         if test -z "$ac_used"; then
23627           { echo "$as_me:23627: WARNING: datarootdir was used implicitly but not set:
23628 $ac_seen" >&5
23629 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23630 $ac_seen" >&2;}
23631           ac_warn_datarootdir=yes
23632         fi
23633       fi
23634       ac_seen=`grep '${datarootdir}' $ac_item`
23635       if test -n "$ac_seen"; then
23636         { echo "$as_me:23636: WARNING: datarootdir was used explicitly but not set:
23637 $ac_seen" >&5
23638 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23639 $ac_seen" >&2;}
23640         ac_warn_datarootdir=yes
23641       fi
23642     done
23643   fi
23644
23645 if test "x$ac_warn_datarootdir" = xyes; then
23646   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23647 fi
23648
23649 EOF
23650 cat >>$CONFIG_STATUS <<EOF
23651   sed "$ac_vpsub
23652 $extrasub
23653 EOF
23654 cat >>$CONFIG_STATUS <<\EOF
23655 :t
23656 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23657 s,@configure_input@,$configure_input,;t t
23658 s,@srcdir@,$ac_srcdir,;t t
23659 s,@top_srcdir@,$ac_top_srcdir,;t t
23660 s,@INSTALL@,$ac_INSTALL,;t t
23661 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23662   rm -f $tmp/stdin
23663   if test x"$ac_file" != x-; then
23664     cp $tmp/out $ac_file
23665
23666     for ac_name in prefix exec_prefix datarootdir
23667     do
23668         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23669         if test -n "$ac_seen"; then
23670             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23671             if test -z "$ac_init"; then
23672               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23673               { echo "$as_me:23673: WARNING: Variable $ac_name is used but was not set:
23674 $ac_seen" >&5
23675 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23676 $ac_seen" >&2;}
23677             fi
23678         fi
23679     done
23680     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23681     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23682     if test -s $tmp/out; then
23683       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23684       { echo "$as_me:23684: WARNING: Some variables may not be substituted:
23685 $ac_seen" >&5
23686 echo "$as_me: WARNING: Some variables may not be substituted:
23687 $ac_seen" >&2;}
23688     fi
23689   else
23690     cat $tmp/out
23691   fi
23692   rm -f $tmp/out
23693
23694 done
23695 EOF
23696 cat >>$CONFIG_STATUS <<\EOF
23697
23698 #
23699 # CONFIG_HEADER section.
23700 #
23701
23702 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23703 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23704 #
23705 # ac_d sets the value in "#define NAME VALUE" lines.
23706 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23707 ac_dB='[        ].*$,\1#\2'
23708 ac_dC=' '
23709 ac_dD=',;t'
23710 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23711 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23712 ac_iB='\([      ]\),\1#\2define\3'
23713 ac_iC=' '
23714 ac_iD='\4,;t'
23715 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23716 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23717 ac_uB='$,\1#\2define\3'
23718 ac_uC=' '
23719 ac_uD=',;t'
23720
23721 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23722   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23723   case $ac_file in
23724   - | *:- | *:-:* ) # input from stdin
23725         cat >$tmp/stdin
23726         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23727         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23728   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23729         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23730   * )   ac_file_in=$ac_file.in ;;
23731   esac
23732
23733   test x"$ac_file" != x- && { echo "$as_me:23733: creating $ac_file" >&5
23734 echo "$as_me: creating $ac_file" >&6;}
23735
23736   # First look for the input files in the build tree, otherwise in the
23737   # src tree.
23738   ac_file_inputs=`IFS=:
23739     for f in $ac_file_in; do
23740       case $f in
23741       -) echo $tmp/stdin ;;
23742       [\\/$]*)
23743          # Absolute (can't be DOS-style, as IFS=:)
23744          test -f "$f" || { { echo "$as_me:23744: error: cannot find input file: $f" >&5
23745 echo "$as_me: error: cannot find input file: $f" >&2;}
23746    { (exit 1); exit 1; }; }
23747          echo $f;;
23748       *) # Relative
23749          if test -f "$f"; then
23750            # Build tree
23751            echo $f
23752          elif test -f "$srcdir/$f"; then
23753            # Source tree
23754            echo $srcdir/$f
23755          else
23756            # /dev/null tree
23757            { { echo "$as_me:23757: error: cannot find input file: $f" >&5
23758 echo "$as_me: error: cannot find input file: $f" >&2;}
23759    { (exit 1); exit 1; }; }
23760          fi;;
23761       esac
23762     done` || { (exit 1); exit 1; }
23763   # Remove the trailing spaces.
23764   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23765
23766 EOF
23767
23768 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23769 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23770 # be either 'cat' or 'sort'.
23771 cat confdefs.h | uniq >conftest.vals
23772
23773 # Break up conftest.vals because some shells have a limit on
23774 # the size of here documents, and old seds have small limits too.
23775
23776 rm -f conftest.tail
23777 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23778 while grep . conftest.vals >/dev/null
23779 do
23780   # Write chunks of a limited-size here document to conftest.frag.
23781   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23782   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23783   echo 'CEOF' >> $CONFIG_STATUS
23784   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23785   rm -f conftest.vals
23786   mv conftest.tail conftest.vals
23787 done
23788 rm -f conftest.vals
23789
23790 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23791 # marker @DEFS@.
23792 echo '  cat >> conftest.edit <<CEOF
23793 /@DEFS@/r conftest.frag
23794 /@DEFS@/d
23795 CEOF
23796 sed -f conftest.edit $tmp/in > $tmp/out
23797 rm -f $tmp/in
23798 mv $tmp/out $tmp/in
23799 rm -f conftest.edit conftest.frag
23800 ' >> $CONFIG_STATUS
23801
23802 cat >>$CONFIG_STATUS <<\EOF
23803   # Let's still pretend it is `configure' which instantiates (i.e., don't
23804   # use $as_me), people would be surprised to read:
23805   #    /* config.h.  Generated automatically by config.status.  */
23806   if test x"$ac_file" = x-; then
23807     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23808   else
23809     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23810   fi
23811   cat $tmp/in >>$tmp/config.h
23812   rm -f $tmp/in
23813   if test x"$ac_file" != x-; then
23814     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23815       { echo "$as_me:23815: $ac_file is unchanged" >&5
23816 echo "$as_me: $ac_file is unchanged" >&6;}
23817     else
23818       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23819          X"$ac_file" : 'X\(//\)[^/]' \| \
23820          X"$ac_file" : 'X\(//\)$' \| \
23821          X"$ac_file" : 'X\(/\)' \| \
23822          .     : '\(.\)' 2>/dev/null ||
23823 echo X"$ac_file" |
23824     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23825           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23826           /^X\(\/\/\)$/{ s//\1/; q; }
23827           /^X\(\/\).*/{ s//\1/; q; }
23828           s/.*/./; q'`
23829       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23830         { case "$ac_dir" in
23831   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23832   *)                      as_incr_dir=.;;
23833 esac
23834 as_dummy="$ac_dir"
23835 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23836   case $as_mkdir_dir in
23837     # Skip DOS drivespec
23838     ?:) as_incr_dir=$as_mkdir_dir ;;
23839     *)
23840       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23841       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23842     ;;
23843   esac
23844 done; }
23845
23846       fi
23847       rm -f $ac_file
23848       mv $tmp/config.h $ac_file
23849     fi
23850   else
23851     cat $tmp/config.h
23852     rm -f $tmp/config.h
23853   fi
23854 done
23855 EOF
23856 cat >>$CONFIG_STATUS <<\EOF
23857 #
23858 # CONFIG_COMMANDS section.
23859 #
23860 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23861   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23862   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23863
23864   case $ac_dest in
23865     default )
23866 if test "x$cf_with_tests" != xno ; then
23867
23868 for cf_dir in test
23869 do
23870         if test ! -d $srcdir/$cf_dir; then
23871                 continue
23872         elif test -f $srcdir/$cf_dir/programs; then
23873                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23874         fi
23875 done
23876
23877 fi
23878
23879 cf_prefix=$LIB_PREFIX
23880
23881 case $cf_cv_shlib_version in
23882 (cygdll|msysdll|mingw)
23883         TINFO_NAME=$TINFO_ARG_SUFFIX
23884         TINFO_SUFFIX=.dll
23885         ;;
23886 esac
23887
23888 if test -n "$TINFO_SUFFIX" ; then
23889         case $TINFO_SUFFIX in
23890         (tw*)
23891                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23892                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23893                 ;;
23894         (t*)
23895                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23896                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23897                 ;;
23898         (w*)
23899                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23900                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23901                 ;;
23902         esac
23903 fi
23904
23905 for cf_dir in $SRC_SUBDIRS
23906 do
23907         if test ! -d $srcdir/$cf_dir ; then
23908                 continue
23909         elif test -f $srcdir/$cf_dir/modules; then
23910
23911                 SHARED_LIB=
23912                 Libs_To_Make=
23913                 cf_awk_program=
23914                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23915                 then
23916                         cf_awk_program="$cf_awk_program\
23917 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
23918 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
23919 "
23920                 fi
23921
23922                 if test "x$WILDCARD_SYMS" = xno
23923                 then
23924                         cf_awk_program="$cf_awk_program\
23925 /[      ]_\\*;/ { skip=1; next; }\
23926 "
23927                 fi
23928
23929                 if test "x$cf_awk_program" != "x"
23930                 then
23931                         cat >>$cf_dir/Makefile <<CF_EOF
23932
23933 # Generated by CF_LIB_RULES
23934 resulting.map: $UNALTERED_SYMS
23935         $AWK 'BEGIN { skip = 1; last=""; } \
23936 $cf_awk_program \
23937 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
23938  skip = 0; last = \$\$0; } \
23939 END { print last; }' < $UNALTERED_SYMS >\$@
23940
23941 distclean::
23942         rm -f resulting.map
23943 CF_EOF
23944                 fi
23945
23946                 for cf_item in $cf_LIST_MODELS
23947                 do
23948
23949         case X$cf_item in
23950         (Xlibtool)
23951                 cf_suffix='.la'
23952                 cf_depsuf=$cf_suffix
23953                 ;;
23954         (Xdebug)
23955                 cf_suffix='_g.a'
23956                 cf_depsuf=$cf_suffix
23957                 ;;
23958         (Xprofile)
23959                 cf_suffix='_p.a'
23960                 cf_depsuf=$cf_suffix
23961                 ;;
23962         (Xshared)
23963                 case $cf_cv_system_name in
23964                 (aix[5-7]*)
23965                         cf_suffix='.so'
23966                         cf_depsuf=$cf_suffix
23967                         ;;
23968                 (cygwin*|msys*|mingw*)
23969                         cf_suffix='.dll'
23970                         cf_depsuf='.dll.a'
23971                         ;;
23972                 (darwin*)
23973                         cf_suffix='.dylib'
23974                         cf_depsuf=$cf_suffix
23975                         ;;
23976                 (hpux*)
23977                         case $target in
23978                         (ia64*)
23979                                 cf_suffix='.so'
23980                                 cf_depsuf=$cf_suffix
23981                                 ;;
23982                         (*)
23983                                 cf_suffix='.sl'
23984                                 cf_depsuf=$cf_suffix
23985                                 ;;
23986                         esac
23987                         ;;
23988                 (*)
23989                         cf_suffix='.so'
23990                         cf_depsuf=$cf_suffix
23991                         ;;
23992                 esac
23993                 ;;
23994         (*)
23995                 cf_suffix='.a'
23996                 cf_depsuf=$cf_suffix
23997                 ;;
23998         esac
23999         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24000         then
24001                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24002                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24003         fi
24004
24005                         cf_libname=$cf_dir
24006                         test "$cf_dir" = c++ && cf_libname=ncurses++
24007                         if test $cf_item = shared ; then
24008                                 if test -n "${LIB_SUFFIX}"
24009                                 then
24010                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24011                                 else
24012                                         cf_shared_suffix="$cf_suffix"
24013                                 fi
24014                                 if test "$cf_cv_do_symlinks" = yes ; then
24015                                         cf_version_name=
24016
24017                                         case "$cf_cv_shlib_version" in
24018                                         (rel)
24019                                                 cf_version_name=REL_VERSION
24020                                                 ;;
24021                                         (abi)
24022                                                 cf_version_name=ABI_VERSION
24023                                                 ;;
24024                                         esac
24025
24026                                         if test -n "$cf_version_name"
24027                                         then
24028                                                 case "$cf_cv_system_name" in
24029                                                 (darwin*)
24030                                                         # "w", etc?
24031                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24032                                                         ;;
24033                                                 (*)
24034                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24035                                                         ;;
24036                                                 esac
24037                                         fi
24038                                         if test -n "${USE_LIB_SUFFIX}"
24039                                         then
24040                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24041                                         else
24042                                                 cf_shared_suffix="$cf_suffix"
24043                                         fi
24044                                 fi
24045                                 # cygwin needs import library, and has unique naming convention
24046                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24047                                 # use 'cyg' prefix for shared lib.
24048                                 case $cf_cv_shlib_version in
24049                                 (cygdll)
24050                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24051                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24052                                         ;;
24053                                 (msysdll)
24054                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24055                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24056                                         ;;
24057                                 (mingw)
24058                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24059                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24060                                         ;;
24061                                 (*)
24062                                         cf_add_lib=
24063                                         ;;
24064                                 esac
24065                                 if test -n "$cf_add_lib"
24066                                 then
24067                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24068                                         continue
24069                                 fi
24070                         fi
24071                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24072                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24073                 done
24074
24075                 if test $cf_dir = ncurses ; then
24076                         cf_subsets="$LIB_SUBSETS"
24077                         cf_r_parts="$cf_subsets"
24078                         cf_liblist="$Libs_To_Make"
24079
24080                         while test -n "$cf_r_parts"
24081                         do
24082                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24083                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24084                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24085                                         cf_add_lib=
24086                                         case $cf_l_parts in
24087                                         (*termlib*)
24088                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24089                                                 ;;
24090                                         (*ticlib*)
24091                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24092                                                 ;;
24093                                         (*)
24094                                                 break
24095                                                 ;;
24096                                         esac
24097                                         if test -n "$cf_add_lib"; then
24098                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24099                                         fi
24100                                 else
24101                                         break
24102                                 fi
24103                         done
24104                 else
24105                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24106                 fi
24107
24108                 if test $cf_dir = c++; then
24109                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24110                                 cf_list=
24111                                 for cf_item in $Libs_To_Make
24112                                 do
24113                                         case $cf_item in
24114                                         (*.a)
24115                                                 ;;
24116                                         (*)
24117                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24118                                                 ;;
24119                                         esac
24120                                         for cf_test in $cf_list
24121                                         do
24122                                                 if test "$cf_test" = "$cf_item"
24123                                                 then
24124                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24125                                                         cf_item=
24126                                                         break
24127                                                 fi
24128                                         done
24129                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24130                                 done
24131                                 Libs_To_Make="$cf_list"
24132                         fi
24133                 fi
24134
24135                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24136                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24137                         $cf_dir/Makefile >$cf_dir/Makefile.out
24138                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24139
24140                 $AWK -f $srcdir/mk-0th.awk \
24141                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24142                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24143
24144                 for cf_subset in $cf_subsets
24145                 do
24146                         cf_subdirs=
24147                         for cf_item in $cf_LIST_MODELS
24148                         do
24149
24150                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24151
24152 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24153
24154                         CXX_MODEL=$cf_ITEM
24155                         if test "$CXX_MODEL" = SHARED; then
24156                                 case $cf_cv_shlib_version in
24157                                 (cygdll|msysdll|mingw)
24158                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24159
24160 echo "${as_me:-configure}:24160: testing overriding CXX_MODEL to SHARED ..." 1>&5
24161
24162                                         with_shared_cxx=yes
24163                                         ;;
24164                                 (*)
24165                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24166                                         ;;
24167                                 esac
24168                         fi
24169
24170         case X$cf_item in
24171         (Xlibtool)
24172                 cf_suffix='.la'
24173                 cf_depsuf=$cf_suffix
24174                 ;;
24175         (Xdebug)
24176                 cf_suffix='_g.a'
24177                 cf_depsuf=$cf_suffix
24178                 ;;
24179         (Xprofile)
24180                 cf_suffix='_p.a'
24181                 cf_depsuf=$cf_suffix
24182                 ;;
24183         (Xshared)
24184                 case $cf_cv_system_name in
24185                 (aix[5-7]*)
24186                         cf_suffix='.so'
24187                         cf_depsuf=$cf_suffix
24188                         ;;
24189                 (cygwin*|msys*|mingw*)
24190                         cf_suffix='.dll'
24191                         cf_depsuf='.dll.a'
24192                         ;;
24193                 (darwin*)
24194                         cf_suffix='.dylib'
24195                         cf_depsuf=$cf_suffix
24196                         ;;
24197                 (hpux*)
24198                         case $target in
24199                         (ia64*)
24200                                 cf_suffix='.so'
24201                                 cf_depsuf=$cf_suffix
24202                                 ;;
24203                         (*)
24204                                 cf_suffix='.sl'
24205                                 cf_depsuf=$cf_suffix
24206                                 ;;
24207                         esac
24208                         ;;
24209                 (*)
24210                         cf_suffix='.so'
24211                         cf_depsuf=$cf_suffix
24212                         ;;
24213                 esac
24214                 ;;
24215         (*)
24216                 cf_suffix='.a'
24217                 cf_depsuf=$cf_suffix
24218                 ;;
24219         esac
24220         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24221         then
24222                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24223                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24224         fi
24225
24226         case $cf_item in
24227         (libtool) cf_subdir='obj_lo'  ;;
24228         (normal)  cf_subdir='objects' ;;
24229         (debug)   cf_subdir='obj_g' ;;
24230         (profile) cf_subdir='obj_p' ;;
24231         (shared)
24232                 case $cf_cv_system_name in
24233                 (cygwin|msys)
24234                         cf_subdir='objects' ;;
24235                 (*)
24236                         cf_subdir='obj_s' ;;
24237                 esac
24238         esac
24239
24240                         # Test for case where we build libtinfo with a different name.
24241                         cf_libname=$cf_dir
24242                         if test $cf_dir = ncurses ; then
24243                                 case $cf_subset in
24244                                 (*base*)
24245                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24246                                         ;;
24247                                 (*termlib*)
24248                                         cf_libname=$TINFO_LIB_SUFFIX
24249                                         ;;
24250                                 (ticlib*)
24251                                         cf_libname=$TICS_LIB_SUFFIX
24252                                         ;;
24253                                 esac
24254                         elif test $cf_dir = c++ ; then
24255                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24256                         else
24257                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24258                         fi
24259                         if test -n "${USE_ARG_SUFFIX}" ; then
24260                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24261                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24262                         fi
24263
24264                         # These dependencies really are for development, not
24265                         # builds, but they are useful in porting, too.
24266                         cf_depend="../include/ncurses_cfg.h"
24267                         if test "$srcdir" = "."; then
24268                                 cf_reldir="."
24269                         else
24270                                 cf_reldir="\${srcdir}"
24271                         fi
24272
24273                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24274                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24275                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24276                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24277                         fi
24278
24279                         cf_dir_suffix=
24280                         old_cf_suffix="$cf_suffix"
24281                         if test "$cf_cv_shlib_version_infix" = yes ; then
24282                         if test -n "$USE_LIB_SUFFIX" ; then
24283                                 case $USE_LIB_SUFFIX in
24284                                 (tw*)
24285                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24286                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24287                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24288                                         ;;
24289                                 (t*)
24290                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24291                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24292                                         cf_dir_suffix=t$EXTRA_SUFFIX
24293                                         ;;
24294                                 (w*)
24295                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24296                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24297                                         cf_dir_suffix=w$EXTRA_SUFFIX
24298                                         ;;
24299                                 (*)
24300                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24301                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24302                                         cf_dir_suffix=$EXTRA_SUFFIX
24303                                         ;;
24304                                 esac
24305                         fi
24306                         fi
24307
24308                         $AWK -f $srcdir/mk-1st.awk \
24309                                 name=${cf_libname}${cf_dir_suffix} \
24310                                 traces=$LIB_TRACING \
24311                                 MODEL=$cf_ITEM \
24312                                 CXX_MODEL=$CXX_MODEL \
24313                                 model=$cf_subdir \
24314                                 prefix=$cf_prefix \
24315                                 suffix=$cf_suffix \
24316                                 subset=$cf_subset \
24317                                 driver=$cf_cv_term_driver \
24318                                 SymLink="$LN_S" \
24319                                 TermlibRoot=$TINFO_NAME \
24320                                 TermlibSuffix=$TINFO_SUFFIX \
24321                                 ShlibVer=$cf_cv_shlib_version \
24322                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24323                                 ReLink=${cf_cv_do_relink:-no} \
24324                                 DoLinks=$cf_cv_do_symlinks \
24325                                 rmSoLocs=$cf_cv_rm_so_locs \
24326                                 ldconfig="$LDCONFIG" \
24327                                 overwrite=$WITH_OVERWRITE \
24328                                 depend="$cf_depend" \
24329                                 host="$host" \
24330                                 libtool_version="$LIBTOOL_VERSION" \
24331                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24332
24333                         cf_suffix="$old_cf_suffix"
24334
24335                         for cf_subdir2 in $cf_subdirs lib
24336                         do
24337                                 test $cf_subdir = $cf_subdir2 && break
24338                         done
24339                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24340                         $AWK -f $srcdir/mk-2nd.awk \
24341                                 name=$cf_dir \
24342                                 traces=$LIB_TRACING \
24343                                 MODEL=$cf_ITEM \
24344                                 model=$cf_subdir \
24345                                 subset=$cf_subset \
24346                                 srcdir=$srcdir \
24347                                 echo=$WITH_ECHO \
24348                                 crenames=$cf_cv_prog_CC_c_o \
24349                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24350                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24351                         cf_subdirs="$cf_subdirs $cf_subdir"
24352                         done
24353                 done
24354         fi
24355
24356         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24357 done
24358
24359 for cf_dir in $SRC_SUBDIRS
24360 do
24361         if test ! -d $srcdir/$cf_dir ; then
24362                 continue
24363         fi
24364
24365         if test -f $cf_dir/Makefile ; then
24366                 case "$cf_dir" in
24367                 (Ada95)
24368                         echo 'libs \' >> Makefile
24369                         echo 'install.libs \' >> Makefile
24370                         echo 'uninstall.libs ::' >> Makefile
24371                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24372                         ;;
24373                 esac
24374         fi
24375
24376         if test -f $srcdir/$cf_dir/modules; then
24377                 echo >> Makefile
24378                 if test -f $srcdir/$cf_dir/headers; then
24379 cat >> Makefile <<CF_EOF
24380 install.includes \\
24381 uninstall.includes \\
24382 CF_EOF
24383                 fi
24384 if test "$cf_dir" != "c++" ; then
24385 echo 'lint \' >> Makefile
24386 fi
24387 cat >> Makefile <<CF_EOF
24388 libs \\
24389 lintlib \\
24390 install.libs \\
24391 uninstall.libs \\
24392 install.$cf_dir \\
24393 uninstall.$cf_dir ::
24394         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24395 CF_EOF
24396         elif test -f $srcdir/$cf_dir/headers; then
24397 cat >> Makefile <<CF_EOF
24398
24399 libs \\
24400 install.libs \\
24401 uninstall.libs \\
24402 install.includes \\
24403 uninstall.includes ::
24404         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24405 CF_EOF
24406 fi
24407 done
24408
24409 if test "x$cf_with_db_install" = xyes; then
24410 cat >> Makefile <<CF_EOF
24411
24412 install.libs uninstall.libs \\
24413 install.data uninstall.data ::
24414 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24415 CF_EOF
24416 else
24417 cat >> Makefile <<CF_EOF
24418
24419 install.libs uninstall.libs ::
24420         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24421 CF_EOF
24422 fi
24423
24424 if test "x$cf_with_manpages" = xyes; then
24425 cat >> Makefile <<CF_EOF
24426
24427 install.man \\
24428 uninstall.man ::
24429         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24430 CF_EOF
24431 fi
24432
24433 cat >> Makefile <<CF_EOF
24434
24435 distclean ::
24436         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24437         rm -f headers.sh headers.sed mk_shared_lib.sh
24438         rm -f edit_man.* man_alias.*
24439         rm -rf \${DIRS_TO_MAKE}
24440 CF_EOF
24441
24442 # Special case: tack's manpage lives in its own directory.
24443 if test "x$cf_with_manpages" = xyes; then
24444 if test -d tack ; then
24445 if test -f $srcdir/$tack.h; then
24446 cat >> Makefile <<CF_EOF
24447
24448 install.man \\
24449 uninstall.man ::
24450         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24451 CF_EOF
24452 fi
24453 fi
24454 fi
24455
24456 rm -f headers.sed headers.sh
24457
24458 echo creating headers.sh
24459 cat >headers.sh <<CF_EOF
24460 #! $SHELL
24461 # This shell script is generated by the 'configure' script.  It is invoked in a
24462 # subdirectory of the build tree.  It generates a sed-script in the parent
24463 # directory that is used to adjust includes for header files that reside in a
24464 # subdirectory of /usr/include, etc.
24465 PRG=""
24466 while test \$# != 3
24467 do
24468 PRG="\$PRG \$1"; shift
24469 done
24470 DST=\$1
24471 REF=\$2
24472 SRC=\$3
24473 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24474 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24475 echo installing \$SRC in \$DST
24476 CF_EOF
24477
24478 if test $WITH_CURSES_H = yes; then
24479         cat >>headers.sh <<CF_EOF
24480 case \$DST in
24481 (/*/include/*)
24482         END=\`basename \$DST\`
24483         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24484         do
24485                 NAME=\`basename \$i\`
24486                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24487         done
24488         ;;
24489 (*)
24490         echo "" >> \$TMPSED
24491         ;;
24492 esac
24493 CF_EOF
24494
24495 else
24496         cat >>headers.sh <<CF_EOF
24497 case \$DST in
24498 (/*/include/*)
24499         END=\`basename \$DST\`
24500         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24501         do
24502                 NAME=\`basename \$i\`
24503                 if test "\$NAME" = "curses.h"
24504                 then
24505                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24506                         NAME=ncurses.h
24507                 fi
24508                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24509         done
24510         ;;
24511 (*)
24512         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24513         ;;
24514 esac
24515 CF_EOF
24516 fi
24517 cat >>headers.sh <<CF_EOF
24518 rm -f \$TMPSRC
24519 sed -f \$TMPSED \$SRC > \$TMPSRC
24520 NAME=\`basename \$SRC\`
24521 CF_EOF
24522 if test $WITH_CURSES_H != yes; then
24523         cat >>headers.sh <<CF_EOF
24524 test "\$NAME" = "curses.h" && NAME=ncurses.h
24525 CF_EOF
24526 fi
24527 cat >>headers.sh <<CF_EOF
24528 # Just in case someone gzip'd manpages, remove the conflicting copy.
24529 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24530
24531 eval \$PRG \$TMPSRC \$DST/\$NAME
24532 rm -f \$TMPSRC \$TMPSED
24533 CF_EOF
24534
24535 chmod 0755 headers.sh
24536
24537 for cf_dir in $SRC_SUBDIRS
24538 do
24539         if test ! -d $srcdir/$cf_dir ; then
24540                 continue
24541         fi
24542
24543         if test -f $srcdir/$cf_dir/headers; then
24544                 $AWK -f $srcdir/mk-hdr.awk \
24545                         subset="$LIB_SUBSETS" \
24546                         compat="$WITH_CURSES_H" \
24547                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24548         fi
24549
24550         if test -f $srcdir/$cf_dir/modules; then
24551                 if test "$cf_dir" != "c++" ; then
24552                         cat >>$cf_dir/Makefile <<"CF_EOF"
24553 depend : ${AUTO_SRC}
24554         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24555
24556 # DO NOT DELETE THIS LINE -- make depend depends on it.
24557 CF_EOF
24558                 fi
24559         fi
24560 done
24561
24562 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24563 if test -z "$USE_OLD_MAKERULES" ; then
24564         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24565 fi
24566 fi
24567  ;;
24568   esac
24569 done
24570 EOF
24571
24572 cat >>$CONFIG_STATUS <<\EOF
24573
24574 { (exit 0); exit 0; }
24575 EOF
24576 chmod +x $CONFIG_STATUS
24577 ac_clean_files=$ac_clean_files_save
24578
24579 # configure is writing to config.log, and then calls config.status.
24580 # config.status does its own redirection, appending to config.log.
24581 # Unfortunately, on DOS this fails, as config.log is still kept open
24582 # by configure, so config.status won't be able to write to it; its
24583 # output is simply discarded.  So we exec the FD to /dev/null,
24584 # effectively closing config.log, so it can be properly (re)opened and
24585 # appended to by config.status.  When coming back to configure, we
24586 # need to make the FD available again.
24587 if test "$no_create" != yes; then
24588   ac_cs_success=:
24589   exec 5>/dev/null
24590   $SHELL $CONFIG_STATUS || ac_cs_success=false
24591   exec 5>>config.log
24592   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24593   # would make configure fail if this is the last instruction.
24594   $ac_cs_success || { (exit 1); exit 1; }
24595 fi
24596 ${MAKE:-make} preinstall